/**
 * Filename: public/stylesheets/app.css
 * Revision: 2026-03-12 – Migrated inline CSS from 6 views into app.css; app.css is now source of truth
 * Description: TheReconciliator — single bundled stylesheet
 *
 * Sections:
 *  1.  Reset & Base
 *  2.  Typography
 *  3.  CSS Variables / Design Tokens
 *  4.  Layout — Page Wrapper & Top Header
 *  5.  Nav Rail (65px icon sidebar)
 *  6.  Sidebar (240px full sidebar)
 *  7.  Dashboard Layout
 *  8.  Theme Toggle & Logo Swap
 *  9.  Account Avatar & Modal
 * 10.  Buttons
 * 11.  Forms
 * 12.  Alerts & Messages
 * 13.  Cards (Generic)
 * 14.  Tables & Data
 * 15.  Modal Overlays
 * 16.  Progress Bars
 * 17.  Badges & Status
 * 18.  Pagination
 * 19.  Auth Pages (Login / Signup / Verify)
 * 20.  Landing Page
 * 21.  Legal Pages (Terms / Privacy)
 * 22.  Error Page
 * 23.  Billing Page
 * 24.  Account Pages (Shared)
 * 25.  Account — Subscription
 * 26.  Account — Change Plan
 * 27.  Account — Profile & Password
 * 28.  Account — Cancel
 * 29.  Account — Update Scope
 * 30.  Dashboard — TheReconciliator
 * 31.  Connection Cards
 * 32.  Action Cards
 * 33.  Analysis Pages (Shared — Order & Customer)
 * 34.  Health Pages (Shared — Financial & QBO)
 * 35.  Inventory Page
 * 36.  Settings Page
 * 37.  Tooltips & Utilities
 * 38.  Peekaboo Eye Button
 * 39.  Dark Mode Overrides
 */

/* ============================================================================
   1. Reset & Base
   ============================================================================ */

*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: #1e293b;
  background: #f8fafc;
}

/* ============================================================================
   2. Typography
   ============================================================================ */

h1, h2, h3, h4, h5, h6 { margin: 0 0 1rem; font-weight: 600; line-height: 1.25; }
h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }
p  { margin: 0 0 1rem; }
a  { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================================
   4. Layout — Page Wrapper & Top Header
   ============================================================================ */

/* App shell (authenticated pages) */
.page-wrapper {
  height: 100vh;
  overflow: hidden;
  padding-top: 56px;
  background: #f0f4f8;
}

/* Account standalone pages override */
.account-page-wrapper {
  min-height: 100vh;
  padding-top: 0;
  background: #f0f4f8;
}

.top-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  z-index: 200;
}

.header-brand { display: flex; align-items: center; gap: 12px; }
.brand-link   { display: flex; align-items: center; text-decoration: none; }
.header-right { display: flex; align-items: center; gap: 16px; }

.brand-name {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  padding-left: 12px;
  border-left: 1px solid #e5e7eb;
}

.header-brand .plan-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 4px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff;
  white-space: nowrap;
}

/* Standalone page header (account pages) */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: white;
  border-bottom: 1px solid #e2e8f0;
}

.header-logo img { height: 48px; }
.header-actions   { display: flex; align-items: center; gap: 12px; }

.content-header   { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.content-header h1 { margin: 0; font-size: 28px; color: #1e293b; }
.header-badge     { flex: 1; display: flex; align-items: center; gap: 8px; }

/* ============================================================================
   5. Nav Rail (65px icon sidebar)
   ============================================================================ */

.nav-rail .sidebar {
  width: 65px;
  min-width: 65px;
  background: #ffffff;
  border-right: 1px solid #e5e7eb;
  color: #5c6770;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 56px;
  left: 0;
  height: calc(100vh - 56px);
  overflow: hidden;
  z-index: 100;
}

.nav-rail .sidebar-plan {
  padding: 8px 4px;
  text-align: center;
  border-bottom: 1px solid #e5e7eb;
}

.nav-rail .sidebar-plan .plan-badge {
  display: inline-block;
  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 6px;
  border-radius: 4px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff;
  white-space: nowrap;
}

.nav-rail .sidebar-nav {
  flex: 1;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
}

.nav-rail .nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  color: #5c6770;
  text-decoration: none;
  transition: all 0.15s ease;
  text-align: center;
  border-left: 3px solid transparent;
}

.nav-rail .nav-item:hover   { background: #f3f4f6; color: #2c3e50; text-decoration: none; }
.nav-rail .nav-item.active  { background: #e8f4fd; color: #0077c5; border-left-color: #0077c5; }
.nav-rail .nav-item.disabled { opacity: 0.5; cursor: not-allowed; position: relative; }
.nav-rail .nav-item.disabled::after {
  content: 'COMING SOON';
  position: absolute; bottom: 2px; left: 50%;
  transform: translateX(-50%);
  font-size: 6px; font-weight: 700; color: #9ca3af;
  letter-spacing: 0.3px; white-space: nowrap; z-index: 1000;
}
.nav-rail .nav-item.locked { opacity: 0.4; cursor: not-allowed; pointer-events: none; position: relative; }
.nav-rail .nav-item.locked::after {
  content: 'PRO';
  position: absolute; bottom: 2px; left: 50%;
  transform: translateX(-50%);
  font-size: 7px; font-weight: 700; color: #f59e0b;
  letter-spacing: 0.5px; white-space: nowrap;
}
.nav-rail .sidebar-nav .nav-item.locked { pointer-events: auto; }
.nav-rail .nav-item.locked:hover { opacity: 0.6; background: #fef3c7; }
.nav-rail .nav-item.locked:hover::after { color: #d97706; }

.nav-icon  { width: 24px; height: 24px; flex-shrink: 0; }
.nav-label { font-size: 11px; font-weight: 500; line-height: 1.2; white-space: nowrap; }

/* Popup submenu */
.nav-has-popup { position: relative; }
.nav-has-popup > .nav-item { cursor: pointer; }
.nav-has-popup.active-parent > .nav-item { color: #0077c5; border-left-color: #0077c5; }
.nav-popup {
  position: fixed;
  left: 65px;
  min-width: 160px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
  padding: 8px 0;
  margin-top: -50px;
}
.nav-has-popup:hover .nav-popup { opacity: 1; visibility: visible; }
.nav-popup-header {
  font-size: 11px; font-weight: 600; color: #6b7280;
  letter-spacing: 0.5px; padding: 8px 16px 10px;
  border-bottom: 1px solid #e5e7eb; margin-bottom: 4px;
}
a.nav-popup-header { display: block; text-decoration: none; cursor: pointer; transition: color 0.15s; }
a.nav-popup-header:hover { color: #0077c5; text-decoration: none; }
.nav-popup-item {
  display: block; padding: 10px 16px; color: #374151;
  text-decoration: none; font-size: 14px; transition: background 0.15s;
}
.nav-popup-item:hover  { background: #f3f4f6; color: #0077c5; text-decoration: none; }
.nav-popup-item.active { color: #0077c5; font-weight: 600; background: #e8f4fd; }

.nav-section-label {
  font-size: 10px; font-weight: 600; color: #9ca3af;
  text-align: center; padding: 16px 8px 4px; letter-spacing: 0.5px;
}
.nav-divider { height: 1px; background: #e5e7eb; margin: 8px 12px; }
.nav-more { color: #5c6770; }
.nav-more:hover { background: #f3f4f6; }
.nav-more.expanded { background: #f3f4f6; color: #2c3e50; }
.nav-more-items { display: none; flex-direction: column; background: #fafafa; border-top: 1px solid #e5e7eb; }
.nav-more-items.expanded { display: flex; }
.nav-more-items .nav-item { padding: 10px 8px; }
.nav-more-items .nav-icon { width: 20px; height: 20px; }
.nav-more-items .nav-label { font-size: 10px; }

/* ============================================================================
   6. Sidebar (240px full sidebar — dark theme)
   ============================================================================ */

html, body { margin: 0; padding: 0; height: 100%; }

.sidebar {
  width: 240px;
  min-width: 240px;
  background: #111827;
  border-right: 1px solid #1e3a5f;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}

.sidebar-header { padding: 20px 16px 16px; border-bottom: 1px solid #1e3a5f; }
.sidebar-header .logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: #22a559; font-size: 16px; font-weight: 700;
}
.logo-img { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; }

.sidebar-plan { padding: 12px 16px 8px; }
.plan-wrapper { position: relative; display: inline-block; }
.plan-badge {
  display: inline-block; font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px;
  background: rgba(34,165,89,0.15); color: #22a559;
  border: 1px solid rgba(34,165,89,0.3);
  cursor: default; text-transform: uppercase; letter-spacing: 0.4px;
}
.plan-tooltip {
  display: none; position: absolute; top: 100%; left: 0; margin-top: 6px;
  background: #1e293b; border: 1px solid #1e3a5f; border-radius: 10px;
  padding: 12px 14px; min-width: 200px; z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.plan-wrapper:hover .plan-tooltip { display: block; }
.plan-tooltip-header { font-size: 12px; font-weight: 700; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.plan-tooltip-row { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 4px; }
.plan-tooltip-row .label { color: #6b7280; }
.plan-tooltip-row .value { color: #f9fafb; font-weight: 500; }
.plan-tooltip-row.trial .value { color: #fbbf24; }
.plan-change-btn {
  display: block; margin-top: 10px; text-align: center;
  background: #1e3a5f; color: #93c5fd; text-decoration: none;
  padding: 6px 12px; border-radius: 6px; font-size: 12px; font-weight: 600; transition: background 0.15s;
}
.plan-change-btn:hover { background: #2d4a6f; }

.sidebar-nav {
  flex: 1; padding: 8px; display: flex; flex-direction: column; gap: 2px;
}
.nav-section { padding: 10px 8px 4px; }
.nav-section-title { font-size: 10px; font-weight: 700; color: #4b5563; text-transform: uppercase; letter-spacing: 0.8px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px; text-decoration: none;
  color: #9ca3af; font-size: 14px; font-weight: 500; transition: all 0.15s; cursor: pointer;
}
.nav-item:hover       { background: rgba(255,255,255,0.05); color: #f9fafb; }
.nav-item.active      { background: rgba(34,165,89,0.12); color: #22a559; }
.nav-item.active-parent { color: #f9fafb; }
.nav-item.nav-level-2 { padding-left: 32px; font-size: 13px; }
.nav-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }

.sidebar-footer { padding: 8px 8px 16px; border-top: 1px solid #1e3a5f; }

/* ============================================================================
   7. Dashboard Layout
   ============================================================================ */

.dashboard { display: flex; height: calc(100vh - 56px); background: #f3f4f6; }

.main-content {
  flex: 1;
  background: #f8fafc;
  padding: 0 32px 24px 32px;
  overflow-y: auto;
  margin-left: 65px;
  height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
}

/* Full sidebar variant (240px sidebar pages) */
.sidebar-layout .main-content {
  margin-left: 240px;
  min-height: 100vh;
  background: #0d1520;
  padding: 0 32px 40px;
}

.content-container { max-width: 1200px; margin: 0 auto; }

/* Sticky page header inside main content */
.page-content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  background: #f8fafc;
  padding-top: 24px;
  padding-bottom: 16px;
  margin-left: -32px;
  margin-right: -32px;
  padding-left: 32px;
  padding-right: 32px;
}

section { margin-bottom: 32px; }
section h2 { font-size: 18px; color: #1e293b; margin: 0 0 16px 0; }

/* ============================================================================
   8. Theme Toggle & Logo Swap
   ============================================================================ */

.theme-toggle {
  background: none;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.theme-toggle:hover { background: #f1f5f9; }

.theme-icon-light { display: inline; }
.theme-icon-dark  { display: none; }

.theme-logo-light { display: inline-block; height: 48px; }
.theme-logo-dark  { display: none; height: 48px; }

/* ============================================================================
   9. Account Avatar & Modal
   ============================================================================ */

.account-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22a559, #1e9050);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-weight: 700; font-size: 14px; color: white;
  position: relative; transition: transform 0.2s;
}
.account-avatar:hover { transform: scale(1.05); }
.avatar-letter { color: white; font-weight: 600; font-size: 14px; text-transform: uppercase; }

.account-modal {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #1e293b;
  border: 1px solid #1e3a5f;
  border-radius: 12px;
  padding: 16px;
  min-width: 200px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 300;
  text-align: center;
}
.account-modal-content { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.account-avatar-large {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, #22a559, #1e9050);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 20px; color: white; margin-bottom: 4px;
}
.avatar-letter-large { color: white; font-weight: 600; font-size: 28px; text-transform: uppercase; }
.account-name  { font-size: 15px; font-weight: 600; color: #f9fafb; }
.account-email { font-size: 12px; color: #6b7280; margin-bottom: 8px; }

.account-link {
  display: block; margin-top: 12px; padding: 8px 20px;
  background: #111827; border-radius: 8px; color: #9ca3af;
  text-decoration: none; font-size: 13px; font-weight: 500;
  transition: all 0.15s; width: 100%; box-sizing: border-box;
}
.account-link:hover { background: #1e3a5f; color: #f9fafb; }

.btn-signout {
  width: 100%; padding: 12px 20px;
  background: #f1f5f9; border: 1px solid #e2e8f0;
  border-radius: 8px; color: #475569;
  font-size: 14px; font-weight: 500; cursor: pointer;
  transition: all 0.2s; margin-top: 8px;
}
.btn-signout:hover { background: #e2e8f0; }

/* ============================================================================
   10. Buttons
   ============================================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn:hover   { transform: translateY(-1px); text-decoration: none; }
.btn:active  { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary         { background: #22a559; color: white; }
.btn-primary:hover   { background: #1e9050; box-shadow: 0 4px 12px rgba(34,165,89,0.3); }

.btn-secondary       { background: #64748b; color: white; }
.btn-secondary:hover:not(:disabled) { background: #475569; }

.btn-outline         { background: transparent; border: 1px solid #e5e7eb; color: #374151; }
.btn-outline:hover:not(:disabled) { background: #f9fafb; }

.btn-danger          { background: #dc2626; color: white; border: 1px solid #dc2626; }
.btn-danger:hover    { background: #b91c1c; border-color: #b91c1c; }

.btn-disabled        { background: #f1f5f9; color: #94a3b8; cursor: not-allowed; }
.btn-disabled:hover  { transform: none; }

.btn-sm    { padding: 6px 12px; font-size: 13px; }
.btn-lg    { padding: 16px 32px; font-size: 18px; }
.btn-block { display: flex; width: 100%; }

/* Cancel-specific link */
.btn-cancel { background: none; border: none; color: #64748b; cursor: pointer; font-size: 14px; padding: 8px; }

/* ============================================================================
   11. Forms
   ============================================================================ */

.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 500; color: #374151; }
.form-group input {
  width: 100%; padding: 14px 16px;
  border: 2px solid #e5e7eb; border-radius: 8px;
  font-size: 16px; transition: border-color 0.2s; box-sizing: border-box;
}
.form-group input:focus { outline: none; border-color: #22a559; }
.form-group input::placeholder { color: #9ca3af; }

.form-control {
  display: block; width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem; line-height: 1.5;
  color: #1e293b; background: white;
  border: 2px solid #e5e7eb; border-radius: 0.5rem;
  transition: border-color 0.2s ease;
}
.form-control:focus { outline: none; border-color: #22a559; }
.form-control::placeholder { color: #9ca3af; }

.form-hint  { margin-top: 0.375rem; font-size: 0.8125rem; color: #64748b; }
.form-error { margin-top: 0.375rem; font-size: 0.8125rem; color: #dc2626; }
.form-section h2 { font-size: 18px; font-weight: 600; margin-bottom: 16px; }
.form-actions { display: flex; gap: 12px; margin-top: 24px; }

.password-input          { position: relative; }
.password-input input    { padding-right: 48px; }
.toggle-password, .eye-icon {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; padding: 4px; font-size: 20px; opacity: 0.5;
}

.captcha-container { margin-bottom: 20px; }

/* ============================================================================
   12. Alerts & Messages
   ============================================================================ */

.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 0.875rem; }
.alert-success  { background: #d1fae5; color: #065f46; border: 1px solid #bbf7d0; }
.alert-error    { background: #fef2f2; border: 1px solid #fecaca; color: #dc2626; }
.alert-warning  { background: #fffbeb; border: 1px solid #fde68a; color: #d97706; }
.alert-info     { background: #eff6ff; border: 1px solid #bfdbfe; color: #2563eb; }
.error-message  { background: #fef2f2; border: 1px solid #fecaca; color: #dc2626; padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; }
.success-message { background: #f0fdf4; border: 1px solid #bbf7d0; color: #16a34a; padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; }

/* ============================================================================
   13. Cards (Generic)
   ============================================================================ */

.card { background: white; border-radius: 0.75rem; box-shadow: 0 1px 3px rgba(0,0,0,0.1); overflow: hidden; }
.card-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid #f1f5f9; }
.card-body   { padding: 1.5rem; }
.card-footer { padding: 1rem 1.5rem; background: #f8fafc; border-top: 1px solid #f1f5f9; }

/* Info card (subscription/plan info panel) */
.info-card { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 12px; padding: 20px; display: flex; gap: 16px; }
.info-icon { font-size: 24px; flex-shrink: 0; }
.info-content h3 { margin: 0 0 4px; font-size: 16px; color: #1e40af; }
.info-content p  { margin: 0; font-size: 14px; color: #3730a3; }
.info-content a  { color: #1d4ed8; }

/* ============================================================================
   14. Tables & Data
   ============================================================================ */

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid #f1f5f9; }
.table th { font-weight: 600; color: #64748b; background: #f8fafc; }
.table tbody tr:hover { background: #f8fafc; }

.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { background: #f1f5f9; color: #374151; font-weight: 600; padding: 10px 12px; border-bottom: 2px solid #e2e8f0; text-align: left; }
.data-table td { padding: 10px 12px; border-bottom: 1px solid #e2e8f0; color: #1e293b; }
.data-table tr:hover { background: #f8fafc; }

.table-container { width: 100%; overflow-x: auto; }

.search-input { padding: 8px 12px; border: 1px solid #e2e8f0; border-radius: 6px; font-size: 14px; width: 240px; }

.filter-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ============================================================================
   15. Modal Overlays
   ============================================================================ */

.modal-overlay {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5); z-index: 1000;
  align-items: center; justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal-dialog {
  background: white; border-radius: 12px;
  width: 90%; max-width: 500px; max-height: 80vh;
  overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid #e5e7eb; }
.modal-header h3 { margin: 0; font-size: 18px; color: #1e293b; }
.modal-close { background: none; border: none; font-size: 24px; color: #64748b; cursor: pointer; padding: 0; line-height: 1; }
.modal-close:hover { color: #1e293b; }
.modal-body { padding: 20px; overflow-y: auto; max-height: calc(80vh - 60px); }
.modal-section { margin-bottom: 20px; }
.modal-section:last-child { margin-bottom: 0; }
.modal-section h4 { margin: 0 0 8px; font-size: 14px; color: #374151; }
.modal-section ul { margin: 0; padding-left: 20px; color: #64748b; font-size: 14px; }
.modal-section li { margin-bottom: 4px; }
.modal-section .error-list li { color: #dc2626; }
.modal-nav a { color: #2563eb; font-size: 14px; text-decoration: none; }
.modal-nav a:hover { text-decoration: underline; }

/* ============================================================================
   16. Progress Bars
   ============================================================================ */

.progress-section { background: white; border-radius: 12px; padding: 20px; margin-bottom: 20px; }
.progress-bar { height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: #22a559; border-radius: 4px; transition: width 0.3s ease; }
.progress-text { font-size: 13px; color: #64748b; margin-top: 8px; }
.progress-bar-container { background: #e2e8f0; border-radius: 8px; height: 10px; overflow: hidden; margin: 8px 0; }
.progress-label  { font-size: 13px; color: #374151; font-weight: 500; }
.progress-count  { font-size: 13px; color: #64748b; }
.progress-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.progress-footer { margin-top: 12px; font-size: 13px; color: #64748b; }
.progress-icon   { font-size: 20px; }

.dual-progress   { display: flex; gap: 12px; margin-bottom: 12px; }
.stats-row       { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }

/* ============================================================================
   17. Badges & Status
   ============================================================================ */

.status-badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 12px;
  font-size: 12px; font-weight: 600;
}
.status-connected   { color: #059669; font-size: 14px; }
.status-active      { background: #d1fae5; color: #065f46; }
.status-inactive    { background: #f1f5f9; color: #64748b; }
.status-matched     { background: #d1fae5; color: #065f46; }
.status-missing     { background: #fee2e2; color: #dc2626; }
.status-mismatch    { background: #fef3c7; color: #92400e; }
.trial-active       { background: #fef3c7; color: #92400e; }
.trial-expired      { background: #fee2e2; color: #dc2626; }
.trial-message      { font-size: 13px; margin-top: 8px; padding: 8px 12px; border-radius: 6px; }

.platform-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 16px; font-size: 13px; font-weight: 600; }
.platform-badge.quickbooks { background: #dbeafe; color: #1d4ed8; }

.env-badge { display: inline-block; padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: 600; text-transform: uppercase; margin-left: 6px; vertical-align: middle; }
.env-badge.production { background: #fef3c7; color: #92400e; }
.env-badge.sandbox    { background: #dbeafe; color: #1e40af; }

/* ============================================================================
   18. Pagination
   ============================================================================ */

.pagination { display: flex; gap: 6px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.pagination button {
  padding: 6px 12px; border: 1px solid #e2e8f0; border-radius: 6px;
  background: white; color: #374151; cursor: pointer; font-size: 13px; transition: all 0.15s;
}
.pagination button:hover     { background: #f1f5f9; }
.pagination button.active    { background: #22a559; color: white; border-color: #22a559; }
.pagination button:disabled  { opacity: 0.4; cursor: not-allowed; }

/* ============================================================================
   19. Auth Pages (Login / Signup / Verify)
   ============================================================================ */

.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
  font-family: 'Inter', sans-serif; padding: 20px;
}
.auth-container { width: 100%; max-width: 420px; }
.auth-box {
  background: white; border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1); padding: 40px;
}
.auth-header { text-align: center; margin-bottom: 32px; }
.auth-header h1 { font-size: 28px; color: #1e293b; margin: 0; }
.auth-links { text-align: center; margin-top: 24px; color: #64748b; }
.auth-links a { color: #0f766e; text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }
.auth-links .divider { margin: 0 12px; opacity: 0.3; }
.subtitle { color: #64748b; margin: 0 0 16px; }

.icon-large { font-size: 64px; margin-bottom: 24px; }
.message { color: #64748b; font-size: 16px; line-height: 1.6; margin-bottom: 24px; }
.info-box { background: #f8fafc; border-radius: 8px; padding: 20px; margin-bottom: 24px; }
.info-box p  { color: #64748b; margin: 8px 0; font-size: 14px; }
.info-box a  { color: #2563eb; }

/* ============================================================================
   20. Landing Page
   ============================================================================ */

.landing-page { font-family: 'Inter', sans-serif; color: #333; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.landing-header {
  padding: 20px 0;
  background: #0d1520;
  position: fixed; width: 100%; top: 0; z-index: 100;
}
.landing-header .container { display: flex; justify-content: space-between; align-items: center; }

.logo { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 700; color: #22a559; text-decoration: none; }
.logo img { height: 40px; border-radius: 8px; }

.landing-nav { display: flex; gap: 20px; align-items: center; }
.landing-nav a { color: #9ca3af; text-decoration: none; font-weight: 500; }
.landing-nav a:hover { color: #f9fafb; }
.landing-nav a.btn-primary { color: white; }

/* Landing buttons override with TR green */
.landing-page .btn-primary         { background: #22a559; color: white; }
.landing-page .btn-primary:hover   { background: #1e9050; }
.landing-page .btn-outline         { background: transparent; border: 2px solid #22a559; color: #22a559; }
.landing-page .btn-outline:hover   { background: #22a559; color: white; }
.landing-page .btn-lg              { padding: 16px 32px; font-size: 18px; }

.hero { padding: 140px 0 100px; background: linear-gradient(135deg, #0d1520 0%, #162231 100%); text-align: center; }
.hero h1 { font-size: 48px; font-weight: 700; color: #f9fafb; margin-bottom: 20px; line-height: 1.2; }
.hero-subtitle { font-size: 20px; color: #9ca3af; max-width: 700px; margin: 0 auto 40px; line-height: 1.6; }
.hero-actions { display: flex; gap: 16px; justify-content: center; }

.features      { padding: 100px 0; background: #f8fafc; }
.features h2   { text-align: center; font-size: 36px; margin-bottom: 60px; color: #1e293b; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; }
.feature-card  { text-align: center; padding: 30px; background: white; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); border: 1px solid #e5e7eb; }
.feature-icon  { font-size: 48px; margin-bottom: 20px; }
.feature-card h3 { font-size: 20px; margin-bottom: 12px; color: #1e293b; }
.feature-card p  { color: #64748b; line-height: 1.6; }

.how-it-works    { padding: 100px 0; background: white; }
.how-it-works h2 { text-align: center; font-size: 36px; margin-bottom: 60px; color: #1e293b; }
.steps-grid      { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 40px; }
.step            { text-align: center; }
.step-number     { width: 60px; height: 60px; background: #1e3a5f; color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; margin: 0 auto 20px; }
.step h3         { font-size: 20px; margin-bottom: 12px; color: #1e293b; }
.step p          { color: #64748b; line-height: 1.6; }

.cta           { padding: 100px 0; background: linear-gradient(135deg, #1e3a5f 0%, #22a559 100%); text-align: center; color: white; }
.cta h2        { font-size: 36px; margin-bottom: 16px; }
.cta p         { font-size: 18px; opacity: 0.9; margin-bottom: 30px; }
.cta .btn-primary { background: white; color: #1e3a5f; }
.cta .btn-primary:hover { background: #f0f7ff; }

.landing-footer              { padding: 40px 0; background: #0d1520; color: #6b7280; }
.landing-footer .container   { display: flex; justify-content: space-between; align-items: center; }
.footer-nav                  { display: flex; gap: 24px; }
.footer-nav a                { color: #6b7280; text-decoration: none; }
.footer-nav a:hover          { color: #f9fafb; }

/* ============================================================================
   21. Legal Pages (Terms / Privacy)
   ============================================================================ */

.legal-page      { font-family: 'Inter', sans-serif; color: #333; min-height: 100vh; background: #f8fafc; }
.legal-header    { background: white; padding: 20px 0; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.legal-header .container { max-width: 900px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; }
.legal-container { max-width: 900px; margin: 0 auto; padding: 60px 20px; }
.legal-container h1 { font-size: 36px; color: #1e293b; margin-bottom: 8px; }
.legal-container h2 { font-size: 20px; color: #1e293b; margin-top: 32px; margin-bottom: 12px; }
.legal-container p  { color: #475569; line-height: 1.7; margin-bottom: 16px; }
.legal-container ul { color: #475569; line-height: 1.7; margin-bottom: 16px; padding-left: 24px; }
.legal-container li { margin-bottom: 8px; }
.legal-container a  { color: #2563eb; }
.legal-container strong { color: #1e293b; }
.effective-date  { color: #64748b; margin-bottom: 40px; font-size: 14px; }
.back-link       { color: #64748b; text-decoration: none; font-size: 14px; display: inline-block; margin-bottom: 16px; }
.back-link:hover { color: #2563eb; }

/* ============================================================================
   22. Error Page
   ============================================================================ */

.error-page      { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #f8fafc; font-family: 'Inter', sans-serif; padding: 20px; }
.error-container { text-align: center; max-width: 500px; }
.error-code      { font-size: 120px; font-weight: 700; color: #e5e7eb; line-height: 1; margin-bottom: 16px; }
.error-actions   { display: flex; gap: 16px; justify-content: center; }
.error-stack     { margin-top: 32px; background: #1e293b; color: #f1f5f9; padding: 20px; border-radius: 8px; text-align: left; font-size: 12px; overflow-x: auto; max-height: 300px; }

/* ============================================================================
   23. Billing Page
   ============================================================================ */

.billing-page    { min-height: 100vh; background: #f8fafc; color: #1e293b; }
.billing-topbar  { display: flex; justify-content: space-between; align-items: center; padding: 16px 32px; background: #fff; border-bottom: 1px solid #e2e8f0; }
.logo-link       { display: flex; align-items: center; }
.billing-content { max-width: 1500px; margin: 0 auto; padding: 40px 20px; text-align: center; }
.billing-title   { font-size: 32px; font-weight: 700; margin-bottom: 12px; color: #1e293b; }
.current-plan    { font-size: 14px; color: #0d9488; font-weight: 600; margin-bottom: 24px; }

.toggle-container { display: flex; justify-content: center; align-items: center; gap: 12px; margin-bottom: 40px; }
.toggle-label     { font-size: 14px; font-weight: 500; cursor: pointer; }
.toggle-label.active { font-weight: 600; }
.toggle-switch    { width: 44px; height: 24px; background: #e2e8f0; border-radius: 12px; cursor: pointer; position: relative; transition: background 0.2s; }
.toggle-switch.annual { background: #0d9488; }
.toggle-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; background: white; border-radius: 50%; transition: left 0.2s; }
.toggle-switch.annual::after { left: 22px; }

.pricing-container { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 40px; }
.plan { background: white; border: 1px solid #e2e8f0; border-radius: 16px; padding: 28px 20px; width: 220px; text-align: center; display: flex; flex-direction: column; gap: 12px; transition: box-shadow 0.2s; }
.plan:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.plan h3 { font-size: 20px; font-weight: 700; color: #1e293b; }
.plan .description { font-size: 13px; color: #64748b; }
.price-amount { font-size: 36px; font-weight: 700; color: #0d9488; }
.price-period { font-size: 13px; color: #64748b; }
.annual-equivalent { font-size: 12px; color: #94a3b8; }
.plan ul { list-style: none; padding: 0; margin: 0; text-align: left; background: #f8fafc; border-radius: 8px; }
.plan li { padding: 8px 12px; font-size: 13px; color: #475569; border-bottom: 1px solid #e2e8f0; }
.plan li:last-child { border-bottom: none; }
.plan .button { display: block; padding: 12px; background: #475569; color: white; border-radius: 8px; font-weight: 600; font-size: 14px; text-decoration: none; margin-top: auto; transition: background 0.2s; }
.plan .button:hover { background: #334155; }
.plan-popular { border: 2px solid #0d9488; position: relative; overflow: visible; }
.plan-popular::before { content: '★ MOST POPULAR'; position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: #0d9488; color: #fff; font-size: 10px; font-weight: 600; padding: 3px 10px; border-radius: 10px; white-space: nowrap; z-index: 1; }
.plan-popular .button { background: #0d9488; }
.plan-popular .button:hover { background: #0f766e; }
.btn-free { background: #0d9488 !important; }
.btn-free:hover { background: #0f766e !important; }

/* ============================================================================
   24. Account Pages (Shared)
   ============================================================================ */

.account-page     { max-width: 1100px; margin: 0 auto; padding: 40px 24px; }
.account-header   { margin-bottom: 32px; }
.account-header h1 { font-size: 32px; font-weight: 600; color: #1e293b; margin: 0 0 8px; }
.account-subtitle  { color: #64748b; margin: 0; font-size: 16px; }

.account-layout   { display: grid; grid-template-columns: 1fr 320px; gap: 32px; }
@media (max-width: 900px) { .account-layout { grid-template-columns: 1fr; } }

.account-section  { background: white; border-radius: 12px; padding: 24px; margin-bottom: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.account-section h2 { font-size: 18px; font-weight: 600; color: #1e293b; margin: 0 0 4px; }
.section-desc     { color: #64748b; font-size: 14px; margin: 0 0 20px; }

.account-cards    { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 700px) { .account-cards { grid-template-columns: repeat(2, 1fr); } }

.account-card     { display: flex; flex-direction: column; align-items: center; padding: 24px 16px; border: 1px solid #e2e8f0; border-radius: 8px; text-decoration: none; color: #1e293b; transition: all 0.2s; }
.account-card:hover { border-color: #22a559; box-shadow: 0 4px 12px rgba(34,165,89,0.15); }
.card-icon        { color: #64748b; margin-bottom: 12px; font-size: 32px; }
.account-card:hover .card-icon { color: #22a559; }
.card-label       { font-size: 14px; font-weight: 500; text-align: center; }

.platforms-list   { display: flex; flex-direction: column; gap: 12px; }
.platform-item    { display: flex; align-items: center; gap: 12px; padding: 12px; background: #f8fafc; border-radius: 8px; }
.platform-icon    { font-size: 24px; }
.platform-info    { flex: 1; }
.platform-name    { font-weight: 500; color: #1e293b; }
.platform-status  { font-size: 13px; color: #64748b; }

.quick-actions-card, .back-card { background: white; border-radius: 12px; padding: 20px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.quick-actions-card h3, .back-card h3 { font-size: 16px; font-weight: 600; color: #1e293b; margin: 0 0 16px; }
.quick-actions-list { display: flex; flex-direction: column; }
.quick-action { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid #e2e8f0; text-decoration: none; color: #1e293b; font-size: 14px; transition: color 0.2s; }
.quick-action:last-child { border-bottom: none; }
.quick-action:hover { color: #22a559; }
.quick-action .arrow { color: #94a3b8; }
.quick-action:hover .arrow { color: #22a559; }

.account-form-container { max-width: 600px; }
.static-value { color: #1e293b; font-size: 16px; padding: 8px 0; }

/* Logo upload */
.logo-upload-area     { display: flex; flex-direction: column; gap: 16px; }
.logo-preview-container { width: 300px; height: 100px; border: 2px dashed #e2e8f0; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: #f8fafc; }
.logo-preview         { max-width: 280px; max-height: 90px; object-fit: contain; }
.logo-placeholder     { display: flex; flex-direction: column; align-items: center; gap: 8px; color: #94a3b8; }
.logo-actions         { display: flex; gap: 12px; }
.logo-info p          { margin: 0 0 4px; font-size: 13px; color: #64748b; }

/* ============================================================================
   25. Account — Subscription
   ============================================================================ */

.subscription-container { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 700px) { .subscription-container { grid-template-columns: 1fr; } }
.plan-col-left, .plan-col-right { display: flex; flex-direction: column; gap: 20px; }

.plan-card           { background: white; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); overflow: hidden; }
.plan-header         { background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%); padding: 24px 32px; }
.plan-header h2      { color: white; margin: 0; font-size: 20px; font-weight: 600; }
.plan-details        { padding: 24px 32px; }
.plan-row            { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid #f1f5f9; }
.plan-row:last-child { border-bottom: none; }
.plan-label          { font-size: 14px; color: #64748b; }
.plan-value          { font-size: 14px; font-weight: 600; color: #1e293b; }
.plan-actions        { display: flex; flex-direction: column; gap: 12px; }
.action-link         { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: #f8fafc; border-radius: 8px; text-decoration: none; color: #1e293b; font-size: 14px; font-weight: 500; transition: all 0.2s; }
.action-link:hover   { background: #eff6ff; color: #2563eb; }
.action-link .arrow  { color: #94a3b8; }
.action-link:last-child { border-bottom: none; }
.action-danger       { color: #dc2626; }
.action-danger:hover { background: #fef2f2; color: #dc2626; }

.plan-features-section h3 { font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.plan-features       { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.feature-item        { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #374151; }

/* ============================================================================
   26. Account — Change Plan
   ============================================================================ */

.plans-container     { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 32px; }
.plan-card.featured  { border: 2px solid #22a559; position: relative; }
.plan-card h3        { font-size: 20px; font-weight: 600; color: #1e293b; margin-bottom: 4px; }
.plan-price          { font-size: 32px; font-weight: 700; color: #22a559; margin: 12px 0 4px; }
.price-period        { font-size: 14px; color: #64748b; }
.plan-badge.current  { background: #d1fae5; color: #065f46; }
.plan-badge.popular  { background: linear-gradient(135deg, #3b82f6, #8b5cf6); color: white; }
.plan-features       { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.plan-features li    { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #374151; padding: 4px 0; }
.plan-features li:last-child { border-bottom: none; }

/* ============================================================================
   27. Account — Profile & Password
   ============================================================================ */

/* (form-group, form-hint, btn already covered above) */

/* ============================================================================
   28. Account — Cancel
   ============================================================================ */

.cancel-card         { background: white; border-radius: 12px; padding: 32px; max-width: 600px; margin: 0 auto; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.cancel-card h2      { font-size: 24px; font-weight: 600; color: #1e293b; margin-bottom: 16px; }
.cancel-card > p     { color: #64748b; margin-bottom: 24px; }
.cancel-list         { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-direction: column; gap: 8px; }
.cancel-list li      { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; color: #374151; padding: 8px 0; border-bottom: 1px solid #f1f5f9; }
.warning-icon        { font-size: 20px; flex-shrink: 0; }
.cancel-note         { background: #fef9c3; border: 1px solid #fde047; border-radius: 8px; padding: 16px; font-size: 14px; color: #713f12; margin-bottom: 24px; }
.cancel-divider      { border: none; border-top: 1px solid #e2e8f0; margin: 24px 0; }
.cancel-actions      { display: flex; gap: 12px; flex-wrap: wrap; }
.cancel-actions p    { font-size: 13px; color: #64748b; margin-top: 12px; }

/* ============================================================================
   29. Account — Update Scope
   ============================================================================ */

.scope-comparison    { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 32px; }
.scope-card          { background: white; border-radius: 12px; padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.scope-card h2       { font-size: 18px; font-weight: 600; color: #1e293b; margin-bottom: 16px; }
.scope-card.current-scopes { border-left: 4px solid #22a559; }
.scope-card.required-scopes { border-left: 4px solid #3b82f6; }
.scope-list          { list-style: none; padding: 0; margin: 0; }
.scope-list li       { padding: 8px 0; border-bottom: 1px solid #f1f5f9; display: flex; align-items: center; gap: 10px; font-size: 14px; }
.scope-list li:last-child { border-bottom: none; }
.scope-list li.new-scope { color: #2563eb; font-weight: 500; }
.scope-icon          { font-size: 16px; }
.scope-icon.granted  { color: #22a559; }
.scope-icon.new      { color: #3b82f6; }
.scope-name          { flex: 1; }
.scope-desc          { font-size: 12px; color: #64748b; margin-top: 2px; }
.header-icon         { font-size: 48px; margin-bottom: 16px; }
.header-icon.current  { filter: grayscale(0.3); }
.header-icon.required { filter: none; }
.new-badge           { display: inline-block; background: #dbeafe; color: #1d4ed8; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; margin-left: 6px; }
.no-scopes           { color: #64748b; font-size: 14px; font-style: italic; padding: 8px 0; }
.scope-item          { position: relative; }
.scope-tooltip       { display: none; position: absolute; left: 100%; top: 0; margin-left: 8px; background: #1e293b; color: white; padding: 8px 12px; border-radius: 6px; font-size: 12px; white-space: nowrap; z-index: 100; }
.scope-item:hover .scope-tooltip { display: block; }
.scope-tooltip::before { content: ''; position: absolute; left: -6px; top: 10px; border: 6px solid transparent; border-right-color: #1e293b; border-left: none; }
.action-buttons      { display: flex; gap: 12px; flex-wrap: wrap; }
.card-desc           { color: #64748b; font-size: 14px; margin-bottom: 24px; }
.status-badge.up-to-date   { background: #d1fae5; color: #065f46; }
.status-badge.needs-update { background: #fef3c7; color: #92400e; }

/* ============================================================================
   30. Dashboard — TheReconciliator
   ============================================================================ */

.metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.metric-card  { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.metric-card h3 { font-size: 14px; color: #64748b; margin: 0 0 8px; }
.metric-value   { font-size: 32px; font-weight: 700; color: #1e293b; }
.metric-change  { font-size: 13px; color: #22a559; margin-top: 4px; }

.quick-actions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.section-header { margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; }
.section-title  { font-size: 18px; font-weight: 600; color: #f9fafb; margin: 0; }

/* ============================================================================
   31. Connection Cards
   ============================================================================ */

.connection-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.connection-card  { background: white; border-radius: 12px; padding: 20px; display: flex; gap: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); border: 2px solid #e2e8f0; transition: all 0.2s; align-items: flex-start; }
.connection-card:hover { border-color: #cbd5e1; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.connection-card#qbo-card { border-left: 4px solid #2ca01c; }
.card-content      { flex: 1; min-height: 80px; }
.card-content h3   { margin: 0 0 4px; font-size: 16px; }
.card-content .card-label { font-size: 12px; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.card-actions      { margin-top: 12px; }
.company-name, .connected-date, .store-url { font-size: 12px; color: #64748b; margin: 4px 0 0; }
.store-name        { font-size: 15px; font-weight: 600; color: #1e293b; margin-bottom: 2px; }
.store-details     { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: #64748b; }
.store-details span { display: flex; align-items: center; gap: 4px; }
.connection-error  { color: #dc2626; font-size: 13px; }

/* ============================================================================
   32. Action Cards
   ============================================================================ */

.action-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1200px) { .action-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px)  { .action-cards { grid-template-columns: 1fr; } }

.action-card  { background: white; border-radius: 12px; padding: 24px; cursor: pointer; transition: all 0.2s; box-shadow: 0 2px 8px rgba(0,0,0,0.05); border: 2px solid transparent; }
.action-card:hover  { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); border-color: #e2e8f0; }
.action-card:active { transform: translateY(0); }
.action-card.primary-action { background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%); color: white; }
.action-card.primary-action:hover { background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%); box-shadow: 0 8px 24px rgba(37,99,235,0.3); }
.action-card.primary-action h3,
.action-card.primary-action p { color: white; }
.action-card.primary-action p { opacity: 0.9; }
.action-icon     { font-size: 32px; margin-bottom: 12px; }
.action-card h3  { margin: 0 0 8px; font-size: 16px; color: #1e293b; }
.action-card p   { margin: 0; font-size: 13px; color: #64748b; }
.action-card.locked { opacity: 0.45; cursor: not-allowed; position: relative; border: 2px dashed #d1d5db; }
.action-card.locked:hover { transform: none; box-shadow: 0 2px 8px rgba(0,0,0,0.05); opacity: 0.65; border-color: #f59e0b; }
.action-card.locked .lock-badge { position: absolute; top: 10px; right: 10px; background: #f59e0b; color: #fff; font-size: 9px; font-weight: 700; padding: 2px 8px; border-radius: 4px; letter-spacing: 0.5px; }

/* ============================================================================
   33. Analysis Pages (Shared — Order & Customer)
   ============================================================================ */

.analysis-header   { margin-bottom: 24px; }
.analysis-header h2 { font-size: 24px; font-weight: 600; color: #1e293b; margin: 0 0 4px; }
.analysis-subtitle { font-size: 15px; color: #64748b; }

.stats-grid     { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card      { background: white; border-radius: 10px; padding: 16px; box-shadow: 0 2px 6px rgba(0,0,0,0.05); text-align: center; }
.stat-number    { font-size: 28px; font-weight: 700; color: #1e293b; }
.stat-icon      { font-size: 24px; margin-bottom: 8px; }
.stat-label     { font-size: 12px; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-value     { font-size: 20px; font-weight: 600; color: #1e293b; }

.match-results  { background: white; border-radius: 12px; padding: 20px; margin-bottom: 20px; }
.match-icon     { font-size: 20px; }
.match-label    { font-size: 14px; font-weight: 500; color: #374151; }

.custom-date-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 500; display: none; align-items: center; justify-content: center; }
.custom-date-overlay.active { display: flex; }
.custom-date-dialog { background: white; border-radius: 12px; padding: 24px; min-width: 320px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.custom-date-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.custom-date-header h3 { margin: 0; font-size: 18px; }
.custom-date-close { background: none; border: none; font-size: 24px; cursor: pointer; color: #64748b; }
.custom-date-body   { display: flex; flex-direction: column; gap: 12px; }
.custom-date-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.custom-date-field label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.custom-date-field input { width: 100%; padding: 8px 10px; border: 1px solid #e2e8f0; border-radius: 6px; font-size: 14px; }
.custom-date-footer { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }

.log-entry { padding: 8px 12px; border-bottom: 1px solid #f1f5f9; font-size: 13px; color: #374151; }

.tab-btn        { padding: 8px 16px; border: 1px solid #e2e8f0; border-radius: 6px; background: #f8fafc; color: #374151; cursor: pointer; font-size: 14px; transition: all 0.15s; }
.tab-btn:hover  { background: #e2e8f0; }
.tab-btn.active { background: #22a559; color: white; border-color: #22a559; }

/* ============================================================================
   34. Health Pages (Shared — Financial & QBO)
   ============================================================================ */

.health-container { max-width: 900px; }

.score-card-main { background: linear-gradient(135deg, #1e3a5f 0%, #2d4a6f 100%); border-radius: 16px; padding: 32px; color: white; display: flex; gap: 32px; align-items: center; margin-bottom: 32px; }
.score-circle-wrapper { position: relative; }
.score-circle { width: 140px; height: 140px; border-radius: 50%; background: white; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score-number { font-size: 48px; font-weight: 700; color: #1e293b; line-height: 1; }
.score-label  { font-size: 12px; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; }
.score-info h2 { font-size: 24px; margin-bottom: 8px; }
.score-info p  { opacity: 0.85; font-size: 15px; }
.score-date    { font-size: 13px; opacity: 0.7; margin-top: 8px; }

.categories-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 32px; }
.category-card   { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 2px 6px rgba(0,0,0,0.05); }
.category-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.category-icon   { font-size: 24px; }
.category-score  { font-size: 20px; font-weight: 700; color: #1e293b; margin-left: auto; }
.category-bar    { height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden; }
.category-bar-fill { height: 100%; border-radius: 4px; background: #22a559; }

.issues-section  { margin-bottom: 32px; }
.issues-section h3 { font-size: 20px; font-weight: 600; color: #1e293b; margin-bottom: 16px; }
.issue-group     { border: 1px solid #e2e8f0; border-radius: 8px; margin-bottom: 8px; overflow: hidden; }
.issue-group-header { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; transition: background 0.15s; }
.issue-group-header:hover { background: #f8fafc; }
.issue-group-icon  { font-size: 20px; }
.issue-group-title { flex: 1; font-weight: 500; color: #1e293b; }
.issue-group-count { font-size: 13px; font-weight: 600; padding: 2px 10px; border-radius: 10px; }
.issue-group-count.medium { background: #fef3c7; color: #92400e; }
.issue-group-count.low    { background: #d1fae5; color: #065f46; }
.issue-group-chevron { font-size: 12px; color: #64748b; transition: transform 0.2s; }
.issue-group.expanded .issue-group-chevron { transform: rotate(180deg); }
.issue-group-content { display: none; padding: 0; background: #f8fafc; }
.issue-group.expanded .issue-group-content { display: block; }

.issue-card     { padding: 16px; border-bottom: 1px solid #e2e8f0; display: flex; gap: 16px; align-items: flex-start; }
.issue-card:last-child { border-bottom: none; }
.issue-card.medium { border-left: 3px solid #f59e0b; }
.issue-card.low    { border-left: 3px solid #22a559; }
.issue-icon        { font-size: 20px; flex-shrink: 0; }
.issue-content     { flex: 1; }
.issue-title       { font-weight: 500; color: #1e293b; margin-bottom: 4px; }
.issue-description { font-size: 14px; color: #64748b; line-height: 1.5; }
.issue-action      { font-size: 13px; color: #2563eb; text-decoration: none; display: inline-block; margin-top: 8px; }

.progress-bar-container { background: #e2e8f0; border-radius: 8px; height: 10px; overflow: hidden; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-bottom: 24px; }

.score-circle-wrapper.critical::before { content: ''; position: absolute; inset: -8px; border-radius: 50%; border: 3px solid #dc2626; animation: pulse-danger 2s infinite; }
@keyframes pulse-danger { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ============================================================================
   35. Inventory Page
   ============================================================================ */

.summary-row   { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #e5e7eb; }
.summary-row:last-child { border-bottom: none; }
.summary-label { font-size: 14px; color: #64748b; }
.summary-value { font-size: 14px; font-weight: 600; color: #1e293b; }

/* ============================================================================
   36. Settings Page
   ============================================================================ */

.settings-section { background: white; border-radius: 12px; padding: 24px; margin-bottom: 24px; }
.settings-section h2 { font-size: 18px; font-weight: 600; color: #1e293b; margin-bottom: 16px; }
.setting-card { padding: 16px; border: 1px solid #e2e8f0; border-radius: 8px; margin-bottom: 12px; }
.header-actions select { padding: 8px 12px; border: 1px solid #e2e8f0; border-radius: 6px; font-size: 14px; }

/* ============================================================================
   37. Tooltips & Utilities
   ============================================================================ */

.tooltip-wrapper { position: relative; display: inline-block; }
.info-icon { font-style: normal; color: #64748b; cursor: help; }
.tooltip-wrapper:hover .info-icon { color: #3b82f6; }
.info-text {
  display: none; position: absolute; left: 100%; top: 50%; transform: translateY(-50%);
  background: #1e293b; color: white; padding: 8px 12px; border-radius: 6px;
  font-size: 11px; white-space: normal; width: 200px; z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2); margin-left: 8px; pointer-events: none;
}
.tooltip-wrapper:hover .info-text { display: block; }

.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: #64748b; }
.text-success { color: #16a34a; }
.text-danger  { color: #dc2626; }
.text-warning { color: #d97706; }
.mt-1 { margin-top: 0.25rem; } .mt-2 { margin-top: 0.5rem; } .mt-3 { margin-top: 1rem; } .mt-4 { margin-top: 1.5rem; } .mt-5 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.25rem; } .mb-2 { margin-bottom: 0.5rem; } .mb-3 { margin-bottom: 1rem; } .mb-4 { margin-bottom: 1.5rem; } .mb-5 { margin-bottom: 2rem; }
.hidden { display: none !important; }

.loading-spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid #e2e8f0; border-top-color: #22a559; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================================
   38. Peekaboo Eye Button
   ============================================================================ */

.peekaboo-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
  padding: 0.35rem 0.75rem; height: 40px;
  background: transparent; border: 1px solid #2a3242; border-radius: 6px;
  color: #dfe6ee; cursor: pointer; font-size: 0.95rem; font-weight: 500;
  white-space: nowrap; transition: background 0.15s ease, transform 0.15s ease;
}
.peekaboo-btn:hover { background: rgba(255,255,255,0.07); transform: translateY(-1px); }
.peekaboo-eye { width: 40px; height: 32px; }
.peekaboo-eye .eye-ball { animation: blink 6s infinite; }
@keyframes blink { 0%, 90%, 100% { transform: scaleY(1); } 92% { transform: scaleY(0.1); } }
.peekaboo-btn:hover .iris-group { animation: lookaround 1.25s infinite; }
@keyframes lookaround { 0% { transform: translate(0,0); } 25% { transform: translate(-3px,0); } 50% { transform: translate(3px,0); } 75% { transform: translate(-1px,0); } 100% { transform: translate(0,0); } }

/* ============================================================================
   39. Dark Mode Overrides
   ============================================================================ */

[data-theme="dark"] body { color: #e2e8f0; background: #0f172a; }

/* Layout */
[data-theme="dark"] .page-wrapper           { background: #0f172a; }
[data-theme="dark"] .top-header             { background: #162231; border-bottom-color: #334155; }
[data-theme="dark"] .brand-name             { color: #f9fafb; border-left-color: #1e3a5f; }
[data-theme="dark"] .page-header            { background: #162231; border-bottom-color: #334155; }
[data-theme="dark"] .page-content-header    { background: #0f1927; }
[data-theme="dark"] .dashboard             { background: #0f1927; }
[data-theme="dark"] .main-content          { background: #0f1927; }

/* Theme toggle & logo */
[data-theme="dark"] .theme-toggle           { border-color: #334155; }
[data-theme="dark"] .theme-toggle:hover     { background: #1e293b; }
[data-theme="dark"] .theme-icon-light       { display: none; }
[data-theme="dark"] .theme-icon-dark        { display: inline; }
[data-theme="dark"] .theme-logo-light       { display: none; }
[data-theme="dark"] .theme-logo-dark        { display: inline-block; }

/* Nav rail */
[data-theme="dark"] .nav-rail .sidebar      { background: #0b1620; border-right: none; box-shadow: 8px 0 24px rgba(0,0,0,0.75); }
[data-theme="dark"] .nav-rail .nav-item     { color: #9ca3af; }
[data-theme="dark"] .nav-rail .nav-item:hover  { background: #1e3a5f; color: #f9fafb; }
[data-theme="dark"] .nav-rail .nav-item.active { background: rgba(59,130,246,0.2); color: #60a5fa; border-left-color: #3b82f6; }
[data-theme="dark"] .nav-rail .nav-item.locked:hover { background: #422006; }
[data-theme="dark"] .nav-rail .nav-item.locked::after { color: #fbbf24; }
[data-theme="dark"] .nav-popup             { background: #1e293b; border-color: #334155; box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
[data-theme="dark"] .nav-popup-header      { color: #94a3b8; border-bottom-color: #334155; }
[data-theme="dark"] a.nav-popup-header:hover { color: #60a5fa; }
[data-theme="dark"] .nav-popup-item        { color: #e2e8f0; }
[data-theme="dark"] .nav-popup-item:hover  { background: #334155; color: #60a5fa; }
[data-theme="dark"] .nav-popup-item.active { color: #60a5fa; background: rgba(59,130,246,0.2); }
[data-theme="dark"] .nav-divider           { background: #1e3a5f; }
[data-theme="dark"] .nav-section-label     { color: #6b7280; }
[data-theme="dark"] .nav-more              { color: #9ca3af; }
[data-theme="dark"] .nav-more:hover, [data-theme="dark"] .nav-more.expanded { background: #1e3a5f; color: #f9fafb; }
[data-theme="dark"] .nav-more-items        { background: #0f1927; border-top-color: #1e3a5f; }

/* Sidebar */
[data-theme="dark"] .sidebar               { background: #0b1620; border-right: none; box-shadow: 8px 0 24px rgba(0,0,0,0.75); }
[data-theme="dark"] .sidebar-header        { border-color: #334155; }
[data-theme="dark"] .sidebar-footer        { border-color: #334155; }
[data-theme="dark"] .sidebar-plan          { border-bottom-color: #1e3a5f; }
[data-theme="dark"] .plan-badge            { background: linear-gradient(135deg, #2563eb, #7c3aed); color: white; }
[data-theme="dark"] .nav-item              { color: #9ca3af; }
[data-theme="dark"] .nav-item:hover        { background: rgba(255,255,255,0.08); color: #f9fafb; }
[data-theme="dark"] .nav-item.active       { background: rgba(59,130,246,0.15); color: #22a559; border-left-color: #22a559; }

/* Account avatar */
[data-theme="dark"] .account-avatar        { background: #2d4a6f; }
[data-theme="dark"] .account-modal         { background: #1e293b; box-shadow: 0 4px 24px rgba(0,0,0,0.4); }
[data-theme="dark"] .account-modal-content { background: #1e293b; color: #f9fafb; }
[data-theme="dark"] .account-name          { color: #f1f5f9; }
[data-theme="dark"] .account-email         { color: #94a3b8; }
[data-theme="dark"] .account-link          { color: #60a5fa; border-color: #60a5fa; }
[data-theme="dark"] .account-link:hover    { background: #334155; }
[data-theme="dark"] .btn-signout           { background: #334155; color: #e2e8f0; }
[data-theme="dark"] .btn-signout:hover     { background: #475569; }

/* Buttons */
[data-theme="dark"] .btn-outline           { background: #1e3a5f; border-color: #2d4a6f; color: #f9fafb; }
[data-theme="dark"] .btn-outline:hover     { background: #2d4a6f; }
[data-theme="dark"] .btn-secondary         { background: #162231 !important; color: #f9fafb !important; border-color: #1e3a5f !important; }
[data-theme="dark"] .btn-secondary:hover   { background: #1e3a5f !important; }
[data-theme="dark"] .btn-danger            { color: #f87171; border-color: #7f1d1d; }
[data-theme="dark"] .btn-danger:hover      { background: #7f1d1d; border-color: #f87171; }

/* Forms */
[data-theme="dark"] .form-group label      { color: #e5e7eb; }
[data-theme="dark"] .form-group input      { background: #1e3a5f; border-color: #2d4a6f; color: #f9fafb; }
[data-theme="dark"] .form-group input::placeholder { color: #6b7280; }
[data-theme="dark"] .form-group input:focus { border-color: #3b82f6; }
[data-theme="dark"] .form-hint             { color: #9ca3af; }
[data-theme="dark"] input, [data-theme="dark"] textarea, [data-theme="dark"] select { background: #1e3a5f; border-color: #2d4a6f; color: #f9fafb; }
[data-theme="dark"] input::placeholder, [data-theme="dark"] textarea::placeholder { color: #9ca3af; }
[data-theme="dark"] label                  { color: #e5e7eb; }

/* Cards */
[data-theme="dark"] .card                  { background: #162231; border-color: #1e3a5f; color: #f9fafb; }
[data-theme="dark"] .card-header           { color: #f9fafb; border-bottom-color: #1e3a5f; }
[data-theme="dark"] .info-card             { background: rgba(30,58,95,0.5); border-color: #1e3a5f; }
[data-theme="dark"] .info-content h3       { color: #93c5fd; }
[data-theme="dark"] .info-content p        { color: #bfdbfe; }
[data-theme="dark"] .info-content a        { color: #60a5fa; }

/* Tables */
[data-theme="dark"] .data-table th         { background: #0b1620; color: #f9fafb; border-color: #1e3a5f; }
[data-theme="dark"] .data-table td         { background: #162231; color: #e5e7eb; border-color: #1e3a5f; }
[data-theme="dark"] .data-table tr:hover td { background: #1e3a5f; }
[data-theme="dark"] th, [data-theme="dark"] td { border-color: #1e3a5f; }
[data-theme="dark"] tbody tr:hover         { background: #1e3a5f; }

/* Search & select */
[data-theme="dark"] .search-input          { background: #162231 !important; border-color: #1e3a5f !important; color: #f9fafb !important; }
[data-theme="dark"] .search-input::placeholder { color: #6b7280 !important; }
[data-theme="dark"] .header-actions select { background: #1e3a5f; border-color: #2d4a6f; color: #f9fafb; }
[data-theme="dark"] select optgroup        { background: #0f1927; color: #9ca3af; }
[data-theme="dark"] select option          { background: #162231; color: #f9fafb; }

/* Alerts */
[data-theme="dark"] .error-message         { background: rgba(220,38,38,0.2); border-color: rgba(220,38,38,0.4); color: #fca5a5; }
[data-theme="dark"] .alert-success         { background: rgba(5,150,105,0.2); border-color: rgba(5,150,105,0.4); color: #6ee7b7; }

/* Modal */
[data-theme="dark"] .modal-dialog          { background: #162231; color: #f9fafb; }
[data-theme="dark"] .modal-header          { border-bottom-color: #1e3a5f; }
[data-theme="dark"] .modal-header h3       { color: #f9fafb; }

/* Progress */
[data-theme="dark"] .progress-section      { background: #162231 !important; border-color: #1e3a5f; }
[data-theme="dark"] .progress-bar          { background: #1e3a5f; }
[data-theme="dark"] .progress-bar-container { background: #1e3a5f; }
[data-theme="dark"] .progress-text         { color: #e5e7eb !important; }

/* Pagination */
[data-theme="dark"] .pagination button     { background: #162231; border-color: #1e3a5f; color: #f9fafb; }
[data-theme="dark"] .pagination button:hover { background: #1e3a5f; }
[data-theme="dark"] .pagination button.active { background: #3b82f6; border-color: #3b82f6; color: white; }
[data-theme="dark"] .pagination button:disabled { background: #0f1927; color: #6b7280; }

/* Tabs */
[data-theme="dark"] .tab-btn              { background: #1e3a5f; color: #9ca3af; border-color: #2d4a6f; }
[data-theme="dark"] .tab-btn:hover        { background: #2d4a6f; color: #f9fafb; }
[data-theme="dark"] .tab-btn.active       { background: #162231; color: #f9fafb; border-color: #3b82f6; }

/* Auth pages */
[data-theme="dark"] .auth-page            { background: linear-gradient(135deg, #0f1927 0%, #162231 100%); }
[data-theme="dark"] .auth-box             { background: #162231; box-shadow: 0 10px 40px rgba(0,0,0,0.5); }
[data-theme="dark"] .auth-header h1       { color: #f9fafb; }
[data-theme="dark"] .auth-links           { color: #9ca3af; }
[data-theme="dark"] .auth-links a         { color: #60a5fa; }
[data-theme="dark"] .auth-links .divider  { opacity: 0.3; }
[data-theme="dark"] .captcha-container    { background: #1e3a5f; padding: 16px; border-radius: 8px; }
[data-theme="dark"] .logo                 { color: #60a5fa; }

/* Connection cards */
[data-theme="dark"] .connection-card      { background: #162231; border-color: #1e3a5f; }
[data-theme="dark"] .connection-card:hover { border-color: #2d4a6f; background: #1e3a5f; }
[data-theme="dark"] .store-name           { color: #f1f5f9; }
[data-theme="dark"] .store-url, [data-theme="dark"] .store-details { color: #94a3b8; }

/* Action cards */
[data-theme="dark"] .action-card          { background: #162231; border-color: #1e3a5f; }
[data-theme="dark"] .action-card:hover    { background: #1e3a5f; border-color: #2d4a6f; }
[data-theme="dark"] .action-card h3       { color: #f9fafb; }
[data-theme="dark"] .action-card p        { color: #9ca3af; }
[data-theme="dark"] .action-card.locked   { border-color: #374151; }
[data-theme="dark"] .action-card.locked:hover { border-color: #f59e0b; }

/* Metric cards */
[data-theme="dark"] .metric-card          { background: #162231; border-color: #1e3a5f; color: #f9fafb; }
[data-theme="dark"] .metric-value         { color: #f9fafb; }

/* Analysis pages */
[data-theme="dark"] .analysis-header      { color: #f9fafb; }
[data-theme="dark"] .analysis-header h2   { color: #f9fafb; }
[data-theme="dark"] .analysis-subtitle    { color: #9ca3af; }
[data-theme="dark"] .stat-card            { background: #162231; }
[data-theme="dark"] .stat-number          { color: #f9fafb; }
[data-theme="dark"] .stat-label           { color: #9ca3af; }
[data-theme="dark"] .stat-value           { color: #f9fafb; }
[data-theme="dark"] .match-results        { background: #162231; }
[data-theme="dark"] .custom-date-dialog   { background: #162231; color: #f9fafb; }
[data-theme="dark"] .custom-date-header h3 { color: #f9fafb; }
[data-theme="dark"] .custom-date-field input { background: #1e3a5f; border-color: #2d4a6f; color: #f9fafb; }
[data-theme="dark"] .log-entry            { color: #e5e7eb; border-bottom-color: #1e3a5f; }

/* Status badges */
[data-theme="dark"] .status-badge         { color: #f9fafb; }
[data-theme="dark"] .status-badge.missing, [data-theme="dark"] .status-badge.not_in_qbo { background: rgba(239,68,68,0.2); color: #fca5a5; }
[data-theme="dark"] .status-badge.matched { background: rgba(34,197,94,0.2); color: #86efac; }
[data-theme="dark"] .status-badge.mismatch { background: rgba(245,158,11,0.2); color: #fcd34d; }
[data-theme="dark"] .status-active        { background: rgba(5,150,105,0.2); color: #6ee7b7; }
[data-theme="dark"] .status-matched       { background: rgba(5,150,105,0.2) !important; color: #6ee7b7 !important; }

/* Health pages */
[data-theme="dark"] .score-card-main      { background: linear-gradient(135deg, #1e3a5f 0%, #2d4a6f 100%) !important; }
[data-theme="dark"] .score-circle         { background: #162231; }
[data-theme="dark"] .score-number         { color: #f9fafb; }
[data-theme="dark"] .score-label          { color: #e5e7eb; }
[data-theme="dark"] .category-card        { background: #162231; border-color: #1e3a5f; }
[data-theme="dark"] .category-bar         { background: #1e3a5f; }
[data-theme="dark"] .issues-section       { background: #162231; border-color: #1e3a5f; }
[data-theme="dark"] .issues-section h3    { color: #f9fafb; }
[data-theme="dark"] .issue-group          { border-color: #1e3a5f; }
[data-theme="dark"] .issue-group-header   { background: #162231; }
[data-theme="dark"] .issue-group-header:hover { background: #1e3a5f; }
[data-theme="dark"] .issue-group-title    { color: #f9fafb; }
[data-theme="dark"] .issue-group-content  { background: #111827; }
[data-theme="dark"] .issue-card           { border-color: #1e3a5f; }
[data-theme="dark"] .issue-card.medium    { background: rgba(245,158,11,0.1); }
[data-theme="dark"] .issue-card.low       { background: rgba(34,197,94,0.1); }
[data-theme="dark"] .issue-title          { color: #f9fafb; }
[data-theme="dark"] .issue-description    { color: #9ca3af; }

/* Account pages */
[data-theme="dark"] .account-page         { background: transparent; }
[data-theme="dark"] .account-header h1    { color: #f9fafb; }
[data-theme="dark"] .account-subtitle     { color: #9ca3af; }
[data-theme="dark"] .account-section      { background: #162231; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
[data-theme="dark"] .account-section h2   { color: #f9fafb; }
[data-theme="dark"] .section-desc         { color: #9ca3af; }
[data-theme="dark"] .account-card         { background: #1e293b; border-color: #334155; color: #f9fafb; }
[data-theme="dark"] .account-card:hover   { border-color: #3b82f6; }
[data-theme="dark"] .card-icon            { color: #9ca3af; }
[data-theme="dark"] .account-card:hover .card-icon { color: #3b82f6; }
[data-theme="dark"] .platform-item        { background: #1e293b; }
[data-theme="dark"] .platform-name        { color: #f9fafb; }
[data-theme="dark"] .platform-status      { color: #9ca3af; }
[data-theme="dark"] .quick-actions-card, [data-theme="dark"] .back-card { background: #162231; }
[data-theme="dark"] .quick-actions-card h3, [data-theme="dark"] .back-card h3 { color: #f9fafb; }
[data-theme="dark"] .quick-action         { color: #f9fafb; border-bottom-color: #334155; }
[data-theme="dark"] .quick-action:hover   { color: #3b82f6; }
[data-theme="dark"] .quick-action .arrow  { color: #64748b; }
[data-theme="dark"] .plan-card            { background: #162231; }
[data-theme="dark"] .plan-header          { background: linear-gradient(135deg, #1e3a5f 0%, #2d4a6f 100%); }
[data-theme="dark"] .plan-label           { color: #9ca3af; }
[data-theme="dark"] .plan-value           { color: #f9fafb; }
[data-theme="dark"] .action-link          { background: #1e293b; color: #f9fafb; }
[data-theme="dark"] .action-link:hover    { background: #1e3a5f; color: #60a5fa; }
[data-theme="dark"] .back-link            { color: #94a3b8; }
[data-theme="dark"] .back-link:hover      { color: #60a5fa; }
[data-theme="dark"] .info-card            { background: rgba(30,58,95,0.5); border-color: #2d4a6f; }
[data-theme="dark"] .logo-preview-container { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .logo-placeholder     { color: #64748b; }

/* Billing */
[data-theme="dark"] .billing-page         { background: #0f172a; color: #e2e8f0; }
[data-theme="dark"] .billing-topbar       { background: #1e293b; border-bottom-color: #334155; }
[data-theme="dark"] .billing-title        { color: #f1f5f9; }
[data-theme="dark"] .current-plan         { color: #2dd4bf; }
[data-theme="dark"] .toggle-label         { color: #94a3b8; }
[data-theme="dark"] .toggle-label.active  { color: #f1f5f9; }
[data-theme="dark"] .toggle-switch        { background: #475569; }
[data-theme="dark"] .toggle-switch.annual { background: #14b8a6; }
[data-theme="dark"] .plan                 { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .plan h3              { color: #f1f5f9; }
[data-theme="dark"] .price-amount         { color: #2dd4bf; }
[data-theme="dark"] .price-period         { color: #94a3b8; }
[data-theme="dark"] .plan li              { color: #cbd5e1; }
[data-theme="dark"] .plan ul              { background: #1e293b; border-color: #475569; }
[data-theme="dark"] .plan .button         { background: #334155; }
[data-theme="dark"] .plan .button:hover   { background: #475569; }
[data-theme="dark"] .plan-popular         { border-color: #14b8a6; }
[data-theme="dark"] .plan-popular::before { background: #14b8a6; color: #0f172a; }
[data-theme="dark"] .plan-popular .button { background: #14b8a6; color: #0f172a; }
[data-theme="dark"] .btn-free             { background: #14b8a6 !important; color: #0f172a !important; }
[data-theme="dark"] .btn-free:hover       { background: #2dd4bf !important; }

/* Section titles */
[data-theme="dark"] .section-title        { color: #f9fafb; }
[data-theme="dark"] section h2            { color: #f9fafb; }
[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3 { color: #f9fafb; }
[data-theme="dark"] h4                    { color: #9ca3af; }
[data-theme="dark"] p, [data-theme="dark"] span { color: #e5e7eb; }
[data-theme="dark"] .text-muted           { color: #9ca3af; }

/* Scrollbar */
[data-theme="dark"] ::-webkit-scrollbar        { background: #162231; }
[data-theme="dark"] ::-webkit-scrollbar-thumb  { background: #2d4a6f; border-radius: 4px; }
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: #6b7280; }

/* Checkbox */
[data-theme="dark"] input[type="checkbox"] { accent-color: #3b82f6; }

/* Settings */
[data-theme="dark"] .settings-section     { background: #162231; border-color: #1e3a5f; }
[data-theme="dark"] .settings-section h2, [data-theme="dark"] .settings-section h3 { color: #f9fafb; }

/* Summary */
[data-theme="dark"] .summary-label        { color: #9ca3af; }
[data-theme="dark"] .summary-value        { color: #f9fafb; }
[data-theme="dark"] .summary-row          { border-bottom-color: #1e3a5f; }

/* ============================================================================
   Responsive
   ============================================================================ */

@media (max-width: 768px) {
  .hero h1     { font-size: 32px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .landing-footer .container { flex-direction: column; gap: 20px; text-align: center; }
  .sidebar     { width: 200px; min-width: 200px; }
  .sidebar-layout .main-content { margin-left: 200px; padding: 0 16px 40px; }
}

@media (max-width: 1300px) {
  .pricing-container { flex-wrap: wrap; }
  .plan { width: 200px; }
}

/* ============================================================================
   40. TheReconciliator — Dark Landing Page (index-thereconciliator.pug)
   ============================================================================ */

/* Hide the layout's top-header on the TR landing page */
body:has(.tr-landing-page) .top-header { display: none !important; }

/* Reset page-wrapper and body constraints for the dark landing page */
body:has(.tr-landing-page),
body:has(.tr-landing-page) .page-wrapper,
body:has(.tr-landing-page) .page-wrapper > * {
  background: #090d13 !important;
}
body:has(.tr-landing-page) .page-wrapper {
  height: auto !important;
  overflow: visible !important;
  padding-top: 0 !important;
  min-height: 100vh;
}
/* Fix section title color being washed out by global h2 overrides */
body:has(.tr-landing-page) .section-title { color: var(--text-hi, #e8edf3) !important; }
body:has(.tr-landing-page) .section-sub   { color: var(--text-mid, #8a99ad) !important; }

/* Override §20 unscoped rules bleeding into tr-landing-page */
body:has(.tr-landing-page) .features     { background: #090d13 !important; }
body:has(.tr-landing-page) .how-it-works { background: #090d13 !important; }
body:has(.tr-landing-page) .features h2,
body:has(.tr-landing-page) .how-it-works h2 { color: #e8edf3 !important; }
body:has(.tr-landing-page) .cta .btn-primary { background: #22a559 !important; color: #fff !important; }
body:has(.tr-landing-page) .cta .btn-primary:hover { background: #1a7d44 !important; }

.tr-landing-page {
  --bg-base:    #090d13;
  --bg-card:    #0f1621;
  --bg-card2:   #131c2a;
  --border:     #1e2d42;
  --green:      #22a559;
  --green-dim:  #1a7d44;
  --green-glow: rgba(34,165,89,0.18);
  --text-hi:    #e8edf3;
  --text-mid:   #8a99ad;
  --text-lo:    #4a5568;
  --navy:       #1e3a5f;
  --font-head:  'Syne', sans-serif;
  --font-body:  'DM Sans', sans-serif;
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-hi);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Noise texture overlay */
.tr-landing-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

.tr-landing-page .container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Header */
.tr-landing-page .landing-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(9,13,19,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.tr-landing-page .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-hi);
  text-decoration: none;
}

.tr-landing-page .logo img { height: 48px; border-radius: 6px; }
.tr-landing-page .logo-dot { color: var(--green); }

.tr-landing-page .landing-nav { display: flex; gap: 8px; align-items: center; }
.tr-landing-page .landing-nav a {
  color: var(--text-mid);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 6px;
  transition: color 0.2s;
}
.tr-landing-page .landing-nav a:hover { color: var(--text-hi); }

.tr-landing-page .btn-nav-cta {
  background: var(--green) !important;
  color: #fff !important;
  padding: 8px 18px !important;
  border-radius: 6px !important;
  font-size: 14px !important;
  transition: background 0.2s !important;
}
.tr-landing-page .btn-nav-cta:hover { background: var(--green-dim) !important; }

/* Hero */
.tr-landing-page .hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
}

.tr-landing-page .hero::after {
  content: '';
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(34,165,89,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.tr-landing-page .hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(30,45,66,0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30,45,66,0.4) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 30%, transparent 100%);
}

.tr-landing-page .hero .container { text-align: center; max-width: 860px; margin: 0 auto; }

.tr-landing-page .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(34,165,89,0.1);
  border: 1px solid rgba(34,165,89,0.3);
  color: var(--green);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 32px;
  letter-spacing: 0.02em;
}

.tr-landing-page .hero h1 {
  font-family: var(--font-head);
  font-size: clamp(42px, 7vw, 80px);
  font-weight: 800;
  line-height: 1.05;
  color: var(--text-hi);
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.tr-landing-page .hero h1 span {
  background: linear-gradient(135deg, #22a559, #4ade80);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tr-landing-page .hero-subtitle {
  font-size: 18px;
  color: var(--text-mid);
  max-width: 620px;
  margin: 0 auto 48px;
  line-height: 1.7;
}

.tr-landing-page .hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.tr-landing-page .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 0 0 0 var(--green-glow);
}
.tr-landing-page .btn-primary:hover {
  background: var(--green-dim);
  transform: translateY(-1px);
  box-shadow: 0 8px 30px var(--green-glow);
}

.tr-landing-page .btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-mid);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, transform 0.15s;
}
.tr-landing-page .btn-outline:hover {
  border-color: var(--green);
  color: var(--green);
  transform: translateY(-1px);
}

.tr-landing-page .hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 72px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.tr-landing-page .stat-item { text-align: center; }
.tr-landing-page .stat-value {
  font-family: var(--font-head);
  font-size: 32px;
  font-weight: 800;
  color: var(--text-hi);
}
.tr-landing-page .stat-label { font-size: 13px; color: var(--text-mid); margin-top: 4px; }
.tr-landing-page .stat-green { color: var(--green); }

/* Features */
.tr-landing-page .features { padding: 120px 0; position: relative; }

.tr-landing-page .section-label {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 16px;
}

.tr-landing-page .section-title {
  text-align: center;
  font-family: var(--font-head);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  color: var(--text-hi);
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.tr-landing-page .section-sub {
  text-align: center;
  font-size: 16px;
  color: var(--text-mid);
  max-width: 500px;
  margin: 0 auto 64px;
  line-height: 1.6;
}

.tr-landing-page .features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.tr-landing-page .feature-card { background: var(--bg-card); padding: 36px 32px; transition: background 0.2s; }
.tr-landing-page .feature-card:hover { background: var(--bg-card2); }

.tr-landing-page .feature-icon { font-size: 28px; margin-bottom: 16px; display: block; }

.tr-landing-page .feature-card h3 {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-hi);
  margin-bottom: 10px;
}

.tr-landing-page .feature-card p { font-size: 14px; color: var(--text-mid); line-height: 1.65; }

/* How It Works */
.tr-landing-page .how-it-works { padding: 120px 0; border-top: 1px solid var(--border); }

.tr-landing-page .steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 64px;
  position: relative;
}

.tr-landing-page .steps-grid::before {
  content: '';
  position: absolute;
  top: 28px;
  left: 12.5%;
  right: 12.5%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--green) 20%, var(--green) 80%, transparent);
  opacity: 0.4;
}

.tr-landing-page .step { text-align: center; padding: 0 20px; }

.tr-landing-page .step-number {
  width: 56px;
  height: 56px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 800;
  margin: 0 auto 24px;
  position: relative;
  z-index: 1;
}

.tr-landing-page .step h3 {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-hi);
  margin-bottom: 10px;
}

.tr-landing-page .step p { font-size: 13px; color: var(--text-mid); line-height: 1.6; }

/* CTA */
.tr-landing-page .cta {
  padding: 120px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.tr-landing-page .cta::before {
  content: '';
  position: absolute;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(34,165,89,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.tr-landing-page .cta h2 {
  font-family: var(--font-head);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  color: var(--text-hi);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.tr-landing-page .cta p { font-size: 17px; color: var(--text-mid); margin-bottom: 40px; }

/* Footer */
.tr-landing-page .landing-footer { padding: 32px 0; border-top: 1px solid var(--border); }
.tr-landing-page .landing-footer .container { display: flex; justify-content: space-between; align-items: center; }
.tr-landing-page .landing-footer p { font-size: 13px; color: var(--text-lo); }
.tr-landing-page .footer-nav { display: flex; gap: 24px; }
.tr-landing-page .footer-nav a { font-size: 13px; color: var(--text-lo); text-decoration: none; transition: color 0.2s; }
.tr-landing-page .footer-nav a:hover { color: var(--text-mid); }

/* Responsive */
@media (max-width: 900px) {
  .tr-landing-page .features-grid { grid-template-columns: repeat(2, 1fr); }
  .tr-landing-page .steps-grid { grid-template-columns: repeat(2, 1fr); gap: 40px; }
  .tr-landing-page .steps-grid::before { display: none; }
  .tr-landing-page .hero-stats { gap: 32px; }
}

@media (max-width: 600px) {
  .tr-landing-page .features-grid { grid-template-columns: 1fr; }
  .tr-landing-page .steps-grid { grid-template-columns: 1fr; }
  .tr-landing-page .hero-stats { flex-direction: column; gap: 24px; }
  .tr-landing-page .landing-footer .container { flex-direction: column; gap: 16px; text-align: center; }
  .tr-landing-page .landing-nav a:not(.btn-nav-cta) { display: none; }
}

/* ============================================================================
   41. TheReconciliator Auth Pages — Dark Native (login/signup-thereconciliator)
   ============================================================================ */

/* These pages render dark by default (no theme toggle needed) */
.tr-auth-page .auth-page {
  background: linear-gradient(135deg, #0d1520 0%, #162231 100%);
}

.tr-auth-page .auth-box {
  background: #1e293b;
  border: 1px solid #1e3a5f;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.tr-auth-page .auth-header h1 { color: #f9fafb; }

.tr-auth-page .logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 700;
  color: #22a559;
  text-decoration: none;
  margin-bottom: 24px;
}

.tr-auth-page .logo img { height: 40px; border-radius: 8px; }

.tr-auth-page .form-group label { color: #9ca3af; }

.tr-auth-page .form-group input {
  border: 2px solid #1e3a5f;
  background: #0d1520;
  color: #f9fafb;
}

.tr-auth-page .form-group input::placeholder { color: #6b7280; }
.tr-auth-page .form-group input:focus { border-color: #22a559; }

.tr-auth-page .btn-primary { background: #22a559; color: white; }
.tr-auth-page .btn-primary:hover { background: #1e9050; }

.tr-auth-page .auth-links { color: #6b7280; }
.tr-auth-page .auth-links a { color: #22a559; }

.tr-auth-page .error-message {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.tr-auth-page .alert-success,
.tr-auth-page .success-message {
  background: rgba(34, 165, 89, 0.1);
  border: 1px solid rgba(34, 165, 89, 0.3);
  color: #6ee7b7;
}

.tr-auth-page .back-home { display: block; color: #6b7280; text-decoration: none; font-size: 13px; margin-bottom: 16px; }
.tr-auth-page .back-home:hover { color: #9ca3af; }

/* ============================================================================
   42. TheReconciliator Dashboard — Dark Sidebar Layout
        (dashboard-thereconciliator.pug)
   ============================================================================ */

/* Account bar at top of dark dashboard pages */
.dashboard .account-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  margin-bottom: 24px;
}

.dashboard .header-left h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: #f9fafb;
}

.dashboard .header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Connection Cards — dark sidebar variant */
.dashboard .connection-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.dashboard .connection-card {
  background: #162231;
  border: 1px solid #1e3a5f;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.dashboard .connection-icon {
  font-size: 40px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 12px;
}

.dashboard .connection-info { flex: 1; }

.dashboard .connection-info h3 {
  font-size: 16px;
  font-weight: 600;
  color: #f9fafb;
  margin: 0 0 4px;
}

.dashboard .connection-name { font-size: 14px; color: #9ca3af; margin: 0 0 8px; }

.dashboard .connection-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
}

.dashboard .connection-badge.connected { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; }
.dashboard .connection-badge.disconnected { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }
.qbo-connect-btn { height: 32px; width: auto; display: block; }
.qbo-connect-btn:hover { content: url('/images/qbo/Connect_to_QuickBooks_SVG/C2QB_green_btn_med_hover.svg'); }
.env-badge { font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; letter-spacing: 0.5px; margin-left: 8px; vertical-align: middle; }
.env-sandbox { background: rgba(234, 179, 8, 0.2); color: #ca8a04; border: 1px solid rgba(234,179,8,0.3); }
.env-production { background: rgba(16, 185, 129, 0.2); color: #059669; border: 1px solid rgba(16,185,129,0.3); }
.connection-detail { font-size: 12px; color: var(--text-mid, #8a99ad); margin: 2px 0; }
.connection-detail-row { display: flex; gap: 16px; margin-top: 4px; }
.platform-badge { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 4px; background: rgba(99,102,241,0.15); color: #818cf8; border: 1px solid rgba(99,102,241,0.25); margin-left: 6px; }

.dashboard .btn-link {
  color: #3b82f6;
  background: transparent;
  border: none;
  cursor: pointer;
  font-weight: 600;
}
.dashboard .btn-link:hover { text-decoration: underline; }

/* Metrics Grid — dark sidebar variant */
.dashboard .metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.dashboard .metric-card {
  background: #162231;
  border: 1px solid #1e3a5f;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.dashboard .metric-icon {
  font-size: 28px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.15);
  border-radius: 10px;
}

.dashboard .metric-content { flex: 1; }

.dashboard .metric-label {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.dashboard .metric-value {
  font-size: 24px;
  font-weight: 700;
  color: #f9fafb;
  line-height: 1.2;
}

.dashboard .metric-sublabel { font-size: 12px; color: #6b7280; margin-top: 2px; }

/* Quick Actions — dark sidebar variant */
.dashboard .quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.dashboard .quick-action-card {
  background: #162231;
  border: 1px solid #1e3a5f;
  border-radius: 12px;
  padding: 24px;
  text-decoration: none;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
}

.dashboard .quick-action-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.12);
  transform: translateY(-2px);
}

.dashboard .quick-action-card.card-highlight {
  background: linear-gradient(135deg, #1e3a5f 0%, #2d4a6f 100%);
  border-color: #3b82f6;
}

.dashboard .qa-icon { font-size: 36px; margin-bottom: 16px; }

.dashboard .qa-content h3 { font-size: 16px; font-weight: 600; color: #f9fafb; margin: 0 0 6px; }
.dashboard .qa-content p  { font-size: 13px; color: #9ca3af; margin: 0; }

/* Tools Grid — dark sidebar variant */
.dashboard .tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.dashboard .tool-card {
  background: #162231;
  border: 1px solid #1e3a5f;
  border-radius: 12px;
  padding: 20px;
  text-decoration: none;
  transition: all 0.2s;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.dashboard .tool-card:not(.disabled):hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.12);
}

.dashboard .tool-card.disabled { opacity: 0.6; cursor: not-allowed; }

.dashboard .tool-icon { font-size: 32px; }

.dashboard .tool-content h3 { font-size: 15px; font-weight: 600; color: #f9fafb; margin: 0 0 4px; }
.dashboard .tool-content p  { font-size: 13px; color: #9ca3af; margin: 0; }

.dashboard .tool-content .coming-soon {
  display: inline-block;
  margin-top: 8px;
  font-size: 10px;
  background: #1e3a5f;
  padding: 3px 8px;
  border-radius: 4px;
  color: #9ca3af;
  text-transform: uppercase;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 1200px) {
  .dashboard .metrics-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .dashboard .quick-actions-grid { grid-template-columns: 1fr; }
  .dashboard .metrics-grid       { grid-template-columns: 1fr; }
}

/* ============================================================================
   43. Posting Reports Page (posting-reports.pug)
   ============================================================================ */

.reports-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.reports-header h1 { font-size: 1.6rem; font-weight: 700; margin: 0; }

.date-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.date-controls select,
.date-controls input { padding: 6px 10px; border-radius: 6px; border: 1px solid var(--border-color, #333); background: var(--card-bg, #1e293b); color: var(--text-color, #e2e8f0); font-size: 0.85rem; }
.date-controls button { padding: 6px 16px; border-radius: 6px; border: none; background: #3b82f6; color: #fff; cursor: pointer; font-size: 0.85rem; font-weight: 600; }
.date-controls button:hover { background: #2563eb; }

.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--card-bg, #1e293b); border: 1px solid var(--border-color, #334155); border-radius: 10px; padding: 20px; text-align: center; }
.stat-card .stat-value { font-size: 2rem; font-weight: 700; line-height: 1.1; }
.stat-card .stat-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.65; margin-top: 6px; }
.stat-card.posted   .stat-value { color: #22c55e; }
.stat-card.skipped  .stat-value { color: #f59e0b; }
.stat-card.failed   .stat-value { color: #ef4444; }
.stat-card.batches  .stat-value { color: #3b82f6; }
.stat-card.rate     .stat-value { color: #a78bfa; }

.chart-section { background: var(--card-bg, #1e293b); border: 1px solid var(--border-color, #334155); border-radius: 10px; padding: 20px; margin-bottom: 24px; }
.chart-section h3 { margin: 0 0 16px 0; font-size: 1rem; font-weight: 600; }
.chart-controls { display: flex; gap: 8px; margin-bottom: 12px; }
.chart-controls button { padding: 4px 12px; border-radius: 4px; border: 1px solid var(--border-color, #334155); background: transparent; color: var(--text-color, #e2e8f0); cursor: pointer; font-size: 0.8rem; }
.chart-controls button.active { background: #3b82f6; border-color: #3b82f6; color: #fff; }
.chart-canvas-wrapper { position: relative; height: 280px; }

.data-section { background: var(--card-bg, #1e293b); border: 1px solid var(--border-color, #334155); border-radius: 10px; padding: 20px; margin-bottom: 24px; }
.data-section h3 { margin: 0 0 16px 0; font-size: 1rem; font-weight: 600; }
.data-section .data-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.data-section .data-table th { text-align: left; padding: 8px 12px; border-bottom: 2px solid var(--border-color, #334155); font-weight: 600; opacity: 0.7; font-size: 0.75rem; text-transform: uppercase; }
.data-section .data-table td { padding: 8px 12px; border-bottom: 1px solid var(--border-color, #1e293b); }
.data-section .data-table tr:hover { background: rgba(255,255,255,0.03); }

.error-text { color: #fca5a5; font-size: 0.8rem; max-width: 400px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: help; }
.error-text:hover { white-space: normal; }

.batch-bar { display: flex; height: 18px; border-radius: 4px; overflow: hidden; margin: 4px 0; }
.batch-bar .bar-posted  { background: #22c55e; }
.batch-bar .bar-skipped { background: #f59e0b; }
.batch-bar .bar-failed  { background: #ef4444; }

.pagination-row { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.pagination-row button { padding: 4px 10px; border-radius: 4px; border: 1px solid var(--border-color, #334155); background: transparent; color: var(--text-color, #e2e8f0); cursor: pointer; font-size: 0.8rem; }
.pagination-row button.active { background: #3b82f6; border-color: #3b82f6; }
.pagination-row button:disabled { opacity: 0.3; cursor: default; }

.empty-state   { text-align: center; padding: 60px 20px; opacity: 0.5; }
.loading-state { text-align: center; padding: 40px; opacity: 0.5; }

.batch-link { color: #60a5fa; text-decoration: none; cursor: pointer; }
.batch-link:hover { color: #93c5fd; text-decoration: underline; }

.batch-modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.6); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.batch-modal-dialog { background: var(--card-bg, #1e293b); border: 1px solid var(--border-color, #334155); border-radius: 12px; width: 90%; max-width: 800px; max-height: 80vh; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,0.4); }
.batch-modal-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border-color, #334155); }
.batch-modal-header h3 { margin: 0; font-size: 1rem; font-weight: 600; }
.batch-modal-close { background: none; border: none; color: var(--text-color, #e2e8f0); font-size: 1.4rem; cursor: pointer; padding: 0 4px; opacity: 0.6; }
.batch-modal-close:hover { opacity: 1; }
.batch-modal-body { padding: 16px 20px; overflow-y: auto; flex: 1; }

.batch-summary { display: flex; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.batch-stat { font-size: 0.85rem; font-weight: 600; padding: 4px 12px; border-radius: 6px; background: rgba(255,255,255,0.05); }
.batch-stat.posted  { color: #22c55e; }
.batch-stat.skipped { color: #f59e0b; }
.batch-stat.failed  { color: #ef4444; }

.fo-dialog { max-width: 900px; }
.fo-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border-color, #334155); margin-bottom: 16px; }
.fo-tab { background: none; border: none; color: var(--text-color, #94a3b8); padding: 10px 20px; cursor: pointer; font-size: 0.85rem; font-weight: 600; border-bottom: 2px solid transparent; transition: all 0.15s; }
.fo-tab:hover { color: #e2e8f0; }
.fo-tab.active { color: #60a5fa; border-bottom-color: #3b82f6; }
.fo-panel { display: none; }
.fo-panel.active { display: block; }

.mock-receipt { background: rgba(255,255,255,0.03); border: 1px solid var(--border-color, #334155); border-radius: 8px; padding: 16px; }
.mr-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border-color, #334155); }
.mr-type { font-size: 1.1rem; font-weight: 700; color: #60a5fa; }
.mr-doc  { font-size: 0.9rem; opacity: 0.7; }
.mr-meta { display: flex; gap: 20px; margin-bottom: 16px; font-size: 0.8rem; opacity: 0.65; flex-wrap: wrap; }

.fo-detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.fo-field  { background: rgba(255,255,255,0.03); border-radius: 6px; padding: 10px 14px; }
.fo-label  { display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.5; margin-bottom: 4px; }
.fo-value  { font-size: 0.9rem; font-weight: 500; }
.fo-source { text-transform: uppercase; font-size: 0.75rem; padding: 2px 8px; border-radius: 4px; background: rgba(96,165,250,0.15); color: #60a5fa; }

.fo-error-box   { background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.2); border-radius: 8px; padding: 20px; }
.fo-error-title { font-size: 1.1rem; font-weight: 700; color: #ef4444; margin-bottom: 8px; }
.fo-error-msg   { font-family: monospace; font-size: 0.8rem; color: #fca5a5; padding: 8px 12px; background: rgba(0,0,0,0.2); border-radius: 4px; margin-bottom: 12px; word-break: break-word; }
.fo-error-explain { font-size: 0.85rem; line-height: 1.6; margin-bottom: 16px; opacity: 0.85; }
.fo-fix-title   { font-weight: 700; margin-bottom: 8px; color: #22c55e; }
.fo-fix-steps   { margin: 0; padding-left: 20px; font-size: 0.85rem; line-height: 2; }
.fo-fix-steps li { opacity: 0.85; }

/* ── §44 TR Dashboard – Onboarding Hero & Platform Cards ──────────────────── */

/* Onboarding hero banner */
.onboarding-hero {
  background: linear-gradient(135deg, #3b5bdb 0%, #7048e8 60%, #9c36b5 100%);
  border-radius: 16px;
  padding: 48px 32px;
  text-align: center;
  margin-bottom: 8px;
}
.onboarding-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 12px 0;
}
.onboarding-rocket {
  font-size: 3.5rem;
  margin: 16px 0;
  display: block;
  animation: floatRocket 3s ease-in-out infinite;
}
@keyframes floatRocket {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}
.onboarding-subtitle {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 12px 0;
}
.onboarding-desc {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.82);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Section sub-heading */
.section-sub {
  font-size: 0.875rem;
  color: var(--text-mid, #8a99ad);
  margin: 4px 0 0 0;
}

/* Platform selection cards */
.platform-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.platform-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--card-bg, #1e293b);
  border: 1px solid var(--border-color, #334155);
  border-radius: 12px;
  padding: 20px 24px;
  text-decoration: none;
  color: var(--text-main, #e2e8f0);
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  cursor: pointer;
}
.platform-card:hover {
  border-color: #6366f1;
  background: rgba(99,102,241,0.08);
  transform: translateY(-2px);
}
.platform-card.platform-card-soon {
  opacity: 0.5;
  cursor: not-allowed;
}
.platform-card.platform-card-soon:hover {
  transform: none;
  border-color: var(--border-color, #334155);
  background: var(--card-bg, #1e293b);
}
.platform-card-logo {
  font-size: 2rem;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
}
.platform-card-info {
  flex: 1;
}
.platform-card-info h4 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 4px 0;
  color: var(--text-main, #e2e8f0);
}
.platform-card-info p {
  font-size: 0.8rem;
  color: var(--text-mid, #8a99ad);
  margin: 0;
}
.platform-card-arrow {
  font-size: 1.2rem;
  color: var(--text-mid, #8a99ad);
  flex-shrink: 0;
}
.platform-badge-soon {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(148,163,184,0.15);
  color: #94a3b8;
  border: 1px solid rgba(148,163,184,0.25);
  flex-shrink: 0;
}

/* ── Connect Store Hero ─────────────────────────────────────────── */
.connect-hero {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 60%, #a855f7 100%);
  border-radius: 16px;
  padding: 4px;
  margin-bottom: 8px;
}
.connect-hero-inner {
  border-radius: 13px;
  padding: 48px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.connect-hero-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  letter-spacing: -0.5px;
}
.connect-hero-icon {
  font-size: 3rem;
  margin: 8px 0;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}
.connect-hero-subtitle {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}
.connect-hero-desc {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.8);
  margin: 4px 0 0 0;
  max-width: 480px;
  line-height: 1.6;
}
.platform-card-logo img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.platform-card-emoji {
  font-size: 1.8rem;
  line-height: 1;
}