:root {
  --bg: #02050d;
  --surface: #07101e;
  --surface-2: #0b1729;
  --ink: #f4f7fb;
  --muted: #aab7ca;
  --line: rgba(255,255,255,.10);
  --brand: #d8b46a;
  --brand-dark: #f2d893;
  --forest: #55c99b;
  --gold: #d8b46a;
  --blue: #6f96d9;
  --ok: #77d6a5;
  --warn: #f2d893;
  --bad: #ff7d8d;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0,0,0,.50);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  min-height: 100dvh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(179,25,45,.06) 1px, transparent 1px),
    linear-gradient(rgba(21,94,75,.055) 1px, transparent 1px),
    var(--bg);
  background-size: 52px 52px;
}

.container {
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
}

.login-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 12% 18%, rgba(179,25,45,.10), transparent 32%),
    radial-gradient(circle at 88% 0%, rgba(21,94,75,.10), transparent 34%),
    var(--bg);
}

.login-card {
  width: min(470px, 100%);
  display: grid;
  gap: 18px;
  padding: clamp(26px, 5vw, 42px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.88);
  box-shadow: var(--shadow);
}

.login-card h1,
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: .95;
  letter-spacing: 0;
}

.login-card p,
.hero p,
.tool-section p {
  color: var(--muted);
  line-height: 1.65;
}

.login-card form {
  display: grid;
  gap: 14px;
}

.kicker {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-left: 4px solid var(--brand);
  color: var(--brand-dark);
  background: rgba(179,25,45,.07);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 0 18px;
  border: 1px solid var(--brand);
  border-radius: var(--radius);
  background: var(--brand);
  color: #fff;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.btn.secondary {
  color: var(--brand-dark);
  background: #fff;
}

.btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.btn.danger {
  color: #fff;
  border-color: var(--bad);
  background: var(--bad);
}

.form-error {
  color: var(--bad);
  font-weight: 800;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(245,242,236,.92);
  backdrop-filter: blur(18px);
}

.nav {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: grid;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.05;
}

.brand span {
  color: var(--muted);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 850;
}

.brand strong {
  color: var(--brand-dark);
  font-size: 1.15rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a,
.logout-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border-radius: var(--radius);
  color: var(--muted);
  text-decoration: none;
  font-weight: 780;
}

.nav-links a:hover,
.logout-link:hover {
  color: var(--brand-dark);
  background: rgba(179,25,45,.07);
}

.mobile-menu {
  display: none;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-weight: 850;
}

.hero {
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: end;
  gap: 36px;
  padding: clamp(54px, 8vw, 96px) 0 42px;
}

.hero p {
  max-width: 830px;
  margin-top: 22px;
  font-size: clamp(1rem, 1.6vw, 1.18rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.parameter-box {
  display: grid;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.parameter-box strong { color: var(--brand-dark); }
.parameter-box span {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.dashboard-panel {
  display: grid;
  gap: 18px;
  margin-top: 28px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.94);
  box-shadow: var(--shadow);
}

.dashboard-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
}

.dashboard-head h1 {
  margin-top: 10px;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: .98;
}

.dashboard-head p,
.dashboard-tools label,
.client-card span,
.import-panel p,
.import-panel small {
  color: var(--muted);
}

.dashboard-tools {
  display: grid;
  grid-template-columns: minmax(220px, 420px);
}

.client-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.client-card {
  display: grid;
  gap: 10px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.client-card:hover,
.client-card.active {
  border-color: rgba(179,25,45,.38);
  box-shadow: 0 10px 28px rgba(179,25,45,.10);
}

.client-card strong {
  color: var(--brand-dark);
  font-size: 1.05rem;
}

.client-card small {
  color: var(--muted);
  line-height: 1.45;
}

.client-manager {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, .9fr);
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.92);
  box-shadow: 0 12px 36px rgba(34, 24, 16, .06);
}

.client-manager h2 {
  margin-top: 10px;
  font-size: clamp(1.5rem, 2.4vw, 2.5rem);
}

.client-manager p,
.client-status {
  color: var(--muted);
  line-height: 1.55;
}

.client-actions {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto auto;
  gap: 10px;
  align-items: end;
}

.client-status {
  grid-column: 1 / -1;
  min-height: 20px;
}

.workspace {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding-bottom: 70px;
}

.side-nav {
  position: sticky;
  top: 94px;
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.88);
}

.side-nav a {
  padding: 10px;
  border-radius: var(--radius);
  color: var(--muted);
  text-decoration: none;
  font-weight: 760;
}

.side-nav a:hover {
  color: var(--brand-dark);
  background: rgba(179,25,45,.07);
}

.side-nav a.active {
  color: #fff;
  background: var(--brand);
}

.work-area,
.analysis-form {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.wizard-top {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.92);
}

.wizard-top div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.wizard-top span {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.wizard-top strong {
  color: var(--brand-dark);
  font-size: 1.08rem;
}

.wizard-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.wizard-progress i {
  display: block;
  width: 14.28%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--gold));
  transition: width .25s ease;
}

.wizard-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.92);
}

.tool-section[hidden] {
  display: none;
}

.import-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(235,229,218,.52);
}

.import-panel h3 {
  margin-bottom: 6px;
}

.file-drop {
  align-self: start;
  min-height: 82px;
  display: grid;
  place-items: center;
  padding: 14px;
  border: 1px dashed var(--brand);
  border-radius: var(--radius);
  color: var(--brand-dark);
  background: #fff;
  text-align: center;
  cursor: pointer;
}

.file-drop input {
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.import-panel textarea {
  grid-column: 1 / -1;
  min-height: 130px;
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  font: inherit;
  color: var(--ink);
}

.import-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.import-panel small {
  align-self: center;
}

.tool-section {
  padding: clamp(18px, 2.2vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.9);
  box-shadow: 0 12px 36px rgba(34, 24, 16, .06);
}

.section-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 22px;
}

.section-head > span {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--brand);
  color: #fff;
  font-weight: 950;
}

.section-head h2 {
  font-size: clamp(1.45rem, 2.2vw, 2.4rem);
  line-height: 1.05;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

label {
  display: grid;
  gap: 7px;
  color: #334049;
  font-size: .88rem;
  font-weight: 780;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 11px;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(179,25,45,.10);
}

.insurance-matrix {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.insurance-card,
.offer-row,
.report-kpi,
.report-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.insurance-card {
  display: grid;
  gap: 12px;
  padding: 15px;
}

.insurance-card strong { color: var(--ink); }
.insurance-card small {
  display: block;
  color: var(--muted);
  line-height: 1.45;
  margin-top: 4px;
}

.insurance-fields {
  display: grid;
  grid-template-columns: .85fr 1fr 1fr;
  gap: 8px;
}

.offers-list {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.offer-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr .9fr auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
}

.icon-button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--bad);
  font-weight: 950;
  cursor: pointer;
}

.result-section {
  border-color: rgba(21,94,75,.28);
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.finance-report {
  display: grid;
  gap: 14px;
}

.report-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.report-kpi,
.report-block {
  padding: 15px;
}

.report-kpi small {
  display: block;
  color: var(--muted);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 8px;
}

.report-kpi strong {
  display: block;
  font-size: clamp(1.25rem, 2vw, 1.8rem);
}

.report-block h3 {
  margin-bottom: 10px;
}

.chart-block {
  display: grid;
  gap: 16px;
}

.timeline-chart,
.need-chart {
  display: grid;
  gap: 12px;
}

.timeline-scale {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
}

.timeline-scale span:not(:first-child) {
  text-align: center;
}

.timeline-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 52px;
  align-items: center;
  gap: 10px;
}

.timeline-row > span,
.need-row span {
  color: var(--muted);
  font-size: .86rem;
}

.timeline-row > strong,
.need-row em {
  color: var(--ink);
  font-style: normal;
  font-weight: 900;
  text-align: right;
}

.timeline-track,
.need-track {
  position: relative;
  height: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.timeline-track i,
.need-track i {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: inherit;
}

.need-track i {
  left: 0;
}

.bar-employer { background: var(--blue); }
.bar-accident { background: var(--bad); }
.bar-sickness { background: var(--forest); }
.bar-income { background: var(--brand); }
.bar-retirement { background: var(--gold); }
.bar-death { background: var(--blue); }

.chart-notes {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-left: 4px solid var(--gold);
  background: rgba(184,138,34,.10);
  color: #4a3b16;
  line-height: 1.5;
}

.need-row {
  display: grid;
  grid-template-columns: minmax(210px, .85fr) minmax(0, 1fr) 52px;
  gap: 12px;
  align-items: center;
}

.need-row div:first-child {
  display: grid;
  gap: 4px;
}

.need-row strong {
  color: var(--ink);
}

.report-list {
  display: grid;
  gap: 8px;
  list-style: none;
}

.report-list li {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--surface-2);
  line-height: 1.45;
}

.severity-gap { border-left: 4px solid var(--bad); }
.severity-warning { border-left: 4px solid var(--warn); }
.severity-ok { border-left: 4px solid var(--ok); }

.pill-status {
  width: fit-content;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 900;
}

.pill-gap { color: #fff; background: var(--bad); }
.pill-warning { color: #1e1604; background: #f3c96d; }
.pill-ok { color: #fff; background: var(--ok); }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px 0;
  background: #fff;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: .9rem;
}

@media (max-width: 1080px) {
  .hero,
  .dashboard-head,
  .client-manager,
  .import-panel,
  .workspace {
    grid-template-columns: 1fr;
  }

  .dashboard-head {
    display: grid;
  }

  .side-nav {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .field-grid,
  .report-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 26px, 1220px);
  }

  .mobile-menu {
    display: inline-flex;
    align-items: center;
  }

  .nav {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .nav-links {
    display: none;
    width: 100%;
    order: 3;
    grid-template-columns: 1fr 1fr;
  }

  .nav-links.open {
    display: grid;
  }

  .field-grid,
  .insurance-matrix,
  .insurance-fields,
  .offer-row,
  .report-summary,
  .client-cards,
  .timeline-row,
  .need-row,
  .side-nav,
  .client-actions {
    grid-template-columns: 1fr;
  }

  .timeline-row > strong,
  .need-row em {
    text-align: left;
  }

  .wizard-actions {
    flex-direction: column;
  }

  .import-panel textarea {
    grid-column: auto;
  }

  .wizard-actions .btn {
    width: 100%;
  }
}

/* DavideGambarucci.ch visual alignment and responsive hardening */
body {
  background: radial-gradient(circle at 20% 0, #0a1a34 0, #02050d 38%, #010208 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 18%, rgba(216,180,106,.14), transparent 30%),
    radial-gradient(circle at 88% 4%, rgba(73,116,190,.14), transparent 32%),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: auto, auto, 56px 56px, 56px 56px;
}

.app-header {
  background: rgba(2,5,13,.78);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.brand strong,
.client-card strong,
.parameter-box strong,
.wizard-top strong,
.section-head h2,
.dashboard-head h1,
.client-manager h2,
.report-block h3 {
  color: #fff;
}

.brand span,
.kicker,
.parameter-box strong,
.wizard-top strong,
.client-card strong {
  color: var(--brand-dark);
}

.login-screen {
  background:
    radial-gradient(circle at 12% 18%, rgba(216,180,106,.16), transparent 32%),
    radial-gradient(circle at 88% 0%, rgba(73,116,190,.16), transparent 34%),
    var(--bg);
}

.login-card,
.parameter-box,
.dashboard-panel,
.client-manager,
.side-nav,
.wizard-top,
.wizard-actions,
.tool-section,
.client-card,
.insurance-card,
.offer-row,
.report-kpi,
.report-block,
.site-footer {
  background: linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.028));
  border-color: var(--line);
  box-shadow: 0 18px 55px rgba(0,0,0,.24);
}

.dashboard-panel,
.client-manager,
.tool-section {
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.kicker {
  background: rgba(216,180,106,.10);
  border-left-color: var(--brand);
}

.btn {
  border-color: transparent;
  background: linear-gradient(135deg, #f2d893, #d8b46a);
  color: #07101e;
  border-radius: 999px;
}

.btn.secondary {
  color: var(--ink);
  border-color: var(--line);
  background: rgba(255,255,255,.06);
}

.btn.danger {
  color: #fff;
  border-color: rgba(255,125,141,.42);
  background: rgba(255,125,141,.18);
}

.nav-links a:hover,
.logout-link:hover,
.side-nav a:hover,
.client-card:hover,
.client-card.active {
  color: var(--brand-dark);
  background: rgba(216,180,106,.08);
  border-color: rgba(216,180,106,.42);
}

.side-nav a.active,
.section-head > span,
.pill-warning {
  color: #07101e;
  background: linear-gradient(135deg, #f2d893, #d8b46a);
}

.mobile-menu,
input,
select,
.import-panel textarea,
.icon-button {
  background: rgba(2,5,13,.72);
  color: var(--ink);
  border-color: var(--line);
}

label {
  color: #dce6f5;
}

input::placeholder,
.import-panel textarea::placeholder {
  color: rgba(170,183,202,.68);
}

input:focus,
select:focus,
.import-panel textarea:focus {
  border-color: rgba(216,180,106,.72);
  box-shadow: 0 0 0 3px rgba(216,180,106,.12);
}

.import-panel,
.chart-notes,
.report-list li {
  background: rgba(255,255,255,.045);
}

.file-drop {
  background: rgba(255,255,255,.045);
  border-color: rgba(216,180,106,.55);
  color: var(--brand-dark);
}

.timeline-track,
.need-track,
.wizard-progress {
  background: rgba(255,255,255,.08);
}

.bar-employer,
.bar-death { background: #6f96d9; }
.bar-accident,
.bar-income { background: #d8b46a; }
.bar-sickness { background: #55c99b; }
.bar-retirement { background: #f2d893; }

.chart-notes {
  color: #dce6f5;
  border-left-color: var(--brand);
}

.pill-gap { color: #fff; background: rgba(255,125,141,.68); }
.pill-ok { color: #06130e; background: #77d6a5; }

.hero {
  position: relative;
  min-height: min(620px, calc(100dvh - 74px));
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 28%, rgba(216,180,106,.14), transparent 30%),
    radial-gradient(circle at 78% 20%, rgba(73,116,190,.14), transparent 34%);
}

.hero > * {
  position: relative;
}

.workspace,
.client-manager,
.dashboard-panel,
.hero {
  max-width: 1440px;
}

@media (min-width: 1280px) {
  .container {
    width: min(1360px, calc(100% - 72px));
  }

  .field-grid {
    grid-template-columns: repeat(4, minmax(170px, 1fr));
  }
}

@media (max-width: 1180px) {
  .hero,
  .client-manager,
  .workspace,
  .import-panel {
    grid-template-columns: 1fr;
  }

  .client-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field-grid,
  .report-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .hero {
    min-height: auto;
    padding-top: 42px;
  }

  .dashboard-head {
    display: grid;
    align-items: start;
  }

  .dashboard-tools,
  .client-actions {
    grid-template-columns: 1fr;
  }

  .client-actions .btn,
  .dashboard-head .btn,
  .hero-actions .btn,
  .result-actions .btn,
  .import-actions .btn {
    width: 100%;
  }

  .side-nav {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .container {
    width: min(100% - 22px, 1220px);
  }

  .nav {
    min-height: 66px;
    gap: 10px;
  }

  .brand strong {
    font-size: .95rem;
  }

  .brand span {
    font-size: .68rem;
  }

  .logout-link {
    min-height: 34px;
    padding: 0 9px;
    font-size: .86rem;
  }

  .hero {
    padding: 34px 0 28px;
  }

  .hero h1,
  .dashboard-head h1 {
    font-size: clamp(2.35rem, 13vw, 3.5rem);
  }

  .login-card,
  .dashboard-panel,
  .client-manager,
  .tool-section,
  .wizard-top,
  .wizard-actions {
    padding: 16px;
    border-radius: 18px;
  }

  .client-cards,
  .field-grid,
  .insurance-matrix,
  .insurance-fields,
  .offer-row,
  .report-summary,
  .timeline-row,
  .need-row,
  .side-nav {
    grid-template-columns: 1fr;
  }

  .section-head {
    display: grid;
  }

  .timeline-scale {
    grid-template-columns: repeat(3, 1fr);
  }

  .timeline-scale span:nth-child(2),
  .timeline-scale span:nth-child(4) {
    display: none;
  }

  .timeline-row > strong,
  .need-row em {
    text-align: left;
  }

  .wizard-actions {
    flex-direction: column;
  }

  .wizard-actions .btn {
    width: 100%;
  }

  .import-panel textarea {
    grid-column: auto;
  }
}

@media (max-width: 390px) {
  .container {
    width: min(100% - 16px, 1220px);
  }

  .brand strong {
    font-size: .84rem;
  }

  .brand span {
    display: none;
  }

  .btn,
  input,
  select {
    min-height: 44px;
  }
}

@media print {
  .app-header,
  .hero,
  .side-nav,
  .analysis-form,
  .result-actions,
  .site-footer {
    display: none !important;
  }

  body {
    background: #fff !important;
  }

  .container,
  .workspace {
    width: 100% !important;
    display: block !important;
  }

  .tool-section,
  .report-kpi,
  .report-block,
  .report-list li {
    box-shadow: none !important;
    background: #fff !important;
    border-color: #cfd6da !important;
  }
}
