:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #667085;
  --border: #dfe7f1;
  --primary: #0066ff;
  --primary-dark: #0f3fa8;
  --green: #00a878;
  --private: #7c3aed;
  --danger: #dc2626;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.10);
  --radius: 26px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at 10% -10%, rgba(0, 102, 255, .16), transparent 36rem),
    radial-gradient(circle at 110% 0%, rgba(0, 168, 120, .14), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input, select, textarea { font: inherit; }
textarea { resize: vertical; }

.hidden { display: none !important; }

/* ─── Login ─────────────────────────────────────────────────────────────────── */

.login-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(430px, 100%);
  background: rgba(255,255,255,.94);
  border: 1px solid var(--border);
  border-radius: 30px;
  box-shadow: var(--shadow);
  padding: 34px;
}

.login-logo, .logo {
  display: block;
  max-width: 220px;
  height: auto;
}

.login-card h1, .panel h1 {
  margin: 20px 0 8px;
  letter-spacing: -.055em;
  line-height: .98;
}

.login-card p, .intro {
  color: var(--muted);
  line-height: 1.6;
}

.login-card label, .field {
  display: grid;
  gap: 8px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  margin-top: 16px;
}

.login-card input,
.field input,
.field select,
.field textarea {
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: white;
  padding: 0 14px;
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.field textarea {
  padding: 10px 14px;
  min-height: 80px;
}

.login-card input:focus,
.field input:focus,
.field select:focus,
.field textarea:focus,
.input-addon:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 102, 255, .10);
}

.login-card button, .primary {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 14px;
  background: var(--primary);
  color: white;
  font-weight: 900;
  margin-top: 18px;
  cursor: pointer;
  transition: background .15s;
}
.login-card button:hover, .primary:hover { background: #004fd6; }

#loginError {
  display: block;
  min-height: 20px;
  color: var(--danger);
  margin-top: 10px;
  font-size: 13px;
}

/* ─── App shell ─────────────────────────────────────────────────────────────── */

.app {
  min-height: 100dvh;
  width: min(1500px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 60px;
  display: flex;
  flex-direction: column;
}

/* ─── Topbar ─────────────────────────────────────────────────────────────────── */

.topbar {
  background: rgba(255,255,255,.88);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  box-shadow: 0 16px 45px rgba(15, 23, 42, .06);
  position: sticky;
  top: 12px;
  z-index: 10;
  backdrop-filter: blur(16px);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.status-pill {
  border-radius: 999px;
  background: #eef6ff;
  color: var(--primary-dark);
  border: 1px solid #d9e9ff;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 900;
}

nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-btn, .logout, .secondary, .ghost, .scenario-cards button {
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: white;
  color: #334155;
  padding: 0 16px;
  font-weight: 850;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}

.nav-btn:hover { background: #f1f5fb; }
.nav-btn.active { background: #0f172a; color: white; border-color: #0f172a; }
.nav-btn.private { color: var(--private); }
.logout { color: var(--danger); }
.logout:hover { background: #fff1f1; }

/* ─── Views ──────────────────────────────────────────────────────────────────── */

.view {
  display: none;
  margin-top: 20px;
  flex: 1;
}

.view.active { display: flex; flex-direction: column; }

/* ─── Wizard shell ────────────────────────────────────────────────────────────── */

.wizard-shell {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 20px;
  align-items: start;
  flex: 1;
}

.wizard {
  background: rgba(255,255,255,.82);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: 0 16px 45px rgba(15, 23, 42, .05);
  position: sticky;
  top: 108px;
}

.step {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  border-radius: 18px;
  color: #475569;
  cursor: pointer;
  transition: background .15s;
}
.step:hover { background: #f8fafc; }

.step span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #eef2f7;
  font-weight: 950;
  flex-shrink: 0;
}

.step small { display: block; color: var(--muted); margin-top: 2px; }

.step.active { background: #eef6ff; color: var(--primary-dark); }
.step.active span { background: var(--primary); color: white; }

.private-text { color: var(--private) !important; }

.builder {
  display: grid;
  gap: 16px;
}

/* ─── Panels ─────────────────────────────────────────────────────────────────── */

.panel {
  background: rgba(255,255,255,.94);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(20px, 3.5vw, 36px);
  box-shadow: 0 18px 50px rgba(15, 23, 42, .06);
}

.step-panel { display: none; }
.step-panel.active { display: block; }

.eyebrow {
  margin: 0 0 10px;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 12px;
  font-weight: 950;
}

.panel h1 { font-size: clamp(28px, 4.5vw, 52px); margin: 0 0 8px; letter-spacing: -.055em; line-height: .96; }
.panel h2 { font-size: clamp(20px, 2.5vw, 28px); margin: 0 0 12px; letter-spacing: -.04em; }

/* ─── Grid helpers ────────────────────────────────────────────────────────────── */

.grid { display: grid; gap: 14px; }
.grid.two   { grid-template-columns: repeat(2, 1fr); }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.compact { margin-top: 0; }
.field.large input, .field.large .input-addon { min-height: 60px; font-size: 22px; }

.input-addon {
  display: flex;
  align-items: center;
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}

.input-addon input { border: 0; border-radius: 0; box-shadow: none; flex: 1; min-width: 0; }
.input-addon:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(0,102,255,.10); }

.input-addon em {
  font-style: normal;
  align-self: stretch;
  padding: 0 13px;
  display: flex;
  align-items: center;
  border-left: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  background: #f8fafc;
}

.field small { color: var(--muted); font-weight: 600; font-size: 12px; }

/* ─── Scenario buttons ────────────────────────────────────────────────────────── */

.scenario-cards {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}

/* ─── Step 3: two-column layout ───────────────────────────────────────────────── */

.step3-panel {
  padding: 0;
  overflow: hidden;
}

.step3-layout {
  display: grid;
  grid-template-columns: 520px 1fr;
  gap: 0;
  min-height: 600px;
}

.step3-controls {
  padding: 22px 26px;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  max-height: calc(100dvh - 200px);
  position: sticky;
  top: 108px;
  align-self: start;
}

.step3-preview {
  padding: clamp(18px, 3vw, 32px);
  background: #f8fafc;
  align-self: stretch;
}

.step3-title {
  margin-bottom: 16px;
}

/* ─── Tariff presets ──────────────────────────────────────────────────────────── */

.tariff-presets {
  margin-bottom: 18px;
  position: relative;
}

.preset-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: white;
  border: 2px solid var(--primary);
  border-radius: 14px;
  color: var(--primary-dark);
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
  gap: 10px;
}

.preset-toggle:hover { background: rgba(0,102,255,.04); }
.preset-toggle:focus-visible { box-shadow: 0 0 0 4px rgba(0,102,255,.15); outline: none; }

.preset-toggle svg {
  flex-shrink: 0;
  transition: transform .2s;
}

.preset-toggle.open svg { transform: rotate(180deg); }

.preset-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  padding: 10px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

.preset-btn {
  flex: 1 1 calc(50% - 3px);
  padding: 8px 10px;
  background: #f1f5f9;
  border: 2px solid transparent;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: all .15s;
  text-align: center;
  white-space: nowrap;
}

.preset-btn:hover {
  background: rgba(0,102,255,.08);
  border-color: rgba(0,102,255,.3);
  color: var(--primary);
}

.preset-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* ─── Section divider ─────────────────────────────────────────────────────────── */

.section-divider {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  margin: 18px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

/* ─── Extras (toggle + qty) ───────────────────────────────────────────────────── */

.extras-grid { display: flex; flex-direction: column; gap: 12px; }

.extra-row {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  background: white;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.toggle-check { display: none; }

.toggle-switch {
  width: 42px;
  height: 24px;
  background: #dde3ec;
  border-radius: 999px;
  flex-shrink: 0;
  position: relative;
  transition: background .2s;
}

.toggle-switch::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform .2s;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}

.toggle-check:checked + .toggle-switch { background: var(--primary); }
.toggle-check:checked + .toggle-switch::after { transform: translateX(18px); }

.toggle-label strong { font-size: 13px; font-weight: 800; display: block; }
.toggle-label small  { font-size: 12px; color: var(--muted); display: block; margin-top: 2px; }

.extra-qty { margin-top: 10px; }

/* ─── Present button ──────────────────────────────────────────────────────────── */

.present-btn {
  width: 100%;
  min-height: 44px;
  margin-top: 20px;
  border: 2px solid #0066ff;
  border-radius: 14px;
  background: white;
  color: var(--primary);
  font-weight: 900;
  font-size: 14px;
  cursor: pointer;
  transition: all .15s;
}

.present-btn:hover,
.present-btn.active {
  background: var(--primary);
  color: white;
}

/* ─── Present banner ──────────────────────────────────────────────────────────── */

.present-banner {
  background: linear-gradient(90deg, #0066ff, #003d9f);
  color: white;
  border-radius: 16px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  font-weight: 700;
  font-size: 14px;
}

.present-banner button {
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 999px;
  background: rgba(255,255,255,.15);
  color: white;
  padding: 6px 14px;
  cursor: pointer;
  font-weight: 800;
  font-size: 13px;
}

/* ─── Client preview ──────────────────────────────────────────────────────────── */

.client-preview {
  background: white;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 8px 30px rgba(15,23,42,.07);
}

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

.pdf-header img { max-width: 160px; }
.pdf-header div { text-align: right; }
.pdf-header strong { display: block; font-size: 15px; color: var(--text); }
.pdf-header span { display: block; color: var(--muted); margin-top: 4px; font-size: 13px; }

.client-hero {
  color: white;
  background: linear-gradient(135deg, var(--primary), #003d9f);
  border-radius: 20px;
  padding: 22px;
  margin-bottom: 12px;
}

.client-hero span, .client-hero small { color: rgba(255,255,255,.82); font-size: 13px; }
.client-hero strong {
  display: block;
  margin: 8px 0;
  font-size: clamp(38px, 6vw, 68px);
  letter-spacing: -.07em;
  line-height: .95;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.result-grid div {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 13px;
}

.result-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  display: block;
}

.result-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 19px;
  letter-spacing: -.04em;
}

.example-insc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 10px 14px;
  margin-top: 8px;
  font-size: 13px;
}

.example-insc-row span { color: var(--primary); font-weight: 700; }
.example-insc-row strong { color: var(--primary-dark); font-size: 17px; font-weight: 800; }

.extra-preview-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f0fff8;
  border: 1px solid #bbf7e0;
  border-radius: 12px;
  padding: 10px 14px;
  margin-top: 8px;
  font-size: 13px;
}

.extra-preview-row span { color: var(--muted); font-weight: 700; }
.extra-preview-row strong { color: var(--green); font-size: 16px; }

.commercial-text {
  margin-top: 14px;
  color: #334155;
  line-height: 1.7;
  font-size: 13.5px;
}

.commercial-text p { margin: 0 0 10px; }
.commercial-text p:last-child { margin-bottom: 0; }

/* ─── Internal benefit section ────────────────────────────────────────────────── */

.benefits-config {
  margin-bottom: 18px;
}

.benefit-box {
  margin: 20px 0 14px;
  display: grid;
  grid-template-columns: 1.5fr .8fr;
  gap: 14px;
}

.benefit-box div {
  background: linear-gradient(135deg, #f4efff, #eef6ff);
  border: 1px solid #ded1ff;
  border-radius: 20px;
  padding: 20px;
}

.benefit-box span { color: var(--muted); font-size: 13px; font-weight: 850; display: block; }

.benefit-box strong {
  display: block;
  margin: 8px 0;
  font-size: clamp(32px, 4.5vw, 56px);
  letter-spacing: -.06em;
}

.benefit-box small { color: var(--muted); font-size: 12px; }

.per-insc-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
  margin: 4px 0 6px;
}

.per-insc-label span { font-size: 16px; font-weight: 900; }
.per-insc-label em   { font-style: normal; color: var(--muted); font-weight: 600; }

.benefits-selector-panel {
  margin-bottom: 16px;
  padding: 18px 22px;
}

.benefits-selector-panel .field { margin-top: 0; }

.benefits-table-row {
  grid-template-columns: 1.8fr 0.8fr 0.7fr 0.7fr 0.8fr 0.7fr 0.6fr 0.5fr !important;
}

.benefits-row-active {
  background: #eef6ff !important;
}

.btn-analyze {
  border: 1px solid var(--primary);
  border-radius: 999px;
  background: white;
  color: var(--primary);
  min-height: 32px;
  padding: 0 12px;
  cursor: pointer;
  font-weight: 800;
  font-size: 12px;
  transition: all .12s;
}

.btn-analyze:hover { background: var(--primary); color: white; }

.result-grid.internal div { border-color: #ded1ff; background: linear-gradient(135deg, #faf8ff, #eef6ff); }

.page-subtitle {
  margin: 22px 0 14px;
}

.page-subtitle h2 {
  font-size: clamp(22px, 3vw, 34px);
  margin: 6px 0 0;
  letter-spacing: -.04em;
}

.platform-only { display: none; }

/* ─── Actions footer ──────────────────────────────────────────────────────────── */

.actions {
  background: rgba(255,255,255,.9);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 16px 45px rgba(15, 23, 42, .05);
}

.actions > div { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

.secondary {
  background: #eaf1fb;
  color: #1e3a8a;
  border-color: #d8e6f8;
}
.secondary:hover { background: #dce8f8; }

.ghost { background: white; }
.ghost:hover { background: #f8fafc; }

.primary { width: auto; margin-top: 0; padding: 0 22px; }

/* ─── Tables ─────────────────────────────────────────────────────────────────── */

.page-title {
  background: rgba(255,255,255,.9);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-end;
  margin-bottom: 16px;
}

.page-title h1 { font-size: clamp(28px, 4vw, 50px); margin: 0 0 6px; letter-spacing: -.055em; }
.page-title p  { color: var(--muted); margin: 0; }

.table-card {
  background: rgba(255,255,255,.94);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .06);
}

.table-empty {
  padding: 32px;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
}

.table-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr .9fr .7fr .8fr 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.table-row:last-child { border-bottom: 0; }

.table-row.header {
  background: #f8fafc;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 950;
}

.table-row strong { display: block; }
.table-row small  { color: var(--muted); font-size: 12px; display: block; }

.row-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }

.row-actions button {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: white;
  min-height: 34px;
  padding: 0 11px;
  cursor: pointer;
  font-weight: 850;
  font-size: 12px;
  transition: background .12s;
}

.row-actions button:hover { background: #f1f5fb; }
.btn-danger { color: var(--danger) !important; }
.btn-danger:hover { background: #fff1f1 !important; border-color: #fca5a5 !important; }

/* ─── Status badges ───────────────────────────────────────────────────────────── */

.status-select {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 10px;
  background: white;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  outline: none;
}

.status-select.status-sent     { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.status-select.status-accepted { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.status-select.status-rejected { background: #fef2f2; color: #991b1b; border-color: #fecaca; }

.margin-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
}

.margin-high { background: #f0fdf4; color: #166534; }
.margin-mid  { background: #fffbeb; color: #92400e; }
.margin-low  { background: #fef2f2; color: #991b1b; }

/* ─── Modal ──────────────────────────────────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.5);
  backdrop-filter: blur(8px);
  display: none;
  place-items: center;
  z-index: 50;
  padding: 24px;
}

.modal-overlay.active { display: grid; }

.modal-card {
  background: white;
  border-radius: 28px;
  padding: 36px;
  width: min(440px, 100%);
  box-shadow: 0 32px 80px rgba(15,23,42,.25);
  position: relative;
  text-align: center;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: white;
  cursor: pointer;
  font-size: 16px;
  color: var(--muted);
  display: grid;
  place-items: center;
}

.modal-icon { font-size: 40px; margin-bottom: 12px; }

.modal-card h2 { margin: 0 0 8px; letter-spacing: -.04em; font-size: 26px; }
.modal-card p  { color: var(--muted); margin: 0 0 24px; line-height: 1.6; }

.modal-actions { display: flex; flex-direction: column; gap: 10px; }
.modal-actions .primary { margin-top: 0; }
.modal-actions .secondary { min-height: 48px; }

/* ─── Toast ──────────────────────────────────────────────────────────────────── */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(18px);
  background: #0f172a;
  color: white;
  padding: 11px 18px;
  border-radius: 999px;
  opacity: 0;
  transition: .25s;
  pointer-events: none;
  z-index: 99;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.toast-error { background: var(--danger); }

/* ─── Presentation mode ───────────────────────────────────────────────────────── */

body.presentation .topbar nav .nav-btn:not(.active),
body.presentation .topbar .logout,
body.presentation #wizardSidebar,
body.presentation .actions {
  display: none;
}

body.presentation .wizard-shell {
  grid-template-columns: 1fr;
}

body.presentation .step3-layout {
  grid-template-columns: 360px 1fr;
}

body.presentation .step3-controls {
  max-height: calc(100dvh - 160px);
}

body.presentation .step3-preview {
  background: #f0f5ff;
}

body.presentation .step3-controls .eyebrow,
body.presentation .step3-title {
  display: none;
}

body.presentation .present-banner {
  display: flex !important;
}

body.presentation .client-hero strong {
  font-size: clamp(48px, 7vw, 88px);
}

body.presentation .result-grid {
  grid-template-columns: repeat(2, 1fr);
}

/* ─── Print ──────────────────────────────────────────────────────────────────── */

@media print {
  body { background: white; }
  .topbar, .wizard, .actions, .page-title, .modal-overlay, .toast, .present-banner { display: none !important; }
  .app { width: 100%; padding: 0; min-height: unset; }
  .wizard-shell { display: block; }
  .panel { box-shadow: none; border: 0; padding: 0; }
  .client-preview { border: 0; background: white; padding: 0; }
}

/* ─── Responsive ─────────────────────────────────────────────────────────────── */

@media (max-width: 1200px) {
  .wizard-shell { grid-template-columns: 1fr; }
  .wizard { position: static; display: flex; gap: 8px; }
  .step { flex: 1; justify-content: center; text-align: center; flex-direction: column; gap: 4px; }
  .step span { margin: 0 auto; }
  .step small { font-size: 11px; }
  .step3-layout { grid-template-columns: 1fr; }
  .step3-controls {
    position: static;
    max-height: unset;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .benefit-box { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .grid.two, .grid.three { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: repeat(2, 1fr); }
  .table-row { grid-template-columns: 1fr; gap: 6px; }
  .row-actions { justify-content: flex-start; }
}

@media (max-width: 760px) {
  .app { width: min(100% - 16px, 1500px); padding-top: 8px; }
  .topbar { align-items: stretch; flex-direction: column; border-radius: 22px; }
  .topbar-left { flex-direction: column; align-items: flex-start; }
  nav { justify-content: flex-start; flex-wrap: wrap; }
  .page-title, .actions { align-items: stretch; flex-direction: column; }
  .result-grid { grid-template-columns: 1fr; }
  .pdf-header { flex-direction: column; align-items: flex-start; }
  .pdf-header div { text-align: left; }
}
