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

:root {
  --bg-obsidian: #090a0f;
  --bg-card: #13151b;
  --bg-card-hover: #191c24;
  --accent-green: #bfff00;
  --accent-green-glow: rgba(191, 255, 0, 0.25);
  --accent-green-dim: #9ecb00;
  --text-primary: #ffffff;
  --text-secondary: #868b98;
  --text-dim: rgba(255, 255, 255, 0.4);
  --border-color: rgba(255, 255, 255, 0.06);
  --red: #ff4d4d;
  --green: #00e676;
  --font-main: 'Outfit', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-obsidian);
  color: var(--text-primary);
  font-family: var(--font-main);
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-obsidian);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

#app {
  max-width: 1500px;
  margin: 0 auto;
  padding: 24px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── TOP NAV BAR ── */
.header-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-title {
  color: var(--text-primary);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px;
  border-radius: 30px;
  border: 1px solid var(--border-color);
}

.nav-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-main);
}

.nav-btn:hover {
  color: var(--text-primary);
}

.nav-btn.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-weight: 600;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Theme Switcher Toggle */
.theme-switcher {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  padding: 3px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

.ts-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-main);
  transition: all 0.2s ease;
}

.ts-btn.active {
  background: var(--bg-card);
  color: var(--text-primary);
}

.icon-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.avatar-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border-color);
}

.avatar-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── HERO BANNER SECTION ── */
.hero-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 32px;
}

.welcome-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.back-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.welcome-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.action-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-pill {
  position: relative;
  display: flex;
  align-items: center;
}

.search-pill input {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px 16px 10px 40px;
  border-radius: 30px;
  font-size: 14px;
  outline: none;
  font-family: var(--font-main);
  width: 220px;
  transition: all 0.2s ease;
}

.search-pill input:focus {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
}

.search-pill svg {
  position: absolute;
  left: 14px;
  color: var(--text-secondary);
}

.card-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.card-selector:hover {
  background: rgba(255, 255, 255, 0.08);
}

.card-selector span {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

/* ── MODULAR CONTAINER VIEWS ── */
.view-container {
  display: none;
  flex-direction: column;
  margin-top: 24px;
}

.view-container.active {
  display: flex;
}

/* ── DASHBOARD GRID ── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.5fr;
  gap: 24px;
}

.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 24px;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

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

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-link-arrow {
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.card-link-arrow:hover {
  color: var(--text-primary);
  transform: translate(2px, -2px);
}

/* ── TOTAL BALANCE CARD ── */
.tb-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tb-label {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.tb-currency-toggle {
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  padding: 2px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.tb-cur-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 9px;
  cursor: pointer;
  font-family: var(--font-main);
  transition: all 0.15s ease;
}

.tb-cur-btn.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.tb-amount {
  font-size: 38px;
  font-weight: 700;
  margin-top: 8px;
  letter-spacing: -0.5px;
}

/* Fluid Blob Container */
.tb-fluid-graphic {
  position: relative;
  height: 120px;
  margin: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.tb-svg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.tb-node {
  position: relative;
  z-index: 2;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.tb-node.visa {
  background: radial-gradient(circle at 30% 30%, #2c2e3b 0%, #15161c 100%);
  border: 1px solid rgba(255,255,255,0.05);
}

.tb-node.mastercard {
  background: radial-gradient(circle at 30% 30%, #3e322b 0%, #1c1511 100%);
  border: 1px solid rgba(255, 126, 0, 0.1);
}

.tb-node.savings {
  background: radial-gradient(circle at 30% 30%, var(--bg-card-hover) 0%, var(--bg-card) 100%);
  border: 1px solid var(--border-color);
}

.tb-node-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.tb-node-name {
  font-size: 9px;
  color: var(--text-secondary);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tb-actions-row {
  display: flex;
  gap: 12px;
  margin-top: auto;
}

.btn-tb {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-main);
  transition: all 0.2s ease;
  text-align: center;
}

.btn-tb:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

/* ── INVESTMENTS / BUDGET CATEGORIES CARD ── */
.inv-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  max-height: 255px;
}

.inv-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.inv-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.inv-item.active {
  background: var(--accent-green);
  border-color: var(--accent-green);
  box-shadow: 0 4px 20px var(--accent-green-glow);
}

.inv-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.inv-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-size: 16px;
}

.inv-item.active .inv-icon-wrap {
  background: rgba(0, 0, 0, 0.1);
  color: #000000;
}

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

.inv-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.inv-item.active .inv-name {
  color: #000000;
}

.inv-detail {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 1px;
}

.inv-item.active .inv-detail {
  color: rgba(0, 0, 0, 0.6);
}

.inv-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.inv-perf {
  font-size: 13px;
  font-weight: 700;
}

.inv-perf.positive { color: var(--green); }
.inv-perf.negative { color: var(--red); }

.inv-item.active .inv-perf.positive { color: #065f46; }
.inv-item.active .inv-perf.negative { color: #991b1b; }

.inv-period {
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.inv-item.active .inv-period {
  color: rgba(0, 0, 0, 0.6);
}

/* ── AI ASSISTANT CARD ── */
.ai-wave-container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100px;
  margin: 10px 0;
  position: relative;
}

.ai-pulse-sphere {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-green) 0%, var(--accent-green-dim) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px var(--accent-green-glow);
  position: relative;
  z-index: 3;
  cursor: pointer;
}

.ai-wave-ring {
  position: absolute;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 1px solid var(--accent-green);
  opacity: 0.5;
  animation: pulse-ring 2s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
  z-index: 1;
}

@keyframes pulse-ring {
  0% { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(2.0); opacity: 0; }
}

.ai-welcome-text {
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 12px;
}

.ai-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 14px;
}

.ai-chip {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-main);
}

.ai-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.15);
}

.ai-input-wrap {
  margin-top: 20px;
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 6px 12px;
}

.ai-input-wrap input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  padding: 8px;
  outline: none;
  font-size: 14px;
  font-family: var(--font-main);
}

.ai-icon-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.ai-icon-btn:hover {
  color: var(--text-primary);
}

.ai-icon-btn.send-btn {
  background: var(--text-primary);
  color: var(--bg-obsidian);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  margin-left: 8px;
}

.ai-icon-btn.send-btn:hover {
  background: var(--accent-green);
  color: #000;
}

.ai-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.ai-toggle-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-toggle-pill:hover {
  background: rgba(255,255,255,0.06);
}

.ai-toggle-pill.active {
  background: rgba(191, 255, 0, 0.08);
  border-color: rgba(191, 255, 0, 0.3);
  color: var(--accent-green);
}

.ai-toggle-pill.active svg {
  color: var(--accent-green);
}

.ai-toggle-pill span {
  font-size: 11px;
  font-weight: 600;
}

.ai-model-sel {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  font-family: var(--font-main);
  padding-right: 4px;
}

/* ── CASHFLOW CARD ── */
.cf-amount-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
}

.cf-value-wrap {
  display: flex;
  flex-direction: column;
}

.cf-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.cf-tabs {
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.02);
  padding: 2px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

.cf-tab-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 18px;
  cursor: pointer;
  font-family: var(--font-main);
  transition: all 0.2s ease;
}

.cf-tab-btn.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-weight: 600;
}

.cf-dropdown-select {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 16px;
  outline: none;
  cursor: pointer;
  font-family: var(--font-main);
}

/* CSS Column Chart Layout */
.cf-chart-wrap {
  position: relative;
  height: 180px;
  margin-top: 10px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-top: 30px;
}

.cf-active-indicator {
  position: absolute;
  width: 1px;
  border-left: 1px dashed rgba(191, 255, 0, 0.4);
  top: 35px;
  bottom: 0;
  pointer-events: none;
  display: none;
  z-index: 1;
}

.cf-active-badge {
  position: absolute;
  top: 0;
  background: var(--accent-green);
  color: #000;
  font-weight: 700;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 8px;
  pointer-events: none;
  transform: translateX(-50%);
  box-shadow: 0 4px 10px rgba(191, 255, 0, 0.3);
  display: none;
  z-index: 2;
  font-family: var(--font-mono);
}

.cf-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  height: 100%;
  justify-content: flex-end;
  position: relative;
  z-index: 3;
}

.cf-col-bar {
  width: 24px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 4px;
}

.cf-col:hover .cf-col-bar {
  background: rgba(255, 255, 255, 0.15);
}

.cf-col.active .cf-col-bar {
  background: var(--accent-green);
  box-shadow: 0 0 15px var(--accent-green-glow);
}

.cf-col-label {
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: 8px;
  font-weight: 500;
}

.cf-col.active .cf-col-label {
  color: var(--text-primary);
  font-weight: 600;
}

/* ── TRANSACTIONS CARD ── */
.tx-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  max-height: 310px;
}

.tx-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

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

.tx-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--border-color);
  font-size: 14px;
}

.tx-icon img {
  width: 70%;
  height: 70%;
  object-fit: contain;
}

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

.tx-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tx-date {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.tx-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

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

.tx-amount.positive { color: var(--accent-green); }
.tx-amount.negative { color: var(--text-primary); }

.tx-currency {
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ── PAYMENTS WORKSPACE ── */
.payments-container {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr;
  gap: 24px;
}

.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 24px;
}

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

.payments-search-wrap {
  display: flex;
  gap: 12px;
  width: 100%;
  max-width: 400px;
}

.payments-search-wrap input {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 14px;
  outline: none;
  font-family: var(--font-main);
}

.chronicle-table-container {
  overflow-x: auto;
  max-height: 500px;
}

.chronicle-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.chronicle-table th {
  padding: 12px 16px;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
}

.chronicle-table td {
  padding: 14px 16px;
  font-size: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  vertical-align: middle;
}

.chronicle-table tr:hover td {
  background: rgba(255, 255, 255, 0.01);
}

.btn-delete-tx {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-delete-tx:hover {
  color: var(--red);
}

/* Quick Add Transaction Form */
.quick-form-card {
  height: fit-content;
}

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

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

.form-group input, .form-group select {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  outline: none;
  font-family: var(--font-main);
  transition: all 0.2s ease;
}

.form-group input:focus, .form-group select:focus {
  border-color: rgba(255,255,255,0.15);
}

.btn-submit-form {
  background: var(--accent-green);
  color: #000;
  border: none;
  padding: 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  font-family: var(--font-main);
  box-shadow: 0 4px 12px var(--accent-green-glow);
  transition: all 0.2s ease;
}

.btn-submit-form:hover {
  background: var(--accent-green-dim);
}

/* ── ANALYTICS WORKSPACE ── */
.analytics-container {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr;
  gap: 24px;
}

/* Compare Table Plan vs Actual */
.compare-container {
  overflow-x: auto;
}

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

.compare-table th {
  padding: 12px;
  font-size: 11px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  text-align: left;
  text-transform: uppercase;
}

.compare-table td {
  padding: 12px;
  font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.compare-cat-row td {
  font-weight: 700;
  background: rgba(255,255,255,0.01);
}

.compare-item-row td {
  padding-left: 24px;
}

.compare-progress-track {
  width: 80px;
  height: 6px;
  background: rgba(255,255,255,0.05);
  border-radius: 3px;
  overflow: hidden;
}

.compare-progress-fill {
  height: 100%;
  background: var(--accent-green);
}

.compare-progress-fill.over-limit {
  background: var(--red);
}

.compare-diff-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
}

.compare-diff-badge.positive {
  background: rgba(0, 230, 118, 0.1);
  color: var(--green);
}

.compare-diff-badge.negative {
  background: rgba(255, 77, 77, 0.1);
  color: var(--red);
}

/* Expense Breakdown List */
.breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.breakdown-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.breakdown-name {
  font-weight: 600;
}

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

.breakdown-bar-track {
  height: 8px;
  background: rgba(255,255,255,0.04);
  border-radius: 4px;
  overflow: hidden;
}

.breakdown-bar-fill {
  height: 100%;
  border-radius: 4px;
}

/* ── CARDS (PLANNER MATRIX GRID) ── */
.planner-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.planner-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.planner-mode-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  padding: 3px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

.pm-tab {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 17px;
  cursor: pointer;
  font-family: var(--font-main);
  transition: all 0.2s ease;
}

.pm-tab.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.planner-year-currency {
  display: flex;
  align-items: center;
  gap: 12px;
}

.planner-select {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 20px;
  outline: none;
  cursor: pointer;
  font-family: var(--font-main);
}

.planner-currency-toggle {
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  padding: 3px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

.planner-cur-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 17px;
  cursor: pointer;
  font-family: var(--font-main);
  transition: all 0.2s ease;
}

.planner-cur-btn.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

/* Timeline scrollbar */
.planner-timeline-bar {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 10px;
  border-radius: 16px;
  overflow-x: auto;
}

.planner-timeline-scroll {
  display: flex;
  gap: 8px;
}

.planner-month-chip {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-main);
}

.planner-month-chip:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text-primary);
}

.planner-month-chip.active {
  background: var(--accent-green);
  border-color: var(--accent-green);
  color: #000;
  font-weight: 700;
}

/* Deficit Alerts */
.deficit-alert {
  background: rgba(255, 77, 77, 0.08);
  border: 1px solid rgba(255, 77, 77, 0.2);
  color: var(--red);
  padding: 12px 16px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
}

/* Interactive Cards Matrix Grid */
.matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
}

.matrix-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.matrix-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

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

.matrix-card-title {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.matrix-card-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.matrix-card-total {
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.matrix-items-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.matrix-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.matrix-item-name {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.matrix-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.matrix-input-wrap input {
  width: 90px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 8px;
  text-align: right;
  outline: none;
}

.matrix-input-wrap input:focus {
  border-color: rgba(255,255,255,0.15);
}

.matrix-currency-label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
}

.matrix-presets-row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.matrix-preset-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-main);
}

.matrix-preset-btn:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text-primary);
}

/* ── AI ADVISOR VIEW ── */
.ai-advisor-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ai-tip-card {
  background: rgba(191, 255, 0, 0.03);
  border: 1px solid rgba(191, 255, 0, 0.1);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.ai-tip-icon {
  font-size: 24px;
  color: var(--accent-green);
  line-height: 1;
}

.ai-tip-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ai-tip-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.ai-tip-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── SERVICES / SETTINGS WORKSPACE ── */
.services-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.settings-section-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 8px;
}

.export-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

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

.export-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.export-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-main);
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.06);
}

.btn-danger {
  background: rgba(255, 77, 77, 0.1);
  border: 1px solid rgba(255, 77, 77, 0.2);
  color: var(--red);
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-main);
  text-align: center;
}

.btn-danger:hover {
  background: rgba(255, 77, 77, 0.15);
}

/* Modals overlays */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

/* Responsive details */
@media(max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .payments-container, .analytics-container {
    grid-template-columns: 1fr;
  }
}

/* ── INTERACTIVE ENHANCEMENTS & ANIMATIONS ── */

/* 1. Glowing Flowing pulses on Total Balance SVG connections */
@keyframes flow-dash {
  to {
    stroke-dashoffset: -72;
  }
}

#flow-line-1 {
  animation: flow-dash 2s linear infinite;
}

#flow-line-2 {
  animation: flow-dash 1.8s linear infinite;
}

/* 2. AI Equalizer Bars */
.ai-eq-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 50px;
  position: absolute;
  z-index: 1;
}

.ai-eq-bar {
  width: 3px;
  height: 8px;
  background: var(--accent-green);
  border-radius: 2px;
  box-shadow: 0 0 6px var(--accent-green-glow);
  transform-origin: bottom;
  animation: bounce-eq-bar 1s ease-in-out infinite alternate;
}

/* Rest delays for wave equalizer effect */
.ai-eq-bar:nth-child(1) { animation-delay: 0.1s; height: 12px; }
.ai-eq-bar:nth-child(2) { animation-delay: 0.4s; height: 22px; }
.ai-eq-bar:nth-child(3) { animation-delay: 0.2s; height: 32px; }
.ai-eq-bar:nth-child(4) { animation-delay: 0.6s; height: 18px; }
.ai-eq-bar:nth-child(5) { animation-delay: 0.3s; height: 26px; }
.ai-eq-bar:nth-child(6) { animation-delay: 0.5s; height: 14px; }
.ai-eq-bar:nth-child(7) { animation-delay: 0.15s; height: 20px; }
.ai-eq-bar:nth-child(8) { animation-delay: 0.7s; height: 8px; }

@keyframes bounce-eq-bar {
  0% { transform: scaleY(0.4); }
  100% { transform: scaleY(1.3); }
}

/* Faster equalizer animation when AI is thinking */
.ai-eq-container.thinking .ai-eq-bar {
  animation-duration: 0.4s;
  background: #ffffff;
  box-shadow: 0 0 10px rgba(255,255,255,0.6);
}

/* 3. SVG Donut chart segments */
.donut-segment {
  transition: stroke-width 0.2s ease, stroke-dashoffset 0.3s ease;
  cursor: pointer;
}

.donut-segment:hover {
  stroke-width: 14;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.2));
}

.donut-center-text {
  font-family: var(--font-main);
  fill: var(--text-primary);
  font-size: 16px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: middle;
}

.donut-center-subtext {
  font-family: var(--font-main);
  fill: var(--text-secondary);
  font-size: 8px;
  font-weight: 600;
  text-anchor: middle;
  dominant-baseline: middle;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

