/* Music Note — Admin (design preview, 2026-09-25)
   A LOOK BUILT AHEAD OF THE BACKEND, ON PURPOSE. Nothing on this page reads
   real data — Phase 1 (Supabase) doesn't exist yet, so there is no shared
   "notes" table, no "reports" table, no visit log for Phase 6 to roll up.
   Every list here is a hardcoded array in admin.js, clearly marked. Wiring
   this to Supabase is Phase 7 in BACKEND-PLAN.md; this file is what that
   phase should restyle-never-rebuild once the data exists.

   Reuses the app's own tokens (--bg, --cta, --fg, the 4px spacing grid) from
   ../styles.css rather than redefining a second palette — this is still
   Music Note, just its own screen. Everything below is new: the app's own
   `.btn`/`.card` classes carry landing-page and vinyl-record specific
   baggage (the waveform bars, the record geometry) that a dense dashboard
   has no use for, so this page gets its own small component set instead of
   inheriting those. */

.admin-body {
  min-height: 100vh;
  background: var(--bg);
}

/* --- shared bits: fields, buttons --- */

.admin-field {
  display: block;
  margin-top: 16px;
}

.admin-field__label {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
}

.admin-field input {
  width: 100%;
  box-sizing: border-box;
  height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: var(--fg);
  font-size: 15px;
}

.admin-field input:focus-visible {
  outline: 2px solid var(--cta);
  outline-offset: 1px;
}

.admin-field input:disabled,
.admin-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.admin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.admin-btn:focus-visible {
  outline: 2px solid var(--cta);
  outline-offset: 2px;
}

.admin-btn--primary {
  width: 100%;
  margin-top: 24px;
  background: var(--cta);
  color: #0d0d0d;
}

.admin-btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--fg);
  font-weight: 500;
}

.admin-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* --- login --- */

.admin-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.admin-login__card {
  width: 100%;
  max-width: 360px;
  padding: 32px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.admin-login__mark {
  width: 32px;
  height: 32px;
  color: var(--cta);
}

.admin-login__title {
  margin: 12px 0 0;
  font-family: "Bungee", "Inter", sans-serif;
  font-size: 28px;
  font-weight: 400;
}

.admin-login__sub {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
}

.admin-login__card .admin-field {
  text-align: left;
}

.admin-login__link {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 4px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: underline;
  cursor: pointer;
}

.admin-login__link:hover {
  color: var(--fg);
}

.admin-login__link:focus-visible {
  outline: 2px solid var(--cta);
  outline-offset: 2px;
}

/* Empty by default (no error, no message) — same `:not(:empty)` device
   `.drop__status` uses, so a blank status costs no layout space. */
.admin-login__status {
  margin: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.admin-login__status:not(:empty) {
  margin-top: 16px;
}

.admin-login__status--error {
  color: var(--cta);
}

/* --- shell --- */

.admin-shell {
  min-height: 100vh;
}

.admin-top {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 24px;
  height: 64px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  /* Sticky rather than fixed: the tabs stay reachable on a long report list
     without the extra bookkeeping a fixed header needs (scroll padding, a
     second z-index to reason about). */
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 1;
}

.admin-top__back {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-size: 14px;
  flex: none;
}

.admin-top__back .icon { width: 18px; height: 18px; }
.admin-top__back:hover { color: var(--fg); }

.admin-tabs {
  display: flex;
  gap: 4px;
  flex: 1 1 auto;
  overflow-x: auto;
}

.admin-tabs__btn {
  border: none;
  background: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  padding: 0 4px;
  height: 64px;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}

.admin-tabs__btn:hover { color: var(--fg); }

.admin-tabs__btn.is-active {
  color: var(--fg);
  border-bottom-color: var(--cta);
}

.admin-tabs__btn:focus-visible { outline: 2px solid var(--cta); outline-offset: -2px; }

.admin-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.admin-panel__head h2 {
  margin: 0;
  font-family: "Bungee", "Inter", sans-serif;
  font-weight: 400;
  font-size: 22px;
}

.admin-panel__hint {
  margin: 8px 0 0;
  max-width: 60ch;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.6);
}

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

.admin-notes {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-note {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Same three hues as a map pin's label (invariant 17a/17): colour still
   means age, even off the map. */
.admin-note__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: none;
}

.admin-note[data-status="green"]  .admin-note__dot { background: #17A34A; }
.admin-note[data-status="yellow"] .admin-note__dot { background: #BE8A04; }
.admin-note[data-status="red"]    .admin-note__dot { background: #C62842; }

.admin-note__body { flex: 1 1 auto; min-width: 0; }

.admin-note__title {
  font-weight: 600;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-note__meta {
  margin-top: 2px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-note__comments {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: none;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

.admin-note__comments .icon { width: 16px; height: 16px; }

.admin-note__expiry {
  flex: none;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  width: 68px;
  text-align: right;
}

.admin-note__tag {
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(198, 40, 66, 0.25);
  color: #ffb3c0;
  font-size: 12px;
  font-weight: 600;
  vertical-align: middle;
}

.admin-note__delete {
  flex: none;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #ff8fa3;
  cursor: pointer;
  padding: 10px 4px;
}
.admin-note__delete:focus-visible { outline: 2px solid var(--cta); outline-offset: 2px; }
.admin-note__delete:disabled { opacity: 0.5; cursor: default; }

.admin-report__quote { display: block; margin-top: 4px; color: rgba(255, 255, 255, 0.85) !important; font-size: 14px !important; }

.admin-note__edit {
  flex: none;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--cta);
  cursor: pointer;
  padding: 10px 4px;
}

.admin-note__edit:focus-visible { outline: 2px solid var(--cta); outline-offset: 2px; }

/* --- all notes (the archive, 2026-10-07) --- */

.admin-switch {
  margin-top: 24px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  position: relative;
}
/* The real checkbox stays in place (and in the tab order) under the drawn track. */
.admin-switch input {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 44px;
  height: 24px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.admin-switch__track {
  flex: none;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  position: relative;
  transition: background-color 160ms ease;
}
.admin-switch__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 160ms ease;
}
.admin-switch input:checked + .admin-switch__track { background: #17A34A; }
.admin-switch input:checked + .admin-switch__track::after { transform: translateX(20px); }
.admin-switch input:focus-visible + .admin-switch__track { outline: 2px solid var(--cta); outline-offset: 2px; }
.admin-switch input:disabled + .admin-switch__track { opacity: 0.5; }
.admin-switch__text { font-size: 15px; line-height: 1.4; }
.admin-switch__text span { display: block; margin-top: 2px; font-size: 13px; color: rgba(255, 255, 255, 0.6); }
@media (prefers-reduced-motion: reduce) {
  .admin-switch__track, .admin-switch__track::after { transition: none; }
}

.admin-archive__bar {
  margin-top: 16px;
  display: flex;
  gap: 12px;
}

.admin-archive__search {
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
  color: var(--fg);
  font-family: inherit;
  font-size: 15px;
}
.admin-archive__bar .admin-btn { white-space: nowrap; }
.admin-archive__search::placeholder { color: rgba(255, 255, 255, 0.45); }
.admin-archive__search:focus-visible { outline: 2px solid var(--cta); outline-offset: 1px; }

.admin-archive__count {
  margin: 12px 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

.admin-archive__count + .admin-notes { margin-top: 12px; }

/* The summary IS the row, styled as an .admin-note; the native marker goes. */
.admin-archive > summary { list-style: none; cursor: pointer; }
.admin-archive > summary::-webkit-details-marker { display: none; }
.admin-archive > summary:hover { background: rgba(255, 255, 255, 0.06); }
.admin-archive > summary:focus-visible { outline: 2px solid var(--cta); outline-offset: 2px; }
.admin-archive[open] > summary { border-radius: 12px 12px 0 0; }

/* Live is green, as on the map; ended notes go quiet grey; removed early red. */
.admin-note[data-status="live"]    .admin-note__dot { background: #17A34A; }
.admin-note[data-status="expired"] .admin-note__dot { background: rgba(255, 255, 255, 0.3); }
.admin-note[data-status="removed"] .admin-note__dot { background: #C62842; }

.admin-archive__when {
  flex: none;
  font-size: 13px;
  text-align: right;
  color: rgba(255, 255, 255, 0.75);
}
.admin-archive__when span {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.55);
}

.admin-archive__more {
  padding: 16px 16px 8px 44px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: none;
  border-radius: 0 0 12px 12px;
  background: rgba(255, 255, 255, 0.015);
  font-size: 14px;
}

.admin-archive__more dl {
  margin: 0;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 16px;
}
.admin-archive__more dt { color: rgba(255, 255, 255, 0.55); }
.admin-archive__more dd { margin: 0; overflow-wrap: anywhere; }
.admin-archive__more a { color: var(--cta); }

.admin-archive__label { margin: 16px 0 0; color: rgba(255, 255, 255, 0.55); }
.admin-archive__none { margin: 8px 0 0; }

.admin-archive__comments {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.admin-archive__comments span {
  display: block;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.admin-archive__more .admin-note__delete { margin-top: 8px; padding-left: 0; }

/* --- reports --- */

.admin-reports {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-report {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-report__row {
  flex: 1 1 320px;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.admin-report__reason {
  flex: none;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(198, 40, 66, 0.18);
  color: #ff9caf;
  font-size: 12px;
  font-weight: 600;
}

.admin-report__note { flex: 1 1 auto; min-width: 0; font-size: 14px; }
.admin-report__note strong { font-size: 15px; }
.admin-report__note span { color: rgba(255, 255, 255, 0.55); font-size: 13px; margin-left: 12px; }
.admin-report__note .admin-report__quote { margin-left: 0; }
.admin-report__note .admin-report__quote + span { margin-left: 0; display: block; }

.admin-report__actions {
  flex: none;
  margin-left: auto;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.admin-report__actions .admin-btn { height: 36px; padding: 0 14px; font-size: 13px; }

.admin-report__actions .admin-btn--hide {
  background: rgba(198, 40, 66, 0.85);
  color: #fff;
}

/* --- analytics --- */

.admin-stats {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.admin-stat {
  padding: 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-stat__value {
  font-family: "Bungee", "Inter", sans-serif;
  font-size: 28px;
}

.admin-stat__label {
  margin-top: 4px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.55);
}

.admin-chart-card {
  margin-top: 24px;
  padding: 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-chart-card h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.admin-chart-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* --- genres shared (2026-10-07) --- */
.admin-genres__summary {
  margin: 12px 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}
.admin-genres__list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.admin-genres__row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 120px;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}
.admin-genres__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: capitalize;
}
.admin-genres__track {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.admin-genres__bar {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--cta);
}
.admin-genres__count {
  font-size: 13px;
  text-align: right;
  color: rgba(255, 255, 255, 0.6);
  font-variant-numeric: tabular-nums;
}
.admin-genres__more { margin-top: 16px; height: 36px; padding: 0 14px; font-size: 13px; }

.admin-ranges {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.admin-ranges__btn {
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
}

.admin-ranges__btn:hover { color: var(--fg); }

.admin-ranges__btn.is-active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--fg);
}

.admin-ranges__btn:focus-visible,
.admin-ranges__year select:focus-visible {
  outline: 2px solid var(--cta);
  outline-offset: 1px;
}

/* A native <select>, not a hand-rolled dropdown — one more control here would
   be one more focus trap and keyboard path to build and test for a screen
   this session is only sketching the look of. */
.admin-ranges__year select {
  height: 32px;
  /* The browser's own arrow ignores padding and sat ~4px from the right edge,
     so it is switched off and drawn below instead: 12px in from each side,
     the same inset as the range buttons' text. 12 + 8 chevron + 8 gap = 28. */
  -webkit-appearance: none;
  appearance: none;
  padding: 0 28px 0 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.admin-ranges__year select:hover { color: var(--fg); }

/* The chevron. On the label, not the select (a select cannot hold a
   pseudo-element), and click-through so the whole box still opens the list.
   It takes the select's own colour so it brightens with it. */
.admin-ranges__year {
  position: relative;
  display: inline-flex;
  color: rgba(255, 255, 255, 0.6);
}
.admin-ranges__year::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-75%) rotate(45deg);
  pointer-events: none;
}
.admin-ranges__year:hover,
.admin-ranges__year.is-active { color: var(--fg); }

/* Matches .admin-ranges__btn.is-active's treatment, so picking a year reads
   as the same kind of choice as picking 24h/7d/30d/1y rather than a second,
   unrelated control. Toggled by admin.js alongside the buttons' own
   is-active class. */
.admin-ranges__year.is-active select {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--fg);
}

/* One line under the chart: "Loading…", "No visits recorded…" or an error.
   Empty when there is nothing to say, so it takes no space (role="status"
   reads it out politely without announcing every redraw). */
.admin-chart-status { margin: 8px 0 0; font-size: 13px; line-height: 19px; color: rgba(255, 255, 255, 0.6); }
.admin-chart-status:empty { display: none; }

.admin-chart {
  display: block;
  width: 100%;
  /* 110 (the bars/value-labels, unchanged) + 20 for the x-axis label row
     added 2026-09-25 — must match admin.js's own `barsH + AXIS_H` in
     renderChart(), or this box ends before the SVG's own viewBox does and
     the axis row renders into the caption's margin below it. */
  height: 130px;
  margin-top: 16px;
  /* An SVG clips to its own box by default. The outermost bars' value labels
     are centred on the bar (text-anchor="middle"), so a 3-digit label over a
     narrow bar near either edge — a real case on a 375px phone showing 12
     monthly bars — extends past x=0 or x=width and was getting sliced in
     half ("825" rendering as "325"). The card's own 20px padding is exactly
     the bleed room this needs, so letting it overflow costs nothing visible. */
  overflow: visible;
}

/* --- the live-view globe (2026-09-25) ---
   Shares a visual element with Shopify's Live View dashboard, on request.
   See admin-globe.js's header comment for what was kept and dropped from
   the app's own landing-page globe to build this. */

.admin-live {
  position: relative; /* anchors .admin-live__link, the connector overlay below */
  margin-top: 24px;
  display: flex;
  gap: 16px;
  align-items: stretch;
}

.admin-live__side {
  flex: 0 0 240px;
  min-width: 0;
  /* THE GLOBE SETS THE ROW'S HEIGHT, NEVER THE LIST (2026-10-01). With
     enough countries the list grew taller than the globe, the row stretched
     to it, and `align-items: stretch` beat the globe's `aspect-ratio` — the
     card went tall and the sphere rendered as an oval. `contain: size` gives
     this column no height of its own, so the row is exactly the square
     globe's height, the column stretches to match, and the list SCROLLS
     inside it. Undone in the stacked mobile layout below. */
  contain: size;
  display: flex;
  flex-direction: column;
}

.admin-live__side h3 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
}

.admin-live__list {
  list-style: none;
  margin: 0;
  position: relative; /* offsetTop of a row is then measured from the list */
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  /* Room for the rows' 2px focus ring, which overflow would otherwise clip. */
  padding: 2px 4px 2px 2px;
}

/* A real <button> now, not a plain <li> (2026-09-25) — it selects the
   location and draws the connector line, so it needs to be a genuine,
   keyboard-operable control like the globe's own pin button. `width: 100%`
   plus `text-align: left` and `color: inherit` undo the browser's own button
   defaults; `font-family: inherit` already comes from this app's global
   `button { font-family: inherit }` reset (invariant 33 in CLAUDE.md). */
.admin-live__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
}

.admin-live__row:focus-visible {
  outline: 2px solid var(--cta);
  outline-offset: 2px;
}

/* Set by admin.js on the `admin-globe:pin` event (2026-09-25) — the same
   accent the pin itself lights up with, so the two read as one selection
   rather than two unrelated highlights. */
.admin-live__row--active {
  background: rgba(var(--cta-rgb), 0.12);
  border-color: var(--cta);
}

.admin-live__city {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-live__visits {
  flex: none;
  font-weight: 600;
  color: var(--cta);
}

/* `margin-left: auto` (not `0 auto`), so the card sits flush against the
   ROW's own right edge instead of centred with slack on both sides
   (2026-09-25, reported: "this container needs to be as wide as the other
   two above it"). `.admin-live` itself was already the same 912px as
   `.admin-stats`/`.admin-chart-card` — the row was never actually narrower,
   its CONTENT just stopped short of the right edge because a centred
   max-420px box leaves equal gaps on both sides. Right-aligning makes the
   visible block span the full row, from the location list's left edge to
   the globe's right edge, matching its siblings above without inflating the
   globe itself past its tuned size. */
.admin-globe {
  position: relative;
  /* Never stretched to the row (see `.admin-live__side`): its height comes
     from `aspect-ratio` alone, so the sphere stays round. */
  align-self: flex-start;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 280px;
  max-width: 420px;
  aspect-ratio: 1 / 1;
  margin-left: auto;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: visible;
}

/* Redrawn as a gradient rather than baked into an image, same device as the
   landing globe's own `.globe__glow` (styles.css) — and the same colour,
   since that teal is the shader's own rim light, not the app's amber CTA. */
.admin-globe__glow {
  position: absolute;
  inset: -14%;
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(150, 235, 215, 0) 0 33%,
    rgba(150, 235, 215, 0.25) 37.5%,
    rgba(110, 210, 195, 0.10) 44%,
    rgba(110, 210, 195, 0) 56%
  );
  pointer-events: none;
}

.admin-globe__canvas,
.admin-globe__legend { display: none; }

.admin-globe--3d .admin-globe__canvas,
.admin-globe--3d .admin-globe__legend { display: block; }

.admin-globe__canvas {
  position: absolute;
  inset: 6%;
  width: 88%;
  height: 88%;
  border-radius: 50%;
  cursor: grab;
  touch-action: none;
}

.admin-globe__canvas:active { cursor: grabbing; }

.admin-globe__canvas:focus-visible {
  outline: 2px solid var(--cta);
  outline-offset: 6px;
}

/* WebGL unavailable: a flat best-effort fallback rather than an empty hole.
   Imperfect — an equirectangular map clipped to a circle has no real
   curvature — but this only ever shows on a browser with no WebGL. */
.admin-globe--fallback {
  background: #0d0d0d url(../assets/earth-map-nasa.jpg) center / cover no-repeat;
  border-radius: 50%;
}

/* A plain text hint now, not a colour key (2026-09-25) — the pins became
   real clickable buttons this same session (see below), and "Visits" was
   explaining a dot's colour that no longer needs explaining; the thing
   worth telling the admin now is that the dots are interactive at all. No
   `.admin-globe__legend-dot` any more — there's nothing left for a dot to
   key. */
.admin-globe__legend {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(13, 13, 13, 0.75);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
}

/* Placeholder session locations, projected onto the sphere every frame by
   admin-globe.js — same lat/lon -> screen maths the landing globe uses for
   its (simulated, and NOT reused here — see the file header) note drops.
   Clicking one highlights its row in the "Sessions by location" list
   (2026-09-25), so this is a real <button> now, not decoration — sized to a
   24px hit target rather than the 10px dot itself, since a visitor-facing
   44px minimum would be excessive here but a 10px target would not. The dot
   and ring keep their original size and position, just re-centred inside the
   bigger box; `translate(-50%,-50%)` in admin-globe.js centres on the box's
   OWN size, so enlarging it needed no change there. */
.admin-globe__pin {
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.admin-globe__pin-dot {
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: var(--cta);
  box-shadow: 0 0 6px rgba(var(--cta-rgb), 0.8);
}

.admin-globe__pin-ring {
  position: absolute;
  inset: 1px;
  border-radius: 50%;
  border: 1px solid rgba(var(--cta-rgb), 0.6);
  animation: admin-pin-pulse 2.4s ease-out infinite;
}

@keyframes admin-pin-pulse {
  0%   { transform: scale(0.6); opacity: 0.8; }
  100% { transform: scale(1.8); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .admin-globe__pin-ring { animation: none; opacity: 0; }
}

.admin-globe__pin:focus-visible {
  outline: 2px solid var(--cta);
  outline-offset: 2px;
  border-radius: 50%;
}

/* The selected pin: a solid, non-fading ring instead of the pulsing one, so
   "this is the one you picked" reads as a held state, not another pulse
   among several. */
.admin-globe__pin.is-active .admin-globe__pin-dot {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9), 0 0 10px rgba(var(--cta-rgb), 1);
}

.admin-globe__pin.is-active .admin-globe__pin-ring {
  animation: none;
  opacity: 1;
  transform: scale(1.4);
  border-width: 2px;
}

/* The dotted connector between a selected row and its pin (2026-09-25).
   Positioned over the WHOLE `.admin-live` row, not inside either child,
   because the line has to cross from the list into the globe card — see
   admin.js for how x1/y1/x2/y2 are computed. `pointer-events: none` so the
   line, which can pass directly over either child, never steals a click
   meant for a row or a pin. Painting order alone (last in the DOM, no
   z-index needed) would put it on top of both positioned siblings; the
   explicit z-index just says so, for whoever edits this next. */
.admin-live__link {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 150ms ease;
}

.admin-live__link.is-active { opacity: 1; }

.admin-live__link-line {
  stroke: var(--cta);
  stroke-width: 1.5;
  stroke-dasharray: 3 5;
  stroke-linecap: round;
}

@media (prefers-reduced-motion: reduce) {
  .admin-live__link { transition: none; }
}

@media (max-width: 720px) {
  .admin-live { flex-direction: column; }
  .admin-live__side { flex: none; contain: none; }
  /* Stacked, the list has no globe beside it to match; cap it instead. */
  .admin-live__list { max-height: 320px; }
  /* The desktop fix above (`margin-left: auto`, flush right) is a ROW
     concern — it doesn't mean anything once .admin-live stacks into a single
     column, and left unscoped it would have shifted the globe from centred
     to flush-right here too (caught by re-measuring after the desktop edit,
     not assumed safe). Restored to centred, matching this breakpoint's
     original behaviour untouched. */
  .admin-globe { max-width: none; margin: 0 auto; }

  .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-main { padding: 24px 16px 48px; }
  .admin-note { flex-wrap: wrap; }
  .admin-note__expiry { order: 4; width: auto; text-align: left; }
  .admin-archive__when { order: 4; flex-basis: 100%; padding-left: 28px; text-align: left; }
  .admin-archive__more { padding-left: 16px; }
  .admin-archive__bar { flex-wrap: wrap; }
  .admin-genres__row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; }
  .admin-genres__track { grid-column: 1 / -1; grid-row: 2; }
  .admin-archive__search { flex-basis: 100%; }
  .admin-archive__more dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .admin-archive__more dd { margin-bottom: 8px; }

  /* THE HEADER WRAPS RATHER THAN SQUEEZING, below 720px. Back link, tabs and
     sign-out all fighting for one row is what clipped the Analytics label
     against the sign-out button on a phone — found on screen, not guessed:
     the sign-out button wrapped onto two lines first (its own text was never
     given room to shrink), which grew the header's height and covered the
     tabs' scrollable area rather than sharing the row with it. Two rows: the
     back link and sign-out stay put, the tabs get their own full-width row
     directly under them with room to scroll. */
  .admin-top {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 16px;
    gap: 8px 12px;
  }
  .admin-tabs {
    order: 3;
    flex-basis: 100%;
    height: 44px;
  }
  .admin-tabs__btn { height: 44px; }
  .admin-btn--ghost#adminSignOut { height: 36px; padding: 0 14px; font-size: 13px; }
}

/* The small explanation under "Total users" (2026-11-09). */
.admin-stat__hint {
  margin-top: 4px;
  font-size: 12px;
  line-height: 16px;
  color: rgba(255, 255, 255, 0.5);
}
