:root {
  --navy: #101a3d;
  --accent: #e8664a;
  --accent-soft: #fdeee9;
  --bg: #f3f4f8;
  --card: #fff;
  --text: #151a2e;
  --muted: #6a7088;
  --line: #e4e6ee;
  --green: #1f8a4c;
  --amber: #c98a0c;
  --red: #c93a3a;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 15px; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }

.top { background: var(--navy); color: #fff; }
.top-in { max-width: 1180px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 24px; min-height: 56px; flex-wrap: wrap; }
.brand { font-weight: 700; letter-spacing: .2px; text-decoration: none; display: flex; gap: 8px; align-items: center; }
.brand i { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); display: inline-block; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.nav a { color: #c9cde0; text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: 14px; }
.nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav a.on { background: rgba(255,255,255,.14); color: #fff; }
.who { font-size: 13px; color: #c9cde0; display: flex; gap: 12px; align-items: center; }

main { max-width: 1180px; margin: 0 auto; padding: 24px 20px 60px; }
h1 { font-size: 26px; margin: 0 0 4px; }
h2 { font-size: 17px; margin: 0 0 12px; }
.sub { color: var(--muted); font-size: 13px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.head { margin-bottom: 18px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.mt { margin-top: 14px; }
.mt2 { margin-top: 24px; }

.tile .label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.tile .value { font-size: 30px; font-weight: 700; margin-top: 4px; }
.big { font-size: 40px; font-weight: 800; line-height: 1; }
.pill { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 99px; background: var(--bg); color: var(--muted); }
.pill.great { background: #dff3e7; color: var(--green); }
.pill.good { background: #e8f3dc; color: #4a8a1f; }
.pill.ok { background: #fbf0d6; color: var(--amber); }
.pill.bad { background: #fadfdf; color: var(--red); }
.t-great { color: var(--green); } .t-good { color: #4a8a1f; } .t-ok { color: var(--amber); } .t-bad { color: var(--red); }

.seg { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 8px; cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--navy); color: #fff; }

.btn { border: 1px solid var(--line); background: #fff; padding: 8px 14px; border-radius: 10px; cursor: pointer; text-decoration: none; color: var(--text); display: inline-block; }
.btn:hover { border-color: #c4c8d8; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.danger { color: var(--red); }
.btn.sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: default; }

.stack { height: 12px; display: flex; border-radius: 6px; overflow: hidden; background: var(--line); margin: 12px 0; }
.stack span:nth-child(1) { background: #1f8a4c; } .stack span:nth-child(2) { background: #d9a21f; } .stack span:nth-child(3) { background: #cf4747; }
.legend { display: grid; gap: 4px; font-size: 14px; }
.legend div { display: flex; justify-content: space-between; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }

.bars { display: grid; gap: 7px; }
.bar { display: grid; grid-template-columns: 150px 1fr 70px; gap: 10px; align-items: center; font-size: 14px; }
.bar .track { height: 10px; background: var(--line); border-radius: 5px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--accent); border-radius: 5px; }
.bar .num { text-align: right; color: var(--muted); }

.cols { display: flex; align-items: flex-end; gap: 6px; height: 120px; margin-top: 8px; }
.col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; font-size: 11px; color: var(--muted); }
.col .stick { width: 100%; max-width: 34px; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; }
.col .n { margin-bottom: 2px; color: var(--text); font-size: 11px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); white-space: nowrap; }
.scroll { overflow-x: auto; }
td.txt { min-width: 220px; max-width: 420px; white-space: pre-wrap; word-break: break-word; }

.comments { display: grid; gap: 8px; max-height: 360px; overflow: auto; }
.comment { background: var(--bg); border-radius: 10px; padding: 10px 12px; white-space: pre-wrap; word-break: break-word; }
.comment small { display: block; color: var(--muted); margin-top: 4px; }

label.f { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
input, select, textarea { border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: #fff; color: var(--text); width: 100%; }
textarea { font-family: ui-monospace, Consolas, monospace; font-size: 13px; min-height: 120px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.form { display: grid; gap: 12px; }
.inline { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; align-items: end; }

.login { max-width: 380px; margin: 12vh auto 0; }
.err { color: var(--red); font-size: 13px; min-height: 18px; }
.note { background: #fff8e6; border: 1px solid #f0dca0; border-radius: 10px; padding: 12px 14px; font-size: 14px; }
.note code, pre { background: #f0f2f8; padding: 2px 6px; border-radius: 6px; font-size: 13px; }
pre { padding: 12px; overflow: auto; white-space: pre-wrap; word-break: break-all; }
.mono { font-family: ui-monospace, Consolas, monospace; }
.muted { color: var(--muted); }
.warn { color: var(--red); }
a.card-link { text-decoration: none; display: block; }
a.card-link:hover { border-color: var(--accent); }
.kind { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }

@media (max-width: 640px) {
  .bar { grid-template-columns: 100px 1fr 56px; }
  .big { font-size: 32px; }
}
