/* ========================================
   Assistente de Cálculos Judiciais - Wizard
   Design System & Global Styles v3
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=Lora:ital,wght@0,400;0,600;0,700;1,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap');

/* ── Design Tokens ── */
:root {
  --color-primary: #0F3C4B;
  --color-primary-hover: #0c2f3b;
  --color-primary-light: rgba(15, 60, 75, 0.06);
  --color-primary-10: rgba(15, 60, 75, 0.10);
  --color-primary-20: rgba(15, 60, 75, 0.20);
  --color-background: #F4F3F0;
  --color-surface: #FFFFFF;
  --color-text: #1C1917;
  --color-muted: #78716C;
  --color-accent: #C2410C;
  --color-success: #15803D;
  --color-success-hover: #116c33;
  --color-border: #D6D3D1;
  --color-border-light: rgba(214, 211, 209, 0.5);
  --font-headings: 'Lora', serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --radius: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-tooltip: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-up: 0 -2px 4px rgba(0,0,0,0.04);
  --transition: 200ms ease;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-background);
  color: var(--color-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headings);
  font-weight: 700;
}

::selection { background: var(--color-primary-20); }

/* ── Material Symbols ── */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  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-feature-settings: 'liga';
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

/* ═══════════════════════════════════════
   LAYOUT SHELL
   ═══════════════════════════════════════ */

/* ── Header ── */
.app-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 0 2rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.app-header__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.app-header__icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-md);
  background: var(--color-primary-10);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-primary);
}

.app-header__title {
  font-family: var(--font-headings);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.01em;
}

.app-header__process {
  font-size: 0.8125rem;
  color: var(--color-muted);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* ── Stepper ── */
.stepper {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 0 2rem;
}

.stepper__list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  max-width: 760px;
  margin: 0 auto;
  list-style: none;
  padding: 0.625rem 0;
}

.stepper__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.375rem 0;
}

.stepper__item::after {
  content: '';
  display: block;
  width: 48px;
  height: 1px;
  background: var(--color-border);
  margin: 0 0.75rem;
}

.stepper__item:last-child::after { display: none; }
.stepper__item.completed::after { background: var(--color-primary); }

.stepper__dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: all var(--transition);
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-muted);
}

.stepper__item.active .stepper__dot {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: var(--color-surface);
}

.stepper__item.completed .stepper__dot {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: var(--color-surface);
}

.stepper__label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-muted);
  white-space: nowrap;
  transition: color var(--transition);
}

.stepper__item.active .stepper__label { color: var(--color-primary); font-weight: 700; }
.stepper__item.completed .stepper__label { color: var(--color-primary); }

/* ═══════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════ */

.wizard-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 2rem 5rem;
}

.wizard-card {
  width: 100%;
  max-width: 720px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow-card);
}

.wizard-card--wide { max-width: 960px; }

.wizard-card--full {
  max-width: none;
  width: 100%;
  padding: 1.5rem;
  border-radius: 0;
  border-left: none;
  border-right: none;
}

/* ── Step Headers ── */
.step-header {
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-border-light);
}

.step-header__title {
  font-size: 1.75rem;
  color: var(--color-text);
  margin-bottom: 0.375rem;
  line-height: 1.2;
}

.step-header__desc {
  font-size: 0.875rem;
  color: var(--color-muted);
  line-height: 1.6;
}

/* ═══════════════════════════════════════
   FORM ELEMENTS
   ═══════════════════════════════════════ */

.form-group { display: flex; flex-direction: column; gap: 0.375rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }

.form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text);
  display: flex; align-items: center; gap: 0.25rem;
}

.form-label__required { color: var(--color-accent); }

.input-wrapper { position: relative; }

.input-wrapper__icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-muted);
  pointer-events: none;
}

.form-input {
  width: 100%;
  height: 44px;
  padding: 0 0.875rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: all var(--transition);
  outline: none;
}

.form-input--with-icon { padding-left: 2.5rem; }
.form-input:hover { border-color: var(--color-muted); }

.form-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.form-input--with-icon:focus { padding-left: 2.5rem; }
.form-input::placeholder { color: var(--color-muted); opacity: 0.7; }

.form-helper {
  font-size: 0.75rem;
  color: var(--color-muted);
  line-height: 1.4;
}

.form-input.error { border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(194, 65, 12, 0.08); }

/* ═══════════════════════════════════════
   CALC TYPE CARDS (Step 2)
   ═══════════════════════════════════════ */

.calc-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.calc-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 1rem 0.75rem;
  height: 130px;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.calc-card:hover {
  border-color: var(--color-muted);
  background: rgba(244, 243, 240, 0.4);
}

.calc-card.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.calc-card input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }

.calc-card__icon {
  font-size: 2rem;
  color: var(--color-muted);
  transition: color var(--transition);
}

.calc-card.selected .calc-card__icon { color: var(--color-primary); }

.calc-card__label {
  font-size: 0.875rem;
  font-weight: 700;
  color: #4a453f;
  transition: color var(--transition);
  line-height: 1.3;
}

.calc-card.selected .calc-card__label { color: var(--color-primary); }

.calc-card__sub {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--color-muted);
}

.calc-card.selected .calc-card__sub { color: rgba(15, 60, 75, 0.6); }

/* ── Info Box ── */
.info-box {
  background: var(--color-primary-light);
  border: 1px solid rgba(15, 60, 75, 0.12);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.info-box__icon { color: var(--color-primary); margin-top: 2px; font-variation-settings: 'FILL' 1; flex-shrink: 0; }
.info-box__title { font-weight: 600; color: var(--color-primary); margin-bottom: 0.125rem; font-size: 0.875rem; }
.info-box__text { font-size: 0.8125rem; color: #4a453f; line-height: 1.5; }

/* ═══════════════════════════════════════
   COLUMN BUILDER (Step 2)
   ═══════════════════════════════════════ */

.column-builder {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border-light);
}

.column-builder__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.column-builder__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-headings);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
}

.column-builder__list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.col-builder-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--color-background);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  transition: all var(--transition);
}

.col-builder-item:hover { border-color: var(--color-border); }

.col-builder-item--fixed {
  background: var(--color-primary-light);
  border-color: rgba(15, 60, 75, 0.1);
}

.col-builder-item--verba {
  background: rgba(194, 65, 12, 0.03);
  border-color: rgba(194, 65, 12, 0.1);
}

.col-builder-item__check { display: flex; align-items: center; }
.col-builder-item__check input[type="checkbox"] {
  width: 15px; height: 15px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.col-builder-item__icon { color: var(--color-primary); font-size: 18px; }

.col-builder-item__name {
  flex: 1;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text);
}

.col-builder-item__tag {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.125rem 0.5rem;
  border-radius: 100px;
  color: var(--color-primary);
  background: var(--color-primary-light);
}

.col-builder-item__tag--input { color: var(--color-success); background: rgba(21, 128, 61, 0.06); }
.col-builder-item__tag--calc { color: var(--color-accent); background: rgba(194, 65, 12, 0.06); }

.col-builder-item__type {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-muted);
  min-width: 18px;
  text-align: center;
}

.col-builder-item__pct {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.col-builder-pct-input {
  width: 56px;
  height: 28px;
  padding: 0 0.375rem;
  text-align: right;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--color-text);
  outline: none;
}

.col-builder-pct-input:focus { border-color: var(--color-primary); }

.col-builder-section {
  margin-top: 0.75rem;
  padding-top: 0.625rem;
  border-top: 1px dashed var(--color-border);
}

.col-builder-section h4 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-muted);
  margin-bottom: 0.375rem;
}

/* ═══════════════════════════════════════
   SECTION HEADERS (Step 3)
   ═══════════════════════════════════════ */

.section-title {
  font-family: var(--font-headings);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  border-left: 3px solid var(--color-primary);
  padding-left: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-sections { display: flex; flex-direction: column; gap: 2rem; }
.form-section { display: flex; flex-direction: column; gap: 1.25rem; }
.section-divider { border: none; border-top: 1px solid var(--color-border-light); }

/* ── Radio Cards (Correction Index) ── */
.radio-cards { display: flex; gap: 1rem; }

.radio-card {
  flex: 1;
  display: flex;
  align-items: flex-start;
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
}

.radio-card:hover { background: var(--color-background); }
.radio-card.selected { border-color: var(--color-primary); background: var(--color-primary-light); }

.radio-card input[type="radio"] {
  width: 16px; height: 16px;
  accent-color: var(--color-primary);
  margin-top: 2px;
  flex-shrink: 0;
}

.radio-card__content { margin-left: 0.75rem; display: flex; flex-direction: column; }
.radio-card__label { font-size: 0.9375rem; font-weight: 600; color: var(--color-text); }
.radio-card__desc { font-size: 0.75rem; color: var(--color-muted); margin-top: 0.125rem; line-height: 1.4; }

/* ── Tooltip ── */
.tooltip-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tooltip-trigger__icon {
  color: var(--color-accent);
  cursor: help;
  font-size: 18px;
  font-variation-settings: 'FILL' 1;
  transition: color var(--transition);
}

.tooltip-trigger__icon:hover { color: #9a330a; }

.tooltip-content {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  width: 240px;
  background: var(--color-text);
  color: white;
  font-size: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-tooltip);
  text-align: center;
  line-height: 1.5;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease-in-out;
  pointer-events: none;
  z-index: 100;
}

.tooltip-content::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--color-text);
}

.tooltip-trigger:hover .tooltip-content,
.tooltip-trigger:focus-within .tooltip-content {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ── Legal Notice Box ── */
.legal-notice {
  padding: 1rem;
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.legal-notice p { font-size: 0.8125rem; line-height: 1.6; }

.legal-warning {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.5rem;
  color: var(--color-accent);
  font-weight: 600;
  font-size: 0.8125rem;
}

.legal-warning .material-symbols-outlined { font-size: 16px; }

/* ── Verbas Config (Step 3) ── */
.verbas-config-list {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.verba-config-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: var(--color-background);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  transition: all var(--transition);
}

.verba-config-row:hover { border-color: var(--color-border); }

.verba-config-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
}

.verba-config-check input[type="checkbox"] {
  width: 15px; height: 15px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.verba-config-pct {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--color-muted);
}

/* ── Item Count Control (desapropriações) ── */
.item-count-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--color-background);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
}

/* ═══════════════════════════════════════
   DATA GRID (Step 4)
   ═══════════════════════════════════════ */

.data-grid-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: auto;
  max-height: 560px;
}

/* Custom scrollbar for the grid container */
.data-grid-container::-webkit-scrollbar { width: 6px; height: 8px; }
.data-grid-container::-webkit-scrollbar-track { background: var(--color-background); border-radius: 4px; }
.data-grid-container::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 4px; }
.data-grid-container::-webkit-scrollbar-thumb:hover { background: var(--color-muted); }

.data-grid__header {
  display: flex;
  background: var(--color-background);
  border-bottom: 2px solid var(--color-border);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.data-grid__header-cell {
  padding: 0.625rem 0.5rem;
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-right: 1px solid var(--color-border-light);
  min-width: 90px;
  white-space: normal;
  word-break: break-word;
  line-height: 1.4;
}

.data-grid__header-cell:first-child {
  width: 90px; min-width: 90px; flex-shrink: 0;
  text-align: left;
  position: sticky;
  left: 0;
  z-index: 3;
  background: var(--color-background);
  box-shadow: 2px 0 4px rgba(0,0,0,0.06);
}

.data-grid__header-cell:not(:first-child) { flex: 1; text-align: right; }

.data-grid__header-cell:last-child {
  border-right: none;
  color: var(--color-primary);
  background: var(--color-primary-light);
  font-weight: 700;
}

.data-grid__body {
  flex: 1;
}

/* Year Separator */
.data-grid__year-sep {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.1875rem 0;
  background: var(--color-primary-light);
  border-bottom: 1px solid rgba(15, 60, 75, 0.12);
}

.data-grid__year-sep span {
  font-family: var(--font-headings);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.04em;
}

/* Rows */
.data-grid__row {
  display: flex;
  border-bottom: 1px solid var(--color-border-light);
  transition: background var(--transition);
}

.data-grid__row:hover { background: rgba(244, 243, 240, 0.5); }
.data-grid__row:nth-child(even) { background: rgba(244, 243, 240, 0.25); }
.data-grid__row:nth-child(even):hover { background: rgba(244, 243, 240, 0.6); }

/* Cells */
.data-grid__cell {
  padding: 0.375rem 0.5rem;
  display: flex;
  align-items: center;
  font-size: 0.8125rem;
  border-right: 1px solid var(--color-border-light);
  min-width: 90px;
  font-variant-numeric: tabular-nums;
}

.data-grid__cell:first-child {
  width: 90px; min-width: 90px; flex-shrink: 0;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--color-muted);
  background: rgba(244, 243, 240, 0.9);
  position: sticky;
  left: 0;
  z-index: 2;
  box-shadow: 2px 0 4px rgba(0,0,0,0.06);
}

.data-grid__cell:not(:first-child) { flex: 1; justify-content: flex-end; }

.data-grid__cell:last-child {
  border-right: none;
  font-weight: 600;
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.data-grid__cell--calc { color: var(--color-muted); }

.data-grid__cell input {
  width: 100%;
  border: none;
  background: transparent;
  text-align: right;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
  padding: 0.1875rem 0;
  outline: none;
  transition: all var(--transition);
}

.data-grid__cell input:focus {
  background: rgba(15, 60, 75, 0.03);
  border-left: 2px solid var(--color-primary);
  padding-left: 0.375rem;
}

.data-grid__cell input::placeholder { color: var(--color-border); }

/* Summary Row */
.data-grid__summary {
  display: flex;
  background: var(--color-surface);
  border-top: 2px solid var(--color-primary);
  flex-shrink: 0;
  box-shadow: var(--shadow-up);
  position: sticky;
  bottom: 0;
  z-index: 10;
}

.data-grid__summary-cell {
  padding: 0.625rem 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  min-width: 90px;
  font-variant-numeric: tabular-nums;
}

.data-grid__summary-cell:first-child {
  width: 90px; min-width: 90px; flex-shrink: 0;
  justify-content: flex-end;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.6875rem;
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--color-surface);
  box-shadow: 2px 0 4px rgba(0,0,0,0.06);
}

.data-grid__summary-cell:not(:first-child) { flex: 1; justify-content: flex-end; }

.data-grid__summary-cell:last-child {
  background: var(--color-primary-10);
  color: var(--color-primary);
  font-size: 0.875rem;
}

/* ═══════════════════════════════════════
   REVIEW LAYOUT (Step 5)
   ═══════════════════════════════════════ */

.review-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.review-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

.review-panel__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

.review-panel__header .material-symbols-outlined { color: var(--color-primary); font-size: 20px; }
.review-panel__header h3 { font-size: 1rem; }

.review-list { list-style: none; display: flex; flex-direction: column; gap: 1rem; }

.review-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-left: 0.75rem;
}

.review-item--bordered { border-left: 2px solid var(--color-primary); }

.review-item--separated {
  padding-top: 0.75rem;
  border-top: 1px dashed var(--color-border-light);
}

.review-item__label { font-size: 0.8125rem; font-weight: 500; color: var(--color-muted); }
.review-item__value { font-size: 0.9375rem; font-weight: 600; color: var(--color-text); }
.review-item__value--mono { font-family: 'IBM Plex Sans', monospace; letter-spacing: 0.02em; }

/* ── Financial Summary ── */
.financial-panel { display: flex; flex-direction: column; gap: 1rem; }

.financial-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.financial-card__title {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-muted);
  margin-bottom: 1.5rem;
}

.financial-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border-light);
  margin-bottom: 0.75rem;
}

.financial-row:last-of-type { border-bottom: none; margin-bottom: 0; padding-top: 0.75rem; }

.financial-row__label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-muted);
  display: flex; align-items: center; gap: 0.25rem;
}

.financial-row__label .material-symbols-outlined { font-size: 14px; }

.financial-row__value {
  font-family: var(--font-headings);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
}

.financial-row--total {
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 2px solid var(--color-primary);
  border-bottom: none;
}

.financial-row--total .financial-row__label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
}

.financial-row--total .financial-row__value {
  font-size: 2rem;
  color: var(--color-primary);
}

/* ═══════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  outline: none;
}

.btn:focus-visible {
  box-shadow: 0 0 0 2px var(--color-background), 0 0 0 4px var(--color-primary);
}

.btn--primary {
  padding: 0.5rem 1.75rem;
  height: 40px;
  background: var(--color-primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover { background: var(--color-primary-hover); }
.btn--primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn--secondary {
  padding: 0.5rem 1.25rem;
  height: 40px;
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

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

.btn--ghost {
  padding: 0.5rem 1.25rem;
  height: 40px;
  background: transparent;
  color: var(--color-muted);
}

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

.btn--small {
  padding: 0.25rem 0.625rem;
  font-size: 0.6875rem;
  height: 28px;
}

.btn--success {
  width: 100%;
  height: 48px;
  background: var(--color-success);
  color: white;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.btn--success:hover { background: var(--color-success-hover); }
.btn--success:disabled { opacity: 0.7; cursor: not-allowed; }

.btn--success .spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.btn .material-symbols-outlined { font-size: 16px; }

.btn-help-text {
  font-size: 0.6875rem;
  text-align: center;
  color: var(--color-muted);
  margin-top: 0.375rem;
}

/* ═══════════════════════════════════════
   FOOTER NAVIGATION
   ═══════════════════════════════════════ */

.wizard-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 0.75rem 2rem;
  z-index: 50;
  box-shadow: var(--shadow-up);
}

.wizard-footer__inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ═══════════════════════════════════════
   STEP VISIBILITY & ANIMATION
   ═══════════════════════════════════════ */

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

.wizard-step--grid.active {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
}

.wizard-step--review.active {
  display: block;
  width: 100%;
  max-width: 960px;
}

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

/* ── KBD element ── */
kbd {
  display: inline-block;
  padding: 0.0625rem 0.375rem;
  font-size: 0.6875rem;
  font-family: var(--font-body);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-background);
  color: var(--color-muted);
  font-weight: 600;
}
