/* Layout: a call-sheet style top bar with uppercase condensed tabs; below it one working view at a time.
   The schedule is a resource grid (time down, days or studios across) that scrolls inside its own frame. */
:root {
  --bg: #F1F2F5;
  --surface: #FFFFFF;
  --surface-2: #E7E9EE;
  --line: #D3D6DD;
  --line-2: #E6E8ED;
  --fg: #161920;
  --muted: #5B6271;
  --accent: #D98E04;
  --accent-ink: #8A5A00;
  --accent-soft: #FBEFD3;
  --accent-text: #1A1200;
  --danger: #C4382C;
  --danger-soft: #FBE3E0;
  --ok: #2B7A4B;
  --ok-soft: #DCF2E4;
  --t-read: #6F55E8;
  --t-reh: #0E8A8C;
  --t-run: #137A4F;
  --t-block: #2E6CDB;
  --t-prelight: #6B7280;
  --t-preshoot: #E0A030;
  --t-tape: #D98E04;
  --t-pickups: #C23F7E;
  --t-aud: #B5551E;
  --t-other: #8A8F99;
  --shadow: 0 8px 30px rgb(20 24 32 / .18);
  --font-display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --hour-h: 48px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14161B; --surface: #1D2026; --surface-2: #272B33; --line: #363B46; --line-2: #2B3038;
    --fg: #ECEDF0; --muted: #9AA1AE; --accent: #E8A317; --accent-ink: #F2BE4C; --accent-soft: #3A2E12; --accent-text: #1A1200;
    --danger: #F0695E; --danger-soft: #3B1F1C; --ok: #58C58A; --ok-soft: #1B3326;
    --t-read: #A08DFF; --t-reh: #3FB8BA; --t-run: #4FBF8A; --t-block: #6B9BFF; --t-prelight: #9AA1AE;
    --t-preshoot: #F0BE5A; --t-tape: #E8A317; --t-pickups: #E26FA6; --t-aud: #F08A52; --t-other: #8A8F99;
    --shadow: 0 8px 30px rgb(0 0 0 / .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14161B; --surface: #1D2026; --surface-2: #272B33; --line: #363B46; --line-2: #2B3038;
  --fg: #ECEDF0; --muted: #9AA1AE; --accent: #E8A317; --accent-ink: #F2BE4C; --accent-soft: #3A2E12; --accent-text: #1A1200;
  --danger: #F0695E; --danger-soft: #3B1F1C; --ok: #58C58A; --ok-soft: #1B3326;
  --t-read: #A08DFF; --t-reh: #3FB8BA; --t-run: #4FBF8A; --t-block: #6B9BFF; --t-prelight: #9AA1AE;
  --t-preshoot: #F0BE5A; --t-tape: #E8A317; --t-pickups: #E26FA6; --t-aud: #F08A52; --t-other: #8A8F99;
  --shadow: 0 8px 30px rgb(0 0 0 / .5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
body { background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 14px; line-height: 1.45; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
.app {
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 0 32px;
  max-width: 1400px; margin: 0 auto;
}
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* Top bar */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  background: var(--bg); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding-block: 10px 0;
}
.brand { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; }
.tally { width: 11px; height: 11px; border-radius: 50%; background: var(--line); transition: background .3s, box-shadow .3s; flex: none; }
.tally.live { background: var(--danger); box-shadow: 0 0 10px var(--danger); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 2px var(--danger); } }
@media (prefers-reduced-motion: reduce) { .tally.live { animation: none; } }
.brand h1 { font-size: 26px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; line-height: 1; }
.brand .today { font-family: var(--font-display); font-size: 15px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding-left: 10px; border-left: 1px solid var(--line); }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; margin-left: auto; margin-right: auto; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  font-family: var(--font-display); font-size: 17px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
  padding: 10px 12px; border: 0; background: none; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap;
}
.tabs button:hover { color: var(--fg); }
.tabs button.on { color: var(--fg); border-bottom-color: var(--accent); }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); padding-bottom: 10px; white-space: nowrap; }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.status.live .dot { background: var(--ok); }
.status.ro .dot { background: var(--accent); }
.status.local .dot { background: var(--t-block); }
@media (max-width: 760px) {
  .topbar { gap: 8px; }
  .brand { width: 100%; padding-bottom: 4px; }
  .tabs { margin-left: -4px; }
  .status { margin-left: auto; }
  .brand .today { margin-left: auto; border: 0; padding: 0; }
}

/* Generic controls */
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--surface); color: var(--fg); font-weight: 500; white-space: nowrap;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--accent-text); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.05); }
.btn.danger { color: var(--danger); }
.btn.sm { padding: 4px 9px; font-size: 13px; }
.btn.link { border: 0; background: none; color: var(--accent-ink); padding: 4px 6px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: none; padding: 7px 12px; color: var(--muted); font-weight: 500; }
.seg button.on { background: var(--surface-2); color: var(--fg); }
input, select, textarea {
  font: inherit; color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  padding: 7px 10px; width: 100%; min-width: 0;
}
input[type="date"], input[type="time"] { font-family: var(--font-mono); font-size: 13px; }
textarea { resize: vertical; min-height: 64px; }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 500; }
label.f > span { text-transform: uppercase; letter-spacing: .05em; font-size: 11px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); font-size: 13px; color: var(--muted);
}
.chip.on { border-color: var(--fg); color: var(--fg); background: var(--surface-2); font-weight: 500; }
.chip .sw { width: 10px; height: 10px; border-radius: 2px; background: var(--c); }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; background: var(--surface-2); color: var(--muted); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.busy { background: var(--accent-soft); color: var(--accent-ink); }
.pill.ex { background: var(--surface-2); color: var(--muted); }

/* View frame */
.view { padding-top: 16px; display: grid; gap: 14px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }
.datenav { display: inline-flex; align-items: center; gap: 6px; }
.datenav .btn { padding: 7px 10px; }
.datenav input[type="date"] { width: 150px; }
.range { font-family: var(--font-display); font-size: 20px; font-weight: 600; letter-spacing: .02em; margin-left: 6px; white-space: nowrap; }
.vh { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.vh h2 { font-size: 28px; font-weight: 600; letter-spacing: .01em; }
.vh .count { color: var(--muted); font-size: 13px; }
.vh .spacer { flex: 1; }
.banner {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 10px 14px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent-ink); border: 1px dashed var(--accent);
}
.banner .btn { margin-left: auto; }
.empty { padding: 40px 24px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 10px; display: grid; gap: 10px; justify-items: center; }
.empty h3 { font-size: 22px; color: var(--fg); font-weight: 600; }
.empty p { margin: 0; max-width: 46ch; }
.note { color: var(--muted); font-size: 13px; }

/* Schedule grid */
.sched { overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); position: relative; }
.sh, .sb { display: grid; grid-template-columns: 56px repeat(var(--cols), minmax(var(--colw, 128px), 1fr)); }
.sh { position: sticky; top: 0; z-index: 3; background: var(--surface); border-bottom: 1px solid var(--line); min-width: max-content; }
.sh .corner { border-right: 1px solid var(--line); }
.sh-cell { padding: 8px 8px 6px; border-right: 1px solid var(--line-2); min-width: 0; }
.sh-cell:last-child { border-right: 0; }
.sh-day { font-family: var(--font-display); font-size: 18px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; line-height: 1.1; display: flex; align-items: center; gap: 8px; }
.sh-cell.today .sh-day::after { content: "Today"; font-size: 10px; padding: 1px 6px; border-radius: 999px; background: var(--accent); color: var(--accent-text); letter-spacing: .06em; }
.sh-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb { height: calc(var(--hour-h) * 16); min-width: max-content; }
.timecol { position: relative; border-right: 1px solid var(--line); background: var(--surface); position: sticky; left: 0; z-index: 2; }
.tl { position: absolute; right: 6px; font-family: var(--font-mono); font-size: 11px; color: var(--muted); padding-top: 2px; font-variant-numeric: tabular-nums; }
.col {
  position: relative; border-right: 1px solid var(--line-2); min-width: 0; touch-action: pan-x pan-y; user-select: none; -webkit-user-select: none;
  background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px), linear-gradient(to bottom, var(--line-2) 1px, transparent 1px);
  background-size: 100% var(--hour-h), 100% calc(var(--hour-h) / 2);
}
.col:last-child { border-right: 0; }
.col.today { background-color: color-mix(in srgb, var(--accent) 5%, transparent); }
.col.can { cursor: cell; }
.closed { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--muted) 14%, transparent) 6px 7px); pointer-events: none; }
.now { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 2; pointer-events: none; }
.now::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.bk {
  position: absolute; border-radius: 4px; padding: 3px 6px 3px 7px; overflow: hidden; cursor: pointer; font-size: 12px; line-height: 1.25;
  border-left: 4px solid var(--c); background: color-mix(in srgb, var(--c) 18%, var(--surface)); color: var(--fg); z-index: 1;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 30%, transparent);
}
.bk:hover { z-index: 2; box-shadow: inset 0 0 0 1px var(--c), var(--shadow); }
.bk.ex { border-left-style: dashed; }
.bk-time { font-family: var(--font-mono); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bk-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-meta { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sel { position: absolute; left: 2px; right: 2px; border: 1px dashed var(--accent); border-radius: 4px; background: color-mix(in srgb, var(--accent) 25%, transparent); pointer-events: none; z-index: 3; padding: 3px 6px; font-family: var(--font-mono); font-size: 11px; color: var(--accent-ink); }
.legend { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; background: var(--c); display: inline-block; }

/* Cards and tables */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: grid; gap: 8px; align-content: start; }
.card h3 { font-size: 22px; font-weight: 600; letter-spacing: .01em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card .kv { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; font-size: 13px; }
.card .kv dt { color: var(--muted); }
.card .kv dd { margin: 0; }
.card .actions { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 560px; }
th { text-align: left; font-family: var(--font-display); font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tr.row { cursor: pointer; }
tr.row:hover td { background: color-mix(in srgb, var(--accent) 6%, transparent); }
td .name { font-weight: 600; }
td .sub { color: var(--muted); font-size: 12px; }
.dept-h td { background: var(--surface-2); font-family: var(--font-display); font-size: 15px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding-block: 6px; }

/* Slot finder */
.findform { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px; align-items: end; }
.findform .wide { grid-column: 1 / -1; }
.slots { display: grid; gap: 6px; }
.slot-day { font-family: var(--font-display); font-size: 18px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-top: 8px; display: flex; align-items: center; gap: 8px; }
.slot-day.today::after { content: "Today"; font-size: 10px; padding: 1px 6px; border-radius: 999px; background: var(--accent); color: var(--accent-text); letter-spacing: .06em; }
.slot { display: grid; grid-template-columns: 1fr auto auto auto; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; }
.slot .st { font-weight: 600; }
.slot .tm { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.slot .len { color: var(--ok); font-weight: 600; font-size: 13px; }
@media (max-width: 560px) { .slot { grid-template-columns: 1fr auto; } .slot .len { grid-column: 1; } }

/* Dialog */
dialog { border: 0; border-radius: 12px; background: var(--surface); color: var(--fg); padding: 0; width: min(680px, calc(100vw - 32px)); max-height: calc(100vh - 32px); box-shadow: var(--shadow); }
dialog::backdrop { background: rgb(0 0 0 / .5); }
.dlg-h { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.dlg-h h2 { font-size: 24px; font-weight: 600; letter-spacing: .01em; flex: 1; }
.dlg-h .x { border: 0; background: none; font-size: 22px; line-height: 1; color: var(--muted); padding: 4px 8px; }
.dlg-b { padding: 16px 18px; overflow: auto; max-height: calc(100vh - 32px - 130px); }
.dlg-f { display: flex; gap: 8px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.dlg-f .spacer { flex: 1; }
.frm { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.frm .span2 { grid-column: 1 / -1; }
@media (max-width: 560px) { .frm { grid-template-columns: 1fr; } .frm .span2 { grid-column: auto; } }
.picker { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px 12px; display: grid; gap: 8px; margin: 0; min-width: 0; }
.picker legend { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 500; padding: 0 4px; }
.picker .ph { display: flex; gap: 8px; align-items: center; }
.picker .ph input { flex: 1; }
.picks { display: flex; gap: 6px; flex-wrap: wrap; max-height: 160px; overflow: auto; }
.pick { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 6px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; cursor: pointer; }
.pick input { width: auto; margin: 0; }
.pick small { color: var(--muted); }
.pick:has(input:checked) { border-color: var(--fg); background: var(--surface-2); }
.pick[hidden] { display: none; }
.conf { display: grid; gap: 6px; }
.conf .c { padding: 8px 12px; border-radius: 6px; font-size: 13px; }
.conf .c.block { background: var(--danger-soft); color: var(--danger); }
.conf .c.warn { background: var(--accent-soft); color: var(--accent-ink); }
.conf .c.ok { background: var(--ok-soft); color: var(--ok); }
.conf label { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.conf label input { width: auto; }
.uplist { display: grid; gap: 4px; font-size: 13px; }
.uplist div { display: grid; grid-template-columns: 110px 1fr; gap: 10px; }
.uplist .num { color: var(--muted); }
.ro-note { font-size: 12px; color: var(--muted); }

/* Toasts */
#toasts { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: grid; gap: 6px; z-index: 20; width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--fg); color: var(--bg); padding: 10px 14px; border-radius: 8px; font-size: 13px; box-shadow: var(--shadow); }
.toast.err { background: var(--danger); color: #fff; }
.skeleton { height: 420px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); display: grid; place-items: center; color: var(--muted); }

/* ── Real-page additions (the artifact host used to supply these) ─────────── */
html, body { margin: 0; min-height: 100%; }
[hidden] { display: none !important; }
img { max-width: 100%; }

/* Production switcher + user bar */
.prodbar { display: flex; align-items: center; gap: 6px; padding-bottom: 10px; }
.prodbar select { width: auto; max-width: 260px; font-family: var(--font-display); font-size: 17px; font-weight: 600; letter-spacing: .02em; padding: 5px 30px 5px 10px; }
.userbar { display: flex; align-items: center; gap: 8px; padding-bottom: 10px; margin-left: auto; }
.userbar .status { padding-bottom: 0; }
@media (max-width: 760px) {
  .prodbar { order: 3; width: 100%; padding-bottom: 6px; }
  .prodbar select { flex: 1; max-width: none; }
  .userbar { order: 2; margin-left: auto; }
  .tabs { order: 4; width: 100%; }
}

/* Sign in */
.auth { display: grid; grid-template-columns: minmax(280px, 400px) 1fr; gap: 32px; align-items: start; padding-top: 6vh; }
@media (max-width: 760px) { .auth { grid-template-columns: 1fr; padding-top: 16px; } .auth-blurb { order: -1; } }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: grid; gap: 14px; }
.auth-seg { justify-self: start; }
.auth-form { display: grid; gap: 12px; }
.auth-form .btn { justify-content: center; }
.auth-msg { color: var(--danger); font-size: 13px; min-height: 1em; }
.auth-blurb h2 { font-size: 34px; font-weight: 600; letter-spacing: .01em; }
.auth-blurb p { color: var(--muted); max-width: 52ch; font-size: 15px; }

/* No production yet */
.home { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 420px)); gap: 16px; padding-top: 24px; }
.home .card h3 { font-size: 24px; }
.home .card p { margin: 0; }
.inline-form { display: flex; gap: 8px; }
.inline-form input { flex: 1; }

/* Members dialog */
.members { display: grid; gap: 6px; }
.member { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 8px; }
.member .nm { font-weight: 600; }
.member .em { color: var(--muted); font-size: 12px; }
.member select { width: auto; padding: 4px 26px 4px 8px; font-size: 13px; }
.codes { display: grid; gap: 8px; }
.code { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; }
.code .val { font-family: var(--font-mono); font-size: 18px; letter-spacing: .08em; padding: 6px 10px; border: 1px dashed var(--line); border-radius: 6px; background: var(--bg); }
.code .lbl { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.danger-zone { border-top: 1px solid var(--line); padding-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.role-pill { text-transform: capitalize; }


/* ── Casting ─────────────────────────────────────────────────────────────── */
.avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--surface-2); flex: none; }
.avatar.lg { width: 96px; height: 96px; border-radius: 12px; }
.avatar.txt { display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 600; color: var(--muted); font-size: 14px; }
td .who { display: flex; align-items: center; gap: 10px; }
.stars { display: inline-flex; gap: 2px; font-size: 16px; line-height: 1; letter-spacing: 1px; }
.stars.ctl button { background: none; border: 0; padding: 0 1px; font-size: 20px; color: var(--line); cursor: pointer; }
.stars.ctl button.on, .stars .on { color: var(--accent); }
.stars .off { color: var(--line); }
.pill.st-new { background: var(--surface-2); color: var(--fg); }
.pill.st-shortlisted { background: var(--accent-soft); color: var(--accent-ink); }
.pill.st-audition { background: #FBE2D2; color: #8F3F0E; }
.pill.st-offered, .pill.st-hired { background: var(--ok-soft); color: var(--ok); }
.pill.st-declined, .pill.st-withdrawn { background: var(--danger-soft); color: var(--danger); }
.pill.open { background: var(--ok-soft); color: var(--ok); }
.pill.closed, .pill.filled { background: var(--surface-2); color: var(--muted); }
.pill.cast { background: var(--accent-soft); color: var(--accent-ink); }
.pill.crew { background: #DDE9F8; color: #1F4D8F; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill.crew { background: #1E2E45; color: #8FB6F0; } :root:not([data-theme="light"]) .pill.st-audition { background: #3F2416; color: #F0A878; } }
:root[data-theme="dark"] .pill.crew { background: #1E2E45; color: #8FB6F0; }
:root[data-theme="dark"] .pill.st-audition { background: #3F2416; color: #F0A878; }
.callcards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.callcard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.callcard img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; display: block; background: #14161B; border-bottom: 1px solid var(--line); }
.callcard .cb { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.callcard h3 { font-size: 20px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.callcard .sub { color: var(--muted); font-size: 13px; }
.linkrow { display: flex; gap: 6px; align-items: center; }
.linkrow input { flex: 1; font-family: var(--font-mono); font-size: 12px; min-width: 0; }
.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.filters select { width: auto; }
/* dialog: builders */
.brows { display: flex; flex-direction: column; gap: 8px; }
.brow { display: grid; grid-template-columns: 1fr auto; gap: 6px 8px; align-items: start; padding: 10px; border: 1px dashed var(--line); border-radius: 10px; background: var(--bg); }
.brow .main { display: grid; gap: 6px; grid-template-columns: 1fr; min-width: 0; }
.brow .row2 { display: grid; gap: 6px; grid-template-columns: 1fr 1fr; }
.brow .row3 { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--muted); }
.brow .row3 label { display: inline-flex; align-items: center; gap: 6px; }
.brow .row3 input[type="checkbox"] { width: auto; }
.brow .x { background: none; border: 0; color: var(--muted); font-size: 18px; line-height: 1; padding: 4px; }
.brow .x:hover { color: var(--danger); }
.brow textarea { min-height: 56px; }
.brow input[type="file"] { padding: 4px; font-size: 12px; }
.brow .cur { font-size: 12px; color: var(--muted); }
.badd { align-self: flex-start; }
.hint { font-size: 12px; color: var(--muted); }
.frm .seg { align-self: flex-start; }
/* applicant dialog */
.app-h { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 12px; }
.app-h .nm { font-family: var(--font-display); font-size: 24px; font-weight: 700; }
.app-h .ct { color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.app-h select { width: auto; }
.app-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
.answers { display: grid; grid-template-columns: 1fr; gap: 8px; }
.answers div { padding: 8px 10px; border-left: 3px solid var(--line); background: var(--bg); border-radius: 0 8px 8px 0; }
.answers b { display: block; font-size: 12px; color: var(--muted); font-weight: 500; margin-bottom: 2px; }
.filelist { display: flex; flex-direction: column; gap: 6px; }
.filelist .fi { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.filelist .fi .thumb { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; background: var(--surface-2); }
.filelist .fi small { color: var(--muted); }
.filelist .fi .spacer { flex: 1; }
.tasklist div { display: flex; gap: 8px; align-items: center; padding: 4px 0; font-size: 13px; }
.tasklist .ok { color: var(--ok); }
.tasklist .pend { color: var(--muted); }
.hire { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; align-items: end; padding: 10px; border: 1px solid var(--line); border-radius: 10px; margin-top: 8px; }
.hire .f { margin: 0; }
.hire .wide { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; }
.prog { font-size: 12px; color: var(--muted); }
.prog.err { color: var(--danger); }
.headshot-row { display: flex; gap: 14px; align-items: center; }
.headshot-row .f { flex: 1; }
.profile-links a { display: block; font-size: 13px; }
.ro-note { font-size: 12px; }
.empty .sub { color: var(--muted); font-size: 13px; }
@media (min-width: 720px) { .app-grid { grid-template-columns: 1fr 1fr; } .answers { grid-template-columns: 1fr 1fr; } }
