/* ── scott-theme.css ─────────────────────────────────────────────────────
 *
 * Layered tenant theme — flips the Launchpad admin shell from
 * cagerace's dark palette to scott's white floor + Bondi nav + Ink text.
 * Brett-locked 2026-05-29.
 *
 * Approach:
 *   - Hijack the existing CSS custom properties in admin.css (--dark,
 *     --white, --dark-card, --border, --text-dim etc.) under a
 *     `body[data-tenant="scottwagner"]` scope. Every component that
 *     reads those tokens flips automatically — no need to find/replace
 *     hundreds of rules.
 *   - Hard-override the few places that don't use vars (.topbar uses
 *     raw rgba(0,0,0,0.85); .lp-nav::after uses raw #FF0000).
 *
 * Discipline:
 *   - No !important anywhere. Specificity comes from the
 *     `body[data-tenant=…]` parent selector.
 *   - Trace scott's existing public palette (Bondi #007f86, Saffron
 *     #d9763d, Ink #0c2126) — no invented colors.
 *   - Brett asked for THREE changes (white floor, Bondi nav, Ink
 *     text). The card/border/text-dim flips below are consequence,
 *     not scope-creep — without them, cagerace's #161A21 cards would
 *     vanish on a white floor.
 *
 * Known follow-ons (separate iterations):
 *   - Status pills (.pill--live, .pill--building etc.) use dark-tinted
 *     backgrounds that look anaemic on white. Need a colour pass.
 *   - The CREATE > Timeline Window Text Boxes panel has its own dark
 *     theme (admin/css/timeline-editor.css) that survives this flip —
 *     deliberately scoped, will need a parallel light pass when ready.
 *   - Form input fields (#0a0a0e dark bg) inside panels will look
 *     wrong on white; need a per-input override pass.
 * ─────────────────────────────────────────────────────────────────────── */

body[data-tenant="scottwagner"] {
  /* Floor — white instead of #0E1116. */
  --dark:       #FFFFFF;
  /* Raised surfaces — soft cool grey, reads as scott's brand neutral. */
  --dark-card:  #F4F6F8;
  --dark-hover: #E8ECF0;

  /* Body text — Ink (scott's brand dark) instead of #FFFFFF. */
  --white:       #0c2126;

  /* Borders + dimmed text — flipped to ink-on-light tints so they
   * survive the contrast inversion. */
  --border:       rgba(12,33,38,0.12);
  --border-light: rgba(12,33,38,0.25);
  --text-dim:     rgba(12,33,38,0.65);
  --text-dimmer:  rgba(12,33,38,0.4);

  /* Direct background + color override — beats the launchpadShell inline
   * `html, body { background: #000; color: #f0f0f0 }` rule on the
   * CRM pages (sales-athletes.js ~line 3746). That rule uses LITERAL #000
   * not var(--dark), so the var swap above doesn't reach it; the
   * body[data-tenant=…] specificity (0,0,1,1) beats plain `body` (0,0,0,1)
   * and the source order (scott-theme.css loads last) seals it. */
  background: var(--dark);
  color: var(--white);
}

/* Topbar — Bondi instead of rgba(0,0,0,0.85). The backdrop-blur stays
 * (reads as a glass plate over whatever the body shows beneath). */
body[data-tenant="scottwagner"] .topbar {
  background: rgba(0,127,134,0.95);
  border-bottom: 1px solid rgba(255,255,255,0.22);
}

/* Nav text on Bondi nav — keep white so the menu reads at first glance. */
body[data-tenant="scottwagner"] .topbar,
body[data-tenant="scottwagner"] .topbar .lp-nav-item,
body[data-tenant="scottwagner"] .topbar .topbar-logo,
body[data-tenant="scottwagner"] .topbar .topbar-brand,
body[data-tenant="scottwagner"] .topbar .topbar-version {
  color: #FFFFFF;
}

/* Speed-blur line under the nav — was solid red (#FF0000) on a black bar,
 * needs to become Saffron on the Bondi bar (red on Bondi clashes). Same
 * gradient shape + glow, only the colour swaps. */
body[data-tenant="scottwagner"] .lp-nav::after {
  background: linear-gradient(to right,
    #d9763d 0%,
    #d9763d 60%,
    rgba(217,118,61,0.55) 82%,
    transparent 100%);
  box-shadow: 0 0 6px rgba(217,118,61,0.55), 0 0 14px rgba(217,118,61,0.25);
}

/* ──────────────────────────────────────────────────────────────────────────
 * CRM page surfaces — overrides for hardcoded dark values that survived the
 * var-based flip. Brett-locked 2026-05-29.
 *
 * Two layers of CSS hit these pages:
 *   1. admin/launchpad-shell.css — .roster-row / .reg-card / .sa-col-head
 *      / .pill use raw hex (#000, #1a1a1a, #fff, rgba(255,255,255,0.02))
 *      not vars.
 *   2. Inline CONTACTS_STYLES (sales-contacts.js ~line 154) — .chip /
 *      table chrome / .t-mono / .t-dim use raw hex inline.
 *
 * Overrides below scope to body[data-tenant="scottwagner"] for specificity
 * — beats single-class selectors regardless of source order.
 * ────────────────────────────────────────────────────────────────────────── */

/* Column heads — sticky black-on-black bar becomes white-on-white. */
body[data-tenant="scottwagner"] .sa-col-head {
  background: var(--dark);
  border-bottom-color: var(--border);
}

/* Roster rows — text was white-on-dark, becomes Ink-on-light. */
body[data-tenant="scottwagner"] .roster-row {
  background: rgba(12,33,38,0.03);
  border-color: transparent;
}
body[data-tenant="scottwagner"] .roster-row:hover {
  background: rgba(0,127,134,0.06);
  border-color: rgba(0,127,134,0.25);
}
body[data-tenant="scottwagner"] .roster-row.is-active {
  background: rgba(0,127,134,0.08);
  border-color: rgba(0,127,134,0.45);
}
body[data-tenant="scottwagner"] .roster-row .rr-name { color: var(--white); }
body[data-tenant="scottwagner"] .roster-row .rr-meta { color: var(--text-dim); }
body[data-tenant="scottwagner"] .roster-row .rr-meter-track {
  background: rgba(12,33,38,0.08);
}
body[data-tenant="scottwagner"] .roster-row .rr-meter-pct { color: var(--text-dim); }

/* Registration cards — dark card becomes raised light surface, red rail
 * becomes Bondi rail (we'll iterate to Saffron if Brett wants the alert
 * shade kept; Bondi is the safer brand-aligned default). */
body[data-tenant="scottwagner"] .reg-card {
  background: var(--dark-card);
  border-color: var(--border);
  border-left-color: var(--bondi, #007f86);
}
body[data-tenant="scottwagner"] .reg-name { color: var(--white); }
body[data-tenant="scottwagner"] .reg-meta { color: var(--text-dim); }
body[data-tenant="scottwagner"] .reg-when,
body[data-tenant="scottwagner"] .reg-type { color: var(--text-dimmer); }

/* Filter chips (sales-contacts.js CONTACTS_STYLES) — invisible on white. */
body[data-tenant="scottwagner"] .chip {
  color: var(--text-dim);
  border-color: rgba(12,33,38,0.18);
}
body[data-tenant="scottwagner"] .chip:hover {
  color: var(--white);
  border-color: rgba(0,127,134,0.55);
}
body[data-tenant="scottwagner"] .chip--active {
  /* Keep the glass-tube treatment, just swap red gel for Bondi gel so the
   * active chip reads as scott-brand. Same shape + sheen + soft glow. */
  background: linear-gradient(180deg,
    rgba(120, 200, 200, 0.16) 0%,
    rgba(0,   127, 134, 0.30) 50%,
    rgba(0,    80,  90, 0.28) 100%);
  border-color: rgba(0, 127, 134, 0.55);
  color: #FFFFFF;
  box-shadow:
    inset 0 1px 0    rgba(255, 255, 255, 0.22),
    inset 0 -1px 1px rgba(0,   0,   0,   0.25),
    0 0 6px          rgba(0, 127, 134, 0.18);
}

/* Contacts table chrome — invisible text on white. */
body[data-tenant="scottwagner"] thead th {
  color: rgba(12,33,38,0.6);
  background: #F4F6F8;
  border-bottom-color: var(--border);
}
body[data-tenant="scottwagner"] tbody td {
  color: var(--white);
  border-bottom-color: var(--border);
}
body[data-tenant="scottwagner"] tbody tr:hover td {
  background: rgba(0,127,134,0.04);
}
body[data-tenant="scottwagner"] tbody tr:hover td:first-child {
  box-shadow: inset 2px 0 0 var(--bondi, #007f86);
}
body[data-tenant="scottwagner"] tbody td a {
  color: var(--white);
  border-bottom: 1px dotted rgba(12,33,38,0.25);
}
body[data-tenant="scottwagner"] tbody td a:hover {
  color: var(--bondi, #007f86);
  border-color: var(--bondi, #007f86);
}

/* t-mono + t-dim — mono numbers + dim text fine in mid-grey on either floor,
 * but pull toward Ink-tinted so they read as part of scott's palette. */
body[data-tenant="scottwagner"] .t-mono { color: var(--text-dim); }
body[data-tenant="scottwagner"] .t-dim  { color: var(--text-dim); }
