/* ============================================ */
/* SELF-HOSTED FONTS (no external requests)     */
/* Inter (OFL) + Material Symbols (Apache 2.0)  */
/* ============================================ */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter-latin-wght-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Material Symbols Rounded';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/material-symbols-rounded.woff2') format('woff2');
}
.material-symbols-rounded {
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'liga';
  -webkit-font-feature-settings: 'liga';
}

/* ============================================ */
/* THEME VARIABLES                              */
/* ============================================ */
:root,
html[data-theme="dark"] {
  --bg: #0b0b12;
  --bg-gradient-1: rgba(124, 92, 255, 0.18);
  --bg-gradient-2: rgba(212, 175, 55, 0.08);
  --bg-gradient-3: rgba(124, 92, 255, 0.06);
  --card-bg-from: #16161f;
  --card-bg-to: #12121a;
  --card-elevated: #1a1a26;
  --card-elevated-hover: #1e1e2a;
  --card-strong: #1c1c28;
  --card-strong-alt: #15151e;
  --results-bg-from: #1c1c28;
  --results-bg-to: #15151e;
  --border: rgba(255,255,255,0.07);
  --border-strong: rgba(255,255,255,0.12);
  --gold: #d4af37;
  --gold-light: #e8c547;
  --gold-dark: #b8942a;
  --gold-text: #d4af37;
  --accent: #7c5cff;
  --accent-soft: rgba(124, 92, 255, 0.15);
  --accent-text: #c8b8ff;
  --text: #f4f4f7;
  --text-secondary: #a8a8b8;
  --text-muted: #6b6b7b;
  --text-heading: #ffffff;
  --success: #34d399;
  --success-soft: #6ee7b7;
  --overlay-bg: rgba(0,0,0,0.28);
  --btn-sms-bg: #ffffff;
  --btn-sms-text: #0b0b12;
  --btn-sms-hover: #f0f0f5;
  --dropdown-bg: #1c1c28;
  --shadow: 0 25px 50px -12px rgba(0,0,0,0.7);
  --shadow-sm: 0 10px 28px -6px rgba(212,175,55,0.45);
  --input-focus-bg: #1e1e2a;
  --scrollbar-thumb: rgba(255,255,255,0.15);
  --disclaimer: #52525f;
  --mode-toggle-bg: rgba(124, 92, 255, 0.1);
  --mode-toggle-border: rgba(124, 92, 255, 0.3);
  --mode-toggle-hover: rgba(124, 92, 255, 0.16);
  --days-quick-bg: rgba(255,255,255,0.04);
  --days-quick-hover: rgba(255,255,255,0.08);
  --days-quick-active-bg: rgba(212,175,55,0.15);
  --days-quick-active-border: rgba(212,175,55,0.45);
  --social-bg: rgba(255,255,255,0.04);
  --social-active-bg: rgba(212,175,55,0.1);
  --accent-highlight: rgba(212,175,55,0.08);
  --accent-highlight-border: rgba(212,175,55,0.22);
  --accent-highlight-strong: rgba(212,175,55,0.2);
  --btn-action-secondary-bg: rgba(255,255,255,0.04);
  --btn-action-secondary-hover: rgba(255,255,255,0.08);
  --btn-email-bg: rgba(255,255,255,0.06);
  --btn-email-hover: rgba(255,255,255,0.1);
  --accordion-hover: rgba(255,255,255,0.02);
  --btn-details-bg: rgba(255,255,255,0.04);
  --btn-details-hover: rgba(255,255,255,0.06);
  --maps-bg: rgba(255,255,255,0.03);
  --count-bg: rgba(255,255,255,0.05);
  --modal-backdrop: rgba(0,0,0,0.75);
  --modal-shadow: 0 30px 60px -12px rgba(0,0,0,0.9);
  --radius: 8px;
  --radius-sm: 5px;
}

html[data-theme="light"] {
  --bg: #f4f4f8;
  --bg-gradient-1: rgba(249, 171, 2, 0.10);
  --bg-gradient-2: rgba(249, 171, 2, 0.12);
  --bg-gradient-3: rgba(249, 171, 2, 0.05);
  --card-bg-from: #ffffff;
  --card-bg-to: #fafafd;
  --card-elevated: #f9f9fb;
  --card-elevated-hover: #f4f4f8;
  --card-strong: #ffffff;
  --card-strong-alt: #fafafd;
  --results-bg-from: #ffffff;
  --results-bg-to: #f7f7fa;
  --border: rgba(0,0,0,0.08);
  --border-strong: rgba(0,0,0,0.12);
  --gold: #f9ab02;
  --gold-light: #ffb823;
  --gold-dark: #e89b00;
  --gold-text: #d18f00;
  --accent: #6b4cff;
  --accent-soft: rgba(107, 76, 255, 0.12);
  --accent-text: #5b3ee8;
  --text: #1a1a1f;
  --text-secondary: #6b6b7b;
  --text-muted: #9999a8;
  --text-heading: #0b0b12;
  --success: #10b981;
  --success-soft: #059669;
  --overlay-bg: rgba(0,0,0,0.05);
  --btn-sms-bg: #0b0b12;
  --btn-sms-text: #ffffff;
  --btn-sms-hover: #1a1a1f;
  --dropdown-bg: #ffffff;
  --shadow: 0 25px 50px -12px rgba(0,0,0,0.15);
  --shadow-sm: 0 10px 28px -6px rgba(249,171,2,0.40);
  --input-focus-bg: #ffffff;
  --scrollbar-thumb: rgba(0,0,0,0.15);
  --disclaimer: #9999a8;
  --mode-toggle-bg: rgba(107, 76, 255, 0.08);
  --mode-toggle-border: rgba(107, 76, 255, 0.25);
  --mode-toggle-hover: rgba(107, 76, 255, 0.14);
  --days-quick-bg: rgba(0,0,0,0.03);
  --days-quick-hover: rgba(0,0,0,0.06);
  --days-quick-active-bg: rgba(249,171,2,0.15);
  --days-quick-active-border: rgba(249,171,2,0.55);
  --social-bg: rgba(0,0,0,0.03);
  --social-active-bg: rgba(249,171,2,0.12);
  --accent-highlight: rgba(249,171,2,0.10);
  --accent-highlight-border: rgba(249,171,2,0.30);
  --accent-highlight-strong: rgba(249,171,2,0.25);
  --btn-action-secondary-bg: rgba(0,0,0,0.03);
  --btn-action-secondary-hover: rgba(0,0,0,0.06);
  --btn-email-bg: rgba(0,0,0,0.04);
  --btn-email-hover: rgba(0,0,0,0.08);
  --accordion-hover: rgba(0,0,0,0.02);
  --btn-details-bg: rgba(0,0,0,0.03);
  --btn-details-hover: rgba(0,0,0,0.05);
  --maps-bg: rgba(0,0,0,0.03);
  --count-bg: rgba(0,0,0,0.05);
  --modal-backdrop: rgba(0,0,0,0.5);
  --modal-shadow: 0 30px 60px -12px rgba(0,0,0,0.3);
  --radius: 8px;
  --radius-sm: 5px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 20px 14px 40px;
  transition: background-color 0.3s ease, color 0.3s ease;
  background-image: 
    radial-gradient(ellipse 90% 60% at 50% -15%, var(--bg-gradient-1), transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 100%, var(--bg-gradient-2), transparent),
    radial-gradient(ellipse 50% 40% at 0% 80%, var(--bg-gradient-3), transparent);
}

.container {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(180deg, var(--card-bg-from) 0%, var(--card-bg-to) 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 26px 20px 30px;
  box-shadow: var(--shadow);
  position: relative;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  animation: fadeInUp 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.container::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--accent), transparent);
  opacity: 0.6;
  border-radius: 28px 28px 0 0;
  pointer-events: none;
}

/* HEADER */
header {
  text-align: center;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.header-top-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  position: absolute;
  top: 0;
  right: 0;
}

.theme-toggle,
.help-toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--card-elevated);
  border: 1px solid var(--border-strong);
  color: var(--gold);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  padding: 0;
}
@media (hover: hover) and (pointer: fine) {
  .theme-toggle:hover,
  .help-toggle:hover {
    background: var(--card-elevated-hover);
    border-color: var(--gold);
    transform: scale(1.08);
  }
}
.theme-toggle:active,
.help-toggle:active { transform: scale(0.95); }
.theme-toggle .material-symbols-rounded,
.help-toggle .material-symbols-rounded {
  font-size: 20px;
  font-variation-settings: 'FILL' 1;
}
.help-toggle .material-symbols-rounded {
  font-variation-settings: 'FILL' 0, 'wght' 600;
}

.brand-logo { width: 76px; height: 76px; object-fit: contain; display: block; margin: 0 auto 14px; filter: drop-shadow(0 6px 22px rgba(212, 175, 55, 0.28)); animation: logoFloat 4s ease-in-out infinite; }
@keyframes logoFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.brand-dealership { font-size: 11px; letter-spacing: 2.2px; text-transform: uppercase; color: var(--gold-text); font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.brand-dealership .material-symbols-rounded { font-size: 15px; }
h1 { font-size: 25px; font-weight: 800; color: var(--text-heading); letter-spacing: -0.6px; margin-bottom: 4px; }
.agent-title { font-size: 14px; font-weight: 600; color: var(--text-secondary); margin-bottom: 12px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.agent-title .material-symbols-rounded { font-size: 16px; color: var(--gold); }
.badge-experience { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--text-secondary); background: var(--accent-highlight); border: 1px solid var(--accent-highlight-border); padding: 6px 14px; border-radius: 5px; }
.badge-experience .material-symbols-rounded { font-size: 14px; color: var(--gold); }

/* FORM */
.form-group { margin-bottom: 14px; position: relative; }
label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-secondary); margin-bottom: 7px; font-weight: 500; }
label .material-symbols-rounded { font-size: 16px; color: var(--gold); }
.field-hint { font-size: 10.5px; color: var(--text-muted); margin-top: 5px; line-height: 1.4; display: flex; align-items: center; gap: 4px; }
.field-hint .material-symbols-rounded { font-size: 12px; color: var(--gold); opacity: 0.7; }

select, input {
  width: 100%; height: 50px;
  background: var(--card-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 16px; font-weight: 500;
  padding: 0 16px;
  outline: none;
  transition: all 0.25s ease;
  appearance: none; -webkit-appearance: none;
  font-family: inherit;
}
select:focus, input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--accent-highlight);
  background: var(--input-focus-bg);
}
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; }
input::placeholder { color: var(--text-muted); }

.row { display: flex; gap: 12px; }
.row .form-group { flex: 1; }

/* CUSTOM DROPDOWN */
.custom-select { position: relative; width: 100%; }
.select-trigger {
  width: 100%; height: 50px;
  background: var(--card-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15px; font-weight: 500;
  padding: 0 44px 0 16px;
  display: flex; align-items: center;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative; user-select: none;
}
.select-trigger:hover { border-color: var(--accent-highlight-border); background: var(--card-elevated-hover); }
.select-trigger.open { border-color: var(--gold); box-shadow: 0 0 0 3px var(--accent-highlight); background: var(--card-elevated-hover); }
.select-trigger .arrow { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); color: var(--gold); font-size: 20px; }
.select-trigger.open .arrow { transform: translateY(-50%) rotate(180deg); }

.select-options {
  position: absolute; top: calc(100% + 8px); bottom: auto; left: 0; right: 0;
  background: var(--dropdown-bg);
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  box-shadow: 0 20px 40px -8px rgba(0,0,0,0.5), 0 0 0 1px var(--accent-soft);
  overflow: hidden;
  z-index: 50;
  opacity: 0; visibility: hidden;
  transform: translateY(-10px) scale(0.96);
  transform-origin: top center;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 350px; 
  overflow-y: auto;
  /* فاصله از لبه‌ها */
  padding: 10px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) transparent;
}
.select-options.open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.select-option { padding: 13px 16px; font-size: 15px; font-weight: 500; color: var(--text-secondary); cursor: pointer; transition: all 0.18s ease; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); }
.select-option:last-child { border-bottom: none; }
.select-option:hover, .select-option.highlighted { background: var(--accent-highlight); color: var(--text); }
.select-option.selected { background: var(--accent-highlight-strong); color: var(--text); font-weight: 600; }
.select-option .option-icon { font-size: 18px; color: var(--gold); opacity: 0.85; }
.select-option.selected .option-icon { opacity: 1; }

/* DAYS QUICK PICKS */
.days-quick { display: flex; gap: 6px; margin-top: 8px; }
.days-quick-btn {
  flex: 1; height: 44px;
  background: var(--days-quick-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 12px; font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.days-quick-btn:hover { background: var(--days-quick-hover); color: var(--text); }
.days-quick-btn.active {
  background: var(--days-quick-active-bg);
  border-color: var(--days-quick-active-border);
  color: var(--gold-text);
  font-weight: 700;
}
.days-quick-btn:active { transform: scale(0.96); }

/* MODE TOGGLE */
.mode-toggle {
  width: 100%; height: 46px;
  background: var(--mode-toggle-bg);
  border: 1px solid var(--mode-toggle-border);
  border-radius: var(--radius-sm);
  color: var(--accent-text);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  transition: all 0.25s ease;
  font-family: inherit;
  margin-top: 10px;
  margin-bottom: 10px;
}
.mode-toggle:hover { background: var(--mode-toggle-hover); }
.mode-toggle:active { transform: scale(0.98); }
.mode-toggle .material-symbols-rounded { font-size: 18px; }
.mode-toggle .mode-arrow { transition: transform 0.3s; }
.mode-toggle.open .mode-arrow { transform: rotate(180deg); }
.mode-toggle .mode-arrow { font-variation-settings: 'FILL' 1, 'wght' 600; }

/* ADVANCED SECTION */
.advanced-header {
  display: none;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  margin-bottom: 12px;
}
.advanced-header.visible {
  display: flex;
  animation: fadeInUp 0.3s ease;
}
.advanced-header-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}
.advanced-header-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--gold-text);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}
.advanced-header-title .material-symbols-rounded {
  font-size: 15px;
  color: var(--gold);
  font-variation-settings: 'FILL' 1;
}

.advanced-section {
  display: block;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  margin-top: 0;
  margin-bottom: 0;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0s linear 0.35s,
              margin-bottom 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.advanced-section.open {
  max-height: 4000px;
  opacity: 1;
  visibility: visible;
  margin-bottom: 18px;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0s linear 0s,
              margin-bottom 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.accordion {
  margin-bottom: 10px;
  background: var(--card-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.accordion-header {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  padding: 14px 16px;
  display: flex; align-items: center; gap: 10px;
  font-family: inherit;
  transition: background 0.2s;
}
.accordion-header:hover { background: var(--accordion-hover); }
.accordion-header .material-symbols-rounded { font-size: 20px; color: var(--gold); }
.accordion-header .accordion-arrow { margin-left: auto; color: var(--text-muted); transition: transform 0.3s; font-size: 20px; }
.accordion.open .accordion-arrow { transform: rotate(180deg); }
.accordion-title { flex: 1; text-align: left; }
.accordion-count { font-size: 11px; color: var(--text-muted); background: var(--count-bg); padding: 2px 8px; border-radius: 10px; }
.accordion-body { display: none; padding: 0 16px 14px; }
.accordion.open .accordion-body { display: block; }

/* CALCULATE + RESET ROW */
.calc-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.calc-actions .btn-calc {
  flex: 1;
  margin-top: 0;
}
.btn-reset {
  height: 54px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--card-elevated);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-reset:hover {
  background: var(--card-elevated-hover);
  color: var(--text);
  border-color: var(--gold);
}
.btn-reset:active { transform: scale(0.97); }
.btn-reset .material-symbols-rounded {
  font-size: 18px;
  font-variation-settings: 'FILL' 0, 'wght' 500;
}

/* CALCULATE BUTTON */
.btn-calc {
  width: 100%; height: 54px;
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-dark) 100%);
  color: #0b0b12;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px; font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}
.btn-calc::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,255,255,0.3), transparent 55%); opacity: 0; transition: opacity 0.3s; }
.btn-calc:hover::before { opacity: 1; }
.btn-calc:active { transform: scale(0.97); }
.btn-calc .material-symbols-rounded { font-size: 22px; font-variation-settings: 'FILL' 1; }
.btn-calc .material-symbols-rounded.icon-spin {
  animation: modeIconSpin 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* RESULTS */
.results-card {
  background: linear-gradient(165deg, var(--results-bg-from) 0%, var(--results-bg-to) 100%);
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  padding: 22px 18px 18px;
  margin-top: 22px;
  text-align: center;
  position: relative;
  transition: background 0.3s ease, border-color 0.3s ease;
  animation: resultReveal 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
/* Glow effect for the flash */
.results-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 5px;
  pointer-events: none;
  z-index: 10;
  box-shadow: inset 0 0 0 0 rgba(212, 175, 55, 0), inset 0 0 0 0 rgba(212, 175, 55, 0);
  transition: box-shadow 0.3s ease;
}
.results-card.flash::after {
  animation: flashGlow 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes flashGlow {
  0% { 
    box-shadow: inset 0 0 0 0 rgba(212, 175, 55, 0), inset 0 0 0 0 rgba(212, 175, 55, 0); 
  }
  30% { 
    /* درخشش طلایی ملایم از لبه‌ها به سمت داخل */
    box-shadow: inset 0 0 30px 5px rgba(212, 175, 55, 0.25), inset 0 0 0 1px rgba(212, 175, 55, 0.6); 
  }
  100% { 
    box-shadow: inset 0 0 0 0 rgba(212, 175, 55, 0), inset 0 0 0 0 rgba(212, 175, 55, 0); 
  }
}
.results-card::before {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 55%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--accent), transparent);
  border-radius: 10px 10px 0 0;
  pointer-events: none;
}
.monthly-label { font-size: 12px; text-transform: uppercase; letter-spacing: 1.6px; color: var(--text-muted); font-weight: 600; margin-bottom: 6px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.monthly-label .material-symbols-rounded { font-size: 16px; color: var(--gold); }
.monthly-amount { font-size: 42px; font-weight: 800; color: var(--text-heading); letter-spacing: -1.5px; margin: 4px 0 16px; line-height: 1; text-shadow: 0 0 40px var(--accent-highlight); transition: opacity 0.15s ease, transform 0.15s ease; }
.monthly-amount span { font-size: 16px; font-weight: 500; color: var(--text-muted); margin-left: 2px; }

.otd-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px;
  background: var(--accent-highlight);
  border: 1px solid var(--accent-highlight-border);
  border-radius: 6px;
  margin-bottom: 14px;
  font-size: 12px;
}
.otd-row .otd-label { color: var(--gold-text); font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; display: flex; align-items: center; gap: 5px; }
.otd-row .otd-label .material-symbols-rounded { font-size: 15px; }
.otd-row .otd-value { color: var(--text-heading); font-weight: 700; font-size: 15px; }

.btn-details {
  width: 100%;
  background: var(--btn-details-bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text-secondary);
  font-size: 12px; font-weight: 600;
  padding: 10px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  gap: 6px;
  font-family: inherit;
  margin-bottom: 12px;
  transition: all 0.2s;
}
.btn-details:hover { background: var(--btn-details-hover); color: var(--text); }
.btn-details .material-symbols-rounded { font-size: 16px; transition: transform 0.3s; }
.btn-details.open .material-symbols-rounded { transform: rotate(180deg); }

.breakdown-full {
  display: none;
  background: var(--overlay-bg);
  border-radius: 5px;
  padding: 4px 0;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  text-align: left;
}
.breakdown-full.open { display: block; animation: fadeInUp 0.3s ease; }
.breakdown-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; font-size: 12.5px; }
.breakdown-row.hidden { display: none; }
.breakdown-row .br-label { color: var(--text-secondary); }
.breakdown-row .br-value { color: var(--text); font-weight: 600; }
.breakdown-row.subtotal { border-top: 1px dashed var(--border-strong); margin-top: 4px; padding-top: 10px; }
.breakdown-row.highlight { background: var(--accent-highlight); border-top: 1px solid var(--accent-highlight-strong); border-bottom: 1px solid var(--accent-highlight-strong); padding: 10px 14px; }
.breakdown-row.highlight .br-label { color: var(--gold-text); font-weight: 700; }
.breakdown-row.highlight .br-value { color: var(--gold-text); font-weight: 700; }
.breakdown-row.negative .br-value { color: var(--success-soft); }

/* ACTION BUTTONS */
.action-buttons { display: flex; gap: 10px; }
.btn-action {
  flex: 1; height: 50px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  gap: 7px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}
.btn-action:hover { transform: translateY(-2px); }
.btn-action .material-symbols-rounded { font-size: 20px; }
.btn-sms { background: var(--btn-sms-bg); color: var(--btn-sms-text); box-shadow: 0 4px 16px -4px rgba(0,0,0,0.2); }
.btn-sms:hover { background: var(--btn-sms-hover); box-shadow: 0 6px 20px -4px rgba(0,0,0,0.3); }
.btn-sms:active { transform: scale(0.96); background: var(--btn-sms-hover); }
.btn-email { background: var(--btn-email-bg); color: var(--text); border: 1px solid var(--border-strong); }
.btn-email:hover { background: var(--btn-email-hover); border-color: var(--accent-highlight-border); box-shadow: 0 6px 20px -4px rgba(0,0,0,0.2); }
.btn-email:active { transform: scale(0.96); background: var(--btn-email-hover); }

.action-buttons-secondary { display: flex; gap: 10px; margin-top: 10px; }
.btn-action-secondary {
  flex: 1; height: 44px;
  background: var(--btn-action-secondary-bg);
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  color: var(--text-secondary);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; justify-content: flex-start;
  gap: 6px;
  font-family: inherit;
  transition: all 0.2s;
  padding: 0 14px;
}
.btn-action-secondary:hover { background: var(--btn-action-secondary-hover); color: var(--text); }
.btn-action-secondary:active { transform: scale(0.96); background: var(--btn-action-secondary-hover); color: var(--text); }
.btn-action-secondary .material-symbols-rounded { font-size: 18px; }

/* ============================================ */
/* DROPDOWN MENUS (COPY / SHARE)                */
/* ============================================ */
.dropdown-wrapper { position: relative; flex: 1; min-width: 0; }
.dropdown-wrapper .btn-action-secondary { width: 100%; }
.dropdown-chevron {
  font-size: 16px !important;
  margin-left: auto;
  transition: transform 0.25s ease;
}
.dropdown-wrapper.open .dropdown-chevron { transform: rotate(180deg); }
.dropdown-menu {
  position: absolute;
  left: 0;
  right: 0;
  background: var(--dropdown-bg);
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  box-shadow: 0 20px 40px -8px rgba(0,0,0,0.5), 0 0 0 1px var(--accent-soft);
  overflow: hidden;
  z-index: 80;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.97);
  transform-origin: top center;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 4px;
}
.dropdown-menu-up { top: calc(100% + 8px); bottom: auto; }
.dropdown-menu.open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.dropdown-item {
  width: 100%;
  background: transparent;
  border: none;
  padding: 11px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}
.dropdown-item:hover,
.dropdown-item:focus-visible {
  background: var(--accent-highlight);
  color: var(--text);
  outline: none;
}
.dropdown-item .material-symbols-rounded { font-size: 18px; color: var(--gold); }

/* ============================================ */
/* SKELETON LOADING FOR ICONS & LOGO            */
/* ============================================ */
html.icons-loading .material-symbols-rounded {
  position: relative;
  color: transparent !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  line-height: 1;
}
html.icons-loading .material-symbols-rounded::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--card-elevated) 0%, var(--card-elevated-hover) 50%, var(--card-elevated) 100%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.4s ease-in-out infinite;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
html.icons-loading.icons-fading .material-symbols-rounded::before {
  opacity: 0;
  animation: none;
}
html.icons-loading .brand-logo {
  background: linear-gradient(90deg, var(--card-elevated) 0%, var(--card-elevated-hover) 50%, var(--card-elevated) 100%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.4s ease-in-out infinite;
  border-radius: 18px;
  color: transparent;
  filter: none;
}
html.icons-loading.icons-fading .brand-logo {
  animation: none;
  background: transparent;
}
@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.status-msg {
  font-size: 13px;
  color: var(--success);
  text-align: center;
  margin-top: 12px;
  min-height: 20px;
  font-weight: 500;
  display: flex; align-items: center; justify-content: center;
  gap: 5px;
  opacity: 0; transform: translateY(4px);
  transition: all 0.3s ease;
}
.status-msg.show { opacity: 1; transform: translateY(0); }
.status-msg .material-symbols-rounded { font-size: 16px; }

/* PWA INSTALL BANNERS */
.install-banner { position: relative; display: none; background: linear-gradient(135deg, var(--results-bg-from) 0%, var(--results-bg-to) 100%); border: 1px solid var(--accent-highlight-border); border-radius: var(--radius-sm); padding: 16px 32px 16px 14px; margin-top: 18px; align-items: center; justify-content: space-between; gap: 12px; animation: resultReveal 0.45s cubic-bezier(0.16, 1, 0.3, 1) both; }
.install-banner-dismiss {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-family: inherit;
  transition: background 0.15s ease, color 0.15s ease;
  z-index: 2;
}
.install-banner-dismiss:hover {
  background: var(--accent-highlight);
  color: var(--text);
}
.install-banner-dismiss .material-symbols-rounded {
  font-size: 16px;
  font-variation-settings: 'FILL' 0, 'wght' 500;
}
.install-banner.show { display: flex; }
.install-banner-text { font-size: 13px; color: var(--text-secondary); font-weight: 500; display: flex; align-items: center; gap: 6px; line-height: 1.3; flex: 1; padding-right: 8px; }
.install-banner-text .material-symbols-rounded { font-size: 18px; color: var(--gold); flex-shrink: 0; }
.btn-install { background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-dark) 100%); color: #0b0b12; border: none; border-radius: 5px; padding: 9px 16px; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 5px; transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: var(--shadow-sm); font-family: inherit; margin-left: auto; }
.btn-install:active { transform: scale(0.95); }
.btn-install .material-symbols-rounded { font-size: 16px; font-variation-settings: 'FILL' 1; }

.install-ios { position: relative; display: none; background: linear-gradient(135deg, var(--results-bg-from) 0%, var(--results-bg-to) 100%); border: 1px solid var(--accent-highlight-border); border-radius: var(--radius-sm); padding: 16px 14px 14px; padding-right: 32px; margin-top: 18px; animation: resultReveal 0.45s cubic-bezier(0.16, 1, 0.3, 1) both; }
.install-ios.show { display: block; }
.install-ios-title { font-size: 13px; color: var(--text-heading); font-weight: 700; display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.install-ios-title .material-symbols-rounded { font-size: 18px; color: var(--gold); }
.install-ios-body { font-size: 12px; color: var(--text-secondary); line-height: 1.6; }
.install-ios-body .material-symbols-rounded { font-size: 15px; color: var(--gold); vertical-align: middle; margin: 0 2px; }
.install-ios-close { background: transparent; border: 1px solid var(--border-strong); color: var(--text-muted); font-size: 11px; font-weight: 600; padding: 5px 10px; border-radius: 5px; cursor: pointer; margin-top: 10px; font-family: inherit; }

/* FOOTER */
footer { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--border); text-align: center; }
.contact-name { font-size: 17px; font-weight: 700; color: var(--text-heading); margin-bottom: 2px; }
.contact-sub { font-size: 13px; color: var(--text-secondary); margin-bottom: 14px; }
.direct-links { display: flex; justify-content: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.direct-links a { display: inline-flex; align-items: center; gap: 6px; color: var(--gold-text); text-decoration: none; font-size: 13px; font-weight: 700; background: var(--accent-highlight); border: 1px solid var(--accent-highlight-border); padding: 8px 14px; border-radius: 5px; transition: all 0.2s; }
.direct-links a:active { background: var(--accent-highlight-strong); transform: scale(0.97); }
.direct-links .material-symbols-rounded { font-size: 16px; }
.social-row { display: flex; justify-content: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; padding: 0 4px; }
.social-btn { font-size: 12px; font-weight: 600; color: var(--text-muted); text-decoration: none; padding: 7px 12px; background: var(--social-bg); border: 1px solid var(--border); border-radius: 4px; transition: all 0.2s; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.social-btn:active { color: var(--text); border-color: var(--gold); background: var(--social-active-bg); }
.social-btn .material-symbols-rounded { font-size: 15px; }
.contact-addr { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; justify-content: center; gap: 5px; text-decoration: none; transition: color 0.2s; }
.contact-addr .material-symbols-rounded { font-size: 14px; }
.maps-link { margin-top: 2px; padding: 6px 12px; border-radius: 4px; background: var(--maps-bg); border: 1px solid transparent; }
.maps-link:active { color: var(--gold-text); background: var(--accent-highlight); border-color: var(--accent-highlight-border); }
.maps-link .maps-icon { font-size: 15px; color: var(--gold); opacity: 0.85; }

.disclaimer { font-size: 11px; color: var(--disclaimer); text-align: center; line-height: 1.5; margin-top: 20px; padding: 0 6px; }

/* ============================================ */
/* HELP MODAL                                   */
/* ============================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--modal-backdrop);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}
.modal {
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  max-height: 85dvh;
  background: linear-gradient(180deg, var(--card-bg-from) 0%, var(--card-bg-to) 100%);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: var(--modal-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.94) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-backdrop.open .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
}
.modal-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--accent), transparent);
  opacity: 0.6;
}
.modal-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-title .material-symbols-rounded {
  font-size: 22px;
  color: var(--gold);
  font-variation-settings: 'FILL' 1;
}
.modal-close {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  border-radius: 50%;
  background: var(--card-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-family: inherit;
  padding: 0;
  flex-shrink: 0;
  box-sizing: border-box;
}
@media (hover: hover) and (pointer: fine) {
  .modal-close:hover {
    background: var(--card-elevated-hover);
    color: var(--text);
    border-color: var(--gold);
    transform: scale(1.08);
  }
}
.modal-close:active { 
  transform: scale(0.95); 
  background: var(--card-elevated-hover);
  color: var(--text);
  border-color: var(--gold);
}
.modal-close .material-symbols-rounded { font-size: 20px; }

.modal-body {
  padding: 22px 24px 8px;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}
.modal-body::-webkit-scrollbar { width: 8px; }
.modal-body::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 4px; }

.help-section {
  margin-bottom: 22px;
}
.help-section:last-child {
  margin-bottom: 10px;
}
.help-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.2px;
}
.help-section-title .material-symbols-rounded {
  font-size: 18px;
  color: var(--gold);
  font-variation-settings: 'FILL' 1;
}
.help-section p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 8px;
}
.help-section p:last-child {
  margin-bottom: 0;
}
.help-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.help-list li {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  padding: 6px 0 6px 22px;
  position: relative;
}
.help-list li::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 14px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.85;
}
.help-list li strong {
  color: var(--text);
  font-weight: 600;
}

.modal-footer {
  padding: 16px 24px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: center;
}
.modal-got-it {
  width: 100%;
  max-width: 200px;
  height: 48px;
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-dark) 100%);
  color: #0b0b12;
  border: none;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
}
.modal-got-it:hover { transform: translateY(-1px); }
.modal-got-it:active { transform: scale(0.97); }
.modal-got-it .material-symbols-rounded { font-size: 18px; font-variation-settings: 'FILL' 1; }

/* CONFIRM MODAL */
.confirm-modal {
  max-width: 400px;
  border: 1px solid var(--border-strong);
}
.confirm-body {
  text-align: center;
  padding: 24px 20px 10px;
}
.confirm-body p {
  font-size: 15px;
  color: var(--text);
  margin-bottom: 8px;
  font-weight: 500;
  line-height: 1.5;
}
.confirm-body .confirm-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 0;
}
.confirm-footer {
  display: flex;
  gap: 12px;
  justify-content: center;
  padding: 16px 20px 24px;
}
.btn-modal-cancel,
.btn-modal-confirm {
  flex: 1;
  height: 48px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}
.btn-modal-cancel {
  background: var(--card-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
}
.btn-modal-cancel:hover {
  background: var(--card-elevated-hover);
  color: var(--text);
}
.btn-modal-confirm {
  background: #ef4444;
  border: 1px solid #ef4444;
  color: #ffffff;
  box-shadow: 0 4px 14px -4px rgba(239, 68, 68, 0.4);
}
.btn-modal-confirm:hover {
  background: #dc2626;
  border-color: #dc2626;
  transform: translateY(-1px);
}
.btn-modal-confirm:active,
.btn-modal-cancel:active {
  transform: scale(0.97);
}

/* ANIMATIONS */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes resultReveal { from { opacity: 0; transform: scale(0.96) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes softGlow {
  0%, 100% { box-shadow: 0 10px 28px -6px var(--accent-highlight-strong); }
  50% { box-shadow: 0 10px 32px -4px var(--accent-highlight-border); }
}
.btn-calc { animation: softGlow 3.2s ease-in-out infinite; }

.material-symbols-rounded { font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24; vertical-align: middle; }

/* SELECTION / CURSOR */
header, footer, .results-card, .monthly-label, .monthly-amount,
.breakdown-item, .breakdown-title, .breakdown-val, .status-msg,
.disclaimer, .contact-name, .contact-sub, .brand-dealership,
h1, .agent-title, .badge-experience, .select-trigger, .select-option,
label, .direct-links a, .social-btn, .contact-addr, .maps-link,
.install-banner, .install-banner-text, .install-ios,
.accordion-header, .accordion-count, .mode-toggle, .otd-row,
.breakdown-row, .btn-details, .days-quick-btn, .field-hint,
.modal-title, .help-section-title, .help-section p, .help-list li {
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}
.select-trigger, .select-option, .btn-calc, .btn-action,
.direct-links a, .social-btn, .maps-link, .contact-addr,
.btn-install, .install-ios-close, .accordion-header, .mode-toggle,
.btn-details, .btn-action-secondary, .days-quick-btn, .theme-toggle,
.help-toggle, .modal-close, .modal-got-it {
  cursor: pointer;
}
select, input, textarea { cursor: text; }
.status-msg, .status-msg * { cursor: default !important; user-select: none !important; }
.monthly-amount, .monthly-amount span, .breakdown-val, .breakdown-title, .monthly-label { cursor: default !important; user-select: none !important; }

/* SCROLLBAR */
.select-options::-webkit-scrollbar { 
  width: 6px; 
}
.select-options::-webkit-scrollbar-track { 
  background: transparent; 
}
.select-options::-webkit-scrollbar-thumb { 
  background: var(--scrollbar-thumb); 
  border-radius: 3px; 
}

/* RESPONSIVE - DESKTOP */
@media (min-width: 900px) {
  .btn-sms {
    display: none;
  }
  body {
    padding: 40px 20px 60px;
    align-items: flex-start;
  }

  .container {
    max-width: 900px;
    padding: 34px 36px 36px;
  }

  header {
    margin-bottom: 26px;
    padding-bottom: 22px;
  }

  .brand-logo {
    width: 84px;
    height: 84px;
    margin-bottom: 16px;
  }

  h1 { font-size: 30px; }
  .agent-title { font-size: 15px; }

  .main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: start;
  }

  .form-column { min-width: 0; }

  .results-column {
    min-width: 0;
    position: sticky;
    top: 20px;
  }

  .simple-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .simple-fields-grid .form-group { margin-bottom: 0; }
  .simple-fields-grid .form-group.full-width { grid-column: 1 / -1; }
  .simple-fields-grid .row { display: contents; }
  .simple-fields-grid .row .form-group { margin-bottom: 0; }

  .results-card { margin-top: 0; }
  .monthly-amount { font-size: 48px; }

  footer {
    margin-top: 34px;
    padding-top: 26px;
  }

  .install-banner,
  .install-ios { margin-top: 14px; }

  .results-column .results-card {
    position: sticky;
    top: 20px;
  }

  .action-buttons .btn-action {
    height: 52px;
    font-size: 14px;
  }

  .advanced-section { margin-bottom: 20px; }

  .modal { max-width: 620px; }
  .modal-body { padding: 26px 32px 10px; }
  .modal-header { padding: 24px 32px 20px; }
  .modal-footer { padding: 18px 32px 26px; }
  .help-section-title { font-size: 15px; }
  .help-section p, .help-list li { font-size: 14px; }
}

@media (min-width: 1100px) {
  .container {
    max-width: 980px;
    padding: 38px 44px 42px;
  }

  .simple-fields-grid { gap: 16px; }
  .main-content { gap: 32px; }
}

/* RESPONSIVE - TABLET */
@media (min-width: 640px) and (max-width: 899px) {
  .container {
    max-width: 600px;
    padding: 30px 28px 34px;
  }
}

/* ============================================ */
/* CHECKBOX TOGGLE                              */
/* ============================================ */
.toggle-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  padding: 4px 0;
  margin-bottom: 0;
}
.toggle-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.toggle-checkbox-box {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 2px solid var(--border-strong);
  background: var(--card-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  position: relative;
}
.toggle-checkbox input[type="checkbox"]:checked + .toggle-checkbox-box {
  background: var(--gold);
  border-color: var(--gold);
}
.toggle-checkbox input[type="checkbox"]:checked + .toggle-checkbox-box::after {
  content: '✓';
  color: #0b0b12;
  font-weight: 900;
  font-size: 13px;
  line-height: 1;
}
.toggle-checkbox:hover .toggle-checkbox-box {
  border-color: var(--gold);
}
.toggle-checkbox-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ============================================ */
/* FINANCE / LEASE SEGMENTED TOGGLE             */
/* ============================================ */
.calc-mode-toggle {
  display: flex;
  gap: 4px;
  background: var(--card-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 16px;
  position: relative;
}
.calc-mode-toggle::before {
  content: '';
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 8px - 4px) / 2);
  border-radius: 4px;
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-dark) 100%);
  box-shadow: 0 4px 14px -4px rgba(212, 175, 55, 0.5);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateX(0);
  z-index: 0;
  pointer-events: none;
}
.calc-mode-toggle[data-active="lease"]::before {
  transform: translateX(calc(100% + 4px));
}
.calc-mode-btn {
  flex: 1;
  height: 44px;
  background: transparent;
  border: none;
  border-radius: 5px;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  z-index: 1;
  padding: 0 10px;
}
.calc-mode-btn .material-symbols-rounded {
  font-size: 18px;
  font-variation-settings: 'FILL' 0, 'wght' 500;
  transition: font-variation-settings 0.3s ease;
}
.calc-mode-btn:hover {
  color: var(--text);
}
.calc-mode-btn .material-symbols-rounded.icon-spin {
  animation: modeIconSpin 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modeIconSpin {
  0%   { transform: rotate(0deg) scale(1); }
  50%  { transform: rotate(180deg) scale(1.25); }
  100% { transform: rotate(360deg) scale(1); }
}
.calc-mode-btn.active {
  color: #0b0b12;
}
.calc-mode-btn.active .material-symbols-rounded {
  font-variation-settings: 'FILL' 1, 'wght' 600;
}

/* SAFE AREA (iPhone notch / home indicator) */
html {
  padding-top: env(safe-area-inset-top, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
}
body {
  min-height: calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
}

/* KEYBOARD FOCUS RING */
.select-trigger:focus-visible,
.accordion-header:focus-visible,
.mode-toggle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

/* ============================================ */
/* PAYOFF STATUS BADGE                          */
/* ============================================ */
.payoff-status {
  display: none;
  margin-top: 7px;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  align-items: center;
  gap: 5px;
  line-height: 1.3;
}
.payoff-status.valid,
.payoff-status.expired {
  display: flex;
}
.payoff-status.valid {
  color: var(--success-soft);
  background: rgba(52, 211, 153, 0.10);
  border: 1px solid rgba(52, 211, 153, 0.30);
}
.payoff-status.expired {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.10);
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.payoff-status .material-symbols-rounded {
  font-size: 15px;
  font-variation-settings: 'FILL' 1;
}

html[data-theme="light"] .payoff-status.valid {
  color: #059669;
  background: rgba(16, 185, 129, 0.10);
  border-color: rgba(16, 185, 129, 0.30);
}
html[data-theme="light"] .payoff-status.expired {
  color: #b45309;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
}

/* Date input: match other fields on iOS / Safari */
input[type="date"] {
  color-scheme: dark;
}
html[data-theme="light"] input[type="date"] {
  color-scheme: light;
}
input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.7;
  filter: invert(0);
}
html[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(1.2);
}
input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

/* ============================================================
   OPTIONAL QUICK-PICK STYLES - HIDDEN BY DEFAULT
   ============================================================
   These styles support the optional "Quick Pick" feature.

   To enable:
   1. Replace the placeholder models in the HTML block below.
   2. Uncomment the CSS block here.
   3. Uncomment the JS block at the bottom of the script.
   4. Update service-worker.js CACHE_NAME.

   See the HTML comment near the form for the full checklist.
   ============================================================ */
/*
.quick-pick { position: relative; margin-top: 8px; }
.quick-pick-trigger {
  width: 100%; height: 40px;
  background: var(--card-elevated);
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 12px; font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  gap: 6px;
  font-family: inherit;
  transition: all 0.2s;
}
.quick-pick-trigger:hover { background: var(--card-elevated-hover); color: var(--text); border-style: solid; }
.quick-pick-trigger.open { border-color: var(--gold); color: var(--gold); border-style: solid; }
.quick-pick-trigger .material-symbols-rounded { font-size: 16px; color: var(--gold); }
.quick-pick-arrow { transition: transform 0.3s; }
.quick-pick-trigger.open .quick-pick-arrow { transform: rotate(180deg); }
.quick-pick-options {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--dropdown-bg);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: 0 20px 40px -8px rgba(0,0,0,0.5);
  overflow: hidden;
  z-index: 50;
  opacity: 0; visibility: hidden;
  transform: translateY(-8px) scale(0.97);
  transform-origin: top center;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 240px; overflow-y: auto;
}
.quick-pick-options.open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.quick-pick-option {
  padding: 11px 14px;
  font-size: 13px; font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}
.quick-pick-option:last-child { border-bottom: none; }
.quick-pick-option:hover { background: var(--accent-highlight); color: var(--text); }
.quick-pick-option strong { color: var(--gold-text); font-weight: 700; font-size: 13px; }
*/

/* ============================================ */
/* CLEAR BUTTON (x) INSIDE INPUTS               */
/* ============================================ */
.clearable-wrap { position: relative; }
.clearable-wrap input[type="number"],
.clearable-wrap input[type="text"],
.clearable-wrap input[type="tel"],
.clearable-wrap input[type="date"] {
  padding-right: 40px;
}
.clear-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-family: inherit;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.clear-btn .material-symbols-rounded {
  font-size: 18px;
  font-variation-settings: 'FILL' 0, 'wght' 500;
}
.clear-btn:hover {
  background: var(--accent-highlight);
  color: var(--text);
}
.clear-btn:active { transform: translateY(-50%) scale(0.9); }
.clear-btn.show { display: flex; }

/* ============================================ */
/* ADDITIONS: tax toggles, warnings, select     */
/* ============================================ */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23999' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}
.taxable-toggle,
.rebate-tax-toggle {
  min-height: 44px;
  margin-top: 2px;
}

/* Master Switch Highlight */
.master-switch-group {
  background: var(--accent-highlight);
  border: 1px solid var(--accent-highlight-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-top: 16px;
}
.master-switch-group .toggle-checkbox-label {
  font-weight: 700;
  color: var(--text);
}
.taxable-toggle .toggle-checkbox-label,
.rebate-tax-toggle .toggle-checkbox-label {
  font-size: 12px;
  color: var(--text-secondary);
}
.taxable-toggle input:disabled ~ .toggle-checkbox-box,
.taxable-toggle input:disabled ~ .toggle-checkbox-label {
  opacity: 0.4;
}
.warn-hint,
.ltv-warning {
  color: #f59e0b;
}
.warn-hint .material-symbols-rounded {
  color: #f59e0b;
  opacity: 1;
}
.ltv-warning {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 12px 0 0;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  background: rgba(245, 158, 11, 0.10);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 10px;
}
.ltv-warning .material-symbols-rounded {
  font-size: 16px;
  font-variation-settings: 'FILL' 1;
}
