/* Content HQ — warm ink + red, condensed display type. One dark theme,
   built for editors working at night and phones on set. */
:root {
  --bg: #151210;
  --panel: #1d1916;
  --panel2: #241f1b;
  --ink: #f2ede7;
  --muted: #a89e97;
  --line: #2e2823;
  --red: #ff4b3c;
  --red-dim: #33150f;
  --good: #5bc378;
  --warn: #e0a63f;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 -apple-system, "Helvetica Neue", Segoe UI, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.logo {
  font-family: "Avenir Next Condensed", "Arial Narrow", -apple-system, sans-serif;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.logo span { color: var(--red); }
h1.logo { font-size: 34px; margin: 0 0 6px; }
h3 { margin: 0 0 14px; font-size: 18px; }
code { background: var(--panel2); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; font-size: 13px; }
a { color: var(--red); }

/* ---------- auth */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 30px 28px; width: 100%; max-width: 380px; }
.auth-sub { color: var(--muted); margin: 0 0 18px; font-size: 14px; }
.notice { background: var(--red-dim); border: 1px solid var(--red); border-radius: 6px; padding: 10px 12px; font-size: 14px; margin: 4px 0 10px; }

/* ---------- shell */
.top {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 12px 18px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--bg); z-index: 5;
}
.tabs { display: flex; gap: 4px; flex: 1; }
.tab {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font: 700 13px "Avenir Next Condensed", "Arial Narrow", sans-serif;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 8px 12px; border-radius: 6px;
}
.tab.on { color: var(--ink); background: var(--panel2); box-shadow: inset 0 -2px 0 var(--red); }
.me { color: var(--muted); font-size: 13px; }
main { padding: 18px; }

/* ---------- controls */
label { display: block; font-size: 12.5px; color: var(--muted); margin: 10px 0; }
input, select, textarea {
  display: block; width: 100%; margin-top: 5px;
  background: var(--panel2); color: var(--ink);
  border: 1px solid var(--line); border-radius: 6px;
  padding: 9px 11px; font: inherit; font-size: 14px;
}
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--red); outline-offset: 1px; }
textarea { resize: vertical; line-height: 1.6; }
.btn {
  background: var(--red); color: #fff; border: none; border-radius: 6px;
  padding: 10px 16px; font: 700 14px inherit; cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: var(--panel2); color: var(--ink); border: 1px solid var(--line); }
.btn.danger { background: none; color: var(--red); border: 1px solid var(--red); }
.btn.wide { width: 100%; margin-top: 10px; }
.btn.small { padding: 6px 10px; font-size: 12.5px; }
.mini {
  background: var(--panel2); color: var(--muted); border: 1px solid var(--line);
  border-radius: 5px; padding: 3px 8px; font-size: 12px; cursor: pointer;
}
.mini:hover:not(:disabled) { color: var(--ink); border-color: var(--muted); }
.mini:disabled { opacity: 0.35; cursor: default; }
.spacer { flex: 1; }

.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.filter-bar select, .filter-bar input { width: auto; margin-top: 0; min-width: 150px; }
.filter-bar input { flex: 1; max-width: 340px; }

.loading, .empty-col { color: var(--muted); padding: 18px 6px; font-size: 14px; }
.hint { color: var(--muted); font-size: 13px; margin-top: 16px; }

/* ---------- chips */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--panel2); border: 1px solid var(--line); border-radius: 999px;
  padding: 2px 9px; font-size: 11.5px; font-weight: 600; color: var(--muted);
}
.chip.link { text-decoration: none; color: var(--red); }
.chip.p-youtube { color: #ff6a5e; }
.chip.p-instagram { color: #d78ce0; }
.chip.p-tiktok { color: #7fd8d0; }
.chip.p-vlog { color: var(--warn); }
.chip.who { color: var(--ink); }
.chip.s-draft { color: var(--muted); }
.chip.s-approved, .chip.s-posted { color: var(--good); }
.chip.s-voiced { color: #d78ce0; }
.chip.s-pending { color: var(--warn); }
.chip.k-original { color: var(--ink); }
.chip.k-inspiration { color: var(--warn); }
.chip.cat { cursor: pointer; padding: 6px 12px; font-size: 12.5px; }
.chip.cat.on { color: #fff; background: var(--red); border-color: var(--red); }
.due { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.due.overdue { color: var(--red); font-weight: 700; }

/* ---------- pipeline board */
.board {
  display: flex; gap: 12px; overflow-x: auto; padding-bottom: 14px;
  align-items: flex-start;
}
.col {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  min-width: 240px; width: 240px; flex: none;
}
.col-head {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.col-title {
  font: 700 12.5px "Avenir Next Condensed", "Arial Narrow", sans-serif;
  text-transform: uppercase; letter-spacing: 0.1em;
}
.col-count { color: var(--muted); font-size: 12px; flex: 1; font-variant-numeric: tabular-nums; }
.col-body { padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.card {
  background: var(--panel2); border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 11px;
}
.card-title { font-weight: 600; font-size: 14px; margin-bottom: 7px; }
.card-meta { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-bottom: 8px; }
.card-actions { display: flex; gap: 5px; }
.card-actions .edit { margin-left: auto; }

/* ---------- modal */
.overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); z-index: 20;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 22px; width: 100%; max-width: 460px; max-height: 92vh; overflow-y: auto;
}
.modal-actions { display: flex; gap: 8px; margin-top: 16px; align-items: center; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- scripts */
.split { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
.script-list { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; max-height: 75vh; overflow-y: auto; }
.script-item { padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.script-item:hover { background: var(--panel2); }
.script-item.on { background: var(--panel2); }
.script-item.on .si-title { color: var(--red); }
.si-title { font-weight: 600; font-size: 14px; margin-bottom: 5px; }
.si-meta { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.si-date { color: var(--muted); font-size: 11.5px; margin-left: auto; font-variant-numeric: tabular-nums; }
.script-editor { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.script-editor textarea { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13.5px; }
.script-blank { color: var(--muted); padding: 30px 10px; text-align: center; }

/* ---------- hooks */
.cat-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.hook-list { display: flex; flex-direction: column; gap: 8px; max-width: 760px; }
.hook { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.hook-text { font-size: 14.5px; margin-bottom: 8px; }
.hook-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hook-notes { color: var(--muted); font-size: 12.5px; }
.hook-meta .copy { margin-left: auto; }

/* ---------- team */
.team-intro { color: var(--muted); font-size: 14px; max-width: 68ch; margin-bottom: 14px; }
.tablewrap { overflow-x: auto; }
table.team { border-collapse: collapse; width: 100%; min-width: 640px; }
table.team th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted); padding: 8px 10px; border-bottom: 2px solid var(--line);
}
table.team td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.team input, table.team select { margin-top: 0; min-width: 130px; }
.row-actions { display: flex; gap: 6px; }

/* ---------- toast */
#toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--panel); color: var(--ink); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 18px; font-size: 14px; opacity: 0;
  pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 40;
  max-width: 90vw;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.error { border-color: var(--red); }
@media (prefers-reduced-motion: reduce) {
  #toast { transition: none; }
}

/* ---------- phones */
@media (max-width: 720px) {
  .top { gap: 8px; padding: 10px 12px; }
  .me { display: none; }
  main { padding: 12px; }
  .split { grid-template-columns: 1fr; }
  .script-list { max-height: 34vh; }
  .col { min-width: 78vw; width: 78vw; }
  .row2 { grid-template-columns: 1fr; gap: 0; }
}
