:root {
  --ink: #14213d; --ink-2: #44506a; --muted: #7a8296; --line: #e4e6ec; --bg: #f6f6f4; --card: #fff;
  --accent: #c8642e; --navy: #0f2340; --ok: #1f7a4d; --ok-bg: #e5f4ec; --warn: #9a5b00; --warn-bg: #fdf1dc;
  --bad: #b3261e; --bad-bg: #fbe7e6; --radius: 10px;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 14px; line-height: 1.45; }
a { color: var(--navy); }
header.top { background: var(--navy); color: #fff; display: flex; align-items: center; gap: 28px; padding: 0 24px; height: 56px; }
header.top .brand { font-weight: 700; letter-spacing: .02em; }
header.top .brand small { color: #f0a477; font-weight: 600; letter-spacing: .14em; font-size: 10px; display: block; }
header.top nav { display: flex; gap: 4px; flex: 1; }
header.top nav a { color: #cfd6e4; text-decoration: none; padding: 8px 12px; border-radius: 8px; }
header.top nav a.on, header.top nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
header.top form button { background: none; border: 1px solid rgba(255,255,255,.3); color: #fff; }
main { max-width: 1280px; margin: 0 auto; padding: 24px; }
h1 { font-size: 24px; margin: 4px 0 18px; font-family: Georgia, "Times New Roman", serif; font-weight: 600; }
h2 { font-size: 16px; margin: 0 0 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; }
.grid { display: grid; gap: 16px; }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .cols-4, .cols-2 { grid-template-columns: 1fr 1fr; } }
.stat .n { font-size: 28px; font-weight: 700; }
.stat .l { color: var(--muted); }
.muted { color: var(--muted); }
.flash { padding: 10px 14px; border-radius: 8px; background: var(--ok-bg); color: var(--ok); margin-bottom: 14px; }
.flash.error { background: var(--bad-bg); color: var(--bad); }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #eef0f4; color: var(--ink-2); white-space: nowrap; }
.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.navy { background: var(--navy); color: #fff; }
button, .btn { font: inherit; border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 7px 14px; border-radius: 8px; cursor: pointer; text-decoration: none; display: inline-block; }
button.primary, .btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
button.good { background: var(--ok); border-color: var(--ok); color: #fff; }
button.danger { color: var(--bad); border-color: #efc4c1; }
button:disabled { opacity: .5; cursor: default; }
input[type=text], input[type=password], input[type=number], select, textarea { font: inherit; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
label { display: block; font-weight: 600; margin: 8px 0 4px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
table { width: 100%; border-collapse: collapse; }
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: .06em; color: var(--muted); font-weight: 600; }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs a { padding: 6px 12px; border-radius: 999px; text-decoration: none; border: 1px solid var(--line); background: #fff; color: var(--ink-2); }
.tabs a.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.progress { height: 8px; background: #eceef3; border-radius: 99px; overflow: hidden; }
.progress > div { height: 100%; background: var(--accent); transition: width .4s; }
.review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.tile.flagged { border-color: #f0c37a; box-shadow: 0 0 0 1px #f0c37a inset; }
.tile.done { opacity: .55; }
.tile .img { background: #f2f2ef; aspect-ratio: 900 / 1260; display: flex; align-items: center; justify-content: center; }
.tile .img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.tile .body { padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tile .title { font-weight: 600; font-size: 13px; }
.tile .flags { font-size: 12px; color: var(--warn); margin: 0; padding-left: 16px; }
.tile .actions { display: flex; gap: 6px; margin-top: auto; }
.tile .actions button { flex: 1; padding: 6px 8px; font-size: 13px; }
.thumb-circle { width: 44px; height: 44px; border-radius: 50%; background: #f2f2ef; object-fit: cover; border: 1px solid var(--line); }
.checks { margin: 0; padding: 0; list-style: none; }
.checks li { padding: 4px 0; }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 6px 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.editor { position: relative; display: inline-block; max-width: 100%; }
.editor img { max-width: 100%; display: block; border-radius: 8px; }
.editor svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.editor .h { cursor: grab; }
.login { max-width: 360px; margin: 10vh auto; }
code { background: #f0f1f4; padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
.small { font-size: 12px; }
/* on/off switches on the watch list */
.switch { position: relative; display: inline-block; width: 42px; height: 24px; margin: 0; cursor: pointer; vertical-align: middle; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch .slider { position: absolute; inset: 0; border-radius: 999px; background: #cfd3dc; transition: background-color .15s; }
.switch .slider::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.switch input:checked + .slider { background: var(--ok); }
.switch input:checked + .slider::before { transform: translateX(18px); }
.switch input:focus-visible + .slider { outline: 2px solid var(--navy); outline-offset: 2px; }
.switch input:disabled { cursor: default; }
.switch input:disabled + .slider { opacity: .45; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bulkbar { padding: 10px 12px; margin: 10px 0 12px; background: var(--bg); border-radius: 8px; }
.watch-list tr:target td { background: #fffbe8; }
/* analytics */
.an-tiles .stat .n { font-size: 30px; }
.an-tiles .stat .l { font-size: 13px; }
.an-table { width: 100%; border-collapse: collapse; }
.an-table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.an-table td { padding: 7px 8px; border-bottom: 1px solid #f0f1f4; vertical-align: middle; }
.an-table tr:hover td { background: #fafaf7; }
.an-table .num, .an-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.an-bar { display: block; flex: 1; min-width: 60px; height: 12px; background: #eef0f4; border-radius: 0 4px 4px 0; overflow: hidden; }
.an-bar > span { display: block; height: 100%; min-width: 2px; background: var(--navy); border-radius: 0 4px 4px 0; }
.an-cols { display: flex; align-items: flex-end; gap: 2px; height: 160px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.an-cols > span { flex: 1; height: 100%; display: flex; align-items: flex-end; cursor: default; }
.an-cols > span:hover { background: #f2f3f6; }
.an-cols i { display: block; width: 100%; min-height: 1px; background: var(--navy); border-radius: 4px 4px 0 0; }
.an-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 8px; vertical-align: -1px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.disk-bar { display: flex; height: 14px; border-radius: 4px; overflow: hidden; background: #eef0f4; margin: 8px 0; }
.disk-bar span { display: block; height: 100%; border-right: 2px solid #fff; }
/* watch list filter and multi-upload */
.filterbar select { min-width: 180px; }
.up-table { width: 100%; margin-top: 12px; border-collapse: collapse; }
.up-table td, .up-table th { padding: 4px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.up-table input[type=text] { width: 100%; min-width: 90px; }
.up-table .thumb-circle { width: 40px; height: 40px; }
#upload.wide { grid-column: 1 / -1; }
.up-table .u-status { max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
