/* BarakahFi Zakat Calculator — Styles */

/* === RESET & VARIABLES === */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* Brand */
  --emerald: #059669;
  --emerald-50: #ecfdf5;
  --emerald-100: #d1fae5;
  --emerald-200: #a7f3d0;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-700: #047857;
  --emerald-800: #065f46;
  --emerald-900: #064e3b;

  --gold: #d4a017;
  --gold-50: #fefce8;
  --gold-100: #fef3c7;
  --gold-200: #fde68a;
  --gold-500: #eab308;
  --gold-600: #d4a017;

  /* Light theme (default) */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-input: #ffffff;
  --bg-input-focus: #ffffff;
  --border: #e2e8f0;
  --border-focus: #059669;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);

  /* Sizing */
  --max-width: 960px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 100px;
}

[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --bg-card: #1e293b;
  --bg-card-hover: #334155;
  --bg-input: #1e293b;
  --bg-input-focus: #334155;
  --border: #334155;
  --border-focus: #10b981;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0f172a;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.3);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.3);
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.4);
}

/* === BASE === */
html { scroll-behavior: smooth; }
body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5 { font-family: 'Space Grotesk', sans-serif; line-height: 1.2; }

/* === NAV === */
.calc-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
}
.calc-nav .logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--emerald-800);
  text-decoration: none;
  letter-spacing: -0.5px;
}
[data-theme="dark"] .calc-nav .logo { color: var(--emerald-200); }
.calc-nav .logo span { color: var(--gold); }
.nav-actions { display: flex; align-items: center; gap: 0.75rem; }

.theme-toggle {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  transition: all 0.2s;
  color: var(--text-secondary);
}
.theme-toggle:hover { border-color: var(--emerald); background: var(--bg-tertiary); }

.back-link {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  display: flex; align-items: center; gap: 0.35rem;
  transition: color 0.2s;
}
.back-link:hover { color: var(--emerald); }

.calc-nav-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  transition: all 0.2s;
  white-space: nowrap;
}
.calc-nav-link:hover {
  border-color: var(--emerald);
  color: var(--emerald);
  background: var(--emerald-50);
}

/* === SCREENS === */
.screen { display: none; max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem 4rem; }
.screen.active { display: block; }

/* === MODE SELECT SCREEN === */
.mode-hero {
  text-align: center;
  padding: 3rem 0 2.5rem;
}
.mode-hero h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  letter-spacing: -1.5px;
  margin-bottom: 0.75rem;
}
.mode-hero h1 em { font-style: normal; color: var(--emerald); }
.mode-hero p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 550px;
  margin: 0 auto;
}

.nisab-banner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  margin: 0 auto 2.5rem;
  max-width: 700px;
  display: flex;
  align-items: center;
  gap: 2rem;
  box-shadow: var(--shadow-sm);
}
.nisab-banner .nisab-item {
  flex: 1;
  text-align: center;
}
.nisab-banner .nisab-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}
.nisab-banner .nisab-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--emerald-700);
}
[data-theme="dark"] .nisab-banner .nisab-value { color: var(--emerald-200); }
.nisab-banner .nisab-detail {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}
.nisab-divider {
  width: 1px;
  height: 50px;
  background: var(--border);
}
.nisab-loading {
  text-align: center;
  padding: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.mode-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  max-width: 700px;
  margin: 0 auto 3rem;
}
.mode-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  cursor: pointer;
  transition: all 0.25s;
  text-align: left;
  position: relative;
  overflow: hidden;
}
.mode-card:hover {
  border-color: var(--emerald);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.mode-card .mode-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  background: var(--emerald-50);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
[data-theme="dark"] .mode-card .mode-icon { background: rgba(16,185,129,0.15); }
.mode-card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; letter-spacing: -0.3px; }
.mode-card p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; }
.mode-card .recommended {
  position: absolute;
  top: 1rem; right: 1rem;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--emerald);
  color: white;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

/* === WIZARD === */
.wizard-progress {
  padding: 2rem 0 1.5rem;
}
.progress-bar-wrap {
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  height: 6px;
  margin-bottom: 1rem;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--emerald), var(--emerald-500));
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}
.progress-steps {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}
.progress-step {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  text-align: center;
  flex: 1;
  transition: color 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.progress-step.active { color: var(--emerald); font-weight: 700; }
.progress-step.completed { color: var(--text-secondary); }

.wizard-step {
  display: none;
  animation: fadeSlideIn 0.35s ease;
}
.wizard-step.active { display: block; }

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.step-header {
  margin-bottom: 2rem;
}
.step-header .step-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.step-header h2 {
  font-size: 1.65rem;
  letter-spacing: -0.8px;
  margin-bottom: 0.4rem;
}
.step-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.step-tip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--gold-50);
  border: 1px solid var(--gold-200);
  color: var(--emerald-800);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  margin-top: 0.75rem;
}
[data-theme="dark"] .step-tip {
  background: rgba(212,160,23,0.1);
  border-color: rgba(212,160,23,0.25);
  color: var(--gold-200);
}

/* === FORM ELEMENTS === */
.form-grid {
  display: grid;
  gap: 1rem;
}
.form-grid-2 { grid-template-columns: 1fr 1fr; }
.form-grid-3 { grid-template-columns: 1fr 1fr 1fr; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.form-group .field-help {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: -0.1rem;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-wrap .currency-prefix {
  position: absolute;
  left: 0.85rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  pointer-events: none;
  z-index: 1;
}
.input-wrap input {
  padding-left: 2.2rem;
}

input[type="text"],
input[type="number"],
input[type="date"],
select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  font-size: 0.9rem;
  font-family: inherit;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-primary);
  transition: all 0.2s;
  outline: none;
}
input:focus, select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(5,150,105,0.12);
  background: var(--bg-input-focus);
}
input::placeholder { color: var(--text-muted); }

/* Number input arrows */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] { -moz-appearance: textfield; }

.toggle-group {
  display: flex;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.toggle-btn {
  flex: 1;
  padding: 0.55rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  background: var(--bg-input);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}
.toggle-btn:not(:last-child) { border-right: 1.5px solid var(--border); }
.toggle-btn.active {
  background: var(--emerald);
  color: white;
}

/* === CARDS & SECTIONS === */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 1rem; }

.asset-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 0.75rem;
}
.asset-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.asset-card-header h4 {
  font-size: 0.9rem;
  font-weight: 600;
}
.remove-btn {
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.remove-btn:hover { border-color: #ef4444; color: #ef4444; background: #fef2f2; }

.add-row-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.7rem;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--emerald);
  background: var(--emerald-50);
  border: 1.5px dashed var(--emerald-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
}
[data-theme="dark"] .add-row-btn {
  background: rgba(16,185,129,0.08);
  border-color: rgba(16,185,129,0.25);
}
.add-row-btn:hover { background: var(--emerald-100); border-color: var(--emerald); }

/* === WIZARD NAVIGATION === */
.wizard-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 0 2rem;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--emerald);
  color: white;
  border: none;
}
.btn-primary:hover { background: var(--emerald-700); }
.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover { border-color: var(--text-muted); background: var(--bg-tertiary); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 0.7rem 0.85rem;
}
.btn-ghost:hover { color: var(--text-primary); }

.btn-gold {
  background: var(--gold);
  color: white;
  border: none;
}
.btn-gold:hover { background: #b8860b; }

.btn-lg {
  padding: 0.85rem 2rem;
  font-size: 1rem;
}

.skip-btn {
  font-size: 0.82rem;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem 0;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.skip-btn:hover { color: var(--text-secondary); }

/* === RUNNING TOTAL SIDEBAR === */
.running-total {
  position: sticky;
  top: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-md);
}
.running-total h4 {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
}
.running-total-amount {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--emerald);
  margin-bottom: 0.25rem;
}
.running-total-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.running-total-items {
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}
.running-total-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0;
  font-size: 0.82rem;
}
.running-total-item .rt-label { color: var(--text-secondary); }
.running-total-item .rt-value { font-weight: 600; font-family: 'Space Grotesk', sans-serif; }
.running-total-item.non-zakatable .rt-value { color: var(--text-muted); text-decoration: line-through; }

/* === WIZARD LAYOUT === */
.wizard-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
  align-items: start;
}

/* === RESULTS DASHBOARD === */
.results-hero {
  text-align: center;
  padding: 2.5rem 0 2rem;
}
.results-hero .result-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}
.result-status.meets-nisab {
  background: var(--emerald-100);
  color: var(--emerald-800);
}
[data-theme="dark"] .result-status.meets-nisab {
  background: rgba(16,185,129,0.15);
  color: var(--emerald-200);
}
.result-status.below-nisab {
  background: var(--gold-100);
  color: #92400e;
}
[data-theme="dark"] .result-status.below-nisab {
  background: rgba(212,160,23,0.15);
  color: var(--gold-200);
}

.zakat-amount {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.5rem, 7vw, 4rem);
  font-weight: 700;
  color: var(--emerald);
  letter-spacing: -2px;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.zakat-amount.zero { color: var(--text-muted); }
.zakat-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
}

/* Summary stats row */
.results-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}
.result-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
}
.result-stat-card .stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 0.35rem;
}
.result-stat-card .stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Chart & breakdown layout */
.results-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
}
.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.chart-card h3 {
  font-size: 0.95rem;
  margin-bottom: 1rem;
  align-self: flex-start;
}
.chart-wrap {
  width: 260px;
  height: 260px;
}

.breakdown-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.breakdown-card h3 {
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.breakdown-table {
  width: 100%;
  border-collapse: collapse;
}
.breakdown-table th {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: left;
  padding: 0.6rem 0.5rem;
  border-bottom: 2px solid var(--border);
}
.breakdown-table th:last-child { text-align: right; }
.breakdown-table td {
  padding: 0.65rem 0.5rem;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border);
}
.breakdown-table td:last-child {
  text-align: right;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
}
.breakdown-table tr.total-row td {
  font-weight: 700;
  border-top: 2px solid var(--border);
  border-bottom: none;
  padding-top: 0.85rem;
}
.breakdown-table tr.total-row td:last-child {
  color: var(--emerald);
  font-size: 1rem;
}
.breakdown-table .non-zakatable {
  color: var(--text-muted);
}

/* Hawl countdown */
.hawl-card {
  background: linear-gradient(135deg, var(--emerald-900), var(--emerald-700));
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  color: white;
  margin: 2rem 0;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.hawl-days {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
}
.hawl-info h4 { font-size: 1rem; margin-bottom: 0.25rem; }
.hawl-info p { font-size: 0.85rem; opacity: 0.8; }

/* Result actions */
.results-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  padding: 1.5rem 0 2rem;
  flex-wrap: wrap;
}

/* === QUICK MODE === */
.quick-header {
  padding: 2rem 0 1.5rem;
}
.quick-header h1 {
  font-size: 1.75rem;
  letter-spacing: -0.8px;
  margin-bottom: 0.35rem;
}
.quick-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.quick-section {
  margin-bottom: 1rem;
}
.quick-section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  color: var(--text-primary);
}
.quick-section-toggle:hover { border-color: var(--emerald); }
.quick-section-toggle h3 {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 0.95rem;
}
.quick-section-toggle .section-total {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--emerald);
}
.quick-section-toggle .chevron {
  transition: transform 0.2s;
  color: var(--text-muted);
}
.quick-section.open .quick-section-toggle .chevron { transform: rotate(180deg); }

.quick-section-body {
  display: none;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}
.quick-section.open .quick-section-body { display: block; }
.quick-section.open .quick-section-toggle {
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  border-bottom-color: transparent;
}

/* Quick mode settings bar */
.quick-settings {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.quick-settings .setting-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.quick-settings label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Quick mode calculate button */
.quick-calculate-bar {
  position: sticky;
  bottom: 0;
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  padding: 1rem 0;
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.quick-total {
  font-family: 'Space Grotesk', sans-serif;
}
.quick-total .qt-label { font-size: 0.8rem; color: var(--text-muted); }
.quick-total .qt-value { font-size: 1.25rem; font-weight: 700; color: var(--emerald); }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .wizard-layout { grid-template-columns: 1fr; }
  .running-total { position: static; order: -1; }
  .mode-cards { grid-template-columns: 1fr; }
  .nisab-banner { flex-direction: column; gap: 1rem; }
  .nisab-divider { width: 100%; height: 1px; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .form-grid-3 { grid-template-columns: 1fr; }
  .results-grid { grid-template-columns: 1fr; }
  .progress-steps { display: none; }
  .results-actions { flex-direction: column; align-items: stretch; }
  .quick-settings { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .quick-calculate-bar { flex-direction: column; gap: 0.75rem; align-items: stretch; text-align: center; }
  .hawl-card { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .screen { padding: 0 1rem 3rem; }
  .results-stats { grid-template-columns: 1fr 1fr; }
}

/* === LOADING SPINNER === */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* === TOOLTIP === */
.tooltip-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 700;
  cursor: help;
  position: relative;
  margin-left: 0.35rem;
  flex-shrink: 0;
}
.tooltip-trigger:hover .tooltip-content {
  display: block;
}
.tooltip-content {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-primary);
  color: var(--text-inverse);
  font-size: 0.75rem;
  font-weight: 400;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  width: 220px;
  line-height: 1.4;
  z-index: 100;
  box-shadow: var(--shadow-lg);
}

/* Utility */
.text-muted { color: var(--text-muted); }
.text-emerald { color: var(--emerald); }
.text-gold { color: var(--gold); }
.font-mono { font-family: 'Space Grotesk', sans-serif; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }

/* Toast animation */
@keyframes slideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
