/* ==============================================================================
   Finku Clean - Cyber-Terminal HUD Design System
   High-Tech Precision • Micro-Interactions • Mobile-First Responsive
   ============================================================================== */

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

:root {
  /* High-Tech Cyber Color Matrix */
  --bg-void: #030712;
  --bg-terminal: #060b16;
  --bg-card: rgba(8, 14, 27, 0.78);
  --bg-card-hover: rgba(14, 23, 42, 0.88);
  --bg-glass: rgba(255, 255, 255, 0.025);
  --bg-input: rgba(6, 11, 22, 0.9);

  /* Neon Laser Accent Palette */
  --neon-emerald: #00f5a0;
  --neon-emerald-glow: rgba(0, 245, 160, 0.28);
  --neon-emerald-soft: rgba(0, 245, 160, 0.12);

  --neon-cyan: #00d2ff;
  --neon-cyan-glow: rgba(0, 210, 255, 0.25);
  --neon-cyan-soft: rgba(0, 210, 255, 0.1);

  --neon-indigo: #6366f1;
  --neon-indigo-glow: rgba(99, 102, 241, 0.3);

  --neon-rose: #ff3366;
  --neon-rose-glow: rgba(255, 51, 102, 0.25);
  --neon-rose-soft: rgba(255, 51, 102, 0.12);

  --neon-amber: #ffaa00;
  --neon-amber-glow: rgba(255, 170, 0, 0.25);

  /* Hairline Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-highlight: rgba(255, 255, 255, 0.18);
  --border-cyber: rgba(0, 245, 160, 0.3);

  /* Typography */
  --text-white: #ffffff;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #475569;
  --text-emerald: #00f5a0;
  --text-rose: #ff4d79;

  /* Fonts */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Shadows & Glows */
  --shadow-hud: 0 12px 36px rgba(0, 0, 0, 0.7), 0 0 24px rgba(0, 245, 160, 0.08);
  --shadow-laser: 0 0 20px rgba(0, 210, 255, 0.4);

  /* Transitions */
  --trans-fast: 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  --trans-smooth: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset & Cyber Matrix Background */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

body {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--bg-void);
  background-image: radial-gradient(rgba(0, 245, 160, 0.06) 1px, transparent 1px);
  background-size: 26px 26px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13.2px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  position: relative;
  touch-action: manipulation;
}

/* Background Cyber Matrix Canvas */
.cyber-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}

/* ==============================================================================
   Top Telemetry HUD Ticker Bar
   ============================================================================== */
.telemetry-ticker-bar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  height: 34px;
  background: rgba(3, 7, 18, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 1000;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  overflow: hidden;
}

.ticker-pulse {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--neon-emerald);
  font-weight: 700;
  flex-shrink: 0;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--neon-emerald);
  box-shadow: 0 0 10px var(--neon-emerald);
  animation: pulseBeacon 1.8s infinite;
}

@keyframes pulseBeacon {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.5; }
}

.ticker-track {
  overflow: hidden;
  white-space: nowrap;
  flex: 1 1 0%;
  min-width: 0;
  margin: 0 18px;
  display: flex;
  position: relative;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.ticker-content {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  animation: tickerSlide 35s linear infinite;
  color: var(--text-secondary);
}

.ticker-content span.sep {
  color: var(--neon-cyan);
  opacity: 0.5;
}

@keyframes tickerSlide {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.btn-sound-toggle {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--neon-cyan);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all var(--trans-fast);
}

.btn-sound-toggle:hover {
  background: rgba(0, 210, 255, 0.15);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.3);
}

/* ==============================================================================
   Layout Architecture
   ============================================================================== */
.app-layout {
  display: flex;
  width: 100%;
  max-width: 100%;
  min-height: calc(100vh - 34px);
  position: relative;
  z-index: 1;
  overflow-x: clip;
}

/* Sidebar Navigation */
.sidebar {
  width: 248px;
  background: rgba(6, 11, 22, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  position: fixed;
  top: 34px;
  bottom: 0;
  left: 0;
  z-index: 100;
  overflow-y: auto;
  transition: transform var(--trans-smooth);
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, rgba(0, 245, 160, 0.2), rgba(0, 210, 255, 0.2));
  border: 1px solid var(--neon-emerald);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(0, 245, 160, 0.3);
  flex-shrink: 0;
}

.brand-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--neon-emerald);
  stroke-width: 2.2;
}

.brand-text h1 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-white);
  line-height: 1.1;
}

.brand-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--neon-emerald);
  background: var(--neon-emerald-soft);
  border: 1px solid rgba(0, 245, 160, 0.25);
  padding: 1px 6px;
  border-radius: 4px;
  margin-top: 4px;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  list-style: none;
  flex-grow: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--trans-fast);
  border: 1px solid transparent;
  position: relative;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
  transition: stroke var(--trans-fast);
}

.nav-item:hover {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.nav-item.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(0, 245, 160, 0.15), rgba(0, 210, 255, 0.08));
  border-color: rgba(0, 245, 160, 0.35);
  box-shadow: inset 0 0 14px rgba(0, 245, 160, 0.15), 0 0 16px rgba(0, 245, 160, 0.1);
}

.nav-item.active svg {
  stroke: var(--neon-emerald);
}

.badge-new-pill {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--neon-emerald), var(--neon-cyan));
  color: #030712;
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: auto;
  box-shadow: 0 0 10px rgba(0, 245, 160, 0.4);
  letter-spacing: 0.04em;
}

/* Sidebar Privacy Card */
.privacy-badge-card {
  background: rgba(0, 245, 160, 0.04);
  border: 1px solid rgba(0, 245, 160, 0.2);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
}

.privacy-badge-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 3px; height: 100%;
  background: var(--neon-emerald);
}

.privacy-badge-header {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--neon-emerald);
  font-weight: 700;
  font-size: 0.8rem;
  font-family: var(--font-mono);
}

.privacy-badge-header svg {
  width: 15px;
  height: 15px;
}

.privacy-badge-desc {
  font-size: 0.74rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ==============================================================================
   Main Content Area
   ============================================================================== */
.main-wrapper {
  margin-left: 248px;
  width: calc(100% - 248px);
  max-width: calc(100% - 248px);
  min-width: 0;
  flex: 1 1 0%;
  padding: 22px 26px;
  position: relative;
  z-index: 1;
}

/* Header */
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 22px;
  gap: 14px;
  flex-wrap: wrap;
  width: 100%;
  min-width: 0;
}

.greeting-area {
  min-width: 0;
}

.greeting-area h2 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.greeting-area p {
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: 100%;
}

/* Currency & Action Buttons */
.currency-selector {
  display: flex;
  background: rgba(6, 11, 22, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 3px;
}

.curr-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 5px;
  cursor: pointer;
  transition: all var(--trans-fast);
  font-family: var(--font-mono);
}

.curr-btn.active {
  background: rgba(0, 245, 160, 0.2);
  color: var(--neon-emerald);
  border: 1px solid rgba(0, 245, 160, 0.4);
  box-shadow: 0 0 10px rgba(0, 245, 160, 0.2);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(0, 245, 160, 0.9), rgba(0, 210, 255, 0.9));
  color: #030712;
  border: none;
  padding: 7px 13px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.78rem;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 245, 160, 0.3);
  transition: all var(--trans-smooth);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 245, 160, 0.45);
}

.btn-ai-scan {
  background: linear-gradient(135deg, #6366f1, #00d2ff) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4) !important;
}

.btn-ai-scan:hover {
  box-shadow: 0 6px 24px rgba(0, 210, 255, 0.5) !important;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(10, 16, 30, 0.7);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  padding: 6px 11px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.76rem;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn-action-small {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--neon-cyan);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all var(--trans-fast);
}

.btn-action-small:hover {
  background: rgba(0, 210, 255, 0.15);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.25);
}

/* ==============================================================================
   Cyber Spotlight Card System (Linear/Raycast border illumination)
   ============================================================================== */
.glass-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--shadow-hud);
  transition: transform var(--trans-smooth), border-color var(--trans-smooth);
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
}

/* Mouse spotlight illumination border */
.glass-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(350px circle at var(--mouse-x, -500px) var(--mouse-y, -500px), rgba(0, 245, 160, 0.4), rgba(0, 210, 255, 0.25), transparent 70%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.glass-card:hover::before {
  opacity: 1;
}

/* Corner Crosshairs (+) for High-Tech HUD feel */
.glass-card::after {
  content: '+';
  position: absolute;
  top: 6px;
  right: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(0, 245, 160, 0.35);
  pointer-events: none;
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

/* Top Stats Overview Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

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

.stat-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
}

.stat-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon.networth {
  background: rgba(99, 102, 241, 0.15);
  color: var(--neon-indigo);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.stat-icon.income {
  background: var(--neon-emerald-soft);
  color: var(--neon-emerald);
  border: 1px solid rgba(0, 245, 160, 0.3);
}

.stat-icon.expense {
  background: var(--neon-rose-soft);
  color: var(--neon-rose);
  border: 1px solid rgba(255, 51, 102, 0.3);
}

.stat-icon.savings {
  background: var(--neon-cyan-soft);
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 210, 255, 0.3);
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: -0.03em;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}

.stat-subtext {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.badge-trend-up {
  color: var(--neon-emerald);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
}

/* ==============================================================================
   Middle Section: Health Score Gauge & Cashflow Chart
   ============================================================================== */
.dashboard-middle {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 18px;
  margin-bottom: 24px;
}

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

.card-title-row h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Health Gauge */
.gauge-display-area {
  display: flex;
  align-items: center;
  gap: 20px;
}

.gauge-visual {
  position: relative;
  width: 130px;
  height: 130px;
  flex-shrink: 0;
}

.gauge-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.gauge-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 10;
}

.gauge-progress {
  fill: none;
  stroke: url(#gauge-gradient);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 377;
  stroke-dashoffset: 377;
  transition: stroke-dashoffset 1s cubic-bezier(0.16, 1, 0.3, 1);
  filter: drop-shadow(0 0 6px rgba(0, 245, 160, 0.4));
}

.gauge-center-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.gauge-number {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-white);
  line-height: 1;
}

.gauge-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 4px;
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
}

.status-excellent { color: var(--neon-emerald); }
.status-good { color: var(--neon-cyan); }
.status-warning { color: var(--neon-amber); }
.status-poor { color: var(--neon-rose); }

.health-metrics-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 1;
}

.health-metric-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}

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

.metric-name svg {
  width: 14px;
  height: 14px;
}

.metric-score-val {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.78rem;
}

/* Cash Flow Chart & Scrubber */
.chart-container {
  width: 100%;
  height: 220px;
  position: relative;
  cursor: crosshair;
}

.chart-svg {
  width: 100%;
  height: 100%;
}

.chart-tooltip-hud {
  position: absolute;
  background: rgba(3, 7, 18, 0.96);
  border: 1px solid var(--neon-cyan);
  box-shadow: 0 0 20px rgba(0, 210, 255, 0.35);
  border-radius: 8px;
  padding: 8px 12px;
  pointer-events: none;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: #fff;
  z-index: 30;
  display: none;
  line-height: 1.5;
}

/* ==============================================================================
   Budgets & Progress Bars
   ============================================================================== */
.budget-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.budget-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px 14px;
}

.budget-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.budget-cat-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--text-white);
}

.cat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.budget-amount-text {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.budget-amount-text strong {
  color: var(--text-white);
}

.progress-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==============================================================================
   Transactions Ledger Table
   ============================================================================== */
.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
}

.search-input-wrapper svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.search-input {
  width: 100%;
  background: rgba(6, 11, 22, 0.8);
  border: 1px solid var(--border-subtle);
  color: var(--text-white);
  padding: 8px 12px 8px 36px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-family: var(--font-body);
  transition: border-color var(--trans-fast);
}

.search-input:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.2);
}

.filter-select {
  background: rgba(6, 11, 22, 0.8);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  cursor: pointer;
}

.tx-table {
  width: 100%;
  border-collapse: collapse;
}

.tx-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}

.tx-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 0.85rem;
}

.tx-table tr:hover td {
  background: rgba(0, 245, 160, 0.02);
}

.tx-icon-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tx-cat-badge {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.tx-name-desc {
  display: flex;
  flex-direction: column;
}

.tx-name {
  font-weight: 600;
  color: var(--text-white);
}

.tx-date {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.amount-income {
  color: var(--neon-emerald);
  font-family: var(--font-mono);
  font-weight: 700;
}

.amount-expense {
  color: var(--text-rose);
  font-family: var(--font-mono);
  font-weight: 700;
}

.btn-icon-delete {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: all var(--trans-fast);
}

.btn-icon-delete:hover {
  color: var(--neon-rose);
  background: var(--neon-rose-soft);
}

.btn-icon-edit, .btn-icon-save, .btn-icon-cancel {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 0.82rem;
  transition: all var(--trans-fast);
}

.btn-icon-edit:hover {
  color: var(--neon-cyan);
  background: rgba(0, 210, 255, 0.12);
}

.btn-icon-save {
  color: var(--neon-emerald);
  background: rgba(0, 245, 160, 0.12);
  border: 1px solid rgba(0, 245, 160, 0.35);
  font-weight: 700;
}

.btn-icon-save:hover {
  background: rgba(0, 245, 160, 0.24);
}

.btn-icon-cancel {
  color: var(--text-rose);
  background: rgba(255, 51, 102, 0.10);
  border: 1px solid rgba(255, 51, 102, 0.3);
}

/* Period Selector & Badges */
.period-selector-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(6, 11, 22, 0.9);
  border: 1px solid rgba(0, 210, 255, 0.3);
  border-radius: 8px;
  padding: 5px 10px;
  color: var(--neon-cyan);
}

.period-month-select {
  background: transparent;
  border: none;
  color: var(--text-white);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  outline: none;
}

.period-month-select option {
  background: #060b16;
  color: #ffffff;
}

.period-badge-pill {
  background: rgba(0, 210, 255, 0.12);
  border: 1px solid rgba(0, 210, 255, 0.35);
  color: var(--neon-cyan);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 8px;
}

.inline-edit-hint {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 10px;
}

/* Inline Editors for Transactions, Budgets & Spreadsheet */
.tx-inline-input, .tx-inline-select {
  background: rgba(3, 7, 18, 0.95);
  border: 1px solid var(--neon-cyan);
  border-radius: 6px;
  color: var(--text-white);
  padding: 4px 8px;
  font-size: 0.8rem;
  font-family: var(--font-body);
  outline: none;
}

.tx-inline-input:focus, .tx-inline-select:focus {
  border-color: var(--neon-emerald);
  box-shadow: 0 0 8px rgba(0, 245, 160, 0.25);
}

.budget-limit-editable {
  cursor: pointer;
  border-bottom: 1px dashed rgba(0, 210, 255, 0.45);
  padding-bottom: 1px;
  transition: color var(--trans-fast);
}

.budget-limit-editable:hover {
  color: var(--neon-cyan);
}

.excel-inline-editor {
  width: 100%;
  background: #030712;
  border: 1px solid var(--neon-emerald);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  padding: 3px 6px;
  border-radius: 4px;
  outline: none;
}

/* ==============================================================================
   Analytics Breakdown Grid
   ============================================================================== */
.analytics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 14px;
}

.breakdown-card {
  background: rgba(6, 11, 22, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 16px;
}

.breakdown-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
}

.breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.breakdown-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
}

.breakdown-label {
  color: var(--text-secondary);
}

.breakdown-value {
  color: var(--text-white);
  font-family: var(--font-mono);
  font-weight: 700;
}

.breakdown-progress-bg {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  overflow: hidden;
}

.breakdown-progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* ==============================================================================
   Modals & Cyber HUD Dialogs (Dynamic Sizing for Desktop, Android & iOS)
   ============================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  padding: max(12px, env(safe-area-inset-top, 12px))
           max(12px, env(safe-area-inset-right, 12px))
           max(12px, env(safe-area-inset-bottom, 12px))
           max(12px, env(safe-area-inset-left, 12px));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}

.modal-card {
  background: #090e1a;
  border: 1px solid rgba(0, 245, 160, 0.35);
  box-shadow: 0 0 32px rgba(0, 245, 160, 0.15), 0 20px 48px rgba(0, 0, 0, 0.8);
  border-radius: 16px;
  width: min(100%, 480px);
  max-height: calc(100vh - 28px);
  max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0 22px 22px 22px;
  animation: scaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  margin: auto;
}

.modal-card.modal-lg {
  width: min(100%, 780px);
  max-width: 96vw;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(9, 14, 26, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 18px 0 12px 0;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  font-weight: 800;
  color: var(--text-white);
}

.modal-subdesc {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: -6px;
  margin-bottom: 16px;
}

.btn-modal-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-white);
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--trans-fast);
}

.btn-modal-close:hover,
.btn-modal-close:focus-visible {
  background: var(--neon-rose-soft);
  border-color: var(--neon-rose);
  color: var(--neon-rose);
  transform: scale(1.05);
}

/* AI Confidence Banner & Dynamic 2-Column Review Layout */
.ai-confidence-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: rgba(0, 245, 160, 0.07);
  border: 1px solid rgba(0, 245, 160, 0.28);
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 14px;
}

.badge-confidence {
  background: rgba(0, 245, 160, 0.16);
  color: var(--neon-emerald);
  border: 1px solid rgba(0, 245, 160, 0.4);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}

.btn-text-small {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--neon-cyan);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.btn-text-small:hover {
  background: rgba(0, 210, 255, 0.14);
  border-color: var(--neon-cyan);
}

.ai-review-content {
  display: grid;
  grid-template-columns: minmax(230px, 300px) 1fr;
  gap: 16px;
  align-items: start;
}

.ai-receipt-thumbnail-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 440px;
  overflow-y: auto;
  padding-right: 2px;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
}

.form-control {
  width: 100%;
  background: rgba(6, 11, 22, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-white);
  padding: 9px 12px;
  font-size: 0.9rem;
  font-family: var(--font-body);
}

.form-control:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.25);
}

.type-toggle-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.type-toggle-btn {
  padding: 9px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.type-toggle-btn.active.expense {
  background: var(--neon-rose-soft);
  border-color: var(--neon-rose);
  color: var(--neon-rose);
  box-shadow: 0 0 12px rgba(255, 51, 102, 0.2);
}

.type-toggle-btn.active.income {
  background: var(--neon-emerald-soft);
  border-color: var(--neon-emerald);
  color: var(--neon-emerald);
  box-shadow: 0 0 12px rgba(0, 245, 160, 0.2);
}

/* AI Suggestion Banner */
.ai-suggestion-banner {
  background: linear-gradient(135deg, rgba(0, 245, 160, 0.08), rgba(0, 210, 255, 0.08));
  border: 1px dashed rgba(0, 245, 160, 0.35);
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-white);
  transition: all var(--trans-fast);
}

.ai-suggestion-banner:hover {
  border-color: var(--neon-emerald);
  background: rgba(0, 245, 160, 0.14);
}

/* AI Dropzone & Viewfinder */
.ai-dropzone {
  border: 2px dashed rgba(0, 245, 160, 0.35);
  border-radius: 14px;
  background: rgba(6, 11, 22, 0.7);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all var(--trans-smooth);
}

.ai-dropzone:hover, .ai-dropzone.dragover {
  border-color: var(--neon-emerald);
  background: rgba(0, 245, 160, 0.06);
  box-shadow: 0 0 20px rgba(0, 245, 160, 0.2);
}

.ai-upload-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--neon-emerald-soft);
  color: var(--neon-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px auto;
}

.camera-stream-container {
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  position: relative;
  margin-bottom: 14px;
  border: 1px solid var(--neon-cyan);
}

.camera-stream-container video {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  display: block;
}

.camera-controls {
  position: absolute;
  bottom: 12px;
  left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 12px;
}

/* Preset Chips */
.demo-receipts-section {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.demo-section-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-family: var(--font-mono);
}

.demo-receipts-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.demo-receipt-chip {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 5px 12px;
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.demo-receipt-chip:hover {
  background: rgba(0, 245, 160, 0.12);
  border-color: var(--neon-emerald);
  color: #ffffff;
}

/* AI Laser Scanning Box */
.ai-processing-box {
  position: relative;
  background: #040813;
  border: 1px solid var(--neon-cyan);
  border-radius: 14px;
  padding: 20px;
  overflow: hidden;
  text-align: center;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 30px rgba(0, 210, 255, 0.15);
}

.scanning-laser-line {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon-cyan), var(--neon-emerald), transparent);
  box-shadow: 0 0 12px var(--neon-cyan), 0 0 20px var(--neon-emerald);
  animation: scanLaser 1.8s ease-in-out infinite alternate;
  z-index: 10;
}

@keyframes scanLaser {
  0% { top: 5%; }
  100% { top: 92%; }
}

/* Paper Receipt Mockup */
.receipt-paper {
  background: #f8fafc;
  color: #0f172a;
  padding: 12px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.receipt-header-text {
  text-align: center;
  font-weight: 800;
  font-size: 0.8rem;
  margin-bottom: 4px;
}

.receipt-divider {
  border-top: 1px dashed #94a3b8;
  margin: 5px 0;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
}

.receipt-row.bold {
  font-weight: 800;
  font-size: 0.76rem;
  margin-top: 4px;
}

.receipt-barcode {
  height: 20px;
  margin: 6px auto 0 auto;
  background: repeating-linear-gradient(90deg, #0f172a 0px, #0f172a 2px, transparent 2px, transparent 4px, #0f172a 4px, #0f172a 6px);
  width: 75%;
}

/* OCR Meta Pills, Breakdown Strip & Raw OCR Drawer */
.ocr-meta-pill {
  background: rgba(0, 210, 255, 0.12);
  border: 1px solid rgba(0, 210, 255, 0.35);
  color: var(--neon-cyan);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.ocr-breakdown-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 6px;
  background: rgba(6, 11, 22, 0.85);
  border: 1px solid rgba(0, 245, 160, 0.25);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.ocr-breakdown-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ocr-breakdown-cell .lbl {
  color: var(--text-muted);
  font-size: 0.62rem;
  text-transform: uppercase;
}

.ocr-breakdown-cell .val {
  color: var(--text-white);
  font-weight: 700;
}

.ocr-raw-drawer {
  margin-top: 10px;
  background: rgba(6, 11, 22, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.76rem;
}

.ocr-raw-drawer summary {
  cursor: pointer;
  color: var(--neon-cyan);
  font-family: var(--font-mono);
  font-weight: 600;
  user-select: none;
  outline: none;
}

.ocr-raw-drawer-body {
  margin-top: 8px;
}

.ocr-bbox-preview-wrap {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
  border: 1px solid rgba(0, 245, 160, 0.35);
  box-shadow: 0 4px 14px rgba(0,0,0,0.45);
  background: #040813;
}

.ocr-bbox-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(3, 7, 18, 0.88);
  border: 1px solid var(--neon-emerald);
  color: var(--neon-emerald);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  pointer-events: none;
}

/* ==============================================================================
   Mobile-First HUD Bottom Dock Navigation
   ============================================================================== */
.mobile-hud-dock {
  display: none;
  position: fixed;
  bottom: 12px;
  left: 12px;
  right: 12px;
  height: 60px;
  background: rgba(6, 11, 22, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 245, 160, 0.3);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 245, 160, 0.15);
  z-index: 1050;
  align-items: center;
  justify-content: space-around;
  padding: 0 4px;
}

.hud-dock-item {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 0.65rem;
  font-family: var(--font-mono);
  font-weight: 600;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 10px;
  transition: all var(--trans-fast);
}

.hud-dock-item svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.hud-dock-item.active {
  color: var(--neon-emerald);
}

.hud-dock-scan .scan-glow-ring {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon-indigo), var(--neon-cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(0, 210, 255, 0.5);
  margin-top: -14px;
  border: 2px solid #030712;
}

.hud-dock-scan .scan-glow-ring svg {
  stroke: #ffffff;
}

/* Toast System */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: #090e1a;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px 16px;
  color: var(--text-white);
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all 0.3s ease;
}

.toast.toast-success {
  border-left: 3px solid var(--neon-emerald);
  box-shadow: 0 0 20px rgba(0, 245, 160, 0.2);
}

.toast.toast-info {
  border-left: 3px solid var(--neon-cyan);
}

.toast.toast-warning {
  border-left: 3px solid var(--neon-amber);
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

/* ==============================================================================
   Spreadsheet Terminal // EXCEL STUDIO Styles
   ============================================================================== */
.modal-card.modal-xl {
  max-width: 980px;
  width: min(96vw, 980px);
  max-height: calc(100vh - 28px);
  max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  padding: 0 20px 20px 20px;
}

.spreadsheet-header {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.excel-badge-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #107c41;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(16, 124, 65, 0.4);
}

.spreadsheet-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.sheet-tabs-row {
  display: flex;
  gap: 4px;
  background: rgba(6, 11, 22, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 3px;
}

.sheet-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--trans-fast);
}

.sheet-tab-btn.active {
  background: rgba(16, 124, 65, 0.25);
  color: var(--neon-emerald);
  border: 1px solid rgba(0, 245, 160, 0.3);
}

.spreadsheet-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Formula Bar */
.formula-bar {
  display: flex;
  align-items: center;
  background: rgba(6, 11, 22, 0.95);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  overflow: hidden;
}

.formula-name-box {
  width: 55px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.04);
  border-right: 1px solid var(--border-subtle);
  color: var(--neon-cyan);
  font-weight: 700;
  text-align: center;
}

.formula-fx-label {
  padding: 6px 10px;
  color: var(--text-muted);
  font-style: italic;
  font-weight: 700;
  border-right: 1px solid var(--border-subtle);
}

.formula-input-display {
  padding: 6px 12px;
  color: var(--text-white);
  flex: 1;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Interactive Grid Viewport */
.spreadsheet-grid-viewport {
  flex: 1;
  overflow: auto;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: #02050e;
  max-height: 440px;
}

.excel-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

.excel-table th {
  background: #080f1e;
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 6px 10px;
  font-weight: 700;
  text-align: left;
  user-select: none;
  position: sticky;
  top: 0;
  z-index: 5;
}

.excel-table th.col-index {
  width: 44px;
  text-align: center;
  color: var(--neon-cyan);
  background: #050a15;
}

.excel-table td {
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 7px 10px;
  color: var(--text-primary);
  white-space: nowrap;
}

.excel-table td.row-num {
  text-align: center;
  color: var(--text-muted);
  background: #050a15;
  user-select: none;
  font-size: 0.7rem;
}

.excel-table tr:hover td:not(.row-num) {
  background: rgba(0, 245, 160, 0.04);
}

.excel-cell-selected {
  outline: 2px solid var(--neon-emerald) !important;
  outline-offset: -1px;
}

/* Formula Summary Footer */
.spreadsheet-formula-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(6, 11, 22, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
  gap: 10px;
}

.summary-formula-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ==============================================================================
   Multi-Wallet Strip, Recurring Bills Radar, Financial Goals, Cloud Sync & Lock
   ============================================================================== */
.wallets-strip-card {
  margin-bottom: 20px;
  padding: 16px 18px;
}

.wallets-cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 10px;
}

.wallet-mini-card {
  background: rgba(6, 11, 22, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all var(--trans-fast);
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}

.wallet-mini-card:hover {
  border-color: rgba(0, 210, 255, 0.45);
  background: rgba(14, 23, 42, 0.9);
  transform: translateY(-1px);
}

.wallet-mini-card.active {
  border-color: var(--neon-emerald);
  background: rgba(0, 245, 160, 0.08);
  box-shadow: 0 0 14px rgba(0, 245, 160, 0.18);
}

.wallet-mini-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.wallet-type-tag {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.wallet-balance-val {
  font-family: var(--font-mono);
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: -0.02em;
}

.wallet-mini-sub {
  font-size: 0.64rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Recurring Bills & Financial Goals Dual Grid */
.planning-dual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 24px;
}

.planning-summary-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: rgba(6, 11, 22, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  padding: 8px 10px;
  margin-bottom: 12px;
  font-family: var(--font-mono);
}

.planning-summary-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.planning-summary-cell .lbl {
  font-size: 0.6rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.planning-summary-cell .val {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-white);
}

.bills-list-container,
.goals-list-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bill-row-card,
.goal-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px 12px;
  transition: border-color var(--trans-fast);
}

.bill-row-card:hover,
.goal-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.bill-row-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.bill-info-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.bill-icon-box {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(0, 210, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  flex-shrink: 0;
}

.bill-title-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.bill-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bill-meta {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.bill-actions-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.bill-due-badge {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
}

.bill-due-badge.paid {
  background: rgba(0, 245, 160, 0.14);
  color: var(--neon-emerald);
  border: 1px solid rgba(0, 245, 160, 0.35);
}

.bill-due-badge.soon {
  background: rgba(255, 170, 0, 0.14);
  color: var(--neon-amber);
  border: 1px solid rgba(255, 170, 0, 0.35);
}

.bill-due-badge.urgent {
  background: rgba(255, 51, 102, 0.16);
  color: var(--text-rose);
  border: 1px solid rgba(255, 51, 102, 0.4);
}

.goal-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  gap: 8px;
}

.goal-title-group {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-white);
}

.goal-amount-val {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-secondary);
}

.goal-amount-val strong {
  color: var(--neon-emerald);
}

.goal-meta-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

/* Cloud Sync Pill & Banner */
.btn-cloud-pill {
  border-color: rgba(0, 210, 255, 0.35) !important;
}

.cloud-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  display: inline-block;
}

.cloud-status-dot.synced {
  background: var(--neon-emerald);
  box-shadow: 0 0 8px var(--neon-emerald);
}

.cloud-status-dot.syncing {
  background: var(--neon-amber);
  box-shadow: 0 0 8px var(--neon-amber);
}

.cloud-status-banner {
  background: rgba(0, 210, 255, 0.08);
  border: 1px solid rgba(0, 210, 255, 0.3);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--neon-cyan);
}

/* Incognito Privacy Blur Mode */
body.privacy-blur-active .stat-value,
body.privacy-blur-active .wallet-balance-val,
body.privacy-blur-active .amount-income,
body.privacy-blur-active .amount-expense,
body.privacy-blur-active .budget-amount-text strong,
body.privacy-blur-active .breakdown-value,
body.privacy-blur-active .goal-amount-val strong,
body.privacy-blur-active .planning-summary-cell .val {
  filter: blur(7px);
  transition: filter 0.2s ease;
  user-select: none;
}

body.privacy-blur-active .glass-card:hover .stat-value,
body.privacy-blur-active .wallet-mini-card:hover .wallet-balance-val,
body.privacy-blur-active tr:hover .amount-income,
body.privacy-blur-active tr:hover .amount-expense,
body.privacy-blur-active .budget-item:hover .budget-amount-text strong,
body.privacy-blur-active .goal-card:hover .goal-amount-val strong {
  filter: blur(0);
}

/* Fullscreen Cyber PIN & Biometric Lock Overlay */
.app-lock-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(3, 7, 18, 0.96);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.lock-card {
  background: #080e1c;
  border: 1px solid rgba(0, 245, 160, 0.4);
  box-shadow: 0 0 40px rgba(0, 245, 160, 0.18), 0 24px 60px rgba(0, 0, 0, 0.9);
  border-radius: 20px;
  padding: 24px 22px;
  width: min(100%, 340px);
  text-align: center;
}

.lock-shield-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.lock-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--text-white);
  margin-bottom: 4px;
}

.lock-card p {
  font-size: 0.74rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.pin-dots-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 18px;
}

.pin-dots-row span {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid var(--neon-cyan);
  background: transparent;
  transition: all 0.15s ease;
}

.pin-dots-row span.filled {
  background: var(--neon-emerald);
  border-color: var(--neon-emerald);
  box-shadow: 0 0 10px var(--neon-emerald);
}

.pin-dots-row.shake {
  animation: pinShake 0.35s ease;
}

@keyframes pinShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

.pin-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.pin-keypad button {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  color: var(--text-white);
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  height: 48px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.pin-keypad button:hover,
.pin-keypad button:active {
  background: rgba(0, 245, 160, 0.16);
  border-color: var(--neon-emerald);
  color: var(--neon-emerald);
}

/* ==============================================================================
   Multi-User Role-Based Access Control (MASTER & staff) & Login Gate
   ============================================================================== */
.role-session-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(0, 245, 160, 0.14);
  border: 1px solid rgba(0, 245, 160, 0.4);
  color: var(--neon-emerald);
  letter-spacing: 0.04em;
  vertical-align: middle;
}

.role-session-pill.staff {
  background: rgba(0, 210, 255, 0.14);
  border-color: rgba(0, 210, 255, 0.4);
  color: var(--neon-cyan);
}

.staff-ops-banner {
  margin-bottom: 16px;
  border-color: rgba(0, 210, 255, 0.35);
}

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

.staff-ops-header h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--text-white);
}

.staff-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: rgba(6, 11, 22, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: var(--font-mono);
}

.tx-author-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 5px;
  background: rgba(0, 210, 255, 0.12);
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 210, 255, 0.28);
}

.tx-author-pill.master {
  background: rgba(0, 245, 160, 0.12);
  color: var(--neon-emerald);
  border-color: rgba(0, 245, 160, 0.28);
}

.users-list-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.user-account-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(6, 11, 22, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  padding: 8px 12px;
  font-size: 0.78rem;
}

.auth-login-card {
  width: min(100%, 380px);
}

.quick-login-chips {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Role Visibility Rules: When logged in as 'staff', hide MASTER-only analytics & budgets */
body.role-staff-active #stats-section,
body.role-staff-active #wallets-strip-section,
body.role-staff-active .dashboard-middle,
body.role-staff-active #budgets-section,
body.role-staff-active #planning-section,
body.role-staff-active #analytics-section,
body.role-staff-active .master-only-el,
body.role-staff-active #btn-reset-data,
body.role-staff-active #btn-import-trigger,
body.role-staff-active #nav-budgets,
body.role-staff-active #nav-planning,
body.role-staff-active #nav-analytics,
body.role-staff-active .mobile-hud-dock button[data-target="budgets-section"],
body.role-staff-active .mobile-hud-dock button[data-target="analytics-section"] {
  display: none !important;
}

body.role-staff-active #staff-role-banner {
  display: block !important;
}

/* ==============================================================================
   Mobile, Tablet & Cross-Platform (Android APK / iOS / Desktop) Dynamic UI/UX
   ============================================================================== */
@media (max-width: 1024px) {
  .dashboard-middle, .analytics-grid, .accounts-grid-form, .planning-dual-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 12.4px;
    line-height: 1.45;
  }
  .telemetry-ticker-bar {
    height: 28px;
    padding: 0 10px;
    font-size: 0.62rem;
  }
  .ticker-track {
    margin: 0 10px;
  }
  .btn-sound-toggle {
    padding: 2px 6px;
    font-size: 0.6rem;
  }
  .sidebar {
    display: none;
  }
  .main-wrapper {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 12px calc(78px + env(safe-area-inset-bottom, 0px)) 12px;
  }
  .top-header {
    margin-bottom: 14px;
    gap: 10px;
  }
  .greeting-area h2 {
    font-size: clamp(1.05rem, 4vw, 1.3rem);
    gap: 6px;
  }
  .greeting-area p {
    font-size: 0.72rem;
  }
  .header-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
  }
  .period-selector-wrap {
    padding: 4px 8px;
    border-radius: 7px;
  }
  .period-month-select {
    font-size: 0.68rem;
  }
  .curr-btn {
    padding: 4px 8px;
    font-size: 0.68rem;
  }
  .btn-primary,
  .btn-secondary {
    padding: 6px 10px;
    font-size: 0.72rem;
    border-radius: 7px;
    gap: 5px;
  }
  .btn-action-small {
    padding: 4px 8px;
    font-size: 0.66rem;
  }
  /* 2x2 Compact Bento KPI Grid on Android & iOS */
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
  }
  .wallets-strip-card {
    margin-bottom: 12px;
    padding: 10px 12px;
  }
  .wallets-cards-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .wallet-mini-card {
    padding: 8px 10px;
  }
  .wallet-balance-val {
    font-size: 0.84rem;
  }
  .planning-dual-grid {
    gap: 12px;
    margin-bottom: 14px;
  }
  .hide-xs {
    display: none;
  }
  .glass-card {
    padding: 12px;
    border-radius: 12px;
  }
  .stat-header {
    margin-bottom: 6px;
  }
  .stat-title {
    font-size: 0.62rem;
    letter-spacing: 0.05em;
  }
  .stat-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
  }
  .stat-icon svg {
    width: 13px;
    height: 13px;
  }
  .stat-value {
    font-size: clamp(0.95rem, 3.8vw, 1.22rem);
    margin-bottom: 2px;
  }
  .stat-subtext,
  .badge-trend-up {
    font-size: 0.64rem;
    line-height: 1.25;
  }
  /* Compact Health Score & Cashflow Chart */
  .dashboard-middle {
    gap: 12px;
    margin-bottom: 14px;
  }
  .card-title-row {
    margin-bottom: 10px;
    padding-bottom: 8px;
    flex-wrap: wrap;
    gap: 6px;
  }
  .card-title-row h3 {
    font-size: 0.88rem;
    gap: 6px;
  }
  .card-title-row h3 svg {
    width: 16px;
    height: 16px;
  }
  .period-badge-pill {
    font-size: 0.6rem;
    padding: 1px 6px;
    margin-left: 4px;
  }
  .inline-edit-hint {
    display: none;
  }
  .gauge-display-area {
    gap: 12px;
  }
  .gauge-visual {
    width: 96px;
    height: 96px;
  }
  .gauge-number {
    font-size: 1.4rem;
  }
  .gauge-label {
    font-size: 0.56rem;
  }
  .health-metrics-list {
    gap: 6px;
  }
  .health-metric-item {
    font-size: 0.7rem;
    padding: 5px 8px;
  }
  .metric-score-val {
    font-size: 0.68rem;
  }
  .chart-container {
    height: 165px;
  }
  /* Compact Category Budgets Grid */
  .budget-list {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
  }
  .budget-item {
    padding: 9px 10px;
    border-radius: 9px;
  }
  .budget-header-row {
    font-size: 0.72rem;
    margin-bottom: 6px;
    gap: 4px;
  }
  .budget-amount-text {
    font-size: 0.65rem;
  }
  .progress-bar-bg {
    height: 4px;
  }
  /* Compact Transactions Ledger */
  #transactions-section,
  #analytics-section {
    margin-top: 14px !important;
  }
  .filter-bar {
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
  }
  .search-input-wrapper {
    min-width: 100%;
  }
  .search-input {
    padding: 6px 10px 6px 32px;
    font-size: 0.75rem;
  }
  .filter-select {
    flex: 1;
    padding: 6px 8px;
    font-size: 0.72rem;
  }
  .tx-table th {
    padding: 7px 8px;
    font-size: 0.62rem;
  }
  .tx-table td {
    padding: 8px 8px;
    font-size: 0.74rem;
  }
  .tx-cat-badge {
    width: 26px;
    height: 26px;
    font-size: 0.82rem;
    border-radius: 7px;
    flex-shrink: 0;
  }
  .tx-icon-cell {
    gap: 8px;
  }
  .tx-name {
    font-size: 0.76rem;
    line-height: 1.25;
  }
  .tx-date {
    font-size: 0.63rem;
    line-height: 1.25;
  }
  .amount-income,
  .amount-expense {
    font-size: 0.74rem;
    white-space: nowrap;
  }
  .breakdown-card {
    padding: 12px;
  }
  .breakdown-title {
    font-size: 0.74rem;
    margin-bottom: 8px;
  }
  .breakdown-header {
    font-size: 0.7rem;
  }
  /* Sleek Native App Bottom Dock */
  .mobile-hud-dock {
    display: flex;
    height: 54px;
    bottom: max(8px, env(safe-area-inset-bottom, 8px));
    left: 10px;
    right: 10px;
    border-radius: 16px;
  }
  .hud-dock-item {
    font-size: 0.58rem;
    padding: 4px 8px;
    gap: 2px;
  }
  .hud-dock-item svg {
    width: 16px;
    height: 16px;
  }
  .hud-dock-scan .scan-glow-ring {
    width: 32px;
    height: 32px;
    margin-top: -12px;
  }
  /* Dynamic Mobile Modals */
  .ai-review-content {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .ai-receipt-thumbnail-container {
    max-height: 195px;
  }
  .modal-overlay {
    align-items: flex-end;
    padding: max(6px, env(safe-area-inset-top, 6px)) 6px max(6px, env(safe-area-inset-bottom, 6px)) 6px;
  }
  .modal-card,
  .modal-card.modal-lg,
  .modal-card.modal-xl {
    width: 100%;
    max-width: 100%;
    max-height: calc(100dvh - 12px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    border-radius: 16px 16px 12px 12px;
    padding: 0 14px 14px 14px;
  }
  .modal-header {
    padding: 12px 0 8px 0;
    margin-bottom: 10px;
  }
  .modal-header h3 {
    font-size: 0.95rem;
  }
  .btn-modal-close {
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    font-size: 1.15rem;
    border-radius: 8px;
  }
  .form-group {
    margin-bottom: 9px;
  }
  .form-group label {
    font-size: 0.64rem;
    margin-bottom: 3px;
  }
  .form-control {
    padding: 7px 10px;
    font-size: 0.78rem;
  }
  .type-toggle-btn {
    padding: 7px;
    font-size: 0.75rem;
  }
  .demo-receipt-chip {
    font-size: 0.68rem;
    padding: 4px 9px;
  }
}

@media (max-width: 600px) {
  /* Hide redundant Category & Type columns in non-editing rows on narrow phones (shown in subtitle) */
  .tx-table th.tx-col-cat,
  .tx-table th.tx-col-type,
  .tx-table tr:not(.tx-row-editing) td.tx-col-cat,
  .tx-table tr:not(.tx-row-editing) td.tx-col-type {
    display: none;
  }
}

@media (max-width: 480px) {
  /* Keep 2x2 Bento KPI grid on phones so all 4 metrics fit above the fold */
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .budget-list {
    grid-template-columns: 1fr;
  }
  .account-input-card[style*="span 2"] {
    grid-column: span 1 !important;
  }
  .ai-dropzone {
    padding: 12px 10px;
  }
  .ai-upload-icon {
    width: 38px;
    height: 38px;
    margin-bottom: 6px;
  }
}

/* Short-height viewports (e.g. mobile landscape or compact laptop screens) */
@media (max-height: 740px) {
  .modal-card,
  .modal-card.modal-lg,
  .modal-card.modal-xl {
    max-height: calc(100dvh - 14px);
    padding: 0 16px 14px 16px;
  }
  .ai-receipt-thumbnail-container {
    max-height: 260px;
  }
  .form-group {
    margin-bottom: 8px;
  }
}
