/* Nnuma — internal screening tool.
   Layout: fixed teal sidebar, wide working area; cards only where a block is its own object. */
:root {
  --ink: #172326; --ink-2: #44535a; --mute: #6c7a80; --line: #e2e6e4; --line-2: #eef1ef;
  --bg: #f3f5f3; --card: #ffffff; --side: #17363a; --side-ink: #d9e4e2; --side-mute: #8fa9a6;
  --teal: #20474b; --teal-2: #2e6a70; --amber: #d8913a; --amber-bg: #fbf0e0;
  --blue: #2f6fa8; --blue-bg: #e8f1fa; --green: #2f7d4f; --green-bg: #e5f3ea;
  --red: #b3412f; --red-bg: #f9e8e4; --grey-bg: #eef1f0;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r: 10px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 13px/1.45 var(--sans); }
a { color: var(--teal-2); }
h1 { font-size: 19px; line-height: 1.25; margin: 0; letter-spacing: -.01em; text-wrap: balance; }
h2 { font-size: 14px; margin: 0 0 8px; }
h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--mute); margin: 0 0 8px; font-weight: 600; }
p { margin: 0 0 10px; max-width: 72ch; }
.num, td.num, .tabular { font-variant-numeric: tabular-nums; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }

/* shell */
.shell { display: grid; grid-template-columns: 196px 1fr; min-height: 100%; }
.side { background: var(--side); color: var(--side-ink); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 12px; color: #fff; text-decoration: none; font-weight: 650; font-size: 17px; letter-spacing: -.01em; }
.brand img { width: 30px; height: 30px; }
.nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 8px; color: var(--side-ink); text-decoration: none; }
.nav a:hover { background: rgba(255,255,255,.06); }
.nav a.on { background: rgba(255,255,255,.12); color: #fff; font-weight: 600; }
.nav .count { background: var(--amber); color: #1d1406; border-radius: 99px; font-size: 11.5px; font-weight: 700; padding: 0 7px; line-height: 19px; }
.nav-sep { height: 1px; background: rgba(255,255,255,.08); margin: 10px 6px; }
.side-foot { margin-top: auto; font-size: 12px; color: var(--side-mute); padding: 8px 10px; display: grid; gap: 6px; }
.side-foot button { all: unset; cursor: pointer; color: var(--side-ink); text-decoration: underline; text-underline-offset: 2px; }
.running-pill { display: flex; gap: 8px; align-items: center; background: rgba(216,145,58,.16); color: #f3d3a8; border-radius: 8px; padding: 8px 10px; font-size: 12px; margin: 8px 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); flex: none; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .dot { animation: none; } }

.main { padding: 20px 24px 48px; min-width: 0; max-width: 1400px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.head p { color: var(--ink-2); margin: 4px 0 0; font-size: 12.5px; }
.stack { display: grid; gap: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; align-items: start; }
.dash { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 14px; align-items: start; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 12px 14px 4px; }
.card-head h2 { margin: 0; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card > h2:first-child { margin-top: 0; }
.muted { color: var(--mute); }
.small { font-size: 12.5px; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; text-decoration: none; color: inherit; }
.stat .v { font-size: 21px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--ink-2); font-size: 12px; }
.stat.attn { border-color: #efc58f; background: var(--amber-bg); }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
th { font-size: 11.5px; color: var(--mute); font-weight: 600; background: #fafbfa; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; }
td .sub { color: var(--mute); font-size: 11.5px; }
.title-cell { max-width: 360px; }
.title-cell a { color: var(--ink); text-decoration: none; font-weight: 550; }
.title-cell a:hover { text-decoration: underline; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 420px; display: block; }

/* pills */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 0 7px; border-radius: 99px; background: var(--grey-bg); color: var(--ink-2); white-space: nowrap; }
.pill.probable { background: var(--amber-bg); color: #8a5512; }
.pill.listen { background: var(--blue-bg); color: var(--blue); }
.pill.confirmed, .pill.ok, .pill.done { background: var(--green-bg); color: var(--green); }
.pill.rejected, .pill.error { background: var(--red-bg); color: var(--red); }
.pill.pending, .pill.queued, .pill.running { background: var(--amber-bg); color: #8a5512; }
.pill.manual { background: var(--blue-bg); color: var(--blue); }
.pill.src { background: transparent; border: 1px solid var(--line); color: var(--ink-2); font-weight: 500; }

/* forms */
label { display: grid; gap: 4px; font-size: 12.5px; color: var(--ink-2); font-weight: 550; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], select, textarea {
  font: inherit; color: var(--ink); background: #fff; border: 1px solid #cfd6d3; border-radius: 7px; padding: 6px 9px; width: 100%; min-width: 0; }
textarea { min-height: 70px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid #9cc5c1; outline-offset: 0; border-color: var(--teal-2); }
input[type=file] { font: inherit; font-size: 13px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; align-items: end; }
.form-grid { display: grid; gap: 12px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; color: var(--ink); font-size: 13.5px; }
.check input { margin-top: 3px; }
.hint { color: var(--mute); font-size: 12.5px; font-weight: 400; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600; border-radius: 7px; padding: 6px 12px; border: 1px solid #cfd6d3; background: #fff; color: var(--ink); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: #f6f8f7; }
.btn.primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.primary:hover { background: var(--teal-2); }
.btn.good { background: var(--green); border-color: var(--green); color: #fff; }
.btn.bad { color: var(--red); border-color: #e8c3bb; }
.btn.small { padding: 3px 8px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:focus-visible, a:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline { display: inline; }

/* flashes */
.flash { border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; background: var(--green-bg); color: #1f5a37; border: 1px solid #c7e3d1; }
.flash.error { background: var(--red-bg); color: #7c2c1f; border-color: #edc9c1; }
.banner { border-radius: var(--r); padding: 14px 16px; background: var(--amber-bg); border: 1px solid #efc58f; }
.banner.info { background: var(--blue-bg); border-color: #c7dcef; }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 0; flex-wrap: wrap; }
.tabs a { padding: 8px 10px; text-decoration: none; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--ink); border-color: var(--teal); font-weight: 600; }
.tabs .n { color: var(--mute); font-variant-numeric: tabular-nums; margin-left: 4px; }

/* review */
.review { display: grid; grid-template-columns: minmax(260px, 420px) 1fr; gap: 20px; }
.review .media img { width: 100%; border-radius: 8px; display: block; background: #000; }
.review audio { width: 100%; margin-top: 10px; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; font-size: 13.5px; }
.kv dt { color: var(--mute); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.meter { height: 6px; border-radius: 99px; background: var(--line-2); overflow: hidden; margin-top: 4px; }
.meter i { display: block; height: 100%; background: var(--amber); }
.timeline { position: relative; height: 26px; background: var(--line-2); border-radius: 6px; margin: 6px 0 2px; }
.timeline i { position: absolute; top: 0; bottom: 0; background: var(--amber); border-radius: 6px; opacity: .9; }
.timeline-labels { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--mute); font-variant-numeric: tabular-nums; }

/* setup checklist */
.steps { display: grid; gap: 10px; counter-reset: s; }
.step { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: center; }
.step .mark { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--grey-bg); color: var(--ink-2); }
.step.done .mark { background: var(--green); color: #fff; }

/* progress */
.progress { height: 8px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--teal-2); transition: width .4s; }

/* login */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; background: var(--side); }
.login .card { width: 100%; max-width: 380px; padding: 28px; }
.login .logo { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; font-size: 18px; font-weight: 650; }
.login .logo img { width: 34px; }

.empty { padding: 20px 16px; text-align: center; color: var(--mute); }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; align-content: flex-start; padding: 10px 12px; }
  .brand { padding: 4px 8px; }
  .nav { display: flex; flex-wrap: wrap; gap: 2px; }
  .nav-sep, .side-foot { display: none; }
  .main { padding: 20px 16px 48px; }
  .review { grid-template-columns: 1fr; }
  .dash { grid-template-columns: 1fr; }
}

/* songs */
.routes { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 14px; align-items: start; }
.route-head { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.route-head h2 { margin: 0 0 2px; }
.route-n { flex: none; width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--teal); color: #fff; font-size: 14px; }
.steps-list { margin: 8px 0; padding-left: 18px; display: grid; gap: 3px; }
table.compact td { padding: 4px 6px; border-bottom: 1px solid var(--line-2); }
.btn.tiny { padding: 1px 7px; font-size: 11.5px; font-weight: 550; border-radius: 6px; }
.nav a.small-link { font-size: 12.5px; padding: 5px 10px; color: var(--side-mute); }
.nav a.small-link.on { color: #fff; }
details > summary.btn { list-style: none; }
