/* =========================================================
   FINORA DESIGN SYSTEM — RESPONSIVE WEB & MOBILE DUAL ENGINE
   WITH SUPABASE AUTHENTICATION & CLOUD SYNC
   ========================================================= */

:root {
  /* Primary Cyan & Secondary Violet Accents */
  --primary-cyan: #22D3EE;
  --primary-cyan-hover: #67E8F9;
  --primary-cyan-dark: #06B6D4;
  --primary-yellow: #22D3EE; /* Backward-compatibility alias for primary action */
  --primary-yellow-hover: #67E8F9;
  --primary-yellow-dark: #06B6D4;
  --secondary-violet: #8B5CF6;
  --secondary-violet-hover: #A78BFA;
  --accent-amber: #22D3EE;

  /* Default Dark Mode (Midnight + Dark Slate) Semantic Tokens */
  --bg-app: #070B14;
  --bg-surface: #111827;
  --bg-card: #111827;
  --bg-card-hover: #1E293B;
  --border-color: #1E293B;
  --border-color-subtle: rgba(255, 255, 255, 0.08);

  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;

  --badge-bg: rgba(34, 211, 238, 0.12);
  --badge-text: #22D3EE;

  --income-color: #34D399;
  --income-bg: rgba(52, 211, 153, 0.14);
  --expense-color: #FB7185;
  --expense-bg: rgba(251, 113, 133, 0.14);

  --modal-backdrop: rgba(7, 11, 20, 0.82);
  --glass-bg: rgba(17, 24, 39, 0.85);
  --glass-border: rgba(255, 255, 255, 0.08);
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.45);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition-smooth: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}


/* ---------------------------------------------------------
   BASE STYLES & RESET
   --------------------------------------------------------- */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}


html, body {
  width: 100%;
  min-height: 100%;
  font-family: var(--font-family);
  background-color: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.45;
  letter-spacing: -0.01em;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
  transition: var(--transition-smooth);
}

input, select {
  font-family: inherit;
  outline: none;
}

/* ---------------------------------------------------------
   APP LAYOUT ARCHITECTURE
   --------------------------------------------------------- */
.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}

/* HEADER NAVBAR */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition-smooth);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.brand-icon-box {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary-cyan) 0%, var(--secondary-violet) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(34, 211, 238, 0.35);
}

.brand-title {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.cloud-status-pill {
  font-size: 10px;
  font-weight: 800;
  background: var(--badge-bg);
  color: var(--badge-text);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(34, 211, 238, 0.25);
  white-space: nowrap;
}

/* Desktop Navigation Links */
.desktop-nav-tabs {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  gap: 4px;
}

.web-nav-btn {
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  transition: var(--transition-smooth);
}

.web-nav-btn:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.web-nav-btn.active {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.14) 0%, rgba(139, 92, 246, 0.14) 100%);
  color: var(--primary-cyan);
  font-weight: 800;
  border: 1px solid rgba(34, 211, 238, 0.35);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.2);
}

/* Header Right Actions */
.header-right-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--text-primary);
  transition: var(--transition-smooth);
}

.theme-toggle-btn:hover {
  background: var(--bg-card-hover);
  border-color: rgba(34, 211, 238, 0.3);
  transform: scale(1.05);
}

.auth-header-btn {
  padding: 8px 14px;
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.auth-header-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary-cyan);
}

.action-add-btn {
  padding: 9px 18px;
  background: linear-gradient(135deg, #22D3EE 0%, #06B6D4 45%, #8B5CF6 100%);
  color: #070B14;
  font-size: 13px;
  font-weight: 800;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 18px rgba(34, 211, 238, 0.35), 0 0 12px rgba(139, 92, 246, 0.2);
  transition: var(--transition-smooth);
}

.action-add-btn:hover {
  background: linear-gradient(135deg, #67E8F9 0%, #22D3EE 45%, #A78BFA 100%);
  box-shadow: 0 6px 24px rgba(34, 211, 238, 0.5), 0 0 16px rgba(139, 92, 246, 0.35);
  transform: translateY(-1px);
}



/* ---------------------------------------------------------
   MAIN CONTENT & SCREEN WRAPPERS
   --------------------------------------------------------- */
.app-main-content {
  flex: 1;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 24px 60px 24px;
}

.screen-view {
  display: none;
  animation: fadeIn 0.25s ease-out forwards;
}

.screen-view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.page-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

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

.icon-round-btn {
  width: 40px;
  height: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--text-primary);
  transition: var(--transition-smooth);
}

.icon-round-btn:hover {
  background: var(--bg-card-hover);
  transform: scale(1.05);
}

/* ---------------------------------------------------------
   CARDS & SURFACES
   --------------------------------------------------------- */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
}

.glass-card:hover {
  border-color: var(--border-color-subtle);
}

/* ---------------------------------------------------------
   ONBOARDING & AUTH FORMS (WITH CYBERNETIC HERO BACKGROUND)
   --------------------------------------------------------- */
body.onboarding-mode .app-header,
body.onboarding-mode .mobile-bottom-nav {
  display: none !important;
}

body.onboarding-mode .app-main-content {
  padding: 0 !important;
  max-width: 100% !important;
  min-height: 100vh;
}

#onboardingScreen {
  min-height: 100vh;
  position: relative;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px 16px 60px 16px;
  background: linear-gradient(180deg, rgba(7, 11, 20, 0.4) 0%, rgba(7, 11, 20, 0.75) 45%, #070B14 100%),
              url('login_bg.png') center bottom / cover no-repeat,
              #070B14;
  border-radius: 0;
  overflow: hidden;
}

#onboardingScreen.active {
  display: flex !important;
  flex-direction: column;
}


.onboarding-content {
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.onboarding-hero {
  text-align: center;
  margin-bottom: 24px;
}

.hero-logo-glow {
  width: 68px;
  height: 68px;
  background: linear-gradient(135deg, var(--primary-cyan) 0%, var(--secondary-violet) 100%);

  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
  box-shadow: 0 8px 24px rgba(34, 211, 238, 0.4);
}

.hero-title {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.hero-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.pill-yellow {
  color: var(--primary-cyan);
}
body.theme-dark .pill-yellow { color: var(--primary-cyan); }

.auth-type-tabs {
  display: flex;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 3px;
  margin-bottom: 18px;
}

.auth-tab-btn {
  flex: 1;
  padding: 7px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  text-align: center;
  transition: var(--transition-smooth);
}

.auth-tab-btn.active {
  background: var(--primary-cyan);
  color: #070B14;
  font-weight: 800;
}

/* Google Sign-In & Auth Divider */
.btn-google-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 11px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  color: #FFFFFF;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(12px);
}

.btn-google-auth:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(34, 211, 238, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.btn-google-auth:active {
  transform: translateY(0);
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 14px 0 16px 0;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-divider:not(:empty)::before {
  margin-right: 12px;
}

.auth-divider:not(:empty)::after {
  margin-left: 12px;
}



.auth-form-view,
form.auth-form-view,
.modal-form.auth-form-view {
  display: none !important;
}

.auth-form-view.active,
form.auth-form-view.active,
.modal-form.auth-form-view.active {
  display: flex !important;
  flex-direction: column;
  gap: 14px;
}


.input-with-icon {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0 12px;
}

.input-with-icon .input-icon {
  font-size: 16px;
  margin-right: 8px;
}

.input-with-icon input {
  flex: 1;
  background: none;
  border: none;
  padding: 12px 0;
  color: var(--text-primary);
  font-size: 14px;
}

.auth-error-msg {
  font-size: 12px;
  color: var(--expense-color);
  background: var(--expense-bg);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  display: none;
}

.avatar-picker {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.avatar-opt {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.avatar-opt.active {
  background: var(--primary-yellow);
  border-color: var(--primary-yellow);
  transform: scale(1.08);
}

.currency-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.curr-opt {
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.curr-opt.active {
  background: var(--primary-yellow);
  color: #000000;
  font-weight: 800;
  border-color: var(--primary-yellow);
}

.security-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

/* ---------------------------------------------------------
   DASHBOARD GRID & SECTIONS
   --------------------------------------------------------- */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
}

.dashboard-col-left, .dashboard-col-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.user-greeting-box {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar-badge {
  width: 44px;
  height: 44px;
  background: var(--primary-yellow);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 12px rgba(255, 230, 0, 0.28);
}

.time-greeting {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.user-name-display {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

/* Total Balance Card with Cyan-to-Violet Shader */
.balance-hero-card {
  background: radial-gradient(circle at 85% 18%, rgba(34, 211, 238, 0.18) 0%, rgba(34, 211, 238, 0.04) 38%, transparent 65%),
              radial-gradient(circle at 15% 85%, rgba(139, 92, 246, 0.14) 0%, rgba(139, 92, 246, 0.03) 40%, transparent 65%),
              linear-gradient(145deg, #111827 0%, #0d1527 100%);
  border: 1px solid rgba(34, 211, 238, 0.22);
  box-shadow: 0 10px 30px rgba(7, 11, 20, 0.8),
              0 0 24px rgba(34, 211, 238, 0.09),
              inset 0 1px 1px rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.balance-hero-card::after {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.22) 0%, rgba(139, 92, 246, 0.08) 50%, transparent 75%);
  pointer-events: none;
  filter: blur(10px);
}



.card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.label-muted {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.vault-badge {
  font-size: 11px;
  font-weight: 700;
  background: var(--badge-bg);
  color: var(--badge-text);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.balance-big-val {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.stats-split-row {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

.stat-col {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-icon-circle {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 900;
}

.income-circle {
  background: var(--income-bg);
  color: var(--income-color);
}

.expense-circle {
  background: var(--expense-bg);
  color: var(--expense-color);
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  display: block;
}

.stat-value {
  font-size: 15px;
  font-weight: 800;
}

.income-col .stat-value { color: var(--income-color); }
.expense-col .stat-value { color: var(--expense-color); }

.stat-divider {
  width: 1px;
  height: 30px;
  background: var(--border-color);
  margin: 0 16px;
}

/* KPI Row */
.dashboard-kpi-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.kpi-card {
  padding: 16px;
  background: radial-gradient(circle at 90% 10%, rgba(34, 211, 238, 0.08) 0%, transparent 60%), #111827;
  border: 1px solid rgba(34, 211, 238, 0.14);
}

.kpi-card:hover {
  border-color: rgba(34, 211, 238, 0.3);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 14px rgba(34, 211, 238, 0.08);
}

.kpi-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.kpi-value {
  font-size: 20px;
  font-weight: 900;
  margin: 4px 0;
}

.kpi-caption {
  font-size: 11px;
  color: var(--text-secondary);
}

.text-yellow { color: var(--primary-cyan); }
body.theme-dark .text-yellow { color: var(--primary-cyan); }
.text-red { color: var(--expense-color); }
.text-green { color: var(--income-color); }

/* Top Category Banner */
.top-category-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: radial-gradient(circle at 85% 50%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 15% 50%, rgba(34, 211, 238, 0.06) 0%, transparent 50%),
              #111827;
  border: 1px solid rgba(34, 211, 238, 0.16);
}

.top-category-banner:hover {
  border-color: rgba(34, 211, 238, 0.3);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 14px rgba(34, 211, 238, 0.08);
}


.top-cat-icon {
  font-size: 24px;
  margin-right: 12px;
}

.top-cat-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.top-cat-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
}

.top-cat-stat {
  text-align: right;
}

.top-cat-amount {
  font-size: 16px;
  font-weight: 900;
  color: var(--expense-color);
}

.top-cat-pct {
  font-size: 11px;
  color: var(--text-muted);
}

/* Action Grid Buttons */
.action-grid {
  display: flex;
  gap: 12px;
}

.btn-primary {
  padding: 13px 22px;
  background: linear-gradient(135deg, #22D3EE 0%, #06B6D4 45%, #8B5CF6 100%);
  color: #070B14;
  font-weight: 800;
  font-size: 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.18);
  text-align: center;
  box-shadow: 0 4px 18px rgba(34, 211, 238, 0.35), 0 0 12px rgba(139, 92, 246, 0.2);
  transition: var(--transition-smooth);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #67E8F9 0%, #22D3EE 45%, #A78BFA 100%);
  box-shadow: 0 6px 24px rgba(34, 211, 238, 0.5), 0 0 16px rgba(139, 92, 246, 0.35);
  transform: translateY(-1px);
}


.btn-secondary {
  padding: 13px 20px;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  font-weight: 700;
  font-size: 14px;
  border-radius: var(--radius-md);
  text-align: center;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-muted);
}

.full-width { width: 100%; }
.flex-1 { flex: 1; }

/* Section Header Rows */
.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  margin-bottom: 2px;
}

.section-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
}

/* FORWARD BUTTON ON MONTHLY BUDGETS CARD */
.budget-forward-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(139, 92, 246, 0.15);
  color: var(--secondary-violet);
  font-size: 12px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(139, 92, 246, 0.3);
  transition: var(--transition-smooth);
}

.budget-forward-btn span {
  font-size: 14px;
  transition: transform 0.2s ease;
}

.budget-forward-btn:hover {
  background: var(--secondary-violet);
  color: #F8FAFC;
  transform: translateX(2px);
}

.budget-forward-btn:hover span {
  transform: translateX(3px);
}

.link-btn {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-cyan);
  transition: var(--transition-smooth);
}
body.theme-light .link-btn { color: #0284C7; }

.link-btn:hover {
  text-decoration: underline;
}

/* Horizontal Budget Mini-Cards Scroll */
.horizontal-scroll-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
}

.mini-budget-card {
  min-width: 170px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  flex-shrink: 0;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.mini-budget-card:hover {
  border-color: var(--primary-cyan);
  transform: translateY(-2px);
}


.mini-b-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.mini-b-values {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.mini-progress-track {
  height: 5px;
  background: var(--bg-surface);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.mini-progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

/* Transaction List Stack */
.tx-list-stack, .tx-full-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tx-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.tx-item-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color-subtle);
  transform: translateX(2px);
}

.tx-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tx-cat-icon-badge {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.tx-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.tx-subtitle {
  font-size: 11px;
  color: var(--text-muted);
}

.tx-right {
  text-align: right;
}

.tx-amount {
  font-size: 15px;
  font-weight: 800;
}

.tx-amount.expense { color: var(--expense-color); }
.tx-amount.income { color: var(--income-color); }

/* ---------------------------------------------------------
   FILTER CHIPS & SEARCH
   --------------------------------------------------------- */
.search-input-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 12px;
}

.search-input-box input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 13px;
}

.filter-chips-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.chip-filter {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  white-space: nowrap;
  transition: var(--transition-smooth);
}

.chip-filter:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.chip-filter.active {
  background: var(--primary-cyan);
  color: #070B14;
  font-weight: 800;
  border-color: var(--primary-cyan);
}

.results-count-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin: 8px 0 12px 0;
}

.clear-filter-btn {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--bg-card);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

/* ---------------------------------------------------------
   BUDGETS SCREEN STYLES
   --------------------------------------------------------- */
.budgets-container {
  max-width: 800px;
}

.budget-total-card {
  margin-bottom: 18px;
}

.budget-spent-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}

.budget-spent-val {
  font-size: 30px;
  font-weight: 900;
  color: var(--text-primary);
}

.budget-limit-val {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 600;
}

.badge-pill {
  font-size: 11px;
  font-weight: 800;
  background: var(--badge-bg);
  color: var(--badge-text);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.progress-bar-track {
  height: 8px;
  background: var(--bg-surface);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-cyan) 0%, var(--secondary-violet) 100%);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}


.budget-remaining-text {
  font-size: 12px;
  color: var(--income-color);
  font-weight: 700;
}

.budget-items-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.budget-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: var(--transition-smooth);
}

.budget-item-card:hover {
  border-color: var(--border-color-subtle);
}

.b-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.b-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 800;
}

.b-item-right {
  font-size: 12px;
  font-weight: 700;
}

.overspend-alert-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--expense-bg);
  border: 1px solid var(--expense-color);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 18px;
}

.alert-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--expense-color);
}

.alert-desc {
  font-size: 12px;
  color: var(--text-primary);
}

/* ---------------------------------------------------------
   ANALYTICS SCREEN STYLES
   --------------------------------------------------------- */
.analytics-layout-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 24px;
  margin-top: 16px;
}

.analytics-col-left, .analytics-col-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.analytics-summary-card {
  padding: 16px;
}

.analytics-kpi-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.analytics-kpi-item {
  text-align: center;
}

.stat-divider-vertical {
  width: 1px;
  height: 34px;
  background: var(--border-color);
}

.analytics-kpi-item .kpi-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
}

.analytics-kpi-item .kpi-val {
  font-size: 16px;
  font-weight: 900;
  margin-top: 2px;
}

.chart-card {
  padding: 20px;
}

.card-header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-size: 16px;
  font-weight: 800;
}

.tag-badge {
  font-size: 11px;
  font-weight: 700;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  color: var(--primary-yellow);
}

.chart-canvas-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px 0 20px 0;
}

.donut-center-info {
  position: absolute;
  text-align: center;
  pointer-events: none;
}

.donut-center-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.donut-center-val {
  font-size: 18px;
  font-weight: 900;
  color: var(--text-primary);
}

.chart-legend-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-secondary);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.bar-chart-container {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 160px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  gap: 6px;
}

.bar-pillar {
  width: 100%;
  max-width: 24px;
  background: linear-gradient(180deg, var(--primary-cyan) 0%, var(--secondary-violet) 100%);
  border-radius: 4px 4px 0 0;
  transition: height 0.4s ease;
}

.bar-label {
  font-size: 9px;
  color: var(--text-muted);
  font-weight: 600;
}

.category-breakdown-card {
  padding: 20px;
}

.category-bars-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.cat-bar-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cat-bar-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
}

/* ---------------------------------------------------------
   SETTINGS SCREEN & THEME SWITCHER
   --------------------------------------------------------- */
.settings-container {
  max-width: 680px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-id-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
}

.profile-avatar {
  width: 54px;
  height: 54px;
  background: linear-gradient(135deg, var(--primary-cyan) 0%, var(--secondary-violet) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 4px 14px rgba(34, 211, 238, 0.35);
}


.profile-meta {
  flex: 1;
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.profile-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
}

.edit-name-btn, .copy-btn {
  font-size: 13px;
  cursor: pointer;
}

.uuid-row {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.settings-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-group-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  padding-left: 4px;
}

.settings-card-list {
  padding: 0;
  overflow: hidden;
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition-smooth);
}

.setting-item:last-child {
  border-bottom: none;
}

.setting-item.clickable:hover {
  background: var(--bg-card-hover);
  cursor: pointer;
}

.setting-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.setting-icon {
  font-size: 20px;
}

.setting-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.setting-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}

.setting-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chevron {
  font-size: 18px;
  color: var(--text-muted);
}

.current-curr-pill {
  font-size: 12px;
  font-weight: 800;
  color: var(--primary-yellow);
}
body.theme-light .current-curr-pill { color: #D97706; }

/* THEME SWITCH CONTROL */
.theme-switch-control {
  display: flex;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 2px;
}

.theme-btn {
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  transition: var(--transition-smooth);
}

.theme-btn.active {
  background: var(--primary-yellow);
  color: #000000;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(255, 230, 0, 0.25);
}

.danger-item .danger-text { color: var(--expense-color); }
.danger-item:hover { background: var(--expense-bg) !important; }

.version-tag {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  padding: 10px 0;
}

/* ---------------------------------------------------------
   MODALS & BOTTOM SHEETS
   --------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--modal-backdrop);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.modal-sheet {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.open .modal-sheet {
  transform: translateY(0) scale(1);
}

#authModalBackdrop .modal-sheet {
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.92) 0%, rgba(7, 11, 20, 0.96) 100%),
              url('login_bg.png') center bottom / cover no-repeat;
  border: 1px solid rgba(34, 211, 238, 0.25);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(34, 211, 238, 0.12);
}

.modal-handle {

  display: none;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.modal-title {
  font-size: 18px;
  font-weight: 800;
}

.modal-close-btn {
  font-size: 16px;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
}

.modal-close-btn:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

/* Forms */
.modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.form-group input, .form-select {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: var(--text-primary);
  font-size: 14px;
  transition: var(--transition-smooth);
}

.form-group input:focus, .form-select:focus {
  border-color: var(--primary-yellow);
}

.large-amount-input-box {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 16px;
}

.large-currency-symbol {
  font-size: 20px;
  font-weight: 900;
  color: var(--primary-yellow);
  margin-right: 8px;
}

.large-amount-field {
  border: none !important;
  background: none !important;
  font-size: 26px !important;
  font-weight: 900 !important;
  padding: 0 !important;
}

.type-segmented-control {
  display: flex;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 4px;
}

.seg-btn {
  flex: 1;
  padding: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: var(--transition-smooth);
}

.seg-btn.active {
  background: var(--primary-yellow);
  color: #000000;
  font-weight: 800;
}

.category-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 140px;
  overflow-y: auto;
}

.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.cat-chip.active {
  background: var(--primary-yellow);
  color: #000000;
  font-weight: 800;
  border-color: var(--primary-yellow);
}

/* ---------------------------------------------------------
   NATIVE MOBILE BOTTOM BAR (MOBILE ONLY)
   --------------------------------------------------------- */
.mobile-bottom-nav {
  display: none;
}

/* ---------------------------------------------------------
   RESPONSIVE DUAL-VIEW MEDIA QUERIES (MOBILE VS DESKTOP)
   --------------------------------------------------------- */
@media (max-width: 768px) {
  /* Hide Desktop Navbar Tabs */
  .desktop-nav-tabs {
    display: none;
  }

  .action-add-btn {
    display: none;
  }

  .app-header {
    padding: 6px 0;
  }

  .header-inner {
    padding: 8px 16px;
  }

  .app-main-content {
    padding: 16px 16px 88px 16px;
  }

  /* Single Column Dashboard */
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Single Column Analytics */
  .analytics-layout-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Native Mobile Bottom App Bar */
  .mobile-bottom-nav {
    display: flex;
    align-items: center;
    justify-content: space-around;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 68px;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-color);
    z-index: 999;
    padding: 4px 12px 10px 12px;
  }

  .nav-tab-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 600;
    flex: 1;
    transition: var(--transition-smooth);
  }

  .nav-tab-btn.active {
    color: var(--primary-cyan);
    font-weight: 800;
  }
  body.theme-light .nav-tab-btn.active { color: #0284C7; }

  .nav-fab-btn {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--primary-cyan) 0%, var(--secondary-violet) 100%);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #070B14;
    box-shadow: 0 6px 18px rgba(34, 211, 238, 0.4);
    margin-top: -24px;
    flex-shrink: 0;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  }


  .nav-fab-btn:active {
    transform: scale(0.92);
  }

  /* Bottom sheet style on mobile */
  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .modal-sheet {
    border-radius: 24px 24px 0 0;
    max-width: 100%;
    transform: translateY(100%);
    padding: 20px 20px 36px 20px;
  }

  .modal-backdrop.open .modal-sheet {
    transform: translateY(0);
  }

  .modal-handle {
    display: block;
    width: 38px;
    height: 4px;
    background: var(--text-muted);
    border-radius: var(--radius-full);
    margin: 0 auto 16px auto;
    opacity: 0.5;
  }
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  animation: toastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Balance Card Privacy Toggle */
.balance-privacy-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.balance-privacy-btn:hover {
  background: rgba(34, 211, 238, 0.15);
  color: var(--primary-cyan);
  border-color: rgba(34, 211, 238, 0.3);
}

/* ---------------------------------------------------------
   FUTURISTIC COMMAND HUB (QUICK ACTION TRIO)
   --------------------------------------------------------- */
.command-hub-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 10px;
}

.cmd-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: 1px solid transparent;
  white-space: nowrap;
}

.cmd-btn:active {
  transform: scale(0.97);
}

.cmd-icon {
  font-size: 14px;
  font-weight: 900;
}

.cmd-income {
  background: rgba(52, 211, 153, 0.12);
  color: #34D399;
  border-color: rgba(52, 211, 153, 0.25);
  box-shadow: 0 4px 14px rgba(52, 211, 153, 0.15);
}

.cmd-income:hover {
  background: #34D399;
  color: #070B14;
  box-shadow: 0 6px 20px rgba(52, 211, 153, 0.35);
  transform: translateY(-1px);
}

.cmd-expense {
  background: rgba(251, 113, 133, 0.12);
  color: #FB7185;
  border-color: rgba(251, 113, 133, 0.25);
  box-shadow: 0 4px 14px rgba(251, 113, 133, 0.15);
}

.cmd-expense:hover {
  background: #FB7185;
  color: #070B14;
  box-shadow: 0 6px 20px rgba(251, 113, 133, 0.35);
  transform: translateY(-1px);
}

.cmd-goal {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.18) 0%, rgba(139, 92, 246, 0.18) 100%);
  color: #22D3EE;
  border-color: rgba(34, 211, 238, 0.35);
  box-shadow: 0 4px 16px rgba(34, 211, 238, 0.2);
}

.cmd-goal:hover {
  background: linear-gradient(135deg, #22D3EE 0%, #06B6D4 45%, #8B5CF6 100%);
  color: #070B14;
  box-shadow: 0 6px 22px rgba(34, 211, 238, 0.4);
  transform: translateY(-1px);
}

/* ---------------------------------------------------------
   DASHBOARD ACTIVE GOALS SHOWCASE
   --------------------------------------------------------- */
.dash-goals-showcase {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mini-active-goal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: var(--transition-smooth);
}

.mini-active-goal-card:hover {
  border-color: var(--primary-cyan);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 12px rgba(34, 211, 238, 0.1);
}

.mini-goal-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.mini-goal-icon {
  font-size: 22px;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mini-goal-info {
  flex: 1;
  min-width: 0;
}

.mini-goal-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-goal-progress-sub {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.mini-goal-track {
  height: 5px;
  background: var(--bg-surface);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 4px;
}

.mini-goal-fill {
  height: 100%;
  background: linear-gradient(90deg, #22D3EE 0%, #8B5CF6 100%);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.mini-goal-deposit-btn {
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 800;
  background: rgba(34, 211, 238, 0.12);
  color: var(--primary-cyan);
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: var(--radius-full);
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.mini-goal-deposit-btn:hover {
  background: var(--primary-cyan);
  color: #070B14;
}

/* ---------------------------------------------------------
   DEDICATED GOALS SCREEN & FUTURISTIC CARDS
   --------------------------------------------------------- */
.goals-screen-container {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.goals-summary-card {
  padding: 16px 20px;
}

.goals-kpi-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.goal-kpi-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.text-cyan { color: var(--primary-cyan); }
.text-violet { color: var(--secondary-violet); }

.goals-showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.futuristic-goal-card {
  background: radial-gradient(circle at 90% 10%, rgba(34, 211, 238, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 10% 90%, rgba(139, 92, 246, 0.06) 0%, transparent 50%),
              var(--bg-card);
  border: 1px solid rgba(34, 211, 238, 0.16);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.futuristic-goal-card:hover {
  border-color: rgba(34, 211, 238, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(34, 211, 238, 0.12);
}

/* Celebration 100% Achieved State */
.futuristic-goal-card.achieved {
  border-color: rgba(52, 211, 153, 0.5);
  background: radial-gradient(circle at 90% 10%, rgba(52, 211, 153, 0.12) 0%, transparent 60%),
              radial-gradient(circle at 10% 90%, rgba(34, 211, 238, 0.08) 0%, transparent 60%),
              var(--bg-card);
  box-shadow: 0 6px 24px rgba(52, 211, 153, 0.15);
}

.goal-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.goal-header-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.goal-avatar-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.goal-title-h3 {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  word-break: break-word;
}

.goal-countdown-chip {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

.goal-pct-pill {
  font-size: 13px;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(34, 211, 238, 0.12);
  color: var(--primary-cyan);
  border: 1px solid rgba(34, 211, 238, 0.3);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.15);
  flex-shrink: 0;
}

.goal-pct-pill.achieved-pill {
  background: rgba(52, 211, 153, 0.15);
  color: #34D399;
  border-color: rgba(52, 211, 153, 0.4);
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.25);
}

.goal-metrics-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.goal-saved-figure {
  font-size: 20px;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.goal-target-figure {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.goal-quantum-track {
  height: 8px;
  background: var(--bg-surface);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.goal-quantum-fill {
  height: 100%;
  background: linear-gradient(90deg, #22D3EE 0%, #06B6D4 40%, #8B5CF6 100%);
  border-radius: var(--radius-full);
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.5);
}

.goal-quantum-fill.achieved-fill {
  background: linear-gradient(90deg, #34D399 0%, #22D3EE 100%);
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.6);
}

.goal-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 4px;
}

.btn-goal-fund {
  flex: 1;
  padding: 8px 12px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
  color: var(--primary-cyan);
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition-smooth);
  white-space: nowrap;
}

.btn-goal-fund:hover {
  background: linear-gradient(135deg, #22D3EE 0%, #8B5CF6 100%);
  color: #070B14;
  box-shadow: 0 4px 16px rgba(34, 211, 238, 0.35);
}

.btn-goal-danger {
  padding: 8px 10px;
  background: var(--bg-surface);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-goal-danger:hover {
  color: var(--expense-color);
  border-color: var(--expense-color);
  background: rgba(251, 113, 133, 0.1);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: max-content;
  max-width: 90vw;
}

.toast {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  animation: toastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------------------------------------------------------
   RESPONSIVE DUAL-VIEW MEDIA QUERIES (MOBILE VS TABLET VS DESKTOP)
   --------------------------------------------------------- */
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .analytics-layout-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 768px) {
  /* Hide Desktop Navbar Tabs */
  .desktop-nav-tabs,
  .action-add-btn {
    display: none !important;
  }

  .app-header {
    padding: 6px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
  }

  .header-inner {
    padding: 6px 14px;
    gap: 8px;
  }

  .brand-group {
    gap: 8px;
  }

  .brand-icon-box {
    width: 30px;
    height: 30px;
  }

  .brand-title {
    font-size: 16px;
  }

  .header-right-controls {
    gap: 6px;
  }

  .theme-toggle-btn {
    width: 34px;
    height: 34px;
    font-size: 14px;
  }

  .auth-header-btn {
    padding: 6px 10px;
    font-size: 11px;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app-main-content {
    padding: 14px 12px 84px 12px;
    max-width: 100%;
    overflow-x: hidden;
  }

  /* Single Column Dashboard */
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .balance-hero-card {
    padding: 16px;
  }

  .balance-big-val {
    font-size: clamp(24px, 7vw, 32px);
    margin-bottom: 14px;
    word-break: break-word;
  }

  .stats-split-row {
    padding: 10px 12px;
  }

  .stat-icon-circle {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .stat-label {
    font-size: 10px;
  }

  .stat-value {
    font-size: clamp(12px, 3.5vw, 15px);
  }

  .stat-divider {
    margin: 0 8px;
    height: 24px;
  }

  .dashboard-kpi-row {
    gap: 10px;
  }

  .kpi-card {
    padding: 12px;
  }

  .kpi-value {
    font-size: clamp(15px, 4.2vw, 19px);
    word-break: break-word;
  }

  .top-category-banner {
    padding: 12px 14px;
    gap: 8px;
  }

  .top-cat-name {
    font-size: 14px;
  }

  .top-cat-amount {
    font-size: clamp(13px, 3.8vw, 16px);
  }

  /* Single Column Analytics */
  .analytics-layout-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .analytics-summary-card {
    padding: 14px;
  }

  .analytics-kpi-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .analytics-kpi-item:last-child {
    grid-column: 1 / -1;
  }

  .analytics-summary-card .stat-divider-vertical {
    display: none;
  }

  /* Categories */
  .categories-layout-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .cat-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
  }

  /* Goals Screen */
  .goals-summary-card {
    padding: 14px;
  }

  .goals-kpi-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .goal-kpi-item:first-child {
    grid-column: 1 / -1;
  }

  .goals-summary-card .stat-divider-vertical {
    display: none;
  }

  .goals-showcase-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .futuristic-goal-card {
    padding: 14px;
    gap: 12px;
  }

  .goal-avatar-box {
    width: 38px;
    height: 38px;
    font-size: 20px;
  }

  .goal-title-h3 {
    font-size: 14px;
  }

  .goal-saved-figure {
    font-size: clamp(16px, 4.8vw, 20px);
  }

  /* Filter chips horizontal touch scroll */
  .filter-chips-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .filter-chips-row::-webkit-scrollbar {
    display: none;
  }

  .chip-filter {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 6px 12px;
    font-size: 12px;
  }

  /* Native Mobile Bottom App Bar */
  .mobile-bottom-nav {
    display: flex;
    align-items: center;
    justify-content: space-around;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(17, 24, 39, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(34, 211, 238, 0.18);
    z-index: 999;
    padding: 2px 4px calc(env(safe-area-inset-bottom, 0px) + 4px) 4px;
  }

  .nav-tab-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    flex: 1;
    min-width: 0;
    padding: 4px 0;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
  }

  .nav-tab-btn span {
    font-size: 10px;
    white-space: nowrap;
  }

  .nav-tab-btn.active {
    color: var(--primary-cyan);
    font-weight: 800;
  }

  .nav-fab-btn {

    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #22D3EE 0%, #8B5CF6 100%);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #070B14;
    box-shadow: 0 4px 16px rgba(34, 211, 238, 0.45);
    margin-top: -20px;
    flex-shrink: 0;
    border: 2px solid #070B14;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .nav-fab-btn:active {
    transform: scale(0.92);
  }

  /* Bottom sheet style on mobile */
  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .modal-sheet {
    border-radius: 20px 20px 0 0;
    max-width: 100% !important;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px 16px 36px 16px;
    transform: translateY(100%);
  }

  .modal-backdrop.open .modal-sheet {
    transform: translateY(0);
  }

  .modal-handle {
    display: block;
    width: 38px;
    height: 4px;
    background: var(--text-muted);
    border-radius: var(--radius-full);
    margin: 0 auto 14px auto;
    opacity: 0.5;
  }

  .large-amount-field {
    font-size: 26px;
  }

  .large-currency-symbol {
    font-size: 18px;
  }

  .icon-picker-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
  }
}

/* Small Mobile Screen Adjustments (< 540px) */
@media (max-width: 540px) {
  .command-hub-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .cmd-goal {
    grid-column: 1 / -1;
  }
  .cmd-btn {
    padding: 11px 8px;
    font-size: 12px;
  }
  .goal-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr auto auto;
    gap: 6px;
  }
  .btn-goal-fund {
    padding: 8px 6px;
    font-size: 11px;
  }
}

/* Tiny Mobile Screens (< 360px) */
@media (max-width: 360px) {
  .command-hub-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .cmd-goal {
    grid-column: auto;
  }
  .auth-header-btn {
    display: none;
  }
}

/* ---------------------------------------------------------
   EXPORT STATEMENT MODAL STYLING
   --------------------------------------------------------- */
.export-period-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 6px;
}

@media (max-width: 520px) {
  .export-period-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.export-period-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 10px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  transition: var(--transition-smooth);
}

.export-period-btn:hover {
  background: var(--bg-card-hover);
  border-color: rgba(34, 211, 238, 0.4);
}

.export-period-btn.active {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.16) 0%, rgba(139, 92, 246, 0.16) 100%);
  border-color: var(--primary-cyan);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.2);
}

.export-period-btn .period-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
}

.export-period-btn.active .period-name {
  color: var(--primary-cyan);
}

.export-period-btn .period-hint {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

.export-preview-box {
  background: rgba(17, 24, 39, 0.6);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-top: 14px;
}

.preview-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.preview-tag {
  font-size: 9px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  display: block;
}

.preview-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary-cyan);
}

.preview-dates {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.preview-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 10px;
}

.preview-metric-col .metric-label {
  font-size: 9px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  display: block;
}

.preview-metric-col .metric-val {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 2px;
  display: block;
}

.preview-metric-col .metric-val.income-text {
  color: var(--income-color);
}

.preview-metric-col .metric-val.expense-text {
  color: var(--expense-color);
}
