:root {
  --ink: #1d2433; --muted: #5b6475; --line: #e3e7ee; --bg: #f5f7fa; --card: #fff;
  --brand: #662D91; --green: #1a7f37; --red: #b42318; --amber: #b54708; --radius: 10px;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; color: var(--ink); background: var(--bg); }
.top { display: flex; align-items: center; gap: 24px; padding: 10px 24px; background: var(--brand); color: #fff; position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.brand { font-weight: 600; display: flex; align-items: center; gap: 12px; font-size: 15px; }
.brand img, .bar img { height: 40px; display: block; }
.bar { background: var(--brand); padding: 12px 24px; }
nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
nav button { background: none; border: 0; padding: 8px 12px; border-radius: 8px; color: #e6daf0; font: inherit; cursor: pointer; }
nav button.on { background: rgba(255,255,255,.18); color: #fff; font-weight: 600; }
.who { color: #e6daf0; font-size: 14px; }
.who .link { color: #fff; text-decoration: underline; }
main { max-width: 1080px; margin: 24px auto; padding: 0 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; }
.card h2 { margin: 0 0 12px; font-size: 17px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.row > label { flex: 1 1 140px; }
.grow { flex: 3 1 240px !important; }
label { display: block; font-size: 13px; color: var(--muted); }
input, select, textarea { display: block; width: 100%; margin-top: 4px; padding: 8px 10px; border: 1px solid #cfd5df; border-radius: 8px; font: inherit; color: var(--ink); background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid #d9c6ea; border-color: var(--brand); }
.btn { background: var(--brand); color: #fff; border: 0; border-radius: 8px; padding: 9px 16px; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { filter: brightness(.95); }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid #cfd5df; font-weight: 500; }
.btn.green { background: var(--green); } .btn.red { background: var(--red); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.link { background: none; border: 0; color: var(--brand); cursor: pointer; font: inherit; padding: 0; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); border-bottom: 2px solid var(--line); padding: 8px; }
td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
td.r, th.r { text-align: right; white-space: nowrap; }
tr.day td { background: #fafbfc; font-weight: 600; font-size: 13px; color: var(--muted); }
tfoot td { font-weight: 700; border-bottom: 0; }
.muted { color: var(--muted); } .small { font-size: 13px; } .center { text-align: center; }
.big { font-size: 22px; margin: 6px 0 14px; }
.chip { display: inline-block; padding: 1px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: #eef0f4; color: var(--muted); }
.chip.pending { background: #fff4e5; color: var(--amber); }
.chip.approved { background: #e8f5ec; color: var(--green); }
.chip.queried { background: #fdecea; color: var(--red); }
.chip.superseded { text-decoration: line-through; }
.chip.lock { background: #eef0f4; }
.timer { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.clock { font: 600 30px/1 ui-monospace, Menlo, monospace; }
.running { border-color: #b996d6; background: #faf6fd; }
.stats { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.stat { flex: 1 1 160px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font-size: 22px; }
.stat span { color: var(--muted); font-size: 13px; }
.periodnav { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.periodnav strong { min-width: 230px; text-align: center; }
.inline input { margin: 0; padding: 5px 7px; }
.tasks { margin: 6px 0 0; padding: 0; list-style: none; display: flex; gap: 6px; flex-wrap: wrap; }
.tasks li { background: #f1f3f7; border-radius: 6px; padding: 2px 8px; font-size: 13px; }
.tasks li.off { opacity: .5; text-decoration: line-through; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 8px; z-index: 10; max-width: 90vw; }
.toast.err { background: var(--red); }
.notice { padding: 10px 14px; border-radius: 8px; margin: 10px 0; }
.notice.ok { background: #e8f5ec; color: var(--green); } .notice.err { background: #fdecea; color: var(--red); }
.stack { display: grid; gap: 12px; max-width: 560px; }
.check { display: flex; gap: 10px; align-items: flex-start; color: var(--ink); font-size: 15px; }
.check input { width: auto; margin-top: 4px; }
.login { max-width: 420px; margin: 10vh auto; }
.recon-page main.card { max-width: 860px; margin: 32px auto; }
dialog { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; max-width: 520px; width: 92vw; }
dialog::backdrop { background: rgba(20, 25, 40, .35); }
@media (max-width: 640px) { .hide-sm { display: none; } main { margin-top: 12px; } .top { gap: 10px; padding: 10px 12px; } }
.stack hr { width: 100%; border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
