/* ═══════════════════════════════════════════
   Bizovate Expense Tracker — Main Stylesheet
   ═══════════════════════════════════════════ */

/* ─── Google Font ────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ─── CSS Variables (Light Mode) ─────────── */
:root {
  --bg:           #f0f4ff;
  --surface:      #ffffff;
  --surface2:     #f8faff;
  --border:       #e4e8f5;
  --text:         #0d1117;
  --text-muted:   #6b7698;
  --primary:      #6366f1;
  --primary-dark: #4f46e5;
  --primary-glow: rgba(99,102,241,.18);
  --secondary:    #3b82f6;
  --success:      #10b981;
  --warning:      #f59e0b;
  --danger:       #ef4444;
  --radius-sm:    6px;
  --radius-md:    10px;
  --radius-lg:    16px;
  --radius-xl:    22px;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.07);
  --shadow-md:    0 4px 16px rgba(99,102,241,.10);
  --shadow-lg:    0 12px 40px rgba(99,102,241,.18);
  --transition:   .2s ease;
}

/* ─── Dark Mode ──────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:         #0b0e1a;
    --surface:    #141829;
    --surface2:   #1a1f35;
    --border:     #252b45;
    --text:       #e8ecff;
    --text-muted: #7a82a8;
    --primary-glow: rgba(99,102,241,.25);
    --shadow-sm:  0 1px 3px rgba(0,0,0,.4);
    --shadow-md:  0 4px 16px rgba(0,0,0,.4);
    --shadow-lg:  0 12px 40px rgba(0,0,0,.5);
  }
}

/* ─── Reset ──────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
ul { list-style: none; }
img { max-width: 100%; }

/* ─── Gradient Text ──────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, var(--primary), #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── App Layout & Vertical Sidebar ───────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.mobile-topbar {
  display: none;
  height: 60px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 18px;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 300;
  box-shadow: var(--shadow-sm);
}

.mobile-toggle {
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--text);
  cursor: pointer;
}

/* Left Vertical Sidebar */
.app-sidebar {
  width: 260px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 250;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition);
}

.sidebar-header {
  height: 70px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary) !important;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-logo i { color: #a855f7; }

.sidebar-nav {
  flex: 1;
  padding: 20px 14px;
  overflow-y: auto;
}

.nav-section-title {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  padding: 8px 12px 6px;
}

.sidebar-nav ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-weight: 600;
  font-size: .9rem;
  transition: all var(--transition);
  text-decoration: none;
}

.sidebar-nav li a i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
  color: var(--text-muted);
  transition: color var(--transition);
}

.sidebar-nav li a:hover {
  background: var(--surface2);
  color: var(--text);
}

.sidebar-nav li a:hover i {
  color: var(--primary);
}

.sidebar-nav li a.active {
  background: linear-gradient(135deg, rgba(99,102,241,.12), rgba(168,85,247,.12));
  color: var(--primary);
  border: 1px solid rgba(99,102,241,.2);
}

.sidebar-nav li a.active i {
  color: var(--primary);
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
}
.sidebar-user i { color: var(--primary); font-size: 1.1rem; }
.user-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.btn-logout {
  padding: 6px 12px;
  font-size: .8rem;
  white-space: nowrap;
}

/* Main Content Wrapper (Shifted right of sidebar) */
.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 32px 32px 60px;
  min-height: 100vh;
  width: calc(100% - 260px);
}

/* Filtered Summary Card on Expenses Page */
.filtered-summary-card {
  background: linear-gradient(135deg, var(--surface) 0%, rgba(99,102,241,.06) 100%);
  border: 1px solid rgba(99,102,241,.2);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

.fsc-info .fsc-label {
  display: block;
  font-size: .78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.fsc-info .fsc-amount {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
}

.fsc-badge {
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text);
}

.filter-label {
  display: block;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

/* Navbar for public pages */
.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 200;
}
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary) !important;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.logo i { color: #a855f7; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav-links li a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 500;
  font-size: .88rem;
  transition: all var(--transition);
}
.nav-links li a:hover, .nav-links li a.active {
  background: var(--primary-glow);
  color: var(--primary);
}

/* Mobile Sidebar Responsiveness */
@media (max-width: 900px) {
  .mobile-topbar { display: flex; }
  .app-sidebar {
    transform: translateX(-100%);
  }
  .app-sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
    width: 100%;
    padding: 20px 16px 40px;
  }
}


/* ─── Buttons ────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: .88rem;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: #fff;
  box-shadow: 0 4px 14px rgba(99,102,241,.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(99,102,241,.45); color: #fff; }
.btn-ghost  { background: var(--surface2); color: var(--text-muted); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary-glow); }
.btn-google { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
.btn-google:hover { border-color: #db4437; }
.btn-google .fa-google { color: #db4437; }
.btn-outline-sm { padding: 5px 14px; font-size: .82rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); color: var(--text-muted); transition: all var(--transition); }
.btn-outline-sm:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary-sm { padding: 5px 14px; font-size: .82rem; background: linear-gradient(135deg,var(--primary),#7c3aed); color:#fff; border-radius:var(--radius-sm); }
.btn-block { width: 100%; justify-content: center; }
.btn-lg { padding: 13px 28px; font-size: 1rem; }

/* ─── Submit Loading / Duplicate-Submit Guard ─────────────────────────────── */
.btn--loading,
button[disabled] {
  opacity: .65;
  cursor: not-allowed !important;
  pointer-events: none;
  transform: none !important;
  box-shadow: none !important;
}
.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .65s linear infinite;
  vertical-align: middle;
  flex-shrink: 0;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}


/* ─── Icon Buttons ───────────────────────── */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--surface2);
  color: var(--text-muted);
  font-size: .8rem;
  transition: all var(--transition);
  border: 1px solid var(--border);
}
.icon-btn:hover { background: var(--primary-glow); color: var(--primary); }
.icon-btn.danger:hover { background: rgba(239,68,68,.12); color: var(--danger); border-color: var(--danger); }

/* ─── Main Wrap ──────────────────────────── */
.main-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 60px;
  width: 100%;
  flex: 1;
}

/* ─── Page Header ────────────────────────── */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}
.page-header h1 { font-size: 1.8rem; font-weight: 800; }
.page-sub { color: var(--text-muted); font-size: .9rem; margin-top: 4px; }

/* ─── Cards ──────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.card-head h3 { font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-head h3 i { color: var(--primary); }
.link-sm { font-size: .82rem; color: var(--primary); }

/* ─── Stats Grid ─────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  text-decoration: none;
  color: var(--text);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-card--link {
  cursor: pointer;
  position: relative;
}
.stat-card--link:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  color: var(--text);
}
.stat-card--link:hover .sc-arrow { opacity: 1; transform: translateX(0); }
.sc-arrow {
  margin-left: auto;
  color: var(--primary);
  font-size: .85rem;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity var(--transition), transform var(--transition);
  flex-shrink: 0;
}
.sc-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.sc-info span { font-size: .78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.sc-info strong { display: block; font-size: 1.45rem; font-weight: 800; margin-top: 2px; }

/* ─── Dash Grid ────────────────── */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }

/* ─── By Category Period Picker ───── */
.cat-period-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
  max-width: 55%;
}
.form-control--sm {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: var(--surface2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 10px center;
  padding: 5px 32px 5px 12px !important;
  font-size: .83rem !important;
  font-weight: 600 !important;
  border-radius: var(--radius-md) !important;
  border: 1.5px solid var(--border) !important;
  color: var(--text) !important;
  cursor: pointer;
  transition: all var(--transition);
  height: 36px !important;
  min-width: 140px;
  box-sizing: border-box !important;
  white-space: nowrap;
}
.form-control--sm:hover,
.form-control--sm:focus {
  outline: none;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px var(--primary-glow) !important;
}
.cat-custom-range {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0 4px;
  flex-wrap: wrap;
}
.cat-custom-range .form-control--sm { width: 140px; }
.cat-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}
.empty-msg {
  text-align: center;
  color: var(--text-muted);
  font-size: .88rem;
  padding: 40px 0;
}

/* ─── Chart Container (MUST have fixed height for Chart.js) ─── */
.chart-container {
  position: relative;
  height: 260px;
  width: 100%;
}
.chart-container canvas {
  max-height: 260px;
}
.mt-4 { margin-top: 20px; }
.mb-4 { margin-bottom: 20px; }

/* ─── Table ──────────────────────────────── */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th {
  text-transform: uppercase; font-size: .72rem; letter-spacing: .06em;
  color: var(--text-muted); font-weight: 600; padding: 12px 14px;
  border-bottom: 2px solid var(--border); white-space: nowrap;
}
.table td { padding: 13px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:hover { background: var(--surface2); }
.table tbody tr:last-child td { border-bottom: none; }
.tr { text-align: right; }
.amount { font-weight: 700; color: var(--danger); }
.notes-col {
  color: var(--text-muted);
  max-width: 280px;
  min-width: 160px;
  white-space: normal;      /* allow wrapping */
  word-break: break-word;
  line-height: 1.5;
  font-size: .85rem;
}
.note-text {
  display: block;
}
.note-text[data-tooltip] {
  cursor: help;
  border-bottom: 1px dashed var(--border);
  transition: color var(--transition);
}
.note-text[data-tooltip]:hover { color: var(--text); }

/* ─── Floating Note Tooltip ─────────────────── */
.note-tooltip {
  position: fixed;
  z-index: 9999;
  max-width: 340px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: .82rem;
  line-height: 1.55;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
  white-space: normal;
  word-break: break-word;
  animation: fadeIn .12s ease;
}
@keyframes fadeIn { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:translateY(0); } }

/* ─── Sortable Column Headers ───────────────── */
.sort-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
  transition: color var(--transition);
}
.sort-link:hover { color: var(--primary); }
.sort-icon { display: inline-flex; align-items: center; font-size: .7rem; opacity: .55; }
.sort-active { opacity: 1; color: var(--primary); }
.cat-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; }
.method-badge {
  font-size: .72rem; padding: 3px 9px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 20px; color: var(--text-muted);
}

/* ─── Forms ──────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: .85rem; font-weight: 600; color: var(--text-muted); margin-bottom: 7px; }
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  font-size: .92rem;
  font-family: 'Inter', sans-serif;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.form-control.is-invalid { border-color: var(--danger); }
.form-row { display: flex; gap: 16px; align-items: flex-start; }
.form-row.align-center { align-items: center; flex-wrap: wrap; gap: 16px; }
.flex-1 { flex: 1; }
.flex-2 { flex: 2; }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 8px; }
.form-card-wrap { max-width: 680px; margin: 0 auto; }
.err { display: block; color: var(--danger); font-size: .78rem; margin-top: 5px; }
sup { color: var(--danger); }
.input-icon { position: relative; }
.input-icon .form-control { padding-right: 44px; }
.toggle-pwd { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); cursor: pointer; color: var(--text-muted); font-size: .9rem; }
.checkbox-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: .88rem; }
.remember-row { display: flex; justify-content: space-between; align-items: center; }
.forgot-link { font-size: .82rem; color: var(--primary); }

/* ─── Filter Bar ────────────────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  align-items: center;
}
.filter-group { flex: 1; min-width: 140px; }

/* ─── Pagination ─────────────────────────── */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 24px; }
.page-btn {
  padding: 7px 13px; border-radius: var(--radius-sm);
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text-muted); font-size: .82rem; font-weight: 600;
  transition: all var(--transition);
}
.page-btn:hover, .page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ─── Badges ─────────────────────────────── */
.badge-green { background: rgba(16,185,129,.12); color: var(--success); font-size: .72rem; padding: 3px 9px; border-radius: 20px; font-weight: 600; }
.badge-gray  { background: var(--surface2); color: var(--text-muted); font-size: .72rem; padding: 3px 9px; border-radius: 20px; }

/* ─── Progress Bar ───────────────────────── */
.progress-bar {
  height: 8px;
  background: var(--surface2);
  border-radius: 99px;
  overflow: hidden;
  margin: 8px 0;
}
.progress-fill {
  height: 100%;
  border-radius: 99px;
  transition: width .6s ease;
}
.budget-row { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.budget-row:last-child { border-bottom: none; margin-bottom: 0; }
.brow-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.budget-warn { font-size: .78rem; color: var(--danger); display: flex; align-items: center; gap: 5px; margin-top: 4px; }

/* ─── Empty States ───────────────────────── */
.empty-state { text-align: center; padding: 50px 20px; color: var(--text-muted); }
.empty-state i { margin-bottom: 14px; color: var(--border); }
.empty-msg { text-align: center; padding: 40px; color: var(--text-muted); font-size: .88rem; }

/* ─── Auth ───────────────────────────────── */
.auth-wrap { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 200px); padding: 20px; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 40px; width: 100%; max-width: 440px; box-shadow: var(--shadow-lg); }
.auth-logo { width: 54px; height: 54px; background: linear-gradient(135deg,var(--primary),#7c3aed); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: #fff; margin: 0 auto 20px; }
.auth-card h2 { text-align: center; font-size: 1.5rem; font-weight: 800; margin-bottom: 6px; }
.auth-sub { text-align: center; color: var(--text-muted); font-size: .88rem; margin-bottom: 28px; }
.auth-divider { text-align: center; position: relative; margin: 20px 0; }
.auth-divider::before { content:''; position:absolute; top:50%; left:0; right:0; height:1px; background:var(--border); }
.auth-divider span { background: var(--surface); padding: 0 12px; position: relative; color: var(--text-muted); font-size: .8rem; }
.auth-footer { text-align: center; font-size: .85rem; color: var(--text-muted); margin-top: 20px; }

/* ─── Alert ──────────────────────────────── */
.alert { padding: 12px 16px; border-radius: var(--radius-md); margin-bottom: 20px; font-size: .88rem; }
.alert-danger { background: rgba(239,68,68,.1); color: var(--danger); border: 1px solid rgba(239,68,68,.25); }
.flash-msg { animation: slideDown .3s ease; }
@keyframes slideDown { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }

/* ─── Hero ───────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 70px 0;
  min-height: calc(100vh - 64px - 80px);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary-glow); color: var(--primary);
  padding: 5px 14px; border-radius: 99px; font-size: .78rem; font-weight: 600;
  margin-bottom: 20px;
}
.hero h1 { font-size: 3rem; font-weight: 800; line-height: 1.2; margin-bottom: 18px; }
.hero p { font-size: 1.05rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 32px; max-width: 480px; }
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-visual { display: flex; justify-content: center; }
.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  width: 100%;
  max-width: 360px;
  box-shadow: var(--shadow-lg);
  animation: float 4s ease-in-out infinite;
}
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }
.hc-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; font-size: .82rem; font-weight: 600; }
.hc-amount { font-size: 2rem; font-weight: 800; margin-bottom: 4px; }
.hc-label { font-size: .78rem; color: var(--text-muted); margin-bottom: 24px; }
.hc-bars { display: flex; gap: 12px; align-items: flex-end; height: 80px; }
.hc-bar {
  flex: 1;
  height: var(--h);
  background: var(--c);
  border-radius: 4px 4px 0 0;
  position: relative;
  opacity: .85;
  transition: opacity .2s;
}
.hc-bar:hover { opacity: 1; }

/* ─── Features ───────────────────────────── */
.features { padding: 80px 0; }
.section-head { text-align: center; margin-bottom: 52px; }
.section-head h2 { font-size: 2.2rem; font-weight: 800; margin-bottom: 12px; }
.section-head p { color: var(--text-muted); font-size: 1rem; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.feature-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.fc-icon { width: 48px; height: 48px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; margin-bottom: 16px; }
.feature-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: .85rem; color: var(--text-muted); line-height: 1.6; }

/* ─── Pricing ────────────────────────────── */
.pricing-wrap { max-width: 1100px; margin: 0 auto; padding: 60px 0; }
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: start; margin-bottom: 60px; }
.pricing-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 32px; position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
}
.pricing-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.pricing-card.featured { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary), var(--shadow-lg); }
.pc-badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg,var(--primary),#7c3aed); color: #fff;
  padding: 4px 18px; border-radius: 99px; font-size: .75rem; font-weight: 700; white-space: nowrap;
}
.pc-top { text-align: center; margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.pc-top h2 { font-size: 1.2rem; font-weight: 800; margin-bottom: 8px; }
.pc-price { font-size: 2.4rem; font-weight: 800; color: var(--primary); margin-bottom: 6px; }
.pc-price span { font-size: .9rem; font-weight: 500; color: var(--text-muted); }
.pc-top p { font-size: .82rem; color: var(--text-muted); }
.pc-features { margin-bottom: 28px; display: flex; flex-direction: column; gap: 12px; }
.pc-features li { display: flex; align-items: center; gap: 10px; font-size: .88rem; }
.pc-features li i.fa-check { color: var(--success); }
.pc-features li i.fa-xmark { color: var(--border); }
.pc-features li.disabled { color: var(--text-muted); }

/* ─── FAQ ────────────────────────────────── */
.pricing-faq { text-align: center; }
.pricing-faq h2 { font-size: 1.7rem; font-weight: 800; margin-bottom: 32px; }
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; text-align: left; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.faq-item h4 { font-size: .95rem; font-weight: 700; margin-bottom: 8px; }
.faq-item p { font-size: .85rem; color: var(--text-muted); line-height: 1.6; }

/* ─── Categories ─────────────────────────── */
.cat-list { display: flex; flex-direction: column; gap: 8px; }
.cat-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: var(--radius-md);
  border: 1px solid var(--border); background: var(--surface2);
  transition: border-color var(--transition);
}
.cat-item-active { border-color: var(--primary); background: var(--primary-glow); }
.cat-icon-wrap { width: 36px; height: 36px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: .9rem; flex-shrink: 0; }
.cat-name { font-weight: 500; font-size: .9rem; flex: 1; }
.cat-actions { display: flex; gap: 6px; margin-left: auto; }
.muted { color: var(--text-muted); font-size: .78rem; display: block; }

/* ─── Footer ─────────────────────────────── */
.footer { background: var(--surface); border-top: 1px solid var(--border); padding: 24px; }
.footer-inner { max-width: 1280px; margin: 0 auto; text-align: center; }
.footer p { font-size: .82rem; color: var(--text-muted); }

/* ─── Responsive ─────────────────────────── */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding: 40px 0; gap: 30px; }
  .hero p { max-width: 100%; }
  .hero-btns { justify-content: center; }
  .hero-visual { display: none; }
  .dash-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .faq-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .nav-links { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--border); padding: 12px; gap: 4px; }
  .nav-links.open { display: flex; }
  .nav-links li a { width: 100%; }
  .main-wrap { padding: 20px 16px 40px; }
  .hero h1 { font-size: 2rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-row { flex-direction: column; }
  .filter-bar { flex-direction: column; align-items: stretch; }
}

/* ─── Add Expense Split Layout (Form on Left, AI Voice on Right) ────────── */
.add-expense-split-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
  align-items: start;
}

.expense-form-col {
  width: 100%;
}

.voice-sidebar-col {
  width: 100%;
}

/* ─── Sidebar AI Voice Assistant Card ───────────────────────────────────── */
.voice-card {
  background: linear-gradient(145deg, var(--surface) 0%, rgba(99,102,241,.06) 50%, rgba(168,85,247,.08) 100%);
  border: 1.5px solid rgba(99,102,241,.25);
  border-radius: var(--radius-xl);
  padding: 24px 20px;
  box-shadow: 0 8px 32px rgba(99,102,241,.12);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.voice-card.is-listening {
  border-color: rgba(239,68,68,.5);
  box-shadow: 0 8px 36px rgba(239,68,68,.2);
  background: linear-gradient(145deg, var(--surface) 0%, rgba(239,68,68,.08) 100%);
}
.voice-card.is-processing {
  border-color: rgba(99,102,241,.6);
  box-shadow: 0 8px 36px rgba(99,102,241,.25);
}

.voice-sidebar-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}

.voice-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.voice-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.voice-title i {
  color: #a855f7;
}

/* ─── PROMINENT 3D VOICE ORB MICROPHONE BUTTON ────────────────────────── */
.voice-orb-wrapper {
  position: relative;
  margin: 12px 0 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.voice-orb-btn {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  color: #ffffff;
  border: 4px solid #ffffff;
  font-size: 2.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 32px rgba(99,102,241,.45), 0 0 0 8px rgba(99,102,241,.15), inset 0 2px 4px rgba(255,255,255,.6);
  transition: all .35s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  z-index: 3;
}
.voice-orb-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 14px 42px rgba(168,85,247,.6), 0 0 0 14px rgba(168,85,247,.22), inset 0 2px 4px #fff;
}
.voice-orb-btn.active {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 12px 38px rgba(239,68,68,.55), 0 0 0 12px rgba(239,68,68,.25);
}

/* Concentric Aura Rings */
.orb-ring {
  position: absolute;
  top: -10px; left: -10px; right: -10px; bottom: -10px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}
.voice-orb-btn.active .orb-ring.ring-1 {
  border-color: #ef4444;
  animation: orb-pulse 1.8s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}
.voice-orb-btn.active .orb-ring.ring-2 {
  border-color: #ec4899;
  animation: orb-pulse 1.8s cubic-bezier(0.215, 0.61, 0.355, 1) 0.6s infinite;
}
.voice-orb-btn.active .orb-ring.ring-3 {
  border-color: #a855f7;
  animation: orb-pulse 1.8s cubic-bezier(0.215, 0.61, 0.355, 1) 1.2s infinite;
}

@keyframes orb-pulse {
  0% { transform: scale(0.95); opacity: 0.9; }
  100% { transform: scale(1.65); opacity: 0; }
}

/* 7-Bar Sound Equalizer */
.voice-soundwaves {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 24px;
  margin-top: 14px;
}
.voice-soundwaves span {
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #ef4444, #ec4899);
  border-radius: 4px;
  animation: wave-bar 0.8s ease-in-out infinite alternate;
}
.voice-soundwaves span:nth-child(1) { animation-delay: 0.1s; }
.voice-soundwaves span:nth-child(2) { animation-delay: 0.35s; }
.voice-soundwaves span:nth-child(3) { animation-delay: 0.2s; }
.voice-soundwaves span:nth-child(4) { animation-delay: 0.45s; }
.voice-soundwaves span:nth-child(5) { animation-delay: 0.15s; }
.voice-soundwaves span:nth-child(6) { animation-delay: 0.3s; }
.voice-soundwaves span:nth-child(7) { animation-delay: 0.25s; }

@keyframes wave-bar {
  0% { height: 5px; }
  100% { height: 24px; }
}

/* Badges */
.voice-badge {
  font-size: .72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(99,102,241,.12);
  color: var(--primary);
  border: 1px solid rgba(99,102,241,.2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.voice-badge--listening { background: rgba(239,68,68,.12); color: #ef4444; border-color: rgba(239,68,68,.3); }
.voice-badge--processing { background: rgba(168,85,247,.15); color: #a855f7; border-color: rgba(168,85,247,.3); }
.voice-badge--success { background: rgba(16,185,129,.15); color: #10b981; border-color: rgba(16,185,129,.3); }

.voice-sub {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.voice-actions {
  width: 100%;
}

.voice-transcript-sidebar {
  width: 100%;
  margin-top: 10px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px dashed var(--primary);
  border-radius: var(--radius-md);
  font-size: .88rem;
  font-style: italic;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  word-break: break-word;
  line-height: 1.5;
  text-align: left;
}

/* Responsive 2-column to 1-column layout */
@media (max-width: 900px) {
  .add-expense-split-layout {
    grid-template-columns: 1fr;
  }
  .voice-sidebar-col {
    order: -1; /* Voice assistant stacks nicely on mobile */
  }
}



