/* Live Twice — Fan Page Portal.
   Design: direction C ("media-led"), picked by James 2026-08-06 from the round-two
   set. Clean professional product UI in the Linear/Stripe register — one grotesque,
   one spacing scale, one radius scale, one accent used only functionally, structure
   through surfaces and spacing rather than heavy rules.

   The clips lead. The artist's job on this screen is to judge video, so the media is
   the largest thing on the page and the interface recedes around it. That is the
   whole reason this direction was chosen over the two more conventional ones.

   Per-client personalisation replaces --accent inside that client's view; there is
   never a second accent on a page. */

@import url('/assets/fonts.css');

:root {
  --bg: #ffffff;
  --surface: #fafafa;
  --surface-2: #f4f4f5;
  --border: #e7e7e9;
  --border-soft: #f0f0f2;
  --text: #18181b;
  --text-2: #5f5f68;
  --text-3: #9b9ba3;

  --accent: #1b4dff;                       /* overridden per client at runtime */
  --accent-hover: #173fd6;
  --accent-tint: rgba(27, 77, 255, 0.07);
  --accent-line: rgba(27, 77, 255, 0.18);

  --ok: #15803d;   --ok-bg: #f0fdf4;   --ok-bd: #d3f0dd;
  --warn: #b45309; --warn-bg: #fffbeb; --warn-bd: #f7e6bb;
  --chg: #be123c;  --chg-bg: #fff1f2;  --chg-bd: #fadde2;

  --r-card: 10px;
  --r-ctl: 7px;
  --shadow: 0 1px 2px rgba(24, 24, 27, 0.05);
  --shadow-lift: 0 4px 14px rgba(24, 24, 27, 0.07);

  --wrap: 1128px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
.num { font-variant-numeric: tabular-nums; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- top bar ---------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar-in {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--text); color: #fff;
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.02em;
  display: flex; align-items: center; justify-content: center; flex: none;
  overflow: hidden;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-name { font-size: 14px; font-weight: 600; line-height: 1.2; white-space: nowrap; }
.brand-sub { font-size: 11.5px; color: var(--text-3); line-height: 1.3; white-space: nowrap; }

.topnav { display: flex; gap: 4px; margin-left: 4px; overflow-x: auto; scrollbar-width: none; }
.topnav::-webkit-scrollbar { display: none; }
.tab {
  appearance: none; background: none; border: 0;
  font-size: 13px; font-weight: 500; color: var(--text-2);
  padding: 6px 10px; border-radius: var(--r-ctl);
  white-space: nowrap;
  transition: color 0.12s, background 0.12s;
}
.tab:hover { color: var(--text); background: var(--surface); }
.tab[aria-selected='true'] { color: var(--accent); background: var(--accent-tint); }
.tab .count {
  margin-left: 6px; font-size: 11px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.account { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.managed { font-size: 11.5px; color: var(--text-3); display: flex; align-items: center; gap: 7px; }
.managed img { height: 11px; width: auto; opacity: 0.75; }
.who { text-align: right; line-height: 1.25; }
.who b { display: block; font-size: 12.5px; font-weight: 600; }
.who span { font-size: 11px; color: var(--text-3); }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  background: var(--accent-tint); color: var(--accent);
  font-size: 11px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--accent-line);
}

/* ---------- layout ------------------------------------------------------ */

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px 72px; }
.panel { padding-top: 40px; }
.panel[hidden] { display: none; }

.sec-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 6px; flex-wrap: wrap; }
.sec-head h2 { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.sec-head .aside { margin-left: auto; font-size: 12.5px; color: var(--text-3); }
.lede { font-size: 13.5px; color: var(--text-2); margin-bottom: 24px; max-width: 68ch; }

.empty {
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--surface);
  padding: 44px 28px;
  text-align: center;
  color: var(--text-2);
  font-size: 13.5px;
}
.empty strong { display: block; font-size: 16px; color: var(--text); margin-bottom: 6px; font-weight: 600; }

/* ---------- approvals: the media leads ---------------------------------- */

.draft-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
  gap: 20px;
}
.draft {
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--bg);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.14s, border-color 0.14s;
}
.draft:hover { box-shadow: var(--shadow-lift); border-color: #dededf; }

/* Full card width, 9:16 — this is the point of the direction. Capped in height
   because at a 300px column an uncapped 9:16 is ~530px, which made every card
   about 800px tall and turned three drafts into a page of scrolling. The cap
   crops rather than distorts (object-fit: cover). */
.draft-media {
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 400px;
  background: #101014;
  object-fit: cover;
  border-bottom: 1px solid var(--border-soft);
}
.draft-media.placeholder {
  display: flex; align-items: center; justify-content: center;
  color: #56565e; font-size: 11.5px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--surface-2);
}
.draft-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.draft-title { font-size: 15px; font-weight: 600; letter-spacing: -0.005em; line-height: 1.3; }
.draft-meta { font-size: 12px; color: var(--text-3); }
.draft-caption {
  font-size: 13px; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--r-ctl); padding: 9px 11px; white-space: pre-wrap;
}
.draft-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 4px; }
.draft-actions .btn { flex: 1; }

/* ---------- badges ------------------------------------------------------ */

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 600;
  padding: 3px 9px; border-radius: 999px;
  border: 1px solid transparent; white-space: nowrap;
}
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge-pending  { color: var(--accent); background: var(--accent-tint); border-color: var(--accent-line); }
.badge-approved { color: var(--ok);   background: var(--ok-bg);   border-color: var(--ok-bd); }
.badge-changes  { color: var(--chg);  background: var(--chg-bg);  border-color: var(--chg-bd); }
.badge-posted   { color: var(--text-2); background: var(--surface-2); border-color: var(--border); }

/* ---------- controls ---------------------------------------------------- */

.btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 13px; font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--r-ctl);
  transition: background 0.12s, border-color 0.12s, opacity 0.12s;
  white-space: nowrap;
  text-align: center;
}
.btn:hover { background: var(--surface); border-color: #dcdce0; }
.btn-primary {
  background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600;
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; }

.linkish {
  background: none; border: 0; padding: 0;
  font: inherit; font-size: 13px; font-weight: 500;
  color: var(--accent); cursor: pointer;
}
.linkish:hover { text-decoration: underline; text-underline-offset: 3px; }

input[type='text'], input[type='email'], input[type='password'], input[type='search'],
input[type='date'], input[type='time'], input[type='url'], input[type='color'],
select, textarea {
  font: inherit; font-size: 13.5px;
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: var(--r-ctl);
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.12s, box-shadow 0.12s;
}
input:hover, select:hover, textarea:hover { border-color: #dcdce0; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
textarea { min-height: 76px; resize: vertical; }
label {
  display: block; font-size: 12px; font-weight: 500;
  color: var(--text-2); margin-bottom: 6px;
}
.field { margin-bottom: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 620px) { .field-row { grid-template-columns: 1fr; } }

/* ---------- notes ------------------------------------------------------- */

.notes { display: flex; flex-direction: column; gap: 8px; }
.note {
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--r-ctl); padding: 9px 11px;
}
.note-who { font-size: 11.5px; font-weight: 600; color: var(--text-3); margin-bottom: 2px; }
.note-who.is-client { color: var(--accent); }
.note-body { font-size: 13px; color: var(--text-2); white-space: pre-wrap; }
.note-add { display: flex; gap: 8px; align-items: flex-start; }
.note-add textarea { min-height: 62px; }
.note-add .btn { flex: 0 0 auto; align-self: stretch; }

/* ---------- stats ------------------------------------------------------- */

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.tile {
  border: 1px solid var(--border); border-radius: var(--r-card);
  background: var(--bg); box-shadow: var(--shadow);
  padding: 16px 18px;
}
.tile .t-label { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.tile .t-value {
  font-size: 27px; font-weight: 600; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; margin: 6px 0 3px; line-height: 1.1;
}
.tile .t-sub { font-size: 12px; color: var(--text-3); }

.card {
  border: 1px solid var(--border); border-radius: var(--r-card);
  background: var(--bg); box-shadow: var(--shadow);
  overflow: hidden; margin-bottom: 24px;
}
.card-head {
  padding: 14px 18px; border-bottom: 1px solid var(--border-soft);
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
}
.card-head h3 { font-size: 14px; font-weight: 600; }
.card-head .aside { margin-left: auto; font-size: 12px; color: var(--text-3); }
.card-body { padding: 18px; }

.chart { width: 100%; height: 190px; display: block; }
.chart .bar { fill: #d9d9de; }
.chart .bar-top { fill: var(--accent); }
.axis { font-size: 11px; fill: var(--text-3); }

table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th, table.data td {
  text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--border-soft);
}
table.data tr:last-child td { border-bottom: 0; }
table.data th {
  font-size: 11.5px; font-weight: 600; color: var(--text-3);
  background: var(--surface); text-transform: uppercase; letter-spacing: 0.04em;
}
table.data tbody tr:hover { background: var(--surface); }
table.data td.num, table.data th.num {
  text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.post-thumb {
  width: 34px; aspect-ratio: 9/16; object-fit: cover;
  border-radius: 4px; background: var(--surface-2); flex: none;
}
.post-cell { display: flex; align-items: center; gap: 11px; min-width: 0; }
.post-cell span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- calendar ---------------------------------------------------- */

.cal { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal .dow {
  font-size: 11px; font-weight: 600; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 9px 10px; border-bottom: 1px solid var(--border-soft);
  background: var(--surface);
}
.cal .day {
  min-height: 104px; padding: 8px 9px;
  border-right: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.cal .day:nth-child(7n) { border-right: 0; }
.cal .day.other { background: var(--surface); }
.cal .day .n { font-size: 12px; font-weight: 500; color: var(--text-3); font-variant-numeric: tabular-nums; }
.cal .day.today .n {
  color: #fff; background: var(--accent);
  width: 20px; height: 20px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}
.cal-item {
  display: block; font-size: 11.5px; line-height: 1.25;
  margin-top: 5px; padding: 3px 6px; border-radius: 4px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); overflow-wrap: anywhere;
}
.cal-item.is-live { background: var(--accent-tint); border-color: var(--accent-line); color: var(--accent); font-weight: 500; }
.cal-item.is-pending { border-style: dashed; }
.cal-item.is-show { background: var(--text); border-color: var(--text); color: #fff; font-weight: 500; }
@media (max-width: 760px) {
  .cal { display: block; }
  .cal .dow { display: none; }
  .cal .day { min-height: 0; border-right: 0; }
  .cal .day.other { display: none; }
}

.legend {
  display: flex; gap: 18px; flex-wrap: wrap;
  padding: 12px 18px; font-size: 12px; color: var(--text-2);
  border-top: 1px solid var(--border-soft);
}
.legend span { display: flex; align-items: center; gap: 7px; }
.legend i {
  width: 10px; height: 10px; border-radius: 3px; display: block;
  border: 1px solid var(--border); background: var(--surface);
}
.legend i.live { background: var(--accent-tint); border-color: var(--accent-line); }
.legend i.pending { border-style: dashed; }
.legend i.show { background: var(--text); border-color: var(--text); }

/* ---------- show list --------------------------------------------------- */

.show-row {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 18px; border-bottom: 1px solid var(--border-soft);
}
.show-row:last-child { border-bottom: 0; }
.show-row:hover { background: var(--surface); }
.show-date {
  flex: none; width: 52px; text-align: center;
  border: 1px solid var(--border); border-radius: var(--r-ctl);
  padding: 6px 0; background: var(--surface);
}
.show-date b { display: block; font-size: 17px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.show-date span { font-size: 10.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.05em; }
.show-main { min-width: 0; flex: 1; }
.show-main b { font-size: 14px; font-weight: 600; display: block; }
.show-main span { font-size: 12.5px; color: var(--text-3); }
.show-note { font-size: 12.5px; color: var(--text-2); margin-top: 3px; }

/* ---------- toolbar ----------------------------------------------------- */

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 22px; }
.toolbar select { width: auto; min-width: 190px; }
.spacer { flex: 1 1 auto; }

/* ---------- sign in / invite -------------------------------------------- */

.centre { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
@media (max-width: 860px) { .centre { grid-template-columns: 1fr; } }
.centre .pitch {
  background: var(--text); color: #fff;
  padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
}
.centre .pitch h1 {
  font-size: clamp(30px, 3.4vw, 42px); font-weight: 600;
  letter-spacing: -0.025em; line-height: 1.12; max-width: 16ch;
}
.centre .pitch p { color: #a1a1aa; max-width: 42ch; font-size: 15px; margin-top: 14px; }
.centre .pitch img { height: 15px; width: auto; }
.centre .form-side { padding: 48px; display: flex; flex-direction: column; justify-content: center; }
.centre form { width: 100%; max-width: 360px; }
.centre form h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 24px; }

.msg { font-size: 13px; padding: 9px 0; font-weight: 500; }
.msg.error { color: var(--chg); }
.msg.ok { color: var(--ok); }

/* ---------- modal ------------------------------------------------------- */

dialog {
  border: 1px solid var(--border); border-radius: var(--r-card);
  padding: 0; width: min(600px, 92vw);
  background: var(--bg); color: var(--text);
  box-shadow: 0 16px 48px rgba(24, 24, 27, 0.18);
}
dialog::backdrop { background: rgba(24, 24, 27, 0.4); }
dialog .dlg-body { padding: 26px; }
dialog h2 { font-size: 17px; font-weight: 600; margin-bottom: 20px; }
dialog .dlg-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }

/* ---------- footer ------------------------------------------------------ */

.foot {
  border-top: 1px solid var(--border);
  padding: 20px 24px 36px;
  max-width: var(--wrap); margin: 0 auto;
  color: var(--text-3); font-size: 12.5px;
  display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
}
