/* Wheelhouse Media brand (June 2023 sheet), as in Mediator. The three stops of
   Gradient 1 double as status colours: missing, weak, found.

   Phone first: shooters, producers and often the client work from a phone on
   the course, so faces fill their tiles and every action is thumb sized. The
   editor's desktop gets wider grids and full frames on top of that. */
:root {
  --bg: #111111;
  --panel: #1a1a1a;
  --panel-2: #242424;
  --line: #333333;
  --text: #f9f9f9;
  --muted: #909090;
  --accent: #fca725;
  --accent-dim: rgba(252, 167, 37, .17);
  --accent-line: rgba(252, 167, 37, .45);
  --good: #96e02a;
  --warn: #fca725;
  --bad: #fe5343;
  --info: #47a0d1;
  --grad-1: linear-gradient(60deg, #fe5343 0%, #fca725 50%, #96e02a 96%);
  --radius: 12px;
  --shadow: 0 8px 28px rgba(0, 0, 0, .55);
  --tap: 44px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; min-height: 100%;
  background: var(--bg); color: var(--text);
  font: 15px/1.45 "Suisse Int'l", "Suisse Intl", -apple-system, BlinkMacSystemFont,
        "Segoe UI", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 21px; }
h3 { font-size: 16px; }
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { -webkit-user-drag: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grow { flex: 1; }

/* ---------------------------------------------------------------- top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 18px;
  padding: 10px 20px; background: var(--panel); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mark { width: 42px; height: 26px; flex: none;
  background: url("/static/brand/logomark.png") left center/contain no-repeat; }
.brand h1 { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand .name { min-width: 0; }
/* The client's logo is dark blue, so it sits on a white badge. */
.cfflogo { flex: none; display: block; height: 30px; width: auto; padding: 3px 6px; background: #fff; border-radius: 6px; }
.brand p { margin: 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
nav.tabs { display: flex; gap: 4px; background: var(--bg); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px; overflow-x: auto; }
nav.tabs a { color: var(--muted); padding: 6px 14px; border-radius: 999px; white-space: nowrap; }
nav.tabs a:hover { color: var(--text); }
nav.tabs a.active { background: var(--grad-1); color: #111; font-weight: 600; }
.who { margin-left: auto; display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); }
.scanbar { height: 3px; background: var(--grad-1); transform-origin: left; transition: transform .4s; }
main { padding: 20px; max-width: 1480px; margin: 0 auto; }

/* ---------------------------------------------------------------- controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 36px; background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 999px; padding: 6px 16px; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--accent); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--grad-1); color: #111; border: 0; font-weight: 600; }
.btn.good { border-color: rgba(150, 224, 42, .6); color: var(--good); }
.btn.good.solid { background: var(--good); color: #111; font-weight: 700; border: 0; }
.btn.bad { border-color: rgba(254, 83, 67, .6); color: var(--bad); }
.btn.bad.solid { background: var(--bad); color: #111; font-weight: 700; border: 0; }
.btn.small { min-height: 30px; padding: 3px 12px; font-size: 13px; }
.btn.big { min-height: 54px; font-size: 17px; border-radius: 14px; }
.chip { display: inline-flex; align-items: center; min-height: 32px; background: var(--bg); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 13px; cursor: pointer; color: var(--muted); font-size: 13.5px; white-space: nowrap; }
.chip.on { border-color: var(--accent); color: var(--text); background: var(--accent-dim); }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], select, textarea {
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; outline: none; min-height: 38px;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-dim); }
textarea { width: 100%; min-height: 60px; resize: vertical; }
label.field { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.panel + .panel { margin-top: 14px; }
.section-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 24px 0 10px; }
.section-title:first-child { margin-top: 0; }

/* ---------------------------------------------------------------- pills */
.pill { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .03em;
  text-transform: uppercase; border-radius: 999px; padding: 2px 9px; border: 1px solid; white-space: nowrap; }
.pill.missing { color: var(--bad); border-color: rgba(254, 83, 67, .5); background: rgba(254, 83, 67, .12); }
.pill.weak { color: var(--warn); border-color: var(--accent-line); background: var(--accent-dim); }
.pill.found { color: var(--good); border-color: rgba(150, 224, 42, .5); background: rgba(150, 224, 42, .1); }
.pill.cleared { color: #111; background: var(--good); border-color: var(--good); }
.pill.auto { color: var(--info); border-color: rgba(71, 160, 209, .5); background: rgba(17, 17, 17, .75); }
.pill.possible { color: var(--warn); border-color: var(--accent-line); background: rgba(17, 17, 17, .75); }
.pill.confirmed { color: var(--good); border-color: rgba(150, 224, 42, .5); background: rgba(17, 17, 17, .75); }
.pill.rejected { color: var(--muted); border-color: var(--line); text-decoration: line-through; background: rgba(17, 17, 17, .75); }
.pill.tier1 { color: #111; background: var(--accent); border-color: var(--accent); }
.pill.tier2 { color: var(--text); border-color: var(--line); }
.pill.tier3 { color: var(--muted); border-color: var(--line); }
.pill.flag { color: var(--accent); border-color: var(--accent-line); }

/* ---------------------------------------------------------------- faces */
/* Square tiles that the face fills. Portrait and hit crops are stored
   face-centred, so object-fit: cover never cuts the face off. */
.tile { position: relative; width: 100%; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--panel-2); }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile.tall { aspect-ratio: 3 / 4; }
/* A group photo is shown whole: cropping it square could cut the person off. */
.tile.group img { object-fit: contain; background: #000; }
.tile.group .badge { background: rgba(0, 0, 0, .7); font-size: 11px; }
.tile .initials { position: absolute; inset: 0; display: grid; place-items: center; font-size: 34px; font-weight: 700; color: var(--muted); }
.tile .badge { position: absolute; top: 6px; left: 6px; }
.tile .corner { position: absolute; right: 6px; bottom: 6px; }
.tile .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 6px; font-size: 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .8)); }
.tile.zoom { cursor: zoom-in; }
.face { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; background: var(--panel-2); display: block; }

/* ---------------------------------------------------------------- dashboard */
.alertbar { margin: 12px 0 0; padding: 9px 14px; border-radius: 10px; font-weight: 600;
  color: var(--bad); background: rgba(254, 83, 67, .1); border: 1px solid rgba(254, 83, 67, .5); }
.dashbar { display: grid; gap: 8px; margin: 12px 0 4px; }
.taskbar { display: block; margin: 10px 0 0; padding: 10px 14px; border-radius: 10px; font-weight: 600;
  color: var(--accent); background: var(--accent-dim); border: 1px solid var(--accent-line); }
.taskphoto { width: 100%; max-width: 380px; border-radius: 10px; display: block; }
.facegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.facepick { display: grid; gap: 6px; align-content: start; }
.facepick .names { display: grid; gap: 6px; }
.facepick .picked { color: var(--good); font-weight: 700; }
.dashbar input[type=search] { max-width: 360px; }
.chip.stat { gap: 6px; }
.chip.stat b { font-size: 15px; }
.chip.stat.missing b { color: var(--bad); }
.chip.stat.weak b { color: var(--warn); }
.chip.stat.found b, .chip.stat.cleared b { color: var(--good); }
.totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 16px; }
.total { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; color: var(--text); }
.total b { display: block; font-size: 30px; line-height: 1.1; }
.total.missing b { color: var(--bad); }
.total.weak b { color: var(--warn); }
.total.found b { color: var(--good); }
.total.alert { border-color: rgba(254, 83, 67, .6); }
.vipgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.vipcard { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; color: var(--text); border-top: 4px solid var(--line); }
.vipcard:hover { border-color: var(--accent-line); }
.vipcard.missing { border-top-color: var(--bad); }
.vipcard.weak { border-top-color: var(--warn); }
.vipcard.found, .vipcard.cleared { border-top-color: var(--good); }
.vipcard.cleared .tile { opacity: .7; }
.vipcard .tile { border-radius: 0; }
.vipcard .info { padding: 8px 10px 10px; display: grid; gap: 4px; }
.vipcard .name { font-weight: 700; line-height: 1.2; font-size: 15.5px; }
.vipcard .meta { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vipcard .counts { font-size: 12px; color: var(--muted); }

/* ---------------------------------------------------------------- VIP page */
.viphead { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: start; }
.hits { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.hits.frames { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.hit { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.hit.rejected { opacity: .5; }
.hit .tile { border-radius: 0; }
.hit .body { padding: 9px 11px 11px; display: grid; gap: 5px; }
.hit .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.hit .actions .wide { grid-column: 1 / -1; }
.thumb { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.thumb .box { position: absolute; border: 2px solid var(--accent); border-radius: 4px; pointer-events: none; }
.thumb .badge { position: absolute; top: 6px; left: 6px; }
.thumb .corner { position: absolute; right: 6px; bottom: 6px; }

/* ---------------------------------------------------------------- review */
.review { display: grid; gap: 14px; }
.rcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: grid; gap: 10px; }
.rcard.focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.rcard.done { opacity: .35; }
.rcard .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rcard figure { margin: 0; display: grid; gap: 4px; }
.rcard figcaption { font-size: 12px; color: var(--muted); text-align: center; }
.rcard .strip { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; }
.rcard .strip img { width: 76px; height: 76px; flex: none; object-fit: cover; border-radius: 8px; background: #000; }
.rcard .decide { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rcard .more { display: flex; gap: 6px; flex-wrap: wrap; }
.rcard .thumb { border-radius: 10px; }
.score { font-weight: 800; font-size: 22px; line-height: 1; }
.score.hi { color: var(--good); } .score.mid { color: var(--warn); } .score.lo { color: var(--bad); }

/* ---------------------------------------------------------------- tables */
table.grid { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.grid th { text-align: left; color: var(--muted); font-weight: 500; padding: 6px 8px; border-bottom: 1px solid var(--line); }
table.grid td { padding: 6px 8px; border-bottom: 1px solid #222; vertical-align: middle; }
table.grid tr:hover td { background: #161616; }
.progress { height: 6px; background: var(--panel-2); border-radius: 99px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--grad-1); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.gimg { font-size: 12px; color: var(--muted); display: grid; gap: 3px; }
.gimg.off .tile { opacity: .3; }

/* ---------------------------------------------------------------- modal */
.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .8); z-index: 50;
  display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal .box { background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); padding: 18px; width: min(560px, 100%); max-height: 92vh; overflow: auto; display: grid; gap: 12px; }
.modal .box.wide { width: min(980px, 100%); }
.modal video { width: 100%; border-radius: 10px; background: #000; }
.modal .lightbox { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 10px; background: #000; }
.toast { position: fixed; bottom: 86px; left: 50%; transform: translateX(-50%); z-index: 60; max-width: 90vw;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px; box-shadow: var(--shadow); }
.toast.error { border-color: var(--bad); color: var(--bad); }
.login { max-width: 380px; margin: 12vh auto; display: grid; gap: 14px; }
.login .logos { display: flex; align-items: center; gap: 16px; }
.login .mark { width: 100px; height: 40px; }
.login .cfflogo { height: 52px; padding: 6px 10px; border-radius: 10px; }
.login .switch { justify-self: center; color: var(--muted); text-decoration: underline; }
.login input.code { font-size: 28px; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; }

.hist { display: flex; align-items: flex-end; gap: 2px; height: 90px; position: relative; }
.hist .col { flex: 1; display: flex; flex-direction: column-reverse; }
.hist .col i { display: block; }
.hist .c { background: var(--good); } .hist .r { background: var(--bad); } .hist .u { background: #555; }
.hist .line { position: absolute; top: 0; bottom: 0; width: 2px; }
input[type=range] { width: 100%; accent-color: var(--accent); }

/* ---------------------------------------------------------------- schedule */
.sched { display: grid; gap: 2px; }
.sitem { display: grid; grid-template-columns: 72px 1fr; gap: 10px; padding: 8px 10px; border-radius: 10px; }
.sitem:nth-child(odd) { background: #151515; }
.sitem.prod .stime { color: var(--accent); }
.sitem.vips { background: rgba(252, 167, 37, .07); border: 1px solid rgba(252, 167, 37, .25); }
.stime { font-weight: 700; font-size: 13.5px; white-space: nowrap; }
.sbody { display: grid; gap: 4px; min-width: 0; }
.sbody .pill { justify-self: start; }
.vipchips { display: flex; gap: 6px; flex-wrap: wrap; }
.vipchip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 999px;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text); font-size: 13px; }
.vipchip img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.nowline { margin: 6px 0; padding: 4px 10px; border-left: 3px solid var(--bad); color: var(--bad); font-weight: 700; font-size: 13px; }
.nowline .soon { color: var(--muted); font-weight: 600; }
.sitem.now { background: rgba(254, 83, 67, .10); border: 1px solid rgba(254, 83, 67, .45); }
.sitem.next { border: 1px dashed var(--line); }
.stime .tag { display: inline-block; margin-top: 3px; padding: 1px 6px; border-radius: 6px; font-size: 10.5px; letter-spacing: .06em;
  background: var(--panel-2); color: var(--muted); }
.sitem.now .stime .tag { background: var(--bad); color: #fff; }
.upcoming { display: grid; gap: 3px; background: var(--panel-2); border-radius: 10px; padding: 8px 12px; }

/* ---------------------------------------------------------------- shot list */
.need { display: grid; gap: 14px; max-width: 720px; margin: 0 auto; }
.needcard { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: grid; gap: 10px; border-left: 5px solid var(--line); }
.needcard.missing { border-left-color: var(--bad); }
.needcard.weak { border-left-color: var(--warn); }
.needcard .top { display: grid; grid-template-columns: 44% 1fr; gap: 12px; align-items: start; }
.needcard .name { font-size: 20px; font-weight: 800; line-height: 1.15; }
.needcard .shots { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.needcard .look { background: var(--accent-dim); border: 1px solid var(--accent-line); border-radius: 10px; padding: 8px 12px; font-size: 16px; }

/* ---------------------------------------------------------------- phones */
@media (max-width: 760px) {
  .topbar { padding: 8px 12px; gap: 8px; }
  .brand p, .who span { display: none; }
  .brand { gap: 8px; }
  .brand h1 { font-size: 15px; }
  .cfflogo { height: 26px; padding: 2px 5px; }
  /* Thumb-reach navigation along the bottom edge. */
  nav.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; border-radius: 0; border: 0;
    border-top: 1px solid var(--line); background: var(--panel); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); gap: 2px; }
  nav.tabs a { flex: 1; text-align: center; padding: 10px 4px; font-size: 13px; border-radius: 10px; }
  main { padding: 12px 12px 90px; }
  .vipgrid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .hits { grid-template-columns: 1fr 1fr; gap: 10px; }
  .hits.frames { grid-template-columns: 1fr; }
  .viphead { grid-template-columns: 1fr; }
  .viphead > .tile { max-width: 320px; margin: 0 auto; }
  .totals { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .total { padding: 8px 10px; font-size: 12.5px; }
  .total b { font-size: 24px; }
  .hit .body { font-size: 13px; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
}
@media (pointer: coarse) {
  .btn { min-height: var(--tap); }
  .btn.small { min-height: 38px; }
  .chip { min-height: 38px; }
}
@media (min-width: 900px) {
  /* Desktop review: comparison and decision on the left, the full frame on the right. */
  .rcard { grid-template-columns: minmax(0, 460px) 1fr; align-items: start;
    grid-template-areas: "head head" "pair frame" "decide frame" "more frame"; }
  .rcard .head { grid-area: head; }
  .rcard .pairblock { grid-area: pair; }
  .rcard .frameblock { grid-area: frame; }
  .rcard .decide { grid-area: decide; }
  .rcard .more { grid-area: more; }
}
nav.tabs .short { display: none; }
@media (max-width: 760px) {
  nav.tabs .long { display: none; }
  nav.tabs .short { display: inline; }
  nav.tabs a.desk:not(.active) { display: none; }   /* Premiere export is desk work */
}
