/* Look & feel rebuilt from the NSM dashboard tokens. */
:root {
  --ink: #0C2329; --ink2: #3D4F54; --muted: #7A8A8F; --bg: #F5F8F9; --card: #FFFFFF; --line: #E7ECEE;
  --green: #5FB98F; --mint: #caffe2; --tintmint: #e7fbf0;
  --purple: #9D84FF; --purple-soft: #C4B5FD; --tintpurple: #EFEBFF;
  --orange: #E3A063; --tintorange: #FBEBDA; --pos: #1F8F63; --neg: #B06A2E;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: Inter, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }

.bar { background: var(--ink); color: #fff; padding: 14px 0; border-bottom: 3px solid var(--mint); }
.bar .in, .wrap, .foot { max-width: 1200px; margin: 0 auto; padding: 0 22px; }
.bar .in { display: flex; align-items: center; gap: 14px; }
.wordmark { font-weight: 800; letter-spacing: -0.3px; font-size: 19px; }
.bar-sub { color: rgba(255,255,255,.6); font-size: 13px; font-weight: 600; }
.grow { flex: 1; }
.live { display: inline-flex; align-items: center; gap: 8px; background: #fff; color: var(--ink); font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 999px; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.live.ok i { background: var(--green); }
.live.warn i { background: var(--orange); }

.titles { padding: 30px 0 18px; }
h1 { margin: 0; font-size: 27px; font-weight: 800; letter-spacing: -0.5px; }
.sub { color: var(--muted); font-size: 15px; margin-top: 6px; }

.tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 5px; margin-bottom: 22px; }
.tabs button { border: 0; background: none; font: inherit; font-weight: 600; font-size: 15px; color: var(--ink2); padding: 11px 20px; border-radius: 10px; cursor: pointer; }
.tabs button:hover { background: var(--bg); }
.tabs button.on { background: var(--mint); color: var(--ink); }

.controls { display: flex; flex-wrap: wrap; gap: 14px 24px; margin-bottom: 22px; align-items: flex-end; }
.lbl { font-size: 11.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); margin-bottom: 7px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.seg button { border: 0; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink2); padding: 8px 14px; border-radius: 8px; cursor: pointer; }
.seg button.on { background: var(--ink); color: #fff; }
.select { font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; }

.progress { height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; margin-bottom: 18px; transition: opacity .4s; }
.progress div { height: 100%; width: 0; background: var(--green); transition: width .25s; }
.progress.done { opacity: 0; }

.cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 13px; margin-bottom: 16px; }
.cards.c3 { grid-template-columns: repeat(3, 1fr); }
.cards.c4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .cards { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .cards, .cards.c3, .cards.c4 { grid-template-columns: repeat(2, 1fr); } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; position: relative; overflow: hidden; }
.card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--mint); }
.card.geo::before { background: var(--tintpurple); }
.card.ctx { background: #FBFCFC; }
.card.ctx::before { background: var(--line); }
.card .k { font-size: 11.5px; color: var(--muted); font-weight: 700; min-height: 28px; }
.card .v { font-size: 30px; font-weight: 800; letter-spacing: -0.8px; margin-top: 8px; }
.card.ctx .v { font-size: 23px; color: var(--ink2); }
.card .p { font-size: 13px; color: var(--muted); margin-top: 3px; }
.badge { display: inline-block; font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; margin-top: 10px; }
.badge.up { background: var(--tintmint); color: var(--pos); }
.badge.down { background: var(--tintorange); color: var(--neg); }
.badge.flat { background: var(--bg); color: var(--muted); }
.tag { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--tintorange); color: var(--neg); margin-left: 4px; vertical-align: 1px; letter-spacing: .3px; }
.tag.ctx { background: var(--bg); color: var(--muted); }
.section-lbl { font-size: 12px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); margin: 22px 0 10px; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px 24px; margin-bottom: 18px; }
.panel h2 { margin: 0; font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.panel h3 { margin: 22px 0 8px; font-size: 15px; font-weight: 800; }
.panel .ps { color: var(--muted); font-size: 13.5px; margin: 4px 0 14px; }
.chip { font-size: 12px; font-weight: 600; background: var(--bg); border: 1px solid var(--line); color: var(--ink2); padding: 3px 9px; border-radius: 999px; }
.chart { position: relative; height: 320px; }
.chart.sm { height: 200px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 900px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.mini { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.mini .t { font-weight: 800; font-size: 14px; margin-bottom: 6px; display: flex; justify-content: space-between; }
.mini .t span { color: var(--muted); font-weight: 600; font-size: 12px; }

.notes { background: var(--tintmint); border-radius: 14px; padding: 12px 16px; font-size: 13.5px; color: var(--ink2); margin-bottom: 18px; line-height: 1.55; }
.notes.warn { background: var(--tintorange); }
.notes b { color: var(--ink); }
.notes ul { margin: 4px 0 0; padding-left: 18px; }

.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 700; background: #FBFCFC; position: sticky; top: 0; }
th.grp { text-align: center; border-bottom: 0; }
tr.sel td { background: var(--tintmint); font-weight: 700; }
tr.glob td { font-weight: 700; }
td.ok { color: var(--pos); font-weight: 700; }
td.bad { color: var(--neg); font-weight: 700; }
td.dim, .dim { color: var(--muted); }
.defs dt { font-weight: 800; margin-top: 14px; }
.defs dd { margin: 4px 0 0; color: var(--ink2); line-height: 1.55; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; background: var(--bg); padding: 1px 5px; border-radius: 5px; word-break: break-all; }
details summary { cursor: pointer; font-weight: 700; margin: 10px 0; }
.pass { display: inline-block; padding: 4px 12px; border-radius: 999px; font-weight: 800; font-size: 13px; }
.pass.ok { background: var(--tintmint); color: var(--pos); }
.pass.bad { background: var(--tintorange); color: var(--neg); }
.empty { color: var(--muted); font-size: 14px; padding: 30px 0; text-align: center; }

.foot { color: var(--muted); font-size: 12.5px; padding-top: 10px; padding-bottom: 40px; line-height: 1.6; }
@media (max-width: 640px) {
  .bar .in, .wrap, .foot { padding: 0 16px; }
  .bar-sub { display: none; }
  .tabs button { padding: 9px 12px; font-size: 14px; }
  .panel { padding: 16px; }
  .card .v { font-size: 25px; }
}
