@font-face { font-family: "Dana"; src: url("assets/fonts/dana/DanaFaNum-Regular.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "Dana"; src: url("assets/fonts/dana/DanaFaNum-Medium.woff2") format("woff2"); font-style: normal; font-weight: 500; font-display: swap; }
@font-face { font-family: "Dana"; src: url("assets/fonts/dana/DanaFaNum-DemiBold.woff2") format("woff2"); font-style: normal; font-weight: 600; font-display: swap; }
@font-face { font-family: "Dana"; src: url("assets/fonts/dana/DanaFaNum-Bold.woff2") format("woff2"); font-style: normal; font-weight: 700; font-display: swap; }
@font-face { font-family: "Dana"; src: url("assets/fonts/dana/DanaFaNum-ExtraBold.woff2") format("woff2"); font-style: normal; font-weight: 800; font-display: swap; }

:root {
  --navy-950: #0b1f33;
  --navy-900: #0f2a45;
  --navy-800: #163b5d;
  --blue-700: #0e5d92;
  --blue-600: #1671a8;
  --blue-100: #e7f2f8;
  --blue-50: #f3f8fb;
  --orange-600: #d7762b;
  --orange-500: #e68b43;
  --orange-100: #fcebdc;
  --green-700: #14765c;
  --green-100: #e1f4ed;
  --red-700: #b94242;
  --red-100: #fae7e7;
  --amber-700: #926313;
  --amber-100: #fff3d4;
  --ink: #182632;
  --muted: #677684;
  --line: #dfe7ec;
  --soft-line: #edf1f4;
  --canvas: #f5f7f8;
  --white: #fff;
  --shadow: 0 14px 40px rgba(18, 42, 61, .08);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--canvas); }

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Dana", Tahoma, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.65;
}

button, input, select { font: inherit; }
button { color: inherit; }

button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(22, 113, 168, .2);
  outline-offset: 2px;
}

.app-shell { display: grid; grid-template-columns: 310px minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 28px 24px;
  color: #fff;
  background:
    radial-gradient(circle at 25% 10%, rgba(53, 132, 181, .38), transparent 30%),
    linear-gradient(180deg, var(--navy-800), var(--navy-950));
  box-shadow: -10px 0 34px rgba(11, 31, 51, .09);
  z-index: 5;
}

.brand { display: inline-flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.brand-logo { width: 48px; height: 48px; object-fit: contain; }
.brand strong { display: block; font-size: 24px; letter-spacing: -.5px; line-height: 1.1; }
.brand small { display: block; color: rgba(255,255,255,.62); margin-top: 4px; }

.journey-copy { margin-top: 52px; }
.eyebrow, .section-kicker { display: block; color: var(--orange-600); font-size: 12px; font-weight: 700; letter-spacing: .2px; margin-bottom: 6px; }
.sidebar .eyebrow { color: #f4ad74; }
.journey-copy h1 { margin: 0 0 10px; font-size: 24px; line-height: 1.5; font-weight: 800; }
.journey-copy p { margin: 0; color: rgba(255,255,255,.65); line-height: 1.9; }

.step-nav { display: grid; gap: 10px; margin-top: 34px; }
.step-link {
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 13px 12px;
  color: rgba(255,255,255,.7);
  text-align: right;
  background: transparent;
  cursor: pointer;
  transition: .2s ease;
}
.step-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.step-link.active { color: #fff; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.12); }
.step-link.completed .step-number { background: var(--green-100); color: var(--green-700); }
.step-number {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255,255,255,.1);
  font-size: 15px;
  font-weight: 800;
}
.step-link.active .step-number { color: var(--navy-950); background: #fff; }
.step-link strong, .step-link small { display: block; }
.step-link strong { font-size: 14px; }
.step-link small { margin-top: 2px; color: inherit; opacity: .7; font-size: 11px; }
.step-state { grid-column: 2; width: max-content; font-size: 10px; color: #f8bc8a; }

.sidebar-note {
  display: flex;
  gap: 10px;
  margin-top: 38px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  background: rgba(255,255,255,.05);
}
.sidebar-note p { margin: 0; color: rgba(255,255,255,.58); font-size: 11px; line-height: 1.8; }
.sidebar-note strong { color: rgba(255,255,255,.88); }
.note-icon { flex: 0 0 auto; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: var(--navy-950); background: #f4ad74; font: 700 12px Arial; }

.main-content { min-width: 0; padding: 0 46px 120px; }
.topbar { height: 80px; display: flex; align-items: center; gap: 20px; border-bottom: 1px solid var(--line); }
.progress-wrap { width: min(370px, 50vw); }
.progress-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; margin-bottom: 7px; }
.progress-track { height: 5px; overflow: hidden; border-radius: 999px; background: #e1e8ec; }
.progress-track span { display: block; width: 33.33%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue-600), var(--orange-500)); transition: width .35s ease; }
.icon-button { margin-right: auto; display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; }
.icon-button:hover { border-color: #bdcbd3; background: var(--blue-50); }
.icon-button > i { font-size: 17px; }
.basalam-connect-button { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 13px; border: 1px solid #c8e0ec; border-radius: 12px; color: var(--blue-700); background: var(--blue-50); text-decoration: none; font-size: 11px; font-weight: 700; transition: .2s ease; }
.basalam-connect-button:hover { border-color: var(--blue-600); background: #e5f3fa; }
.basalam-connect-button.connected { border-color: #b9dfd0; color: var(--green-700); background: var(--green-100); }
.basalam-connect-button.connected i { color: var(--green-700); }
.mobile-brand { display: none; }

.step-panel { max-width: 1250px; margin: 0 auto; padding-top: 40px; animation: panelIn .3s ease; }
@keyframes panelIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.decision-flow { animation: panelIn .28s ease; }
.goal-chooser { max-width: 900px; margin: 0 auto; padding: 48px 0 20px; }
.goal-heading { max-width: 690px; margin: 0 auto 30px; text-align: center; }
.goal-heading h2 { margin: 0; color: var(--navy-950); font-size: clamp(27px, 4vw, 40px); line-height: 1.5; }
.goal-heading p { margin: 9px 0 0; color: var(--muted); font-size: 14px; }
.goal-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.goal-option { display: grid; grid-template-columns: 52px 1fr 24px; align-items: center; gap: 15px; min-height: 150px; padding: 22px; border: 1px solid var(--line); border-radius: 20px; text-align: right; background: #fff; box-shadow: 0 10px 28px rgba(20,48,67,.05); cursor: pointer; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.goal-option:hover { transform: translateY(-3px); border-color: #b8d7e7; box-shadow: 0 18px 38px rgba(20,48,67,.09); }
.goal-option b, .goal-option small { display: block; }
.goal-option b { color: var(--navy-950); font-size: 16px; line-height: 1.7; }
.goal-option small { margin-top: 6px; color: var(--muted); font-size: 11px; line-height: 1.8; }
.goal-option > i { color: var(--blue-700); font-style: normal; font-size: 22px; transition: transform .2s ease; }
.goal-option:hover > i { transform: translateX(-4px); }
.goal-option-icon { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 15px; font-size: 22px; font-weight: 800; }
.goal-option-icon.profit-icon { color: var(--green-700); background: var(--green-100); }
.goal-option-icon.pricing-icon { color: var(--orange-600); background: var(--orange-100); }
.goal-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; color: var(--muted); font-size: 10px; }
.goal-note span { display: grid; place-items: center; width: 18px; height: 18px; border: 1px solid #c5d2da; border-radius: 50%; font: 700 10px Arial; }
.report-meta-panel[hidden], .final-report[hidden], .step-actions[hidden] { display: none; }
.report-meta-panel { max-width: 1250px; margin: 0 auto 22px; padding: 18px 20px; }
.report-meta-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 15px; }
.report-meta-heading strong, .report-meta-heading small { display: block; }
.report-meta-heading strong { color: var(--navy-900); font-size: 13px; }
.report-meta-heading small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.report-meta-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px; color: var(--blue-700); background: var(--blue-100); }
.validation-summary { margin-top: 14px; padding: 13px 15px; border: 1px solid #efb0b0; border-radius: 12px; color: var(--red-700); background: var(--red-100); }
.validation-summary strong { display: flex; align-items: center; gap: 7px; font-size: 11px; }
.validation-summary ul { margin: 7px 18px 0 0; padding: 0; font-size: 10px; }
.field.invalid input, .field.invalid select { border-color: var(--red-700); box-shadow: 0 0 0 3px rgba(185,66,66,.08); }
.back-to-goals { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 17px; padding: 7px 10px; border: 0; border-radius: 9px; color: var(--blue-700); background: var(--blue-50); cursor: pointer; font-size: 11px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.page-heading h2 { margin: 0; color: var(--navy-950); font-size: clamp(24px, 3vw, 34px); line-height: 1.5; }
.page-heading p { max-width: 760px; margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.connected-pill, .helper-badge, .status-chip { white-space: nowrap; border-radius: 999px; }
.connected-pill { display: flex; align-items: center; gap: 8px; padding: 9px 13px; color: var(--green-700); background: var(--green-100); font-size: 11px; }
.connected-pill span { width: 8px; height: 8px; border-radius: 50%; background: #23a479; box-shadow: 0 0 0 4px rgba(35,164,121,.13); }

.workspace-grid { display: grid; gap: 24px; align-items: start; }
.unit-layout { grid-template-columns: minmax(0, 1.35fr) minmax(330px, .65fr); }
.pricing-layout { grid-template-columns: minmax(0, 1.18fr) minmax(380px, .82fr); }
.surface { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white); box-shadow: 0 10px 28px rgba(20, 48, 67, .05); }
.input-surface, .simulator-controls, .cash-inputs { padding: 24px; }
.surface-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 20px; }
.surface-header h3, .chart-header h3, .target-heading h3 { margin: 0; color: var(--navy-950); font-size: 18px; }
.helper-badge { padding: 6px 10px; color: var(--blue-700); background: var(--blue-50); font-size: 10px; }

.field-grid { display: grid; gap: 16px; }
.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.full-field { grid-column: 1 / -1; }
.field { position: relative; display: grid; gap: 7px; color: var(--ink); font-size: 12px; font-weight: 700; }
.field-label-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 18px; }
.help-trigger { display: inline-grid; place-items: center; width: 21px; height: 21px; flex: 0 0 21px; padding: 0; border: 0; border-radius: 50%; color: var(--blue-700); background: var(--blue-50); cursor: pointer; font-size: 13px; }
.help-trigger:hover { color: var(--navy-900); background: #dcecf5; }
.help-trigger[aria-expanded="true"] { color: #fff; background: var(--blue-700); }
.field-help-popover { padding: 12px 13px; border: 1px solid #c8e0ec; border-radius: 12px; color: var(--navy-800); background: linear-gradient(145deg, #f4fbfe, #fff); font-size: 10px; font-weight: 400; line-height: 1.9; box-shadow: 0 8px 18px rgba(22, 83, 118, .08); }
.field-help-popover[hidden] { display: none; }
.field-help-popover strong { display: block; color: var(--navy-900); font-size: 11px; }
.field-help-popover p { margin: 5px 0 0; }
.field-help-popover b { color: var(--blue-700); }
.field-help-popover small { display: block; margin-top: 6px; color: var(--muted); font-size: 9px; }
.field input, .field select {
  width: 100%;
  height: 46px;
  border: 1px solid #d7e0e5;
  border-radius: 11px;
  padding: 0 13px;
  color: var(--ink);
  background: #fff;
  font-weight: 400;
  transition: border .2s, box-shadow .2s;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #72828d 50%), linear-gradient(135deg, #72828d 50%, transparent 50%); background-position: 13px 20px, 18px 20px; background-size: 5px 5px; background-repeat: no-repeat; padding-left: 32px; }
.field input:focus, .field select:focus { outline: none; border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(22,113,168,.1); }
.money-field input { direction: ltr; text-align: left; padding-left: 62px; }
.money-field em { position: absolute; left: 12px; bottom: 13px; color: var(--muted); font-size: 10px; font-style: normal; font-weight: 400; }
.suffix-input { position: relative; }
.suffix-input input { direction: ltr; text-align: left; padding-left: 40px; }
.suffix-input em { position: absolute; left: 13px; top: 12px; color: var(--muted); font-style: normal; font-weight: 400; }
.manual-commission-field[hidden] { display: none; }
.manual-commission-field { padding: 14px; border: 1px dashed #efbd91; border-radius: 12px; background: #fffaf5; }
.manual-commission-field > small { color: var(--muted); font-size: 10px; font-weight: 400; }

.auto-rate { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px; margin: 18px 0; padding: 13px; border: 1px solid #cce3ef; border-radius: 13px; background: var(--blue-50); }
.auto-rate-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: #fff; background: var(--blue-600); font-weight: 800; }
.auto-rate strong, .auto-rate small { display: block; }
.auto-rate strong { color: var(--navy-800); font-size: 12px; }
.auto-rate small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.auto-rate.manual { border-color: #efc7a3; background: #fff8f1; }
.auto-rate.manual .auto-rate-icon { background: var(--orange-600); }
.status-chip { padding: 5px 9px; color: var(--green-700); background: var(--green-100); font-size: 10px; font-weight: 700; }
.status-chip.warning { color: var(--amber-700); background: var(--amber-100); }
.status-chip.manual { color: var(--orange-600); background: var(--orange-100); }

.installment-box { margin-top: 20px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.installment-box summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 16px; list-style: none; cursor: pointer; background: #fafcfd; }
.installment-box summary::-webkit-details-marker { display: none; }
.installment-box summary strong, .installment-box summary small { display: block; }
.installment-box summary small { color: var(--muted); font-size: 10px; margin-top: 2px; }
.toggle { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--blue-600); }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.installment-box:not([open]) .toggle { background: #cbd5db; }
.installment-box:not([open]) .toggle::after { left: 19px; }
.installment-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 16px; border-top: 1px solid var(--line); }

.results-column { display: grid; gap: 16px; }
.result-hero { padding: 24px; border-radius: var(--radius-lg); color: #fff; background: linear-gradient(145deg, #14765c, #0e5c49); box-shadow: 0 15px 35px rgba(20,118,92,.19); }
.result-hero.negative { background: linear-gradient(145deg, #b94242, #8f2e2e); box-shadow: 0 15px 35px rgba(185,66,66,.18); }
.result-hero-top { display: flex; align-items: center; justify-content: space-between; color: rgba(255,255,255,.76); }
.verdict { padding: 4px 9px; border-radius: 999px; color: inherit; background: rgba(255,255,255,.14); font-size: 10px; }
.result-hero > strong { display: block; margin-top: 15px; font-size: clamp(30px, 4vw, 42px); line-height: 1.2; direction: ltr; text-align: right; }
.result-hero > small { color: rgba(255,255,255,.72); }
.margin-row { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; padding-top: 15px; border-top: 1px solid rgba(255,255,255,.16); font-size: 11px; }
.hero-monthly-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.13); color: rgba(255,255,255,.72); font-size: 10px; }
.hero-monthly-row > span { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.hero-monthly-row span small, .hero-monthly-row > small { color: inherit; font-size: 10px; }
.hero-monthly-row b { direction: ltr; color: #fff; font-size: 14px; font-weight: 700; white-space: nowrap; }

.metrics-surface { display: grid; gap: 12px; }
.metrics-card { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--white); box-shadow: 0 10px 28px rgba(20, 48, 67, .05); }
.metrics-card[hidden] { display: none; }
.metrics-card summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; list-style: none; cursor: pointer; }
.metrics-card summary::-webkit-details-marker { display: none; }
.metrics-card summary > span:first-child { min-width: 0; }
.metrics-card summary b, .metrics-card summary small { display: block; }
.metrics-card summary b { color: var(--navy-900); font-size: 13px; }
.metrics-card summary small { margin-top: 2px; color: var(--muted); font-size: 10px; line-height: 1.7; }
.metrics-card[open] summary { border-bottom: 1px solid var(--soft-line); background: #fbfcfd; }
.metrics-card[open] summary b { color: var(--blue-700); }
.metrics-summary-status { flex: 0 0 auto; padding: 5px 9px; border-radius: 999px; font-size: 10px; font-weight: 700; }
.metrics-summary-status.safe { color: var(--green-700); background: var(--green-100); }
.metrics-summary-status.danger { color: var(--red-700); background: var(--red-100); }
.metrics-card-body { padding: 0 18px 5px; }
.metrics-inline-heading { padding: 14px 0 5px; border-bottom: 1px solid var(--soft-line); }
.metrics-inline-heading b, .metrics-inline-heading small { display: block; }
.metrics-inline-heading b { color: var(--navy-900); font-size: 11px; }
.metrics-inline-heading small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.metrics-inline-heading.installment-inline-heading { margin-top: 8px; }
.metric-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--soft-line); }
.metric-row:last-child { border-bottom: 0; }
.metric-row > span { display: flex; align-items: center; gap: 11px; }
.metrics-card .metric-icon { display: none; }
.metrics-card .metric-row > span { gap: 0; }
.metric-row b, .metric-row small { display: block; }
.metric-row b { font-size: 12px; }
.metric-row small { color: var(--muted); font-size: 10px; }
.metric-row > strong { direction: ltr; white-space: nowrap; color: var(--navy-900); font-size: 17px; }
.metric-row.emphasis > strong { color: var(--orange-600); }
.metric-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; font-style: normal; font-weight: 700; }
.metric-icon.floor { color: var(--orange-600); background: var(--orange-100); }
.metric-icon.cash { color: var(--green-700); background: var(--green-100); }
.metric-icon.time { color: var(--blue-700); background: var(--blue-100); }
.metric-icon.payback { color: #6b57a5; background: #eeeaf9; }
.metric-icon.contract { color: var(--navy-800); background: #e7edf3; }
.negative-value { color: var(--red-700) !important; }

.recommendation { display: flex; gap: 12px; padding: 16px; border: 1px solid #f1d7bd; border-radius: 15px; background: #fffaf5; }
.recommendation.safe { border-color: #bfe1d5; background: #f3fbf8; }
.recommendation.danger { border-color: #efc7c7; background: #fff7f7; }
.recommendation-icon { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%; color: #fff; background: var(--orange-500); font-weight: 800; }
.recommendation.safe .recommendation-icon { background: var(--green-700); }
.recommendation.danger .recommendation-icon { background: var(--red-700); }
.recommendation strong { font-size: 12px; }
.recommendation p { margin: 3px 0 0; color: var(--muted); font-size: 10px; line-height: 1.8; }
.recommendation.compact { padding: 14px 16px; }

.pricing-form { display: grid; gap: 0; }
.pricing-section-label { display: flex; align-items: center; gap: 10px; margin: 23px 0 15px; padding-top: 20px; border-top: 1px solid var(--soft-line); }
.pricing-section-label > span { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 28px; border-radius: 9px; color: #fff; background: var(--navy-800); font-weight: 800; }
.pricing-section-label b, .pricing-section-label small { display: block; }
.pricing-section-label b { color: var(--navy-900); font-size: 12px; }
.pricing-section-label small { color: var(--muted); font-size: 9px; }
.advanced-pricing { margin-top: 22px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.advanced-pricing summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 16px; list-style: none; background: #fafcfd; cursor: pointer; }
.advanced-pricing summary::-webkit-details-marker { display: none; }
.advanced-pricing summary strong, .advanced-pricing summary small { display: block; }
.advanced-pricing summary small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.advanced-pricing summary > span:last-child { color: var(--blue-700); font-size: 10px; }
.advanced-pricing[open] summary > span:last-child { font-size: 0; }
.advanced-pricing[open] summary > span:last-child::after { content: "بستن تنظیمات"; font-size: 10px; }
.advanced-pricing-body { padding: 16px; border-top: 1px solid var(--line); }
.pricing-results { display: grid; gap: 16px; }
.pricing-price-pair { display: grid; grid-template-columns: 1fr; gap: 14px; }
.price-recommendation { min-width: 0; padding: 20px; border-radius: 18px; color: #fff; }
.price-recommendation.cash-price { background: linear-gradient(145deg, var(--navy-800), var(--navy-950)); box-shadow: 0 14px 30px rgba(15,42,69,.16); }
.price-recommendation.installment-price { background: linear-gradient(145deg, #1671a8, #0e557f); box-shadow: 0 14px 30px rgba(22,113,168,.17); }
.price-recommendation span, .price-recommendation strong, .price-recommendation small { display: block; }
.price-recommendation span { color: rgba(255,255,255,.76); font-size: 10px; }
.price-recommendation strong { direction: ltr; text-align: right; margin: 10px 0 4px; font-size: clamp(21px, 2.1vw, 28px); line-height: 1.2; white-space: nowrap; }
.price-recommendation small { color: rgba(255,255,255,.64); font-size: 9px; }
.price-profit-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.17); }
.price-profit-summary > div { min-width: 0; }
.price-profit-summary > div > span { color: rgba(255,255,255,.78); font-size: 10px; }
.price-profit-summary > div > strong { margin: 5px 0 2px; color: #fff; font-size: 20px; }
.price-profit-summary > div > small { color: rgba(255,255,255,.62); font-size: 9px; line-height: 1.7; }
.price-profit-summary > div > small b { display: inline; color: #fff; font-size: 10px; }
.price-increase-card { display: flex; align-items: center; gap: 12px; padding: 15px 17px; border: 1px solid #f1d7bd; border-radius: 15px; background: #fffaf5; }
.increase-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px; color: #fff; background: var(--orange-500); font-size: 20px; }
.price-increase-card > div > span { display: block; color: var(--muted); font-size: 10px; }
.price-increase-card strong { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px; margin-top: 2px; color: var(--navy-900); }
.price-increase-card strong > b { font-size: 20px; }
.price-increase-card strong small { margin-right: 5px; color: var(--orange-600); font-size: 10px; }
.price-ladder { padding: 20px; }
.price-ladder .surface-header { padding-bottom: 14px; }
.price-ladder-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.price-ladder-columns > div { min-width: 0; }
.price-ladder h4 { margin: 0 0 8px; color: var(--navy-900); font-size: 12px; }
.ladder-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--soft-line); color: var(--muted); font-size: 9px; }
.ladder-row b { direction: ltr; color: var(--navy-900); font-size: 12px; }
.ladder-row.selected { color: var(--orange-600); }
.ladder-row.selected b { color: var(--orange-600); }
.ladder-note { margin: 13px 0 0; padding: 10px 11px; border-radius: 10px; color: var(--blue-700); background: var(--blue-50); font-size: 9px; }
.pricing-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 6px 18px; }
.pricing-metric { min-width: 0; padding: 14px 0; border-bottom: 1px solid var(--soft-line); }
.pricing-metric:nth-child(odd) { padding-left: 14px; border-left: 1px solid var(--soft-line); }
.pricing-metric:nth-child(even) { padding-right: 14px; }
.pricing-metric:nth-last-child(-n+2) { border-bottom: 0; }
.pricing-metric span, .pricing-metric strong, .pricing-metric small { display: block; }
.pricing-metric span { color: var(--muted); font-size: 9px; }
.pricing-metric strong { direction: ltr; text-align: right; margin-top: 4px; color: var(--navy-900); font-size: 15px; overflow-wrap: anywhere; }

.context-product { padding: 10px 14px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.context-product span, .context-product strong { display: block; }
.context-product span { color: var(--muted); font-size: 10px; }
.context-product strong { margin-top: 2px; font-size: 12px; }
.campaign-grid { display: grid; grid-template-columns: minmax(330px, .78fr) minmax(420px, 1.22fr); gap: 24px; align-items: start; }
.text-button { border: 0; padding: 4px 6px; color: var(--blue-700); background: transparent; font-size: 11px; cursor: pointer; }
.slider-control { padding: 22px 0; border-top: 1px solid var(--soft-line); }
.slider-label { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 16px; }
.slider-label b, .slider-label small { display: block; }
.slider-label b { font-size: 13px; }
.slider-label small { color: var(--muted); font-size: 10px; margin-top: 2px; }
.slider-label output { direction: ltr; min-width: 90px; text-align: center; padding: 7px 10px; border-radius: 9px; color: var(--navy-800); background: var(--blue-50); font-weight: 800; }
input[type="range"] { width: 100%; height: 5px; accent-color: var(--blue-600); cursor: pointer; }
.range-scale { display: flex; justify-content: space-between; color: #85939d; font-size: 9px; margin-top: 7px; }
.campaign-price-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding-top: 4px; }
.campaign-price-row span { padding: 13px; border-radius: 12px; background: var(--blue-50); }
.campaign-price-row small, .campaign-price-row strong { display: block; }
.campaign-price-row small { color: var(--muted); font-size: 9px; }
.campaign-price-row strong { margin-top: 4px; color: var(--navy-800); font-size: 13px; }
.campaign-visuals { display: grid; gap: 16px; }
.target-card { padding: 24px; }
.target-heading, .chart-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.target-number { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin-top: 22px; color: var(--navy-900); }
.target-number strong { font-size: 56px; line-height: 1; }
.target-number span { color: var(--muted); }
.target-card > p { max-width: 540px; margin: 12px auto 30px; color: var(--muted); text-align: center; }
.sales-gauge { padding: 16px 8px 2px; }
.gauge-track { position: relative; height: 12px; border-radius: 999px; background: #e7edf0; }
.gauge-track > span { display: block; width: 50%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue-600), #55a7c6); transition: width .3s ease; }
.gauge-track > i { position: absolute; top: -7px; right: 25%; height: 26px; border-right: 2px solid var(--orange-600); font-style: normal; transition: right .3s ease; }
.gauge-track > i b { position: absolute; bottom: 29px; right: 50%; transform: translateX(50%); color: var(--orange-600); font-size: 9px; white-space: nowrap; }
.gauge-labels { display: flex; justify-content: space-between; margin-top: 10px; color: var(--muted); font-size: 9px; }
.gauge-labels strong { color: var(--blue-700); }
.campaign-summary-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.summary-tile { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.summary-tile span, .summary-tile strong, .summary-tile small { display: block; }
.summary-tile span { color: var(--muted); font-size: 10px; }
.summary-tile strong { direction: ltr; text-align: right; margin-top: 7px; color: var(--navy-900); font-size: 22px; }
.summary-tile small { margin-top: 3px; color: var(--muted); font-size: 9px; }

.period-control { display: grid; justify-items: end; gap: 6px; }
.period-control > span { color: var(--muted); font-size: 9px; }
.period-switch { display: flex; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.period-switch button { border: 0; border-radius: 9px; padding: 7px 12px; color: var(--muted); background: transparent; cursor: pointer; font-size: 11px; }
.period-switch button.active { color: #fff; background: var(--navy-800); }
.cashflow-overview-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr); gap: 22px; align-items: stretch; }
.cashflow-summary-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.cashflow-summary-card { min-width: 0; padding: 16px 17px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: 0 7px 18px rgba(20,48,67,.035); }
.cashflow-summary-card span, .cashflow-summary-card strong, .cashflow-summary-card small { display: block; }
.cashflow-summary-card span { color: var(--muted); font-size: 10px; line-height: 1.7; }
.cashflow-summary-card strong { direction: ltr; text-align: right; margin-top: 6px; color: var(--navy-900); font-size: 18px; line-height: 1.4; overflow-wrap: anywhere; }
.cashflow-summary-card small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.7; }
.cash-schedule-surface { margin-top: 22px; padding: 24px; }
.cash-schedule-guide { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 13px; padding: 11px 13px; border-radius: 12px; color: var(--muted); background: var(--blue-50); font-size: 9px; line-height: 1.8; }
.cash-schedule-guide > i { color: var(--blue-600); }
.cash-schedule-wrap { margin-top: 14px; overflow-x: auto; border: 1px solid var(--soft-line); border-radius: 14px; }
.cash-schedule { width: 100%; min-width: 1260px; border-collapse: separate; border-spacing: 0; direction: rtl; }
.cash-schedule th, .cash-schedule td { padding: 13px 14px; border-bottom: 1px solid var(--soft-line); text-align: right; white-space: nowrap; }
.cash-schedule thead th { color: var(--muted); background: #f8fafb; font-size: 9px; font-weight: 700; }
.cash-schedule tbody th { color: var(--navy-900); font-size: 11px; font-weight: 700; }
.cash-schedule tbody td { direction: ltr; color: var(--navy-900); font-size: 11px; }
.cash-schedule tbody tr:last-child th, .cash-schedule tbody tr:last-child td { border-bottom: 0; }
.cash-schedule tbody tr.safe { background: rgba(225,244,237,.28); }
.cash-schedule tbody tr.warning { background: rgba(255,243,212,.36); }
.cash-schedule tbody tr.danger { background: rgba(250,231,231,.45); }
.cash-schedule .positive-number { color: var(--green-700); font-weight: 700; }
.cash-schedule .negative-number { color: var(--red-700); font-weight: 700; }
.cash-schedule .ending-balance { font-weight: 800; }
.cash-schedule .inventory-cell strong, .cash-schedule .inventory-cell small, .cash-schedule .purchase-cell strong, .cash-schedule .purchase-cell small { display: block; }
.cash-schedule .inventory-cell strong, .cash-schedule .purchase-cell strong { color: var(--navy-900); font-size: 11px; }
.cash-schedule .inventory-cell small, .cash-schedule .purchase-cell small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.cash-schedule .purchase-cell strong { color: var(--orange-600); }
.cash-schedule .sales-cell strong, .cash-schedule .sales-cell small, .cash-schedule .ending-inventory-cell strong, .cash-schedule .ending-inventory-cell small, .cash-schedule .outflow-cell strong, .cash-schedule .outflow-cell small { display: block; }
.cash-schedule .sales-cell strong, .cash-schedule .ending-inventory-cell strong { color: var(--navy-900); font-size: 11px; }
.cash-schedule .sales-cell small, .cash-schedule .ending-inventory-cell small, .cash-schedule .outflow-cell small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.cash-schedule .outflow-cell strong { color: var(--orange-600); font-size: 11px; }
.cash-status-pill { display: inline-flex; align-items: center; gap: 5px; direction: rtl; padding: 4px 8px; border-radius: 999px; color: var(--green-700); background: var(--green-100); font-size: 9px; }
.cash-schedule tr.warning .cash-status-pill { color: var(--amber-700); background: var(--amber-100); }
.cash-schedule tr.danger .cash-status-pill { color: var(--red-700); background: var(--red-100); }
.cash-schedule-note { margin: 13px 0 0; color: var(--muted); font-size: 10px; line-height: 1.9; }
.cash-verdict-card.warning { border-color: #efd28d; color: var(--navy-900); background: linear-gradient(145deg, #fff8e6, #fffdf8); box-shadow: 0 15px 35px rgba(159,120,23,.11); }
.cash-verdict-card.warning .cash-verdict-top, .cash-verdict-card.warning > p, .cash-verdict-card.warning .cash-buffer-box span, .cash-verdict-card.warning .cash-buffer-box small { color: var(--muted); }
.cash-verdict-card.warning .cash-verdict-top b { color: var(--amber-700); background: var(--amber-100); }
.cash-verdict-card.warning h3 { color: var(--navy-900); }
.cash-verdict-card.warning .cash-buffer-box { border-color: #efdcae; }
.field > .field-hint { margin: -2px 0 0; color: var(--muted); font-size: 9px; font-weight: 400; line-height: 1.7; }
.cash-source-note { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 13px 14px; border-radius: 13px; color: var(--blue-700); background: var(--blue-50); }
.cash-source-note > i { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; color: #fff; background: var(--blue-600); }
.cash-source-note p { margin: 0; font-size: 10px; }
.cash-source-note strong, .cash-source-note span { display: block; }
.cash-source-note span { margin-top: 2px; color: var(--muted); }
.cash-verdict-card { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 26px; border: 1px solid #c5e1d7; border-radius: 20px; color: #fff; background: linear-gradient(145deg, #14765c, #0e5c49); box-shadow: 0 15px 35px rgba(20,118,92,.16); }
.cash-verdict-card.critical { border-color: #dc7a7a; background: linear-gradient(145deg, #a83c3c, #7f2929); box-shadow: 0 15px 35px rgba(145,44,44,.17); }
.cash-verdict-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: rgba(255,255,255,.68); font-size: 10px; }
.cash-verdict-top b { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; color: #fff; background: rgba(255,255,255,.14); font-size: 9px; }
.cash-verdict-card h3 { margin: 22px 0 8px; font-size: clamp(21px, 2.2vw, 29px); line-height: 1.55; }
.cash-verdict-card > p { margin: 0; color: rgba(255,255,255,.74); font-size: 11px; line-height: 1.95; }
.cash-buffer-box { margin-top: 24px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.18); }
.cash-buffer-box span, .cash-buffer-box strong, .cash-buffer-box small { display: block; }
.cash-buffer-box span { color: rgba(255,255,255,.68); font-size: 9px; }
.cash-buffer-box strong { direction: ltr; text-align: right; margin-top: 4px; font-size: 29px; line-height: 1.25; }
.cash-buffer-box small { color: rgba(255,255,255,.66); font-size: 9px; }
.cash-milestones { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.cash-milestone { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.cash-milestone > i { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px; color: var(--blue-700); background: var(--blue-100); }
.cash-milestone.danger > i { color: var(--red-700); background: var(--red-100); }
.cash-milestone span { min-width: 0; }
.cash-milestone small, .cash-milestone strong, .cash-milestone em { display: block; }
.cash-milestone small { color: var(--muted); font-size: 9px; }
.cash-milestone strong { direction: ltr; text-align: right; margin-top: 3px; color: var(--navy-900); font-size: 17px; line-height: 1.3; white-space: nowrap; }
.cash-milestone.danger strong { color: var(--red-700); }
.cash-milestone em { margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 8px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.chart-surface { margin-top: 22px; padding: 24px; }
.chart-legend { display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: 10px; }
.chart-legend span { display: flex; align-items: center; gap: 6px; }
.legend-line, .legend-dash { display: block; width: 22px; }
.legend-line { height: 3px; background: var(--blue-600); }
.legend-dash { border-top: 2px dashed var(--red-700); }
.cash-chart-guide { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; margin-top: 14px; padding: 11px 13px; border-radius: 12px; color: var(--muted); background: var(--blue-50); font-size: 9px; }
.cash-chart-guide > i { color: var(--blue-600); }
.cash-chart-guide b { color: var(--navy-800); }
.cash-chart-wrap { width: 100%; height: 330px; margin-top: 12px; direction: ltr; }
#cashChart { width: 100%; height: 100%; overflow: visible; }
#negativeZone { fill: rgba(185,66,66,.055); }
#cashLinePath { stroke: var(--blue-600); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
#zeroLine { stroke: var(--red-700); stroke-width: 1.5; stroke-dasharray: 6 6; vector-effect: non-scaling-stroke; }
#chartGrid line { stroke: #e6ecef; stroke-width: 1; vector-effect: non-scaling-stroke; }
#chartLabels text { fill: #788792; font-size: 11px; font-family: "Dana", Tahoma, sans-serif; }
.event-marker line { stroke-width: 1.5; stroke-dasharray: 3 5; vector-effect: non-scaling-stroke; }
.event-marker circle { fill: #fff; stroke-width: 3; vector-effect: non-scaling-stroke; }
.event-marker text { font-family: "Dana", Tahoma, sans-serif; font-size: 10px; font-weight: 700; }
.event-marker.expense line, .event-marker.expense circle { stroke: var(--orange-600); }
.event-marker.expense text { fill: var(--orange-600); }
.event-marker.income line, .event-marker.income circle { stroke: var(--green-700); }
.event-marker.income text { fill: var(--green-700); }
.risk-marker line { stroke: var(--red-700); stroke-width: 1.5; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.risk-marker circle { fill: #fff; stroke: var(--red-700); stroke-width: 3; vector-effect: non-scaling-stroke; }
.risk-marker rect { fill: var(--red-700); }
.risk-marker text { fill: #fff; font-size: 10px; font-family: "Dana", Tahoma, sans-serif; text-anchor: middle; }
.cash-timeline-heading { display: flex; align-items: center; gap: 10px; padding-top: 16px; border-top: 1px solid var(--soft-line); }
.cash-timeline-heading > i { color: var(--blue-600); }
.cash-timeline-heading b, .cash-timeline-heading small { display: block; }
.cash-timeline-heading b { color: var(--navy-900); font-size: 10px; }
.cash-timeline-heading small { color: var(--muted); font-size: 8px; }
.cash-timeline { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.cash-event { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 10px; min-width: 0; padding: 11px 12px; border-radius: 12px; background: var(--green-100); }
.cash-event-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--green-700); background: rgba(255,255,255,.62); }
.cash-event span:not(.cash-event-icon), .cash-event strong, .cash-event b { display: block; }
.cash-event strong { color: var(--navy-900); font-size: 10px; }
.cash-event span:not(.cash-event-icon) { color: var(--muted); font-size: 8px; }
.cash-event b { direction: ltr; text-align: right; color: var(--green-700); font-size: 11px; }
.cash-event.negative { background: var(--red-100); }
.cash-event.negative .cash-event-icon, .cash-event.negative b { color: var(--red-700); }
.cash-event.outside { background: var(--blue-50); }
.cash-event.outside .cash-event-icon, .cash-event.outside b { color: var(--blue-700); }
.cash-action { max-width: 1250px; margin: 16px auto 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 20px; border: 1px solid #f1d7bd; border-radius: 16px; background: #fffaf5; }
.cash-action > div { display: flex; align-items: center; gap: 12px; }
.action-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px; color: #fff; background: var(--orange-500); font-size: 16px; }
.cash-action strong, .cash-action small { display: block; }
.cash-action strong { font-size: 12px; }
.cash-action small { color: var(--muted); font-size: 10px; margin-top: 2px; }
.cash-action button { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; border: 0; border-radius: 11px; padding: 10px 14px; color: #fff; background: var(--orange-600); cursor: pointer; font-size: 11px; font-weight: 700; }
.cash-action button:disabled { cursor: default; background: var(--green-700); opacity: .82; }

.final-report { max-width: 1080px; margin: 0 auto; padding: 28px 0 10px; }
.report-toolbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; margin-bottom: 18px; }
.report-toolbar > div { text-align: center; }
.report-toolbar > div strong, .report-toolbar > div small { display: block; }
.report-toolbar > div strong { color: var(--navy-900); font-size: 13px; }
.report-toolbar > div small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.report-toolbar .primary-button { justify-self: end; }
.report-sheet { overflow: hidden; border: 1px solid var(--line); border-radius: 22px; padding: 30px; background: #fff; box-shadow: var(--shadow); }
.report-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.report-brand { display: flex; align-items: center; gap: 11px; }
.report-brand img { width: 44px; height: 44px; object-fit: contain; }
.report-brand strong, .report-brand small, .report-date span, .report-date strong { display: block; }
.report-brand strong { color: var(--navy-900); font-size: 22px; line-height: 1.2; }
.report-brand small, .report-date span { color: var(--muted); font-size: 9px; }
.report-date { text-align: left; }
.report-date strong { margin-top: 3px; color: var(--navy-900); font-size: 12px; }
.report-identity { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.report-identity > div { padding: 11px 13px; border-radius: 11px; background: var(--blue-50); }
.report-identity span, .report-identity strong { display: block; }
.report-identity span { color: var(--muted); font-size: 8px; }
.report-identity strong { margin-top: 2px; overflow-wrap: anywhere; color: var(--navy-900); font-size: 11px; }
.report-verdict { display: grid; grid-template-columns: 48px 1fr; align-items: center; gap: 15px; padding: 18px 20px; border: 1px solid #b8dfd2; border-radius: 16px; background: linear-gradient(135deg, #effaf6, #f9fdfb); }
.report-verdict.danger { border-color: #efb0b0; background: linear-gradient(135deg, #fff3f3, #fffafa); }
.report-verdict.warning { border-color: #efd59d; background: linear-gradient(135deg, #fff8e8, #fffdf8); }
.report-verdict-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; color: #fff; background: var(--green-700); font-size: 20px; }
.report-verdict.danger .report-verdict-icon { background: var(--red-700); }
.report-verdict.warning .report-verdict-icon { background: var(--amber-700); }
.report-verdict > div > span { color: var(--green-700); font-size: 9px; font-weight: 700; }
.report-verdict.danger > div > span { color: var(--red-700); }
.report-verdict.warning > div > span { color: var(--amber-700); }
.report-verdict h1 { margin: 2px 0 1px; color: var(--navy-950); font-size: 22px; line-height: 1.5; }
.report-verdict p { margin: 0; color: var(--muted); font-size: 10px; }
.report-section { margin-top: 18px; }
.report-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.report-section-heading span { color: var(--navy-900); font-size: 12px; font-weight: 800; }
.report-section-heading small { color: var(--muted); font-size: 8px; }
.report-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.report-metrics > div { min-width: 0; padding: 12px 13px; border: 1px solid var(--line); border-radius: 12px; }
.report-metrics span, .report-metrics strong, .report-metrics small { display: block; }
.report-metrics span { color: var(--muted); font-size: 8px; }
.report-metrics strong { direction: ltr; text-align: right; margin-top: 3px; color: var(--navy-900); font-size: 17px; line-height: 1.25; overflow-wrap: anywhere; }
.report-metrics small { margin-top: 2px; color: var(--muted); font-size: 7.5px; }
.report-insights { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.report-insight { display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 11px; padding: 13px; border-radius: 13px; background: #f8fafb; }
.report-insight-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; }
.report-insight-icon.campaign { color: var(--orange-600); background: var(--orange-100); }
.report-insight-icon.cashflow { color: var(--blue-700); background: var(--blue-100); }
.report-insight span, .report-insight strong { display: block; }
.report-insight span { color: var(--muted); font-size: 8px; }
.report-insight strong { margin-top: 1px; color: var(--navy-900); font-size: 11px; }
.report-insight p { margin: 2px 0 0; color: var(--muted); font-size: 8px; line-height: 1.7; }
.report-action-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: 0; padding: 0; list-style: none; counter-reset: report-action; }
.report-action-list li { position: relative; min-height: 78px; padding: 11px 43px 11px 12px; border: 1px solid #efd7c0; border-radius: 12px; background: #fffaf5; counter-increment: report-action; font-size: 9px; line-height: 1.8; }
.report-action-list li::before { content: counter(report-action); position: absolute; top: 11px; right: 11px; display: grid; place-items: center; width: 23px; height: 23px; border-radius: 8px; color: #fff; background: var(--orange-600); font-weight: 800; }
.report-assumptions { margin-top: 14px; padding: 10px 12px; border-radius: 11px; color: var(--muted); background: var(--blue-50); }
.report-assumptions strong { color: var(--blue-700); font-size: 9px; }
.report-assumptions p { display: inline; margin: 0 6px 0 0; font-size: 8px; }
.report-disclaimer { margin-top: 13px; padding-top: 10px; border-top: 1px solid var(--line); color: #7c8992; text-align: center; font-size: 7.5px; }

.step-actions { position: fixed; right: 310px; left: 0; bottom: 0; z-index: 4; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; padding: 16px 46px; border-top: 1px solid var(--line); background: rgba(255,255,255,.92); backdrop-filter: blur(14px); }
.primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: max-content; min-height: 44px; border-radius: 12px; padding: 0 17px; cursor: pointer; font-weight: 700; font-size: 12px; }
.primary-button { justify-self: end; border: 0; color: #fff; background: var(--navy-800); box-shadow: 0 8px 18px rgba(22,59,93,.18); }
.primary-button:hover { background: var(--navy-900); }
.primary-button:disabled { cursor: not-allowed; color: #8a9aa5; background: #e3e9ed; box-shadow: none; }
.secondary-button { border: 1px solid var(--line); background: #fff; }
.secondary-button:disabled { opacity: .4; cursor: not-allowed; }
.autosave-note { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 9px; }
.autosave-note span { width: 7px; height: 7px; border-radius: 50%; background: #58b899; }
.toast { position: fixed; z-index: 20; left: 30px; bottom: 94px; transform: translateY(20px); padding: 12px 15px; border-radius: 11px; color: #fff; background: var(--navy-950); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .25s ease; font-size: 11px; }
.toast.show { opacity: 1; transform: none; }

@media (max-width: 1120px) {
  .app-shell { grid-template-columns: 265px minmax(0, 1fr); }
  .sidebar { padding-inline: 18px; }
  .main-content { padding-inline: 28px; }
  .step-actions { right: 265px; padding-inline: 28px; }
  .unit-layout, .pricing-layout, .campaign-grid { grid-template-columns: 1fr; }
  .results-column { grid-template-columns: 1.1fr .9fr; }
  .recommendation { grid-column: 1 / -1; }
  .cashflow-overview-grid { grid-template-columns: 1fr; }
  .cashflow-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cash-milestones { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .app-shell { display: block; }
  .sidebar { position: static; width: auto; height: auto; overflow: visible; padding: 16px 18px; }
  .sidebar > .brand, .journey-copy, .sidebar-note { display: none; }
  .step-nav { grid-template-columns: repeat(3, 1fr); margin: 0; gap: 6px; }
  .step-link { grid-template-columns: 30px 1fr; gap: 7px; padding: 9px; border-radius: 12px; }
  .step-number { width: 28px; height: 28px; border-radius: 8px; }
  .step-link small, .step-state { display: none; }
  .step-link strong { font-size: 10px; }
  .main-content { padding: 0 18px 24px; }
  .topbar { height: 70px; }
  .mobile-brand { display: flex; align-items: center; gap: 7px; color: var(--navy-900); }
  .mobile-brand img { width: 32px; height: 32px; object-fit: contain; }
  .progress-wrap { flex: 1; }
  .step-panel { padding-top: 28px; }
  .step-actions {
    position: static;
    margin: 28px -18px -24px;
    padding: 13px 18px;
  }
  .autosave-note { display: none; }
  .step-actions { grid-template-columns: 1fr 1fr; }
  .secondary-button { justify-self: start; }
  .results-column { grid-template-columns: 1fr; }
  .recommendation { grid-column: auto; }
  .cash-timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .goal-chooser { padding-top: 30px; }
  .goal-options { grid-template-columns: 1fr; }
  .goal-option { min-height: 130px; grid-template-columns: 44px 1fr 18px; padding: 18px 16px; }
  .goal-option-icon { width: 42px; height: 42px; border-radius: 12px; }
  .goal-option b { font-size: 14px; }
  .page-heading { display: block; }
  .connected-pill, .context-product, .period-control { width: max-content; margin-top: 14px; }
  .period-control { justify-items: start; }
  .cashflow-summary-grid { grid-template-columns: 1fr; }
  .two-col, .installment-fields, .campaign-price-row, .pricing-price-pair, .price-ladder-columns { grid-template-columns: 1fr; }
  .price-profit-summary { grid-template-columns: 1fr; gap: 9px; }
  .pricing-metrics { grid-template-columns: 1fr; }
  .pricing-metric:nth-child(odd) { padding-left: 0; border-left: 0; }
  .pricing-metric:nth-child(even) { padding-right: 0; }
  .pricing-metric:nth-last-child(2) { border-bottom: 1px solid var(--soft-line); }
  .auto-rate { grid-template-columns: 34px 1fr; }
  .auto-rate .status-chip { grid-column: 2; width: max-content; }
  .cash-milestones, .cash-timeline, .campaign-summary-grid { grid-template-columns: 1fr; }
  .report-toolbar { grid-template-columns: 1fr 1fr; }
  .report-toolbar > div { display: none; }
  .report-identity, .report-metrics, .report-insights, .report-action-list { grid-template-columns: 1fr; }
  .report-sheet { padding: 20px 16px; border-radius: 17px; }
  .report-header { align-items: flex-start; }
  .report-verdict { grid-template-columns: 40px 1fr; padding: 15px; }
  .report-verdict-icon { width: 40px; height: 40px; border-radius: 12px; }
  .report-verdict h1 { font-size: 18px; }
  .cash-verdict-card { padding: 22px; }
  .cash-chart-guide { display: grid; gap: 7px; }
  .chart-header { display: block; }
  .chart-legend { margin-top: 10px; }
  .cash-chart-wrap { height: 280px; overflow: hidden; }
  #cashChart { min-width: 0; }
  .cash-action { align-items: stretch; flex-direction: column; }
  .cash-action button { width: 100%; }
  .step-actions { gap: 8px; padding-inline: 12px; }
  .primary-button, .secondary-button { width: 100%; padding-inline: 10px; }
  .primary-button { justify-self: stretch; }
  .toast { left: 18px; right: 18px; text-align: center; }
}

@media (max-width: 520px) {
  .basalam-connect-button { width: 40px; padding: 0; justify-content: center; }
  .basalam-connect-button span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@page { size: A4; margin: 10mm; }

@media print {
  html, body { min-width: 0; background: #fff !important; }
  body { font-size: 10pt; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .sidebar, .topbar, .step-panel, .step-actions, .screen-only, .toast { display: none !important; }
  .app-shell, .main-content { display: block; min-height: 0; padding: 0; }
  .final-report { display: block !important; max-width: none; margin: 0; padding: 0; }
  .report-sheet { overflow: visible; border: 0; border-radius: 0; padding: 0; box-shadow: none; }
  .report-header { padding-bottom: 12px; }
  .report-brand img { width: 38px; height: 38px; }
  .report-identity { margin: 11px 0; }
  .report-verdict { padding: 13px 15px; }
  .report-verdict h1 { font-size: 17px; }
  .report-section { margin-top: 12px; }
  .report-metrics > div { padding: 9px 10px; }
  .report-metrics strong { font-size: 14px; }
  .report-insights { margin-top: 10px; }
  .report-insight { padding: 10px; }
  .report-action-list li { min-height: 66px; padding-top: 9px; padding-bottom: 9px; }
  .report-assumptions { margin-top: 10px; }
  .report-disclaimer { margin-top: 10px; }
  .report-verdict, .report-metrics > div, .report-insight, .report-action-list li, .report-assumptions { break-inside: avoid; page-break-inside: avoid; }
}
