/* Business Portal Specific Styles */
.portal-card {
  background: var(--surface, #ffffff);
  border-radius: var(--radius-lg, 18px);
  box-shadow: var(--shadow-soft, 0 16px 40px rgba(15, 23, 42, 0.08));
  border: 1px solid var(--border, #e5e7eb);
  padding: clamp(1.5rem, 3vw, 2.25rem);
}

.portal-signout-btn {
  position: absolute;
  top: 1.5rem;
  right: 0;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  font-weight: 600;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease,
    border-color 180ms ease, transform 160ms ease;
  background-color: rgba(15, 23, 42, 0.65);
}

.portal-signout-btn:hover,
.portal-signout-btn:focus-visible {
  background-color: rgba(37, 99, 235, 0.85);
  border-color: rgba(37, 99, 235, 0.9);
  color: #fff;
  transform: translateY(-1px);
}

.portal-signout-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
}

.site-header-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding-top: 1.5rem;
}

.site-header-inner .hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
}

.portal-frame {
  width: 100%;
  min-height: 640px;
  border: 0;
  border-radius: var(--radius-md, 12px);
  background: var(--surface-muted, #eef1f7);
}

@media (max-width: 720px) {
  .portal-frame {
    min-height: 520px;
  }
}

.keyword-default-container {
  margin-bottom: 1.5rem;
}

.keyword-default-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  gap: 1rem;
}

.keyword-default-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}

.keyword-badge {
  background: rgba(37, 99, 235, 0.15);
  color: var(--primary, #2563eb);
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
}

.keyword-default-empty {
  border: 1px dashed #dc2626;
  background: #fef2f2;
  color: #dc2626;
  border-radius: var(--radius-md, 12px);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.keyword-default-empty strong {
  font-size: 1rem;
}

.keyword-default-empty button {
  align-self: flex-start;
  background: #dc2626;
  color: #fff;
  border: none;
  border-radius: var(--radius-sm, 8px);
  padding: 0.5rem 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 180ms ease, transform 150ms ease;
}

.keyword-default-empty button:hover {
  background: #b91c1c;
  transform: translateY(-1px);
}

.keyword-record.keyword-record--empty {
  border-style: dashed;
  text-align: center;
  color: var(--text-muted, #6b7280);
}

.keyword-empty {
  padding: 1rem;
  border: 1px dashed var(--border, #e5e7eb);
  border-radius: var(--radius-md, 12px);
  text-align: center;
  color: var(--text-muted, #6b7280);
}

.keyword-record {
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius-md, 12px);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.keyword-record:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
}

.keyword-record p {
  margin: 0.35rem 0;
}

.keyword-record button {
  margin-left: 0.5rem;
  border-radius: var(--radius-sm, 8px);
  cursor: pointer;
}

.keyword-record--default {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 14px 36px rgba(37, 99, 235, 0.18);
}

.keyword-record--default .keyword-text,
.keyword-record--default .keyword-reply {
  color: var(--primary, #2563eb);
  font-weight: 600;
}

.login-container {
  max-width: 400px;
  margin: 50px auto;
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.login-form label {
  text-align: left;
  font-weight: bold;
}

.login-form input {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 16px;
}

.login-form button {
  padding: 10px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}

.login-form button:hover {
  background-color: #0056b3;
}

.error-message {
  color: red;
  font-size: 14px;
  margin-top: 10px;
}

.maintenance-container {
  display: flex;
  gap: clamp(1rem, 2vw, 1.5rem);
  min-height: 500px;
  margin: clamp(1rem, 3vw, 2rem);
  padding: clamp(1rem, 2vw, 1.75rem);
  background: var(--surface, #ffffff);
  border-radius: var(--radius-lg, 18px);
  box-shadow: var(--shadow-soft, 0 18px 40px rgba(15, 23, 42, 0.12));
}

.sidebar {
  width: 17.5%; /* Set to 15-20% range, using midpoint */
  background-color: #f7f8fb;
  padding: 20px;
  border-right: 1px solid #e5e7eb;
  border-radius: var(--radius-md, 14px);
}

.sidebar h3 {
  margin-top: 0;
  font-size: 20px;
}

.sidebar ul {
  list-style: none;
  padding: 0;
}

.sidebar li {
  padding: 0.65rem 0.5rem;
  cursor: pointer;
  font-size: 0.95rem;
  border-radius: var(--radius-sm, 8px);
  transition: background-color 160ms ease, color 160ms ease;
}

.sidebar li:hover {
  background-color: rgba(37, 99, 235, 0.08);
}

.sidebar li.active {
  background-color: #007bff;
  color: white;
}

.content {
  width: 82.5%; /* Set to 80-85% range, using midpoint */
  padding: clamp(1rem, 2.5vw, 2rem);
  background: #ffffff;
  border-radius: var(--radius-md, 16px);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .maintenance-container {
    flex-direction: column;
    padding: clamp(1rem, 4vw, 1.5rem);
  }

  .sidebar,
  .content {
    width: 100%;
  }

  .sidebar {
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
  }

  .sidebar ul {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }

  .sidebar li {
    flex: 1;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .maintenance-container {
    margin: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .content {
    padding: 1rem;
    border-radius: var(--radius-md, 12px);
  }

  .sidebar li {
    font-size: 0.9rem;
  }

  .keyword-record,
  .keyword-default-empty {
    padding: 0.85rem 1rem;
  }

  .portal-frame {
    min-height: 420px;
  }
}
.stats-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.stats-range {
  display: inline-flex;
  gap: 0.5rem;
  background: #f4f6fb;
  border-radius: 999px;
  padding: 0.25rem;
}

.stats-range-btn {
  border: none;
  background: transparent;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  color: #6b7280;
}

.stats-range-btn.active {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.25);
}

.stats-chart-card {
  position: relative;
  min-height: 320px;
}

.stats-chart-card canvas {
  width: 100%;
  height: 100%;
}

.stats-error {
  margin-top: 0.5rem;
  color: #dc2626;
  font-weight: 600;
}
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-weight: 600;
  color: #111827;
}

  font-weight: 700;
  color: #2563eb;
}


.stats-summary {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-weight: 600;
  color: #111827;
}

.stats-summary span:last-child {
  font-weight: 700;
  color: #2563eb;
}
