:root {
  --slate: #4a6076; --slate-d: #33465a; --ink: #1f2b37; --muted: #6b7a89; --line: #e3e8ee;
  --bg: #f5f7f9; --card: #fff; --orange: #e86a43; --red: #c8372d; --amber: #c98a12; --green: #2f8a5b;
  --radius: 10px;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--slate); }
h1 { font-size: 1.5rem; margin: 0 0 1rem; }
h2 { font-size: 1.1rem; margin: 0 0 .75rem; }
.layout { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.side { background: var(--ink); color: #cfd8e1; padding: 1.25rem 1rem; display: flex; flex-direction: column; gap: .25rem; }
.side .logo { display: block; margin: 0 .5rem 1.5rem; }
.side .logo img { height: 34px; }
.side a { color: #cfd8e1; text-decoration: none; padding: .5rem .75rem; border-radius: 8px; display: flex; justify-content: space-between; }
.side a:hover, .side a.on { background: #2c3b4a; color: #fff; }
.side .badge { background: var(--orange); color: #fff; border-radius: 99px; padding: 0 .5rem; font-size: .8rem; }
.side .sep { margin: 1rem .75rem .25rem; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: #7f90a1; }
.side form { margin-top: auto; }
.side .who { font-size: .85rem; padding: .5rem .75rem; color: #9aabbb; }
main { padding: 1.75rem 2rem; max-width: 1200px; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.top h1 { margin: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.25rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 1.25rem; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; }
.stat b { display: block; font-size: 1.8rem; line-height: 1.2; }
.stat span { color: var(--muted); font-size: .85rem; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
td.num, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }
.muted { color: var(--muted); }
.pill { display: inline-block; border-radius: 99px; padding: .05rem .55rem; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.risk-HIGH, .act-block { background: #fbe3e1; color: var(--red); }
.risk-MEDIUM, .act-warn { background: #fbf0d9; color: #8a5d00; }
.risk-LOW, .act-ok { background: #e2f3ea; color: var(--green); }
.src { background: #e8edf2; color: var(--slate-d); }
.alert { border-left: 4px solid var(--red); }
.flash { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; background: #e2f3ea; color: #1d5e3c; }
.flash.error { background: #fbe3e1; color: #8e241c; }
form.inline { display: inline; }
input, select, textarea { font: inherit; padding: .5rem .65rem; border: 1px solid #cdd5de; border-radius: 8px; background: #fff; color: var(--ink); }
input:focus, select:focus { outline: 2px solid #a9bccf; border-color: var(--slate); }
label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: .25rem; }
.row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; }
.row > div { flex: 1 1 160px; }
.row input, .row select { width: 100%; }
button, .btn { font: inherit; font-weight: 600; border: 0; border-radius: 8px; padding: .55rem 1rem; background: var(--slate); color: #fff; cursor: pointer; text-decoration: none; display: inline-block; }
button:hover, .btn:hover { background: var(--slate-d); }
button.ghost { background: transparent; color: var(--slate); border: 1px solid #cdd5de; padding: .35rem .7rem; font-weight: 500; }
button.ghost:hover { background: #eef2f6; }
button.danger { background: transparent; color: var(--red); border: 1px solid #efc4c0; padding: .35rem .7rem; font-weight: 500; }
.secret { background: #fff8e6; border: 1px solid #f0d58f; padding: 1rem; border-radius: 8px; margin-bottom: 1rem; }
.secret code { display: block; margin-top: .5rem; word-break: break-all; font-size: .95rem; }
dl.facts { display: grid; grid-template-columns: 180px 1fr; gap: .4rem 1rem; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }
.action-box { background: #fff4ef; border: 1px solid #f4c7b6; border-radius: 8px; padding: .9rem 1rem; font-weight: 600; margin-bottom: 1rem; }
.tabs { display: flex; gap: .5rem; margin-bottom: 1rem; }
.tabs a { padding: .35rem .8rem; border-radius: 99px; text-decoration: none; background: #e8edf2; color: var(--slate-d); font-size: .9rem; }
.tabs a.on { background: var(--slate); color: #fff; }
.raw { white-space: pre-wrap; font-size: .85rem; color: #44525f; max-height: 360px; overflow: auto; background: var(--bg); padding: 1rem; border-radius: 8px; }
.login { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(160deg, #1f2b37, #33465a); }
.login .card { width: min(400px, 92vw); padding: 2rem; }
.login img { height: 40px; margin-bottom: 1.5rem; }
.login input { width: 100%; margin-bottom: 1rem; }
.login button { width: 100%; }
.error { color: var(--red); margin-bottom: 1rem; }
.pager { display: flex; gap: .5rem; margin-top: 1rem; }
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .side { flex-direction: row; flex-wrap: wrap; padding: .75rem; }
  .side .logo { margin: 0 1rem 0 0; }
  .side .sep, .side .who { display: none; }
  .side form { margin: 0; }
  main { padding: 1.25rem 1rem; }
  .hide-sm { display: none; }
  dl.facts { grid-template-columns: 1fr; }
}
.tills { display: flex; flex-wrap: wrap; gap: .3rem; }
.till { border-radius: 6px; padding: .1rem .5rem; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.till.wait { background: #fbf0d9; color: #8a5d00; }
.till.wait::before { content: "● "; }
.till.done { background: #e2f3ea; color: var(--green); }
.till.done::before { content: "✓ "; }
.steps { padding-left: 1.2rem; line-height: 1.6; }
.faq h3 { font-size: 1rem; margin: 1.2rem 0 .3rem; }
.faq h3:first-child { margin-top: 0; }
.faq p { margin: 0; color: var(--muted); }
.check { display: inline-flex; gap: .35rem; align-items: center; font-weight: 400; }
.check input { width: auto; }
.guide main { max-width: 860px; margin: 0 auto; padding: 2rem 1.25rem 4rem; line-height: 1.6; }
.guide h2 { margin-top: 2.2rem; }
.guide pre.raw { overflow-x: auto; font-size: .82rem; }
.guide table { margin: .5rem 0 1rem; }
.toc { line-height: 2; }
