/* SpotHighlight admin + site styles.
   Concept: a night-garden brand. Dark teal "night" chrome (sidebar, auth panel)
   framing a cool mist workspace; gold is the single accent, used for actions and
   live state. Bodoni italic for display, Manrope for UI, Plex Mono for keys/IDs. */
:root {
  --night: #0a1a1f;
  --night-2: #12313a;
  --night-line: rgba(233, 196, 106, .16);
  --gold: #e9c46a;
  --gold-deep: #b98a2e;
  --gold-soft: #f6e3b0;
  --rose: #f28f79;
  --teal: #6cc3b5;
  --mist: #eef2f1;
  --paper: #ffffff;
  --ink: #15262a;
  --ink-2: #4d6266;
  --ink-3: #8a9c9f;
  --line: #d9e2e1;
  --ok: #2f8a6b;
  --warn: #b7791f;
  --danger: #c2453a;
  --f-display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --f-body: "Manrope", "Segoe UI", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --r: 12px;
  --shadow: 0 1px 2px rgba(10, 26, 31, .06), 0 8px 24px -12px rgba(10, 26, 31, .18);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--mist); color: var(--ink); font: 15px/1.55 var(--f-body); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; }
h1, h2, h3 { text-wrap: balance; }
:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 14px var(--f-body); padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); text-decoration: none; cursor: pointer; transition: transform .15s ease, background .15s ease, box-shadow .15s ease; white-space: nowrap; }
.btn:hover { background: #f7faf9; }
.btn:active { transform: translateY(1px); }
.btn--gold { background: linear-gradient(180deg, #f1d184, var(--gold)); border-color: var(--gold-deep); color: #2a1e05; box-shadow: 0 6px 18px -8px rgba(185, 138, 46, .8); }
.btn--gold:hover { background: linear-gradient(180deg, #f6dc99, #eccb78); }
.btn--night { background: var(--night); color: var(--gold-soft); border-color: var(--night); }
.btn--night:hover { background: var(--night-2); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn--ghost:hover { background: rgba(21, 38, 42, .06); }
.btn--danger { color: var(--danger); border-color: rgba(194, 69, 58, .35); background: transparent; }
.btn--danger:hover { background: rgba(194, 69, 58, .07); }
.btn--sm { padding: 6px 12px; font-size: 13px; }
.btn--block { width: 100%; }

.field { display: grid; gap: 6px; min-width: 0; }
.field > span, .field > label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field small { color: var(--ink-3); font-size: 12px; }
.input, .select, .textarea { width: 100%; font: 15px var(--f-body); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; transition: border-color .15s, box-shadow .15s; }
.textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--gold-deep); box-shadow: 0 0 0 3px rgba(233, 196, 106, .3); }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--danger); }
.err { color: var(--danger); font-size: 13px; }
.check { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--gold-deep); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.stack { display: grid; gap: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row--end { justify-content: flex-end; }
.row--between { justify-content: space-between; }
.counter { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; text-align: right; }

.alert { padding: 12px 16px; border-radius: 10px; font-size: 14px; border: 1px solid; }
.alert--ok { background: #e9f6f0; border-color: #b9e1cf; color: #1d5c45; }
.alert--err { background: #fbeceb; border-color: #f0c6c2; color: #8a2a22; }
.alert ul { margin: 4px 0 0; padding-left: 18px; }

/* ---------- admin shell ---------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100%; background: linear-gradient(to right, var(--night) 248px, transparent 248px); }
.side { background: radial-gradient(140% 60% at 0% 100%, var(--night-2), var(--night) 70%); color: #cfdcda; padding: 22px 16px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; padding: 0 8px; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-name { font-family: var(--f-display); font-style: italic; font-size: 22px; letter-spacing: .01em; }
.brand-name b { color: var(--gold); font-weight: 700; }
.nav { display: grid; gap: 2px; }
.nav a { white-space: nowrap; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 14px; color: #b7c8c6; }
.nav a:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.nav a.is-on { background: rgba(233, 196, 106, .12); color: var(--gold-soft); box-shadow: inset 2px 0 0 var(--gold); }
.nav svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav-label { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: #6f8a88; padding: 0 12px; margin-top: 8px; }
.side-foot { margin-top: auto; display: grid; gap: 10px; padding: 12px; border: 1px solid var(--night-line); border-radius: 12px; font-size: 13px; }
.side-foot strong { color: #fff; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot button { all: unset; cursor: pointer; color: var(--gold); font-weight: 600; }
.side-foot button:focus-visible { outline: 2px solid var(--gold); }

.main { padding: 28px clamp(16px, 4vw, 44px) 60px; min-width: 0; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-deep); }
.page-title { font-family: var(--f-display); font-style: italic; font-weight: 500; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.05; margin: 4px 0 0; }
.page-title em { color: var(--gold-deep); font-weight: 700; }
.lead { color: var(--ink-2); margin: 6px 0 0; max-width: 62ch; }
.flash-stack { display: grid; gap: 10px; margin-bottom: 20px; }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); min-width: 0; }
.card h2 { font-size: 16px; margin: 0 0 4px; }
.card > p.muted { margin: 0 0 16px; }
.muted { color: var(--ink-2); font-size: 14px; }
.section-gap { display: grid; gap: 20px; }
.cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.stat b { display: block; font-family: var(--f-display); font-size: 34px; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--ink-2); }

/* live hero on dashboard */
.live { position: relative; overflow: hidden; border-radius: 16px; padding: 26px; color: #e9f1ef; background: radial-gradient(90% 120% at 100% 0%, rgba(233, 196, 106, .22), transparent 55%), radial-gradient(120% 120% at 0% 100%, var(--night-2), var(--night)); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; }
.live h2 { font-family: var(--f-display); font-style: italic; font-weight: 500; font-size: clamp(24px, 3vw, 32px); margin: 6px 0 4px; line-height: 1.1; }
.live h2 em { color: var(--gold); font-weight: 700; }
.live p { margin: 0; color: #a9bfbc; }
.live .stars { position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(1px 1px at 10% 20%, #fff8, transparent 60%), radial-gradient(1px 1px at 30% 70%, #fff6, transparent 60%), radial-gradient(1.5px 1.5px at 70% 30%, #f6e3b0aa, transparent 60%), radial-gradient(1px 1px at 85% 80%, #fff7, transparent 60%), radial-gradient(1px 1px at 55% 15%, #fff5, transparent 60%); }
.live > * { position: relative; }
.faces { display: flex; }
.faces .av { margin-left: -12px; border: 2px solid var(--night); }
.faces .av:first-child { margin-left: 0; }

/* pills */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill--live { color: #1f7a5b; background: #e3f4ec; }
.pill--live::before { box-shadow: 0 0 0 3px rgba(31, 122, 91, .2); animation: pulse 2s infinite; }
.pill--pub { color: #7a5a12; background: #fbf0d4; }
.pill--draft { color: var(--ink-2); background: #e8eeed; }
.pill--off { color: var(--danger); background: #fbeceb; }
.live .pill--live { background: rgba(108, 195, 181, .16); color: #8fe0d1; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(31, 122, 91, 0); } }

/* avatars */
.av { width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; font-family: var(--f-display); font-weight: 600; color: #f4efe6; font-size: 16px; overflow: hidden; background: linear-gradient(135deg, var(--a1, #2a6f73), var(--a2, #0f3b40)); box-shadow: 0 0 0 2px var(--gold-soft) inset; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av--lg { width: 96px; height: 96px; font-size: 32px; }
.av--sm { width: 32px; height: 32px; font-size: 12px; }

/* tables / lists */
.table-wrap { overflow-x: auto; margin: 0 -22px -22px; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th { text-align: left; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; padding: 10px 22px; border-bottom: 1px solid var(--line); background: #fafcfb; }
.t td { padding: 14px 22px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t a.title { font-weight: 700; text-decoration: none; }
.t a.title:hover { text-decoration: underline; }
.num { font-variant-numeric: tabular-nums; }

/* people grid on campaign page */
.people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.person { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; align-items: start; transition: box-shadow .2s, transform .2s, border-color .2s; }
.person:hover { box-shadow: var(--shadow); border-color: #c9d6d4; }
.person.is-drag { opacity: .45; }
.person.is-over { border-color: var(--gold-deep); box-shadow: 0 0 0 3px rgba(233, 196, 106, .35); }
.person .av { grid-row: span 3; width: 56px; height: 56px; font-size: 20px; }
.person h3 { margin: 0; font-size: 15px; line-height: 1.25; }
.person .meta { font: 12px var(--f-mono); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person p { grid-column: 1 / -1; margin: 10px 0 0; font-size: 13.5px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.person .foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--ink); }
.badge i { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff6da, var(--tier, var(--gold)) 55%, #7a5a1c); box-shadow: 0 0 0 2px rgba(255, 255, 255, .8), 0 1px 3px rgba(0, 0, 0, .25); }
.person .foot > span { white-space: nowrap; }
.person h3 { padding-right: 26px; }
.grip { position: absolute; top: 10px; right: 10px; cursor: grab; color: var(--ink-3); background: none; border: 0; padding: 4px; border-radius: 6px; }
.grip:hover { background: #eef2f1; }
.no-consent { position: absolute; top: 40px; right: 10px; }
.person-add { display: grid; place-items: center; gap: 6px; text-align: center; border: 1.5px dashed #b9c9c6; border-radius: var(--r); padding: 22px; text-decoration: none; color: var(--ink-2); font-weight: 600; min-height: 150px; transition: border-color .2s, background .2s, color .2s; }
.person-add:hover { border-color: var(--gold-deep); background: #fffaf0; color: var(--ink); }
.person-add span.plus { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--night); color: var(--gold); font-size: 22px; }

/* empty states */
.empty { text-align: center; padding: 40px 20px; display: grid; justify-items: center; gap: 10px; }
.empty svg { width: 120px; height: auto; }
.empty h3 { margin: 0; font-family: var(--f-display); font-style: italic; font-weight: 500; font-size: 24px; }
.empty p { margin: 0; color: var(--ink-2); max-width: 46ch; }

/* code / snippet */
.snippet { position: relative; background: var(--night); color: #d6e6e3; border-radius: 10px; padding: 14px 16px; font: 13px/1.6 var(--f-mono); overflow-x: auto; white-space: pre; }
.snippet .k { color: var(--gold); }
.snippet .s { color: #9fe0c6; }
.copy { position: absolute; top: 8px; right: 8px; }
.snippet:has(.copy) { padding-top: 46px; }
.key { font-family: var(--f-mono); font-size: 13px; background: #eef2f1; padding: 3px 8px; border-radius: 6px; }

/* photo picker */
.photo-pick { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.photo-pick .av--lg { box-shadow: 0 0 0 3px var(--gold) inset, 0 10px 24px -10px rgba(0, 0, 0, .4); }
.drop { flex: 1; min-width: 200px; border: 1.5px dashed #b9c9c6; border-radius: 12px; padding: 16px; text-align: center; color: var(--ink-2); font-size: 14px; cursor: pointer; transition: border-color .2s, background .2s; }
.drop:hover, .drop.is-over { border-color: var(--gold-deep); background: #fffaf0; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.tiers { display: flex; gap: 10px; flex-wrap: wrap; }
.tier { position: relative; }
.tier input { position: absolute; opacity: 0; }
.tier span { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); font-weight: 600; font-size: 14px; cursor: pointer; background: var(--paper); }
.tier span i { width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff6da, var(--tier) 55%, #7a5a1c); }
.tier input:checked + span { border-color: var(--gold-deep); box-shadow: 0 0 0 3px rgba(233, 196, 106, .3); }
.tier input:focus-visible + span { outline: 2px solid var(--gold-deep); outline-offset: 2px; }

/* live card preview on entry form */
.mini-card { background: #fbf7ef; border-radius: 18px; padding: 44px 22px 20px; text-align: center; position: relative; box-shadow: 0 30px 60px -30px rgba(10, 26, 31, .5); margin-top: 40px; }
.mini-card .av--lg { position: absolute; top: -48px; left: 50%; transform: translateX(-50%); box-shadow: 0 0 0 4px #fbf7ef, 0 0 0 7px var(--gold); }
.mini-card .bdg { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; background: rgba(233, 196, 106, .28); }
.mini-card .bdg i { width: 8px; height: 8px; border-radius: 50%; background: var(--tier, var(--gold)); }
.mini-card h3 { font-family: var(--f-display); font-weight: 500; font-size: 26px; margin: 10px 0 2px; line-height: 1.1; }
.mini-card .id { font: 12px var(--f-mono); color: var(--ink-2); margin: 0; }
.mini-card .cap { margin: 14px 0 0; font-size: 14.5px; line-height: 1.6; word-wrap: break-word; }
.mini-card time { display: block; margin-top: 12px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.sticky { position: sticky; top: 20px; }

/* ---------- auth ---------- */
.auth { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.auth-form { display: grid; align-content: center; padding: 40px clamp(16px, 6vw, 72px); background: var(--paper); }
.auth-form .inner { width: 100%; max-width: 420px; margin: 0 auto; display: grid; gap: 22px; }
.auth-form h1 { font-family: var(--f-display); font-style: italic; font-weight: 500; font-size: 38px; margin: 0; line-height: 1.05; }
.auth-form h1 em { color: var(--gold-deep); font-weight: 700; }
.auth-art { position: relative; overflow: hidden; background: radial-gradient(80% 70% at 50% 100%, var(--night-2), var(--night) 70%); display: grid; place-items: center; padding: 40px; color: #e9f1ef; }
.auth-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.auth-art blockquote { position: relative; margin: 0; max-width: 34ch; text-align: center; font-family: var(--f-display); font-style: italic; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.25; }
.auth-art blockquote em { color: var(--gold); font-weight: 700; }
.auth-art cite { display: block; margin-top: 14px; font: 600 12px var(--f-body); letter-spacing: .2em; text-transform: uppercase; color: #8fb0ab; font-style: normal; }
.auth .brand { color: var(--ink); padding: 0; }
.divider-text { text-align: center; font-size: 14px; color: var(--ink-2); }
.divider-text a { color: var(--gold-deep); font-weight: 700; text-decoration: none; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; text-align: center; padding: 10px; border: 1px solid var(--line); border-radius: 10px; font-weight: 600; font-size: 14px; cursor: pointer; }
.seg input:checked + span { border-color: var(--gold-deep); background: #fffaf0; box-shadow: 0 0 0 3px rgba(233, 196, 106, .25); }
.seg input:focus-visible + span { outline: 2px solid var(--gold-deep); }

/* ---------- preview page ---------- */
.preview-bar { position: fixed; z-index: 2147483600; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; gap: 8px; align-items: center; padding: 8px 8px 8px 16px; border-radius: 999px; background: rgba(10, 26, 31, .9); color: #d6e6e3; font-size: 13px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); max-width: calc(100% - 32px); flex-wrap: wrap; justify-content: center; }

@media (max-width: 960px) {
  .cols { grid-template-columns: minmax(0, 1fr); }
  .sticky { position: static; }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: minmax(0, 1fr); background: none; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px 16px; gap: 12px; }
  .nav { grid-auto-flow: column; overflow-x: auto; flex: 1 1 100%; order: 3; }
  .nav-label, .side-foot .who { display: none; }
  .side-foot { margin: 0 0 0 auto; padding: 6px 10px; border: 0; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-art { min-height: 220px; order: -1; }
  .live { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
