/* ================================================================
   POYSHAGUNI — REDESIGN
   Aesthetic: Dark editorial finance. Deep navy + emerald + amber.
   Fonts: Syne (headings) + DM Mono (numbers) + Outfit (body)
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@300;400;500&display=swap');

/* ── Reset ──────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
a { text-decoration: none; }

/* ── Design Tokens ──────────────────────────────────────────────── */
:root {
  /* Core palette */
  --bg:          #0a0f1e;
  --bg-2:        #0f1629;
  --bg-3:        #141d35;
  --bg-4:        #1a2540;
  --surface:     #1e2d4a;
  --surface-2:   #243358;
  --border:      #2a3d5c;
  --border-2:    #344d70;

  /* Text */
  --text:        #e8eef8;
  --text-2:      #8fa3c0;
  --text-3:      #5a7299;

  /* Accents */
  --emerald:     #00d4a0;
  --emerald-dim: #00a87e;
  --emerald-bg:  rgba(0,212,160,0.08);
  --amber:       #f5a623;
  --amber-dim:   #c8841a;
  --amber-bg:    rgba(245,166,35,0.08);
  --rose:        #ff5c7a;
  --rose-dim:    #cc3355;
  --rose-bg:     rgba(255,92,122,0.08);
  --sky:         #38b2f0;
  --sky-bg:      rgba(56,178,240,0.08);

  /* Semantic */
  --success:     var(--emerald);
  --danger:      var(--rose);
  --warning:     var(--amber);

  /* Fonts */
  --font-head:   'Plus Jakarta Sans', sans-serif;
  --font-body:   'Plus Jakarta Sans', sans-serif;
  --font-mono:   'JetBrains Mono', monospace;

  /* Radii */
  --r-sm:  6px;
  --r-md:  12px;
  --r-lg:  18px;
  --r-xl:  24px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg:  0 12px 40px rgba(0,0,0,0.5);
  --shadow-glow-emerald: 0 0 24px rgba(0,212,160,0.2);
  --shadow-glow-amber:   0 0 24px rgba(245,166,35,0.2);

  /* Transitions */
  --t-fast: 0.15s ease;
  --t-base: 0.25s ease;
}

/* ── Light Mode Override ─────────────────────────────────────────── */
[data-theme="light"] {
  --bg:        #f0f4ff;
  --bg-2:      #e8eeff;
  --bg-3:      #dce4f8;
  --bg-4:      #cfd9f2;
  --surface:   #ffffff;
  --surface-2: #f5f8ff;
  --border:    #d0daf0;
  --border-2:  #b8c8e8;
  --text:      #0d1b35;
  --text-2:    #3d5278;
  --text-3:    #6b84a8;
  --emerald:        #00a87e;
  --emerald-dim:    #007a5c;
  --emerald-bg:     rgba(0,168,126,0.08);
  --amber:          #d4880f;
  --amber-bg:       rgba(212,136,15,0.08);
  --rose:           #e03060;
  --rose-bg:        rgba(224,48,96,0.08);
  --sky:            #2090d0;
  --sky-bg:         rgba(32,144,208,0.08);
}

/* ── Base ───────────────────────────────────────────────────────── */
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body.app-body {
  background: var(--bg);
}

/* ── Scrollbar ──────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ── Selection ──────────────────────────────────────────────────── */
::selection { background: rgba(0,212,160,0.2); color: var(--text); }

/* ================================================================
   BUTTONS
   ================================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--emerald);
  color: #0a0f1e;
  padding: 10px 20px;
  border-radius: var(--r-md);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: var(--t-base);
  white-space: nowrap;
}
.btn-primary:hover {
  background: var(--emerald-dim);
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow-emerald);
}
.btn-primary:active { transform: scale(0.97); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--emerald);
  padding: 9px 20px;
  border-radius: var(--r-md);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  border: 1.5px solid var(--emerald);
  cursor: pointer;
  transition: var(--t-base);
  white-space: nowrap;
}
.btn-secondary:hover {
  background: var(--emerald-bg);
  transform: translateY(-1px);
}
.btn-secondary:active { transform: scale(0.97); }

.btn-ghost {
  background: var(--surface);
  color: var(--text-2);
  padding: 8px 16px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--t-fast);
  font-family: var(--font-body);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-2); }

.btn-danger {
  background: transparent;
  color: var(--rose);
  padding: 9px 20px;
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: 14px;
  border: 1.5px solid var(--rose);
  cursor: pointer;
  transition: var(--t-base);
  font-family: var(--font-body);
}
.btn-danger:hover { background: var(--rose-bg); }

/* ================================================================
   LANDING NAV
   ================================================================ */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 64px;
  height: 64px;
  background: rgba(10,15,30,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
[data-theme="light"] .navbar { background: rgba(240,244,255,0.9); }

.logo {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 22px;
  color: var(--emerald);
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
  transition: var(--t-fast);
}

.logo:hover {
  opacity: 0.9;
}

.navbar .logo {
  color: var(--emerald);
  padding: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.navbar ul { display: flex; list-style: none; gap: 4px; align-items: center; }
.navbar a { color: var(--text-2); font-size: 14px; font-weight: 500; padding: 7px 14px; border-radius: var(--r-sm); transition: var(--t-fast); }
.navbar a:hover { color: var(--text); background: var(--surface); }
.navbar .btn-login { color: var(--text-2); }
.navbar .btn-primary { color: #0a0f1e; padding: 8px 18px; font-size: 14px; }

/* ================================================================
   LANDING HERO
   ================================================================ */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
  padding: 96px 64px;
  min-height: calc(100vh - 64px);
  background: radial-gradient(ellipse 80% 60% at 60% 40%, rgba(0,212,160,0.06) 0%, transparent 70%),
              radial-gradient(ellipse 50% 40% at 20% 80%, rgba(245,166,35,0.05) 0%, transparent 60%),
              var(--bg);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.3;
  pointer-events: none;
}

.hero-text { position: relative; z-index: 1; }
.hero-text h1 {
  font-family: var(--font-head);
  font-size: clamp(38px, 5vw, 58px);
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 20px;
  letter-spacing: -1.5px;
}
.hero-text h1 em {
  font-style: normal;
  color: var(--emerald);
}
.hero-text p {
  color: var(--text-2);
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 480px;
}
.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-visual {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
}

/* Decorative dashboard mockup card */
.hero-mockup {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 24px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg), 0 0 80px rgba(0,212,160,0.08);
}
.mockup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.mockup-title { font-family: var(--font-head); font-size: 13px; font-weight: 700; color: var(--text-2); letter-spacing: 1px; text-transform: uppercase; }
.mockup-badge { background: var(--emerald-bg); color: var(--emerald); font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: var(--r-full); border: 1px solid rgba(0,212,160,0.2); }
.mockup-balance { font-family: var(--font-mono); font-size: 36px; font-weight: 500; color: var(--text); margin-bottom: 6px; letter-spacing: -1px; }
.mockup-sub { font-size: 12px; color: var(--text-3); margin-bottom: 24px; }
.mockup-bars { display: flex; flex-direction: column; gap: 10px; }
.mockup-bar-row { display: flex; align-items: center; gap: 10px; }
.mockup-bar-label { font-size: 12px; color: var(--text-3); width: 80px; flex-shrink: 0; }
.mockup-bar-track { flex: 1; height: 6px; background: var(--bg-3); border-radius: 3px; overflow: hidden; }
.mockup-bar-fill { height: 100%; border-radius: 3px; transition: width 0.8s ease; }
.mockup-bar-val { font-family: var(--font-mono); font-size: 11px; color: var(--text-2); width: 50px; text-align: right; }
.mockup-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.mockup-stat { background: var(--bg-3); border-radius: var(--r-md); padding: 12px 14px; }
.mockup-stat-label { font-size: 11px; color: var(--text-3); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.mockup-stat-val { font-family: var(--font-mono); font-size: 18px; font-weight: 500; }
.mockup-stat-val.up { color: var(--emerald); }
.mockup-stat-val.down { color: var(--rose); }

/* ================================================================
   LANDING SECTIONS
   ================================================================ */
.features {
  padding: 80px 64px;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--emerald);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-head);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 14px;
  letter-spacing: -1px;
  line-height: 1.15;
}
.section-sub { color: var(--text-2); font-size: 16px; max-width: 520px; line-height: 1.7; margin-bottom: 52px; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px 26px;
  transition: var(--t-base);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--emerald), var(--sky));
  opacity: 0;
  transition: var(--t-base);
}
.card:hover { border-color: var(--border-2); transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card:hover::before { opacity: 1; }
.card-icon { font-size: 28px; margin-bottom: 14px; }
.card h3 { font-family: var(--font-head); font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.card p { color: var(--text-2); font-size: 14px; line-height: 1.6; }

/* Download / CTA */
.download {
  padding: 96px 64px;
  text-align: center;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.download::before {
  content: '';
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0,212,160,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.download h2 { font-family: var(--font-head); font-size: 42px; font-weight: 800; color: var(--text); margin-bottom: 14px; letter-spacing: -1px; }
.download p { color: var(--text-2); font-size: 16px; margin-bottom: 32px; }
.store-buttons { display: flex; justify-content: center; gap: 12px; }

/* Footer */
footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 24px 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
footer p { color: var(--text-3); font-size: 13px; }
.footer-logo { font-family: var(--font-head); font-weight: 800; color: var(--emerald); font-size: 18px; }

/* Pricing */
.pricing { padding: 80px 64px; }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}
.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px 28px;
  transition: var(--t-base);
}
.price-card:hover { border-color: var(--border-2); transform: translateY(-4px); box-shadow: var(--shadow-md); }
.price-card.featured {
  border-color: var(--emerald);
  box-shadow: 0 0 0 1px var(--emerald), var(--shadow-glow-emerald);
  position: relative;
}
.price-card.featured::before {
  content: 'POPULAR';
  position: absolute;
  top: -1px; left: 50%; transform: translateX(-50%);
  background: var(--emerald);
  color: #0a0f1e;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  padding: 3px 14px;
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  font-family: var(--font-mono);
}
.price-card h3 { font-family: var(--font-head); font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 16px; }
.price { font-family: var(--font-mono); font-size: 42px; font-weight: 500; color: var(--text); margin-bottom: 20px; }
.price span { font-size: 14px; color: var(--text-3); }
.price-card ul { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.price-card ul li { color: var(--text-2); font-size: 14px; padding-left: 18px; position: relative; }
.price-card ul li::before { content: '→'; position: absolute; left: 0; color: var(--emerald); font-size: 12px; }

/* About */
.about-section { padding: 80px 64px; }
.about-section.light { background: var(--bg-2); }
.about-section h2 { font-family: var(--font-head); font-size: 32px; font-weight: 800; color: var(--text); margin-bottom: 16px; }
.about-section p { color: var(--text-2); font-size: 16px; line-height: 1.7; max-width: 680px; }
.team { padding: 80px 64px; background: var(--bg-2); }
.team h2 { font-family: var(--font-head); font-size: 32px; font-weight: 800; color: var(--text); margin-bottom: 40px; }
.team-grid { display: flex; gap: 32px; }
.member { text-align: center; }
.member img { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; border: 2px solid var(--emerald); margin: 0 auto 12px; }
.member h4 { font-family: var(--font-head); font-weight: 700; color: var(--text); }
.member p { color: var(--text-3); font-size: 13px; }

/* Features page detailed */
.features-detailed { padding: 80px 64px; }
.feature-row { display: flex; align-items: center; gap: 48px; margin-bottom: 80px; }
.feature-row.reverse { flex-direction: row-reverse; }
.feature-text { flex: 1; }
.feature-text h2 { font-family: var(--font-head); font-size: 28px; font-weight: 800; color: var(--text); margin-bottom: 12px; }
.feature-text p { color: var(--text-2); font-size: 15px; line-height: 1.7; }
.feature-image { flex: 1; }
.feature-image img { border-radius: var(--r-lg); border: 1px solid var(--border); }

/* ================================================================
   AUTH PAGES
   ================================================================ */
.auth-container {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg);
}

.auth-left {
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.auth-left::before {
  content: '';
  position: absolute;
  bottom: -100px; right: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(0,212,160,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.auth-brand { font-family: var(--font-head); font-size: 26px; font-weight: 800; color: var(--emerald); }
.auth-tagline { position: relative; z-index: 1; }
.auth-tagline h2 { font-family: var(--font-head); font-size: 36px; font-weight: 800; color: var(--text); margin-bottom: 12px; line-height: 1.2; letter-spacing: -1px; }
.auth-tagline p { color: var(--text-2); font-size: 15px; line-height: 1.7; }
.auth-stats { display: flex; gap: 32px; }
.auth-stat-val { font-family: var(--font-mono); font-size: 26px; font-weight: 500; color: var(--emerald); display: block; }
.auth-stat-label { font-size: 12px; color: var(--text-3); }

.auth-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}
.auth-card {
  width: 100%;
  max-width: 400px;
}
.auth-card-title { font-family: var(--font-head); font-size: 28px; font-weight: 800; color: var(--text); margin-bottom: 6px; letter-spacing: -0.5px; }
.auth-card-sub { color: var(--text-2); font-size: 14px; margin-bottom: 32px; }
.auth-logo { display: none; } /* replaced by split layout */

.auth-card form { display: flex; flex-direction: column; gap: 14px; }
.auth-card input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 13px 16px;
  font-size: 15px;
  color: var(--text);
  transition: var(--t-fast);
  width: 100%;
}
.auth-card input::placeholder { color: var(--text-3); }
.auth-card input:focus { outline: none; border-color: var(--emerald); box-shadow: 0 0 0 3px rgba(0,212,160,0.12); background: var(--surface-2); }
.auth-card button[type="submit"] {
  width: 100%;
  padding: 13px;
  background: var(--emerald);
  color: #0a0f1e;
  font-weight: 700;
  font-size: 15px;
  border: none;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: var(--t-base);
  font-family: var(--font-body);
  margin-top: 4px;
}
.auth-card button[type="submit"]:hover { background: var(--emerald-dim); transform: translateY(-1px); box-shadow: var(--shadow-glow-emerald); }
.auth-card button[type="submit"]:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }

.auth-switch { margin-top: 20px; text-align: center; font-size: 14px; color: var(--text-2); }
.auth-switch a { color: var(--emerald); font-weight: 600; }

/* ================================================================
   APP SHELL
   ================================================================ */
.app-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: 60px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-logo {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 20px;
  color: var(--emerald);
  letter-spacing: -0.5px;
}

.app-nav { display: flex; gap: 2px; }
.app-nav a {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 13px;
  border-radius: var(--r-sm);
  transition: var(--t-fast);
}
.app-nav a:hover { color: var(--text); background: var(--surface); }
.app-nav a.active { color: var(--emerald); background: var(--emerald-bg); }

.app-user { display: flex; align-items: center; gap: 8px; }

.profile-nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: var(--r-full);
  border: 1px solid transparent;
  transition: var(--t-fast);
  color: var(--text-2);
}
.profile-nav-link:hover { border-color: var(--border); background: var(--surface); }
.profile-nav-link.active { border-color: var(--emerald); background: var(--emerald-bg); }

.nav-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1.5px solid var(--emerald);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--emerald);
  flex-shrink: 0;
  overflow: hidden;
}

.user-name { font-size: 13px; font-weight: 500; color: var(--text-2); }

.settings-link {
  color: var(--text-3);
  padding: 7px;
  border-radius: var(--r-sm);
  transition: var(--t-fast);
  font-size: 16px;
}
.settings-link:hover { color: var(--text); background: var(--surface); }
.settings-link.active { color: var(--amber); background: var(--amber-bg); }

.btn-logout {
  background: transparent;
  color: var(--text-3);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--t-fast);
  font-family: var(--font-body);
}
.btn-logout:hover { color: var(--rose); border-color: var(--rose); background: var(--rose-bg); }

/* App main area */
.app-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 32px 80px;
  animation: pageFadeIn 0.3s ease;
}
@keyframes pageFadeIn { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }

/* ================================================================
   MONTH NAV
   ================================================================ */
.month-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.month-label {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  min-width: 160px;
  text-align: center;
}
.month-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  width: 34px; height: 34px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: var(--t-fast);
  flex-shrink: 0;
}
.month-btn:hover { border-color: var(--emerald); color: var(--emerald); background: var(--emerald-bg); }

/* ================================================================
   STAT CARDS
   ================================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px 22px 18px;
  transition: var(--t-fast);
  position: relative;
  overflow: hidden;
}
.stat-card:hover { border-color: var(--border-2); box-shadow: var(--shadow-sm); }
.stat-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}
.stat-card.balance::after  { background: var(--sky); }
.stat-card.income::after   { background: var(--emerald); }
.stat-card.expense::after  { background: var(--rose); }
.stat-card.monthly::after  { background: var(--amber); }

.stat-label { font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 8px; }
.stat-value { font-family: var(--font-mono); font-size: 26px; font-weight: 500; color: var(--text); margin-bottom: 4px; letter-spacing: -0.5px; }
.stat-sub { font-size: 11px; color: var(--text-3); }

/* ================================================================
   CHARTS
   ================================================================ */
.charts-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
}
.chart-card h3 { font-family: var(--font-head); font-size: 13px; font-weight: 700; color: var(--text-2); margin-bottom: 18px; text-transform: uppercase; letter-spacing: 0.5px; }
.chart-container { height: 240px; position: relative; }

/* ================================================================
   RECENT TRANSACTIONS
   ================================================================ */
.recent-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
}
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.section-header h3 { font-family: var(--font-head); font-size: 14px; font-weight: 700; color: var(--text); text-transform: uppercase; letter-spacing: 0.5px; }
.view-all { font-size: 12px; color: var(--emerald); font-weight: 600; transition: var(--t-fast); }
.view-all:hover { color: var(--emerald-dim); }

.transaction-list { display: flex; flex-direction: column; }
.transaction-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 10px;
  border-radius: var(--r-md);
  transition: var(--t-fast);
}
.transaction-item:hover { background: var(--bg-3); }
.txn-icon {
  width: 38px; height: 38px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.txn-icon.expense { background: var(--rose-bg); }
.txn-icon.income  { background: var(--emerald-bg); }
.txn-details { flex: 1; }
.txn-title { font-size: 13px; font-weight: 600; color: var(--text); }
.txn-meta  { font-size: 11px; color: var(--text-3); margin-top: 1px; }
.txn-amount { font-family: var(--font-mono); font-size: 14px; font-weight: 500; }
.txn-amount.expense { color: var(--rose); }
.txn-amount.income  { color: var(--emerald); }

/* ================================================================
   PAGE HEADERS
   ================================================================ */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.page-header h2 { font-family: var(--font-head); font-size: 22px; font-weight: 800; color: var(--text); letter-spacing: -0.5px; }
.page-header p  { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.page-header-actions { display: flex; gap: 8px; align-items: center; }

/* ================================================================
   TRANSACTIONS PAGE
   ================================================================ */
.txn-totals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}
.txn-total-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.txn-total-card span { font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.txn-total-card strong { font-family: var(--font-mono); font-size: 20px; font-weight: 500; }
.txn-total-card.expense strong { color: var(--rose); }
.txn-total-card.income  strong { color: var(--emerald); }

.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  gap: 14px;
  flex-wrap: wrap;
}

.tab-group { display: flex; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.tab-btn {
  padding: 9px 20px;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
  cursor: pointer;
  transition: var(--t-fast);
  font-family: var(--font-body);
}
.tab-btn.active { background: var(--emerald); color: #0a0f1e; }
.tab-btn:not(.active):hover { color: var(--text); background: var(--bg-3); }

.filter-controls { display: flex; gap: 8px; }
.filter-controls select,
.filter-controls input[type="month"] {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 8px 14px;
  font-size: 13px;
  color: var(--text);
  font-family: var(--font-body);
  cursor: pointer;
  transition: var(--t-fast);
}
.filter-controls select:focus,
.filter-controls input[type="month"]:focus { outline: none; border-color: var(--emerald); }

.txn-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--bg-3);
  transition: var(--t-fast);
}
.list-item:last-child { border-bottom: none; }
.list-item:hover { background: var(--bg-3); }

.item-icon {
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.item-icon.expense { background: var(--rose-bg); }
.item-icon.income  { background: var(--emerald-bg); }

.item-info { flex: 1; min-width: 0; }
.item-title { font-size: 14px; font-weight: 600; color: var(--text); }
.item-meta  { font-size: 12px; color: var(--text-3); margin-top: 2px; }

.cat-badge {
  display: inline-block;
  background: var(--bg-3);
  color: var(--text-3);
  padding: 2px 8px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 600;
  margin-right: 6px;
}

.item-amount { font-family: var(--font-mono); font-size: 15px; font-weight: 500; min-width: 90px; text-align: right; }
.item-amount.expense { color: var(--rose); }
.item-amount.income  { color: var(--emerald); }

.item-actions { display: flex; gap: 4px; opacity: 0; transition: var(--t-fast); }
.list-item:hover .item-actions { opacity: 1; }

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px 8px;
  border-radius: var(--r-sm);
  font-size: 14px;
  transition: var(--t-fast);
  color: var(--text-3);
}
.icon-btn:hover { background: var(--bg-4); color: var(--text); }
.icon-btn.delete:hover { background: var(--rose-bg); color: var(--rose); }

/* ================================================================
   MODALS
   ================================================================ */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.modal-overlay.open { display: flex; }

.modal-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  width: 440px;
  max-width: 92vw;
  box-shadow: var(--shadow-lg);
  animation: modalSlide 0.25s ease;
}
@keyframes modalSlide { from { opacity:0; transform:scale(0.95) translateY(8px); } to { opacity:1; transform:scale(1) translateY(0); } }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px 0;
}
.modal-header h3 { font-family: var(--font-head); font-size: 17px; font-weight: 800; color: var(--text); }

.modal-close {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-3);
  width: 30px; height: 30px;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: var(--t-fast);
}
.modal-close:hover { color: var(--rose); border-color: var(--rose); background: var(--rose-bg); }

.modal-card form {
  padding: 18px 24px 24px;
  display: flex; flex-direction: column; gap: 12px;
}
.modal-card input,
.modal-card select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 11px 14px;
  font-size: 14px;
  color: var(--text);
  font-family: var(--font-body);
  transition: var(--t-fast);
  width: 100%;
}
.modal-card input::placeholder { color: var(--text-3); }
.modal-card input:focus,
.modal-card select:focus { outline: none; border-color: var(--emerald); box-shadow: 0 0 0 3px rgba(0,212,160,0.1); background: var(--surface-2); }

.modal-actions { display: flex; gap: 10px; margin-top: 4px; }
.modal-actions button { flex: 1; padding: 12px; font-size: 14px; }

/* ================================================================
   RECURRING
   ================================================================ */
.rec-layout { display: grid; grid-template-columns: 1fr 280px; gap: 20px; align-items: start; }

.rec-filter-bar { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.rec-filter-btn {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  background: var(--surface);
  font-size: 12px; font-weight: 600; color: var(--text-3);
  cursor: pointer; transition: var(--t-fast); font-family: var(--font-body);
}
.rec-filter-btn:hover { border-color: var(--border-2); color: var(--text); }
.rec-filter-btn.active { background: var(--emerald); border-color: var(--emerald); color: #0a0f1e; }

.rec-list { display: flex; flex-direction: column; gap: 10px; }
.rec-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  display: flex; align-items: center; gap: 14px;
  transition: var(--t-fast);
}
.rec-item:hover { border-color: var(--border-2); box-shadow: var(--shadow-sm); }
.rec-item.paused { opacity: 0.5; }

.rec-icon { width: 42px; height: 42px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.rec-icon.expense { background: var(--rose-bg); }
.rec-icon.income  { background: var(--emerald-bg); }

.rec-info { flex: 1; }
.rec-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 3px; }
.rec-label { font-size: 14px; font-weight: 600; color: var(--text); }
.rec-badge { padding: 2px 10px; border-radius: var(--r-full); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; font-family: var(--font-mono); }
.paused-badge { background: var(--bg-3); color: var(--text-3); padding: 2px 8px; border-radius: var(--r-full); font-size: 10px; font-weight: 600; }
.rec-meta { font-size: 12px; color: var(--text-3); }
.due-now { color: var(--rose); font-weight: 700; }

.rec-amount { font-family: var(--font-mono); font-size: 16px; font-weight: 500; text-align: right; min-width: 90px; }
.rec-amount.expense { color: var(--rose); }
.rec-amount.income  { color: var(--emerald); }
.rec-monthly { font-size: 10px; color: var(--text-3); margin-top: 2px; }

.rec-actions { display: flex; gap: 4px; opacity: 0; transition: var(--t-fast); }
.rec-item:hover .rec-actions { opacity: 1; }

.rec-sidebar { display: flex; flex-direction: column; gap: 14px; }
.upcoming-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px 20px; }
.upcoming-card h3 { font-family: var(--font-head); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-2); margin-bottom: 14px; }

.upcoming-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--bg-3); }
.upcoming-item:last-child { border-bottom: none; }
.upcoming-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.upcoming-dot.expense { background: var(--rose); }
.upcoming-dot.income  { background: var(--emerald); }
.upcoming-info { flex: 1; }
.upcoming-label { font-size: 12px; font-weight: 600; color: var(--text); }
.upcoming-date  { font-size: 11px; color: var(--text-3); }
.upcoming-amount { font-family: var(--font-mono); font-size: 12px; font-weight: 500; }
.upcoming-amount.expense { color: var(--rose); }
.upcoming-amount.income  { color: var(--emerald); }

.how-it-works { background: var(--emerald-bg); border: 1px solid rgba(0,212,160,0.2); border-radius: var(--r-lg); padding: 16px 18px; }
.how-it-works h4 { font-family: var(--font-head); font-size: 12px; font-weight: 700; color: var(--emerald); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
.how-it-works ol { padding-left: 18px; display: flex; flex-direction: column; gap: 8px; }
.how-it-works li { font-size: 12px; color: var(--text-2); line-height: 1.5; }

/* Form helpers */
.form-row { display: flex; flex-direction: column; gap: 4px; margin-bottom: 4px; }
.form-row.two-col { flex-direction: row; gap: 12px; }
.form-row.two-col > div { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.form-label { font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; }

/* ================================================================
   BUDGETS PAGE
   ================================================================ */
.budget-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.budget-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  transition: var(--t-fast);
}
.budget-card:hover { border-color: var(--border-2); box-shadow: var(--shadow-sm); }
.budget-card.warning { border-color: rgba(245,166,35,0.4); }
.budget-card.over    { border-color: rgba(255,92,122,0.4); }

.budget-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.budget-cat-info { display: flex; align-items: center; gap: 10px; }
.budget-icon { font-size: 22px; }
.budget-cat-name { font-size: 14px; font-weight: 700; color: var(--text); }
.budget-status { font-size: 11px; color: var(--text-3); margin-top: 1px; }

.budget-amounts { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.budget-spent { font-family: var(--font-mono); font-size: 18px; font-weight: 500; color: var(--text); }
.budget-limit { font-size: 12px; color: var(--text-3); font-family: var(--font-mono); }

.budget-track { height: 6px; background: var(--bg-3); border-radius: 3px; overflow: hidden; margin-bottom: 6px; }
.budget-fill  { height: 100%; border-radius: 3px; transition: width 0.6s cubic-bezier(0.4,0,0.2,1); }
.budget-pct { font-size: 11px; font-weight: 700; text-align: right; font-family: var(--font-mono); }

/* ================================================================
   GOALS PAGE
   ================================================================ */
.goals-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.goal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
  transition: var(--t-fast);
  display: flex; flex-direction: column; gap: 10px;
}
.goal-card:hover { border-color: var(--border-2); box-shadow: var(--shadow-sm); }
.goal-card.completed { border-color: rgba(0,212,160,0.4); }

.goal-emoji { font-size: 30px; line-height: 1; }
.goal-title { font-family: var(--font-head); font-size: 16px; font-weight: 700; color: var(--text); }
.goal-note  { font-size: 12px; color: var(--text-3); }

.goal-amounts { display: flex; justify-content: space-between; align-items: baseline; }
.goal-current { font-family: var(--font-mono); font-size: 20px; font-weight: 500; color: var(--sky); }
.goal-target  { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }

.goal-track { height: 6px; background: var(--bg-3); border-radius: 3px; overflow: hidden; }
.goal-fill  { height: 100%; background: linear-gradient(90deg, var(--sky), var(--emerald)); border-radius: 3px; transition: width 0.7s ease; }
.goal-fill.done { background: var(--emerald); }

.goal-meta-row { display: flex; justify-content: space-between; align-items: center; }
.goal-pct { font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--sky); }
.goal-days { font-size: 11px; color: var(--text-3); }
.goal-days.overdue { color: var(--rose); font-weight: 700; }
.goal-complete-badge { text-align: center; background: var(--emerald-bg); color: var(--emerald); border: 1px solid rgba(0,212,160,0.3); padding: 8px; border-radius: var(--r-md); font-size: 12px; font-weight: 700; }
.goal-actions { display: flex; gap: 8px; margin-top: 4px; }
.btn-add-funds { flex: 1; padding: 9px; background: var(--sky-bg); color: var(--sky); border: 1px solid rgba(56,178,240,0.3); border-radius: var(--r-md); font-size: 12px; font-weight: 700; cursor: pointer; transition: var(--t-fast); font-family: var(--font-body); }
.btn-add-funds:hover { background: var(--sky); color: #0a0f1e; }

/* ================================================================
   SETTINGS PAGE
   ================================================================ */
.settings-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 22px 24px; margin-bottom: 16px; transition: var(--t-fast); }
.settings-card:hover { border-color: var(--border-2); }
.settings-card-header { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.settings-icon { font-size: 24px; line-height: 1; flex-shrink: 0; }
.settings-card-header h3 { font-family: var(--font-head); font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.settings-card-header p { font-size: 13px; color: var(--text-3); }
.settings-form { display: flex; flex-direction: column; gap: 10px; }
.settings-preview { font-family: var(--font-mono); font-size: 13px; color: var(--emerald); }
.export-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-export { padding: 9px 18px; border: 1px solid var(--border); color: var(--text-2); background: var(--bg-3); border-radius: var(--r-md); font-size: 13px; font-weight: 600; cursor: pointer; transition: var(--t-fast); font-family: var(--font-body); }
.btn-export:hover { border-color: var(--emerald); color: var(--emerald); background: var(--emerald-bg); }
.appearance-row { display: flex; align-items: center; justify-content: space-between; padding: 4px 0; }
.theme-toggle-inline { padding: 7px 16px; border: 1px solid var(--border); border-radius: var(--r-full); background: var(--bg-3); cursor: pointer; font-size: 12px; font-weight: 700; transition: var(--t-fast); font-family: var(--font-mono); color: var(--text-2); letter-spacing: 0.5px; }
.theme-toggle-inline:hover { border-color: var(--amber); color: var(--amber); background: var(--amber-bg); }
.audit-list { display: flex; flex-direction: column; }
.audit-item { padding: 9px 0; border-bottom: 1px solid var(--bg-3); }
.audit-item:last-child { border-bottom: none; }
.audit-action { font-size: 13px; font-weight: 600; color: var(--text); }
.audit-meta { font-size: 11px; color: var(--text-3); margin-top: 2px; font-family: var(--font-mono); }

/* ================================================================
   PAGINATION
   ================================================================ */
.pagination { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 20px 0; }
.page-btn { width: 34px; height: 34px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; transition: var(--t-fast); color: var(--text-2); }
.page-btn:hover:not(:disabled) { border-color: var(--emerald); color: var(--emerald); background: var(--emerald-bg); }
.page-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.page-info { font-size: 12px; color: var(--text-3); font-family: var(--font-mono); }

/* ================================================================
   EMPTY & LOADING STATES
   ================================================================ */
.empty-state { padding: 52px; text-align: center; }
.empty-icon { font-size: 36px; margin-bottom: 12px; }
.empty-state p { color: var(--text-3); font-size: 14px; margin-bottom: 16px; }
.no-data { padding: 28px; text-align: center; color: var(--text-3); font-size: 13px; }
.loading-text { padding: 24px; text-align: center; color: var(--text-3); font-size: 13px; }

/* ================================================================
   FLOATING THEME FAB
   ================================================================ */
.theme-fab {
  position: fixed;
  bottom: 84px; right: 20px;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  font-size: 20px;
  cursor: pointer;
  z-index: 900;
  display: flex; align-items: center; justify-content: center;
  transition: var(--t-base);
  color: var(--text);
}
.theme-fab:hover { border-color: var(--amber); box-shadow: var(--shadow-glow-amber); transform: scale(1.08); }
.theme-fab.spin { animation: fabSpin 0.4s ease; }
@keyframes fabSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@media (min-width: 769px) { .theme-fab { bottom: 24px; right: 24px; } }

/* ================================================================
   TOAST
   ================================================================ */
.ft-toast {
  position: fixed; bottom: 84px; right: 20px;
  padding: 12px 18px; border-radius: var(--r-md);
  font-size: 13px; font-weight: 600; color: #0a0f1e;
  z-index: 9999; opacity: 0;
  transform: translateY(10px) scale(0.96);
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
  max-width: 300px; box-shadow: var(--shadow-md);
  pointer-events: none; font-family: var(--font-body);
}
.ft-toast.show { opacity: 1; transform: translateY(0) scale(1); }
.ft-toast-success { background: var(--emerald); }
.ft-toast-error   { background: var(--rose); color: white; }
@media (min-width: 769px) { .ft-toast { bottom: 84px; right: 24px; } }

/* ================================================================
   MOBILE BOTTOM NAV
   ================================================================ */
.mobile-bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 60px;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  z-index: 800;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.mobile-bottom-nav::-webkit-scrollbar { display: none; }
.mobile-bottom-nav .mobile-nav-item {
  flex: 0 0 68px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-decoration: none; color: var(--text-3); gap: 2px; padding: 8px 4px;
  transition: var(--t-fast); position: relative;
  -webkit-tap-highlight-color: transparent;
  min-width: 68px;
}
.mobile-bottom-nav .mobile-nav-item.active { color: var(--emerald); }
.mobile-bottom-nav .mobile-nav-item.active::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 28px; height: 2px; background: var(--emerald); border-radius: 0 0 2px 2px;
}
.mobile-nav-icon { font-size: 20px; line-height: 1; }
.mobile-nav-label { font-size: 9px; font-weight: 700; letter-spacing: 0.3px; text-transform: uppercase; font-family: var(--font-mono); }

.mobile-add-fab {
  display: none; position: fixed; bottom: 76px; right: 18px;
  width: 50px; height: 50px; border-radius: 50%; border: none;
  background: var(--emerald); color: #0a0f1e;
  font-size: 26px; font-weight: 300; line-height: 1;
  box-shadow: var(--shadow-glow-emerald);
  cursor: pointer; z-index: 890; align-items: center; justify-content: center;
  transition: var(--t-base);
}
.mobile-add-fab:active { transform: scale(0.9); }


/* ── Public Navbar Mobile Hamburger ─────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--r-sm);
  transition: var(--t-fast);
  z-index: 1001;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--t-base);
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile-menu {
  display: none;
  position: fixed;
  top: 64px; left: 0; right: 0;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px 24px;
  z-index: 1000;
  flex-direction: column;
  gap: 4px;
  animation: slideDown 0.2s ease;
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.nav-mobile-menu.open { display: flex; }
.nav-mobile-menu a {
  display: block;
  padding: 12px 16px;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--r-md);
  text-decoration: none;
  transition: var(--t-fast);
}
.nav-mobile-menu a:hover { background: var(--surface); color: var(--text); }
.nav-mobile-menu .mobile-menu-divider { height: 1px; background: var(--border); margin: 8px 0; }
.nav-mobile-menu .btn-primary {
  background: var(--emerald);
  color: #0a0f1e !important;
  font-weight: 700;
  text-align: center;
  margin-top: 4px;
}

.mobile-only  { display: none !important; }
.desktop-only { display: flex !important; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 768px) {
  .mobile-only  { display: block !important; }
  .desktop-only { display: none !important; }
  .mobile-bottom-nav { display: flex; }
  .mobile-add-fab    { display: flex; }
  .app-body { padding-bottom: calc(60px + env(safe-area-inset-bottom,0px)); }
  .theme-fab { bottom: calc(68px + env(safe-area-inset-bottom,0px)); right: 14px; }
  .mobile-add-fab { bottom: calc(76px + env(safe-area-inset-bottom,0px)); right: 68px; }
  .app-navbar { padding: 0 16px; height: 54px; }
  .app-user { gap: 4px; }
  .profile-nav-link { padding: 2px; border: none; background: none !important; }
  .profile-nav-link:hover { background: none !important; }
  .user-name { display: none !important; }
  .nav-avatar { width: 28px; height: 28px; font-size: 10px; }
  .app-logo { font-size: 16px; }
  .app-main { padding: 16px 16px 24px; }
  .stats-grid { grid-template-columns: 1fr 1fr !important; gap: 10px; }
  .stat-value { font-size: 20px; }
  .charts-row { grid-template-columns: 1fr; gap: 12px; }
  .chart-container { height: 180px; }
  .recent-section, .chart-card { padding: 16px; }
  .page-header h2 { font-size: 18px; }
  .filter-bar { flex-direction: column; align-items: stretch; gap: 10px; }
  .filter-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .list-item { padding: 12px 14px; }
  .item-actions { opacity: 1; }
  .rec-actions { opacity: 1; }
  .modal-overlay { align-items: flex-end; }
  .modal-card { width: 100% !important; max-width: 100% !important; border-radius: var(--r-xl) var(--r-xl) 0 0 !important; max-height: 92vh; overflow-y: auto; padding-bottom: env(safe-area-inset-bottom,12px); animation: slideUpSheet 0.3s ease !important; }
  @keyframes slideUpSheet { from { transform: translateY(100%); } to { transform: translateY(0); } }
  .modal-card input, .modal-card select { font-size: 16px; }
  .rec-layout { grid-template-columns: 1fr; }
  .rec-sidebar { order: -1; }
  .budget-grid, .goals-grid { grid-template-columns: 1fr; }
  .txn-totals { grid-template-columns: 1fr; }
  .form-row.two-col { flex-direction: column; }
  .auth-container { grid-template-columns: 1fr; }
  .auth-left { display: none; }
  .auth-right { padding: 32px 24px; }
  .hero { grid-template-columns: 1fr; padding: 60px 24px 48px; min-height: auto; }
  .hero-visual { display: none; }
  .hero-text h1 { font-size: 36px; }
  .navbar { padding: 0 20px; height: 56px; }
  .navbar nav { display: none; }
  .nav-hamburger { display: flex; }
  .feature-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .hero-text h1 { font-size: 32px; }
  .hero-text p { font-size: 15px; }
  .hero-buttons { flex-direction: column; align-items: flex-start; gap: 10px; }
  .section-title { font-size: 26px; }
  .features, .download { padding: 48px 20px; }
  .download h2 { font-size: 24px; }
  .store-buttons { flex-direction: column; align-items: center; gap: 10px; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 380px; margin: 0 auto; }
  .about-section .section-container { padding: 0; }
  .team-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .features-detailed { padding: 48px 20px; }
  .feature-row { flex-direction: column; gap: 24px; }
  .feature-row.reverse { flex-direction: column; }
  .analytics-grid { grid-template-columns: 1fr; }
  .nav-mobile-menu { top: 56px; }
  .features, .download, .pricing, .about-section, .team, .features-detailed { padding: 56px 24px; }
  .feature-grid, .pricing-grid { grid-template-columns: 1fr; }
  .feature-row, .feature-row.reverse { flex-direction: column; }
  .feature-image { display: none; }
  footer { padding: 20px 24px; flex-direction: column; gap: 8px; text-align: center; }
}

/* ================================================================
   ICON STYLES
   ================================================================ */
svg { display:inline-block; vertical-align:middle; flex-shrink:0; }
.mobile-nav-icon svg { display:block; margin:0 auto; }
.mobile-nav-icon { display:flex; align-items:center; justify-content:center; }


/* ── Insight label ──────────────────────────────────────────────── */
.insight-icon-wrap {
  display: flex; flex-direction: column;
  align-items: center; gap: 3px;
  flex-shrink: 0; min-width: 48px;
}
.insight-label {
  font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.4px;
  font-family: var(--font-mono);
  color: currentColor; opacity: 0.8;
}

/* Toast with icon */
.ft-toast { display:flex; align-items:center; gap:8px; }
.toast-icon { display:flex; align-items:center; flex-shrink:0; }
.ft-toast-success .toast-icon { color:#0a0f1e; }
.ft-toast-error .toast-icon   { color:white; }

/* Card icon wrapper on landing */
.card-icon {
  width:48px; height:48px;
  border-radius:var(--r-md);
  background:var(--emerald-bg);
  border:1px solid rgba(0,212,160,0.15);
  display:flex; align-items:center; justify-content:center;
  margin-bottom:16px;
  color:var(--emerald);
}
.card-icon svg { stroke:var(--emerald); }

/* Audit log action labels — plain text now, no emoji */
.audit-action { font-family:var(--font-mono); font-size:12px; }

/* Icon buttons in lists */
.icon-btn { display:inline-flex; align-items:center; justify-content:center; }

/* Modal close button */
.modal-close { display:inline-flex; align-items:center; justify-content:center; }

/* Btn with icon */
.btn-primary svg, .btn-secondary svg, .btn-ghost svg,
.btn-logout svg, .btn-save svg, .btn-danger svg,
.btn-avatar-upload svg, .btn-avatar-remove svg,
.btn-export svg { flex-shrink:0; }

/* Nav link icons */
.app-nav a { display:flex; align-items:center; gap:7px; }
.settings-link { display:inline-flex; align-items:center; justify-content:center; }

/* Empty state icons */
.empty-icon { color:var(--text-3); margin-bottom:14px; display:flex; align-items:center; justify-content:center; }
.ob-icon { color:var(--emerald); display:flex; align-items:center; justify-content:center; margin-bottom:16px; }

/* Insight icons */
.insight-icon { display:flex; align-items:center; flex-shrink:0; }
.insight-positive .insight-icon { color:var(--emerald); }
.insight-warning  .insight-icon { color:var(--amber); }
.insight-danger   .insight-icon { color:var(--rose); }
.insight-info     .insight-icon { color:var(--sky); }

/* Sidenav icons */
.sidenav-link { display:flex; align-items:center; }
.sidenav-icon { display:flex; align-items:center; justify-content:center; flex-shrink:0; }

/* Field icons */
.field-icon { display:flex; align-items:center; color:var(--text-3); }
.field-input:focus ~ .field-icon, .field-wrap:focus-within .field-icon { color:var(--emerald); }
