/* ScholarRadar dashboard. Brand colours: navy #0e135a and orange #f96a07. */
:root {
  --bg: #f4f5fb; --panel: #ffffff; --ink: #14173f; --muted: #5c6187; --line: #dfe2f1;
  --navy: #0e135a; --navy-2: #1a2070; --orange: #f96a07; --orange-ink: #b34900;
  --ok: #0b7d57; --ok-bg: #ddf6ec; --warn: #9a5b00; --warn-bg: #fff1cf; --bad: #c0273c; --bad-bg: #fde5e8;
  --blue: #2747f5; --blue-bg: #e6eaff;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #090c33; --panel: #10155a; --ink: #f1f2ff; --muted: #b3b8e6; --line: #2b3288;
    --navy: #070a2b; --navy-2: #1a2070; --orange-ink: #ffa769;
    --ok: #5be0ae; --ok-bg: #123e3a; --warn: #ffd772; --warn-bg: #4a3a10; --bad: #ff8f9c; --bad-bg: #47203a;
    --blue: #9fb0ff; --blue-bg: #1f2779;
    color-scheme: dark;
  }
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1rem/1.55 var(--body); }
a { color: var(--blue); text-underline-offset: 0.16em; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 0.5em; }
h1 { font-size: 1.9rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
p { margin: 0 0 0.8em; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); } .small { font-size: 0.88rem; } .nowrap { white-space: nowrap; }

/* layout */
.shell { display: grid; min-height: 100vh; grid-template-columns: 250px minmax(0, 1fr); }
.side { background: var(--navy); color: #fff; padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 16px; color: #fff; text-decoration: none; font: 800 1.2rem var(--display); }
.brand img { width: 40px; height: 40px; background: #fff; border-radius: 11px; padding: 4px; }
.brand span span { color: var(--orange); }
.nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 12px; border-radius: 11px; color: #d9dcff; text-decoration: none; font-weight: 700; }
.nav a:hover { background: rgba(255, 255, 255, 0.09); color: #fff; }
.nav a.on { background: var(--orange); color: #1c0e00; }
.count { min-width: 24px; padding: 1px 7px; border-radius: 999px; background: #fff; color: var(--navy); font-size: 0.8rem; text-align: center; }
.side__foot { margin-top: auto; padding: 12px 10px 0; font-size: 0.85rem; color: #b9bdea; }
.side__foot button { background: none; border: 0; color: #d9dcff; font: inherit; text-decoration: underline; cursor: pointer; padding: 0; }
.main { padding: 26px clamp(16px, 3vw, 40px) 60px; min-width: 0; }
.head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 10px 20px; margin-bottom: 20px; }
.head h1 { margin: 0; } .head p { margin: 4px 0 0; color: var(--muted); }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px; }
  .brand { padding: 4px 8px; } .nav { display: flex; flex-wrap: wrap; gap: 4px; } .nav a { padding: 8px 10px; }
  .side__foot { margin: 0 0 0 auto; padding: 0 8px; }
}

/* pieces */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.panel + .panel { margin-top: 16px; }
.grid { display: grid; gap: 16px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-bottom: 16px; }
.tile { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; text-decoration: none; color: var(--ink); }
.tile:hover { border-color: var(--orange); }
.tile b { display: block; font: 800 2rem/1 var(--display); font-variant-numeric: tabular-nums; }
.tile span { color: var(--muted); font-size: 0.92rem; }
.tile--warn b { color: var(--warn); } .tile--ok b { color: var(--ok); }
.banner { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-weight: 700; }
.banner--warn { background: var(--warn-bg); color: var(--warn); }
.flash { padding: 12px 16px; border-radius: 12px; margin-bottom: 12px; font-weight: 700; }
.flash--ok { background: var(--ok-bg); color: var(--ok); } .flash--err { background: var(--bad-bg); color: var(--bad); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 11px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: 700 0.95rem var(--body); text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--orange); }
.btn--go { background: var(--orange); border-color: var(--orange); color: #1c0e00; }
.btn--ok { background: var(--ok); border-color: var(--ok); color: #fff; }
@media (prefers-color-scheme: dark) { .btn--ok { color: #062014; } }
.btn--bad { color: var(--bad); }
.btn--sm { min-height: 34px; padding: 0 12px; font-size: 0.88rem; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
form.inline { display: inline; }

.pill { display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; white-space: nowrap; background: var(--blue-bg); color: var(--blue); }
.pill--needs_manual_check { background: var(--warn-bg); color: var(--warn); }
.pill--verified, .pill--approved, .pill--published { background: var(--ok-bg); color: var(--ok); }
.pill--rejected, .pill--duplicate { background: var(--bad-bg); color: var(--bad); }
.pill--closed { background: var(--line); color: var(--muted); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: var(--bad); flex: none; }
.dot--ok { background: var(--ok); }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 0.82rem; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }
td a.title { font-weight: 700; color: var(--ink); text-decoration: none; }
td a.title:hover { color: var(--blue); text-decoration: underline; }

.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tabs a { padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.9rem; }
.tabs a.on { background: var(--navy-2); border-color: var(--navy-2); color: #fff; }

input[type="text"], input[type="url"], input[type="date"], input[type="number"], input[type="password"], input[type="search"], select, textarea {
  width: 100%; min-height: 42px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit;
}
textarea { min-height: 110px; }
label { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 5px; }
.field { margin-bottom: 14px; }
.fields { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.checks { display: flex; flex-wrap: wrap; gap: 6px 16px; } .checks label { display: inline-flex; gap: 6px; align-items: center; font-weight: 400; margin: 0; }
.switch { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.switch:last-of-type { border-bottom: 0; }
.switch input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--orange); flex: none; }
.switch b { display: block; } .switch span { color: var(--muted); font-size: 0.92rem; }

.card { background: var(--panel); border: 1px solid var(--line); border-left: 5px solid var(--orange); border-radius: 14px; padding: 16px; }
.card + .card { margin-top: 12px; }
.card h3 { margin-bottom: 4px; font-size: 1.15rem; }
.facts { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 0.93rem; color: var(--muted); margin: 6px 0 10px; }
.facts b { color: var(--ink); }
.reason { background: var(--warn-bg); color: var(--warn); border-radius: 10px; padding: 8px 12px; font-size: 0.92rem; margin-bottom: 12px; }
.list { margin: 0; padding: 0; list-style: none; }
.list li { padding: 9px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: baseline; justify-content: space-between; }
.list li:last-child { border-bottom: 0; }
.job { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--bg); margin-bottom: 14px; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--orange); animation: spin 0.9s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }
pre.log { margin: 0; max-height: 560px; overflow: auto; background: #0a0d2e; color: #dfe3ff; border-radius: 12px; padding: 14px; font: 0.82rem/1.5 ui-monospace, Consolas, monospace; white-space: pre-wrap; word-break: break-word; }
.login { max-width: 380px; margin: 12vh auto; }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.row.nowrap { flex-wrap: nowrap; }
.list li > span:first-child { min-width: 0; }


/* ---- review queue: select several at once ---- */
.bulkbar { position: sticky; top: 8px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 14px; margin-bottom: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 6px 18px rgba(0, 0, 0, .12); }
.bulkbar__all { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; cursor: pointer; }
.bulkbar__space { flex: 1; }
.bulkbar input[type="checkbox"], .pick input[type="checkbox"] { width: 20px; height: 20px; min-height: 0; padding: 0; accent-color: var(--ok); cursor: pointer; }
.bulkbar .btn[disabled] { opacity: .45; cursor: not-allowed; }
.card--pick { position: relative; padding-left: 52px; }
.pick { position: absolute; left: 0; top: 0; bottom: 0; width: 48px; display: flex; align-items: flex-start; justify-content: center; padding-top: 20px; cursor: pointer; }
.card--pick.is-picked { outline: 2px solid var(--ok); outline-offset: -2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- posters page ---- */
.posters { display: grid; gap: 14px; }
.posters .card + .card { margin-top: 0; }
.poster-card { display: grid; gap: 18px; grid-template-columns: minmax(0, 330px) minmax(0, 1fr); align-items: start; }
.poster-card__pics { display: grid; grid-template-columns: 1.78fr 1fr; gap: 10px; align-items: start; }
.poster-card__pics img { display: block; width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); }
.poster-card h3 { display: flex; gap: 10px; align-items: flex-start; }
.poster-card textarea { min-height: 190px; font-size: 0.92rem; line-height: 1.45; }
.pick-inline input { width: 20px; height: 20px; min-height: 0; padding: 0; margin-top: 3px; accent-color: var(--ok); cursor: pointer; }
.poster-card.is-picked { outline: 2px solid var(--ok); outline-offset: -2px; }
@media (max-width: 820px) { .poster-card { grid-template-columns: 1fr; } }

/* ---- paste the official page text ---- */
.paste { margin-bottom: 16px; }
.paste summary { cursor: pointer; }
.paste textarea { min-height: 170px; }
