:root {
  color-scheme: light;
  --navy: #0b2f58;
  --blue: #1769c2;
  --muted: #60748c;
  --line: #d9e3ef;
  --surface: #ffffff;
  --bg: #f3f7fb;
  --ok: #168b55;
  --warning: #d89517;
  --error: #d53d4b;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--navy); }
.topbar { min-height: 74px; padding: 12px clamp(18px, 4vw, 52px); display: flex; align-items: center; justify-content: space-between; gap: 20px; background: #fff; border-bottom: 3px solid var(--navy); position: sticky; top: 0; z-index: 10; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand img { width: 46px; height: 46px; border-radius: 50%; }
.brand span { display: grid; }
.brand strong { font-size: 18px; }
.brand small, .top-actions span { color: var(--muted); }
.top-actions { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.top-actions button, .top-actions a { border: 1px solid #b9cbe0; background: white; color: var(--navy); border-radius: 10px; padding: 10px 14px; font-weight: 700; text-decoration: none; cursor: pointer; }
main { width: min(1500px, calc(100% - 36px)); margin: 28px auto 60px; }
.hero { padding: 30px 34px; border-radius: 20px; background: linear-gradient(115deg, #092d56, #1769c2); color: white; display: flex; justify-content: space-between; align-items: center; gap: 24px; box-shadow: 0 18px 38px #0b35652e; }
.hero h1 { font-size: clamp(26px, 4vw, 42px); margin: 5px 0 8px; max-width: 820px; letter-spacing: -.03em; }
.hero p { margin: 0; color: #dfeeff; }
.eyebrow { margin: 0; color: #55749c; font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.hero .eyebrow { color: #90d6ff; }
.overall { min-width: 220px; padding: 16px 18px; background: #ffffff17; border: 1px solid #ffffff33; border-radius: 14px; display: flex; align-items: center; gap: 10px; }
.pulse { width: 12px; height: 12px; border-radius: 50%; background: #8da1b8; box-shadow: 0 0 0 7px #ffffff15; }
.overall.ok .pulse { background: #49df98; }.overall.warning .pulse { background: #ffc95e; }.overall.error .pulse { background: #ff6c7a; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 20px 0; }
.kpi { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; box-shadow: 0 8px 22px #1a4d7e0b; }
.kpi::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--blue); }
.kpi.ok::before { background: var(--ok); }.kpi.warning::before { background: var(--warning); }.kpi.error::before { background: var(--error); }
.kpi span, .kpi small { display: block; color: var(--muted); }.kpi span { font-weight: 700; }.kpi strong { display: block; font-size: 34px; margin: 4px 0 2px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: 0 10px 28px #143b6510; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.panel-heading h2 { margin: 3px 0 0; font-size: 21px; }
.legend { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 12px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }.dot.ok { background: var(--ok); }.dot.warning { background: var(--warning); }.dot.error { background: var(--error); }
.source-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.source { border: 1px solid var(--line); border-left: 5px solid var(--blue); border-radius: 14px; padding: 17px; min-width: 0; }
.source.ok { border-left-color: var(--ok); }.source.warning { border-left-color: var(--warning); }.source.error { border-left-color: var(--error); }
.source-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.source h3 { margin: 0; font-size: 16px; }
.badge { font-size: 10px; text-transform: uppercase; font-weight: 900; letter-spacing: .07em; padding: 5px 8px; border-radius: 999px; background: #e6f5ed; color: var(--ok); }
.source.warning .badge { background: #fff3db; color: #a66b00; }.source.error .badge { background: #fde8eb; color: var(--error); }
.source dl { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; margin: 16px 0 10px; font-size: 13px; }.source dt { color: var(--muted); }.source dd { margin: 0; font-weight: 750; text-align: right; }.source p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.lower-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 20px; margin-top: 20px; }
.reconciliation { display: grid; gap: 12px; }.reconciliation .check { padding: 18px; border-radius: 14px; background: #eef8f3; border: 1px solid #c5e8d5; }.reconciliation .check.error { background: #fff0f1; border-color: #f1c6cc; }.check strong { display: block; font-size: 18px; }.check span { color: var(--muted); font-size: 13px; }
.alert-total { min-width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: #eaf2fb; font-weight: 900; }
.alert-list { display: grid; gap: 10px; max-height: 430px; overflow: auto; }.alert { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 13px; border: 1px solid var(--line); border-radius: 12px; }.alert-icon { width: 10px; height: 10px; border-radius: 50%; background: var(--blue); }.alert.high .alert-icon { background: var(--error); }.alert.medium .alert-icon { background: var(--warning); }.alert strong { display: block; font-size: 13px; }.alert p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }.alert-count { font-weight: 900; font-size: 18px; }
.empty { color: var(--muted); padding: 22px; text-align: center; background: #f6fafc; border-radius: 12px; }
@media (max-width: 980px) { .kpis { grid-template-columns: repeat(2, 1fr); }.source-grid { grid-template-columns: repeat(2, 1fr); }.lower-grid { grid-template-columns: 1fr; } }
@media (max-width: 650px) { .topbar { position: static; align-items: flex-start; }.top-actions { flex-wrap: wrap; justify-content: flex-end; }.top-actions span { width: 100%; text-align: right; }.brand small { display: none; } main { width: min(100% - 20px, 1500px); margin-top: 12px; }.hero { padding: 24px 20px; display: grid; }.overall { min-width: 0; }.kpis, .source-grid { grid-template-columns: 1fr; }.panel { padding: 18px; }.legend { display: none; } }
