@font-face { font-family: "Funnel Display"; font-weight: 300; src: url(/assets/fonts/FunnelDisplay-Light.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "Funnel Display"; font-weight: 400; src: url(/assets/fonts/FunnelDisplay-Regular.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "Inter"; font-weight: 400; src: url(/assets/fonts/Inter-Regular.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "Inter"; font-weight: 500; src: url(/assets/fonts/Inter-Medium.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "Inter"; font-weight: 600; src: url(/assets/fonts/Inter-SemiBold.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "Chivo Mono"; font-weight: 400; src: url(/assets/fonts/ChivoMono-Regular.ttf) format("truetype"); font-display: swap; }

:root {
  --shell: #F5F1E8; --sand: #E8E2D6; --ink: #1C1E22; --driftwood: #4A463F; --blue-deep: #0A68C9;
  --foam: #F2EFE8; --mist: #B9C2CC; --surface-light: #7FBCFF; --squid-blue: #0F87FF;
  --deep: #0B1A2E; --trench: #07111F; --card-light: rgba(58,101,136,.13); --line-light: rgba(58,101,136,.22);
  --ok: #1E7F4F; --warn: #9A6A00; --bad: #B3261E;
  --display: "Funnel Display", "Inter", system-ui, sans-serif; --text: "Inter", system-ui, sans-serif; --mono: "Chivo Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--text); font-size: 14px; line-height: 1.45; color: var(--ink); background: var(--shell); }
a { color: var(--blue-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--blue-deep); }
h1, h2, h3 { font-family: var(--display); font-weight: 300; margin: 0; }
h1 { font-size: 34px; line-height: 1.15; }
h2 { font-size: 24px; line-height: 1.2; }
h3 { font-family: var(--display); font-weight: 400; font-size: 17px; }
.muted { color: var(--driftwood); }
.mono { font-family: var(--mono); font-size: 12px; }

/* header */
.top { background: linear-gradient(180deg, var(--deep), var(--trench)); color: var(--foam); }
.top .bar { max-width: 1280px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; gap: 20px; }
.top img.mark { height: 22px; }
.top .title { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--surface-light); }
.top .spacer { flex: 1; }
.top .who { display: flex; align-items: center; gap: 10px; color: var(--mist); font-size: 13px; }
.top .who img { width: 28px; height: 28px; border-radius: 50%; }
.top button { background: transparent; color: var(--foam); border: 1px solid rgba(242,239,232,.25); border-radius: 7px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.top button:hover { border-color: var(--surface-light); }
nav.tabs { max-width: 1280px; margin: 0 auto; padding: 0 24px; display: flex; gap: 4px; overflow-x: auto; }
nav.tabs a { color: var(--mist); padding: 10px 14px; border-bottom: 2px solid transparent; white-space: nowrap; font-size: 13.5px; }
nav.tabs a:hover { color: var(--foam); text-decoration: none; }
nav.tabs a.on { color: var(--foam); border-bottom-color: var(--squid-blue); }

main { max-width: 1280px; margin: 0 auto; padding: 28px 24px 60px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.section-head p { margin: 6px 0 0; max-width: 720px; }
.grid { display: grid; gap: 14px; }
.g4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.g2 { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }
.card { background: var(--card-light); border: 1px solid var(--line-light); border-radius: 11px; padding: 16px 18px; }
.card.white { background: #FBF9F4; }
.kpi .v { font-family: var(--display); font-weight: 300; font-size: 38px; line-height: 1.1; margin-top: 6px; }
.kpi .v small { font-size: 18px; color: var(--blue-deep); }
.card h3 + p, .card .sub { margin: 4px 0 0; color: var(--driftwood); font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.space { justify-content: space-between; }

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--driftwood); padding: 8px 10px; border-bottom: 1px solid var(--line-light); position: sticky; top: 0; background: var(--shell); cursor: pointer; user-select: none; }
td { padding: 9px 10px; border-bottom: 1px solid var(--line-light); vertical-align: top; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr:hover td { background: rgba(58,101,136,.06); }
.table-wrap { overflow-x: auto; border-radius: 11px; }

.pill { display: inline-block; font-family: var(--mono); font-size: 11px; padding: 2px 8px; border-radius: 99px; background: var(--sand); color: var(--driftwood); white-space: nowrap; }
.pill.ok { background: rgba(30,127,79,.12); color: var(--ok); }
.pill.warn { background: rgba(154,106,0,.12); color: var(--warn); }
.pill.bad { background: rgba(179,38,30,.1); color: var(--bad); }
.pill.blue { background: rgba(10,104,201,.1); color: var(--blue-deep); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--mist); }
.dot.ok { background: var(--ok); } .dot.bad { background: var(--bad); } .dot.warn { background: var(--warn); }

.btn { display: inline-flex; align-items: center; gap: 6px; background: var(--blue-deep); color: #fff; border: 0; border-radius: 7px; padding: 8px 14px; font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; }
.btn:hover { background: #08559F; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--blue-deep); border: 1px solid var(--line-light); }
.btn.ghost:hover { background: var(--card-light); }
input, select { font: inherit; padding: 8px 10px; border: 1px solid var(--line-light); border-radius: 7px; background: #FBF9F4; color: var(--ink); min-width: 0; }
input:focus, select:focus { outline: 2px solid var(--surface-light); outline-offset: 1px; }
label.f { display: grid; gap: 4px; font-size: 12px; color: var(--driftwood); }
.search { width: 260px; }
.note { font-size: 12.5px; color: var(--driftwood); margin-top: 10px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--deep); color: var(--foam); padding: 10px 16px; border-radius: 9px; font-size: 13.5px; box-shadow: 0 6px 24px rgba(0,0,0,.2); opacity: 0; transition: opacity .2s; pointer-events: none; max-width: 90vw; }
.toast.show { opacity: 1; }
.empty { padding: 28px; text-align: center; color: var(--driftwood); }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters button { background: transparent; border: 1px solid var(--line-light); border-radius: 99px; padding: 4px 12px; font: inherit; font-size: 12.5px; cursor: pointer; color: var(--driftwood); }
.filters button.on { background: var(--deep); color: var(--foam); border-color: var(--deep); }

/* login */
body.login { background: linear-gradient(180deg, var(--shell) 0%, #DCE4EA 45%, var(--deep) 100%); min-height: 100vh; display: grid; place-items: center; }
.login-card { background: #FBF9F4; border: 1px solid var(--line-light); border-radius: 14px; padding: 36px 36px 28px; width: min(440px, 92vw); box-shadow: 0 20px 60px rgba(7,17,31,.18); }
.login-card img { height: 24px; margin-bottom: 26px; }
.login-card h1 { font-size: 30px; margin: 8px 0 10px; }
.login-card .btn { width: 100%; justify-content: center; padding: 11px; margin-top: 18px; font-size: 14.5px; }
.login-card .msg { margin-top: 14px; font-size: 13px; padding: 10px 12px; border-radius: 8px; background: rgba(179,38,30,.08); color: var(--bad); }
.login-card .msg.info { background: var(--card-light); color: var(--driftwood); }
.login-card .foot { margin-top: 22px; font-family: var(--mono); font-size: 10.5px; color: var(--driftwood); letter-spacing: .08em; }
@media (max-width: 640px) { .top .title, .top .who span { display: none; } .g2 { grid-template-columns: 1fr; } .search { width: 100%; } h1 { font-size: 28px; } }
