/* Coreshot: the approval page. Dark, calm, one stylesheet, loads nothing from elsewhere. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/static/inter.woff2) format("woff2");
}
:root {
  color-scheme: dark;
  --page: #02051A;
  --card: #0E1028;
  --inset: #070920;
  --raised: #1F2138;
  --raised-hover: #2A2D48;
  --primary: #5E6FF6;
  --primary-hover: #7182F8;
  --primary-active: #4F5FE6;
  --accent: #7D95FC;
  --ink: #F9FAFB;
  --muted: #A7A8BF;
  --dim: #8587A3;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --glow: #3728E8;
  --gradient: linear-gradient(100deg, #E8C2B6 0%, #6582FF 100%);
  --ok: #22C55E; --ok-hover: #34D06B; --ok-active: #16A34A; --ok-ink: #04140A;
  --ok-text: #4ADE80; --ok-bg: rgba(34, 197, 94, 0.12); --ok-line: rgba(74, 222, 128, 0.30);
  --bad: #F87171; --bad-text: #FCA5A5; --bad-bg: rgba(248, 113, 113, 0.10);
  --bad-line: rgba(248, 113, 113, 0.34);
  --warn-text: #FCD34D; --warn-bg: rgba(251, 191, 36, 0.09); --warn-line: rgba(251, 191, 36, 0.30);
  --radius: 16px; --radius-sm: 12px; --radius-xs: 10px;
  --highlight: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  --ease: 160ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; }
html { background: var(--page); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--ink);
  background:
    radial-gradient(60rem 28rem at 50% -8rem, rgba(55, 40, 232, 0.30), rgba(55, 40, 232, 0) 70%),
    radial-gradient(34rem 18rem at 78% -6rem, rgba(232, 194, 182, 0.07), rgba(232, 194, 182, 0) 70%),
    var(--page);
  background-repeat: no-repeat;
  font: 16px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
::selection { background: rgba(94, 111, 246, 0.45); color: var(--ink); }

/* ---------- header ---------- */
header.site {
  position: sticky; top: 0; z-index: 10;
  background: rgba(2, 5, 26, 0.72);
  -webkit-backdrop-filter: saturate(140%) blur(14px); backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-inner {
  max-width: 1088px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px 20px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; border-radius: 8px;
}
.brand:hover { text-decoration: none; }
.mark { display: block; flex: none; }
.wordmark {
  font-weight: 600; font-size: 1.2rem; letter-spacing: -0.02em; line-height: 1.1;
  background: var(--gradient); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.whoami {
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
  font-size: 0.9rem; color: var(--muted);
}
.whoami .sign-out { margin-left: 10px; }
.whoami strong { color: var(--ink); font-weight: 600; }
.whoami .error { flex-basis: 100%; text-align: right; font-size: 0.85rem; }

/* ---------- page ---------- */
main { max-width: 1088px; margin: 0 auto; padding: 32px 24px 64px; }
h1 {
  font-size: 1.9rem; font-weight: 600; letter-spacing: -0.025em; line-height: 1.2;
  margin: 4px 0 8px;
}
h2 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; margin: 0; line-height: 1.35; }
h3 { font-size: 0.95rem; font-weight: 600; margin: 0 0 6px; }
h2.section { margin: 40px 0 4px; font-size: 1.25rem; }
p { margin: 0 0 12px; }
a { color: var(--accent); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
strong { font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.back-link { margin: 0 0 8px; font-size: 0.9rem; }
.back-link a { color: var(--muted); }
.back-link a:hover { color: var(--ink); text-decoration: none; }
main > h1 + p.muted { margin-bottom: 4px; }
.summary { font-variant-numeric: tabular-nums; }
.summary [data-count] { color: var(--ink); font-weight: 600; }
[hidden] { display: none !important; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--highlight);
}

/* ---------- batches list ---------- */
.batches { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
.batches li {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--highlight); padding: 18px 20px;
  display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center;
  transition: border-color var(--ease), transform var(--ease), background-color var(--ease);
}
.batches li:hover {
  border-color: rgba(94, 111, 246, 0.65); transform: translateY(-2px); background-color: #111433;
}
.batches li > a {
  display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 260px;
  text-decoration: none; border-radius: 6px;
}
.batches li > a strong { color: var(--ink); font-size: 1.05rem; letter-spacing: -0.01em; }
.batches li > a:hover strong { text-decoration: underline; text-decoration-color: var(--accent); }
.batches li > a .muted { font-size: 0.875rem; overflow-wrap: anywhere; }
.counts { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.share-box { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-left: auto; }
.share-box .error { flex-basis: 100%; text-align: right; }

/* the team's list, one group per client; a batch page's client */
.client-group { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); }
.client-group > h2.client-name { color: var(--muted); font-weight: 500; font-size: 1rem; }
.client-group h3.section { margin: 20px 0 0; color: var(--dim); font-weight: 500; }
p.client-name { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* ---------- callouts ---------- */
.notes {
  margin-top: 28px; padding: 16px 20px; border-radius: var(--radius-sm);
  background: var(--warn-bg); border: 1px solid var(--warn-line);
}
.notes h2 { font-size: 1rem; color: var(--warn-text); margin-bottom: 6px; }
.notes ul { margin: 0; padding-left: 20px; }
.notes li { margin: 4px 0; overflow-wrap: anywhere; }
.notes a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--warn-line); }

/* ---------- pills ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 600; line-height: 1.4; text-transform: capitalize;
  white-space: nowrap; font-variant-numeric: tabular-nums;
  border: 1px solid rgba(255, 255, 255, 0.10); background: rgba(255, 255, 255, 0.05); color: #C9CADB;
}
.badge.pending { background: rgba(255, 255, 255, 0.05); color: #C9CADB; }
.badge.approved, .badge.shared { background: var(--ok-bg); color: var(--ok-text); border-color: var(--ok-line); }
.badge.rejected { background: var(--bad-bg); color: var(--bad-text); border-color: var(--bad-line); }
.badge.changes { background: var(--warn-bg); color: var(--warn-text); border-color: var(--warn-line); }
.badge.shared, .badge.unshared, .counts .badge { text-transform: none; }
.badge.unshared { background: rgba(255, 255, 255, 0.04); color: var(--muted); }
.badge.status { padding: 4px 12px; font-size: 0.8rem; flex: none; }
.badge.status::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor;
}

/* ---------- buttons ---------- */
button, a.google {
  font: inherit; font-size: 0.95rem; font-weight: 500; line-height: 1.25;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; min-height: 40px; border-radius: var(--radius-xs); cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--raised); color: var(--ink);
  transition: background-color var(--ease), border-color var(--ease), color var(--ease),
              transform var(--ease), box-shadow var(--ease);
}
button:hover { background: var(--raised-hover); border-color: rgba(255, 255, 255, 0.2); }
button:active { transform: translateY(1px); }
button:disabled, button:disabled:hover {
  opacity: 0.42; cursor: not-allowed; transform: none; box-shadow: none;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* primary indigo */
button.send-request, button.share, button.send-edit, button.sign-in, a.google {
  background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 6px 20px -10px rgba(94, 111, 246, 0.8);
}
button.send-request:hover, button.share:hover, button.send-edit:hover, button.sign-in:hover,
a.google:hover {
  background: var(--primary-hover); border-color: var(--primary-hover); text-decoration: none;
}
button.send-request:active, button.share:active, button.send-edit:active, button.sign-in:active,
a.google:active { background: var(--primary-active); border-color: var(--primary-active); }
.share-box[data-shared="1"] button.share {
  background: transparent; border-color: var(--line-strong); color: var(--muted); box-shadow: none;
}
.share-box[data-shared="1"] button.share:hover { color: var(--ink); background: var(--raised); }

/* approve: the confident green */
button.approve {
  background: var(--ok); border-color: var(--ok); color: var(--ok-ink); font-weight: 650;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 6px 20px -12px rgba(34, 197, 94, 0.9);
}
button.approve:hover { background: var(--ok-hover); border-color: var(--ok-hover); }
button.approve:active { background: var(--ok-active); border-color: var(--ok-active); }
button.approve:disabled { background: var(--ok); }

/* reject: outlined red */
button.reject { background: transparent; border-color: var(--bad-line); color: var(--bad-text); font-weight: 600; }
button.reject:hover { background: var(--bad-bg); border-color: var(--bad); color: #FECACA; }
button.reject:active { background: rgba(248, 113, 113, 0.18); }

/* quiet outlined */
button.sign-out, button.sign-in.secondary {
  background: transparent; border-color: var(--line-strong); color: var(--ink); box-shadow: none;
  font-weight: 500;
}
button.sign-out { min-height: 34px; padding: 6px 14px; font-size: 0.875rem; }
button.sign-out:hover, button.sign-in.secondary:hover {
  background: var(--raised); border-color: rgba(255, 255, 255, 0.22);
}
button.save-copy, button.save-slot { min-height: 36px; padding: 7px 14px; font-size: 0.875rem; }

/* ---------- fields ---------- */
textarea, input[type="text"], input[type="password"], input[type="datetime-local"] {
  font: inherit; font-size: 0.95rem; color: var(--ink); background: var(--inset);
  border: 1px solid var(--line-strong); border-radius: var(--radius-xs); padding: 10px 12px;
  min-height: 42px; transition: border-color var(--ease), box-shadow var(--ease);
}
textarea { width: 100%; resize: vertical; line-height: 1.5; }
textarea::placeholder, input::placeholder { color: var(--dim); opacity: 1; }
textarea:hover, input[type="text"]:hover, input[type="password"]:hover,
input[type="datetime-local"]:hover { border-color: rgba(255, 255, 255, 0.2); }
textarea:focus, input[type="text"]:focus, input[type="password"]:focus,
input[type="datetime-local"]:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(94, 111, 246, 0.25);
}
textarea:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
textarea[readonly], input[readonly] { color: var(--muted); background: #0A0C24; }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); margin: 0; flex: none; }

/* ---------- clip and post cards ---------- */
.clip, .postcard {
  display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 28px; align-items: start;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--highlight); padding: 24px; margin: 24px 0;
}
.postcard { grid-template-columns: minmax(0, 360px) minmax(0, 1fr); }
.media video {
  width: 100%; aspect-ratio: 9 / 16; background: #000; border-radius: var(--radius-sm); display: block;
  border: 1px solid var(--line);
}
.clip .media, .postcard .images { position: sticky; top: 88px; }
.postcard .images { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
.postcard figure { margin: 0; }
.postcard img {
  width: 100%; height: auto; display: block; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--inset);
}
.body { min-width: 0; }
.body > * + * { margin-top: 16px; }
.body > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.body > header h2 { font-size: 1.2rem; overflow-wrap: anywhere; }
.body > header h2 .muted { font-weight: 500; font-variant-numeric: tabular-nums; margin-right: 2px; }
.postcard .accent { color: var(--accent); font-weight: 500; }
.reason { margin: 0; color: #E4E5EE; }
.meta { margin: 0; color: var(--muted); font-size: 0.9rem; }
.meta strong { color: var(--ink); }
.body p { margin-bottom: 0; }

.flags {
  background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: var(--radius-sm);
  padding: 12px 16px;
}
.flags h3 { color: var(--warn-text); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
.flags ul { margin: 0; padding-left: 20px; }
.flags li { font-weight: 500; color: #FDF3D0; margin: 2px 0; }
.ack {
  display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 0.95rem; cursor: pointer;
}

.slot { display: grid; gap: 8px; }
.slot .label, .draft label, .edit label, .request label {
  display: block; font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--accent); margin: 0;
}
.slot-shown { color: var(--ink); font-weight: 500; }
.slot .row { gap: 10px; }
.draft { display: grid; gap: 8px; }
.draft .row { justify-content: space-between; }
.count { font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.count.over { color: var(--bad-text); font-weight: 700; }

.caption {
  background: var(--inset); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.caption h3 {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent);
  margin-bottom: 6px;
}
.caption-text {
  margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: #E9EAF2; font-size: 0.95rem;
  line-height: 1.55;
}

.drawn {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px;
  background: rgba(255, 255, 255, 0.015);
}
.drawn summary { cursor: pointer; color: var(--muted); font-size: 0.9rem; border-radius: 6px; }
.drawn summary:hover { color: var(--ink); }
.drawn dl {
  display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px;
  margin: 10px 0 2px; font-size: 0.9rem;
}
.drawn dt { font-weight: 600; color: var(--muted); }
.drawn dd { margin: 0; overflow-wrap: anywhere; }

.actions {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  padding-top: 16px; border-top: 1px solid var(--line);
}
.actions .reason-input { flex: 1 1 200px; min-width: 0; }
.decided, .unsaved { color: var(--muted); }
.decided:empty { display: none; }

.posts { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.posts .post { color: var(--muted); font-size: 0.9rem; padding-left: 16px; position: relative; }
.posts .post::before {
  content: ""; position: absolute; left: 2px; top: 0.62em; width: 6px; height: 6px;
  border-radius: 50%; background: var(--ok-text);
}
.posts .post.failed, .posts .post.unknown, .posts .post.missed { color: var(--bad-text); font-weight: 600; }
.posts .post.failed::before, .posts .post.unknown::before, .posts .post.missed::before { background: var(--bad); }
.posts .post.retrying::before, .posts .post.sending::before, .posts .post.rehearsal::before { background: var(--warn-text); }
.handled { color: var(--warn-text); }

.problem, .error { color: var(--bad-text); font-weight: 600; margin: 0; overflow-wrap: anywhere; }
.problem {
  background: var(--bad-bg); border: 1px solid var(--bad-line); border-radius: var(--radius-sm);
  padding: 10px 14px;
}
.error a { margin-left: 4px; color: var(--ink); text-decoration: underline; }

.requested {
  background: var(--warn-bg); border: 1px solid var(--warn-line); border-left: 3px solid var(--warn-text);
  border-radius: var(--radius-sm); padding: 12px 16px;
}
.requested h3 { color: var(--warn-text); margin-bottom: 4px; }
.requested p { margin: 4px 0 0; }
.request-note { white-space: pre-wrap; overflow-wrap: anywhere; font-weight: 500; color: #FDF3D0; }
.request-failed {
  color: var(--bad-text); overflow-wrap: anywhere; background: var(--bad-bg);
  border: 1px solid var(--bad-line); border-radius: var(--radius-xs); padding: 8px 12px;
}
.request, .edit { border-top: 1px solid var(--line); padding-top: 16px; display: grid; gap: 8px; }
.request .row, .edit .row { margin-top: 2px; }
.request p, .edit p { margin: 0; }

/* ---------- sign-in ---------- */
.signin { max-width: 420px; margin: 32px auto 0; }
.lockup { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 24px; }
.lockup .wordmark { font-size: 2.1rem; }
.signin-card { padding: 32px 28px 28px; }
.signin-card h1 { font-size: 1.5rem; margin: 0 0 4px; text-align: center; }
.signin-card > .muted { text-align: center; margin-bottom: 24px; }
.google-sign-in { margin: 0; }
a.google { display: flex; width: 100%; min-height: 46px; font-size: 1rem; }
.divider {
  display: flex; align-items: center; gap: 12px; margin: 20px 0 8px;
  color: var(--dim); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }
form.login { display: flex; flex-direction: column; gap: 6px; margin: 0; }
form.login label { font-size: 0.875rem; font-weight: 500; color: var(--muted); margin-top: 10px; }
form.login input { width: 100%; min-height: 44px; }
form.login button.sign-in { margin-top: 18px; width: 100%; min-height: 46px; font-size: 1rem; }
form.login .error {
  margin-top: 12px; background: var(--bad-bg); border: 1px solid var(--bad-line);
  border-radius: var(--radius-xs); padding: 10px 12px; font-weight: 500;
}

/* ---------- error pages ---------- */
.error-page { max-width: 520px; margin: 48px auto 0; padding: 40px 32px; text-align: center; }
.big-number {
  display: inline-block; padding: 0 4px;
  font-size: 5rem; font-weight: 700; letter-spacing: -0.05em; line-height: 1; margin: 0 0 16px;
  font-variant-numeric: tabular-nums;
  background: var(--gradient); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.error-message { font-size: 1.1rem; color: var(--ink); margin-bottom: 20px; }
.error-page .back { font-weight: 500; }

/* ---------- phone ---------- */
@media (max-width: 720px) {
  .site-inner { padding: 12px 16px; }
  .whoami { font-size: 0.85rem; }
  main { padding: 24px 16px 48px; }
  h1 { font-size: 1.6rem; }
  .batches li { padding: 16px; }
  .share-box { margin-left: 0; width: 100%; justify-content: space-between; }
  .share-box .error { text-align: left; }
  .clip, .postcard { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 16px; margin: 16px 0; }
  .clip .media, .postcard .images { position: static; }
  .media video { max-height: 70vh; width: auto; max-width: 100%; margin: 0 auto; }
  .actions { flex-direction: column; align-items: stretch; }
  .actions .reason-input { flex: none; width: 100%; }
  .actions button, .request .row button, .edit .row button { width: 100%; }
  .signin { margin-top: 8px; }
  .signin-card { padding: 24px 20px; }
  .lockup .wordmark { font-size: 1.8rem; }
  .error-page { margin-top: 24px; padding: 32px 20px; }
  .big-number { font-size: 4rem; }
}
@media (max-width: 420px) {
  .whoami { width: 100%; }
  .whoami .sign-out { margin-left: auto; }
  .whoami .error { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important; animation: none !important; scroll-behavior: auto !important;
  }
  .batches li:hover, button:active { transform: none; }
}
