:root {
  --shell-yellow: #ffd500;
  --shell-red: #d3222a;
  --ink: #17202a;
  --muted: #667085;
  --line: #e2e7ed;
  --paper: #ffffff;
  --surface: #f5f7f9;
  --good: #127a3d;
  --warn: #b65c00;
  --bad: #b42318;
  --blue: #2457a6;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: #f1f4f7;
  -webkit-font-smoothing: antialiased;
}

.report-hero { display:flex; justify-content:space-between; gap:24px; align-items:center; padding:24px; background:linear-gradient(120deg,#fff9d9,#fff); border:1px solid #eadf9b; border-radius:10px; margin-bottom:16px; }
.report-hero h2 { font-size:clamp(1.35rem,2vw,1.8rem); margin-bottom:6px; }
.report-hero p:last-child { margin:0; color:var(--muted); }
.report-progress { width:92px; height:92px; border-radius:50%; background:var(--paper); border:8px solid var(--shell-yellow); display:grid; place-content:center; text-align:center; flex:0 0 auto; }
.report-progress strong { font-size:1.25rem; }.report-progress span { font-size:.7rem; color:var(--muted); }
.report-layout { display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:16px; align-items:start; }
.daily-report-form { display:grid; grid-template-columns:1fr; gap:12px; }
.report-card,.mail-panel { background:var(--paper); border:1px solid var(--line); border-radius:10px; padding:18px; box-shadow:0 4px 14px rgba(23,32,42,.04); }
.report-card-title { display:flex; gap:12px; align-items:flex-start; margin-bottom:16px; }.report-card-title>span { width:30px;height:30px;border-radius:50%;background:var(--shell-red);color:#fff;display:grid;place-items:center;font-weight:800;flex:0 0 auto; }
.report-card-title h3,.mail-panel h3 { margin:0 0 4px; }.report-card-title p { margin:0;color:var(--muted);font-size:.88rem; }
.report-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }.report-grid .full { grid-column:1/-1; }
textarea,select { width:100%; min-width:0; border:1px solid var(--line); border-radius:8px; padding:10px; background:#fff; font:inherit; } textarea { resize:vertical; }
fieldset.status-choice { border:0; padding:0; margin:0; display:grid; grid-template-columns:repeat(3,1fr); gap:8px; } fieldset.status-choice legend { font-weight:700; margin-bottom:7px; }.status-choice label { display:block; }.status-choice input { position:absolute;opacity:0; }.choice { display:block;padding:11px;border:2px solid var(--line);border-radius:8px;text-align:center;cursor:pointer }.choice.green{color:var(--good)}.choice.yellow{color:var(--warn)}.choice.red{color:var(--bad)}.status-choice input:checked+.choice{border-color:currentColor;background:#f8fafb;box-shadow:0 0 0 2px currentColor inset}
.report-actions { display:flex;justify-content:flex-end;gap:10px;padding:6px 0 18px; }.mail-panel { position:sticky;top:12px;display:grid;gap:12px;border-top:5px solid var(--shell-yellow); }.toggle-line { display:flex;grid-template-columns:auto 1fr;align-items:center;gap:9px; }.toggle-line input { min-height:auto; }.mail-status{padding:10px;border-radius:8px;background:#f2f4f7;color:var(--muted);font-size:.88rem}.mail-status.ready{background:#e7f6ed;color:var(--good)}.mail-preview{border:1px solid var(--line);background:#fbfcfd;border-radius:8px;padding:12px;max-height:330px;overflow:auto}.mail-preview pre{white-space:pre-wrap;font:inherit;font-size:.82rem;color:#344054;margin:10px 0 0}.full-button{width:100%}.privacy-note{font-size:.78rem;color:var(--muted);margin:0}
@media (max-width:900px){.report-layout{grid-template-columns:1fr}.mail-panel{position:static}.report-grid{grid-template-columns:1fr}.report-grid .full{grid-column:auto}}
@media (max-width:600px){.report-hero{align-items:flex-start}.report-progress{width:74px;height:74px;border-width:6px}.status-choice{grid-template-columns:1fr!important}.report-actions{display:grid;grid-template-columns:1fr 1fr}}

button,
input,
select {
  font: inherit;
}

.topbar {
  min-height: 76px;
  padding: 14px clamp(18px, 4vw, 44px);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  border-top: 5px solid var(--shell-yellow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  box-shadow: 0 1px 0 rgba(23, 32, 42, 0.03);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 10px;
  height: 38px;
  border-radius: 3px;
  background: var(--shell-red);
  flex: 0 0 auto;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--shell-red);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
  line-height: 1.1;
  font-weight: 780;
}

h2 {
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.date-pill,
.metric,
.panel,
.briefing-band,
.source-card,
.source-box {
  border: 1px solid var(--line);
  background: var(--paper);
}

.date-pill {
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--muted);
  white-space: nowrap;
}

main {
  width: min(1600px, 100%);
  margin: 0 auto;
  padding: 16px clamp(12px, 2vw, 28px) 32px;
}

.briefing-band {
  border-top: 5px solid var(--shell-yellow);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  padding: 22px;
  border-radius: 8px;
  align-items: center;
}

.briefing-copy h2 {
  font-size: clamp(1.25rem, 2.2vw, 1.8rem);
  margin-bottom: 8px;
}

.briefing-copy p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  max-width: 72ch;
}

.briefing-actions,
.section-header,
.tabs {
  display: flex;
  align-items: center;
  gap: 10px;
}

.briefing-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

button,
.file-control,
.sync-pill {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 800;
}

.sync-pill {
  background: #e7f6ed;
  color: var(--good);
  border-color: #b7e4c6;
  cursor: default;
}

.primary {
  background: var(--shell-red);
  color: white;
}

.secondary,
.tab {
  background: white;
  color: var(--ink);
  border-color: var(--line);
}

.file-control input {
  display: none;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 10px;
  margin: 0 0 18px;
  align-items: stretch;
}

.metric {
  min-height: 112px;
  height: 100%;
  border-radius: 6px;
  padding: 14px;
  display: grid;
  align-content: space-between;
  border-top: 3px solid #8b96a5;
  box-shadow: 0 4px 12px rgba(23, 32, 42, 0.045);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.metric:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(23, 32, 42, 0.07);
}

.metric span,
.metric small,
.panel-title p,
.section-header span {
  color: var(--muted);
}

.metric strong {
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.metric.alert {
  border-top-color: var(--shell-red);
}

.metric.alert strong {
  color: var(--bad);
}

.workspace {
  display: block;
}

.panel,
.main-panel {
  border-radius: 8px;
}

.input-panel {
  padding: 18px;
}

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

.panel-title p {
  margin: 0;
}

form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.source-box {
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
  background: #fbfcfd;
}

.source-box p {
  margin: 5px 0 0;
  color: var(--muted);
}

.delay-control {
  margin-bottom: 14px;
}

.stepper {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.stepper span {
  color: var(--muted);
  font-weight: 800;
}

label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 0.9rem;
  font-weight: 700;
}

form > label:first-child,
form > label:nth-child(2),
.full {
  grid-column: 1 / -1;
}

input {
  min-width: 0;
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 8px 10px;
  background: white;
}

.main-panel {
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  min-height: 720px;
  overflow: hidden;
  border-color: #dfe5eb;
  box-shadow: 0 14px 34px rgba(23, 32, 42, 0.07);
}

.tabs {
  grid-column: 1;
  grid-row: 1;
  padding: 18px 12px;
  border-right: 1px solid var(--line);
  background: #f8fafb;
  align-items: stretch;
  flex-direction: column;
  gap: 3px;
}

.tab {
  white-space: nowrap;
  min-height: 40px;
  width: 100%;
  justify-content: flex-start;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 4px;
  padding: 0 12px;
  color: #475467;
  background: transparent;
  font-weight: 700;
}

.tab:hover {
  color: var(--ink);
  background: #eceff3;
}

.tab.active {
  background: #fff0f1;
  color: var(--shell-red);
  border-left-color: var(--shell-red);
}

.nav-section {
  margin: 14px 12px 5px;
  color: #8a94a3;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.nav-section:first-child {
  margin-top: 0;
}

.tab-content {
  display: none;
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  padding: 24px;
}

.tab-content.active {
  display: block;
}

.overview-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: start;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.overview-header h2 {
  margin-bottom: 7px;
  font-size: clamp(1.35rem, 2vw, 1.85rem);
}

.overview-header p:last-child {
  margin-bottom: 0;
  max-width: 78ch;
  color: var(--muted);
  line-height: 1.5;
}

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

.data-basis-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: -6px 0 22px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafb;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.data-basis-strip > div {
  min-width: 0;
  padding: 11px 14px;
  border-right: 1px solid var(--line);
}

.data-basis-strip > div:last-child {
  border-right: 0;
}

.data-basis-strip span,
.data-basis-strip strong {
  display: block;
  overflow-wrap: anywhere;
}

.data-basis-strip span {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
}

.data-basis-strip strong {
  font-size: 0.86rem;
}

.section-step {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 10px;
  color: var(--shell-red);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.section-step span {
  display: inline;
  width: auto;
  height: auto;
  color: inherit;
  background: transparent;
}

.section-step span::after {
  content: " ·";
}

.day-comparison-panel {
  margin-bottom: 18px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.day-comparison-panel > .section-note {
  margin-top: -4px;
}

.day-comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.day-comparison-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
  border-radius: 8px;
  background: white;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(23, 32, 42, 0.055);
  height: 100%;
  display: grid;
  grid-template-rows: auto auto auto minmax(58px, 1fr) auto;
}

.day-comparison-card.good {
  border-top-color: var(--good);
  color: var(--ink);
  background: white;
}

.day-comparison-card.warn {
  border-top-color: var(--warn);
  color: var(--ink);
  background: white;
}

.day-comparison-card.bad {
  border-top-color: var(--bad);
  color: var(--ink);
  background: white;
}

.day-comparison-head,
.day-comparison-main,
.comparison-list,
.comparison-insight {
  margin-left: 15px;
  margin-right: 15px;
}

.day-comparison-head {
  min-height: 64px;
  padding: 13px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.day-comparison-main {
  padding: 14px 0;
  display: grid;
  gap: 4px;
}

.day-comparison-main span,
.day-comparison-main small,
.comparison-list span,
.outlook-band span,
.outlook-band small {
  color: var(--muted);
}

.day-comparison-main > strong {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-variant-numeric: tabular-nums;
}

.comparison-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.comparison-list > div {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 7px;
}

.comparison-list strong,
.comparison-list span {
  display: block;
}

.comparison-list .badge {
  width: fit-content;
}

.comparison-missing {
  color: var(--muted);
  font-size: 0.86rem;
}

.comparison-insight {
  min-height: 58px;
  padding: 12px 0;
  margin-bottom: 0;
  color: #344054;
  line-height: 1.45;
}

.outlook-band {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px 15px;
  background: #f5f7f9;
  border-top: 1px solid var(--line);
}

.outlook-band > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.outlook-band strong,
.outlook-band span {
  display: block;
}

.outlook-band small {
  grid-column: 1 / -1;
}

.empty-comparison {
  padding: 16px;
  color: var(--muted);
}

.empty-comparison p {
  margin: 8px 0 0;
}

.section-header {
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.section-header h2 {
  margin-bottom: 0;
}

.briefing-text {
  display: grid;
  gap: 12px;
}

.visually-hidden {
  display: none;
}

.cockpit-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: start;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}

.cockpit-hero h2 {
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  margin-bottom: 8px;
}

.cockpit-hero p {
  color: var(--muted);
  margin-bottom: 0;
  max-width: 76ch;
}

.cockpit-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cockpit-alerts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.cockpit-alert {
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.cockpit-alert.good {
  border-left-color: var(--good);
}

.cockpit-alert.warn {
  border-left-color: var(--warn);
}

.cockpit-alert.bad {
  border-left-color: var(--bad);
}

.cockpit-alert strong,
.cockpit-alert p {
  display: block;
  margin: 0;
}

.cockpit-alert p {
  margin-top: 5px;
  color: var(--muted);
}

.station-command-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.diagnosis-panel {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
  margin-bottom: 14px;
}

.diagnosis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.diagnosis-card {
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
  height: 100%;
}

.diagnosis-card.good {
  border-left-color: var(--good);
}

.diagnosis-card.warn {
  border-left-color: var(--warn);
}

.diagnosis-card.bad {
  border-left-color: var(--bad);
}

.diagnosis-card.good,
.diagnosis-card.warn,
.diagnosis-card.bad,
.diagnosis-card.blue {
  color: var(--ink);
  background: #fbfcfd;
}

.diagnosis-card > p {
  margin: 10px 0 0;
  color: var(--muted);
}

.diagnosis-card > p strong {
  color: var(--ink);
  margin-right: 6px;
}

.diagnosis-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.diagnosis-kpis div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: white;
}

.diagnosis-kpis span,
.diagnosis-kpis strong {
  display: block;
}

.diagnosis-kpis span {
  color: var(--muted);
  font-size: 0.86rem;
}

.command-card {
  border: 1px solid var(--line);
  border-top: 5px solid var(--blue);
  border-radius: 8px;
  padding: 16px;
  background: white;
  box-shadow: 0 5px 16px rgba(23, 32, 42, 0.045);
  height: 100%;
  display: grid;
  grid-template-rows: auto auto 1fr;
}

.command-card.good {
  border-top-color: var(--good);
}

.command-card.warn {
  border-top-color: var(--warn);
}

.command-card.bad {
  border-top-color: var(--bad);
}

.command-card.planned,
.station-card.planned {
  border-top: 4px solid #98a2b3;
  background: #f8f9fb;
}

.command-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 18px;
}

.command-card-head strong,
.station-number {
  display: block;
}

.station-number {
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 4px;
}

.status-dot {
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.status-dot.good {
  background: #e7f6ed;
  color: var(--good);
}

.status-dot.warn {
  background: #fff3e0;
  color: var(--warn);
}

.status-dot.bad {
  background: #fee4e2;
  color: var(--bad);
}

.status-dot.planned {
  background: #eaecf0;
  color: #475467;
}

.command-main {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
}

.command-main span,
.command-main small,
.command-kpis span {
  color: var(--muted);
}

.command-main strong {
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  font-variant-numeric: tabular-nums;
}

.command-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-self: end;
}

.command-kpis div {
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: #fbfcfd;
}

.command-kpis span,
.command-kpis strong {
  display: block;
}

.cockpit-lower {
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.35fr);
  gap: 14px;
  align-items: start;
}

.cockpit-insights {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 14px;
  margin-top: 14px;
}

.next-actions-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
}

.insight-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
}

.briefing-card,
.issue,
.recommendation,
.empty-state {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
}

.briefing-card strong,
.issue strong,
.recommendation strong {
  display: block;
  margin-bottom: 5px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}

.section-note,
.data-footnote {
  color: var(--muted);
  line-height: 1.5;
}

.section-note {
  margin-bottom: 16px;
  max-width: 82ch;
}

.data-footnote {
  margin: 12px 0 0;
  font-size: 0.86rem;
}

.kpi-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.kpi-overview-item {
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  display: grid;
  align-content: space-between;
  gap: 8px;
}

.kpi-overview-item span {
  color: var(--muted);
  font-size: 0.86rem;
}

.kpi-overview-item strong {
  font-size: 1.08rem;
}

.kpi-daily-table table {
  min-width: 1560px;
}

.kpi-daily-table th:first-child,
.kpi-daily-table td:first-child {
  min-width: 150px;
}

.kpi-daily-table th:nth-child(2),
.kpi-daily-table td:nth-child(2) {
  min-width: 260px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  font-size: 0.92rem;
}

.detail-disclosure {
  margin-top: 18px;
  border-top: 1px solid var(--line);
}

.detail-disclosure summary {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  color: #344054;
  font-weight: 800;
}

.detail-disclosure summary::marker {
  color: var(--shell-red);
}

.detail-disclosure summary strong {
  color: var(--muted);
  font-size: 0.86rem;
}

.disclosure-content {
  padding: 4px 0 8px;
}

th,
td {
  padding: 11px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f0f2f5;
  color: #344054;
  font-size: 0.86rem;
}

tbody tr:nth-child(even) {
  background: #fafbfc;
}

tbody tr:hover {
  background: #fffbea;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
}

.good {
  background: #e7f6ed;
  color: var(--good);
}

.warn {
  background: #fff3e0;
  color: var(--warn);
}

.bad {
  background: #fee4e2;
  color: var(--bad);
}

.blue {
  background: #e8f0ff;
  color: var(--blue);
}

.issue-list,
.action-stack {
  display: grid;
  gap: 10px;
}

.focus-list {
  margin-bottom: 14px;
}

.cash-diagnostic-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 10px;
}

.cash-management-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.cash-management-card {
  border: 1px solid var(--line);
  border-top: 5px solid var(--good);
  border-radius: 8px;
  padding: 13px;
  background: white;
}

.cash-management-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.cash-management-kpis div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: #fbfcfd;
}

.cash-management-kpis span,
.cash-management-kpis strong {
  display: block;
}

.cash-management-kpis span {
  color: var(--muted);
  font-size: 0.86rem;
}

.cash-diagnostic-metric {
  min-height: 88px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
  display: grid;
  align-content: space-between;
}

.cash-diagnostic-metric span {
  color: var(--muted);
}

.cash-diagnostic-metric strong {
  font-size: 1.25rem;
}

.cash-pattern-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.cash-pattern-card {
  border: 1px solid var(--line);
  border-left: 5px solid var(--warn);
  border-radius: 8px;
  padding: 13px;
  background: white;
  color: var(--ink);
}

.cash-pattern-card.bad {
  border-left-color: var(--bad);
  background: white;
  color: var(--ink);
}

.cash-pattern-card.warn {
  border-left-color: var(--warn);
  background: white;
  color: var(--ink);
}

.cash-pattern-card p {
  margin: 9px 0 0;
  color: var(--muted);
}

.cash-pattern-card p strong {
  color: var(--ink);
}

.issue-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

.cash-focus-card {
  background: white;
}

.filter-band {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(190px, 250px) 1fr;
  gap: 16px;
  align-items: end;
  margin-bottom: 12px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  box-shadow: 0 3px 12px rgba(23, 32, 42, 0.035);
}

.filter-band > * {
  min-width: 0;
}

select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: white;
  padding: 8px 10px;
  font: inherit;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

select:focus-visible,
button:focus-visible {
  outline: 0;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(36, 87, 166, 0.16);
}

.filter-summary {
  min-width: 0;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: var(--muted);
  font-weight: 700;
  text-align: right;
  overflow-wrap: anywhere;
}

.split-view {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.8fr);
  gap: 12px;
  align-items: start;
}

.group-trend-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.group-trend-card {
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue);
  border-radius: 8px;
  padding: 12px;
  background: white;
  display: grid;
  gap: 7px;
}

.group-trend-card.good {
  border-left-color: var(--good);
}

.group-trend-card.warn {
  border-left-color: var(--warn);
}

.group-trend-card.bad {
  border-left-color: var(--bad);
}

.group-trend-card > span,
.trend-values small {
  color: var(--muted);
}

.trend-values {
  display: grid;
  gap: 2px;
}

.trend-values strong {
  font-size: 1.2rem;
}

.navigator-grid,
.station-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.mini-metric strong {
  font-size: 1.25rem;
}

.compact-table {
  margin-top: 12px;
}

.station-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
  box-shadow: 0 4px 14px rgba(23, 32, 42, 0.04);
  height: 100%;
  display: grid;
  grid-template-rows: auto auto 1fr;
}

.station-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
}

.station-card-header strong,
.station-card-header span {
  display: block;
}

.station-card-header span,
.station-kpis span,
.station-foot {
  color: var(--muted);
}

.station-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.station-kpis div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 10px;
}

.station-kpis strong,
.station-kpis span {
  display: block;
}

.station-foot {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  font-size: 0.9rem;
  align-self: end;
}

.station-command-grid,
.station-grid,
.group-trend-grid,
.navigator-grid,
.cash-management-grid,
.cash-pattern-grid,
.quality-summary,
.source-health-grid,
.catalog-summary,
.weekly-summary,
.kpi-overview,
.coverage-grid {
  align-items: stretch;
}

.station-command-grid > *,
.station-grid > *,
.group-trend-grid > *,
.navigator-grid > *,
.cash-management-grid > *,
.cash-pattern-grid > *,
.quality-summary > *,
.source-health-grid > *,
.catalog-summary > *,
.weekly-summary > *,
.kpi-overview > *,
.coverage-grid > * {
  height: 100%;
}

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

.quality-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.quality-metric {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #fbfcfd;
  display: grid;
  align-content: space-between;
}

.quality-metric span {
  color: var(--muted);
}

.quality-metric strong {
  font-size: 1.4rem;
}

.source-health-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.source-health-card {
  border: 1px solid var(--line);
  border-top: 5px solid var(--blue);
  border-radius: 8px;
  padding: 13px;
  background: white;
  color: var(--ink);
}

.source-health-card.good {
  border-top-color: var(--good);
  background: white;
  color: var(--ink);
}

.source-health-card.warn {
  border-top-color: var(--warn);
  background: white;
  color: var(--ink);
}

.source-health-card.bad {
  border-top-color: var(--bad);
  background: white;
  color: var(--ink);
}

.source-health-card.blue {
  border-top-color: var(--blue);
  background: white;
  color: var(--ink);
}

.source-health-number {
  margin: 12px 0 8px;
  font-size: 1.3rem;
  font-weight: 900;
}

.source-health-card p {
  margin: 8px 0 0;
  color: var(--muted);
}

.coverage-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eef4;
}

.coverage-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.quality-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.quality-detail {
  min-width: 0;
}

.source-notes {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.pending-file p {
  overflow-wrap: anywhere;
}

.coverage-grid,
.catalog-summary,
.weekly-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.weekly-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.trend-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 12px;
  background: #fbfcfd;
}

.bar-chart {
  display: grid;
  gap: 10px;
}

.trend-row {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(180px, 1fr) minmax(110px, auto);
  gap: 12px;
  align-items: center;
}

.trend-label strong,
.trend-label span {
  display: block;
}

.trend-label span {
  color: var(--muted);
  font-size: 0.86rem;
}

.trend-track {
  height: 16px;
  border-radius: 999px;
  overflow: hidden;
  background: #e9eef4;
}

.trend-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--shell-red);
}

.source-card {
  min-height: 130px;
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
}

.compact-source {
  min-height: 92px;
}

.subheader {
  margin-top: 18px;
}

.file-item {
  align-items: start;
}

.filename-cell {
  max-width: 360px;
  overflow-wrap: anywhere;
}

.source-card p {
  margin: 8px 0 0;
  color: var(--muted);
}

.issue,
.recommendation {
  display: grid;
  gap: 4px;
}

.issue p,
.recommendation p,
.empty-state p {
  margin-bottom: 0;
  color: var(--muted);
}

.recommendation.completed {
  border-color: #b7dfc5;
  background: #f5fbf7;
}

.recommendation.completed > strong,
.recommendation.completed > p {
  color: #667085;
}

.action-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.action-check {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  cursor: pointer;
}

.action-check input {
  width: 18px;
  height: 18px;
  min-height: 0;
  accent-color: var(--good);
}

.action-notes {
  margin-top: 9px;
}

.action-notes summary {
  width: fit-content;
  color: var(--blue);
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
}

.action-comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}

.action-history {
  display: grid;
  gap: 7px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.action-history li {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border-left: 3px solid #98a2b3;
  background: white;
}

.action-history time,
.action-empty-note {
  color: var(--muted);
  font-size: 0.78rem;
}

.action-archive {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.action-archive > summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
}

.action-archive-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.action-archive-item {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}

.action-archive-item > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

@media (max-width: 980px) {
  .briefing-band,
  .cockpit-hero,
  .workspace {
    grid-template-columns: 1fr;
  }

  .briefing-actions {
    justify-content: flex-start;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .main-panel {
    display: block;
    min-height: 0;
  }

  .tabs {
    padding: 9px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
  }

  .nav-section {
    display: none;
  }

  .tab {
    width: auto;
    flex: 0 0 auto;
    justify-content: center;
    border-left: 0;
    border-bottom: 3px solid transparent;
    border-radius: 4px;
  }

  .tab.active {
    border-left-color: transparent;
    border-bottom-color: var(--shell-red);
  }

  .overview-header {
    grid-template-columns: 1fr;
  }

  .overview-actions {
    justify-content: flex-start;
  }

  .source-grid {
    grid-template-columns: 1fr;
  }

  .data-basis-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .data-basis-strip > div:nth-child(2) {
    border-right: 0;
  }

  .data-basis-strip > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .filter-band,
  .cockpit-alerts,
  .station-command-grid,
  .diagnosis-grid,
  .cash-pattern-grid,
  .cash-management-grid,
  .quality-summary,
  .source-health-grid,
  .quality-detail-grid,
  .cockpit-lower,
  .cockpit-insights,
  .coverage-grid,
  .catalog-summary,
  .weekly-summary,
  .split-view,
  .group-trend-grid,
  .navigator-grid,
  .day-comparison-grid,
  .kpi-overview,
  .station-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .filter-summary {
    display: block;
    width: 100%;
    justify-content: flex-start;
    text-align: left;
  }

  .trend-row {
    grid-template-columns: 1fr;
  }

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

@media print {
  body {
    background: white;
  }

  .topbar,
  .filter-band,
  .input-panel,
  .tabs,
  .cockpit-tools {
    display: none !important;
  }

  main {
    width: 100%;
    padding: 0;
  }

  .workspace {
    display: block;
  }

  .main-panel {
    display: block;
    border: 0;
  }

  .tab-content {
    display: none !important;
  }

  #briefing {
    display: block !important;
    padding: 14px 0 0;
  }

  .briefing-band,
  .metric,
  .command-card,
  .diagnosis-card,
  .trend-panel,
  .next-actions-panel,
  .insight-panel {
    break-inside: avoid;
  }
}

@media (max-width: 620px) {
  .topbar,
  .section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .metric-grid,
  form {
    grid-template-columns: 1fr;
  }

  .data-basis-strip {
    grid-template-columns: 1fr;
  }

  .data-basis-strip > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .data-basis-strip > div:last-child {
    border-bottom: 0;
  }

  .filter-summary {
    line-height: 1.35;
  }

  .topbar {
    gap: 10px;
  }

  .brand-mark {
    height: 32px;
  }

  label:first-child,
  label:nth-child(2),
  .full {
    grid-column: auto;
  }

  .briefing-band,
  .cockpit-hero,
  .input-panel,
  .tab-content {
    padding: 14px;
  }

  .overview-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .overview-actions > * {
    width: 100%;
  }

  .comparison-list,
  .outlook-band {
    grid-template-columns: 1fr;
  }

  .outlook-band small {
    grid-column: auto;
  }

  .cockpit-hero {
    padding: 0 0 14px;
  }

  .command-kpis {
    grid-template-columns: 1fr;
  }
}
