/* ShowPilot Co. — swap brand colors here */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');
/* ShowPilot Co. brand tokens — swap colors here (matches the marketing site) */
:root {
  --blue: #2291EB;
  --blue-dark: #1478cc;
  --blue-soft: #eaf5fe;
  --gray: #757475;
  --ink: #1b2026;
  --ink-soft: #2a313a;
  --body: #444b54;
  --dark: #11151a;
  --dark-2: #2a3340;

  --brand: var(--blue);
  --brand-dark: var(--blue-dark);
  --brand-ink: #ffffff;
  --brand-soft: var(--blue-soft);
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --muted: var(--gray);
  --line: #e6e9ee;
  --danger: #d93838;
  --warn-bg: #fff4e5;
  --warn-ink: #8a4b00;
  --ok: #17895a;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 40px rgba(20, 30, 45, 0.08);
  --shadow-sm: 0 2px 8px rgba(20, 30, 45, 0.06);
  --shadow-lg: 0 24px 60px rgba(20, 30, 45, 0.14);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--body); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { color: var(--ink); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
.loading { padding: 40px; text-align: center; color: var(--muted); }

/* layout */
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 16px; padding: 10px 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.logo { font-weight: 800; letter-spacing: -.02em; font-size: 18px; color: var(--ink); white-space: nowrap; }
.logo span { color: var(--brand); }
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.nav a { padding: 6px 12px; border-radius: 8px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.nav a.active, .nav a:hover { background: var(--brand-soft); color: var(--brand); text-decoration: none; }
.user { color: var(--muted); font-size: 13px; white-space: nowrap; }
main { padding: 20px; max-width: 1500px; margin: 0 auto; }
h1 { font-size: 22px; margin: 0 0 4px; letter-spacing: -.01em; }
h2 { font-size: 17px; margin: 0 0 10px; }
.sub { color: var(--muted); margin: 0 0 18px; font-size: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.tz-pill { font-size: 12px; background: var(--surface-2); color: var(--muted); padding: 2px 8px; border-radius: 99px; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); padding: 7px 12px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink); }
.btn:hover { border-color: #c3c9d2; text-decoration: none; }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.small { padding: 4px 9px; font-size: 13px; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.danger { color: var(--danger); }
.btn[disabled] { opacity: .5; cursor: default; }
.linkbtn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); font-weight: 600; font-size: 13px; }
.linkbtn:hover { text-decoration: none; filter: brightness(.97); }
.linkbtn.muted { background: var(--surface-2); color: var(--muted); }

/* cards / lists */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.show-card { display: block; color: var(--ink); }
.show-card:hover { border-color: var(--brand); text-decoration: none; }
.show-card h3 { margin: 0 0 6px; font-size: 16px; }
.meta { color: var(--muted); font-size: 13px; }

/* board */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(290px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.col { background: var(--surface-2); border-radius: var(--radius); padding: 10px; min-height: 120px; }
.col.drop { outline: 2px dashed var(--brand); outline-offset: -2px; }
.col-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 10px; font-weight: 700; font-size: 14px; }
.count { background: var(--surface); border-radius: 99px; padding: 0 8px; font-size: 12px; color: var(--muted); }
.cards { display: flex; flex-direction: column; gap: 8px; }
.ep { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; cursor: pointer; box-shadow: var(--shadow); }
.ep:hover { border-color: #b9c3d3; }
.ep.dragging { opacity: .4; }
.ep-title { font-weight: 600; margin-bottom: 4px; }
.ep-date { font-size: 13px; color: var(--ink); }
.ep-date.none { color: var(--warn-ink); }
.ep-foot { display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.chip { font-size: 12px; padding: 1px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
.chip.assignee { background: #eef7f1; color: var(--ok); }
.moves { margin-left: auto; display: flex; gap: 2px; }
.moves button { border: 0; background: var(--surface-2); border-radius: 6px; width: 26px; height: 24px; cursor: pointer; color: var(--muted); }
.moves button:hover { background: var(--brand-soft); color: var(--brand); }
.more { text-align: center; padding: 6px; }

/* forms */
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 10px 0 4px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=date], input[type=time], input[type=search], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
textarea { min-height: 80px; resize: vertical; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.error { color: var(--danger); font-size: 14px; margin-top: 8px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login { width: 100%; max-width: 380px; }
.login .logo { font-size: 26px; text-align: center; margin-bottom: 4px; }

/* modal */
.backdrop { position: fixed; inset: 0; background: rgba(16,24,40,.45); display: flex; justify-content: center; align-items: flex-start; padding: 40px 16px; overflow-y: auto; z-index: 50; }
.modal { background: var(--surface); border-radius: 12px; width: 100%; max-width: 820px; padding: 22px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.modal.narrow { max-width: 480px; }
.modal-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.modal-head h2 { flex: 1; margin: 0; font-size: 19px; }
.ep-layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 22px; }
.section-title { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin: 18px 0 8px; }
.comment { border-top: 1px solid var(--line); padding: 10px 0; }
.comment:first-child { border-top: 0; }
.comment .who { font-weight: 600; font-size: 13px; }
.comment .when { color: var(--muted); font-size: 12px; margin-left: 6px; }
.comment .body { white-space: pre-wrap; word-break: break-word; margin-top: 2px; }
.activity { font-size: 13px; color: var(--muted); padding: 4px 0; }
.activity b { color: var(--ink); font-weight: 600; }
.activity + .activity { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 6px; }
.activity.show-meta { align-items: flex-start; width: 100%; }
.internal-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--warn-bg); color: var(--warn-ink); text-transform: uppercase; letter-spacing: .05em; }

/* assets */
.assets { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.asset { border-top: 1px solid var(--line); padding: 10px 0; }
.asset:first-of-type { border-top: 0; }
.asset .notes { white-space: pre-wrap; line-height: 1.9; word-break: break-word; font-size: 14px; color: var(--ink); margin-top: 4px; max-height: 220px; overflow: auto; }
.panel.internal { border-color: #f0c98a; background: #fffaf2; }

/* upcoming */
table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--surface-2); }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #fafbfc; }
.day-row td { background: var(--brand-soft); font-weight: 700; color: var(--brand); font-size: 13px; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: white; padding: 10px 16px; border-radius: 8px; z-index: 100; font-size: 14px; }
.empty { color: var(--muted); font-size: 14px; padding: 10px 4px; }
.secret { font-family: ui-monospace, Menlo, monospace; background: var(--surface-2); padding: 8px 10px; border-radius: 8px; user-select: all; word-break: break-all; }

@media (max-width: 760px) {
  main { padding: 14px; }
  .topbar { flex-wrap: wrap; padding: 10px 14px; }
  .nav { order: 3; width: 100%; flex-basis: 100%; }
  .ep-layout, .two { grid-template-columns: 1fr; }
  .board { grid-auto-columns: 85vw; }
  .modal { padding: 16px; }
  .backdrop { padding: 10px; }
  .hide-sm { display: none; }
}

/* ---------- brand layer ---------- */
.topbar { padding: 12px 24px; gap: 22px; box-shadow: 0 1px 0 var(--line); border-bottom: 0; background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(10px); }
.logo img { height: 30px; width: auto; display: block; }
.nav a { color: var(--ink-soft); border-radius: 999px; padding: 7px 14px; }
.nav a.active, .nav a:hover { background: var(--blue-soft); color: var(--blue-dark); }
.user { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
main { padding: 28px 24px 60px; }
h1 { font-size: 28px; }
.btn { border-radius: 999px; padding: 8px 16px; transition: transform .15s, box-shadow .15s, background .15s; }
.btn.primary { box-shadow: 0 8px 22px rgba(34,145,235,.30); }
.btn.primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); filter: none; transform: translateY(-1px); }
.btn.small { padding: 5px 12px; }
.linkbtn { border-radius: 999px; padding: 6px 12px; }
.panel { border-radius: var(--radius); box-shadow: var(--shadow); border-color: transparent; padding: 20px; }
.show-card { position: relative; transition: transform .15s, box-shadow .15s; border: 1px solid transparent; }
.show-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: transparent; }
.show-art { object-fit: cover; background: var(--blue-soft); flex-shrink: 0; display: block; }
.show-art.lg { width: 64px; height: 64px; border-radius: 14px; margin-bottom: 12px; }
.show-art.md { width: 48px; height: 48px; border-radius: 12px; }
.show-art.sm { width: 28px; height: 28px; border-radius: 7px; }
.show-art.initial { display: grid; place-items: center; color: var(--blue-dark); font-weight: 800; }
.show-art.lg.initial { font-size: 20px; }
.show-art.md.initial { font-size: 16px; }
.show-art.sm.initial { font-size: 11px; }
.show-card .show-art.lg { margin-bottom: 12px; }
.show-title { display: flex; align-items: center; gap: 14px; min-width: 0; }
.show-title h1 { margin: 0 0 4px; }
.show-meta { display: inline-flex; align-items: center; gap: 8px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; }
.back-link:hover { text-decoration: none; color: var(--brand); }
.icon { flex-shrink: 0; display: block; }
.linkbtn .icon, .btn .icon, .chip .icon, .ep-date .icon, .back-link .icon, .moves .icon { display: block; }
.icon-btn { padding: 6px !important; width: 36px; height: 36px; justify-content: center; }
.chip { display: inline-flex; align-items: center; gap: 5px; }
.ep-date { display: inline-flex; align-items: center; gap: 6px; }
.moves button { display: inline-flex; align-items: center; justify-content: center; }
.cover-preview { margin-top: 12px; }
.cover-preview .show-art.lg { margin-bottom: 0; }
.drive-logo { display: block; }
.stat-row { display: flex; gap: 16px; margin-top: 12px; }
.stat b { display: block; color: var(--ink); font-size: 18px; font-weight: 800; }
.stat span { font-size: 12px; color: var(--muted); }
.col { background: #eef2f7; border-radius: var(--radius); padding: 12px; }
.col-head { color: var(--ink); }
.col-head .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 8px; background: var(--gray); }
.col-head .dot.produced { background: #f0a23b; }
.col-head .dot.approved { background: var(--blue); }
.col-head .dot.published { background: var(--ok); }
.ep { border-radius: 12px; border-color: transparent; box-shadow: var(--shadow-sm); transition: box-shadow .15s, transform .15s; }
.ep:hover { box-shadow: 0 8px 24px rgba(20,30,45,.12); border-color: transparent; transform: translateY(-1px); }
.ep-title { color: var(--ink); }
.ep-date { font-weight: 600; color: var(--blue-dark); }
.chip.assignee { background: #e9f7f0; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=date], input[type=time], input[type=search], select, textarea { border-radius: var(--radius-sm); padding: 10px 12px; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--blue-soft); border-color: var(--blue); }
.modal { border-radius: 20px; box-shadow: var(--shadow-lg); padding: 26px; }
table { border-radius: var(--radius); box-shadow: var(--shadow); }
.day-row td { background: var(--blue-soft); color: var(--blue-dark); }
/* login: dark brand panel like the marketing site hero */
.login-wrap { background: radial-gradient(1200px 600px at 20% -10%, rgba(34,145,235,.35), transparent 60%), linear-gradient(160deg, var(--dark), var(--dark-2)); }
.login { border-radius: 20px; padding: 32px; }
.login-logo { display: block; height: 36px; width: auto; margin: 0 auto 26px; }
.login-brand { text-align: center; margin-bottom: 22px; }
.login-brand img { height: 34px; width: auto; }
.login .btn.primary { width: 100%; justify-content: center; padding: 12px; margin-top: 18px; }
.login-foot { color: rgba(255,255,255,.55); text-align: center; font-size: 12px; margin-top: 18px; }
@media (max-width: 760px) { .logo img { height: 24px; } h1 { font-size: 23px; } main { padding: 18px 14px 50px; } .show-art.lg { width: 56px; height: 56px; } .show-title { gap: 10px; } }

td .show-meta { align-items: flex-start; }
td .show-meta .show-art { margin-top: 2px; }

/* notifications */
.bell-wrap { position: relative; }
.bell-badge { position: absolute; top: -2px; right: -2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--blue); color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; line-height: 1; }
.bell-menu { position: absolute; right: 0; top: calc(100% + 8px); width: min(360px, 86vw); white-space: normal; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); z-index: 40; overflow: hidden; max-height: min(420px, 70vh); overflow-y: auto; }
.bell-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px 8px; }
.bell-head strong { color: var(--ink); font-size: 14px; }
.bell-item { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; color: var(--ink); border-top: 1px solid var(--line); min-width: 0; }
.bell-item:hover { background: var(--blue-soft); text-decoration: none; }
.bell-item.unread { background: #f3f9fe; }
.bell-item-title { font-weight: 600; font-size: 13px; overflow-wrap: anywhere; word-break: break-word; min-width: 0; }
.avatar.sm { width: 22px; height: 22px; font-size: 10px; }

/* mentions */
.mention { color: var(--blue); font-weight: 600; }
.mention-wrap { position: relative; }
.mention-menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 60; overflow: hidden; max-height: 220px; overflow-y: auto; }
.mention-item { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 0; background: transparent; padding: 8px 12px; cursor: pointer; color: var(--ink); font-weight: 600; }
.mention-item:hover, .mention-item.active { background: var(--blue-soft); color: var(--blue-dark); }

/* vertical + cross-column drag */
.ep { cursor: grab; touch-action: manipulation; }
.drop-ph { border: 2px dashed var(--blue); border-radius: 12px; background: rgba(34,145,235,.08); pointer-events: none; }
.ep-ghost { position: fixed; z-index: 80; pointer-events: none; box-shadow: var(--shadow-lg); opacity: .95; margin: 0; transform-origin: top left; }
body.is-dragging, body.is-dragging * { cursor: grabbing !important; user-select: none !important; }
body.is-dragging { overflow: hidden; }
body.is-dragging .ep { transition: none; }
body.is-dragging .ep:hover { transform: none; }
@media (max-width: 760px) {
  .bell-wrap { position: static; }
  .bell-menu { position: fixed; left: 12px; right: 12px; width: auto; top: 58px; }
}

/* episode schedule */
.sched-h { display: flex; align-items: center; gap: 8px; margin: 28px 0 10px; font-size: 16px; }
.sched-h .count { margin-left: 0; }
.sched-table-wrap { overflow-x: auto; }
table.sched { min-width: 920px; }
table.sched th, table.sched td { vertical-align: middle; }
table.sched td.num { width: 4.6rem; }
table.sched td.when { min-width: 11rem; }
input.inline, textarea.inline { width: 100%; padding: 5px 7px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font: inherit; }
input.inline.title { font-weight: 600; color: var(--ink); }
input.inline:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.two.tight { gap: 6px; }
.sched-links { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip.muted { background: var(--surface-2); color: var(--muted); }
.chip.warn { background: var(--warn-bg); color: var(--warn-ink); }
.warn-text { color: var(--warn-ink); display: flex; align-items: center; gap: 4px; }
.sched-card-title { margin: 0; font-size: 16px; }
.sched-card { cursor: pointer; }
.sched-card:hover { border-color: var(--brand); }
.sync-banner { background: var(--blue-soft); border: 1px solid #cde6fa; border-radius: var(--radius); padding: 12px 16px; margin-bottom: 18px; color: var(--ink); }
.sync-banner .meta { margin-top: 2px; }
.sync-banner.error { background: #fdecec; border-color: #f4c7c7; }
.show-sm { display: none; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.field-grid label.chk { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); margin: 0; }
.tab-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; margin-bottom: 8px; }
.sheet-from { font-size: 11px; color: var(--muted); }
@media (max-width: 760px) {
  .hide-sm-block { display: none; }
  .show-sm { display: block; }
  .field-grid, .tab-row { grid-template-columns: 1fr; }
  table.sched { min-width: 0; }
}
.chk { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); margin: 6px 0; }
.qc-box { margin: 14px 0 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); } .qc-box .chk { margin: 4px 0; font-weight: 600; color: var(--ink); }
