/* ============================================================
   PLAYER LIFECYCLE CRM — DESIGN SYSTEM
   Token reference for engineering handoff
   ============================================================

   Typography .......... Plus Jakarta Sans (Google Fonts)
   Staff accent ........ oklch(44% 0.22 268)  — deep indigo
   Player accent ....... oklch(60% 0.22 28)   — coral-orange
   Shared font scale ... 11 / 12 / 13 / 14 / 15 / 18 / 22 / 28px
   Radii ............... 4 / 8 / 12 / 16 / 100px
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
a { text-decoration: none; }
button, input, select, textarea {
  font-family: var(--font);
  font-size: inherit;
}

/* ── Design tokens ── */
:root {
  /* Typography */
  --font: 'Plus Jakarta Sans', system-ui, sans-serif;

  /* ── Spacing scale (4px base) ── */
  --s-1:  4px;
  --s-2:  8px;
  --s-3:  12px;
  --s-4:  16px;
  --s-5:  20px;
  --s-6:  24px;
  --s-8:  32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;

  /* ── Radii ── */
  --r-sm:   4px;
  --r-md:   8px;
  --r-lg:   12px;
  --r-xl:   16px;
  --r-pill: 100px;

  /* ── Staff palette ── */
  --staff-bg:            oklch(98.5% 0.003 268);
  --staff-surface:       oklch(100% 0 0);
  --staff-fg:            oklch(17% 0.018 268);
  --staff-muted:         oklch(52% 0.012 268);
  --staff-border:        oklch(91% 0.007 268);
  --staff-accent:        oklch(44% 0.22 268);
  --staff-accent-dim:    oklch(37% 0.22 268);
  --staff-accent-subtle: oklch(95% 0.014 268);
  --staff-accent-soft:   oklch(92% 0.020 268);

  /* Sidebar */
  --sidebar-bg:          oklch(15% 0.022 268);
  --sidebar-fg:          oklch(88% 0.006 268);
  --sidebar-muted:       oklch(62% 0.012 268);
  --sidebar-border:      oklch(24% 0.018 268);
  --sidebar-hover:       oklch(22% 0.020 268);
  --sidebar-active:      oklch(28% 0.025 268);

  /* ── Player palette ── */
  --player-bg:           oklch(98% 0.012 55);
  --player-surface:      oklch(100% 0 0);
  --player-fg:           oklch(21% 0.022 50);
  --player-muted:        oklch(54% 0.016 50);
  --player-border:       oklch(90% 0.015 55);
  --player-accent:       oklch(60% 0.22 28);
  --player-accent-dim:   oklch(53% 0.22 28);
  --player-accent-subtle:oklch(96% 0.020 28);
  --player-accent-soft:  oklch(94% 0.028 28);

  /* ── Status pill tokens ── */
  --pill-prospect-bg:          oklch(94% 0.009 268);
  --pill-prospect-fg:          oklch(40% 0.15 268);

  --pill-firstsession-bg:      oklch(96% 0.018 82);
  --pill-firstsession-fg:      oklch(42% 0.18 78);

  --pill-rookie-bg:             oklch(93% 0.015 268);
  --pill-rookie-fg:             oklch(36% 0.22 268);

  --pill-rookiecompleted-bg:    oklch(44% 0.22 268);
  --pill-rookiecompleted-fg:    oklch(99% 0 0);

  --pill-active-bg:             oklch(93% 0.013 148);
  --pill-active-fg:             oklch(35% 0.16 148);

  --pill-inactive-bg:           oklch(93% 0.004 268);
  --pill-inactive-fg:           oklch(50% 0.008 268);

  /* ── Alert / urgency tokens ── */
  --alert-critical:        oklch(50% 0.22 22);
  --alert-critical-subtle: oklch(96.5% 0.018 22);
  --alert-critical-border: oklch(82% 0.12 22);

  --alert-warning:         oklch(55% 0.17 80);
  --alert-warning-subtle:  oklch(97% 0.016 80);
  --alert-warning-border:  oklch(84% 0.14 80);

  --alert-notice:          oklch(58% 0.14 90);
  --alert-notice-subtle:   oklch(97% 0.012 90);
  --alert-notice-border:   oklch(86% 0.12 90);
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   STATUS PILLS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  padding: 2px var(--s-3);
  border-radius: var(--r-pill);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.025em;
  white-space: nowrap;
  line-height: 1.6;
}
.pill::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}

.pill-prospect        { background: var(--pill-prospect-bg);       color: var(--pill-prospect-fg); }
.pill-firstsession    { background: var(--pill-firstsession-bg);   color: var(--pill-firstsession-fg); }
.pill-rookie          { background: var(--pill-rookie-bg);         color: var(--pill-rookie-fg); }
.pill-rookie-completed {
  background: var(--pill-rookiecompleted-bg);
  color: var(--pill-rookiecompleted-fg);
  box-shadow: 0 0 0 2px oklch(44% 0.22 268 / 0.25);
}
.pill-rookie-completed::before { opacity: 1; animation: blink 1.6s ease-in-out infinite; }
.pill-active          { background: var(--pill-active-bg);         color: var(--pill-active-fg); }
.pill-inactive        { background: var(--pill-inactive-bg);       color: var(--pill-inactive-fg); }

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   BUTTONS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-4);
  border-radius: var(--r-md);
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.12s ease, box-shadow 0.12s ease, transform 0.08s ease;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
  height: 34px;
}
.btn:active { transform: scale(0.98); }

.btn-sm  { height: 28px; font-size: 12.5px; padding: var(--s-1) var(--s-3); }
.btn-lg  { height: 44px; font-size: 15px;   padding: var(--s-3) var(--s-6); border-radius: var(--r-lg); }
.btn-xl  { height: 52px; font-size: 16px;   padding: var(--s-3) var(--s-8); border-radius: var(--r-lg); }

.btn-primary {
  background: var(--staff-accent);
  color: #fff;
  box-shadow: 0 1px 3px oklch(44% 0.22 268 / 0.3);
}
.btn-primary:hover {
  background: var(--staff-accent-dim);
  box-shadow: 0 2px 8px oklch(44% 0.22 268 / 0.4);
}

.btn-player {
  background: var(--player-accent);
  color: #fff;
  box-shadow: 0 1px 3px oklch(60% 0.22 28 / 0.3);
}
.btn-player:hover {
  background: var(--player-accent-dim);
  box-shadow: 0 2px 8px oklch(60% 0.22 28 / 0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--staff-muted);
  border: 1px solid var(--staff-border);
}
.btn-ghost:hover {
  background: var(--staff-accent-subtle);
  color: var(--staff-accent);
  border-color: var(--staff-accent-soft);
}

.btn-danger {
  background: var(--alert-critical);
  color: #fff;
}

.btn-link {
  background: none;
  border: none;
  color: var(--staff-accent);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  height: auto;
  text-decoration: underline;
  text-underline-offset: 2px;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   AVATAR
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--staff-accent);
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: 0.01em;
}
.avatar-sm  { width: 28px; height: 28px; font-size: 10.5px; }
.avatar-md  { width: 36px; height: 36px; font-size: 13px; }
.avatar-lg  { width: 44px; height: 44px; font-size: 16px; }
.avatar-xl  { width: 56px; height: 56px; font-size: 20px; }
.avatar-2xl { width: 72px; height: 72px; font-size: 26px; }


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   STAFF SIDEBAR (shared across staff screens)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: 240px;
  height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--sidebar-border);
  z-index: 10;
  overflow-y: auto;
}

.sidebar-brand {
  padding: var(--s-5) var(--s-5);
  border-bottom: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.sidebar-mark {
  width: 32px; height: 32px;
  background: var(--staff-accent);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800; color: #fff;
  flex-shrink: 0;
}

.sidebar-wordmark {
  display: flex; flex-direction: column;
}

.sidebar-wordmark strong {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--sidebar-fg);
  line-height: 1.2;
}

.sidebar-wordmark span {
  font-size: 9.5px;
  font-weight: 500;
  color: var(--sidebar-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.sidebar-nav {
  flex: 1;
  padding: var(--s-3) var(--s-2);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-section-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--sidebar-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: var(--s-3) var(--s-3) var(--s-1);
  margin-top: var(--s-2);
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-md);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--sidebar-muted);
  text-decoration: none;
  transition: background 0.1s, color 0.1s;
  position: relative;
}

.sidebar-item:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-fg);
}

.sidebar-item.active {
  background: var(--sidebar-active);
  color: #fff;
  font-weight: 600;
}

.sidebar-item svg { flex-shrink: 0; opacity: 0.8; }
.sidebar-item.active svg { opacity: 1; }

.sidebar-badge {
  margin-left: auto;
  background: var(--alert-critical);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--r-pill);
  min-width: 18px;
  text-align: center;
  line-height: 1.6;
}

.sidebar-footer {
  padding: var(--s-4) var(--s-3);
  border-top: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.sidebar-user-info strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--sidebar-fg);
  line-height: 1.2;
}

.sidebar-user-info span {
  font-size: 11px;
  color: var(--sidebar-muted);
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   STAFF LAYOUT
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.staff-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  background: var(--staff-bg);
}

.staff-main {
  grid-column: 2;
  min-height: 100vh;
  background: var(--staff-bg);
}

.staff-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--staff-bg);
  border-bottom: 1px solid var(--staff-border);
  padding: 0 var(--s-8);
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
}

.staff-topbar-search {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  background: var(--staff-surface);
  border: 1px solid var(--staff-border);
  border-radius: var(--r-md);
  padding: var(--s-2) var(--s-3);
  font-size: 13px;
  color: var(--staff-muted);
  width: 220px;
  cursor: text;
}

.staff-content {
  padding: var(--s-8);
  max-width: 1100px;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CARD
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.card {
  background: var(--staff-surface);
  border: 1px solid var(--staff-border);
  border-radius: var(--r-lg);
}

.card-header {
  padding: var(--s-4) var(--s-6);
  border-bottom: 1px solid var(--staff-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
}

.card-body { padding: var(--s-4) var(--s-6); }
.card-body-sm { padding: var(--s-3) var(--s-4); }

.section-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--staff-muted);
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TYPOGRAPHY HELPERS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.t-xs   { font-size: 11px; }
.t-sm   { font-size: 12.5px; }
.t-base { font-size: 14px; }
.t-md   { font-size: 15px; }
.t-lg   { font-size: 18px; }
.t-xl   { font-size: 22px; }
.t-2xl  { font-size: 28px; }
.t-3xl  { font-size: 36px; }

.fw-400 { font-weight: 400; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

.muted  { color: var(--staff-muted); }
.muted-player { color: var(--player-muted); }

/* ── Mono numerics ── */
.tabnum { font-variant-numeric: tabular-nums; }


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   LAYOUT UTILITIES
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.flex         { display: flex; }
.flex-col     { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-1 { gap: var(--s-1); }
.gap-2 { gap: var(--s-2); }
.gap-3 { gap: var(--s-3); }
.gap-4 { gap: var(--s-4); }
.gap-6 { gap: var(--s-6); }
.gap-8 { gap: var(--s-8); }
.ml-auto { margin-left: auto; }
.mt-4 { margin-top: var(--s-4); }
.mt-6 { margin-top: var(--s-6); }
.mt-8 { margin-top: var(--s-8); }
.mt-2 { margin-top: var(--s-2); }
