:root {
  --bg: #f4f6fb; --card: #fff; --text: #1d2433; --muted: #667085; --line: #e3e7ef;
  --brand: #3056d3; --brand-2: #2443a8; --ok: #12805c; --ok-bg: #e7f6ef; --warn: #b54708; --warn-bg: #fff4e5;
  --bad: #b42318; --bad-bg: #fdecea; --radius: 12px;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--brand); }
.wrap { max-width: 720px; margin: 0 auto; padding: 24px 16px 60px; }
.wide { max-width: 1150px; }
header.top { background: var(--brand); color: #fff; }
header.top .wrap { padding-top: 18px; padding-bottom: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
header.top h1 { margin: 0; font-size: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.card h2 { margin: 0 0 12px; font-size: 17px; }
label { display: block; font-weight: 600; margin: 14px 0 6px; font-size: 14px; }
input, select, textarea { width: 100%; padding: 11px 12px; border: 1px solid #cfd5e1; border-radius: 9px; font: inherit; background: #fff; color: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid #b8c7f5; border-color: var(--brand); }
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; border: 0; border-radius: 9px;
  background: var(--brand); color: #fff; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
button:hover, .btn:hover { background: var(--brand-2); }
button:disabled { opacity: .55; cursor: not-allowed; }
button.light, .btn.light { background: #eef1f8; color: var(--text); }
button.light:hover, .btn.light:hover { background: #e1e6f2; }
button.ok { background: var(--ok); } button.bad { background: var(--bad); }
button.sm, .btn.sm { padding: 6px 10px; font-size: 13px; }
.full { width: 100%; padding: 14px; font-size: 16px; margin-top: 18px; }
.muted { color: var(--muted); font-size: 13px; }
.note { padding: 12px 14px; border-radius: 9px; margin-top: 14px; font-size: 14px; }
.note.ok { background: var(--ok-bg); color: var(--ok); }
.note.warn { background: var(--warn-bg); color: var(--warn); }
.note.bad { background: var(--bad-bg); color: var(--bad); }
.note ul { margin: 6px 0 0; padding-left: 20px; }
.drop { border: 2px dashed #c3cbe0; border-radius: var(--radius); padding: 22px; text-align: center; cursor: pointer; background: #fafbff; }
.drop.has { border-color: var(--ok); background: var(--ok-bg); }
.drop input { display: none; }
.bar { height: 8px; background: #e6e9f2; border-radius: 99px; overflow: hidden; margin-top: 14px; display: none; }
.bar > i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s; }
.deadline { font-size: 13px; color: var(--muted); }
.hidden { display: none !important; }
/* admin */
nav.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
nav.tabs button { background: #fff; color: var(--text); border: 1px solid var(--line); }
nav.tabs button.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.badge { display: inline-block; min-width: 20px; padding: 1px 7px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 12px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.pill.ok { background: var(--ok-bg); color: var(--ok); } .pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); } .pill.none { background: #eef0f4; color: var(--muted); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > .grow { flex: 1; min-width: 180px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 12px 0; }
.stat { background: #f7f8fc; border-radius: 10px; padding: 10px 12px; } .stat b { display: block; font-size: 22px; }
.flag { margin: 4px 0; font-size: 13px; color: var(--warn); }
.toast { position: fixed; right: 16px; bottom: 16px; max-width: 360px; background: #1d2433; color: #fff; padding: 12px 16px; border-radius: 10px; box-shadow: 0 6px 24px #0003; z-index: 9; }
dialog { border: 0; border-radius: var(--radius); padding: 22px; width: min(520px, calc(100vw - 32px)); }
dialog::backdrop { background: #0006; }
.danger { border-color: #f3c1bc; }
