/* The admin panel's whole look. Colours, type and radii are the Avesta
   design system's tokens (docs/design); nothing is styled inline. */
:root {
  --page: #f2f1ec; --surface: #ffffff; --pressed: #e7e5de; --line: #d6d3ca; --line-strong: #6b7079;
  --ink: #111418; --muted: #3d434c; --accent: #1b3d99; --accent-pressed: #15307a; --accent-soft: #e4eaf8;
  --in: #0b5a27; --in-soft: #e3f4e7; --out: #a01f18; --out-soft: #fde8e5; --warn: #6e4300; --warn-soft: #fff2cc;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); font: 15px/1.45 "Noto Sans", system-ui, "Segoe UI", sans-serif; font-variant-numeric: tabular-nums; }
a { color: var(--accent); } a:hover { color: var(--accent-pressed); }
h1 { margin: 0; font-size: 26px; } h2 { margin: 0; font-size: 17px; }
.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 32px; min-height: 64px; }
.brand { font-size: 20px; font-weight: 700; } .brand span { font-weight: 400; color: var(--muted); }
.nav { display: flex; flex-wrap: wrap; gap: 4px; flex-grow: 1; }
.nav a { padding: 10px 14px; border-radius: 8px; color: var(--ink); font-weight: 600; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.nav a.here { background: var(--accent-soft); color: var(--accent); }
.count { background: var(--out); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 13px; }
.me { display: flex; align-items: center; gap: 16px; font-size: 14px; }
.me .who { line-height: 18px; } .me .who b { display: block; } .me .who span { color: var(--muted); }
.lang { display: flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.lang button { border: 0; background: var(--surface); padding: 6px 10px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.lang button.on { background: var(--ink); color: #fff; }
main.wrap { padding-top: 24px; padding-bottom: 48px; display: flex; flex-direction: column; gap: 20px; }
.row { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.row > * { flex: 1 1 420px; min-width: 0; }
.head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; } .head h1 { flex-grow: 1; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.tile, .card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.tile { padding: 16px 20px; } .tile .label { font-size: 14px; color: var(--muted); font-weight: 600; }
.tile .big { font-size: 30px; font-weight: 700; line-height: 42px; } .tile .big small { font-size: 16px; color: var(--muted); font-weight: 600; }
.tile.bad { background: var(--out-soft); border-color: var(--out); } .tile.bad .label, .tile.bad .big, .tile.bad .big small { color: var(--out); }
.card > h2, .card > .cardhead { padding: 14px 20px; border-bottom: 1px solid var(--line); }
.cardhead { display: flex; align-items: center; gap: 12px; } .cardhead h2 { flex-grow: 1; }
.line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 11px 20px; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; } a.line { color: var(--ink); text-decoration: none; }
.line .key { flex: 0 0 180px; color: var(--muted); } .line .grow { flex: 1 1 260px; min-width: 0; }
.muted { color: var(--muted); font-size: 14px; } .strong { font-weight: 600; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 8px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.badge.ok { background: var(--in-soft); color: var(--in); } .badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.down { background: var(--out-soft); color: var(--out); } .badge.plain { background: var(--pressed); color: var(--ink); }
.badge.change { background: var(--accent-soft); color: var(--accent); }
.late { color: var(--out); font-weight: 700; } .near { color: var(--warn); font-weight: 700; }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; } .scroll table { min-width: 900px; } th { text-align: left; color: var(--muted); font-size: 13px; font-weight: 600; padding: 10px 12px; }
td { padding: 12px; border-top: 1px solid var(--line); vertical-align: top; } th:first-child, td:first-child { padding-left: 20px; } th:last-child, td:last-child { padding-right: 20px; }
.num { text-align: right; } .mono { font-family: ui-monospace, Consolas, monospace; font-size: 14px; }
.shopname { font-weight: 600; font-size: 16px; text-decoration: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn.main { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; } .btn.main:hover { background: var(--accent-pressed); color: #fff; }
input[type=text], input[type=password], input[type=search], input[type=date] { height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 8px; font: inherit; background: var(--surface); color: var(--ink); min-width: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
label { font-weight: 600; } .field { display: flex; flex-direction: column; gap: 6px; }
.form { display: flex; flex-direction: column; gap: 14px; padding: 16px 20px; } .form .two { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.bar { height: 10px; border-radius: 999px; background: var(--pressed); margin-top: 6px; } .bar > i { display: block; height: 10px; border-radius: 999px; background: var(--accent); max-width: 100%; }
.bar > i.w0{width:0}.bar > i.w10{width:10%}.bar > i.w20{width:20%}.bar > i.w30{width:30%}.bar > i.w40{width:40%}.bar > i.w50{width:50%}.bar > i.w60{width:60%}.bar > i.w70{width:70%}.bar > i.w80{width:80%;background:var(--warn)}.bar > i.w90{width:90%;background:var(--warn)}.bar > i.w100{width:100%;background:var(--warn)}
.between { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.notice { border-radius: 12px; padding: 14px 20px; border: 1px solid var(--warn); background: var(--warn-soft); } .notice.bad { border-color: var(--out); background: var(--out-soft); color: var(--out); font-weight: 600; }
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); } .pager .grow { flex-grow: 1; color: var(--muted); font-size: 14px; }
.pager a, .pager b { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-strong); text-decoration: none; color: var(--ink); font-weight: 600; }
.pager b { border: 2px solid var(--accent); background: var(--accent-soft); color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; } .chips a { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--ink); font-weight: 600; font-size: 14px; text-decoration: none; background: var(--surface); }
.chips a.on { border: 2px solid var(--accent); background: var(--accent-soft); color: var(--accent); }
.signin { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: 32px 16px; }
.signin .card { width: 100%; max-width: 400px; padding: 28px; display: flex; flex-direction: column; gap: 16px; } .signin h1 { font-size: 22px; }
.signin input { height: 48px; font-size: 16px; } .signin .code { height: 56px; font-size: 26px; font-weight: 700; letter-spacing: 8px; text-align: center; }
.signin .btn { min-height: 52px; font-size: 17px; }
.sr { position: absolute; left: -9999px; }
