/* ==========================================================================
   LAYOUTS.CSS - All Page Layout & Structure Styles
   All page layouts, containers, grids, and structural classes
   ========================================================================== */

/* ==========================================================================
   PAGE LAYOUTS
   ========================================================================== */

.page-layout {
  min-height: 100vh;
}

.page-centered {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to bottom right, #f5f7fa, #eaeef9);
}.page-with-padding {
  min-height: 100vh;
  padding: 2rem;
  background: linear-gradient(to bottom right, #f5f7fa, #eaeef9);
}/* ==========================================================================
   CONTAINERS
   ========================================================================== */

.container-sm {
  width: 100%;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.container-md {
  width: 100%;
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.container-lg {
  width: 100%;
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

.container-xl {
  width: 100%;
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

.container-full {
  width: 100%;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 768px) {
  .container-full {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container-full {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* ==========================================================================
   SECTIONS
   ========================================================================== */

.section-header {
  margin-bottom: 2rem;
}

.section-content {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.section-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e7eb;
}/* ==========================================================================
   HOME PAGE
   ========================================================================== */

.home-top-nav {
  position: absolute;
  top: 0;
  right: 0;
  padding: 1.5rem 2rem;
  z-index: 10;
}

/* ==========================================================================
   SEARCH PAGE SPECIFIC
   ========================================================================== */

.search-page-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(to bottom, #f5f8fc, #eaeef9);
}/* Animated network canvas overlay */
.network-background-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.search-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 42rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.search-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.search-form {
  width: 100%;
}

.search-form-group {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

/* ==========================================================================
   RESULTS PAGE SPECIFIC
   ========================================================================== */

.results-page-wrapper {
  min-height: 100vh;
  padding: 2rem;
  background: var(--background, #f5f7fa);
}.results-container {
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
}

.results-header {
  margin-bottom: 2rem;
}

.results-back-button {
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   CONTENT AREAS
   ========================================================================== */

.content-centered {
  text-align: center;
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.content-empty-state {
  text-align: center;
  padding-top: 4rem;
  padding-bottom: 4rem;
}

/* ==========================================================================
   TYPOGRAPHY CONTAINERS
   ========================================================================== */

.text-container {
  max-width: 65ch;
  margin-left: auto;
  margin-right: auto;
}

.text-container-narrow {
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}

.text-container-wide {
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   GRID LAYOUTS
   ========================================================================== */

.grid-2-cols {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .grid-2-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.grid-3-cols {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .grid-3-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .grid-3-cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.grid-4-cols {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .grid-4-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .grid-4-cols {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ==========================================================================
   FLEX LAYOUTS
   ========================================================================== */

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-start {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.flex-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.flex-col-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   DASHBOARD LAYOUTS
   ========================================================================== */

.dashboard-wrapper {
  display: flex;
  min-height: 100vh;
  background-color: #f0f3f8;
}/* ── Sidebar ─────────────────────────────────────────────── */

.dashboard-sidebar {
  position: fixed;
  top: 0;
  left: -240px;
  width: 240px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  border-right: 1px solid #e5e7eb;
  z-index: 50;
  transition: left 0.25s ease;
  overflow: hidden;
}

.dashboard-sidebar.sidebar-open {
  left: 0;
}@media (min-width: 1024px) {
  .dashboard-sidebar {
    position: sticky;
    left: 0;
    flex-shrink: 0;
  }
}

/* Mobile overlay behind sidebar */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 45;
}

@media (min-width: 1024px) {
  .sidebar-overlay {
    display: none;
  }
}

/* Sidebar logo */
.sidebar-logo {
  padding: 0.75rem 1.25rem 0.5rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  flex-shrink: 0;
}

.sidebar-logo a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.sidebar-logo img {
  width: 100% !important;
  max-width: 148px !important;
  height: auto !important;
  -o-object-fit: contain !important;
     object-fit: contain !important;
}

/* Sidebar profile */
.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem;
  border-bottom: 1px solid #e5e7eb;
}.sidebar-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background-color: #2563eb;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.6875rem;
  flex-shrink: 0;
}

.sidebar-user-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.sidebar-user-name {
  font-weight: 600;
  font-size: 0.8125rem;
  color: #1e2430;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}/* Sidebar navigation */
.sidebar-nav {
  flex: 1;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  border: none;
  border-right: 2px solid transparent;
  background: none;
  color: #374151;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
  text-decoration: none;
  text-align: left;
}

.sidebar-nav-item:hover {
  background-color: #f9fafb;
  color: #111827;
}

.sidebar-nav-active {
  background-color: #eff6ff;
  color: #2563eb;
  font-weight: 600;
  border-right-color: #2563eb;
}

.sidebar-nav-active:hover {
  background-color: #dbeafe;
  color: #1d4ed8;
}.sidebar-nav-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.sidebar-nav-danger {
  color: #dc2626;
}

.sidebar-nav-danger:hover {
  background-color: #fef2f2;
  color: #b91c1c;
}

/* Locked nav items — shown to free_viewer users as upgrade prompts */
.sidebar-nav-locked {
  opacity: 0.55;
  cursor: pointer;
}

.sidebar-nav-locked:hover {
  opacity: 0.75;
  background-color: #f0f9ff;
}

/* Sidebar nav groups — section labels & dividers */
.sidebar-nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.sidebar-nav-section-label {
  padding: 0.75rem 1rem 0.25rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #9ca3af;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.sidebar-nav-divider {
  height: 1px;
  background-color: #e5e7eb;
  margin: 0.375rem 0.75rem;
}
/* Collapsible children container */
.sidebar-nav-children {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.25s ease, opacity 0.2s ease;
}

.sidebar-nav-children.expanded {
  max-height: 300px;
  opacity: 1;
}

/* Chevron icon for collapsible parents */
.sidebar-nav-chevron {
  margin-left: auto;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  transition: transform 0.25s ease;
  color: #9ca3af;
}

.sidebar-nav-chevron.expanded {
  transform: rotate(180deg);
}

/* Sidebar footer */
.sidebar-footer {
  padding: 0.5rem;
  border-top: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

/* Pinned bottom user/profile section */
.sidebar-bottom-user {
  flex-shrink: 0;
  border-top: 1px solid #e5e7eb;
  background-color: #ffffff;
}

.sidebar-bottom-user-inner {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1rem;
}

.sidebar-bottom-user-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
  flex: 1;
}

.sidebar-bottom-user-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-bottom-user-role {
  font-size: 0.6875rem;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-bottom-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border: none;
  background: none;
  color: #6b7280;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
  flex-shrink: 0;
}

.sidebar-bottom-logout:hover {
  background-color: #fee2e2;
  color: #dc2626;
}

.sidebar-bottom-logout svg {
  width: 1rem;
  height: 1rem;
}/* ── Main body (right side) ──────────────────────────────── */

.dashboard-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dashboard-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  background-color: var(--surface, white);
  border-bottom: 1px solid var(--border-subtle, #e4e8ee);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
}.sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  background: none;
  color: #6b7280;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background-color 0.15s;
}

.sidebar-toggle:hover {
  background-color: #f3f4f6;
}

.sidebar-toggle svg {
  width: 1.5rem;
  height: 1.5rem;
}@media (min-width: 1024px) {
  .sidebar-toggle {
    display: none;
  }
}

.dashboard-main {
  flex: 1;
  padding: 1.5rem;
  width: 100%;
}

@media (max-width: 640px) {
  .dashboard-main {
    padding: 1.25rem;
  }
}

.dashboard-content {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
}

.dashboard-welcome {
  margin-bottom: 1.5rem;
}


.page-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary, #6b7280);
  margin: 0 0 1.25rem;
  max-width: 680px;
}
.dashboard-actions {
  margin-top: 3rem;
}

.dashboard-actions-grid {
  margin-top: 1.5rem;
}

/* Page content wrapper — standard outer wrapper for dashboard page content */
.page-content-wrapper {
  width: 100%;
  padding-bottom: 3rem;
}

.dashboard-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 768px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .dashboard-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ── Placeholder sections (coming soon) ──────────────────── */

.section-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  gap: 1rem;
}

.placeholder-icon {
  width: 4rem;
  height: 4rem;
  color: #9ca3af;
  margin-bottom: 0.5rem;
}

.placeholder-icon svg {
  width: 100%;
  height: 100%;
}/* ── Stat cards ──────────────────────────────────────────── */

.stat-card {
  background-color: var(--surface, white);
  padding: 1rem;
  border-radius: 0.625rem;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.06);
  border: 1px solid var(--border-subtle, #e4e8ee);
}.stat-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.375rem;
}.stat-value {
  font-size: 1.625rem;
  font-weight: 700;
  color: #1e2430;
}/* ── Legacy helpers (kept for compatibility) ─────────────── */

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background-color: #4f46e5;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1rem;
}

/* ============================================================
   Support Pages Layout
   ============================================================ */

.support-page {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.support-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.support-header-left {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.support-filters {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.support-filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-width: 160px;
}

.support-filter-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.support-filter-select {
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid #d1d5db;
  background: white;
  font-size: 0.875rem;
  color: #1f2937;
  cursor: pointer;
}.support-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 4rem 2rem;
  color: #6b7280;
}

.support-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 4rem 2rem;
  text-align: center;
}

.support-empty-icon {
  width: 4rem;
  height: 4rem;
  color: #9ca3af;
}

.support-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 4rem 2rem;
}

/* Ticket list */
.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* New ticket page */
.support-new-page {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 720px;
}

.support-new-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: #6b7280;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-bottom: 0.5rem;
  transition: color 0.15s;
}

.btn-back:hover {
  color: #4f46e5;
}

.btn-back svg {
  width: 1rem;
  height: 1rem;
}

/* Ticket form */
.ticket-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.ticket-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 640px) {
  .ticket-form-row {
    grid-template-columns: 1fr;
  }
}

.ticket-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

/* Priority selector */
.priority-selector {
  display: flex;
  gap: 0.5rem;
}

.priority-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.625rem 0.5rem;
  border-radius: 0.5rem;
  border: 2px solid #e5e7eb;
  background: white;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.priority-option:hover {
  border-color: #c7d2fe;
}

.priority-option.priority-selected {
  border-color: #6366f1;
  background: #eef2ff;
}

.priority-option[data-priority="high"].priority-selected {
  border-color: #ef4444;
  background: #fef2f2;
}

.priority-option[data-priority="low"].priority-selected {
  border-color: #22c55e;
  background: #f0fdf4;
}.priority-option-label {
  font-size: 0.8125rem;
  font-weight: 600;
}

.priority-option-desc {
  font-size: 0.6875rem;
  color: #9ca3af;
  text-align: center;
}

/* Ticket detail page */
.ticket-detail-page {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.ticket-detail-header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ticket-detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.ticket-detail-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: #6b7280;
  flex-wrap: wrap;
}

.ticket-status-controls {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Chat thread */
.ticket-thread {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 500px;
  overflow-y: auto;
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}.ticket-message {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  border-radius: 0.75rem;
  max-width: 85%;
}

.ticket-message-own {
  align-self: flex-end;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
}

.ticket-message-other {
  align-self: flex-start;
  background: white;
  border: 1px solid #e5e7eb;
}.ticket-message-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ticket-message-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background: #6366f1;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.ticket-message-other .ticket-message-avatar {
  background: #059669;
}

.ticket-message-sender {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.ticket-message-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1f2937;
}.ticket-message-role {
  font-size: 0.6875rem;
  font-weight: 500;
  color: #6b7280;
}

.ticket-message-role[data-role="super_admin"] {
  color: #7c3aed;
}

.ticket-message-time {
  font-size: 0.6875rem;
  color: #9ca3af;
  flex-shrink: 0;
}

.ticket-message-body {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #374151;
  white-space: pre-wrap;
  word-break: break-word;
}/* Reply form */
.ticket-reply-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ticket-reply-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid #d1d5db;
  background: white;
  font-size: 0.9rem;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  color: #1f2937;
}

.ticket-reply-input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}.ticket-reply-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Closed ticket notice */
.ticket-closed-notice {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: #6b7280;
  font-size: 0.875rem;
}

.ticket-closed-notice svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}/* ============================================================
   ANALYTICS & MARKET INSIGHTS LAYOUTS
   ============================================================ */

/* Overview KPI grid */
.overview-date {
  font-size: 0.8125rem;
  color: #9ca3af;
  margin-bottom: 1.5rem;
}

.overview-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}
@media (min-width: 1024px) {
  .overview-kpi-grid { grid-template-columns: repeat(4, 1fr); }
}

/* KPI card (extends stat-card with icon layout) */
.kpi-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 0.875rem;
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.04);
}
.kpi-card-body { flex: 1; min-width: 0; }
.kpi-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.375rem;
}
.kpi-card-value {
  font-size: 1.625rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
}
.kpi-card-sub {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 0.25rem;
}/* Movers grid */
.movers-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.875rem;
  margin-bottom: 1.25rem;
}
@media (min-width: 1024px) {
  .movers-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Insights page */
.insights-page {
  max-width: 1200px;
}

.insights-header {
  margin-bottom: 2rem;
}
.insights-header h1 {
  font-size: 1.625rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 0.375rem;
}
.insights-subtitle {
  font-size: 0.9375rem;
  color: #6b7280;
  margin: 0;
}
.insights-updated {
  font-size: 0.8125rem;
  color: #9ca3af;
  margin-top: 0.5rem;
}

.insights-section {
  margin-bottom: 2.5rem;
}
.insights-section .section-title {
  display: flex;
  align-items: center;
  font-size: 1.0625rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 1rem;
}

.insights-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  color: #6b7280;
  font-size: 0.9375rem;
}

.insights-empty {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 0.75rem;
  padding: 2.5rem;
  text-align: center;
  color: #9ca3af;
  font-size: 0.9375rem;
}/* ==========================================================================
   ABS INSIGHTS PAGE
   ========================================================================== */

.abs-page {
  max-width: 1200px;
}

.abs-insights-page {
  max-width: 1200px;
}

/* Header */
.abs-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.abs-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.abs-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.625rem;
  background: linear-gradient(135deg, #0f766e, #0ea5e9);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.abs-subtitle {
  color: #6b7280;
  margin: 0.25rem 0 0;
}
.abs-source-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  color: #6b7280;
  text-decoration: none;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.375rem 0.75rem;
  transition: all 0.15s;
  white-space: nowrap;
}
.abs-source-link:hover { border-color: #0ea5e9; color: #0ea5e9; }
.abs-source-icon { width: 0.875rem; height: 0.875rem; }

/* KPI cards */
.abs-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}
@media (min-width: 768px) {
  .abs-kpi-grid { grid-template-columns: repeat(4, 1fr); }
}

.abs-kpi-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.875rem;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.abs-kpi-card--accent {
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
  border-color: #6ee7b7;
}
.abs-kpi-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.abs-kpi-value {
  font-size: 1.875rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.1;
}
.abs-kpi-value--lg { font-size: 2.25rem; }
.abs-kpi-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.abs-kpi-period { font-size: 0.75rem; color: #9ca3af; }
.abs-kpi-delta {
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 9999px;
  padding: 0.1rem 0.5rem;
}
.abs-delta--up { background: #dcfce7; color: #16a34a; }
.abs-delta--down { background: #fee2e2; color: #dc2626; }

/* Section */
.abs-section {
  margin-bottom: 2.5rem;
}
.abs-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.abs-section-desc {
  color: #6b7280;
  margin: 0.25rem 0 0;
  max-width: 640px;
}
.abs-dot {
  display: inline-block;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  margin-right: 0.5rem;
  flex-shrink: 0;
}
.abs-dot--blue { background: #4f46e5; }
.abs-dot--teal { background: #0ea5e9; }

/* Region filter */
.abs-region-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.abs-filter-label {
  font-size: 0.8125rem;
  color: #9ca3af;
  font-weight: 500;
  margin-right: 0.25rem;
}
.abs-region-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  background: none;
}
.abs-pill--active {
  /* colour applied inline per region */
}
.abs-pill--inactive {
  border-color: #e2e8f0;
  color: #6b7280;
  background: #f8fafc;
}
.abs-pill--inactive:hover { border-color: #94a3b8; color: #374151; }
.abs-pill--ghost {
  border-color: #e2e8f0;
  color: #9ca3af;
  background: none;
  font-size: 0.75rem;
}
.abs-pill--ghost:hover { border-color: #94a3b8; color: #374151; }
.abs-pill-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Charts */
.abs-chart-card {
  padding: 1.5rem;
}
.abs-chart-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 1rem;
}
.abs-empty {
  padding: 2.5rem;
  text-align: center;
  color: #9ca3af;
  font-size: 0.9375rem;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 0.75rem;
}

/* Table */
.abs-table-card {
  padding: 1.5rem;
  margin-top: 1rem;
}
.abs-region-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  margin-right: 0.5rem;
  vertical-align: middle;
  flex-shrink: 0;
}

/* CPI stats strip */
.abs-cpi-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.875rem;
  margin-top: 1rem;
  overflow: hidden;
}
.abs-cpi-stat {
  flex: 1;
  min-width: 120px;
  padding: 1rem 1.25rem;
  border-right: 1px solid #e2e8f0;
}
.abs-cpi-stat:last-child { border-right: none; }
.abs-cpi-stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.3rem;
}
.abs-cpi-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
}
.abs-cpi-stat-value--lg { font-size: 1.5rem; }

/* Range tabs */
.abs-range-tabs {
  display: flex;
  gap: 0.25rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.25rem;
  background: #f8fafc;
}
.abs-range-tab {
  padding: 0.3rem 0.875rem;
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  color: #6b7280;
  background: none;
  transition: all 0.15s;
}
.abs-range-tab:hover { color: #374151; }
.abs-range-tab--active {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

/* Attribution */
.abs-attribution {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: #9ca3af;
  border-top: 1px solid #f1f5f9;
  padding-top: 1.5rem;
  margin-top: 1rem;
  line-height: 1.5;
}
.abs-attrib-icon { width: 1rem; height: 1rem; flex-shrink: 0; margin-top: 0.1rem; }
.abs-attribution a { color: #0ea5e9; text-decoration: none; }
.abs-attribution a:hover { text-decoration: underline; }
.abs-attribution code {
  background: #f1f5f9;
  padding: 0.05rem 0.35rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  color: #475569;
}

/* Error */
.abs-error {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  color: #b91c1c;
  font-size: 0.9375rem;
}
.abs-error-icon { width: 1.25rem; height: 1.25rem; flex-shrink: 0; }

/* Dark mode *//* Section color accent modifiers */
.abs-section--integrated { border-left: 3px solid #4f46e5; padding-left: 1rem; }
.abs-section--construction { border-left: 3px solid #10b981; padding-left: 1rem; }
.abs-section--finance { border-left: 3px solid #f59e0b; padding-left: 1rem; }
.abs-section--population { border-left: 3px solid #8b5cf6; padding-left: 1rem; }
.abs-section--macro { border-left: 3px solid #ef4444; padding-left: 1rem; }

/* Two-column chart grid */
.abs-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
@media (max-width: 900px) {
  .abs-two-col { grid-template-columns: 1fr; }
}

/* Chart title row — title + range tabs inline */
.abs-chart-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

/* Section header badge chip */
.abs-section-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #fff;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  margin-right: 0.5rem;
  margin-bottom: 0.25rem;
  vertical-align: middle;
  text-transform: uppercase;
}

/* Section header right-side controls */
.abs-section-controls { flex-shrink: 0; }

/* KPI note card */
.abs-kpi-card--note {
  background: #f8fafc;
  border: 1px dashed #d1d5db;
}
.abs-kpi-note-text {
  font-size: 0.78rem;
  color: #6b7280;
  line-height: 1.4;
  margin-top: 0.25rem;
}
.abs-kpi-note-text a {
  color: #4f46e5;
  text-decoration: underline;
}

/* ══ Global Filter Bar ═══════════════════════════════════════════════════════ */

.abs-global-filters {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.25rem 1.5rem 1rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

.abs-gf-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1.25rem 2rem;
}

.abs-gf-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.abs-gf-group-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.abs-gf-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.abs-gf-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.7rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 500;
  border: 1.5px solid #e2e8f0;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.abs-gf-chip:hover {
  border-color: #94a3b8;
  color: #374151;
}
.abs-gf-chip--active {
  /* color/border/bg applied inline via style prop */
  font-weight: 600;
}
.abs-gf-chip--meta {
  font-size: 0.72rem;
  border-style: dashed;
  color: #94a3b8;
  padding: 0.22rem 0.55rem;
}
.abs-gf-chip--meta:hover {
  border-color: #6b7280;
  color: #374151;
}

.abs-gf-chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.abs-gf-divider {
  width: 1px;
  background: #e2e8f0;
  align-self: stretch;
  min-height: 2.5rem;
}

.abs-gf-hint {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid #f1f5f9;
  font-size: 0.72rem;
  color: #9ca3af;
  line-height: 1.6;
}
.abs-gf-hint strong {
  color: #6b7280;
}

/* ── Dark mode ─────────────────────────────────────────────────────────────── */
/* ============================================================
   Dashboard Header — User Widget & Dropdown
   ============================================================ */

/* Make header space-between */
.dashboard-header {
  justify-content: space-between !important;
}

/* Right-side anchor for dropdown */
.header-right {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* Notification bell button */
.header-notification-bell {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 9999px;
  border: none;
  background: none;
  cursor: pointer;
  color: #6b7280;
  transition: background-color 0.15s, color 0.15s;
  margin-right: 0.25rem;
  flex-shrink: 0;
}
.header-notification-bell:hover {
  background-color: #f3f4f6;
  color: #374151;
}
.header-bell-icon {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
}

/* Clickable user widget */
.header-user-widget {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.35rem 0.625rem;
  border-radius: 0.5rem;
  cursor: pointer;
  border: 1px solid transparent;
  background: none;
  transition: background-color 0.15s, border-color 0.15s;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  text-align: left;
}
.header-user-widget:hover {
  background-color: #f3f4f6;
  border-color: var(--border-subtle, #e4e8ee);
}

/* Avatar circle (top-right) */
.header-user-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background-color: #4f46e5;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.6875rem;
  flex-shrink: 0;
}

/* Name + badges column */
.header-user-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.header-user-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1e2430;
  white-space: nowrap;
  line-height: 1.2;
}

/* Subscription tier badge */
.header-subscription-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.5;
}
.header-subscription-badge[data-plan="subscriber"]    { background: #ecfdf5; color: #059669; }
.header-subscription-badge[data-plan="company_admin"] { background: #eff6ff; color: #2563eb; }
.header-subscription-badge[data-plan="super_admin"]   { background: #faf5ff; color: #7c3aed; }
.header-subscription-badge[data-plan="free_viewer"]   { background: #f9fafb; color: #6b7280; border: 1px solid #e5e7eb; }

/* Chevron icon — rotates when open */
.header-chevron {
  width: 1rem;
  height: 1rem;
  color: #9ca3af;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.header-chevron.open {
  transform: rotate(180deg);
}

/* Dropdown card */
.header-user-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 220px;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border-subtle, #e4e8ee);
  border-radius: 0.625rem;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.10);
  z-index: 100;
  overflow: hidden;
}
.header-dropdown-email {
  padding: 0.75rem 1rem 0.5rem;
  font-size: 0.75rem;
  color: #9ca3af;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-dropdown-divider {
  height: 1px;
  background: var(--border-subtle, #e4e8ee);
  margin: 0.25rem 0;
}
.header-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.625rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.12s;
  box-sizing: border-box;
}
.header-dropdown-item:hover {
  background-color: #f3f4f6;
  color: #111827;
}
.header-dropdown-item svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: #6b7280;
}
.header-dropdown-danger           { color: #dc2626; }
.header-dropdown-danger:hover     { background-color: #fef2f2; color: #b91c1c; }
.header-dropdown-danger svg       { color: #dc2626; }

/* Mobile: hide name/badges, keep avatar + chevron */
@media (max-width: 640px) {
  .header-user-info { display: none; }
}

/* ── FeatureGate ──────────────────────────────────────────────────────────── */
.feature-gate-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 2rem;
}
.feature-gate-card {
  background: var(--surface, #ffffff);
  border: 1px solid var(--border-subtle, #e4e8ee);
  border-radius: 16px;
  padding: 3rem 2.5rem;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: 0 4px 24px rgba(0,0,0,0.07);
}
.feature-gate-lock-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #f0ebff;
  color: #6647F0;
  margin-bottom: 1.25rem;
}
.feature-gate-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary, #1a1d23);
  margin: 0 0 0.75rem;
}
.feature-gate-desc {
  font-size: 1rem;
  color: var(--text-secondary, #6b7280);
  margin-bottom: 0.5rem;
}
.feature-gate-plan-badge {
  display: inline-block;
  background: #6647F0;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
}
.feature-gate-sub {
  font-size: 0.875rem;
  color: var(--text-secondary, #6b7280);
  margin-bottom: 2rem;
}
.feature-gate-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.feature-gate-cta-btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: #6647F0;
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.15s;
}
.feature-gate-cta-btn:hover { background: #5538d4; }
.feature-gate-back-link {
  font-size: 0.875rem;
  color: var(--text-secondary, #6b7280);
  text-decoration: none;
}
.feature-gate-back-link:hover { text-decoration: underline; }

/* ── Upgrade Page ─────────────────────────────────────────────────────────── */
.upgrade-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}
.upgrade-header {
  text-align: center;
  margin-bottom: 2.5rem;
}
.upgrade-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary, #1a1d23);
  margin: 0 0 0.5rem;
}
.upgrade-subtitle {
  font-size: 1rem;
  color: var(--text-secondary, #6b7280);
  max-width: 520px;
  margin: 0 auto 1rem;
}
.upgrade-current-badge {
  display: inline-block;
  background: #f0ebff;
  color: #6647F0;
  font-size: 0.875rem;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  margin-top: 0.5rem;
}
.upgrade-plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 3rem;
}
@media (max-width: 720px) {
  .upgrade-plans { grid-template-columns: 1fr; }
}
.upgrade-plan-card {
  background: var(--surface, #ffffff);
  border: 1.5px solid var(--border-subtle, #e4e8ee);
  border-radius: 14px;
  padding: 1.75rem 1.5rem;
  position: relative;
  transition: box-shadow 0.15s;
}
.upgrade-plan-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.09); }
.upgrade-plan-card.pro {
  border-color: #6647F0;
  box-shadow: 0 0 0 2px #6647F020;
}
.upgrade-plan-card.current { background: #f9f8ff; }
.upgrade-plan-badge-popular {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: #6647F0;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.85rem;
  border-radius: 999px;
}
.upgrade-plan-header {
  margin-bottom: 1.25rem;
}
.upgrade-plan-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary, #1a1d23);
  display: block;
  margin-bottom: 0.5rem;
}
.upgrade-plan-price {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
}
.upgrade-price-amount {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary, #1a1d23);
}
.upgrade-price-period {
  font-size: 0.85rem;
  color: var(--text-secondary, #6b7280);
}
.upgrade-current-tag {
  display: inline-block;
  font-size: 0.72rem;
  background: #e8e5ff;
  color: #6647F0;
  font-weight: 600;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  margin-top: 0.4rem;
}
.upgrade-plan-perks {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.upgrade-plan-perks li {
  font-size: 0.875rem;
  color: var(--text-secondary, #6b7280);
  padding-left: 1.25rem;
  position: relative;
}
.upgrade-plan-perks li::before {
  content: "•";
  position: absolute;
  left: 0.25rem;
  color: #6647F0;
}
.upgrade-plan-cta {
  display: block;
  text-align: center;
  padding: 0.65rem 1rem;
  background: #6647F0;
  color: #fff;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}
.upgrade-plan-cta:hover { background: #5538d4; }
.upgrade-plan-cta.outline {
  background: transparent;
  border: 1.5px solid #6647F0;
  color: #6647F0;
}
.upgrade-plan-cta.outline:hover { background: #f0ebff; }

.upgrade-comparison { margin-bottom: 2.5rem; }
.upgrade-comparison-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary, #1a1d23);
  margin: 0 0 1rem;
}
.upgrade-table-wrap { overflow-x: auto; }
.upgrade-table {
  width: 100%;
  border-collapse: collapse;
}
.upgrade-th-feature, .upgrade-th-plan {
  padding: 0.65rem 1rem;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary, #6b7280);
  border-bottom: 2px solid var(--border-subtle, #e4e8ee);
}
.upgrade-th-plan { text-align: center; }
.upgrade-th-plan.pro { color: #6647F0; }
.upgrade-th-plan.highlight { color: #1a1d23; }
.upgrade-tr:nth-child(even) { background: var(--surface-alt, #f9fafb); }
.upgrade-td-feature {
  padding: 0.6rem 1rem;
  font-size: 0.875rem;
  color: var(--text-primary, #1a1d23);
  border-bottom: 1px solid var(--border-subtle, #e4e8ee);
}
.upgrade-td-value {
  padding: 0.6rem 1rem;
  text-align: center;
  border-bottom: 1px solid var(--border-subtle, #e4e8ee);
}
.upgrade-td-value.pro { background: #f0ebff20; }
.upgrade-check { color: #22c55e; }
.upgrade-cross { color: var(--text-muted, #d1d5db); }
.upgrade-partial {
  font-size: 0.8rem;
  color: #f59e0b;
  font-weight: 500;
}
.upgrade-footer-note {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-secondary, #6b7280);
}
.upgrade-footer-note a { color: #6647F0; }
.upgrade-back-link {
  display: inline-block;
  margin-top: 0.75rem;
  color: var(--text-secondary, #6b7280);
  text-decoration: none;
  font-size: 0.875rem;
}
.upgrade-back-link:hover { text-decoration: underline; }

/* ── Economy Dashboard ────────────────────────────────────────────────────── */
.economy-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  gap: 1rem;
  color: var(--text-secondary, #6b7280);
}
.economy-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border-subtle, #e4e8ee);
  border-top-color: #6647F0;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.economy-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 0 2rem;
}
.economy-page-header {
  margin-bottom: 1.5rem;
}
.economy-page-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary, #1a1d23);
  margin: 0 0 0.35rem;
}
.economy-page-desc {
  font-size: 0.9rem;
  color: var(--text-secondary, #6b7280);
  max-width: 680px;
  margin: 0;
}

.economy-snapshot {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: linear-gradient(135deg, #f0ebff 0%, #e8f4ff 100%);
  border: 1px solid #d4c6ff;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.75rem;
}
.economy-snapshot-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #6647F0;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.economy-snapshot-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6647F0;
  margin-bottom: 0.3rem;
}
.economy-snapshot-text {
  font-size: 0.9rem;
  color: var(--text-primary, #1a1d23);
  line-height: 1.55;
}

.economy-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 800px) {
  .economy-grid { grid-template-columns: 1fr; }
}

.economy-card {
  background: var(--surface, #ffffff);
  border: 1px solid var(--border-subtle, #e4e8ee);
  border-radius: 12px;
  padding: 1.25rem 1rem 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.economy-card-header {
  margin-bottom: 0.85rem;
}
.economy-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary, #1a1d23);
  margin: 0 0 0.2rem;
}
.economy-card-sub {
  font-size: 0.75rem;
  color: var(--text-secondary, #6b7280);
  margin: 0;
  line-height: 1.4;
}
.economy-card-chart {
  /* recharts ResponsiveContainer needs a defined height parent */
}

.economy-footer-note {
  font-size: 0.8rem;
  color: var(--text-muted, #9ca3af);
  text-align: center;
  margin-top: 0.5rem;
}


/* ============================================================
   Property Cycle Clock — /dashboard/economy (Phase 13.2)
   ============================================================ */

.cycle-section {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 16px;
  padding: 1.75rem 1.5rem 1.5rem;
  margin-bottom: 1.5rem;
  margin-top: 0.25rem;
}

.cycle-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.cycle-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #e2e8f0;
  margin: 0 0 0.3rem;
}

.cycle-subtitle {
  font-size: 0.82rem;
  color: #64748b;
  margin: 0;
  max-width: 600px;
  line-height: 1.5;
}

.cycle-badge {
  flex-shrink: 0;
}

.cycle-badge-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #6C63FF;
  background: rgba(108, 99, 255, 0.12);
  border: 1px solid rgba(108, 99, 255, 0.3);
  border-radius: 20px;
  padding: 0.3rem 0.75rem;
}

.cycle-main {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.75rem;
  margin-bottom: 1.5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .cycle-main { grid-template-columns: 1fr; }
}

.cycle-clock-wrap {
  text-align: center;
}

.cycle-clock-note {
  font-size: 0.72rem;
  color: #475569;
  margin: 0.5rem 0 0;
  line-height: 1.4;
}

.cycle-cities {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.cycle-city-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-left: 3px solid #6C63FF;
  border-radius: 10px;
  padding: 0.9rem 1rem;
  transition: background 0.15s;
}

.cycle-city-card:hover {
  background: rgba(255, 255, 255, 0.05);
}

.cycle-city-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.cycle-city-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #e2e8f0;
}

.cycle-city-phase {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  border: 1px solid;
  white-space: nowrap;
}

.cycle-city-desc {
  font-size: 0.73rem;
  color: #64748b;
  line-height: 1.45;
  margin: 0 0 0.65rem;
}

.cycle-city-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
}

.cycle-city-metric {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.cycle-metric-label {
  font-size: 0.65rem;
  color: #475569;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cycle-metric-value {
  font-size: 0.82rem;
  font-weight: 600;
  color: #cbd5e1;
}

.cycle-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
}

.cycle-legend-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.cycle-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cycle-legend-phase {
  font-size: 0.82rem;
  font-weight: 600;
}

.cycle-legend-count {
  font-size: 0.7rem;
  color: #64748b;
}

.cycle-footnote {
  font-size: 0.72rem;
  color: #475569;
  line-height: 1.5;
  margin: 0;
}

/* ============================================================
   Legal Pages (Terms of Service, Privacy Policy, etc.)
   ============================================================ */

.legal-page-wrapper {
  min-height: 100vh;
  background: var(--background, #f5f7fa);
  padding: 2.5rem 1rem 4rem;
}

.legal-page-container {
  max-width: 860px;
  margin: 0 auto;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border-subtle, #e4e8ee);
  border-radius: 12px;
  padding: 2.5rem 3rem;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

.legal-back-link {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--primary-600, #4f46e5);
  text-decoration: none;
  margin-bottom: 1.5rem;
  transition: opacity 0.15s;
}

.legal-back-link:hover {
  opacity: 0.75;
}

.legal-page-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--border-subtle, #e4e8ee);
}

.legal-page-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--foreground, #1e2430);
  margin: 0 0 0.75rem;
  line-height: 1.2;
}

.legal-page-meta {
  font-size: 0.875rem;
  color: var(--gray-600, #4b5563);
  line-height: 1.6;
  margin: 0;
}

.legal-page-meta span {
  color: var(--gray-400, #9ca3af);
  font-size: 0.8rem;
}

.legal-section {
  margin-bottom: 2.25rem;
}

.legal-section-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--foreground, #1e2430);
  margin: 0 0 0.85rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-subtle, #e4e8ee);
}

.legal-subsection-heading {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-800, #1f2937);
  margin: 1.25rem 0 0.5rem;
}

.legal-section p {
  font-size: 0.9rem;
  color: var(--gray-600, #4b5563);
  line-height: 1.75;
  margin: 0 0 0.75rem;
}

.legal-list {
  padding-left: 1.4rem;
  margin: 0.5rem 0 0.75rem;
}

.legal-list li {
  font-size: 0.9rem;
  color: var(--gray-600, #4b5563);
  line-height: 1.75;
  margin-bottom: 0.3rem;
}

.legal-link {
  color: var(--primary-600, #4f46e5);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity 0.15s;
}

.legal-link:hover {
  opacity: 0.75;
}

.legal-caps-block {
  font-size: 0.85rem !important;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: var(--gray-50, #f9fafb);
  border-left: 3px solid var(--warning, #f59e0b);
  border-radius: 0 6px 6px 0;
  padding: 0.75rem 1rem !important;
  margin-bottom: 0.75rem !important;
}

.legal-contact-block {
  background: var(--gray-50, #f9fafb);
  border: 1px solid var(--border-subtle, #e4e8ee);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-top: 0.5rem;
}

.legal-contact-block p {
  margin-bottom: 0.35rem !important;
}

.legal-page-footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle, #e4e8ee);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.legal-page-footer p {
  font-size: 0.8rem;
  color: var(--gray-400, #9ca3af);
  margin: 0;
}

.legal-footer-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
}

.legal-footer-divider {
  color: var(--gray-300, #d1d5db);
}

@media (max-width: 640px) {
  .legal-page-container {
    padding: 1.5rem 1.25rem;
  }
  .legal-page-title {
    font-size: 1.5rem;
  }
}

/* ── Rental Yield vs Wage Growth — Phase 13.6 ──────────────────────────────── */

.yield-wages-section {
  margin-top: 2.5rem;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 16px;
  padding: 1.75rem;
}

.yield-wages-header {
  margin-bottom: 1.25rem;
}

.yield-wages-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0 0 0.35rem 0;
}

.yield-wages-subtitle {
  font-size: 0.875rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.5;
  max-width: 800px;
}

/* State tabs */
.yield-wages-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.yield-tab-btn {
  padding: 0.4rem 1rem;
  border-radius: 20px;
  border: 1px solid #334155;
  background: transparent;
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.yield-tab-btn:hover {
  border-color: #475569;
  color: #94a3b8;
}

.yield-tab-active {
  font-weight: 700;
}

/* Signal badge */
.yield-signal-badge {
  border: 1px solid;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.yield-signal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.yield-signal-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #e2e8f0;
}

.yield-spread-pill {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.2rem 0.75rem;
  border-radius: 20px;
  border: 1px solid;
}

.yield-signal-metrics {
  display: flex;
  gap: 2rem;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}

.yield-metric {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.yield-metric-label {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.yield-metric-value {
  font-size: 1.35rem;
  font-weight: 700;
}

.yield-signal-text {
  font-size: 0.85rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.5;
}

/* Chart */
.yield-chart-wrap {
  margin-bottom: 1.5rem;
  background: #070f1f;
  border: 1px solid #1e293b;
  border-radius: 10px;
  padding: 1rem 0.5rem 0.5rem 0;
}

.yield-no-data {
  text-align: center;
  color: #475569;
  font-size: 0.9rem;
  padding: 3rem 0;
}

/* Interpretation guide */
.yield-interpretation {
  background: #111827;
  border: 1px solid #1e293b;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.yield-interp-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #e2e8f0;
  margin: 0 0 0.75rem 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.yield-interp-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.yield-interp-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.83rem;
  color: #94a3b8;
  line-height: 1.5;
}

.yield-interp-list strong {
  color: #e2e8f0;
}

.yield-interp-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

/* Footnote */
.yield-footnote {
  font-size: 0.78rem;
  color: #475569;
  margin: 0;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .yield-wages-section {
    padding: 1.25rem 1rem;
  }
  .yield-signal-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .yield-signal-metrics {
    gap: 1rem;
  }
}

/* ==========================================================================
   MOBILE RESPONSIVENESS — Phase 7.3 Audit Fixes
   ========================================================================== */

/* Admin Support page — table wrapper with horizontal scroll */
.support-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.support-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  min-width: 640px;
}

.support-table th {
  text-align: left;
  padding: 0.6rem 0.75rem;
  font-weight: 600;
  font-size: 0.75rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--border-subtle, #e4e8ee);
  white-space: nowrap;
}

.support-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border-subtle, #e4e8ee);
  vertical-align: top;
}

.support-table-row {
  cursor: pointer;
  transition: background-color 0.15s;
}

.support-table-row:hover {
  background-color: #f9fafb;
}

.support-table-row--expanded {
  background-color: #fafbff;
}

.support-subject {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.support-requester {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.support-requester-name {
  font-weight: 600;
  color: #1e2430;
  font-size: 0.8rem;
  white-space: nowrap;
}

.support-requester-email {
  font-size: 0.72rem;
  color: #9ca3af;
  white-space: nowrap;
}

.support-date {
  font-size: 0.78rem;
  color: #6b7280;
  white-space: nowrap;
}

.support-expand-icon {
  font-size: 0.65rem;
  color: #9ca3af;
}

.support-detail-row {
  background-color: #fafbff;
}

.support-detail-panel {
  padding: 1rem 1.25rem;
  border-top: 1px solid #e4e8ee;
}

.support-detail-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.support-thread {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
  max-height: 320px;
  overflow-y: auto;
}

.support-thread-loading,
.support-thread-empty {
  font-size: 0.85rem;
  color: #9ca3af;
  padding: 0.75rem 0;
}

.support-message {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  max-width: 85%;
}

.support-message--admin {
  background: #eef2ff;
  align-self: flex-end;
  margin-left: auto;
}

.support-message--user {
  background: #f3f4f6;
  align-self: flex-start;
}

.support-message-meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.3rem;
}

.support-message-role {
  font-size: 0.72rem;
  font-weight: 700;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.support-message-time {
  font-size: 0.7rem;
  color: #9ca3af;
}

.support-message-body {
  font-size: 0.85rem;
  color: #374151;
  line-height: 1.5;
  white-space: pre-wrap;
}

.support-reply-form {
  border-top: 1px solid #e4e8ee;
  padding-top: 1rem;
}

.support-reply-textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  resize: vertical;
  box-sizing: border-box;
  font-family: inherit;
  line-height: 1.5;
}

.support-reply-error {
  font-size: 0.8rem;
  color: #dc2626;
  margin: 0.3rem 0;
}

.support-reply-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.625rem;
}

.support-updating-label {
  font-size: 0.78rem;
  color: #9ca3af;
}

.support-pagination {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.support-pagination-info {
  font-size: 0.85rem;
  color: #6b7280;
}

.support-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.support-header-left h1 {
  margin: 0;
}

.support-error-banner {
  padding: 0.75rem 1rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 0.5rem;
  color: #dc2626;
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
}

/* Dashboard main — extra small screen padding */
@media (max-width: 375px) {
  .dashboard-main {
    padding: 0.875rem;
  }
}

/* Admin support page responsive table */
@media (max-width: 640px) {
  .support-subject {
    max-width: 160px;
  }
  .support-filters {
    flex-direction: column;
    gap: 0.75rem;
  }
}

/* Properties page wrapper */
.page-content {
  width: 100%;
}

/* ── Collapsible sidebar groups & items ────────────────────────────────── */

/* Chevron icon next to group labels and expandable nav items */
.sidebar-chevron {
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
  margin-left: auto;
  transition: transform 0.2s ease;
  opacity: 0.5;
}

.sidebar-chevron.sidebar-chevron-open {
  transform: rotate(180deg);
}

/* Lock icon alignment */
.sidebar-lock-icon {
  margin-left: auto;
  opacity: 0.5;
  flex-shrink: 0;
}

/* Clickable section label (group toggle) */
.sidebar-nav-section-toggle {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.75rem 1rem 0.25rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #9ca3af;
  background: none;
  border: none;
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  text-align: left;
  transition: color 0.15s;
}

.sidebar-nav-section-toggle:hover {
  color: #6b7280;
}

.sidebar-nav-section-toggle span {
  flex: 1;
  text-align: left;
}

/* Animated group items wrapper — uses grid-rows trick for smooth height */
.sidebar-group-items-wrapper {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
  overflow: hidden;
}

.sidebar-group-items-wrapper.sidebar-group-items-open {
  grid-template-rows: 1fr;
}

.sidebar-group-items-inner {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

/* Animated children wrapper for nav items with sub-items */
.sidebar-children-wrapper {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
  overflow: hidden;
}

.sidebar-children-wrapper.sidebar-children-open {
  grid-template-rows: 1fr;
}

.sidebar-children-inner {
  overflow: hidden;
  padding-left: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

/* ── Calculator Page — Responsive Layout ──────────────────────────────── */

/* Hide scrollbar on tab nav (cross-browser) while keeping scroll functionality */
nav[aria-label="Calculator tabs"]::-webkit-scrollbar {
  height: 2px;
}
nav[aria-label="Calculator tabs"]::-webkit-scrollbar-track {
  background: transparent;
}
nav[aria-label="Calculator tabs"]::-webkit-scrollbar-thumb {
  background: #c7d2fe;
  border-radius: 1px;
}

/* Ensure calculator page has no horizontal overflow */
.calc-page-wrapper {
  overflow-x: hidden;
  width: 100%;
}

/* On mobile (<430px), reduce result card font-size slightly */
@media (max-width: 430px) {
  .calc-rate-grid > div {
    padding: 0.4rem 0.15rem;
  }
}

/* ==========================================================================
   UTILITIES.CSS - Custom Utility Classes
   All custom utility classes, helpers, and typography
   ========================================================================== */

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

.heading-hero {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #1e2430;
}

.heading-1 {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #1e2430;
}

.heading-2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #1e2430;
}

.heading-3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #1e2430;
}

.heading-4 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
  color: #1e2430;
}

.text-body {
  font-size: 1rem;
  color: #4b5563;
}

.text-body-lg {
  font-size: 1rem;
  color: #4b5563;
}

.text-body-sm {
  font-size: 0.875rem;
  color: #4b5563;
}

.text-subtitle {
  font-size: 1rem;
  color: #4b5563;
}

.text-caption {
  font-size: 0.875rem;
  color: #6b7280;
}

.text-muted {
  color: #6b7280;
}

/* ==========================================================================
   SPACING UTILITIES
   ========================================================================== */

.spacing-section {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.spacing-block {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.spacing-inline {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ==========================================================================
   EFFECTS & TRANSITIONS
   ========================================================================== */

.transition-smooth {
  transition: all 0.3s ease-in-out;
}

.transition-fast {
  transition: all 0.15s ease-in-out;
}

.transition-slow {
  transition: all 0.5s ease-in-out;
}

.hover-lift {
  transition: transform 0.2s;
}

.hover-lift:hover {
  transform: translateY(-0.25rem);
}

.hover-scale {
  transition: transform 0.2s;
}

.hover-scale:hover {
  transform: scale(1.05);
}

/* ==========================================================================
   BACKGROUNDS & GRADIENTS
   ========================================================================== */

.bg-gradient-primary {
  background: linear-gradient(to bottom right, #f5f7fa, #eaeef9);
}

.bg-gradient-secondary {
  background: linear-gradient(to right, #fdf4ff, #fce7f3);
}

.bg-glass {
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
}

/* ==========================================================================
   BORDERS & DIVIDERS
   ========================================================================== */

.border-light {
  border: 1px solid #e5e7eb;
}

.border-heavy {
  border: 2px solid #d1d5db;
}

.divider-horizontal {
  border-top: 1px solid #e5e7eb;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.divider-vertical {
  border-left: 1px solid #e5e7eb;
  margin-left: 1.5rem;
  margin-right: 1.5rem;
}

/* ==========================================================================
   SHADOWS
   ========================================================================== */

.shadow-soft {
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.shadow-medium {
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.shadow-hard {
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

/* ==========================================================================
   VISIBILITY & DISPLAY
   ========================================================================== */

.hide-mobile {
  display: none;
}

@media (min-width: 768px) {
  .hide-mobile {
    display: block;
  }
}

.hide-desktop {
  display: block;
}

@media (min-width: 768px) {
  .hide-desktop {
    display: none;
  }
}

.show-on-hover {
  opacity: 0;
  transition: opacity 0.2s;
}

.group:hover .show-on-hover {
  opacity: 1;
}

/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  white-space: nowrap;
  border: 0;
}

.focus-ring:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgb(79 70 229 / 0.5);
}

/* ==========================================================================
   RESPONSIVE TEXT
   ========================================================================== */

.text-responsive-lg {
  font-size: 1.5rem;
}

@media (min-width: 768px) {
  .text-responsive-lg {
    font-size: 1.875rem;
  }
}

@media (min-width: 1024px) {
  .text-responsive-lg {
    font-size: 2.25rem;
  }
}

.text-responsive-md {
  font-size: 1.25rem;
}

@media (min-width: 768px) {
  .text-responsive-md {
    font-size: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .text-responsive-md {
    font-size: 1.875rem;
  }
}

.text-responsive-sm {
  font-size: 1rem;
}

@media (min-width: 768px) {
  .text-responsive-sm {
    font-size: 1.125rem;
  }
}

@media (min-width: 1024px) {
  .text-responsive-sm {
    font-size: 1.25rem;
  }
}

/* ==========================================================================
   CUSTOM UTILITIES
   ========================================================================== */

.heading-flush {
  margin: 0;
}

.text-balance {
  text-wrap: balance;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}


/* ==========================================================================
   DASHBOARD PAGE STRUCTURE UTILITIES
   Standard classes for consistent dashboard page layout
   ========================================================================== */

/* Page wrapper — standard inner page container */
.page-inner {
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  padding-bottom: 3rem;
}

.page-inner-wide {
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  padding-bottom: 3rem;
}

/* Page heading block */
.page-heading {
  margin-bottom: 2rem;
}

.page-heading h1,
.page-heading-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground, #1e2430);
  margin: 0 0 0.25rem;
  line-height: 1.25;
}

.page-heading p,
.page-heading-desc {
  font-size: 0.875rem;
  color: var(--text-muted, #6b7280);
  margin: 0;
}

/* ==========================================================================
   PANEL — standard content card for dashboard pages
   Use instead of ad-hoc bg-white border shadow-sm inline Tailwind
   ========================================================================== */

.panel {
  background-color: var(--surface, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.06);
}

.panel-alt {
  background-color: var(--surface-alt, #eef1f6);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.panel-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary, #111827);
  margin: 0 0 1rem;
}

.panel-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted, #6b7280);
  margin: 0 0 1rem;
}

/* ==========================================================================
   SECTION TITLE — consistent sub-section headings within pages
   ========================================================================== */

.section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary, #111827);
  margin: 0 0 0.25rem;
}

.section-desc {
  font-size: 0.8125rem;
  color: var(--text-muted, #6b7280);
  margin: 0 0 1rem;
}

/* ==========================================================================
   PLAN BADGE — standard plan status display
   ========================================================================== */

.plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.plan-badge--free {
  background-color: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
}

.plan-badge--pro {
  background-color: #f0fdfa;
  color: #0f766e;
  border-color: #99f6e4;
}

.plan-badge--business {
  background-color: #eef2ff;
  color: #4338ca;
  border-color: #c7d2fe;
}

/* ==========================================================================
   ALERT BANNERS — success, warning, error
   ========================================================================== */

.alert-success {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background-color: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.alert-success-icon { color: #16a34a; flex-shrink: 0; }
.alert-success-title { font-size: 0.875rem; font-weight: 600; color: #166534; }
.alert-success-body { font-size: 0.8125rem; color: #15803d; margin-top: 0.125rem; }

.alert-warning {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background-color: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.alert-warning-icon { color: #d97706; flex-shrink: 0; }
.alert-warning-title { font-size: 0.875rem; font-weight: 600; color: #92400e; }
.alert-warning-body { font-size: 0.8125rem; color: #b45309; margin-top: 0.125rem; }

.alert-error {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.alert-error-icon { color: #dc2626; flex-shrink: 0; }
.alert-error-title { font-size: 0.875rem; font-weight: 600; color: #991b1b; }
.alert-error-body { font-size: 0.8125rem; color: #b91c1c; margin-top: 0.125rem; }

/* ==========================================================================
   PLAN COMPARISON CARD — used in subscription page
   ========================================================================== */

.plan-card {
  position: relative;
  border-radius: 0.75rem;
  border: 1px solid var(--border-color, #e2e8f0);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  background-color: var(--surface, white);
}

.plan-card--current-free {
  border-color: #94a3b8;
  background-color: #f8fafc;
}

.plan-card--current-pro {
  border-color: #5eead4;
  background-color: #f0fdfa;
}

.plan-card--current-business {
  border-color: #818cf8;
  background-color: #eef2ff;
}

.plan-card-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.25rem;
}

.plan-card-price-num {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground, #1e2430);
}

.plan-card-price-period {
  font-size: 0.875rem;
  color: var(--text-muted, #6b7280);
}

.plan-card-current-badge {
  position: absolute;
  top: -0.75rem;
  left: 1rem;
  padding: 0.125rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 700;
  color: white;
}

.plan-card-feature {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-secondary, #374151);
}

/* ==========================================================================
   FEATURE CHECKLIST — shared between subscription and feature lists
   ========================================================================== */

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary, #374151);
}

.feature-check-icon {
  flex-shrink: 0;
  margin-top: 0.125rem;
}

/* ==========================================================================
   QUICK STAT — inline value+label pair used across many pages
   ========================================================================== */

.quick-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground, #1e2430);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.quick-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted, #6b7280);
}

