:root {
  --brand: #0B2A4A;
  --accent: #F28C28;
  --bg: #F3F5F8;
  --card: #FFFFFF;
  --text: #13202E;
  --muted: #5F6B7A;
  --line: #E1E6EC;
  --ok: #1E8E4E;
  --warn: #B7791F;
  --bad: #C53030;
  --info: #2563EB;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  color: var(--text);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
a { color: var(--info); }
h1 { font-size: 22px; margin: 0; }
h2 { font-size: 17px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 16px 0 8px; }
p { line-height: 1.5; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.grid { display: grid; gap: 12px; }
.grid.c2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid.c3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid.c6 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat b { display: block; font-size: 26px; }
.stat span { color: var(--muted); font-size: 13px; }
button, .btn { font: inherit; border: 1px solid var(--line); background: #fff; color: var(--text); padding: 8px 14px; border-radius: 8px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
button:hover, .btn:hover { background: #F7F9FB; }
button.primary, .btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
button.accent { background: var(--accent); color: #fff; border-color: var(--accent); }
button.danger { color: var(--bad); }
button.link { border: 0; background: none; padding: 0; color: var(--info); }
button:disabled { opacity: .5; cursor: default; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
label > input, label > select, label > textarea { margin-top: 4px; }
input, select, textarea { font: inherit; width: 100%; padding: 8px 10px; border: 1px solid #CBD3DC; border-radius: 8px; background: #fff; color: var(--text); }
input[type=checkbox], input[type=radio] { width: auto; margin: 0 6px 0 0; }
label.check { display: flex; align-items: center; color: var(--text); font-size: 14px; }
textarea { min-height: 80px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; padding: 8px; border-bottom: 1px solid var(--line); }
td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr.click { cursor: pointer; }
tr.click:hover td { background: #FAFBFC; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: #EEF2F6; color: var(--muted); white-space: nowrap; }
.pill.ok { background: #E3F4EA; color: var(--ok); }
.pill.warn { background: #FDF3E1; color: var(--warn); }
.pill.bad { background: #FDE8E8; color: var(--bad); }
.pill.info { background: #E6EEFD; color: var(--info); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; flex-wrap: wrap; }
.tabs button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; padding: 8px 12px; color: var(--muted); }
.tabs button.on { border-bottom-color: var(--brand); color: var(--text); font-weight: 600; }
.note { background: #FFF8EC; border: 1px solid #F5DDAE; border-radius: 8px; padding: 10px 12px; font-size: 14px; margin-bottom: 12px; }
.note.info { background: #EEF4FF; border-color: #C9D8FB; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #13202E; color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 9999; max-width: 90vw; }
.toast.bad { background: var(--bad); }
.modal-back { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: flex; align-items: flex-start; justify-content: center; padding: 40px 12px; z-index: 1000; overflow: auto; }
.modal { background: #fff; border-radius: 12px; width: 100%; max-width: 640px; padding: 20px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.modal.wide { max-width: 920px; }
.empty { text-align: center; color: var(--muted); padding: 28px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
code, pre { background: #F1F4F8; border-radius: 6px; padding: 2px 6px; font-size: 13px; }
pre { padding: 12px; overflow: auto; white-space: pre-wrap; word-break: break-all; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
