:root {
  --bg: #f5f3ee; --surface: #ffffff; --surface-2: #faf9f6; --line: #e6e1d6; --fg: #101828; --muted: #5b6475;
  --navy: #0b1220; --gold: #c9a227; --gold-ink: #8a6c0f; --ok: #1e7a52; --ok-bg: #e3f5ec; --warn: #9a5b06; --warn-bg: #fdf0d6;
  --crit: #b42318; --crit-bg: #fde4e1; --info: #1d4ed8; --info-bg: #e0eafc; --radius: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0a0f1c; --surface: #121a2b; --surface-2: #172036; --line: #26304a; --fg: #e8ecf4; --muted: #9aa6bd;
    --ok: #4ade80; --ok-bg: #12301f; --warn: #fbbf24; --warn-bg: #33270b; --crit: #f87171; --crit-bg: #3a1414; --info: #93b4ff; --info-bg: #15234a; --gold-ink: #e2bf4a; color-scheme: dark; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: inherit; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; word-break: break-all; }
h1 { font-size: 22px; margin: 0 0 16px; letter-spacing: -.01em; }
h2 { font-size: 15px; margin: 0 0 12px; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .r { text-align: right; } .nowrap { white-space: nowrap; } .pre { white-space: pre-wrap; }
.warn { color: var(--warn); font-style: normal; }
.top { display: flex; align-items: center; gap: 24px; padding: 10px 24px; background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 17px; }
.brand img { width: 30px; height: 30px; } .brand b { color: var(--gold); } .brand small { font-weight: 600; opacity: .7; font-size: 12px; margin-left: 4px; }
.brand.big { justify-content: center; font-size: 22px; margin-bottom: 18px; } .brand.big img { width: 40px; height: 40px; }
.top nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.top nav a { text-decoration: none; padding: 6px 12px; border-radius: 8px; color: #c8d0df; font-weight: 600; }
.top nav a:hover { background: rgba(255,255,255,.08); color: #fff; } .top nav a.on { background: rgba(201,162,39,.18); color: var(--gold); }
.who { display: flex; align-items: center; gap: 10px; color: #c8d0df; margin: 0; }
.page { max-width: 1240px; margin: 0 auto; padding: 24px 16px 60px; }
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.head h1 { margin-bottom: 4px; } .head p { margin: 0 0 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; overflow-x: auto; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } .span2 { grid-column: 1 / -1; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } .top { padding: 10px 16px; } }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; display: flex; flex-direction: column; }
.kpi b { font-size: 26px; letter-spacing: -.02em; } .kpi span { color: var(--muted); font-size: 12.5px; }
.kpi.warnk b { color: var(--warn); } .kpi.critk b { color: var(--crit); } a.kpi:hover { border-color: var(--gold); }
.t { width: 100%; border-collapse: collapse; } .t th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; } .t tr:last-child td { border-bottom: 0; }
.t.compact td { padding: 6px 10px; } .t a { text-decoration: none; } .t a:hover { text-decoration: underline; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--surface-2); border: 1px solid var(--line); white-space: nowrap; }
.pill.active { background: var(--ok-bg); color: var(--ok); border-color: transparent; } .pill.trial { background: var(--info-bg); color: var(--info); border-color: transparent; }
.pill.ending { background: var(--warn-bg); color: var(--warn); border-color: transparent; } .pill.expired, .pill.unlicensed, .pill.suspended { background: var(--crit-bg); color: var(--crit); border-color: transparent; }
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 9px; padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--gold); } .btn.primary { background: var(--gold); border-color: var(--gold); color: #0b1220; } .btn.primary:hover { filter: brightness(1.05); }
.btn.danger { color: var(--crit); } .btn.sm { padding: 4px 10px; font-size: 12.5px; } .btn.wide { width: 100%; justify-content: center; padding: 10px; }
.link { background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.form { display: flex; flex-direction: column; gap: 12px; } .form.grid2 { display: grid; }
.form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 13px; }
input, select, textarea { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--fg); min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: -1px; }
input[type=checkbox] { width: 16px; height: 16px; vertical-align: -3px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0; } .row label { flex-direction: row; align-items: center; gap: 6px; font-weight: 500; }
.flash { padding: 12px 14px; border-radius: 10px; margin-bottom: 14px; } .flash.ok { background: var(--ok-bg); } .flash.err { background: var(--crit-bg); color: var(--crit); }
.copyrow { display: flex; gap: 8px; align-items: center; margin: 6px 0; flex-wrap: wrap; } .copyrow code { background: var(--surface-2); padding: 6px 8px; border-radius: 6px; border: 1px solid var(--line); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; } .chips a { text-decoration: none; padding: 5px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 12.5px; }
.chips a.on { background: var(--navy); color: #fff; border-color: var(--navy); }
details.menu { position: relative; } details.menu summary { list-style: none; } details.menu summary::-webkit-details-marker { display: none; }
details.menu .pop { position: absolute; right: 0; z-index: 4; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; box-shadow: 0 12px 30px rgba(0,0,0,.18); min-width: 360px; }
@media (max-width: 760px) { details.menu .pop { position: static; min-width: 0; box-shadow: none; } }
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; background: radial-gradient(circle at 80% 0%, #1f2d55, #070c18 70%); }
.authcard { width: 100%; max-width: 400px; padding: 28px; }
.qr { width: 220px; margin: 12px auto; background: #fff; padding: 6px; border-radius: 10px; } .qr svg { width: 100%; height: auto; display: block; }
.form .t label, .form label.inline { flex-direction: row; align-items: center; gap: 8px; font-weight: 600; }
