/* ================================================================
   FINANCEME — Premium Fintech Dashboard
   Design System: Deep Navy × Electric Blue × Adaptive
   ================================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* ================================================================
   DESIGN TOKENS
   ================================================================ */
:root {
  /* Backgrounds — Light */
  --bg-base:    #F0F2F8;
  --bg-surface: #FFFFFF;
  --bg-subtle:  #E8EBF5;
  --bg-muted:   #DDE1EF;

  /* Text */
  --text-primary:   #0A0D1A;
  --text-secondary: #3D4466;
  --text-muted:     #7B82A0;
  --text-inverse:   #FFFFFF;

  /* Brand — Electric Blue */
  --brand:       #2563EB;
  --brand-hover: #1D4ED8;
  --brand-light: #EFF6FF;
  --brand-mid:   #BFDBFE;
  --brand-dark:  #1E40AF;

  /* Accent — Violet */
  --accent:       #7C3AED;
  --accent-light: #EDE9FE;

  /* Semantic */
  --success:       #059669;
  --success-light: #ECFDF5;
  --danger:        #DC2626;
  --danger-light:  #FEF2F2;
  --warning:       #D97706;
  --warning-light: #FFFBEB;
  --info:          #0284C7;
  --info-light:    #F0F9FF;

  /* Border */
  --border:       #E2E6F3;
  --border-focus: #2563EB;

  /* Layout */
  --sidebar-w:         240px;
  --sidebar-collapsed: 60px;
  --topbar-h:          56px;
  --bottom-nav-h:      64px;

  /* Radius */
  --r-xs:  4px;
  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  16px;
  --r-xl:  20px;
  --r-2xl: 24px;
  --r-full: 9999px;

  /* Shadow */
  --shadow-xs: 0 1px 3px rgba(10,13,26,.06);
  --shadow-sm: 0 2px 6px rgba(10,13,26,.07), 0 1px 2px rgba(10,13,26,.04);
  --shadow-md: 0 4px 16px rgba(10,13,26,.09), 0 2px 4px rgba(10,13,26,.04);
  --shadow-lg: 0 8px 28px rgba(10,13,26,.11), 0 2px 8px rgba(10,13,26,.05);
  --shadow-xl: 0 20px 50px rgba(10,13,26,.13), 0 4px 12px rgba(10,13,26,.06);
  --shadow-brand: 0 8px 24px rgba(37,99,235,.25);

  /* Transition */
  --t-fast:   0.12s ease;
  --t-base:   0.2s ease;
  --t-slow:   0.35s ease;

  /* Gradient */
  --grad-brand: linear-gradient(135deg, #2563EB 0%, #7C3AED 100%);
  --grad-success: linear-gradient(135deg, #059669 0%, #0284C7 100%);
  --grad-danger: linear-gradient(135deg, #DC2626 0%, #DB2777 100%);
  --grad-gold: linear-gradient(135deg, #D97706 0%, #F59E0B 100%);
}

/* Dark Mode — Deep Navy */
[data-theme="dark"] {
  --bg-base:    #080B14;
  --bg-surface: #0F1322;
  --bg-subtle:  #161A2E;
  --bg-muted:   #1D2238;

  --text-primary:   #E8ECFF;
  --text-secondary: #8892B8;
  --text-muted:     #4A5178;

  --brand:       #3B82F6;
  --brand-hover: #60A5FA;
  --brand-light: #0D1529;
  --brand-mid:   #1E3A5F;
  --brand-dark:  #93C5FD;

  --accent:       #8B5CF6;
  --accent-light: #1A1035;

  --success:       #10B981;
  --success-light: #052E16;
  --danger:        #F87171;
  --danger-light:  #2A0808;
  --warning:       #FBBF24;
  --warning-light: #1C1300;
  --info:          #38BDF8;
  --info-light:    #071926;

  --border:       #1E2340;
  --border-focus: #3B82F6;

  --shadow-xs: 0 1px 3px rgba(0,0,0,.4);
  --shadow-sm: 0 2px 6px rgba(0,0,0,.45), 0 1px 2px rgba(0,0,0,.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,.5), 0 2px 4px rgba(0,0,0,.3);
  --shadow-lg: 0 8px 28px rgba(0,0,0,.55), 0 2px 8px rgba(0,0,0,.3);
  --shadow-xl: 0 20px 50px rgba(0,0,0,.65), 0 4px 12px rgba(0,0,0,.4);
  --shadow-brand: 0 8px 24px rgba(59,130,246,.2);

  --grad-brand: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
}

/* ================================================================
   RESET & BASE
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.5;
  font-size: 14px;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background var(--t-base), color var(--t-base);
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; font-size: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; outline: none; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-muted); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ================================================================
   SIDEBAR — Premium Dark
   ================================================================ */
.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: #0A0D1A;
  border-right: 1px solid rgba(255,255,255,.06);
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: width var(--t-slow), transform var(--t-base);
  overflow: hidden;
}
[data-theme="dark"] .sidebar {
  background: #060810;
  border-right-color: rgba(255,255,255,.04);
}
.sidebar.collapsed { width: var(--sidebar-collapsed); }

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  height: var(--topbar-h);
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}
.logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
}
.logo i {
  font-size: 1.375rem;
  flex-shrink: 0;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.logo-text { transition: opacity var(--t-base), width var(--t-base); letter-spacing: -.3px; }
.sidebar.collapsed .logo-text { opacity: 0; width: 0; }

.sidebar-toggle {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm);
  color: rgba(255,255,255,.4);
  transition: all var(--t-fast);
  flex-shrink: 0;
}
.sidebar-toggle:hover { background: rgba(255,255,255,.08); color: rgba(255,255,255,.9); }
.sidebar-toggle i { font-size: 1rem; }
.sidebar-close { display: none; }

.sidebar-nav {
  flex: 1;
  padding: .625rem .75rem;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); }

.nav-group-label {
  font-size: .6rem;
  font-weight: 700;
  color: rgba(255,255,255,.25);
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: .875rem .5rem .3rem;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity var(--t-base);
}
.sidebar.collapsed .nav-group-label { opacity: 0; }

.nav-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .5625rem .75rem;
  border-radius: var(--r-md);
  color: rgba(255,255,255,.45);
  font-size: .82rem;
  font-weight: 500;
  transition: all var(--t-fast);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}
.nav-item i { font-size: 1rem; flex-shrink: 0; }
.nav-item span { overflow: hidden; text-overflow: ellipsis; }
.nav-item:hover {
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.9);
}
.nav-item.active {
  background: rgba(37,99,235,.2);
  color: #fff;
  font-weight: 600;
}
[data-theme="dark"] .nav-item.active {
  background: rgba(59,130,246,.18);
}
.nav-item.active i { color: #60A5FA; }
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 18%; bottom: 18%;
  width: 3px;
  background: var(--grad-brand);
  border-radius: 0 var(--r-full) var(--r-full) 0;
}
.sidebar.collapsed .nav-item span { opacity: 0; width: 0; }

.sidebar-footer {
  padding: .75rem;
  border-top: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}
.theme-toggle {
  display: flex; align-items: center; gap: .625rem;
  width: 100%; padding: .5625rem .75rem;
  border-radius: var(--r-md);
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.5);
  font-size: .78rem; font-weight: 500;
  transition: all var(--t-fast);
  border: 1px solid rgba(255,255,255,.07);
}
.theme-toggle:hover { background: rgba(255,255,255,.1); color: rgba(255,255,255,.9); }

/* ================================================================
   TOPBAR — Glass Effect
   ================================================================ */
.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin var(--t-slow);
}
.sidebar.collapsed ~ .main-content { margin-left: var(--sidebar-collapsed); }

.topbar {
  position: sticky; top: 0;
  height: var(--topbar-h);
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: .875rem;
  z-index: 100;
  transition: background var(--t-base), border var(--t-base);
  flex-shrink: 0;
}
[data-theme="dark"] .topbar {
  background: rgba(15,19,34,.85);
  border-bottom-color: rgba(255,255,255,.06);
}
.menu-btn {
  display: none;
  color: var(--text-secondary);
  font-size: 1.1rem;
  width: 34px; height: 34px;
  border-radius: var(--r-sm);
  align-items: center; justify-content: center;
  transition: all var(--t-fast);
  flex-shrink: 0;
}
.menu-btn:hover { background: var(--bg-subtle); color: var(--text-primary); }
.topbar-title {
  flex: 1;
  font-size: .875rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -.1px;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: .25rem;
}
.tb-btn {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm);
  color: var(--text-secondary);
  font-size: .95rem;
  transition: all var(--t-fast);
}
.tb-btn:hover { background: var(--bg-subtle); color: var(--text-primary); }

/* Profile button */
.topbar-profile {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .3rem .625rem .3rem .3rem;
  border-radius: var(--r-full);
  cursor: pointer;
  transition: all var(--t-fast);
  border: 1px solid transparent;
}
.topbar-profile:hover { background: var(--bg-subtle); border-color: var(--border); }
.profile-avatar {
  width: 30px; height: 30px;
  border-radius: var(--r-full);
  background: var(--grad-brand);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(37,99,235,.3);
}
.profile-name {
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-primary);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Profile Dropdown */
.profile-dropdown-wrap { position: relative; z-index: 200; }
.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xl);
  min-width: 210px;
  z-index: 300;
  overflow: hidden;
  display: none;
  animation: dropIn var(--t-base) ease;
}
.profile-dropdown.open { display: block; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-8px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.pd-header {
  padding: 1rem 1.125rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}
.pd-name { font-size: .82rem; font-weight: 700; color: var(--text-primary); }
.pd-email { font-size: .72rem; color: var(--text-muted); margin-top: 2px; }
.pd-item {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .625rem 1.125rem;
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--t-fast);
}
.pd-item:hover { background: var(--bg-subtle); color: var(--text-primary); }
.pd-item i { font-size: .9rem; color: var(--text-muted); }
.pd-item.danger { color: var(--danger); }
.pd-item.danger:hover { background: var(--danger-light); }
.pd-item.danger i { color: var(--danger); }
.pd-divider { height: 1px; background: var(--border); margin: .25rem 0; }

/* Overlay */
.overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 190;
  display: none; opacity: 0;
  transition: opacity var(--t-base);
}
.overlay.show { display: block; opacity: 1; }

/* Page Content */
.page-content { padding: 1.5rem; flex: 1; }
.page { display: none; animation: pageFadeIn .22s ease; }
.page.active { display: block; }
@keyframes pageFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ================================================================
   TYPOGRAPHY & COMMON
   ================================================================ */
.page-heading {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: .25rem;
}
.page-subheading {
  font-size: .8rem;
  color: var(--text-muted);
}
.section-label {
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin: 1.25rem 0 .625rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.see-all {
  font-size: .72rem;
  font-weight: 600;
  color: var(--brand);
  text-transform: none;
  letter-spacing: 0;
  transition: opacity var(--t-fast);
}
.see-all:hover { opacity: .75; }

/* Legacy compat alias */
.section-title { font-size: .8rem; font-weight: 700; color: var(--text-primary); margin: 1.25rem 0 .625rem; display: flex; align-items: center; justify-content: space-between; }

/* ================================================================
   SURFACE / CARD
   ================================================================ */
.surface {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  transition: background var(--t-base), border var(--t-base);
}
.surface-hover:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); transition: all var(--t-fast); }

/* Generic card */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 1rem 1.125rem;
  display: flex;
  align-items: center;
  gap: .875rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--t-fast);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .75rem; }
.cards-grid-3 { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }

.card-icon {
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.125rem;
  flex-shrink: 0;
}
.card-info { min-width: 0; }
.card-label { display: block; font-size: .68rem; color: var(--text-muted); font-weight: 500; margin-bottom: 2px; }
.card-value { display: block; font-size: 1.1rem; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Color variants */
.card-brand .card-icon { background: var(--brand-light); color: var(--brand); }
.card-success .card-icon { background: var(--success-light); color: var(--success); }
.card-danger .card-icon { background: var(--danger-light); color: var(--danger); }
.card-warning .card-icon { background: var(--warning-light); color: var(--warning); }
.card-info .card-icon { background: var(--info-light); color: var(--info); }

/* Alias for old classes */
.card-blue .card-icon { background: var(--info-light); color: var(--info); }
.card-green .card-icon { background: var(--success-light); color: var(--success); }
.card-purple .card-icon { background: #EDE9FE; color: #7C3AED; }
.card-orange .card-icon { background: var(--warning-light); color: var(--warning); }
.card-red .card-icon { background: var(--danger-light); color: var(--danger); }

.card-sm { padding: .75rem .875rem; }
.card-icon-sm { width: 32px; height: 32px; border-radius: var(--r-xs); display: flex; align-items: center; justify-content: center; font-size: .9rem; flex-shrink: 0; }
.card-icon-sm.green { background: var(--success-light); color: var(--success); }
.card-icon-sm.red { background: var(--danger-light); color: var(--danger); }
.card-icon-sm.blue { background: var(--info-light); color: var(--info); }
.card-icon-sm.orange { background: var(--warning-light); color: var(--warning); }
.card-value-sm { display: block; font-size: .95rem; font-weight: 700; color: var(--text-primary); }

/* ================================================================
/* ================================================================
   DASHBOARD HERO — TOTAL BALANCE CARD (Premium)
   ================================================================ */
.balance-hero {
  background: var(--grad-brand);
  border-radius: var(--r-2xl);
  padding: 1.75rem;
  color: white;
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-brand);
}
.balance-hero::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
  pointer-events: none;
}
.balance-hero::after {
  content: '';
  position: absolute;
  bottom: -100px; left: -40px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  pointer-events: none;
}
.bh-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.125rem;
  position: relative; z-index: 1;
}
.bh-greeting { font-size: .85rem; opacity: .9; font-weight: 600; }
.bh-date { font-size: .7rem; opacity: .6; margin-top: 2px; }
.bh-streak {
  display: flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,.18);
  border-radius: var(--r-full);
  padding: 4px 12px;
  font-size: .73rem; font-weight: 700;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.2);
}
.bh-streak i { color: #FDE68A; font-size: .85rem; }
.bh-label { font-size: .62rem; opacity: .65; text-transform: uppercase; letter-spacing: .1em; position: relative; z-index: 1; font-weight: 600; }
.bh-amount {
  font-size: 2.25rem; font-weight: 800;
  letter-spacing: -.8px; line-height: 1.1;
  margin: 4px 0 1.25rem;
  position: relative; z-index: 1;
  text-shadow: 0 2px 12px rgba(0,0,0,.1);
}
.bh-stats {
  display: flex;
  background: rgba(255,255,255,.12);
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative; z-index: 1;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.12);
}
.bh-stat { flex: 1; padding: .625rem .875rem; display: flex; flex-direction: column; gap: 3px; }
.bh-divider { width: 1px; background: rgba(255,255,255,.12); flex-shrink: 0; }
.bh-stat-label { font-size: .6rem; opacity: .7; display: flex; align-items: center; gap: 3px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.bh-stat-val { font-size: .85rem; font-weight: 800; }

/* Legacy alias */
.hero-card { background: var(--grad-brand); border-radius: var(--r-2xl); padding: 1.625rem; color: white; margin-bottom: 1.25rem; position: relative; overflow: hidden; box-shadow: var(--shadow-brand); }
.hero-card::before { content: ''; position: absolute; top: -80px; right: -80px; width: 280px; height: 280px; border-radius: 50%; background: rgba(255,255,255,.07); pointer-events: none; }
.hero-card::after { content: ''; position: absolute; bottom: -100px; left: -40px; width: 300px; height: 300px; border-radius: 50%; background: rgba(255,255,255,.04); pointer-events: none; }
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.125rem; position: relative; z-index: 1; }
.hero-greeting { font-size: .85rem; opacity: .9; font-weight: 600; }
.hero-date { font-size: .7rem; opacity: .6; margin-top: 2px; }
.hero-streak { display: flex; align-items: center; gap: 4px; background: rgba(255,255,255,.18); border-radius: var(--r-full); padding: 4px 12px; font-size: .73rem; font-weight: 700; backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.2); }
.hero-streak i { color: #FDE68A; font-size: .85rem; }
.hero-streak-label { font-size: .62rem; opacity: .85; }
.hero-balance-label { font-size: .62rem; opacity: .65; text-transform: uppercase; letter-spacing: .1em; position: relative; z-index: 1; font-weight: 600; }
.hero-balance { font-size: 2.25rem; font-weight: 800; letter-spacing: -.8px; margin: 4px 0 1.25rem; position: relative; z-index: 1; line-height: 1.1; text-shadow: 0 2px 12px rgba(0,0,0,.1); }
.hero-sub-row { display: flex; background: rgba(255,255,255,.12); border-radius: var(--r-lg); overflow: hidden; position: relative; z-index: 1; backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.12); }
.hero-sub-item { flex: 1; padding: .625rem .875rem; display: flex; flex-direction: column; gap: 3px; }
.hero-sub-divider { width: 1px; background: rgba(255,255,255,.12); flex-shrink: 0; }
.hero-sub-label { font-size: .6rem; opacity: .7; display: flex; align-items: center; gap: 3px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.hero-sub-label i { font-size: .68rem; }
.hero-sub-val { font-size: .85rem; font-weight: 800; color: white !important; }

/* ================================================================
   QUICK ACTIONS — Premium Grid
   ================================================================ */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .75rem;
  margin-bottom: 1.25rem;
}
.qa-btn {
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  padding: .875rem .5rem;
  border-radius: var(--r-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all var(--t-fast);
  font-size: .7rem; font-weight: 600;
  color: var(--text-secondary);
  -webkit-tap-highlight-color: transparent;
}
.qa-btn:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: transparent; }
.qa-btn:active { transform: scale(.96); }
.qa-icon {
  width: 42px; height: 42px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  transition: transform var(--t-fast);
}
.qa-btn:hover .qa-icon { transform: scale(1.1); }
.qa-btn.green .qa-icon { background: var(--success-light); color: var(--success); }
.qa-btn.red .qa-icon { background: var(--danger-light); color: var(--danger); }
.qa-btn.blue .qa-icon { background: var(--info-light); color: var(--info); }
.qa-btn.purple .qa-icon { background: var(--accent-light); color: var(--accent); }
.qa-btn.green:hover { background: var(--success-light); color: var(--success); }
.qa-btn.red:hover { background: var(--danger-light); color: var(--danger); }
.qa-btn.blue:hover { background: var(--info-light); color: var(--info); }
.qa-btn.purple:hover { background: var(--accent-light); color: var(--accent); }

/* ================================================================
   INSIGHT / SUMMARY CARDS
   ================================================================ */
.insight-row { display: grid; grid-template-columns: repeat(3,1fr); gap: .625rem; margin-bottom: .75rem; }
.insight-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: .75rem .875rem;
  display: flex; align-items: center; gap: .625rem;
  box-shadow: var(--shadow-xs);
  transition: all var(--t-fast);
}
.insight-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.insight-icon { width: 32px; height: 32px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; font-size: .9rem; flex-shrink: 0; }
.insight-card.green .insight-icon { background: var(--success-light); color: var(--success); }
.insight-card.red .insight-icon { background: var(--danger-light); color: var(--danger); }
.insight-card.blue .insight-icon { background: var(--info-light); color: var(--info); }
.insight-body { min-width: 0; }
.insight-label { display: block; font-size: .65rem; color: var(--text-muted); font-weight: 500; }
.insight-val { display: block; font-size: .875rem; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ================================================================
   PROGRESS BAR
   ================================================================ */
.progress-bar-wrap { display: flex; align-items: center; gap: .5rem; }
.progress-bar-track { flex: 1; height: 5px; background: var(--bg-muted); border-radius: var(--r-full); overflow: hidden; }
.progress-bar-fill { height: 100%; border-radius: var(--r-full); transition: width .5s ease; }
.progress-bar-fill.blue { background: var(--info); }
.progress-bar-fill.green { background: var(--success); }
.progress-bar-fill.brand { background: var(--brand); }
.progress-bar-fill.purple { background: #7C3AED; }
.progress-bar-fill.orange { background: var(--warning); }
.progress-bar-fill.gold { background: linear-gradient(90deg, #F59E0B, #FDE68A); }
.progress-label { font-size: .68rem; font-weight: 600; color: var(--text-muted); white-space: nowrap; }

/* ================================================================
   TRANSACTIONS LIST
   ================================================================ */
.transactions-list { display: flex; flex-direction: column; gap: .375rem; }
.transactions-list.full { margin-bottom: 5rem; }

.tx-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: .6875rem .875rem;
  display: flex; align-items: center; gap: .75rem;
  box-shadow: var(--shadow-xs);
  transition: all var(--t-fast);
  animation: itemFadeIn .2s ease;
}
@keyframes itemFadeIn { from { opacity: 0; transform: translateX(-4px); } to { opacity: 1; transform: translateX(0); } }
.tx-item:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); }

.tx-icon { width: 36px; height: 36px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; font-size: .9rem; flex-shrink: 0; }
.tx-icon.green { background: var(--success-light); color: var(--success); }
.tx-icon.red { background: var(--danger-light); color: var(--danger); }
.tx-icon.blue { background: var(--info-light); color: var(--info); }
.tx-icon.orange { background: var(--warning-light); color: var(--warning); }

.tx-body { flex: 1; min-width: 0; }
.tx-title { font-size: .8rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-sub { font-size: .68rem; color: var(--text-muted); margin-top: 1px; }

.tx-amount { font-size: .82rem; font-weight: 700; white-space: nowrap; flex-shrink: 0; }
.tx-amount.green { color: var(--success); }
.tx-amount.red { color: var(--danger); }
.tx-amount.blue { color: var(--info); }
.tx-amount.orange { color: var(--warning); }

.tx-actions { display: flex; gap: .25rem; flex-shrink: 0; }
.tx-actions .tc-btn {
  width: 26px; height: 26px;
  border-radius: var(--r-xs);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--t-fast);
}
.tx-actions .tc-btn:hover { color: var(--text-primary); background: var(--bg-muted); }
.tx-actions .tc-btn.danger:hover { color: var(--danger); background: var(--danger-light); border-color: var(--danger); }

/* ================================================================
   FORMS & INPUTS
   ================================================================ */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .75rem; }
.form-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-sm); }
.form-card-header {
  padding: .75rem 1rem;
  font-size: .8rem; font-weight: 700;
  display: flex; align-items: center; gap: .5rem;
  border-bottom: 1px solid var(--border);
}
.form-card-header.green { background: var(--success-light); color: #065F46; }
.form-card-header.red { background: var(--danger-light); color: #9B1C1C; }
.form-card-header.blue { background: var(--info-light); color: #1E3A5F; }
.form-card-header.orange { background: var(--warning-light); color: #78350F; }
.form-card-header.purple { background: #EDE9FE; color: #4C1D95; }
.form-card-header.brand { background: var(--brand-light); color: var(--brand-dark); }
.form-card-premium .form-card-header { padding: .875rem 1rem; }
.fch-left { display: flex; align-items: center; gap: .5rem; }
.fch-icon { width: 32px; height: 32px; border-radius: var(--r-xs); display: flex; align-items: center; justify-content: center; font-size: 1rem; }
.fch-icon.green { background: rgba(5,150,105,.12); color: var(--success); }
.fch-icon.red { background: rgba(229,62,62,.12); color: var(--danger); }
.fch-icon.blue { background: rgba(49,130,206,.12); color: var(--info); }
.fch-icon.orange { background: rgba(214,158,46,.12); color: var(--warning); }
.fch-title { font-size: .82rem; font-weight: 700; color: var(--text-primary); }
.fch-sub { font-size: .65rem; color: var(--text-muted); margin-top: 1px; }
.form-body { padding: 1rem; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .625rem; }
.form-group { margin-bottom: .625rem; }
.form-group:last-of-type { margin-bottom: 0; }
.form-group label { display: block; font-size: .72rem; font-weight: 600; color: var(--text-secondary); margin-bottom: .25rem; }

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: .5rem .75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg-subtle);
  color: var(--text-primary);
  font-size: .82rem;
  transition: border var(--t-fast), background var(--t-fast);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--border-focus);
  background: var(--bg-surface);
}

.input-prefix {
  display: flex; align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg-subtle);
  overflow: hidden;
  transition: border var(--t-fast);
}
.input-prefix:focus-within { border-color: var(--border-focus); background: var(--bg-surface); }
.input-prefix span {
  padding: .5rem .625rem;
  font-size: .78rem; color: var(--text-muted); font-weight: 600;
  background: var(--bg-muted);
  border-right: 1.5px solid var(--border);
  flex-shrink: 0;
}
.input-prefix input { flex: 1; border: none !important; background: transparent !important; padding: .5rem .625rem; }

.form-quick-stat { font-size: .68rem; color: var(--text-muted); margin-top: .375rem; display: flex; align-items: center; gap: .25rem; }
.form-quick-stat.red { color: var(--danger); }
.form-quick-stat i { font-size: .75rem; }

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .375rem;
  padding: .5625rem 1.125rem;
  border-radius: var(--r-sm);
  font-size: .8rem; font-weight: 600;
  transition: all var(--t-fast);
  cursor: pointer; border: none;
  margin-top: .625rem; width: 100%;
  letter-spacing: .01em;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,0,0,.12); }
.btn:active { transform: scale(.98); box-shadow: none; }
.btn-brand { background: var(--grad-brand); color: white; box-shadow: 0 4px 14px rgba(37,99,235,.3); border: none; }
.btn-brand:hover { opacity: .92; box-shadow: 0 6px 20px rgba(37,99,235,.4); }
.btn-green { background: var(--success); color: white; }
.btn-green:hover { background: #047857; }
.btn-red { background: var(--danger); color: white; }
.btn-red:hover { background: #C53030; }
.btn-blue { background: var(--info); color: white; }
.btn-blue:hover { background: #2B6CB0; }
.btn-orange { background: var(--warning); color: white; }
.btn-orange:hover { background: #B7791F; }
.btn-purple { background: #7C3AED; color: white; }
.btn-purple:hover { background: #6D28D9; }
.btn-ghost { background: var(--bg-subtle); color: var(--text-primary); border: 1.5px solid var(--border); margin-top: 0; }
.btn-ghost:hover { background: var(--bg-muted); box-shadow: none; }
.btn-sm { padding: .375rem .75rem; font-size: .72rem; width: auto; margin-top: 0; border-radius: var(--r-xs); }

/* btn-icon alias */
.btn-icon { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--r-sm); background: var(--bg-subtle); color: var(--text-secondary); font-size: .9rem; transition: all var(--t-fast); border: 1px solid transparent; }
.btn-icon:hover { background: var(--bg-muted); color: var(--text-primary); }

/* tb-btn alias */
#themeToggleMobile, #themeToggleMobile i { color: var(--text-secondary); }

/* ================================================================
   FILTER BAR & SEARCH
   ================================================================ */
.filter-bar { display: flex; gap: .375rem; flex-wrap: wrap; margin-bottom: .75rem; }
.filter-btn { padding: .3rem .75rem; border-radius: var(--r-full); font-size: .72rem; font-weight: 600; background: var(--bg-surface); border: 1.5px solid var(--border); color: var(--text-secondary); cursor: pointer; transition: all var(--t-fast); }
.filter-btn:hover { border-color: var(--brand); color: var(--brand); }
.filter-btn.active { background: var(--grad-brand); border-color: var(--brand); color: white; box-shadow: 0 2px 8px rgba(37,99,235,.25); }

.riwayat-search-wrap { position: relative; display: flex; align-items: center; margin-bottom: .75rem; background: var(--bg-surface); border: 1.5px solid var(--border); border-radius: var(--r-sm); transition: border var(--t-fast); }
.riwayat-search-wrap:focus-within { border-color: var(--border-focus); }
.riwayat-search-wrap i { position: absolute; left: .75rem; color: var(--text-muted); font-size: .9rem; pointer-events: none; }
.riwayat-search-wrap input { width: 100%; padding: .575rem .75rem .575rem 2.25rem; border: none; background: transparent; color: var(--text-primary); font-size: .82rem; }
.riwayat-search-clear { position: absolute; right: .625rem; color: var(--text-muted); font-size: 1rem; display: flex; align-items: center; transition: color var(--t-fast); }
.riwayat-search-clear:hover { color: var(--danger); }

/* ================================================================
   MODAL
   ================================================================ */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 1rem; opacity: 0; pointer-events: none; transition: opacity var(--t-base); backdrop-filter: blur(4px); }
.modal-backdrop.show { opacity: 1; pointer-events: all; }
.modal { background: var(--bg-surface); border-radius: var(--r-2xl); width: 100%; max-width: 450px; box-shadow: var(--shadow-xl); overflow: hidden; transform: scale(.95) translateY(12px); transition: transform var(--t-base); border: 1px solid var(--border); }
.modal-backdrop.show .modal { transform: scale(1) translateY(0); }
.modal-wide { max-width: 580px; }
.modal-header { padding: 1.125rem 1.375rem; font-size: .95rem; font-weight: 700; color: var(--text-primary); border-bottom: 1px solid var(--border); letter-spacing: -.1px; }
.modal-body { padding: 1.125rem 1.375rem; font-size: .82rem; color: var(--text-secondary); line-height: 1.6; max-height: 65vh; overflow-y: auto; }
.modal-footer { padding: .875rem 1.375rem; border-top: 1px solid var(--border); display: flex; gap: .5rem; justify-content: flex-end; }
.modal-footer .btn { width: auto; margin-top: 0; }

/* ================================================================
   TOAST
   ================================================================ */
.toast-container { position: fixed; top: 1rem; right: 1rem; z-index: 9999; display: flex; flex-direction: column; gap: .375rem; max-width: 300px; }
.toast { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-sm); padding: .75rem .875rem; display: flex; align-items: center; gap: .625rem; box-shadow: var(--shadow-lg); animation: slideInRight .2s ease; font-size: .78rem; color: var(--text-primary); }
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--info); }
.toast.warning { border-left: 3px solid var(--warning); }
.toast-icon { font-size: 1rem; flex-shrink: 0; }
.toast.success .toast-icon { color: var(--success); }
.toast.error .toast-icon { color: var(--danger); }
.toast.info .toast-icon { color: var(--info); }
.toast.warning .toast-icon { color: var(--warning); }
.toast-body { flex: 1; min-width: 0; }
.toast-title { font-weight: 700; font-size: .75rem; margin-bottom: 1px; }
.toast-msg { font-size: .68rem; color: var(--text-muted); }
.toast.hide { animation: slideOutRight .2s ease forwards; }
@keyframes slideInRight { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideOutRight { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(100%); } }

/* ================================================================
   ACHIEVEMENT POPUP
   ================================================================ */
.achievement-popup { position: fixed; bottom: 5rem; left: 50%; transform: translateX(-50%) translateY(100px); background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: .875rem 1.125rem; display: flex; align-items: center; gap: .75rem; box-shadow: var(--shadow-xl); z-index: 5000; transition: transform .4s cubic-bezier(.34,1.56,.64,1), opacity .3s ease; opacity: 0; pointer-events: none; }
.achievement-popup.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.ap-icon { font-size: 1.875rem; line-height: 1; }
.ap-content { min-width: 0; }
.ap-label { font-size: .62rem; font-weight: 700; color: var(--warning); text-transform: uppercase; letter-spacing: .06em; }
.ap-name { font-size: .82rem; font-weight: 700; color: var(--text-primary); }

/* ================================================================
   EMPTY STATE
   ================================================================ */
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--text-muted); }
.empty-state i { font-size: 1.875rem; margin-bottom: .5rem; display: block; }
.empty-state p { font-size: .78rem; }

/* ================================================================
   PAGE HERO BANNERS
   ================================================================ */
.page-hero { background: var(--grad-brand); border-radius: var(--r-xl); padding: 1.25rem 1.5rem; display: flex; align-items: center; gap: 1rem; color: white; margin-bottom: 1.25rem; box-shadow: var(--shadow-brand); }
.page-hero.keuangan-hero { background: var(--grad-success); box-shadow: 0 8px 24px rgba(5,150,105,.25); }
.page-hero.tabungan-hero { background: linear-gradient(135deg, #0284C7 0%, #0EA5E9 100%); box-shadow: 0 8px 24px rgba(2,132,199,.25); }
.page-hero.target-hero { background: linear-gradient(135deg, #7C3AED 0%, #DB2777 100%); box-shadow: 0 8px 24px rgba(124,58,237,.25); }
.page-hero.riwayat-hero { background: var(--grad-gold); box-shadow: 0 8px 24px rgba(217,119,6,.25); }
.page-hero.statistik-hero { background: linear-gradient(135deg, #1D4ED8 0%, #4F46E5 100%); box-shadow: 0 8px 24px rgba(29,78,216,.25); }
.page-hero.achievement-hero { background: var(--warning); }
.ph-icon { width: 40px; height: 40px; border-radius: var(--r-sm); background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; flex-shrink: 0; }
.ph-text h1 { font-size: 1.05rem; font-weight: 700; }
.ph-text p { font-size: .7rem; opacity: .8; margin-top: 1px; }
.page-header { margin-bottom: 1.125rem; }
.page-header h1 { font-size: 1.25rem; font-weight: 700; color: var(--text-primary); }
.subtitle { color: var(--text-muted); font-size: .78rem; margin-top: .2rem; }

/* ================================================================
   DAILY TARGET / PERIODIC SAVING
   ================================================================ */
.daily-target-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 1rem; box-shadow: var(--shadow-sm); }
.dt-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.dt-left { display: flex; align-items: center; gap: .5rem; }
.dt-period-badge { font-size: .65rem; font-weight: 700; background: var(--brand-light); color: var(--brand); padding: 2px 8px; border-radius: var(--r-full); }
.dt-amount { font-size: .9rem; font-weight: 700; color: var(--text-primary); }
.dt-period-range { font-size: .68rem; color: var(--text-muted); }
.dt-meta { display: flex; justify-content: space-between; align-items: center; margin-top: .5rem; font-size: .72rem; color: var(--text-muted); }
.dt-status-pill { font-size: .65rem; font-weight: 600; padding: 2px 8px; border-radius: var(--r-full); background: var(--bg-muted); color: var(--text-muted); }
.dt-status-pill.done { background: var(--success-light); color: var(--success); }
.dt-status-pill.pending { background: var(--warning-light); color: var(--warning); }

/* Period tabs */
.period-tabs { display: flex; background: var(--bg-muted); border-radius: var(--r-sm); padding: 3px; gap: 2px; }
.period-tab { flex: 1; padding: .375rem .5rem; border-radius: calc(var(--r-sm) - 2px); font-size: .75rem; font-weight: 600; color: var(--text-muted); background: transparent; border: none; cursor: pointer; transition: all var(--t-fast); }
.period-tab.active { background: var(--bg-surface); color: var(--brand); box-shadow: var(--shadow-xs); }
.period-preview { font-size: .75rem; color: var(--text-muted); background: var(--bg-subtle); border-radius: var(--r-xs); padding: .5rem .75rem; margin-top: .5rem; border: 1px solid var(--border); line-height: 1.5; }
.current-period-info { background: var(--brand-light); border: 1px solid var(--brand-mid); border-radius: var(--r-sm); padding: .75rem; margin-top: .75rem; font-size: .75rem; color: var(--brand-dark); }
.cpi-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .375rem; }
.cpi-badge { font-size: .65rem; font-weight: 700; background: var(--brand); color: white; padding: 2px 8px; border-radius: var(--r-full); }
.cpi-nominal { font-size: .82rem; font-weight: 700; color: var(--brand); }
.cpi-meta { font-size: .68rem; color: var(--text-muted); margin-top: .375rem; display: flex; justify-content: space-between; }
.cpi-done { color: var(--success); font-weight: 600; }
.week-selector { display: flex; flex-wrap: wrap; gap: .375rem; }
.week-btn { padding: .3rem .625rem; border-radius: var(--r-xs); font-size: .72rem; font-weight: 600; background: var(--bg-subtle); border: 1.5px solid var(--border); color: var(--text-secondary); cursor: pointer; transition: all var(--t-fast); }
.week-btn.active { background: var(--brand); border-color: var(--brand); color: white; }

/* ================================================================
   TARGETS MINI (Dashboard)
   ================================================================ */
.targets-mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .625rem; }
.target-mini-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: .875rem 1rem; box-shadow: var(--shadow-xs); transition: all var(--t-fast); }
.target-mini-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.tmc-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: .375rem; }
.tmc-name { font-size: .78rem; font-weight: 600; color: var(--text-primary); }
.tmc-pct { font-size: .68rem; font-weight: 700; color: var(--brand); }
.tmc-amounts { display: flex; justify-content: space-between; margin-top: .25rem; }
.tmc-collected { font-size: .68rem; color: var(--text-muted); }
.tmc-goal { font-size: .68rem; color: var(--text-muted); }

/* ================================================================
   AKUN BREAKDOWN (Dashboard)
   ================================================================ */
.akun-breakdown-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-bottom: .5rem; }
.ab-section { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: .875rem; box-shadow: var(--shadow-xs); }
.ab-sec-title { display: flex; justify-content: space-between; align-items: center; font-size: .72rem; font-weight: 700; color: var(--text-muted); margin-bottom: .5rem; padding-bottom: .5rem; border-bottom: 1px solid var(--border); }
.ab-sec-item { display: flex; justify-content: space-between; align-items: center; font-size: .75rem; color: var(--text-primary); padding: .2rem 0; }
.ab-actions { display: flex; gap: .5rem; margin-top: .5rem; }

/* ================================================================
   KEUANGAN SUMMARY STRIP
   ================================================================ */
.keuangan-summary-strip { display: flex; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-sm); margin-bottom: 1rem; }
.ks-item { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: .875rem 1rem; }
.ks-divider { width: 1px; background: var(--border); flex-shrink: 0; }
.ks-label { font-size: .62rem; color: var(--text-muted); display: flex; align-items: center; gap: 3px; font-weight: 500; }
.ks-label i { font-size: .68rem; }
.ks-value { font-size: .95rem; font-weight: 700; color: var(--text-primary); }
.ks-value.blue { color: var(--info); }
.ks-value.green { color: var(--success); }
.ks-value.purple { color: #7C3AED; }
.ks-value.red { color: var(--danger); }

/* ================================================================
   ALLOCATION BAR (Tabungan)
   ================================================================ */
.allocation-bar-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: .875rem 1rem; box-shadow: var(--shadow-sm); margin-bottom: .75rem; }
.ab-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.ab-title { font-size: .78rem; font-weight: 600; color: var(--text-primary); display: flex; align-items: center; gap: .375rem; }
.ab-sub { font-size: .68rem; color: var(--text-muted); }
.ab-track { height: 7px; border-radius: var(--r-full); overflow: hidden; display: flex; background: var(--bg-muted); }
.ab-fill-savings { height: 100%; background: var(--success); transition: width .5s ease; }
.ab-fill-available { height: 100%; background: var(--brand); transition: width .5s ease; }
.ab-legend { display: flex; gap: 1rem; margin-top: .5rem; }
.ab-leg-item { display: flex; align-items: center; gap: .375rem; font-size: .68rem; color: var(--text-muted); }
.ab-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ab-dot.green { background: var(--success); }
.ab-dot.blue { background: var(--brand); }

/* ================================================================
   TARGET CARDS (Target page)
   ================================================================ */
.target-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .75rem; margin-bottom: 5rem; }
.target-card-v2 { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-sm); transition: all var(--t-fast); }
.target-card-v2:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.tc-gradient-header { background: var(--brand-light); padding: 1.125rem; position: relative; text-align: center; border-bottom: 1px solid var(--border); }
.tc-actions-abs { position: absolute; top: .625rem; right: .625rem; display: flex; gap: .25rem; }
.tc-btn { width: 26px; height: 26px; border-radius: var(--r-xs); display: flex; align-items: center; justify-content: center; font-size: .75rem; color: var(--text-muted); background: var(--bg-surface); border: 1px solid var(--border); cursor: pointer; transition: all var(--t-fast); }
.tc-btn:hover { color: var(--text-primary); background: var(--bg-subtle); }
.tc-btn.danger:hover { color: var(--danger); background: var(--danger-light); border-color: var(--danger); }
.tc-emoji-big { font-size: 1.875rem; display: block; margin-bottom: .375rem; }
.tc-name-big { font-size: .9rem; font-weight: 700; color: var(--text-primary); }
.tc-goal-label { font-size: .68rem; color: var(--text-muted); margin-top: 2px; }
.tc-body-v2 { padding: .875rem; }
.tc-collected-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .5rem; }
.tc-collected-v2 { font-size: 1.125rem; font-weight: 800; color: var(--text-primary); }
.tc-goal-v2 { font-size: .72rem; color: var(--text-muted); }
.tc-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--r-full); font-size: .65rem; font-weight: 600; background: var(--success-light); color: var(--success); margin-top: .25rem; }
.tc-kekurangan { font-size: .72rem; color: var(--text-muted); margin-top: .25rem; }
.tc-est-date { font-size: .68rem; color: var(--brand); margin-top: .375rem; display: flex; align-items: center; gap: .25rem; }

/* ================================================================
   TARGETS BALANCE LIST (Tabungan page)
   ================================================================ */
.targets-balance-list { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 5rem; }
.tbl-item { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-sm); padding: .75rem .875rem; display: flex; align-items: center; gap: .75rem; box-shadow: var(--shadow-xs); }
.tbl-emoji-wrap { font-size: 1.25rem; flex-shrink: 0; }
.tbl-body { flex: 1; min-width: 0; }
.tbl-name { font-size: .78rem; font-weight: 600; color: var(--text-primary); }
.tbl-bar { margin-top: .25rem; }
.tbl-amounts { display: flex; justify-content: space-between; font-size: .65rem; color: var(--text-muted); margin-top: 2px; }
.tbl-balance { text-align: right; flex-shrink: 0; }
.tbl-balance-val { font-size: .875rem; font-weight: 700; color: var(--brand); }
.tbl-balance-pct { font-size: .62rem; color: var(--text-muted); }

/* ================================================================
   STATISTIK
   ================================================================ */
.statistik-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .625rem; margin-bottom: 1rem; }
.ss-item { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: .875rem 1rem; display: flex; align-items: center; gap: .625rem; box-shadow: var(--shadow-xs); }
.ss-icon { width: 32px; height: 32px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; font-size: .9rem; flex-shrink: 0; }
.ss-icon.green { background: var(--success-light); color: var(--success); }
.ss-icon.red { background: var(--danger-light); color: var(--danger); }
.ss-icon.blue { background: var(--info-light); color: var(--info); }
.ss-icon.purple { background: #EDE9FE; color: #7C3AED; }
.ss-body { min-width: 0; }
.ss-label { display: block; font-size: .65rem; color: var(--text-muted); font-weight: 500; }
.ss-val { display: block; font-size: .9rem; font-weight: 700; color: var(--text-primary); }
.ss-val.green { color: var(--success); }
.ss-val.red { color: var(--danger); }
.ss-val.blue { color: var(--info); }
.ss-val.purple { color: #7C3AED; }
.charts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: .75rem; margin-bottom: 5rem; }
.chart-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 1rem; box-shadow: var(--shadow-sm); }
.chart-title { font-size: .78rem; font-weight: 700; color: var(--text-primary); margin-bottom: .875rem; }

/* ================================================================
   CALCULATOR
   ================================================================ */
.calc-wrapper { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.125rem; margin-bottom: 5rem; }
.calc-result { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 1.125rem; box-shadow: var(--shadow-sm); animation: pageFadeIn .2s ease; }
.result-title { font-size: .875rem; font-weight: 700; color: var(--text-primary); margin-bottom: .875rem; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .625rem; margin-bottom: .875rem; }
.result-item { display: flex; flex-direction: column; gap: 2px; }
.result-label { font-size: .65rem; color: var(--text-muted); font-weight: 500; }
.result-value { font-size: .9rem; font-weight: 700; color: var(--text-primary); }
.result-value.green { color: var(--success); }
.result-value.red { color: var(--danger); }
.result-value.blue { color: var(--info); }
.result-value.purple { color: #7C3AED; }

/* ================================================================
   ACHIEVEMENT
   ================================================================ */
.achievement-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .75rem; margin-bottom: 5rem; }
.ach-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 1.125rem .875rem; text-align: center; box-shadow: var(--shadow-xs); transition: all var(--t-fast); position: relative; overflow: hidden; }
.ach-card.unlocked { border-color: var(--warning); background: var(--warning-light); }
.ach-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.ach-icon { font-size: 2.125rem; margin-bottom: .5rem; display: block; }
.ach-name { font-size: .78rem; font-weight: 700; color: var(--text-primary); margin-bottom: .2rem; }
.ach-desc { font-size: .65rem; color: var(--text-muted); line-height: 1.4; }
.ach-locked { opacity: .4; filter: grayscale(1); }
.ach-badge { position: absolute; top: 7px; right: 7px; background: var(--warning); color: white; font-size: .58rem; font-weight: 700; padding: 1px 6px; border-radius: var(--r-full); }
.ach-lock-overlay { position: absolute; top: 7px; left: 7px; color: var(--text-muted); font-size: .82rem; }
.ach-progress-hint { font-size: .62rem; color: var(--text-muted); margin-top: .375rem; display: flex; align-items: center; gap: .2rem; justify-content: center; }
.locked-card { background: var(--bg-subtle); }

/* ================================================================
   HUTANG
   ================================================================ */
.hutang-tabs { display: flex; gap: .375rem; flex-wrap: wrap; margin-bottom: .75rem; }
.hutang-tab { padding: .3rem .75rem; border-radius: var(--r-full); font-size: .72rem; font-weight: 600; background: var(--bg-surface); border: 1.5px solid var(--border); color: var(--text-secondary); cursor: pointer; transition: all var(--t-fast); }
.hutang-tab.active { background: var(--grad-brand); border-color: var(--brand); color: white; }
.hutang-header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: .75rem; }
.hutang-count { font-size: .75rem; color: var(--text-muted); font-weight: 500; }
.hutang-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: .875rem 1rem; box-shadow: var(--shadow-xs); margin-bottom: .5rem; transition: all var(--t-fast); }
.hutang-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.hc-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: .625rem; }
.hc-left { display: flex; align-items: center; gap: .625rem; }
.hc-avatar { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .875rem; font-weight: 700; color: white; flex-shrink: 0; }
.hc-avatar.piutang { background: var(--success); }
.hc-avatar.hutang { background: var(--warning); }
.hc-avatar.lunas { background: var(--text-muted); }
.hc-name { font-size: .82rem; font-weight: 700; color: var(--text-primary); }
.hc-type-badge { display: inline-block; font-size: .62rem; font-weight: 600; padding: 1px 6px; border-radius: var(--r-full); margin-top: 2px; }
.hc-type-badge.piutang { background: var(--success-light); color: var(--success); }
.hc-type-badge.hutang { background: var(--warning-light); color: var(--warning); }
.hc-type-badge.lunas { background: var(--bg-muted); color: var(--text-muted); }
.hc-amount { font-size: 1rem; font-weight: 800; }
.hc-amount.piutang { color: var(--success); }
.hc-amount.hutang { color: var(--warning); }
.hc-amount.lunas { color: var(--text-muted); }
.hc-progress { margin: .375rem 0; }
.hc-meta { display: flex; justify-content: space-between; align-items: flex-end; margin-top: .5rem; }
.hc-meta-left { display: flex; flex-direction: column; gap: 1px; }
.hc-note { font-size: .68rem; color: var(--text-muted); font-style: italic; }
.hc-dates { font-size: .62rem; color: var(--text-muted); }
.hc-due { font-size: .65rem; font-weight: 600; display: flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: var(--r-full); }
.hc-due.ok { background: var(--success-light); color: var(--success); }
.hc-due.soon { background: var(--warning-light); color: var(--warning); }
.hc-due.overdue { background: var(--danger-light); color: var(--danger); }
.hc-due.nolimit { background: var(--bg-muted); color: var(--text-muted); }
.hc-actions { display: flex; gap: .375rem; margin-top: .625rem; flex-wrap: wrap; }
.hc-btn { display: inline-flex; align-items: center; gap: .25rem; padding: .3rem .625rem; border-radius: var(--r-xs); font-size: .68rem; font-weight: 600; color: var(--text-secondary); background: var(--bg-subtle); border: 1px solid var(--border); cursor: pointer; transition: all var(--t-fast); }
.hc-btn:hover { background: var(--bg-muted); color: var(--text-primary); }
.hc-btn.bayar-btn { background: var(--brand-light); color: var(--brand); border-color: var(--brand-mid); }
.hc-btn.bayar-btn:hover { background: var(--brand); color: white; }
.hc-btn.lunas-btn { background: var(--success-light); color: var(--success); border-color: var(--success); }
.hc-btn.lunas-btn:hover { background: var(--success); color: white; }
.hc-btn.del-btn:hover { background: var(--danger-light); color: var(--danger); border-color: var(--danger); }
.hutang-saldo-info { font-size: .72rem; color: var(--text-secondary); background: var(--bg-subtle); border-radius: var(--r-xs); padding: .5rem .75rem; margin-top: .5rem; border: 1px solid var(--border); line-height: 1.5; }
.hutang-form { display: flex; flex-direction: column; gap: .625rem; }
.hf-row { display: grid; grid-template-columns: 1fr 1fr; gap: .625rem; }
.hf-row .form-group { margin-bottom: 0; }
.selisih-positif { color: var(--success) !important; }
.selisih-negatif { color: var(--danger) !important; }
.selisih-nol { color: var(--text-muted) !important; }

/* ================================================================
   PAYLATER
   ================================================================ */
.pl-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: .875rem 1rem; box-shadow: var(--shadow-xs); margin-bottom: .5rem; cursor: pointer; transition: all var(--t-fast); }
.pl-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); border-color: var(--brand); }
.pl-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: .5rem; }
.pl-card-name { font-size: .82rem; font-weight: 700; color: var(--text-primary); }
.pl-card-provider { font-size: .68rem; color: var(--text-muted); }
.pl-card-cicilan { font-size: .9rem; font-weight: 700; color: var(--brand); text-align: right; }
.pl-card-cicilan span { font-size: .62rem; color: var(--text-muted); font-weight: 500; }
.pl-card-meta { display: flex; justify-content: space-between; align-items: center; margin-top: .375rem; }
.pl-status-badge { display: inline-block; font-size: .62rem; font-weight: 700; padding: 2px 7px; border-radius: var(--r-full); }
.pl-status-badge.aktif { background: var(--info-light); color: var(--info); }
.pl-status-badge.lunas { background: var(--success-light); color: var(--success); }
.pl-due-badge { display: inline-block; font-size: .62rem; font-weight: 600; padding: 2px 6px; border-radius: var(--r-full); }
.pl-due-badge.belum { background: var(--bg-muted); color: var(--text-muted); }
.pl-due-badge.jatuhtempo { background: var(--warning-light); color: var(--warning); }
.pl-due-badge.terlambat { background: var(--danger-light); color: var(--danger); }
.pl-notif { display: flex; align-items: center; gap: .5rem; padding: .5rem .75rem; border-radius: var(--r-xs); font-size: .75rem; font-weight: 500; margin-bottom: .375rem; }
.pl-notif-red { background: var(--danger-light); color: var(--danger); border: 1px solid var(--danger); }
.pl-notif-orange { background: var(--warning-light); color: var(--warning); border: 1px solid var(--warning); }
.pl-notif-green { background: var(--success-light); color: var(--success); border: 1px solid var(--success); }
.pl-notif-blue { background: var(--info-light); color: var(--info); border: 1px solid var(--info); }
.pl-detail { font-size: .78rem; }
.pl-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem .75rem; margin-bottom: .75rem; }
.pl-detail-row { display: flex; justify-content: space-between; align-items: center; padding: .375rem 0; border-bottom: 1px solid var(--border); font-size: .75rem; }
.pl-detail-row span:first-child { color: var(--text-muted); }
.pl-detail-row span:last-child { font-weight: 600; color: var(--text-primary); }
.pl-progress-block { background: var(--bg-subtle); border-radius: var(--r-sm); padding: .75rem; margin-bottom: .75rem; }
.pl-prog-label { font-size: .72rem; font-weight: 600; color: var(--text-primary); margin-bottom: .375rem; }
.pl-schedule-list { display: flex; flex-direction: column; gap: .375rem; max-height: 300px; overflow-y: auto; }
.pl-inst-row { display: flex; align-items: center; gap: .625rem; padding: .5rem .625rem; background: var(--bg-subtle); border-radius: var(--r-sm); font-size: .75rem; }
.pl-inst-no { width: 22px; height: 22px; border-radius: 50%; background: var(--bg-muted); display: flex; align-items: center; justify-content: center; font-size: .62rem; font-weight: 700; color: var(--text-muted); flex-shrink: 0; }
.pl-inst-body { flex: 1; min-width: 0; }
.pl-inst-status { display: inline-block; font-size: .62rem; font-weight: 600; padding: 1px 6px; border-radius: var(--r-full); margin-top: 1px; }
.pl-inst-status.belum { background: var(--bg-surface); color: var(--text-muted); border: 1px solid var(--border); }
.pl-inst-status.jt { background: var(--warning-light); color: var(--warning); }
.pl-inst-status.terlambat { background: var(--danger-light); color: var(--danger); }
.pl-inst-status.dibayar { background: var(--success-light); color: var(--success); }
.pl-inst-status.batal { background: var(--bg-muted); color: var(--text-muted); }
.pl-preview { background: var(--bg-subtle); border-radius: var(--r-sm); padding: .75rem; margin-top: .75rem; border: 1px solid var(--border); font-size: .75rem; }
.pl-preview-title { font-size: .72rem; font-weight: 700; color: var(--text-primary); margin-bottom: .5rem; }
.pl-preview-total, .pl-preview-cicilan { display: flex; justify-content: space-between; align-items: center; padding: .375rem 0; border-top: 1px solid var(--border); margin-top: .375rem; }
.pl-form { display: flex; flex-direction: column; gap: .625rem; }
.vf-row { display: grid; gap: .625rem; }
.vf-row-2 { grid-template-columns: 1fr 1fr; }
.vf-row-3 { grid-template-columns: 1fr 1fr auto; }
.vf-col-2 { grid-column: span 2; }
.vf-col-icon { width: 80px; }

/* ================================================================
   AKUN PAGE
   ================================================================ */
.akun-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-sm); padding: .75rem .875rem; display: flex; align-items: center; gap: .75rem; box-shadow: var(--shadow-xs); transition: all var(--t-fast); }
.akun-card:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.akun-icon { width: 38px; height: 38px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; font-size: 1.125rem; flex-shrink: 0; background: var(--brand-light); }
.akun-body { flex: 1; min-width: 0; }
.akun-name { font-size: .82rem; font-weight: 600; color: var(--text-primary); }
.akun-type-label { font-size: .65rem; color: var(--text-muted); }
.akun-saldo { font-size: .95rem; font-weight: 700; color: var(--text-primary); white-space: nowrap; margin-right: .5rem; }
.akun-actions { display: flex; gap: .25rem; flex-shrink: 0; }
.akun-presets { display: flex; flex-wrap: wrap; gap: .375rem; margin-bottom: .5rem; }
.preset-btn { padding: .3rem .625rem; border-radius: var(--r-xs); font-size: .68rem; font-weight: 600; background: var(--bg-subtle); border: 1.5px solid var(--border); color: var(--text-secondary); cursor: pointer; transition: all var(--t-fast); }
.preset-btn:hover { background: var(--brand-light); border-color: var(--brand); color: var(--brand); }

/* ================================================================
   TRANSFER
   ================================================================ */
.transfer-form-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 1.125rem; box-shadow: var(--shadow-sm); margin-bottom: 1rem; }
.transfer-arrow { display: flex; align-items: center; justify-content: center; padding: .75rem 0; color: var(--text-muted); font-size: 1.375rem; }
.transfer-list { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 5rem; }
.transfer-item { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-sm); padding: .75rem .875rem; display: flex; align-items: center; gap: .75rem; box-shadow: var(--shadow-xs); }
.transfer-icon { width: 34px; height: 34px; border-radius: var(--r-sm); background: var(--brand-light); color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: .9rem; flex-shrink: 0; }
.transfer-body { flex: 1; min-width: 0; }
.transfer-route { font-size: .78rem; font-weight: 600; color: var(--text-primary); }
.transfer-note { font-size: .65rem; color: var(--text-muted); }
.transfer-amount { font-size: .875rem; font-weight: 700; color: var(--brand); white-space: nowrap; }
.transfer-date { font-size: .62rem; color: var(--text-muted); }

/* ================================================================
   SETTINGS PAGE
   ================================================================ */
.user-account-card { display: flex; align-items: center; gap: .875rem; background: var(--brand-light); border: 1.5px solid var(--brand-mid); border-radius: var(--r-md); padding: 1rem 1.125rem; margin-bottom: 1rem; box-shadow: var(--shadow-xs); }
.uac-avatar { width: 40px; height: 40px; border-radius: var(--r-md); background: var(--brand); color: white; display: flex; align-items: center; justify-content: center; font-size: 1.125rem; flex-shrink: 0; }
.uac-info { flex: 1; min-width: 0; }
.uac-name { font-size: .875rem; font-weight: 700; color: var(--text-primary); }
.uac-email { font-size: .68rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uac-badge { display: inline-flex; align-items: center; gap: .2rem; font-size: .62rem; font-weight: 700; color: var(--brand); background: var(--brand-light); padding: 1px 6px; border-radius: var(--r-full); margin-top: 2px; border: 1px solid var(--brand-mid); }
.uac-logout-btn { display: flex; align-items: center; gap: .3rem; padding: .375rem .75rem; border-radius: var(--r-xs); background: var(--danger-light); color: var(--danger); border: 1px solid var(--danger); font-size: .72rem; font-weight: 600; cursor: pointer; transition: all var(--t-fast); font-family: inherit; flex-shrink: 0; }
.uac-logout-btn:hover { background: var(--danger); color: white; }

.app-banner { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: .875rem 1rem; display: flex; align-items: center; gap: .875rem; box-shadow: var(--shadow-xs); margin-bottom: 1rem; }
.app-banner-icon { width: 40px; height: 40px; border-radius: var(--r-sm); background: var(--brand); color: white; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; flex-shrink: 0; }
.app-banner-info { flex: 1; }
.app-banner-name { font-size: .875rem; font-weight: 700; color: var(--text-primary); }
.app-banner-tagline { font-size: .65rem; color: var(--text-muted); }
.app-banner-version { text-align: right; }
.version-badge { display: inline-block; font-size: .62rem; font-weight: 700; background: var(--brand); color: white; padding: 2px 7px; border-radius: var(--r-full); }
.version-stable { display: block; font-size: .6rem; color: var(--text-muted); text-align: right; margin-top: 2px; }

.settings-section { margin-bottom: 1.25rem; }
.settings-title { font-size: .68rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .07em; margin-bottom: .5rem; display: flex; align-items: center; gap: .375rem; }
.settings-cards { display: flex; flex-direction: column; gap: .375rem; }
.setting-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-sm); padding: .75rem .875rem; display: flex; align-items: center; gap: .75rem; box-shadow: var(--shadow-xs); }
.setting-icon { width: 32px; height: 32px; border-radius: var(--r-xs); display: flex; align-items: center; justify-content: center; font-size: .9rem; flex-shrink: 0; }
.setting-icon.green { background: var(--success-light); color: var(--success); }
.setting-icon.blue { background: var(--info-light); color: var(--info); }
.setting-icon.red { background: var(--danger-light); color: var(--danger); }
.setting-icon.orange { background: var(--warning-light); color: var(--warning); }
.setting-icon.purple { background: #EDE9FE; color: #7C3AED; }
.setting-info { flex: 1; min-width: 0; }
.setting-name { font-size: .78rem; font-weight: 600; color: var(--text-primary); }
.setting-desc { font-size: .65rem; color: var(--text-muted); margin-top: 1px; }
.info-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-xs); }
.info-row { display: flex; justify-content: space-between; align-items: center; padding: .625rem 1rem; border-bottom: 1px solid var(--border); font-size: .78rem; }
.info-row:last-child { border-bottom: none; }
.info-row span:first-child { color: var(--text-muted); }
.info-row span:last-child { font-weight: 600; color: var(--text-primary); }
.info-badge-blue { display: inline-block; font-size: .68rem; font-weight: 700; background: var(--info-light); color: var(--info); padding: 2px 7px; border-radius: var(--r-full); }
.usage-stats-grid, .usage-stat-card { /* legacy aliases */ }
.usage-stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .5rem; }
.usage-stat-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-sm); padding: .75rem; text-align: center; box-shadow: var(--shadow-xs); }
.us-icon { width: 32px; height: 32px; border-radius: var(--r-xs); display: flex; align-items: center; justify-content: center; font-size: .9rem; margin: 0 auto .375rem; }
.us-icon.blue { background: var(--info-light); color: var(--info); }
.us-icon.green { background: var(--success-light); color: var(--success); }
.us-icon.orange { background: var(--warning-light); color: var(--warning); }
.us-icon.purple { background: #EDE9FE; color: #7C3AED; }
.us-val, .stat-card-val { font-size: 1.25rem; font-weight: 800; color: var(--brand); display: block; }
.us-label, .stat-card-label { font-size: .62rem; color: var(--text-muted); margin-top: 2px; display: block; }

.changelog-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 1rem; box-shadow: var(--shadow-xs); margin-bottom: 5rem; }
.cl-version { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.cl-badge { font-size: .68rem; font-weight: 700; padding: 2px 7px; border-radius: var(--r-full); background: var(--brand-light); color: var(--brand); }
.cl-badge.new { background: var(--success-light); color: var(--success); }
.cl-date { font-size: .68rem; color: var(--text-muted); }
.cl-list { display: flex; flex-direction: column; gap: .3rem; padding-left: .25rem; }
.cl-list li { display: flex; align-items: flex-start; gap: .5rem; font-size: .75rem; color: var(--text-secondary); }
.cl-list li i { font-size: .85rem; flex-shrink: 0; margin-top: 1px; }
.cl-list li .ri-checkbox-circle-line { color: var(--success); }
.cl-list li .ri-add-circle-line { color: var(--brand); }
.cl-old li { opacity: .55; }

/* Toggle switch */
.toggle-switch { position: relative; display: inline-flex; width: 42px; height: 22px; flex-shrink: 0; cursor: pointer; }
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track, .toggle-slider { position: absolute; cursor: pointer; inset: 0; background: var(--bg-muted); border-radius: var(--r-full); transition: background var(--t-fast); }
.toggle-track::before, .toggle-slider::before { content: ''; position: absolute; height: 16px; width: 16px; left: 3px; top: 3px; background: white; border-radius: 50%; transition: transform var(--t-fast); box-shadow: var(--shadow-xs); }
.toggle-switch input:checked + .toggle-track, .toggle-switch input:checked + .toggle-slider { background: var(--brand); }
.toggle-switch input:checked + .toggle-track::before, .toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }
.toggle-switch-wrap { display: flex; align-items: center; justify-content: space-between; width: 100%; }
#themeIconSetting { width: 32px; height: 32px; border-radius: var(--r-xs); display: inline-flex; align-items: center; justify-content: center; font-size: .9rem; transition: all var(--t-fast); }

/* ================================================================
   VAULT
   ================================================================ */
.vault-lock-wrap { max-width: 360px; margin: 2rem auto; text-align: center; padding: 1.875rem 1.5rem; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-md); }
.vault-lock-icon { width: 56px; height: 56px; border-radius: var(--r-md); background: var(--brand-light); color: var(--brand); font-size: 1.5rem; display: flex; align-items: center; justify-content: center; margin: 0 auto .875rem; transition: all var(--t-base); }
.vault-lock-icon.setup { background: var(--success-light); color: var(--success); }
.vault-lock-icon.forgot { background: var(--warning-light); color: var(--warning); }
.vault-lock-title { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); margin-bottom: .25rem; }
.vault-lock-desc { font-size: .75rem; color: var(--text-muted); margin-bottom: 1.125rem; line-height: 1.5; }
.vault-lock-form { display: flex; flex-direction: column; gap: .5rem; }
.vault-lock-form .form-group { margin-bottom: 0; text-align: left; }
.vault-lock-form select { width: 100%; padding: .5rem .75rem; border: 1.5px solid var(--border); border-radius: var(--r-sm); background: var(--bg-subtle); color: var(--text-primary); font-size: .82rem; font-family: inherit; transition: border var(--t-fast); cursor: pointer; }
.vault-lock-form select:focus { border-color: var(--border-focus); outline: none; }
.vault-pin-input-wrap { position: relative; display: flex; align-items: center; }
.vault-master-input { width: 100%; padding: .5625rem 2.5rem .5625rem .75rem; border: 1.5px solid var(--border); border-radius: var(--r-sm); background: var(--bg-subtle); color: var(--text-primary); font-size: .82rem; transition: border var(--t-fast); }
.vault-master-input:focus { border-color: var(--border-focus); outline: none; background: var(--bg-surface); }
.vault-eye-btn { position: absolute; right: .625rem; color: var(--text-muted); font-size: .95rem; display: flex; align-items: center; cursor: pointer; background: none; border: none; transition: color var(--t-fast); }
.vault-eye-btn:hover { color: var(--text-primary); }
.vault-error { font-size: .72rem; color: var(--danger); background: var(--danger-light); border-radius: var(--r-xs); padding: .5rem .75rem; text-align: left; border: 1px solid var(--danger); }
.vault-unlock-btn { margin-top: .25rem; }
.vault-hint { margin-top: .75rem; font-size: .68rem; color: var(--text-secondary); background: var(--warning-light); padding: .5rem .75rem; border-radius: var(--r-xs); line-height: 1.5; text-align: left; border: 1px solid var(--warning); }
.vault-forgot-link { background: none; border: none; color: var(--brand); font-size: .75rem; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: .25rem; padding: .375rem; border-radius: var(--r-xs); transition: background var(--t-fast); width: 100%; }
.vault-forgot-link:hover { background: var(--brand-light); }
.vault-setup-step-label { display: flex; align-items: center; gap: .5rem; font-size: .68rem; font-weight: 700; color: var(--success); background: var(--success-light); padding: .375rem .625rem; border-radius: var(--r-xs); text-align: left; }
.vault-setup-step-desc { font-size: .72rem; color: var(--text-muted); line-height: 1.5; text-align: left; }
.vault-sq-label { display: block; font-size: .72rem; font-weight: 600; color: var(--text-secondary); margin-bottom: .25rem; text-align: left; }
.vault-forgot-header { display: flex; align-items: center; gap: .5rem; font-size: .82rem; font-weight: 700; color: var(--text-primary); }
.vault-back-btn { display: flex; align-items: center; gap: .2rem; padding: .3rem .5rem; border-radius: var(--r-xs); font-size: .68rem; font-weight: 600; color: var(--text-muted); background: var(--bg-subtle); border: 1px solid var(--border); cursor: pointer; transition: all var(--t-fast); }
.vault-back-btn:hover { background: var(--bg-muted); color: var(--text-primary); }
.vault-reset-warning { display: flex; align-items: flex-start; gap: .5rem; background: var(--danger-light); border: 1px solid var(--danger); border-radius: var(--r-xs); padding: .625rem .875rem; font-size: .72rem; color: var(--danger); text-align: left; line-height: 1.5; }
.vault-reset-warning i { font-size: .9rem; flex-shrink: 0; margin-top: 1px; }
.vault-reset-info-ok { display: flex; align-items: flex-start; gap: .5rem; background: var(--success-light); border: 1px solid var(--success); border-radius: var(--r-xs); padding: .625rem .875rem; font-size: .72rem; color: var(--success); text-align: left; line-height: 1.5; }
.vault-reset-info-ok i { font-size: .9rem; flex-shrink: 0; margin-top: 1px; }
.vault-no-sq-box { display: flex; gap: .625rem; align-items: flex-start; background: var(--warning-light); border: 1px solid var(--warning); border-radius: var(--r-xs); padding: .75rem .875rem; text-align: left; font-size: .72rem; color: var(--text-primary); line-height: 1.5; }
.vault-no-sq-box > i { font-size: 1.25rem; color: var(--warning); flex-shrink: 0; margin-top: 1px; }
.vault-no-sq-box strong { color: var(--warning); display: block; margin-bottom: .2rem; }
.vault-no-sq-box p { margin: .2rem 0 0; color: var(--text-muted); }
.vault-reset-option-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem; background: var(--bg-muted); border: 1px solid var(--border); border-radius: var(--r-xs); padding: 3px; }
.vault-reset-tab { display: flex; align-items: center; justify-content: center; gap: .25rem; padding: .375rem; border-radius: calc(var(--r-xs) - 1px); font-size: .68rem; font-weight: 600; color: var(--text-muted); background: transparent; border: none; cursor: pointer; transition: all var(--t-fast); white-space: nowrap; }
.vault-reset-tab:hover { background: var(--bg-surface); color: var(--text-primary); }
.vault-reset-tab.active { background: var(--bg-surface); color: var(--brand); box-shadow: var(--shadow-xs); }
.vault-reset-tab#vaultResetTabClear.active { color: var(--danger); }

.vault-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; flex-wrap: wrap; gap: .5rem; position: relative; }
.vault-badge-open { display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .75rem; border-radius: var(--r-full); background: var(--success-light); color: var(--success); font-size: .68rem; font-weight: 700; border: 1px solid var(--success); }
.vault-status { display: flex; align-items: center; flex-wrap: wrap; gap: .375rem; }
.vault-actions-top { display: flex; gap: .375rem; }
.vault-sq-status { display: inline-flex; margin-left: .375rem; }
.vault-sq-warn-btn { display: inline-flex; align-items: center; gap: .25rem; padding: .2rem .5rem; border-radius: var(--r-full); background: var(--warning-light); color: var(--warning); font-size: .62rem; font-weight: 700; border: 1px solid var(--warning); cursor: pointer; transition: all var(--t-fast); }
.vault-sq-warn-btn:hover { background: var(--warning); color: white; }
.vault-more-wrap { position: relative; }
.vault-settings-menu { position: absolute; top: calc(100% + 4px); right: 0; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-lg); z-index: 50; min-width: 195px; overflow: hidden; animation: dropIn var(--t-base) ease; }
.vault-settings-menu button { display: flex; align-items: center; gap: .5rem; width: 100%; padding: .625rem .875rem; font-size: .78rem; font-weight: 500; color: var(--text-primary); background: none; border: none; border-bottom: 1px solid var(--border); cursor: pointer; transition: background var(--t-fast); font-family: inherit; text-align: left; }
.vault-settings-menu button:last-child { border-bottom: none; }
.vault-settings-menu button:hover { background: var(--bg-subtle); }
.vault-settings-menu button i { font-size: .9rem; color: var(--text-muted); }

.vault-search-bar { margin-bottom: .75rem; }
.vault-search-wrap { position: relative; display: flex; align-items: center; background: var(--bg-surface); border: 1.5px solid var(--border); border-radius: var(--r-sm); transition: border var(--t-fast); }
.vault-search-wrap:focus-within { border-color: var(--border-focus); }
.vault-search-wrap i { position: absolute; left: .75rem; color: var(--text-muted); font-size: .9rem; pointer-events: none; }
.vault-search-wrap input { width: 100%; padding: .5625rem .75rem .5625rem 2.25rem; border: none; background: transparent; color: var(--text-primary); font-size: .82rem; }
.vault-cat-filter { display: flex; flex-wrap: wrap; gap: .375rem; margin-top: .5rem; }
.vault-cat-pill { display: inline-flex; align-items: center; gap: .25rem; padding: .25rem .625rem; border-radius: var(--r-full); font-size: .68rem; font-weight: 600; background: var(--bg-surface); border: 1.5px solid var(--border); color: var(--text-secondary); cursor: pointer; transition: all var(--t-fast); }
.vault-cat-pill.active { background: var(--brand); border-color: var(--brand); color: white; }
.vault-cat-pill:hover:not(.active) { border-color: var(--brand); color: var(--brand); }
.vault-stats { display: flex; gap: .375rem; flex-wrap: wrap; margin-bottom: .625rem; }
.vault-stat-chip { display: inline-flex; align-items: center; gap: .25rem; padding: .2rem .625rem; border-radius: var(--r-full); font-size: .68rem; font-weight: 600; border: 1px solid var(--border); }
.vault-stat-chip.blue { background: var(--info-light); color: var(--info); border-color: var(--info); }
.vault-stat-chip.green { background: var(--success-light); color: var(--success); border-color: var(--success); }
.vault-list { display: flex; flex-direction: column; gap: .375rem; margin-bottom: 5rem; }
.vault-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-sm); padding: .75rem .875rem; display: flex; align-items: center; gap: .75rem; box-shadow: var(--shadow-xs); transition: all var(--t-fast); }
.vault-card:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.vault-card-logo { width: 38px; height: 38px; border-radius: var(--r-sm); background: var(--bg-subtle); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; flex-shrink: 0; border: 1px solid var(--border); }
.vault-card-body { flex: 1; min-width: 0; }
.vault-card-name { font-size: .78rem; font-weight: 700; color: var(--text-primary); }
.vault-card-user { font-size: .65rem; color: var(--text-muted); margin-top: 1px; }
.vault-card-cat { display: inline-flex; align-items: center; gap: .2rem; font-size: .6rem; font-weight: 600; padding: 1px 5px; border-radius: var(--r-full); margin-top: 2px; background: var(--bg-muted); color: var(--text-muted); }
.vault-card-actions { display: flex; gap: .25rem; flex-shrink: 0; }
.vault-action-btn { width: 28px; height: 28px; border-radius: var(--r-xs); display: flex; align-items: center; justify-content: center; font-size: .78rem; cursor: pointer; border: 1px solid var(--border); background: var(--bg-subtle); color: var(--text-muted); transition: all var(--t-fast); }
.vault-action-btn.copy:hover { background: var(--info-light); color: var(--info); border-color: var(--info); }
.vault-action-btn.view:hover { background: var(--success-light); color: var(--success); border-color: var(--success); }
.vault-action-btn.edit:hover { background: var(--warning-light); color: var(--warning); border-color: var(--warning); }
.vault-action-btn.del:hover { background: var(--danger-light); color: var(--danger); border-color: var(--danger); }
.vault-detail-grid { display: flex; flex-direction: column; gap: .25rem; margin-bottom: .75rem; }
.vault-detail-row { display: flex; justify-content: space-between; align-items: center; padding: .375rem 0; border-bottom: 1px solid var(--border); font-size: .75rem; gap: .5rem; }
.vault-detail-label { color: var(--text-muted); flex-shrink: 0; min-width: 90px; }
.vault-detail-val-wrap { display: flex; align-items: center; gap: .25rem; min-width: 0; }
.vault-detail-val { font-size: .75rem; font-weight: 600; color: var(--text-primary); font-family: monospace; word-break: break-all; }
.vault-detail-val.masked { letter-spacing: .1em; color: var(--text-muted); }
.vault-eye-inline, .vault-copy-btn { width: 24px; height: 24px; border-radius: var(--r-xs); display: flex; align-items: center; justify-content: center; font-size: .72rem; cursor: pointer; border: 1px solid var(--border); background: var(--bg-subtle); color: var(--text-muted); transition: all var(--t-fast); flex-shrink: 0; }
.vault-eye-inline:hover, .vault-copy-btn:hover { background: var(--bg-muted); color: var(--text-primary); }
.vault-form { display: flex; flex-direction: column; gap: .625rem; }
.pw-wrap { position: relative; display: flex; align-items: center; }
.pw-wrap input { width: 100%; padding: .5rem 2.25rem .5rem .75rem; border: 1.5px solid var(--border); border-radius: var(--r-sm); background: var(--bg-subtle); color: var(--text-primary); font-size: .82rem; transition: border var(--t-fast); }
.pw-wrap input:focus { border-color: var(--border-focus); background: var(--bg-surface); outline: none; }
.pw-eye { position: absolute; right: .625rem; color: var(--text-muted); font-size: .9rem; cursor: pointer; display: flex; align-items: center; transition: color var(--t-fast); }
.pw-eye:hover { color: var(--text-primary); }

/* ================================================================
   AUTH SCREEN — Premium
   ================================================================ */
#authScreen { position: fixed; inset: 0; z-index: 9000; align-items: center; justify-content: center; background: var(--bg-base); }
.auth-bg {
  width: 100%; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 1.25rem;
  background:
    radial-gradient(ellipse 70% 50% at 50% -5%, rgba(37,99,235,.12), transparent),
    radial-gradient(ellipse 50% 40% at 85% 90%, rgba(124,58,237,.08), transparent),
    var(--bg-base);
}
[data-theme="dark"] .auth-bg {
  background:
    radial-gradient(ellipse 70% 50% at 50% -5%, rgba(59,130,246,.15), transparent),
    radial-gradient(ellipse 50% 40% at 85% 90%, rgba(139,92,246,.1), transparent),
    var(--bg-base);
}
.auth-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-xl);
  padding: 2.25rem 2rem 1.75rem;
  width: 100%; max-width: 400px;
  animation: pageFadeIn .35s ease;
}
.auth-logo {
  display: flex; align-items: center; justify-content: center;
  gap: .5rem;
  font-size: 1.125rem; font-weight: 800;
  margin-bottom: 1.375rem;
}
.auth-logo i {
  font-size: 1.625rem;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-logo span { color: var(--text-primary); letter-spacing: -.3px; }
.auth-title {
  font-size: 1.5rem; font-weight: 800;
  color: var(--text-primary);
  text-align: center; margin-bottom: .3rem;
  letter-spacing: -.5px;
}
.auth-subtitle { font-size: .78rem; color: var(--text-muted); text-align: center; margin-bottom: 1.75rem; }
.auth-form { display: flex; flex-direction: column; gap: .875rem; }
.auth-field-group { display: flex; flex-direction: column; gap: .3rem; }
.auth-field-group label { font-size: .72rem; font-weight: 600; color: var(--text-secondary); }
.auth-input-wrap {
  position: relative; display: flex; align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-subtle);
  transition: border var(--t-fast), box-shadow var(--t-fast);
}
.auth-input-wrap:focus-within {
  border-color: var(--border-focus);
  background: var(--bg-surface);
  box-shadow: 0 0 0 4px rgba(37,99,235,.1);
}
.auth-input-wrap > i { position: absolute; left: .875rem; color: var(--text-muted); font-size: .9rem; pointer-events: none; }
.auth-input-wrap input { width: 100%; padding: .6875rem .875rem .6875rem 2.5rem; border: none; background: transparent; color: var(--text-primary); font-size: .875rem; }
.auth-eye-btn { position: absolute; right: .75rem; color: var(--text-muted); font-size: .9rem; cursor: pointer; background: none; border: none; display: flex; align-items: center; transition: color var(--t-fast); }
.auth-eye-btn:hover { color: var(--text-primary); }
.auth-error { font-size: .73rem; color: var(--danger); background: var(--danger-light); border-radius: var(--r-sm); padding: .625rem .875rem; border: 1px solid rgba(220,38,38,.2); display: flex; align-items: center; gap: .375rem; }
.auth-submit-btn {
  width: 100%;
  padding: .8125rem;
  background: var(--grad-brand); color: white;
  border: none; border-radius: var(--r-md);
  font-size: .925rem; font-weight: 700;
  cursor: pointer;
  transition: all var(--t-fast);
  margin-top: .25rem;
  display: flex; align-items: center; justify-content: center; gap: .375rem;
  font-family: inherit;
  box-shadow: 0 4px 16px rgba(37,99,235,.35);
  letter-spacing: .01em;
}
.auth-submit-btn:hover { opacity: .92; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37,99,235,.45); }
.auth-submit-btn:active { transform: scale(.98); box-shadow: none; }
.auth-submit-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }
.auth-switch { text-align: center; font-size: .75rem; color: var(--text-muted); margin-top: .375rem; }
.auth-link-btn { background: none; border: none; color: var(--brand); font-size: .75rem; font-weight: 700; cursor: pointer; padding: 0; transition: opacity var(--t-fast); }
.auth-link-btn:hover { opacity: .75; }
.auth-features { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.375rem; padding-top: 1.125rem; border-top: 1px solid var(--border); }
.auth-features span { display: flex; align-items: center; gap: .3rem; font-size: .67rem; color: var(--text-muted); font-weight: 500; }
.auth-features i { font-size: .78rem; color: var(--brand); }
.auth-email-notice { text-align: center; padding: .5rem 0; }
.aen-icon { font-size: 2.75rem; color: var(--brand); margin-bottom: .625rem; }
.aen-title { font-size: 1rem; font-weight: 700; color: var(--text-primary); margin-bottom: .375rem; }
.aen-desc { font-size: .78rem; color: var(--text-muted); line-height: 1.6; }
@keyframes spin { to { transform: rotate(360deg); } }
.spin-anim { display: inline-block; animation: spin .8s linear infinite; }

/* ================================================================
   BOTTOM NAV & MORE DRAWER
   ================================================================ */
.bottom-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; height: var(--bottom-nav-h); background: rgba(255,255,255,.92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--border); z-index: 100; transition: background var(--t-base); }
[data-theme="dark"] .bottom-nav { background: rgba(10,13,26,.92); border-top-color: rgba(255,255,255,.06); }
.bn-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--text-muted); font-size: .58rem; font-weight: 500; padding: 8px 0; transition: color var(--t-fast); border: none; background: none; font-family: inherit; cursor: pointer; }
.bn-item i { font-size: 1.2rem; }
.bn-item.active { color: var(--brand); }
.bn-more-btn { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--text-muted); font-size: .58rem; font-weight: 500; padding: 8px 0; transition: color var(--t-fast); border: none; background: none; font-family: inherit; cursor: pointer; }
.bn-more-btn i { font-size: 1.2rem; }
.bn-more-btn.active { color: var(--brand); }
.more-drawer-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 150; opacity: 0; transition: opacity var(--t-base); }
.more-drawer-backdrop.show { display: block; opacity: 1; }
.more-drawer { position: fixed; bottom: 0; left: 0; right: 0; background: var(--bg-surface); border-top-left-radius: 16px; border-top-right-radius: 16px; border-top: 1px solid var(--border); z-index: 151; padding: 0 1.125rem 1.5rem; transform: translateY(100%); transition: transform .28s cubic-bezier(.4,0,.2,1), background var(--t-base); }
.more-drawer.open { transform: translateY(0); }
.more-drawer-handle { width: 32px; height: 3px; border-radius: var(--r-full); background: var(--border); margin: .75rem auto .5rem; }
.more-drawer-title { font-size: .65rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .07em; text-align: center; margin: .25rem 0 .875rem; }
.more-drawer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.md-item { display: flex; flex-direction: column; align-items: center; gap: .375rem; padding: .625rem .25rem; border-radius: var(--r-sm); color: var(--text-primary); font-size: .62rem; font-weight: 600; text-align: center; transition: background var(--t-fast); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.md-item:active { background: var(--bg-subtle); }
.md-icon { width: 42px; height: 42px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; transition: transform var(--t-fast); }
.md-item:active .md-icon { transform: scale(.92); }
.md-icon.blue { background: var(--info-light); color: var(--info); }
.md-icon.green { background: var(--success-light); color: var(--success); }
.md-icon.purple { background: #EDE9FE; color: #7C3AED; }
.md-icon.orange { background: var(--warning-light); color: var(--warning); }
.md-icon.red { background: var(--danger-light); color: var(--danger); }
@media(min-width:769px) { .more-drawer, .more-drawer-backdrop { display: none !important; } }

/* ================================================================
   RESPONSIVE BREAKPOINTS
   ================================================================ */
@media(max-width:1280px) {
  .charts-grid { grid-template-columns: 1fr; }
}

@media(max-width:1024px) {
  .sidebar { width: var(--sidebar-collapsed); }
  .sidebar .logo-text, .sidebar .nav-item span, .sidebar .nav-group-label { opacity: 0; width: 0; overflow: hidden; }
  .sidebar .nav-item.active::before { display: none; }
  .main-content { margin-left: var(--sidebar-collapsed); }
  .sidebar-toggle { display: none; }
  .sidebar:hover, .sidebar.open { width: var(--sidebar-w); }
  .sidebar:hover .logo-text, .sidebar:hover .nav-item span, .sidebar:hover .nav-group-label,
  .sidebar.open .logo-text, .sidebar.open .nav-item span, .sidebar.open .nav-group-label { opacity: 1; width: auto; }
  .sidebar:hover .nav-item.active::before, .sidebar.open .nav-item.active::before { display: block; }
}

@media(max-width:768px) {
  .sidebar { transform: translateX(-100%); width: var(--sidebar-w); }
  .sidebar.open { transform: translateX(0); }
  .sidebar .logo-text, .sidebar .nav-item span, .sidebar .nav-group-label { opacity: 1 !important; width: auto !important; }
  .sidebar-close { display: flex; }
  .sidebar-toggle { display: none; }
  .main-content { margin-left: 0; }
  .menu-btn { display: flex; }
  .bottom-nav { display: flex; }
  .page-content { padding: 1rem; padding-bottom: calc(var(--bottom-nav-h) + 1.125rem); }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .target-cards { grid-template-columns: 1fr; }
  .charts-grid { grid-template-columns: 1fr; }
  .achievement-grid { grid-template-columns: repeat(2, 1fr); }
  .keuangan-summary-strip { flex-wrap: wrap; }
  .ks-item { flex: 1 1 45%; min-width: 0; }
  .ks-divider { display: none; }
  .statistik-summary { grid-template-columns: repeat(2, 1fr); }
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal { border-radius: var(--r-lg) var(--r-lg) 0 0; max-width: 100%; transform: translateY(100%); }
  .modal-backdrop.show .modal { transform: translateY(0); }
  .akun-breakdown-row { grid-template-columns: 1fr; }
  .hf-row { grid-template-columns: 1fr; }
  .vf-row-2 { grid-template-columns: 1fr; }
  .profile-name { display: none; }
  .hero-balance, .bh-amount { font-size: 1.75rem; }
}

@media(max-width:480px) {
  .page-content { padding: .75rem; padding-bottom: calc(var(--bottom-nav-h) + 1rem); }
  .hero-balance, .bh-amount { font-size: 1.625rem; }
  .cards-grid { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .card { padding: .75rem; }
  .card-value { font-size: 1rem; }
  .card-icon { width: 36px; height: 36px; font-size: 1rem; }
  .quick-actions { gap: .5rem; }
  .qa-icon { width: 34px; height: 34px; font-size: 1rem; }
  .insight-row { grid-template-columns: 1fr 1fr 1fr; gap: .375rem; }
  .insight-card { padding: .5rem .5rem; gap: .375rem; }
  .insight-icon { width: 28px; height: 28px; font-size: .8rem; }
  .insight-label { font-size: .58rem; }
  .insight-val { font-size: .78rem; }
  .achievement-grid { grid-template-columns: repeat(2, 1fr); }
  .auth-card { padding: 1.375rem 1.125rem; }
  .auth-features { gap: .5rem; }
  .user-account-card { flex-wrap: wrap; }
  .uac-logout-btn { width: 100%; justify-content: center; margin-top: .375rem; }
  .form-body { padding: .875rem; }
  .targets-mini { grid-template-columns: 1fr; }
  .vf-row-3 { grid-template-columns: 1fr 1fr; }
}

@media(max-width:360px) {
  .cards-grid { grid-template-columns: 1fr; }
  .hero-balance, .bh-amount { font-size: 1.5rem; }
  .quick-actions { grid-template-columns: repeat(4,1fr); gap: .375rem; }
}

/* ================================================================
   MISC / UTILITY
   ================================================================ */
.shake-anim { animation: shakeAnim .6s ease; }
@keyframes shakeAnim { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-8px)} 40%{transform:translateX(8px)} 60%{transform:translateX(-5px)} 80%{transform:translateX(5px)} }

#cashflowBar { display: none; }

/* Legacy classes used in JS-generated HTML */
.selisih-positif { color: var(--success) !important; }
.selisih-negatif { color: var(--danger) !important; }
.selisih-nol { color: var(--text-muted) !important; }

/* Dark mode icon in topbar */
#themeToggleMobile i { color: var(--text-secondary); }

/* ================================================================
   MISSING / ADDITIONAL CLASSES
   ================================================================ */

/* dt-right (daily target card) */
.dt-right { display: flex; align-items: center; }

/* hutang-list */
#hutangList, .hutang-list { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 5rem; }

/* result-progress (kalkulator) */
.result-progress { display: flex; align-items: center; gap: .625rem; }

/* theme-toggle (sidebar footer) */
.theme-toggle {
  display: flex; align-items: center; gap: .625rem;
  width: 100%; padding: .5rem .75rem;
  border-radius: var(--r-sm);
  background: var(--bg-subtle); color: var(--text-secondary);
  font-size: .78rem; font-weight: 500;
  transition: all var(--t-fast);
  border: 1px solid var(--border);
}
.theme-toggle:hover { background: var(--bg-muted); color: var(--text-primary); }
.theme-toggle i { font-size: .95rem; }

/* page-hero color aliases yang belum ada */
.page-hero.hutang-hero { background: var(--warning); }
.page-hero.paylater-hero { background: var(--danger); }
.page-hero.transfer-hero { background: var(--success); }
.page-hero.vault-hero { background: #1E293B; }
.page-hero.pengaturan-hero { background: var(--text-secondary); }

/* ks-value alias tambahan */
.ks-value.brand { color: var(--brand); }

/* Paylater page list wrapper */
#pl-list { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 5rem; }

/* Transfer page wrappers */
#transfer-akunList { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .625rem; margin-bottom: 1rem; }
#transfer-list { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 5rem; }

/* Akun lists */
#akun-digitalList, #akun-physicalList { display: flex; flex-direction: column; gap: .5rem; }

/* D-akunBreakdown & d-paylaterStats wrappers inside dashboard */
#d-akunBreakdown { margin-bottom: .5rem; }
#d-paylaterStats { margin-bottom: .5rem; }

/* cashflow bar */
#cashflowBar { display: none; }

/* Modal wide */
.modal.modal-wide { max-width: 580px; }

/* fix topbar icon button */
#themeToggleMobile {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  color: var(--text-secondary);
  font-size: .95rem;
  transition: all var(--t-fast);
  background: transparent;
  border: none;
  cursor: pointer;
}
#themeToggleMobile:hover { background: var(--bg-subtle); color: var(--text-primary); }

/* Keuangan summary strip on small screens */
@media(max-width:600px) {
  .keuangan-summary-strip { display: grid; grid-template-columns: 1fr 1fr; }
  .ks-divider { display: none; }
}

/* Section title consistent spacing */
.section-title, .section-label { margin: 1.125rem 0 .5rem; }

/* Forms inside modal */
.modal-body .form-group { margin-bottom: .5rem; }
.modal-body .form-group:last-of-type { margin-bottom: 0; }
.modal-body .input-prefix span { background: var(--bg-subtle); }

/* Fix: vault lock form select inside modal */
.modal-body select {
  width: 100%; padding: .5rem .75rem;
  border: 1.5px solid var(--border); border-radius: var(--r-sm);
  background: var(--bg-subtle); color: var(--text-primary);
  font-size: .82rem; font-family: inherit;
  transition: border var(--t-fast); cursor: pointer;
}
.modal-body select:focus { border-color: var(--border-focus); outline: none; }
.modal-body textarea {
  width: 100%; padding: .5rem .75rem;
  border: 1.5px solid var(--border); border-radius: var(--r-sm);
  background: var(--bg-subtle); color: var(--text-primary);
  font-size: .82rem; font-family: inherit; resize: vertical; min-height: 60px;
}
.modal-body textarea:focus { border-color: var(--border-focus); outline: none; background: var(--bg-surface); }

/* PayLater form label row */
.vf-row .form-group { margin-bottom: 0; }

/* Dark mode: input placeholder */
input::placeholder, textarea::placeholder { color: var(--text-muted); opacity: 1; }

/* Fix: card-value color overrides for net balance display */
#ss-selisih.positive, .ss-val.positive { color: var(--success) !important; }
#ss-selisih.negative, .ss-val.negative { color: var(--danger) !important; }

/* Fix: profile dropdown z-index above topbar */
.profile-dropdown-wrap { z-index: 200; }

/* Fix: close profile dropdown on outside click needs body listener */
body { position: relative; }

/* Achievement page layout */
.achievement-grid { padding-bottom: 2rem; }

/* Vault page */
#vault-lockscreen { padding: 1rem 0; }
#vault-content { padding-bottom: 2rem; }

/* Responsive: auth screen dark bg */
@media(prefers-color-scheme: dark) {
  .auth-bg { background: var(--bg-base); }
}

/* Animated spin for loading */
@keyframes spin { to { transform: rotate(360deg); } }
.spin-anim { display: inline-block; animation: spin .8s linear infinite; }

/* Misc alignment helpers used in JS-generated HTML */
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.font-bold { font-weight: 700; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-brand { color: var(--brand); }

/* Fix: stats summary on pengaturan page */
.usage-stats-grid { margin-bottom: 1rem; }

/* Fix: info-card last row no border */
.info-card .info-row:last-child { border-bottom: none; }

/* Hutang form textarea */
.hutang-form textarea {
  width: 100%; padding: .5rem .75rem;
  border: 1.5px solid var(--border); border-radius: var(--r-sm);
  background: var(--bg-subtle); color: var(--text-primary);
  font-size: .82rem; resize: vertical; min-height: 60px;
  font-family: inherit; transition: border var(--t-fast);
}
.hutang-form textarea:focus { border-color: var(--border-focus); background: var(--bg-surface); outline: none; }

/* Fix: bottom nav must flex */
.bottom-nav { display: none; }
@media(max-width:768px) { .bottom-nav { display: flex; } }

/* ================================================================
   TABUNGAN & TARGET — FIX LENGKAP
   ================================================================ */

/* emptyStateRich komponen (dipakai JS) */
.empty-state-rich {
  text-align: center;
  padding: 2rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xs);
}
.esr-emoji { font-size: 2.5rem; display: block; margin-bottom: .625rem; }
.esr-title { font-size: .9rem; font-weight: 700; color: var(--text-primary); margin-bottom: .25rem; }
.esr-sub   { font-size: .75rem; color: var(--text-muted); line-height: 1.5; }

/* ── Variabel lama yang masih dipakai di JS ─────────────────── */
/* Mapping variabel lama → baru supaya tidak pecah */
:root {
  --text3:      #94A3B8;   /* = text-muted */
  --green-dark: #047857;   /* = success dark */
  --green-light:#D1FAE5;   /* = success-light */
  --blue-light: #DBEAFE;   /* info-light alias */
  --orange-light:#FEF3C7;  /* warning-light alias */
  --red-light:  #FEE2E2;   /* danger-light alias */
  --purple-light:#EDE9FE;
}
[data-theme="dark"] {
  --text3:      #64748B;
  --green-dark: #34D399;
  --green-light:#064E3B;
  --blue-light: #1E3A5F;
  --orange-light:#78350F;
  --red-light:  #7F1D1D;
  --purple-light:#3B0764;
}

/* ── fch-icon.orange (form card header icon) ─────────────────── */
.fch-icon.orange { background: rgba(217,119,6,.12); color: var(--warning); }

/* ── card-purple icon fix ─────────────────────────────────────── */
.card-purple .card-icon { background: #EDE9FE; color: #7C3AED; }

/* ── Tabungan page — allocation bar track ────────────────────── */
.ab-track { height: 8px; }

/* ── tbl-bar (progress di saldo per target) ──────────────────── */
.tbl-bar .progress-bar-track { height: 5px; }

/* ── target-card-v2 gradient header ──────────────────────────── */
.tc-gradient-header {
  background: var(--brand-light);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 1rem;
  text-align: center;
  position: relative;
}
[data-theme="dark"] .tc-gradient-header { background: var(--brand-light); }

/* ── tc-badge (target tercapai) ───────────────────────────────── */
.tc-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--r-full);
  font-size: .68rem; font-weight: 700;
  background: var(--success-light); color: var(--success);
  margin-top: .375rem;
  border: 1px solid var(--success);
}

/* ── period-tabs fix ─────────────────────────────────────────── */
.period-tabs {
  display: flex;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 3px; gap: 2px;
}
.period-tab {
  flex: 1;
  padding: .4rem .5rem;
  border-radius: calc(var(--r-sm) - 2px);
  font-size: .75rem; font-weight: 600;
  color: var(--text-muted);
  background: transparent; border: none; cursor: pointer;
  transition: all var(--t-fast);
}
.period-tab.active {
  background: var(--bg-surface);
  color: var(--brand);
  box-shadow: var(--shadow-xs);
}
.period-tab:hover:not(.active) { color: var(--text-primary); }

/* ── period-preview ──────────────────────────────────────────── */
.period-preview {
  font-size: .75rem; color: var(--text-muted);
  background: var(--bg-subtle);
  border-radius: var(--r-xs);
  padding: .5rem .75rem;
  margin-top: .5rem;
  border: 1px solid var(--border);
  line-height: 1.5;
  min-height: 2rem;
}

/* ── current-period-info ─────────────────────────────────────── */
.current-period-info {
  background: var(--brand-light);
  border: 1px solid var(--brand-mid);
  border-radius: var(--r-sm);
  padding: .75rem;
  margin-top: .75rem;
  font-size: .75rem;
  color: var(--text-primary);
}

/* ── week-selector & week-btn ────────────────────────────────── */
.week-selector { display: flex; flex-wrap: wrap; gap: .375rem; }
.week-btn {
  padding: .3rem .625rem; border-radius: var(--r-xs);
  font-size: .72rem; font-weight: 600;
  background: var(--bg-subtle); border: 1.5px solid var(--border);
  color: var(--text-secondary); cursor: pointer;
  transition: all var(--t-fast);
}
.week-btn.active { background: var(--brand); border-color: var(--brand); color: white; }
.week-btn:hover:not(.active) { border-color: var(--brand); color: var(--brand); }

/* ── Targets balance list fix ─────────────────────────────────── */
.targets-balance-list {
  display: flex; flex-direction: column; gap: .5rem;
  margin-bottom: 5rem;
}
.tbl-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: .75rem .875rem;
  display: flex; align-items: center; gap: .75rem;
  box-shadow: var(--shadow-xs);
  transition: all var(--t-fast);
}
.tbl-item:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.tbl-emoji-wrap { font-size: 1.375rem; flex-shrink: 0; }
.tbl-body { flex: 1; min-width: 0; }
.tbl-name { font-size: .82rem; font-weight: 600; color: var(--text-primary); }
.tbl-bar { margin-top: .3rem; }
.tbl-amounts { display: flex; justify-content: space-between; font-size: .68rem; color: var(--text-muted); margin-top: 3px; }
.tbl-balance { text-align: right; flex-shrink: 0; padding-left: .5rem; }
.tbl-balance-val { font-size: .9rem; font-weight: 700; color: var(--brand); display: block; }
.tbl-balance-pct { font-size: .65rem; color: var(--text-muted); display: block; }

/* ── target-mini-card fix (dashboard) ────────────────────────── */
.targets-mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px,1fr)); gap: .625rem; }
.target-mini-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: .875rem 1rem;
  box-shadow: var(--shadow-xs);
  transition: all var(--t-fast);
}
.target-mini-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.tmc-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: .375rem; }
.tmc-name { font-size: .8rem; font-weight: 600; color: var(--text-primary); }
.tmc-pct  { font-size: .7rem; font-weight: 700; color: var(--brand); }
.tmc-amounts { display: flex; justify-content: space-between; margin-top: .25rem; }
.tmc-collected { font-size: .68rem; color: var(--text-muted); }
.tmc-goal      { font-size: .68rem; color: var(--text-muted); }

/* ── target-cards grid (halaman target) ──────────────────────── */
.target-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: .75rem;
  margin-bottom: 5rem;
}

/* ── target-card-v2 lengkap ──────────────────────────────────── */
.target-card-v2 {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--t-fast);
}
.target-card-v2:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.tc-actions-abs { position: absolute; top: .625rem; right: .625rem; display: flex; gap: .25rem; }
.tc-btn {
  width: 26px; height: 26px;
  border-radius: var(--r-xs);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; color: var(--text-muted);
  background: var(--bg-surface); border: 1px solid var(--border);
  cursor: pointer; transition: all var(--t-fast);
}
.tc-btn:hover { color: var(--text-primary); background: var(--bg-subtle); }
.tc-btn.danger:hover { color: var(--danger); background: var(--danger-light); border-color: var(--danger); }
.tc-emoji-big  { font-size: 2rem; display: block; margin-bottom: .375rem; }
.tc-name-big   { font-size: .95rem; font-weight: 700; color: var(--text-primary); }
.tc-goal-label { font-size: .68rem; color: var(--text-muted); margin-top: 2px; }
.tc-body-v2 { padding: .875rem 1rem; }
.tc-collected-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .5rem; }
.tc-collected-v2 { font-size: 1.2rem; font-weight: 800; color: var(--text-primary); }
.tc-goal-v2      { font-size: .72rem; color: var(--text-muted); }
.tc-kekurangan   { font-size: .72rem; color: var(--text-muted); margin-top: .25rem; }
.tc-est-date     { font-size: .68rem; color: var(--brand); margin-top: .375rem; display: flex; align-items: center; gap: .25rem; }

/* ── Allocation bar fix ───────────────────────────────────────── */
.allocation-bar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 1rem 1.125rem;
  box-shadow: var(--shadow-xs);
  margin-bottom: .875rem;
}
.ab-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .625rem; }
.ab-title  { font-size: .82rem; font-weight: 600; color: var(--text-primary); display: flex; align-items: center; gap: .375rem; }
.ab-sub    { font-size: .7rem; color: var(--text-muted); }
.ab-track  { height: 8px; border-radius: var(--r-full); overflow: hidden; display: flex; background: var(--bg-muted); }
.ab-fill-savings  { height: 100%; background: var(--success); transition: width .5s ease; }
.ab-fill-available{ height: 100%; background: var(--brand);   transition: width .5s ease; }
.ab-legend { display: flex; gap: 1rem; margin-top: .5rem; }
.ab-leg-item { display: flex; align-items: center; gap: .375rem; font-size: .7rem; color: var(--text-muted); }
.ab-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ab-dot.green { background: var(--success); }
.ab-dot.blue  { background: var(--brand); }

/* ── dt-header fix ───────────────────────────────────────────── */
.dt-right { display: flex; align-items: center; }

/* ── form-card orange header icon ───────────────────────────── */
.fch-icon.orange { background: rgba(217,119,6,.12); color: var(--warning); }

/* ── Tabungan & Target responsive ───────────────────────────── */
@media(max-width:768px) {
  .target-cards { grid-template-columns: 1fr; }
  .targets-mini { grid-template-columns: 1fr 1fr; }
}
@media(max-width:480px) {
  .target-cards { grid-template-columns: 1fr; }
  .targets-mini { grid-template-columns: 1fr; }
  .tbl-item { flex-wrap: wrap; }
  .tbl-balance { width: 100%; text-align: left; padding-left: 2.125rem; padding-top: .25rem; display: flex; gap: .5rem; align-items: center; }
  .tbl-balance-pct { margin-left: .5rem; }
}

/* ================================================================
   LEGACY VARIABLE MAPPING — semua var lama yang masih dipakai JS
   ================================================================ */
:root {
  /* Warna dasar lama */
  --blue:   #3182CE;
  --orange: #D97706;
  --purple: #7C3AED;
  --red:    #E53E3E;
  --green:  #059669;

  /* bg / border lama */
  --bg:     #F5F6FA;
  --bg2:    #FFFFFF;
  --bg3:    #EFF1F8;
  --border: #E2E8F0;
  --text:   #0D1117;
  --text2:  #4A5568;
}
[data-theme="dark"] {
  --blue:   #60A5FA;
  --orange: #FBBF24;
  --purple: #A78BFA;
  --red:    #F87171;
  --green:  #34D399;

  --bg:     #0D1117;
  --bg2:    #161B22;
  --bg3:    #1C2333;
  --border: #30363D;
  --text:   #E6EDF3;
  --text2:  #8B949E;
}

/* ── Sync Indicator (topbar) ──────────────────────────────── */
#syncIndicator {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  font-size: .95rem;
  color: var(--text-muted);
  transition: color var(--t-fast);
  pointer-events: none;
}
#syncIndicator i { font-size: 1rem; }



/* =================================================================
   FINANCEME — VISUAL REDESIGN OVERRIDES
   Adaptive Premium Fintech / WOW direction
   Catatan: layer ini hanya mengatur presentasi; selector dan struktur
   komponen lama dipertahankan agar integrasi JavaScript tetap aman.
   ================================================================= */

:root {
  --sidebar-w: 258px;
  --sidebar-collapsed: 76px;
  --topbar-h: 72px;
  --bottom-nav-h: 72px;
  --r-xs: 7px;
  --r-sm: 11px;
  --r-md: 16px;
  --r-lg: 21px;
  --r-xl: 26px;
  --r-2xl: 30px;
  --shadow-xs: 0 2px 8px rgba(25, 40, 85, .045);
  --shadow-sm: 0 8px 24px rgba(25, 40, 85, .065);
  --shadow-md: 0 14px 34px rgba(25, 40, 85, .095);
  --shadow-lg: 0 22px 55px rgba(25, 40, 85, .13);
  --shadow-xl: 0 28px 75px rgba(25, 40, 85, .18);
  --shadow-brand: 0 16px 42px rgba(67, 97, 238, .30);
  --grad-brand: linear-gradient(125deg, #3867F5 0%, #6254E8 52%, #9562F4 100%);
}

[data-theme="dark"] {
  --bg-base: #080D1B;
  --bg-surface: #111A2D;
  --bg-subtle: #17233A;
  --bg-muted: #22314D;
  --text-primary: #F1F5FF;
  --text-secondary: #A9B7D2;
  --text-muted: #71809F;
  --border: #25334D;
  --brand: #6D8BFF;
  --brand-hover: #8AA2FF;
  --brand-light: #17274B;
  --brand-mid: #294477;
  --accent: #A78BFA;
  --accent-light: #2A2049;
  --success-light: #10372F;
  --danger-light: #3B202B;
  --warning-light: #3B3019;
  --info-light: #142F46;
  --shadow-xs: 0 2px 8px rgba(0,0,0,.18);
  --shadow-sm: 0 8px 24px rgba(0,0,0,.20);
  --shadow-md: 0 14px 34px rgba(0,0,0,.27);
  --shadow-lg: 0 22px 55px rgba(0,0,0,.32);
  --shadow-xl: 0 28px 75px rgba(0,0,0,.42);
  --shadow-brand: 0 16px 42px rgba(63, 95, 220, .22);
  --grad-brand: linear-gradient(125deg, #3159D8 0%, #6249C8 55%, #814FCE 100%);
}

body {
  background:
    radial-gradient(ellipse at 78% 0%, rgba(93, 119, 235, .075), transparent 32rem),
    var(--bg-base);
  letter-spacing: -.012em;
}

[data-theme="dark"] body {
  background:
    radial-gradient(ellipse at 78% 0%, rgba(91, 111, 224, .12), transparent 34rem),
    radial-gradient(ellipse at 12% 75%, rgba(119, 75, 205, .055), transparent 28rem),
    var(--bg-base);
}

button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(82, 119, 255, .30);
  outline-offset: 2px;
}

/* Sidebar: premium navigation rail */
.sidebar {
  background:
    radial-gradient(circle at 12% 0%, rgba(75, 111, 255, .20), transparent 17rem),
    linear-gradient(180deg, #101A32 0%, #0B1224 55%, #0A1020 100%);
  border-right: 1px solid rgba(255,255,255,.075);
  box-shadow: 12px 0 42px rgba(9, 17, 39, .10);
}
.sidebar-header {
  height: 82px;
  padding: 0 1.25rem;
  border-bottom-color: rgba(255,255,255,.075);
}
.logo { gap: .7rem; font-size: 1.08rem; letter-spacing: -.045em; }
.logo i {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 13px;
  color: #fff;
  font-size: 1.35rem;
  background: linear-gradient(145deg, #6E8BFF, #8C5AE8);
  -webkit-text-fill-color: #fff;
  box-shadow: 0 8px 22px rgba(91, 113, 245, .35);
}
.sidebar-nav { padding: 1rem .85rem; gap: 5px; }
.nav-item {
  min-height: 45px;
  padding: .68rem .85rem;
  border: 1px solid transparent;
  border-radius: 13px;
  color: rgba(225,233,255,.62);
  font-size: .82rem;
  font-weight: 600;
  gap: .85rem;
}
.nav-item i { font-size: 1.12rem; color: rgba(194,208,255,.68); }
.nav-item:hover {
  background: rgba(255,255,255,.075);
  border-color: rgba(255,255,255,.055);
  color: #fff;
  transform: translateX(2px);
}
.nav-item.active {
  background: linear-gradient(100deg, rgba(75,111,255,.28), rgba(132,91,230,.18));
  border-color: rgba(132,157,255,.22);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 8px 20px rgba(0,0,0,.10);
}
.nav-item.active i { color: #9CB3FF; }
.nav-item.active::before { display: none; }
.sidebar-footer { padding: 1rem .85rem; border-top-color: rgba(255,255,255,.075); }
.sidebar .theme-toggle {
  min-height: 44px;
  padding: .65rem .85rem;
  background: rgba(255,255,255,.065);
  border-color: rgba(255,255,255,.09);
  color: rgba(231,237,255,.78);
  border-radius: 13px;
}
.sidebar .theme-toggle:hover { background: rgba(255,255,255,.12); color: #fff; }
.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-item span { opacity: 0; }

/* Main canvas and top navigation */
.main-content { min-width: 0; }
.topbar {
  height: var(--topbar-h);
  padding: 0 clamp(1rem, 2.5vw, 2.25rem);
  background: color-mix(in srgb, var(--bg-surface) 84%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
  box-shadow: 0 4px 24px rgba(20, 35, 75, .035);
}
[data-theme="dark"] .topbar {
  background: rgba(12, 19, 34, .84);
  border-bottom-color: rgba(255,255,255,.065);
}
.topbar-title { font-size: .96rem; font-weight: 800; letter-spacing: -.035em; }
.topbar-actions { gap: .45rem; }
.tb-btn {
  width: 39px; height: 39px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--bg-surface);
}
.tb-btn:hover { border-color: var(--brand-mid); background: var(--brand-light); color: var(--brand); }
.topbar-profile {
  padding: .3rem .7rem .3rem .35rem;
  border-color: var(--border);
  background: var(--bg-surface);
  gap: .6rem;
}
.profile-avatar { width: 34px; height: 34px; }
.page-content {
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  padding: clamp(1.1rem, 2.4vw, 2.25rem);
}
.page { animation: fmPageIn .28s cubic-bezier(.2,.7,.2,1); }
@keyframes fmPageIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Shared headings and page introductions */
.section-title {
  margin: 1.7rem 0 .85rem;
  font-size: .94rem;
  font-weight: 800;
  letter-spacing: -.035em;
}
.page-heading { font-size: clamp(1.35rem, 2vw, 1.8rem); letter-spacing: -.055em; }
.page-subheading { font-size: .84rem; }
.page-hero {
  border-radius: var(--r-xl);
  padding: 1.35rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: "";
  position: absolute;
  width: 220px; height: 220px;
  right: -65px; top: -105px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  box-shadow: 0 0 0 24px rgba(255,255,255,.045), 0 0 0 50px rgba(255,255,255,.035);
  pointer-events: none;
}
.page-hero .ph-icon {
  width: 48px; height: 48px;
  border-radius: 16px;
  background: rgba(255,255,255,.17);
  border: 1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(12px);
}
.page-hero .ph-text h1 { font-size: 1.25rem; letter-spacing: -.045em; }
.page-hero .ph-text p { opacity: .82; }

/* Dashboard balance hero */
.hero-card {
  padding: clamp(1.35rem, 3vw, 2.25rem);
  min-height: 245px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 30px;
  background:
    radial-gradient(circle at 84% 18%, rgba(255,255,255,.20), transparent 15rem),
    radial-gradient(circle at 10% 110%, rgba(42,219,218,.19), transparent 20rem),
    linear-gradient(118deg, #315FE7 0%, #5557DE 48%, #8758E7 100%);
  box-shadow: 0 22px 55px rgba(65, 83, 207, .27);
}
.hero-card::before {
  width: 330px; height: 330px;
  top: -190px; right: 4%;
  border: 1px solid rgba(255,255,255,.20);
  background: rgba(255,255,255,.035);
  box-shadow: 0 0 0 28px rgba(255,255,255,.035), 0 0 0 58px rgba(255,255,255,.025);
}
.hero-card::after {
  width: 210px; height: 210px;
  bottom: -145px; left: 42%;
  background: rgba(255,255,255,.055);
}
.hero-top, .hero-sub-row, .hero-balance-label, .hero-balance { position: relative; z-index: 2; }
.hero-greeting { font-size: .94rem; font-weight: 700; }
.hero-date { font-size: .76rem; opacity: .76; }
.hero-streak {
  padding: .48rem .85rem;
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.23);
  backdrop-filter: blur(14px);
}
.hero-balance-label { margin-top: 1.5rem; font-size: .72rem; letter-spacing: .11em; }
.hero-balance {
  font-size: clamp(2rem, 4.3vw, 3.05rem);
  font-weight: 800;
  letter-spacing: -.065em;
  line-height: 1.12;
  margin: .35rem 0 1.5rem;
  text-shadow: 0 4px 20px rgba(14,25,80,.16);
}
.hero-sub-row {
  max-width: 720px;
  padding: .85rem 1rem;
  background: rgba(12,24,75,.16);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 18px;
  backdrop-filter: blur(14px);
}
.hero-sub-label { font-size: .66rem; opacity: .78; }
.hero-sub-val { font-size: .9rem; font-weight: 800; }

/* Quick actions */
.quick-actions { gap: .75rem; margin: 1rem 0 1.5rem; }
.qa-btn {
  min-height: 82px;
  padding: .85rem .75rem;
  border: 1px solid var(--border);
  border-radius: 19px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-xs);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.qa-btn:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--brand) 32%, var(--border));
}
.qa-icon {
  width: 39px; height: 39px;
  border-radius: 13px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}
.qa-btn span { font-size: .74rem; font-weight: 700; color: var(--text-primary); }

/* Insight and summary cards */
.insight-row { gap: .8rem; }
.insight-card {
  min-height: 88px;
  padding: .9rem 1rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  box-shadow: var(--shadow-xs);
  transition: transform .2s ease, box-shadow .2s ease;
}
.insight-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.insight-icon { width: 40px; height: 40px; border-radius: 14px; }
.insight-label { font-size: .68rem; font-weight: 600; }
.insight-val { font-size: clamp(.78rem, 1.2vw, .98rem); font-weight: 800; letter-spacing: -.025em; }
.daily-target-card, .allocation-bar-card {
  border-radius: 19px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
  padding: 1.1rem 1.2rem;
}
.progress-bar-track { height: 10px; border-radius: 20px; background: var(--bg-muted); }
.progress-bar-fill { border-radius: inherit; box-shadow: 0 2px 9px rgba(48,102,230,.22); }

/* All reusable cards */
.card, .surface, .target-mini-card, .target-card-v2,
.form-card, .transaction-item, .tx-item, .account-card {
  border-radius: 19px;
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
}
.card { padding: 1.05rem 1.15rem; gap: .95rem; }
.card:hover, .target-mini-card:hover, .target-card-v2:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--brand) 25%, var(--border));
}
.card-icon { width: 46px; height: 46px; border-radius: 15px; }
.card-label { font-size: .7rem; letter-spacing: .01em; }
.card-value { font-size: 1.18rem; letter-spacing: -.04em; }
.cards-grid { gap: .9rem; }
.cards-grid-3 { gap: .8rem; }

/* Forms and input surfaces */
.form-grid { gap: 1rem; }
.form-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.form-card-header {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border);
}
.form-card-header.green,
.form-card-header.red,
.form-card-header.blue,
.form-card-header.orange,
.form-card-header.purple {
  background: color-mix(in srgb, var(--bg-subtle) 72%, var(--bg-surface));
}
.form-card-header .fch-title { font-size: .9rem; font-weight: 800; }
.form-body { padding: 1.2rem; }
.form-group { gap: .45rem; }
.form-group label, .auth-field-group label {
  color: var(--text-secondary);
  font-size: .73rem;
  font-weight: 700;
}
.form-group input, .form-group select, .form-group textarea,
.auth-input-wrap input, input:not([type="checkbox"]):not([type="radio"]),
select, textarea {
  border-radius: 12px;
}
.input-prefix {
  border-radius: 13px;
  border: 1px solid var(--border);
  background: var(--bg-base);
  overflow: hidden;
}
.input-prefix:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(73,111,235,.10); }
.input-prefix input { background: transparent; border: 0; }
.btn, .auth-submit-btn {
  min-height: 43px;
  border-radius: 13px;
  font-weight: 750;
  letter-spacing: -.01em;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.btn:hover, .auth-submit-btn:hover { transform: translateY(-2px); filter: brightness(1.04); box-shadow: var(--shadow-sm); }
.btn:active, .auth-submit-btn:active { transform: translateY(0) scale(.985); }

/* Tables, transaction lists, and generated content */
.transactions-list { display: flex; flex-direction: column; gap: .55rem; }
.transactions-list > *, .target-cards > *, .targets-mini > * { min-width: 0; }
.transactions-list > * {
  border-radius: 15px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  box-shadow: var(--shadow-xs);
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.transactions-list > *:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
table { border-collapse: separate; border-spacing: 0; }
th { color: var(--text-muted); font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
td, th { padding: .85rem .9rem; }
tr td { border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: 0; }

/* Modal, drawer, toast */
.modal {
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow-xl);
  background: var(--bg-surface);
}
.modal-header { border-bottom: 1px solid var(--border); }
.modal-footer { border-top: 1px solid var(--border); }
.toast-container { z-index: 1000; }
.more-drawer {
  border-top-left-radius: 25px;
  border-top-right-radius: 25px;
  box-shadow: 0 -18px 55px rgba(10,20,45,.18);
}

/* Authentication */
.auth-bg {
  background:
    radial-gradient(circle at 15% 15%, rgba(91,117,255,.30), transparent 24rem),
    radial-gradient(circle at 85% 80%, rgba(149,91,232,.24), transparent 26rem),
    linear-gradient(135deg, #0A1228, #18264B 55%, #241B4B);
}
.auth-card {
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 28px;
  box-shadow: 0 30px 90px rgba(0,0,0,.32);
  backdrop-filter: blur(22px);
}

/* Focus and motion accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Tablet */
@media (max-width: 1024px) {
  :root { --topbar-h: 66px; }
  .sidebar { width: var(--sidebar-collapsed); }
  .sidebar .logo-text, .sidebar .nav-item span, .sidebar .nav-group-label {
    opacity: 0; width: 0; overflow: hidden;
  }
  .sidebar .nav-item.active::before { display: none; }
  .main-content { margin-left: var(--sidebar-collapsed); }
  .page-content { padding: 1.25rem; }
}

/* Mobile */
@media (max-width: 768px) {
  :root { --topbar-h: 62px; }
  .sidebar {
    width: min(290px, 86vw);
    transform: translateX(-105%);
    box-shadow: 18px 0 55px rgba(0,0,0,.22);
  }
  .sidebar.open { transform: translateX(0); width: min(290px, 86vw); }
  .sidebar.open .logo-text, .sidebar.open .nav-item span,
  .sidebar.open .nav-group-label { opacity: 1; width: auto; }
  .sidebar-close { display: flex; }
  .main-content, .sidebar.collapsed ~ .main-content { margin-left: 0; }
  .menu-btn { display: flex; }
  .page-content { padding: 1rem .9rem calc(var(--bottom-nav-h) + 1.25rem); }
  .topbar { padding: 0 .9rem; }
  .hero-card { min-height: 0; border-radius: 24px; }
  .hero-sub-row { gap: .5rem; }
  .hero-sub-item { min-width: 0; }
  .hero-sub-val { font-size: .78rem; overflow-wrap: anywhere; }
  .quick-actions { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .qa-btn { min-width: 0; padding: .7rem .35rem; }
  .qa-btn span { font-size: .65rem; }
  .insight-row { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .insight-card { min-width: 0; flex-direction: column; align-items: flex-start; }
  .insight-val { overflow-wrap: anywhere; }
  .bottom-nav {
    min-height: var(--bottom-nav-h);
    padding: .45rem .35rem calc(.45rem + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--bg-surface) 90%, transparent);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    box-shadow: 0 -8px 30px rgba(20,35,75,.08);
  }
  .bn-item { border-radius: 13px; }
  .bn-item.active { background: var(--brand-light); color: var(--brand); }
}

/* Small phones */
@media (max-width: 480px) {
  .page-content { padding: .8rem .7rem calc(var(--bottom-nav-h) + 1rem); }
  .topbar-title { font-size: .86rem; }
  .topbar-actions { gap: .2rem; }
  .tb-btn { width: 34px; height: 34px; }
  .hero-card { padding: 1.15rem; }
  .hero-balance { font-size: clamp(1.65rem, 8vw, 2.15rem); }
  .hero-sub-row { padding: .7rem .65rem; }
  .hero-sub-label { font-size: .56rem; }
  .hero-sub-val { font-size: .68rem; }
  .quick-actions { gap: .4rem; }
  .qa-btn { min-height: 75px; }
  .qa-icon { width: 32px; height: 32px; }
  .insight-row { gap: .35rem; }
  .insight-card { padding: .6rem .45rem; }
  .insight-icon { width: 30px; height: 30px; }
  .insight-label { font-size: .56rem; }
  .insight-val { font-size: .68rem; }
  .cards-grid { gap: .5rem; }
  .card { padding: .75rem .65rem; gap: .55rem; }
  .card-value { font-size: .92rem; }
  .card-label { font-size: .62rem; }
  .card-icon { width: 34px; height: 34px; }
  .page-hero { padding: 1rem; border-radius: 19px; }
  .page-hero .ph-icon { width: 40px; height: 40px; }
  .form-body { padding: .9rem; }
  .hero-streak { padding: .35rem .6rem; }
  .profile-name { display: none; }
}

/* Avoid clipping long financial values */
.hero-balance, .card-value, .ks-value, .insight-val,
.tc-collected-v2, .bh-amount {
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}



/* ================================================================
   NOTIFICATION SETTINGS — Push Notification UI
   ================================================================ */
.notif-status-row {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-subtle);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
}

.notif-status-item {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.notif-status-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.notif-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: var(--r-full);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.notif-badge-ok {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid rgba(5, 150, 105, 0.2);
}

.notif-badge-off {
  background: var(--bg-muted);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.notif-badge-err {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.notif-badge-warn {
  background: var(--warning-light);
  color: var(--warning);
  border: 1px solid rgba(217, 119, 6, 0.2);
}

.notif-permission-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.notif-warning {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--warning-light);
  border: 1px solid rgba(217, 119, 6, 0.2);
  border-radius: var(--r-lg);
  margin-bottom: 1rem;
}

.notif-warning > i {
  font-size: 1.5rem;
  color: var(--warning);
  flex-shrink: 0;
  margin-top: 2px;
}

.notif-warning strong {
  display: block;
  color: var(--warning);
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.notif-warning p {
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin: 0;
  line-height: 1.5;
}

.notif-info-box {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1.125rem 1.375rem;
  background: var(--info-light);
  border: 1px solid rgba(2, 132, 199, 0.15);
  border-radius: var(--r-lg);
  margin-top: 1rem;
}

.notif-info-box > i {
  font-size: 1.375rem;
  color: var(--info);
  flex-shrink: 0;
  margin-top: 2px;
}

.notif-info-box strong {
  display: block;
  color: var(--info);
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.notif-info-box ul {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-secondary);
  font-size: 0.8rem;
  line-height: 1.6;
}

.notif-info-box li {
  margin-bottom: 0.25rem;
}

.notif-info-box li:last-child {
  margin-bottom: 0;
}

/* Dark mode adjustments */
[data-theme="dark"] .notif-status-row {
  background: var(--bg-muted);
}

[data-theme="dark"] .notif-badge-ok {
  background: rgba(16, 185, 129, 0.15);
}

[data-theme="dark"] .notif-badge-off {
  background: var(--bg-subtle);
}

[data-theme="dark"] .notif-badge-err {
  background: rgba(248, 113, 113, 0.15);
}

[data-theme="dark"] .notif-badge-warn {
  background: rgba(251, 191, 36, 0.15);
}

[data-theme="dark"] .notif-warning {
  background: rgba(217, 119, 6, 0.1);
}

[data-theme="dark"] .notif-info-box {
  background: rgba(2, 132, 199, 0.1);
}
