/* ═══════════════════════════════════════════════════════════════════════════
   MASTER FINANCE — EXECUTIVE CORE STYLESHEET
   Domain: masterfinance.netsite.ai
   Theme Engine: Multi-Shade Green Architecture (Emerald, Sage, Cyber)
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* Fonts */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  /* Default Theme: EMERALD LUXURY */
  --bg-app: #080d0a;
  --bg-surface: #0e1611;
  --bg-surface-elevated: #142018;
  --bg-card: rgba(18, 28, 22, 0.85);
  --bg-card-hover: rgba(24, 38, 30, 0.95);
  --border-subtle: rgba(52, 211, 153, 0.12);
  --border-focus: rgba(52, 211, 153, 0.35);
  --border-hover: rgba(52, 211, 153, 0.25);

  --accent-primary: #10b981;
  --accent-secondary: #34d399;
  --accent-deep: #047857;
  --accent-glow: rgba(16, 185, 129, 0.25);
  --accent-subtle: rgba(16, 185, 129, 0.12);
  --accent-gold: #d4af37;

  --text-primary: #f0fdf4;
  --text-secondary: #a7f3d0;
  --text-muted: #6ee7b7;
  --text-dim: #3d6a52;

  --status-income: #10b981;
  --status-expense: #ef4444;
  --status-warning: #f59e0b;
  --status-info: #3b82f6;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.5), 0 0 24px var(--accent-glow);
  --bottom-bar-height: 72px;
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── THEME 2: SAGE MINIMALIST ────────────────────────────────────────────── */
[data-theme="sage"] {
  --bg-app: #0e1310;
  --bg-surface: #141c17;
  --bg-surface-elevated: #1c2720;
  --bg-card: rgba(22, 32, 26, 0.85);
  --bg-card-hover: rgba(28, 40, 33, 0.95);
  --border-subtle: rgba(167, 243, 208, 0.14);
  --border-focus: rgba(167, 243, 208, 0.38);
  --border-hover: rgba(167, 243, 208, 0.24);

  --accent-primary: #6ee7b7;
  --accent-secondary: #a7f3d0;
  --accent-deep: #2d5a44;
  --accent-glow: rgba(110, 231, 183, 0.2);
  --accent-subtle: rgba(110, 231, 183, 0.1);

  --text-primary: #f2f7f4;
  --text-secondary: #cbd5e1;
  --text-muted: #8da496;
  --text-dim: #4e6557;
}

/* ─── THEME 3: CYBER GREEN MATRIX ─────────────────────────────────────────── */
[data-theme="cyber"] {
  --bg-app: #020503;
  --bg-surface: #060b07;
  --bg-surface-elevated: #0b140d;
  --bg-card: rgba(8, 17, 10, 0.9);
  --bg-card-hover: rgba(12, 24, 15, 0.95);
  --border-subtle: rgba(0, 255, 136, 0.2);
  --border-focus: rgba(0, 255, 136, 0.6);
  --border-hover: rgba(0, 255, 136, 0.4);

  --accent-primary: #00ff88;
  --accent-secondary: #52ffaa;
  --accent-deep: #008f4c;
  --accent-glow: rgba(0, 255, 136, 0.35);
  --accent-subtle: rgba(0, 255, 136, 0.15);

  --text-primary: #e6fffa;
  --text-secondary: #85ffc7;
  --text-muted: #4ecca3;
  --text-dim: #1f6b4d;
}

/* ─── BASE RESET ──────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  background-color: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  color: inherit;
}

input, select, textarea {
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

/* ─── TOP EXECUTIVE APP BAR ───────────────────────────────────────────────── */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 13, 10, 0.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 20px;
}

.header-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-img {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  filter: drop-shadow(0 2px 8px var(--accent-glow));
}

.brand-meta {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  background: var(--accent-subtle);
  color: var(--accent-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
}

.brand-sub {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 500;
}

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

.theme-pill-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.theme-pill-btn:hover {
  border-color: var(--border-focus);
  box-shadow: 0 0 12px var(--accent-glow);
}

.theme-color-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 6px var(--accent-primary);
}

.header-icon-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  color: var(--text-secondary);
  font-size: 16px;
  transition: all var(--transition-fast);
}

.header-icon-btn:hover {
  color: var(--accent-primary);
  border-color: var(--border-focus);
  transform: scale(1.05);
}

/* ─── MAIN CONTENT CONTAINER ──────────────────────────────────────────────── */
.main-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px calc(var(--bottom-bar-height) + 40px);
}

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

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

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

/* ─── EXECUTIVE CARDS & STAT METRICS ──────────────────────────────────────── */
.hero-balance-card {
  background: linear-gradient(135deg, rgba(14, 26, 18, 0.95) 0%, rgba(10, 18, 13, 0.95) 100%);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero-balance-card::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.balance-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.balance-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  font-weight: 700;
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--accent-primary);
  font-family: var(--font-mono);
  background: var(--accent-subtle);
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.live-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 8px var(--accent-primary);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.hero-balance-amount {
  font-family: var(--font-sans);
  font-size: clamp(34px, 6vw, 48px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero-balance-amount span.currency {
  font-size: 0.6em;
  color: var(--accent-secondary);
  font-weight: 600;
  margin-right: 4px;
}

.balance-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
}

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

.metric-label {
  font-size: 11.5px;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric-value {
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}

.metric-value.income {
  color: var(--status-income);
}

.metric-value.expense {
  color: var(--status-expense);
}

/* ─── QUICK ACTION BAR ────────────────────────────────────────────────────── */
.quick-action-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.action-pill-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 13.5px;
  transition: all var(--transition-fast);
}

.action-pill-btn:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-focus);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.action-icon {
  font-size: 18px;
}

/* ─── SECTION CONTAINERS & HEADERS ────────────────────────────────────────── */
.section-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-head-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-view-all {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-primary);
}

.section-view-all:hover {
  text-decoration: underline;
}

/* ─── TRANSACTIONS LIST ───────────────────────────────────────────────────── */
.transactions-card-list {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 28px;
}

.transaction-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color var(--transition-fast);
  gap: 14px;
}

.transaction-row:last-child {
  border-bottom: none;
}

.transaction-row:hover {
  background: var(--bg-surface-elevated);
}

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

.tx-icon-badge {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--accent-subtle);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.tx-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tx-merchant {
  font-weight: 700;
  font-size: 14.5px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tx-meta-sub {
  font-size: 12px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tx-cat-chip {
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  font-size: 10.5px;
  color: var(--text-secondary);
  font-weight: 600;
}

.tx-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

.tx-amount {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
}

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

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

.tx-account-name {
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* ─── CATEGORY BUDGETS PROGRESS BARS ──────────────────────────────────────── */
.category-progress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.cat-progress-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all var(--transition-fast);
}

.cat-progress-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-surface-elevated);
}

.cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cat-name-icon {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
}

.cat-amount-summary {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-secondary);
}

.cat-progress-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.cat-progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--accent-deep), var(--accent-primary));
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.cat-progress-bar-fill.overbudget {
  background: linear-gradient(90deg, #ea580c, #ef4444);
}

/* ─── MULTI-ACCOUNT TILES & DUE DATES ─────────────────────────────────────── */
.accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.account-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.account-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent-primary);
}

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

.acc-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}

.acc-balance {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
}

.acc-due-date {
  font-size: 11.5px;
  color: var(--status-warning);
  display: flex;
  align-items: center;
  gap: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

/* ─── BOTTOM ERGONOMIC NAVIGATION BAR ─────────────────────────────────────── */
.bottom-nav-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-bar-height);
  background: rgba(8, 13, 10, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 16px;
  z-index: 900;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.6);
}

.nav-item-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-dim);
  font-size: 10.5px;
  font-weight: 600;
  transition: all var(--transition-fast);
  padding: 8px 12px;
  position: relative;
}

.nav-item-icon {
  font-size: 20px;
  transition: transform var(--transition-fast);
}

.nav-item-btn.active {
  color: var(--accent-primary);
}

.nav-item-btn.active .nav-item-icon {
  transform: translateY(-2px);
  filter: drop-shadow(0 2px 8px var(--accent-glow));
}

.nav-center-add {
  margin-top: -32px;
}

.add-fab-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-secondary) 0%, var(--accent-primary) 60%, var(--accent-deep) 100%);
  color: #080d0a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 300;
  box-shadow: 0 8px 24px var(--accent-glow), 0 0 16px rgba(16, 185, 129, 0.4);
  transition: all var(--transition-fast);
  border: 3px solid var(--bg-app);
}

.add-fab-btn:hover {
  transform: scale(1.08) translateY(-4px);
  box-shadow: 0 12px 30px var(--accent-glow), 0 0 24px rgba(16, 185, 129, 0.6);
}

/* ─── MODAL DIALOGS ───────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-sheet {
  background: var(--bg-surface);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  transform: scale(0.96);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-sheet {
  transform: scale(1);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.modal-close-btn {
  font-size: 22px;
  color: var(--text-dim);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ─── DATA ENTRY TABS (FORM, VOICE, SCAN) ─────────────────────────────────── */
.entry-mode-tabs {
  display: flex;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 4px;
}

.entry-mode-tab {
  flex: 1;
  padding: 10px 8px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.entry-mode-tab.active {
  background: var(--accent-subtle);
  color: var(--accent-primary);
  border: 1px solid var(--border-focus);
}

.mode-content {
  display: none;
}

.mode-content.active {
  display: block;
}

/* ─── FORM CONTROLS ───────────────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.form-input, .form-select, .form-textarea {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text-primary);
  font-size: 14px;
  transition: all var(--transition-fast);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 12px var(--accent-glow);
}

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

.btn-submit-entry {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
  color: #060a07;
  font-weight: 800;
  font-size: 14.5px;
  border-radius: var(--radius-md);
  margin-top: 8px;
  box-shadow: 0 8px 20px var(--accent-glow);
  transition: all var(--transition-fast);
}

.btn-submit-entry:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

/* ─── VOICE ENTRY STAGE ───────────────────────────────────────────────────── */
.voice-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 0;
  gap: 16px;
}

.mic-pulse-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bg-surface-elevated);
  border: 2px solid var(--accent-primary);
  color: var(--accent-primary);
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-smooth);
  position: relative;
}

.mic-pulse-btn.listening {
  background: var(--accent-primary);
  color: #080d0a;
  box-shadow: 0 0 30px var(--accent-primary);
  animation: micRipples 1.5s infinite;
}

@keyframes micRipples {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 24px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.voice-status-text {
  font-size: 13.5px;
  color: var(--text-secondary);
  max-width: 320px;
  line-height: 1.5;
}

.voice-transcription-preview {
  width: 100%;
  background: var(--bg-surface-elevated);
  border: 1px dashed var(--border-hover);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-primary);
  min-height: 56px;
  text-align: left;
}

/* ─── SCANNING / RECEIPT OCR STAGE ────────────────────────────────────────── */
.scan-stage {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
}

.scan-dropzone {
  border: 2px dashed var(--border-hover);
  border-radius: var(--radius-md);
  padding: 36px 20px;
  background: var(--bg-surface-elevated);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.scan-dropzone:hover {
  border-color: var(--accent-primary);
  background: var(--accent-subtle);
}

.scan-icon {
  font-size: 36px;
}

.scan-status-pill {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-primary);
  background: var(--accent-subtle);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  display: inline-block;
}

/* ─── STATEMENTS PARSING & EMAIL INBOX HUB ────────────────────────────────── */
.statements-hub-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  margin-bottom: 24px;
}

.hub-email-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  gap: 14px;
  flex-wrap: wrap;
}

.hub-email-address {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-secondary);
}

.copy-btn {
  padding: 6px 14px;
  background: var(--accent-subtle);
  color: var(--accent-primary);
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  transition: all var(--transition-fast);
}

.copy-btn:hover {
  background: var(--accent-primary);
  color: #080d0a;
}

/* ─── TOAST FEEDBACK ──────────────────────────────────────────────────────── */
.app-toast {
  position: fixed;
  bottom: calc(var(--bottom-bar-height) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--accent-primary);
  color: var(--text-primary);
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-toast.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ─── RESPONSIVE BREAKPOINTS ──────────────────────────────────────────────── */
@media (max-width: 640px) {
  .balance-metrics-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .brand-sub {
    display: none;
  }
}

/* ─── SECURE VAULT AUTHENTICATION GATE & FACE ID OVERLAY ─────────────────── */
.auth-lock-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  background: rgba(8, 13, 10, 0.96);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.auth-lock-overlay.unlocked {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.auth-lock-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  padding: 32px 26px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(16, 185, 129, 0.08);
  animation: cardFadeIn 0.3s ease-out;
}

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.auth-shield-icon {
  font-size: 42px;
  text-align: center;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 16px rgba(16, 185, 129, 0.4));
}

.auth-lock-title {
  font-size: 21px;
  font-weight: 800;
  text-align: center;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.auth-lock-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.45;
  margin-bottom: 22px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   VISUAL ANALYTICS, GRAPHICS & TREND VISUALIZATIONS (Task #8605)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Hero Trend Sparkline Strip ─────────────────────────────────────────── */
.hero-trend-strip {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-sparkline-svg {
  width: 100%;
  height: 36px;
  overflow: visible;
}

/* ─── Filter Bar & Pills ─────────────────────────────────────────────────── */
.chart-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.chart-filter-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.chart-filter-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 700;
  color: var(--text-dim);
  margin-right: 4px;
}

.chart-pill-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.chart-pill-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.chart-pill-btn.active {
  background: var(--accent-primary);
  color: #080d0a;
  border-color: var(--accent-primary);
  font-weight: 800;
  box-shadow: 0 0 12px var(--accent-glow);
}

/* ─── Visual Trend KPI Metrics ───────────────────────────────────────────── */
.chart-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.chart-kpi-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.chart-kpi-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
}

.chart-kpi-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chart-kpi-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 6px;
  letter-spacing: -0.5px;
}

.chart-kpi-delta {
  font-size: 11.5px;
  font-weight: 700;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.chart-kpi-delta.favorable {
  color: var(--status-income);
}

.chart-kpi-delta.unfavorable {
  color: var(--status-expense);
}

.chart-kpi-delta.neutral {
  color: var(--text-dim);
}

.chart-kpi-sub {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}

/* ─── Visual Chart Container Box ─────────────────────────────────────────── */
.visual-chart-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
  position: relative;
}

.visual-chart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.visual-chart-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.visual-chart-subtitle {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
}

.visual-chart-toggles {
  display: flex;
  gap: 6px;
  background: var(--bg-surface-elevated);
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.chart-mode-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.chart-mode-btn.active {
  background: var(--accent-primary);
  color: #080d0a;
  font-weight: 800;
}

/* ─── SVG Area Trend Chart Canvas ────────────────────────────────────────── */
.svg-chart-wrapper {
  width: 100%;
  height: 240px;
  position: relative;
}

.svg-trend-graphic {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chart-grid-line {
  stroke: var(--border-subtle);
  stroke-dasharray: 4 4;
  stroke-width: 1;
}

.chart-axis-label {
  fill: var(--text-dim);
  font-size: 10px;
  font-family: var(--font-mono);
}

.chart-trend-area {
  fill: url(#trend-gradient);
  opacity: 0.35;
  transition: opacity var(--transition-fast);
}

.chart-trend-line {
  fill: none;
  stroke: var(--accent-primary);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px var(--accent-glow));
}

.chart-secondary-line {
  fill: none;
  stroke: var(--status-expense);
  stroke-width: 2;
  stroke-dasharray: 5 4;
}

.chart-data-dot {
  fill: var(--bg-app);
  stroke: var(--accent-primary);
  stroke-width: 2.5;
  cursor: pointer;
  transition: transform var(--transition-fast), r var(--transition-fast);
}

.chart-data-dot:hover {
  r: 6;
  fill: var(--accent-secondary);
  stroke-width: 3;
}

/* ─── Tooltip Floating ───────────────────────────────────────────────────── */
.chart-tooltip-floating {
  position: absolute;
  pointer-events: none;
  background: rgba(14, 22, 17, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 11.5px;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  z-index: 100;
  transform: translate(-50%, -120%);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.chart-tooltip-floating.active {
  opacity: 1;
}

/* ─── 2-Column Visual Grid (Donut & Day of Week) ─────────────────────────── */
.visual-chart-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .visual-chart-grid-2col {
    grid-template-columns: 1fr;
  }
}

/* ─── Donut Chart & Legends ──────────────────────────────────────────────── */
.donut-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.donut-svg-wrap {
  width: 200px;
  height: 200px;
  position: relative;
  margin: 10px auto;
}

.donut-chart-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  overflow: visible;
}

.donut-center-info {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  width: 130px;
}

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

.donut-center-label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.donut-center-pct {
  font-size: 10px;
  color: var(--text-dim);
}

.donut-legend-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
  margin-top: 14px;
}

.donut-legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.donut-legend-item:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.donut-legend-name-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
}

.donut-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.donut-legend-name {
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}

.donut-legend-amt {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 11px;
  margin-left: 6px;
}

/* ─── Day of Week Spend Heatmap ─────────────────────────────────────────── */
.dow-chart-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.dow-bars-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  height: 170px;
  padding: 10px 0 6px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.dow-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  gap: 6px;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.dow-bar-col:hover {
  transform: translateY(-3px);
}

.dow-bar-val {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  font-family: var(--font-mono);
  transition: color var(--transition-fast);
}

.dow-bar-col:hover .dow-bar-val {
  color: var(--text-primary);
}

.dow-bar-track {
  width: 100%;
  max-width: 28px;
  height: 120px;
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  border: 1px solid var(--border-subtle);
}

.dow-bar-fill {
  width: 100%;
  background: var(--accent-deep);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: height 0.4s ease, background 0.2s ease;
}

.dow-bar-col.peak .dow-bar-fill {
  background: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-glow);
}

.dow-bar-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
}

.dow-bar-col.peak .dow-bar-label {
  color: var(--accent-primary);
}

/* ─── Top Merchants List ─────────────────────────────────────────────────── */
.top-merchants-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.top-merchant-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition-fast);
}

.top-merchant-row:hover {
  border-color: var(--border-hover);
}

.top-merchant-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.top-merchant-name {
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-merchant-rank {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 800;
  width: 16px;
}

.top-merchant-stats {
  font-weight: 700;
  color: var(--accent-primary);
  font-family: var(--font-mono);
}

.top-merchant-bar-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.top-merchant-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent-primary));
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}

/* ─── Executive Summary Report Card ──────────────────────────────────────── */
.exec-report-card {
  background: linear-gradient(135deg, rgba(14, 22, 17, 0.95), rgba(20, 32, 24, 0.85));
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-top: 24px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(16, 185, 129, 0.1);
  position: relative;
}

.exec-report-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-primary);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.exec-report-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.exec-report-sub {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 18px;
}

.exec-report-summary-box {
  background: var(--bg-app);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-primary);
  line-height: 1.6;
  white-space: pre-wrap;
  margin-bottom: 16px;
  user-select: text;
}

.exec-report-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ─── PRINT / EXPORT STYLESHEET ──────────────────────────────────────────── */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .app-header, .bottom-nav-bar, .quick-action-strip, .chart-filter-bar, .exec-report-actions, .auth-lock-overlay, .weekly-report-actions, .modal-close-btn, .weekly-period-strip {
    display: none !important;
  }
  .view-panel {
    display: block !important;
  }
  .visual-chart-box, .exec-report-card, .weekly-report-card, .modal-sheet {
    background: #ffffff !important;
    border: 1px solid #cccccc !important;
    color: #000000 !important;
    box-shadow: none !important;
    max-height: none !important;
    overflow: visible !important;
    width: 100% !important;
  }
  .chart-trend-line {
    stroke: #047857 !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   WEEKLY FINANCIAL SPENDING REPORT (Task #8606)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Dashboard Weekly Report Banner ─────────────────────────────────────── */
.weekly-report-banner {
  background: linear-gradient(135deg, rgba(14, 22, 17, 0.95), rgba(16, 185, 129, 0.12));
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 16px rgba(16, 185, 129, 0.08);
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.weekly-report-banner:hover {
  transform: translateY(-2px);
  border-color: var(--accent-secondary);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), 0 0 24px var(--accent-glow);
}

/* ─── Weekly Report Period Switcher ──────────────────────────────────────── */
.weekly-period-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 14px 2px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.weekly-period-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.weekly-period-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.weekly-period-btn.active {
  background: var(--accent-primary);
  color: #080d0a;
  border-color: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-glow);
}

/* ─── Weekly Report Scorecard ────────────────────────────────────────────── */
.weekly-scorecard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.weekly-scorecard-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.weekly-scorecard-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  color: var(--text-dim);
}

.weekly-scorecard-val {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 4px;
  letter-spacing: -0.5px;
}

.weekly-scorecard-delta {
  font-size: 11px;
  font-weight: 700;
  margin-top: 2px;
}

/* ─── Weekly Report Sections ─────────────────────────────────────────────── */
.weekly-section-box {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 16px;
}

.weekly-section-header {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.weekly-cat-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.weekly-cat-row:last-child {
  border-bottom: none;
}

.weekly-cat-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
}

.weekly-cat-name {
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.weekly-cat-spend {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

.weekly-cat-bar-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-full);
  overflow: hidden;
}

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

.weekly-cat-bar-fill.status-green {
  background: var(--accent-primary);
}

.weekly-cat-bar-fill.status-yellow {
  background: var(--status-warning);
}

.weekly-cat-bar-fill.status-red {
  background: var(--status-expense);
}

/* ─── Anomaly Callout Box ────────────────────────────────────────────────── */
.weekly-anomaly-banner {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 14px;
}

.weekly-anomaly-title {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--status-expense);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.weekly-anomaly-desc {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* ─── Directives Styling ─────────────────────────────────────────────────── */
.weekly-directive-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.weekly-directive-row:last-child {
  border-bottom: none;
}

.weekly-directive-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-primary);
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.weekly-directive-text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.weekly-directive-text strong {
  color: var(--text-primary);
}

/* ─── Actions Strip ──────────────────────────────────────────────────────── */
.weekly-report-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   TASK #8608: FINANCIAL TRACKING ADDITIONS (DUE DATES, AUTOPAY, FUNDING, NICKNAMES)
   ═══════════════════════════════════════════════════════════════════════════════ */
.acc-filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.acc-filter-btn {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.acc-filter-btn:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

.acc-filter-btn.active {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.account-card.enhanced {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.account-card.enhanced:hover {
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  transform: translateY(-2px);
}

.account-card.enhanced::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent-primary);
}

.account-card.credit-type::after {
  background: #f59e0b;
}

.account-card.loan-type::after {
  background: #ef4444;
}

.account-card.savings-type::after {
  background: #3b82f6;
}

.acc-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.acc-nickname-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.acc-official-sub {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-dim);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.acc-type-pill {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.acc-balance-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 12px 14px;
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.acc-balance-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  margin-bottom: 2px;
}

.acc-balance-amount {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
}

.acc-sub-metrics {
  text-align: right;
  font-size: 11.5px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* Explicit Due Date Box */
.acc-due-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 8px;
}

.acc-due-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.acc-due-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
}

.acc-due-countdown {
  font-size: 12.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 5px;
}

.acc-due-countdown.urgent {
  color: #f59e0b;
}

.acc-due-countdown.today {
  color: #ef4444;
  animation: pulse-red 1.5s infinite;
}

.acc-due-countdown.overdue {
  color: #ef4444;
  font-weight: 900;
}

.acc-due-countdown.safe {
  color: var(--accent-primary);
}

.acc-due-countdown.neutral {
  color: var(--text-secondary);
}

@keyframes pulse-red {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Autopay Status Pill */
.acc-autopay-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 700;
}

.acc-autopay-pill.autopay-full {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #10b981;
}

.acc-autopay-pill.autopay-min {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #f59e0b;
}

.acc-autopay-pill.autopay-disabled {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #ef4444;
}

.acc-autopay-pill.autopay-na {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
}

/* Associated Payment Method Banner */
.acc-funding-banner {
  padding: 9px 12px;
  background: var(--bg-surface-elevated);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.acc-funding-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
}

.acc-funding-name {
  font-weight: 700;
  color: var(--text-primary);
}

.acc-routing-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent-primary);
  text-transform: uppercase;
}

/* Actions Row */
.acc-action-row {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.btn-acc-edit {
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.btn-acc-edit:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
  background: rgba(16, 185, 129, 0.08);
}

/* Edit Account Modal Styles */
#modal-edit-account .modal-dialog {
  max-width: 580px;
}

.edit-account-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .edit-account-form-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── LANGUAGE TOGGLE PILL (TASK #8609) ─────────────────────────────── */
.lang-pill-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lang-pill-btn:hover {
  border-color: var(--border-focus);
  box-shadow: 0 0 12px var(--accent-glow);
  color: var(--text-primary);
}

.lang-flag {
  font-size: 13px;
  line-height: 1;
}

/* ─── SETTINGS MODAL STYLING (TASK #8609) ───────────────────────────── */
#modal-settings .modal-dialog {
  max-width: 540px;
}

.settings-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
}

.settings-section-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.settings-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

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

.settings-label-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.settings-label-desc {
  font-size: 11px;
  color: var(--text-dim);
}

.settings-lang-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}

.settings-lang-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.settings-lang-card:hover {
  border-color: var(--border-focus);
}

.settings-lang-card.active {
  border-color: var(--accent-primary);
  background: rgba(16, 185, 129, 0.08);
  box-shadow: 0 0 10px var(--accent-glow);
}

.settings-lang-flag {
  font-size: 22px;
}

.settings-lang-info {
  display: flex;
  flex-direction: column;
}

.settings-lang-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.settings-lang-sub {
  font-size: 11px;
  color: var(--text-secondary);
}

/* ─── ADAPTIVE LOCALIZATION CSS (PT-BR EXPANSION RESILIENCE) ────────── */
html[lang="pt"] .nav-item-btn {
  letter-spacing: -0.2px;
}

html[lang="pt"] .nav-item-label {
  font-size: 10px;
}

html[lang="pt"] .metric-label {
  font-size: 10.5px;
  letter-spacing: 0.1px;
}

html[lang="pt"] .acc-autopay-pill,
html[lang="pt"] .acc-due-countdown {
  font-size: 10.5px;
  padding: 3px 7px;
}

html[lang="pt"] .acc-routing-pill {
  font-size: 9.5px;
}

html[lang="pt"] .acc-filter-btn {
  font-size: 11px;
  padding: 5px 10px;
}

/* ─── SAVINGS GOALS & INVESTMENT TRACKING (TASK #8610) ─────────────────── */
.goals-investments-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.goals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}

.goal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  transition: all var(--transition-fast);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.goal-card:hover {
  border-color: var(--border-focus);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.goal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.goal-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.goal-category-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
}

.goal-pct-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-primary);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.goal-amount-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.goal-current-amount {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
}

.goal-target-amount {
  font-size: 12px;
  color: var(--text-dim);
}

.goal-progress-track {
  width: 100%;
  height: 8px;
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 12px;
}

.goal-progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-focus));
  transition: width 0.4s ease;
}

.goal-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.goal-action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
}

/* Investment Portfolio Styles */
.investments-summary-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 22px;
}

.inv-metric-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.inv-metric-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
}

.inv-metric-val {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
}

.inv-metric-val.gain {
  color: var(--status-income);
}

.inv-metric-val.loss {
  color: var(--status-expense);
}

.investments-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}

.investments-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  text-align: left;
}

.investments-table th {
  padding: 12px 16px;
  background: var(--bg-surface-elevated);
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  font-size: 10.5px;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-subtle);
}

.investments-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
}

.investments-table tr:last-child td {
  border-bottom: none;
}

.inv-symbol-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 11px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
}

.inv-class-pill {
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

/* ─── AI AUTO-CATEGORIZATION BADGE (TASK #8610) ────────────────────────── */
.ai-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-primary);
  margin-top: 6px;
  transition: all var(--transition-fast);
}

.ai-category-badge.override {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
  color: #f59e0b;
}

.ai-category-badge .btn-undo-override {
  background: none;
  border: none;
  color: inherit;
  font-size: 10.5px;
  text-decoration: underline;
  cursor: pointer;
  margin-left: 4px;
  padding: 0;
}
