/* Внешний вид как у прототипа W0 (ozon_core/web/static/style.css). Системные шрифты, без внешних ресурсов.
   Светлая и тёмная тема по настройке устройства. Вёрстка от 360 px, без горизонтальной прокрутки. */
:root {
  color-scheme: light dark;
  --bg: #f4f6fb; --card: #ffffff; --ink: #1c2333; --muted: #566075; --line: #dfe4ee; --field: #ffffff; --field-line: #b8c1d4;
  --brand: #005bff; --brand-dark: #0046c7; --brand-ink: #ffffff; --soft: #eaf1ff; --focus: #7aa5ff;
  --c1: #1f6feb; --c2: #d4620b; --c3: #0b7a43; --c4: #8250df; --c5: #b08800; --c6: #57606a; --grid: #dfe4ee;
  --good: #0b7a43; --good-bg: #e6f6ee; --bad: #b42323; --bad-bg: #fdecec; --note-bg: #fff7e0; --note-line: #e8cf7a; --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10141f; --card: #181e2c; --ink: #e8ecf5; --muted: #a2adc4; --line: #2b3448; --field: #121826; --field-line: #4a5673;
    --brand: #6c9cff; --brand-dark: #8fb3ff; --brand-ink: #0b1226; --soft: #1d2a4a; --focus: #6c9cff;
    --c1: #6ea8ff; --c2: #ff9d4d; --c3: #55d08e; --c4: #b794f6; --c5: #e3b341; --c6: #9aa4b5; --grid: #2b3448;
    --good: #55d08e; --good-bg: #123325; --bad: #ff8a8a; --bad-bg: #3a1a1a; --note-bg: #382f12; --note-line: #6b5a1f;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink); background: var(--bg); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--brand); color: var(--brand-ink); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }
.top { background: var(--card); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; padding-top: 10px; padding-bottom: 10px; }
.brand { font-weight: 800; font-size: 18px; color: var(--ink); text-decoration: none; margin-right: auto; }
.top nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.top nav a, .top nav button { font: inherit; font-weight: 600; color: var(--brand); text-decoration: none; background: none; border: 0; padding: 10px 8px; min-height: 44px; cursor: pointer; }
.top nav a:hover, .top nav button:hover { text-decoration: underline; }
main { padding-top: 20px; padding-bottom: 32px; }
h1 { margin: 0 0 12px; font-size: 24px; line-height: 1.25; }
h2 { margin: 0 0 10px; font-size: 18px; }
p { margin: 0 0 10px; }
a { color: var(--brand); }
.narrow { max-width: 460px; margin: 0 auto; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.field { margin-bottom: 14px; }
.lbl { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.hint { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--field); border: 1px solid var(--field-line); border-radius: 8px; padding: 10px 12px; min-height: 44px; }
input[type="checkbox"] { width: 20px; height: 20px; min-height: 0; margin: 2px 8px 0 0; flex: none; }
input[type="file"] { padding: 8px; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.check { display: flex; align-items: flex-start; }
.check .lbl { font-weight: 400; margin: 0; }
.btn, .primary { display: inline-block; appearance: none; border: 0; border-radius: 10px; background: var(--brand); color: var(--brand-ink); font: inherit; font-weight: 700; padding: 12px 18px; min-height: 48px; cursor: pointer; text-decoration: none; text-align: center; }
.primary { width: 100%; }
.btn:hover, .primary:hover { background: var(--brand-dark); }
.btn.ghost { background: transparent; color: var(--brand); border: 2px solid var(--brand); }
.btn.danger { background: var(--bad); color: #fff; }
.link { appearance: none; border: 0; background: none; color: var(--brand); font: inherit; text-decoration: underline; cursor: pointer; padding: 8px 0; min-height: 44px; }
.errorlist { list-style: none; margin: 6px 0 0; padding: 0; color: var(--bad); font-size: 14px; font-weight: 600; }
.alert { margin: 0 0 14px; padding: 10px 12px; border-radius: 8px; font-weight: 600; }
.alert.error { color: var(--bad); background: var(--bad-bg); }
.alert.ok { color: var(--good); background: var(--good-bg); }
.alert.note { background: var(--note-bg); border: 1px solid var(--note-line); font-weight: 400; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 14px; }
.grid .card { margin: 0; }
.badge { display: inline-block; font-size: 13px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--soft); color: var(--brand-dark); }
.badge.good { background: var(--good-bg); color: var(--good); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.muted { color: var(--muted); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-size: 13px; color: var(--muted); font-weight: 600; }
.tbl .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
details summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.foot { color: var(--muted); font-size: 13px; padding-bottom: 24px; }
.inline-form { display: inline; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }
.chart-box { position: relative; height: 280px; }
.chart-box.small { height: 240px; }
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 14px; }
.charts > *, .grid > * { min-width: 0; }
.charts .wide { grid-column: 1 / -1; }
.mt { margin-top: 12px; }
