/* Chronicle Crew: brand tokens. Chronicle Blue for highlights, Venue Violet only for Connects. */
:root {
  --bg: #0A0A0A; --panel: #161616; --panel2: #1D1D1D; --line: #2B2B2B; --input: #0A0A0A; --input-line: #3A3A3A;
  --text: #FFFFFF; --text2: #CCCCCC; --muted: #999999;
  --blue: #009DDC; --blue-ink: #0A0A0A; --blue-text: #009DDC; --violet: #7F4DD9; --violet-text: #B79BF0;
  --amber: #EFA400; --green: #3CCB8E; --red: #FF8A8A;
  --amber-bg: #2A2208; --green-bg: #0F3326; --red-bg: #3A1A1A; --blue-bg: #0B2E40;
  --radius: 18px; --radius-s: 12px;
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: Montserrat, Helvetica, Arial, sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #FFFFFF; --panel: #F5F5F5; --panel2: #EDEDED; --line: #E2E2E2; --input: #FFFFFF; --input-line: #CCCCCC;
  --text: #0A0A0A; --text2: #333333; --muted: #555555; --blue-text: #0077A8; --violet-text: #6A3CC4;
  --amber-bg: #FFF4DC; --green-bg: #E5F4E4; --red-bg: #FBEBEB; --blue-bg: #E7F1FB; --amber: #9A6A00; --green: #1D7A55; --red: #B3261E;
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root[data-theme="system"] {
    --bg: #FFFFFF; --panel: #F5F5F5; --panel2: #EDEDED; --line: #E2E2E2; --input: #FFFFFF; --input-line: #CCCCCC;
    --text: #0A0A0A; --text2: #333333; --muted: #555555; --blue-text: #0077A8; --violet-text: #6A3CC4;
    --amber-bg: #FFF4DC; --green-bg: #E5F4E4; --red-bg: #FBEBEB; --blue-bg: #E7F1FB; --amber: #9A6A00; --green: #1D7A55; --red: #B3261E;
    color-scheme: light;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 15px; }
a { color: var(--blue-text); }
button, input, select, textarea { font: inherit; }
img { max-width: 100%; }

/* layout */
.shell { display: flex; min-height: 100vh; }
.nav { width: 230px; flex: none; border-right: 1px solid var(--line); padding: 26px 18px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.nav .logo { width: 150px; margin-bottom: 6px; }
.nav .app { font-size: 11px; font-weight: 600; letter-spacing: .3em; color: var(--blue-text); margin-bottom: 24px; }
.nav a { color: var(--muted); text-decoration: none; padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.nav a.on { color: var(--text); background: var(--panel); font-weight: 600; }
.nav .foot { margin-top: auto; font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.main { flex: 1; min-width: 0; padding: 34px 44px 80px; display: flex; flex-direction: column; gap: 22px; }
.topbar { display: none; }
@media (max-width: 820px) {
  .shell { flex-direction: column; }
  .nav { display: none; }
  .topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 5; }
  .topbar img { height: 22px; }
  .main { padding: 20px 16px 90px; }
  .tabbar { position: fixed; bottom: 0; left: 0; right: 0; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--bg); border-top: 1px solid var(--line); padding: 8px 4px calc(12px + env(safe-area-inset-bottom)); z-index: 6; }
  .tabbar a { text-align: center; text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .08em; padding: 8px 0; }
  .tabbar a.on { color: var(--blue-text); }
}
@media (min-width: 821px) { .tabbar { display: none; } }

/* type */
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .3em; color: var(--blue-text); text-transform: uppercase; }
.eyebrow.violet { color: var(--violet-text); }
h1.title { margin: 8px 0 0; font-family: var(--display); font-weight: 200; font-size: clamp(36px, 5vw, 54px); line-height: .9; letter-spacing: .02em; text-transform: uppercase; }
h2 { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1; min-width: 0; }

/* surfaces */
.panel { background: var(--panel); border-radius: var(--radius); padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.card { background: var(--panel); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--text); border: 1px solid transparent; }
a.card:hover { border-color: var(--blue); }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1000px) { .split { grid-template-columns: 1fr; } }

/* controls */
.btn { border: 0; border-radius: 999px; padding: 11px 18px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; background: var(--blue); color: var(--blue-ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; text-align: center; gap: 6px; white-space: nowrap; }
.btn:not(.ghost):not(.danger):not(.google) { padding-left: calc(18px + .14em); } /* balances the trailing letter-spacing so caps text sits dead center */
.btn.small:not(.ghost):not(.danger) { padding-left: calc(12px + .14em); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--input-line); letter-spacing: .04em; text-transform: none; font-weight: 600; }
.btn.small { padding: 7px 12px; font-size: 11px; }
.btn.danger { background: transparent; color: var(--red); border: 1px solid var(--red-bg); text-transform: none; letter-spacing: 0; font-weight: 600; }
.btn.violet { background: var(--violet); color: #fff; }
.btn:disabled { opacity: .5; cursor: default; }
.pills { display: inline-flex; background: var(--panel); border-radius: 999px; padding: 4px; gap: 4px; flex-wrap: wrap; }
.pills button { border: 0; background: transparent; color: var(--text2); border-radius: 999px; padding: 7px 14px; font-size: 12px; font-weight: 600; cursor: pointer; }
.pills button.on { background: var(--text); color: var(--bg); }
label.f { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; min-width: 0; }
input.i, select.i, textarea.i { width: 100%; padding: 10px 12px; border: 1px solid var(--input-line); background: var(--input); color: var(--text); border-radius: 10px; font-size: 14px; font-weight: 400; }
textarea.i { min-height: 70px; resize: vertical; }
input.i:focus, select.i:focus, textarea.i:focus { outline: 2px solid var(--blue); outline-offset: -1px; }
input.t { width: 92px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.check input { accent-color: var(--blue); width: 16px; height: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

/* tables */
.tablewrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 10px; letter-spacing: .2em; color: var(--muted); font-weight: 600; padding: 8px 6px; text-transform: uppercase; white-space: nowrap; }
table.t td { padding: 9px 6px; border-top: 1px solid var(--line); vertical-align: middle; }
table.t tr.hl td { background: var(--panel2); }

/* status pills */
.pill { display: inline-block; border-radius: 999px; padding: 4px 10px; font-size: 10px; font-weight: 700; letter-spacing: .06em; white-space: nowrap; text-transform: uppercase; background: var(--line); color: var(--text2); }
.pill.blue { background: var(--blue-bg); color: var(--blue-text); }
.pill.amber { background: var(--amber-bg); color: var(--amber); }
.pill.red { background: var(--red-bg); color: var(--red); }
.pill.green { background: var(--green-bg); color: var(--green); }
.pill.violet { background: #241A38; color: var(--violet-text); }
.notice { border-radius: 14px; padding: 12px 16px; font-size: 13px; }
.notice.amber { background: var(--amber-bg); color: var(--text); border: 1px solid var(--amber); }
.notice.green { background: var(--green-bg); }
.notice.red { background: var(--red-bg); }
.vicon { width: 18px; height: 18px; vertical-align: -3px; margin-right: 6px; }

/* modal + toast */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; z-index: 20; padding: 16px; }
.modal { background: var(--bg); border: 1px solid var(--line); border-radius: 22px; padding: 22px 24px; width: min(560px, 100%); max-height: 90vh; overflow: auto; display: flex; flex-direction: column; gap: 14px; }
.toast { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: 13px; font-weight: 600; z-index: 30; }

/* gantt */
.gantt { position: relative; }
.gantt .g-row { display: grid; grid-template-columns: 200px 1fr; align-items: center; min-height: 34px; border-top: 1px solid var(--line); }
.gantt .bar { position: absolute; top: 9px; height: 16px; border-radius: 999px; background: var(--blue); }
.gantt .bar.sug { background: repeating-linear-gradient(135deg, var(--blue) 0 6px, rgba(0,157,220,.35) 6px 12px); }
.gantt .bar.violet { background: var(--violet); }
.gantt .bar.grey { background: #999; }
.gantt .track { position: relative; height: 34px; }
.gantt .wk { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--line); font-size: 10px; color: var(--muted); padding-left: 4px; }

/* phone-first crew views */
.phone { max-width: 520px; display: flex; flex-direction: column; gap: 12px; }
.bigtime { font-family: var(--display); font-weight: 300; font-size: 40px; line-height: 1.05; }
.callbox { background: var(--blue); color: var(--blue-ink); border-radius: 16px; padding: 14px 16px; }
.empty { color: var(--muted); font-size: 14px; padding: 18px 0; }

/* status select that looks like a pill */
.i.pillselect { width:auto; padding:6px 30px 6px 12px; border-radius:999px; font-size:13px; font-weight:600; }
.i.pillselect.blue { color: var(--blue); }
.i.pillselect.amber { color: var(--amber); }
.i.pillselect.red { color: var(--red); }
.i.pillselect.green { color: var(--green); }
/* crew home: a single phone-width column */
.phonecol { display:flex; flex-direction:column; gap:14px; max-width:520px; }

/* Logo swaps with the theme: white logo on dark, full-color logo on light. Never recolor the logo with filters. */
.on-light { display: none; }
:root[data-theme="light"] .on-dark { display: none; }
:root[data-theme="light"] .on-light { display: inline-block; }
@media (prefers-color-scheme: light) {
  :root[data-theme="system"] .on-dark { display: none; }
  :root[data-theme="system"] .on-light { display: inline-block; }
}

/* Appearance switch (Auto / Light / Dark) */
.themeswitch { display: flex; background: var(--input); border-radius: 999px; padding: 3px; gap: 2px; }
.themeswitch button { flex: 1; border: 0; background: transparent; color: var(--muted); border-radius: 999px; padding: 6px 8px; font: 600 11px var(--body); cursor: pointer; }
.themeswitch button.on { background: var(--text); color: var(--bg); }
.themeswitch button:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.nav .themeswitch { margin-top: auto; }
.nav .themeswitch + .foot { margin-top: 12px; }
.panel:has(.crewtable) { overflow-x: auto; }
.crewtable { min-width: 620px; }
.crewtable td { vertical-align: top; }

/* Chronicle Crew identity: ring mark above a tracked tag, set like the verticals on chroniclecinema.com */
.crewmark { color: var(--blue); display: block; flex: none; overflow: visible; }
.crewlock { display: flex; flex-direction: row; align-items: center; gap: 12px; }
.crewwords { display: flex; flex-direction: column; font-size: 14px; font-weight: 600; letter-spacing: .28em; line-height: 1.15; text-transform: uppercase; color: var(--text); }
.topbrand .crewwords { font-size: 11px; letter-spacing: .24em; }
.crewtag { font-size: 11px; font-weight: 600; letter-spacing: .28em; text-transform: uppercase; color: var(--blue-text); line-height: 1.2; }
.nav .brand { padding: 0 2px; margin-bottom: 28px; background: none !important; }
.topbrand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.topbrand .crewtag { font-size: 10px; letter-spacing: .22em; }
.builtby { margin-top: auto; padding-top: 28px; display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; font-size: 9px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.builtby img { height: 30px; width: auto; }
.panel .builtby { padding-top: 14px; border-top: 1px solid var(--line); }
/* the mark's one move: ring turns, check draws in */
.crewmark.ic * { transition: transform .45s cubic-bezier(.5,0,.2,1), stroke-dashoffset .5s cubic-bezier(.5,0,.2,1); }
.crewmark.ic .ring { transform-origin: 32px 32px; }
.crewmark.ic .chk { stroke-dasharray: 20; stroke-dashoffset: 20; } /* hidden until hover or press */
a:hover .crewmark.ic .ring, .crewmark.ic:hover .ring, a:active .crewmark.ic .ring, a:focus-visible .crewmark.ic .ring { transform: rotate(45deg); }
a:hover .crewmark.ic .chk, .crewmark.ic:hover .chk, a:active .crewmark.ic .chk, .crewmark.ic:active .chk, a:focus-visible .crewmark.ic .chk { stroke-dashoffset: 0; }
@media (prefers-reduced-motion: reduce) { .crewmark.ic * { transition: none; } }

/* shot lists */
.split.wide-left { grid-template-columns: minmax(0, 2.2fr) minmax(260px, 1fr); }
.progress { height: 6px; border-radius: 999px; background: var(--panel2); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--blue); border-radius: 999px; transition: width .3s; }
.shotgroup { display: flex; flex-direction: column; gap: 4px; }
.shothead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 2px 6px; border-bottom: 1px solid var(--line); text-transform: uppercase; font-size: 12px; letter-spacing: .04em; }
.shothead .grow { flex: 1; min-width: 160px; }
.i.small-i { width: auto; padding: 6px 10px; font-size: 12px; }
.shotrows { display: flex; flex-direction: column; }
.shot { display: grid; grid-template-columns: 34px 58px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 2px; border-bottom: 1px solid var(--line); font-size: 13px; line-height: 1.5; }
.shot.got .sbody > div:last-of-type, .shot.got .sbody > span:last-child { color: var(--muted); }
.shot.skip { opacity: .5; }
.shot .sno { font-weight: 700; font-variant-numeric: tabular-nums; padding-top: 4px; }
.shot .smeta { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); display: block; }
.shot .sbody { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.shot .sact { display: flex; gap: 4px; }
.tick { width: 30px; height: 30px; border-radius: 999px; border: 2px solid var(--input-line); background: transparent; color: var(--blue-ink); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.tick.on { background: var(--blue); border-color: var(--blue); }
button.shot.crew { width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; grid-template-columns: 34px 54px minmax(0, 1fr); }
.crewshots { display: flex; flex-direction: column; gap: 10px; }
.i.mono { font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
@media (max-width: 820px) { .split.wide-left { grid-template-columns: 1fr; } .shot { grid-template-columns: 34px 48px minmax(0, 1fr); } .shot .sact { grid-column: 3; } }

/* client files */
.clientlogo { display: inline-flex; background: var(--panel); border-radius: 14px; padding: 8px; }
.clientfiles { display: flex; flex-direction: column; gap: 10px; }
.filelist { display: flex; flex-direction: column; }
.fileitem { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line); }
.fileitem .grow { flex: 1 1 180px; min-width: 0; }
.fileicon { width: 40px; height: 40px; flex: none; border-radius: 10px; background: var(--blue-bg); color: var(--blue-text); font-size: 10px; font-weight: 700; letter-spacing: .08em; display: inline-flex; align-items: center; justify-content: center; }
.i.plain { border-color: transparent; background: transparent; padding: 4px 6px; font-weight: 600; }
.i.plain:hover, .i.plain:focus { border-color: var(--input-line); background: var(--input); }
.filelinks { display: inline-flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.split > .panel { min-width: 0; overflow-x: auto; }

/* bookings + travel needs */
.stack { display: flex; flex-direction: column; gap: 20px; }
.tablewrap { overflow-x: auto; }
.bookingtable { min-width: 760px; }
.needtable { min-width: 860px; }
.needtable tr.dim td:not(:nth-child(2)) { opacity: .55; }
.ticon { display: inline-flex; line-height: 0; }
.needs, .kindpick { display: flex; gap: 6px; flex-wrap: wrap; }
.needbtn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 999px; padding: 4px 10px 4px 4px; font: 600 11px var(--body); letter-spacing: .04em; cursor: pointer; }
.needbtn .ticon { opacity: .35; filter: grayscale(1); transition: opacity .15s, filter .15s; }
.needbtn.on { border-color: var(--blue); color: var(--text); background: var(--blue-bg); }
.needbtn.on .ticon { opacity: 1; filter: none; }
.needbtn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
details.brief { border-top: 1px solid var(--line); padding-top: 10px; }
details.brief summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text2); }
details.brief[open] { display: flex; flex-direction: column; gap: 8px; }

/* call sheet email preview */
.modal:has(.csm) { width: min(1100px, 96vw); }
.csm { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 14px; min-height: 0; }
.csm-list { display: flex; flex-direction: column; max-height: 60vh; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.csm-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.csm-row.on { background: var(--blue-bg); }
.csm-row .grow { display: flex; flex-direction: column; }
.csm-preview { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.csm-preview iframe { width: 100%; height: 60vh; border: 1px solid var(--line); border-radius: 12px; background: #f2f2f2; }
@media (max-width: 820px) { .csm { grid-template-columns: 1fr; } .csm-preview iframe { height: 50vh; } }

/* Sign in with Google: white pill per Google's button guidelines, readable in both themes */
.btn.google { background: #fff; color: #1f1f1f; border: 1px solid #dadce0; letter-spacing: .02em; text-transform: none; font-size: 14px; font-weight: 600; padding: 12px 18px; gap: 10px; }
.btn.google:hover { background: #f5f7fa; }
.linkish { background: none; border: 0; padding: 0; color: var(--blue); cursor: pointer; text-align: left; font: inherit; }
.linkish:hover { text-decoration: underline; }

/* View-only areas for Chronicle team members on jobs they don't produce */
.viewonly { display: contents; }
.viewonly :is(button, select, input, textarea):disabled { opacity: .55; cursor: not-allowed; }
.viewonly-note { margin-bottom: 4px; }
/* Asset tracker */
.trk td { vertical-align: top; }
.trk tr.sec td { background: var(--panel2); color: var(--blue-text, var(--blue)); font-size: 11px; letter-spacing: .22em; font-weight: 600; text-transform: uppercase; padding: 8px 10px; }
.trk td.code { color: var(--muted); font-weight: 600; white-space: nowrap; width: 1%; }
.trk .links a { display: inline-block; margin-right: 8px; white-space: nowrap; }
.trk .fb { font-size: 12px; margin-top: 4px; }
.statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.stat { border-radius: 14px; padding: 12px 14px; background: var(--panel2); }
.stat b { display: block; font-size: 22px; }
.stat.hot b { color: var(--amber); }
.stat.late b { color: var(--red); }
tr.late td:first-child { box-shadow: inset 3px 0 0 var(--red); }
