/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  /* Brand Colors */
  --color-primary:       #3b5e40;
  --color-primary-dark:  #2a4430;
  --color-primary-hover: #2d4a32;
  --color-primary-light: #eaf2eb;
  --color-primary-muted: #6a9e72;
  --color-gold:          #c9a030;
  --color-gold-light:    #f5e8c0;

  /* Neutrals */
  --color-bg:            #f4f3ef;
  --color-surface:       #ffffff;
  --color-border:        #dde5e0;
  --color-border-light:  #eef2ee;

  /* Text */
  --color-text:          #1c2620;
  --color-text-secondary:#566360;
  --color-text-muted:    #97aaa1;

  /* Semantic */
  --color-success:       #2d6a35;
  --color-success-bg:    #e6f4e8;
  --color-warning:       #a86a08;
  --color-warning-bg:    #fef3e2;

  /* Typography */
  --font-body:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display:'Playfair Display', Georgia, serif;

  /* Spacing scale */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  20px;
  --sp-6:  24px;
  --sp-7:  28px;
  --sp-8:  32px;
  --sp-10: 40px;
  --sp-12: 48px;

  /* Border radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.05);
  --shadow-lg:  0 8px 30px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.06);
  --shadow-modal: 0 20px 60px rgba(0,0,0,0.18), 0 4px 16px rgba(0,0,0,0.10);

  /* Layout */
  --max-width: 1000px;
  --header-height: 72px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: none;
}

input {
  font-family: var(--font-body);
}

/* ============================================================
   SITE HEADER
   ============================================================ */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px var(--sp-8);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-6);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
}

.logo-mark {
  flex-shrink: 0;
}

.logo-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.logo-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--color-primary-dark);
  line-height: 1.2;
  letter-spacing: -0.2px;
}

.logo-name sup {
  font-size: 10px;
  vertical-align: super;
}

.logo-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.2;
}

.header-account {
  text-align: right;
}

.account-greeting {
  font-size: 13px;
  color: var(--color-text-secondary);
  font-weight: 500;
}

.account-balance {
  font-size: 26px;
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.5px;
  line-height: 1.1;
}

/* ============================================================
   TAB NAVIGATION
   ============================================================ */
.tab-nav {
  background: var(--color-surface);
  border-bottom: 2px solid var(--color-border);
  position: sticky;
  top: var(--header-height);
  z-index: 90;
}

.tab-nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--sp-8);
  display: flex;
  gap: 0;
}

.tab-btn {
  padding: 14px var(--sp-6);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  border-bottom: 2.5px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
  letter-spacing: 0.1px;
}

.tab-btn:hover {
  color: var(--color-text-secondary);
}

.tab-btn.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  font-weight: 600;
}

/* ============================================================
   SCREENS (show/hide)
   ============================================================ */
.screen {
  display: none;
}

.screen.active {
  display: block;
}

/* ============================================================
   PAGE CONTENT WRAPPER
   ============================================================ */
.page-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--sp-8) var(--sp-8) var(--sp-12);
}

.page-header {
  margin-bottom: var(--sp-7);
}

.page-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.4px;
  line-height: 1.2;
  margin-bottom: var(--sp-1);
}

.page-subtitle {
  font-size: 15px;
  color: var(--color-text-secondary);
  max-width: 560px;
}

/* ============================================================
   CARD BASE
   ============================================================ */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.panel-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--sp-2);
}

.panel-subtitle {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: var(--sp-5);
}

/* ============================================================
   PREREQUISITES BANNER
   ============================================================ */
.prereq-banner {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  background: #f0f6f1;
  border: 1px solid #c8deca;
  border-radius: var(--radius-md);
  padding: var(--sp-3) var(--sp-5);
  margin-bottom: var(--sp-7);
  font-size: 14px;
  color: var(--color-text-secondary);
}

.prereq-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.prereq-banner strong {
  color: var(--color-text);
  font-weight: 600;
}

/* ============================================================
   CONFIG GRID (sliders + requirements)
   ============================================================ */
.config-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: var(--sp-6);
  margin-bottom: var(--sp-6);
}

/* ============================================================
   SLIDERS PANEL
   ============================================================ */
.sliders-panel {
  padding: var(--sp-7);
}

.slider-group {
  margin-bottom: var(--sp-7);
}

.slider-group:last-child {
  margin-bottom: 0;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--sp-3);
}

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

.slider-value {
  font-size: 30px;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.5px;
  line-height: 1;
}

/* Custom range slider */
.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 7px;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  margin: var(--sp-2) 0;
  background: linear-gradient(
    to right,
    var(--color-primary) 0%,
    var(--color-primary) var(--fill-pct, 75%),
    var(--color-border) var(--fill-pct, 75%),
    var(--color-border) 100%
  );
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 3px solid white;
  box-shadow: 0 2px 6px rgba(59, 94, 64, 0.35);
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.12);
  box-shadow: 0 3px 10px rgba(59, 94, 64, 0.45);
}

.slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 3px solid white;
  box-shadow: 0 2px 6px rgba(59, 94, 64, 0.35);
  cursor: pointer;
}

.slider:focus {
  outline: none;
}

.slider:focus::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px rgba(59, 94, 64, 0.2), 0 2px 6px rgba(59, 94, 64, 0.35);
}

.slider-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: var(--sp-1);
}

.slider-cap-note {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: var(--sp-2);
}

/* ============================================================
   REQUIREMENTS PANEL
   ============================================================ */
.requirements-panel {
  padding: var(--sp-7);
  display: flex;
  flex-direction: column;
}

.req-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--color-border-light);
}

.req-row:last-of-type {
  border-bottom: none;
}

.req-icon-wrap {
  width: 38px;
  height: 38px;
  background: var(--color-primary-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  flex-shrink: 0;
}

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

.req-label {
  font-size: 12px;
  color: var(--color-text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.req-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
}

.req-unit {
  font-size: 12px;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.req-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.req-badge.met {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.req-badge.gap {
  background: var(--color-warning-bg);
  color: var(--color-warning);
}

/* ============================================================
   EARNINGS BAR
   ============================================================ */
.earnings-bar {
  background: linear-gradient(130deg, #2a4430 0%, #3b5e40 50%, #4d7a55 100%);
  border-radius: var(--radius-lg);
  padding: var(--sp-7) var(--sp-8);
  margin-bottom: var(--sp-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  box-shadow: 0 6px 28px rgba(42, 68, 48, 0.30), 0 2px 8px rgba(0,0,0,0.10);
}

.earnings-bar-left {
  flex-shrink: 0;
}

.earnings-eyebrow {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.70);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.earnings-values {
  display: flex;
  align-items: stretch;
  gap: var(--sp-6);
}

.earnings-item {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.earnings-amount {
  font-size: 36px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.8px;
  line-height: 1;
}

.earnings-label {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  margin-top: 4px;
}

.earnings-cap-note {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  margin-top: 2px;
  min-height: 16px;
}

.earnings-divider {
  width: 1px;
  align-self: stretch;
  background: rgba(255,255,255,0.20);
  flex-shrink: 0;
}

/* ============================================================
   LINKED PRODUCTS
   ============================================================ */
.products-section {
  padding: var(--sp-7);
  margin-bottom: var(--sp-7);
}

.products-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--sp-5);
  gap: var(--sp-4);
  flex-wrap: wrap;
}

.products-counter {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.products-gap-inline {
  font-weight: 500;
  color: var(--color-warning);
}

.products-gap-inline.met {
  color: var(--color-success);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--sp-3);
}

.product-card {
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--sp-4) var(--sp-2);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-1);
  background: var(--color-surface);
}

.product-card:hover {
  border-color: var(--color-primary-muted);
  box-shadow: var(--shadow-sm);
}

.product-card.linked {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.product-icon {
  font-size: 26px;
  line-height: 1;
  display: block;
}

.product-name {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-secondary);
  line-height: 1.3;
}

.product-card.linked .product-name {
  color: var(--color-text);
}

.product-check {
  font-size: 11px;
  color: var(--color-primary);
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.15s;
}

.product-card.linked .product-check {
  opacity: 1;
}

/* ============================================================
   SAVE CTA
   ============================================================ */
.save-section {
  text-align: center;
  margin-bottom: var(--sp-6);
}

.save-hint {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: var(--sp-2);
}

.screen-footnote {
  font-size: 12px;
  color: var(--color-text-muted);
  text-align: center;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--color-border-light);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  background: var(--color-primary);
  color: #ffffff;
  border: none;
  padding: 12px var(--sp-6);
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  box-shadow: 0 4px 12px rgba(59, 94, 64, 0.30);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-primary.btn-lg {
  padding: 14px var(--sp-10);
  font-size: 16px;
  border-radius: var(--radius-md);
}

.btn-primary.confirmed {
  background: #2a5c32;
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text-secondary);
  border: 1.5px solid var(--color-border);
  padding: 10px var(--sp-5);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

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

.btn-text {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 500;
  padding: var(--sp-2) var(--sp-3);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: color 0.15s;
}

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

.btn-outline-sm {
  background: none;
  border: 1.5px solid var(--color-border);
  color: var(--color-text-secondary);
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-outline-sm:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* ============================================================
   SAVINGS GOALS SCREEN
   ============================================================ */
.goals-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--sp-6);
}

.goals-total-header {
  text-align: right;
  flex-shrink: 0;
}

.goals-total-amount {
  font-size: 32px;
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.6px;
  line-height: 1.1;
}

.goals-total-label {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-top: 2px;
}

.goals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--sp-5);
  margin-bottom: var(--sp-6);
}

/* Goal Card */
.goal-card {
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.goal-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.goal-icon {
  font-size: 36px;
  line-height: 1;
  display: block;
}

.goal-edit-btn {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-muted);
  background: none;
  border: none;
  padding: 2px var(--sp-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.goal-edit-btn:hover {
  color: var(--color-text-secondary);
  background: var(--color-primary-light);
}

.goal-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
}

.goal-amounts {
  font-size: 14px;
  display: flex;
  align-items: baseline;
  gap: 5px;
  flex-wrap: wrap;
}

.goal-saved {
  font-weight: 700;
  color: var(--color-text);
  font-size: 15px;
}

.goal-divider {
  color: var(--color-text-muted);
  font-size: 12px;
}

.goal-target {
  color: var(--color-text-secondary);
}

.goal-progress-wrap {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.goal-progress-bar {
  flex: 1;
  height: 8px;
  background: var(--color-border);
  border-radius: 4px;
  overflow: hidden;
}

.goal-progress-fill {
  height: 100%;
  background: linear-gradient(to right, var(--color-primary), var(--color-primary-muted));
  border-radius: 4px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.goal-pct {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  white-space: nowrap;
  min-width: 38px;
  text-align: right;
}

.goal-add-btn {
  width: 100%;
  margin-top: auto;
  padding: 10px;
  font-size: 14px;
}

/* Add Goal Button */
.add-goal-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: var(--sp-8);
}

.add-goal-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 12px var(--sp-7);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-surface);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.add-goal-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-light);
}

.add-goal-plus {
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
}

/* Savings Summary Bar */
.savings-summary {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  padding: var(--sp-5) var(--sp-7);
  flex-wrap: wrap;
}

.savings-summary-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
  flex-shrink: 0;
}

.savings-summary-amount {
  font-size: 28px;
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.5px;
  flex: 1;
}

.savings-summary-actions {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

/* ============================================================
   AI SCREENS (Smart Budget + Subscriptions)
   ============================================================ */
.coming-soon-badge {
  display: inline-block;
  background: var(--color-gold);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 4px;
}

.ai-screen-layout {
  display: flex;
  gap: var(--sp-8);
  align-items: flex-start;
  margin-bottom: var(--sp-6);
}

.ai-robot-wrap {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding-top: var(--sp-4);
}

.ai-robot-glow {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,160,48,0.20) 0%, transparent 70%);
  pointer-events: none;
}

.ai-robot-svg {
  width: 130px;
  height: auto;
  position: relative;
  z-index: 1;
}

.ai-content-panel {
  flex: 1;
  padding: var(--sp-7);
}

.ai-panel-header {
  margin-bottom: var(--sp-6);
}

.ai-panel-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--sp-1);
}

.ai-panel-subtitle {
  font-size: 14px;
  color: var(--color-text-secondary);
}

.ai-suggestions {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: var(--sp-5);
}

.ai-suggestion-row {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--color-border-light);
}

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

.ai-suggestion-icon {
  font-size: 24px;
  width: 42px;
  height: 42px;
  background: var(--color-primary-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ai-suggestion-info {
  flex: 1;
  min-width: 0;
}

.ai-suggestion-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
}

.ai-suggestion-desc {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.ai-suggestion-savings {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Subscription brand icons */
.sub-brand-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
  flex-shrink: 0;
  color: white;
}

.sub-brand-icon.netflix {
  background: #e50914;
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 22px;
}

.sub-brand-icon.audible {
  background: #f28c1a;
  font-size: 20px;
  font-style: italic;
}

.sub-brand-icon.hulu {
  background: #1ce783;
  color: #000;
  font-size: 18px;
  font-weight: 700;
  font-style: italic;
}

.ai-potential-savings {
  font-size: 17px;
  font-weight: 600;
  color: var(--color-text);
  text-align: center;
  padding: var(--sp-4) var(--sp-6);
  background: var(--color-primary-light);
  border-radius: var(--radius-md);
  margin-bottom: var(--sp-5);
}

.ai-potential-savings strong {
  color: var(--color-primary-dark);
}

.ai-panel-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
}

/* Status Bar (bottom of AI screens) */
.screen-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--sp-4) var(--sp-6);
  flex-wrap: wrap;
}

.status-bar-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 14px;
  color: var(--color-text-secondary);
}

.status-icon {
  font-size: 16px;
}

.status-amount {
  font-weight: 500;
  color: var(--color-text);
}

.status-bar-actions {
  display: flex;
  gap: var(--sp-3);
}

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 14, 0.55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--sp-6);
  animation: fadeIn 0.15s ease;
}

.modal-overlay.hidden {
  display: none;
}

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

.modal {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-modal);
  width: 100%;
  max-width: 420px;
  animation: slideUp 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-6) var(--sp-6) var(--sp-4);
  border-bottom: 1px solid var(--color-border-light);
}

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

.modal-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--color-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

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

.modal-body {
  padding: var(--sp-5) var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.modal-goal-context {
  font-size: 14px;
  color: var(--color-text-secondary);
  font-style: italic;
  margin-bottom: var(--sp-1);
}

.modal-footer {
  padding: var(--sp-4) var(--sp-6) var(--sp-6);
  display: flex;
  gap: var(--sp-3);
  justify-content: flex-end;
}

/* Form elements */
.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  display: block;
}

.form-input {
  width: 100%;
  padding: 10px var(--sp-4);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 15px;
  color: var(--color-text);
  background: var(--color-surface);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.form-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(59, 94, 64, 0.12);
}

.input-affix-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-prefix {
  position: absolute;
  left: 14px;
  font-size: 15px;
  color: var(--color-text-secondary);
  pointer-events: none;
}

.input-affix-wrap .form-input {
  padding-left: 28px;
}
