/* ============================================================
   ORYX Football Academy - ADMIN DASHBOARD
   Desktop-first design system
   ============================================================ */

:root {
  --sidebar-w: 240px;
  --topbar-h:  68px;
  --admin-bg-0: #050507;
  --admin-bg-1: #0a0a0c;
  --admin-bg-2: #101014;
  --admin-bg-3: #16161c;
  --admin-bg-4: #1d1d24;
}

.admin-shell {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(226,175,51,0.06), transparent 60%),
    radial-gradient(800px 400px at 0% 100%, rgba(220,38,38,0.04), transparent 60%),
    var(--admin-bg-0);
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  color: var(--text-1);
}

/* ─── SIDEBAR ────────────────────────────────────────── */
.sidebar {
  background: var(--admin-bg-1);
  border-right: 1px solid var(--border-1);
  display: flex;
  flex-direction: column;
  position: sticky; top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 18px;
  border-bottom: 1px solid var(--border-1);
}
.sidebar-brand .logo {
  width: 40px; height: 40px;
  background: url('/static/oryx-logo.png') center/contain no-repeat;
  flex-shrink: 0;
}
.sidebar-brand .name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
}
.sidebar-brand .sub {
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-4);
  margin-top: 4px;
  font-weight: 600;
}

.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-1);
}
.sidebar-user .avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--admin-bg-3) center/cover no-repeat;
  border: 1px solid var(--border-2);
  flex-shrink: 0;
}
.sidebar-user .who { flex: 1; min-width: 0; }
.sidebar-user .who-name { font-size: 13px; font-weight: 600; }
.sidebar-user .who-role { font-size: 11px; color: var(--text-4); }
.sidebar-user .chev { color: var(--text-4); font-size: 10px; }

.nav-list {
  padding: 12px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
  transition: all .15s;
  position: relative;
}
.nav-item i { width: 18px; text-align: center; font-size: 14px; }
.nav-item:hover { background: rgba(255,255,255,0.04); color: var(--text-1); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(226,175,51,0.18), rgba(226,175,51,0.04));
  color: var(--oryx-green-bright);
  font-weight: 600;
}
.nav-item.active::before {
  content: '';
  position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--oryx-green-bright);
  box-shadow: 0 0 12px var(--oryx-green-bright);
}
.nav-item.danger { color: var(--oryx-red-bright); }
.nav-item.danger:hover { background: rgba(239,68,68,0.10); }

.nav-section {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-5);
  padding: 14px 12px 6px;
  font-weight: 700;
}

/* ─── MAIN ───────────────────────────────────────────── */
.admin-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  height: var(--topbar-h);
  border-bottom: 1px solid var(--border-1);
  display: flex; align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky; top: 0;
  background: rgba(10,10,12,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 50;
}
.admin-topbar .page-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  flex: 1;
}
.admin-topbar .breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px;
  color: var(--text-4);
}
.admin-topbar .breadcrumb b { color: var(--text-1); font-weight: 600; }

.admin-search {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  background: var(--admin-bg-2);
  border: 1px solid var(--border-1);
  border-radius: 10px;
  width: 280px;
}
.admin-search input {
  flex: 1;
  background: transparent;
  border: none; outline: none;
  color: var(--text-1);
  font-size: 13px;
}
.admin-search input::placeholder { color: var(--text-4); }
.admin-search i { color: var(--text-4); font-size: 13px; }

.topbar-icon {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--admin-bg-2);
  border: 1px solid var(--border-1);
  color: var(--text-2);
  position: relative;
  font-size: 14px;
  cursor: pointer;
  transition: all .2s;
}
.topbar-icon:hover { background: var(--admin-bg-3); color: var(--text-1); }
.topbar-icon .bdg {
  position: absolute; top: 8px; right: 9px;
  width: 8px; height: 8px;
  background: var(--oryx-green-bright);
  border: 2px solid var(--admin-bg-2);
  border-radius: 50%;
}

.admin-content {
  padding: 24px 28px 60px;
  max-width: 100%;
}

/* ─── CARDS ─────────────────────────────────────────── */
.card {
  background: var(--admin-bg-2);
  border: 1px solid var(--border-1);
  border-radius: 16px;
  padding: 20px;
  position: relative;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.card-head h3 { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.card-head .actions { display: flex; gap: 8px; }

.btn-icon-sm {
  padding: 6px 10px;
  background: var(--admin-bg-3);
  border: 1px solid var(--border-1);
  border-radius: 8px;
  font-size: 12px; font-weight: 600;
  color: var(--text-2);
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer;
  transition: all .15s;
}
.btn-icon-sm:hover { background: var(--admin-bg-4); color: var(--text-1); }
.btn-icon-sm.primary {
  background: rgba(226,175,51,0.15);
  border-color: rgba(226,175,51,0.30);
  color: var(--oryx-green-bright);
}
.btn-icon-sm.primary:hover { background: rgba(226,175,51,0.22); }

/* ─── KPI GRID (Dashboard) ──────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.kpi {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.02), transparent),
    var(--admin-bg-2);
  border: 1px solid var(--border-1);
  border-radius: 16px;
  padding: 18px;
  position: relative;
  overflow: hidden;
}
.kpi::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 100px; height: 100px;
  background: radial-gradient(circle at top right, var(--kpi-glow, rgba(226,175,51,0.12)), transparent 60%);
  pointer-events: none;
}
.kpi .kpi-label {
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-4);
  font-weight: 700;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.kpi .kpi-icon {
  width: 32px; height: 32px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: var(--admin-bg-3);
  font-size: 14px;
}
.kpi .kpi-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 32px; font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}
.kpi .kpi-sub {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-3);
  display: flex; align-items: center; gap: 6px;
}
.kpi .kpi-sub .delta { color: var(--oryx-green-bright); font-weight: 600; }
.kpi .kpi-sub .delta.down { color: var(--oryx-red-bright); }

.kpi.green { --kpi-glow: rgba(226,175,51,0.18); }
.kpi.green .kpi-icon { background: rgba(226,175,51,0.12); color: var(--oryx-green-bright); }
.kpi.blue  { --kpi-glow: rgba(59,130,246,0.18); }
.kpi.blue  .kpi-icon { background: rgba(59,130,246,0.12); color: #60a5fa; }
.kpi.amber { --kpi-glow: rgba(245,158,11,0.18); }
.kpi.amber .kpi-icon { background: rgba(245,158,11,0.12); color: #fbbf24; }
.kpi.red   { --kpi-glow: rgba(239,68,68,0.18); }
.kpi.red   .kpi-icon { background: rgba(239,68,68,0.12); color: var(--oryx-red-bright); }
.kpi.purple { --kpi-glow: rgba(168,85,247,0.18); }
.kpi.purple .kpi-icon { background: rgba(168,85,247,0.12); color: #c084fc; }

/* ─── DASHBOARD GRID ─────────────────────────────────── */
.dash-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 1100px) {
  .dash-grid { grid-template-columns: 1fr; }
}

.activity-list { display: flex; flex-direction: column; gap: 12px; }
.activity-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px;
  border-radius: 10px;
  transition: background .2s;
}
.activity-row:hover { background: rgba(255,255,255,0.02); }
.activity-icon {
  width: 32px; height: 32px;
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 13px;
  flex-shrink: 0;
}
.activity-icon.green { background: rgba(226,175,51,0.12); color: var(--oryx-green-bright); }
.activity-icon.blue  { background: rgba(59,130,246,0.12); color: #60a5fa; }
.activity-icon.amber { background: rgba(245,158,11,0.12); color: #fbbf24; }
.activity-icon.red   { background: rgba(239,68,68,0.12); color: var(--oryx-red-bright); }
.activity-body { flex: 1; min-width: 0; }
.activity-text { font-size: 13px; color: var(--text-2); }
.activity-time { font-size: 11px; color: var(--text-4); margin-top: 3px; }

/* ─── TABLES ─────────────────────────────────────────── */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-4);
  font-weight: 700;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-1);
}
.table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--border-1);
  color: var(--text-2);
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: rgba(255,255,255,0.02); }
.table .player-cell {
  display: flex; align-items: center; gap: 10px;
}
.table .player-cell .av {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--admin-bg-3) center/cover no-repeat;
  flex-shrink: 0;
  border: 1px solid var(--border-1);
}
.table .player-cell .meta { min-width: 0; }
.table .player-cell .name { font-size: 13px; font-weight: 600; color: var(--text-1); }
.table .player-cell .sub  { font-size: 11px; color: var(--text-4); }

/* Wrap tables horizontally on small screens to avoid overflow off the phone frame */
.card { overflow-x: hidden; }
.card > .table-wrap,
.card > .table { max-width: 100%; }

/* Mobile-first: collapse data tables into stacked cards on narrow screens */
@media (max-width: 640px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr {
    background: var(--admin-bg-2);
    border: 1px solid var(--border-1);
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 10px;
    box-sizing: border-box;
    overflow: hidden;
  }
  .table tr:hover td { background: transparent; }
  .table td {
    border-bottom: 1px dashed var(--border-1);
    padding: 8px 0;
    text-align: left !important;
    white-space: normal !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
  }
  .table td:last-child { border-bottom: none; }
  .table td::before {
    content: attr(data-label);
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-4);
    font-weight: 700;
    flex: 0 0 auto;
  }
  .table td .player-cell { width: 100%; }
  .table td.actions-cell { flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
  .table td.actions-cell .btn-icon-sm { padding: 5px 8px; font-size: 11px; }
}

.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.pill.present { background: rgba(226,175,51,0.15); color: var(--oryx-green-bright); }
.pill.absent  { background: rgba(239,68,68,0.15); color: var(--oryx-red-bright); }
.pill.late    { background: rgba(245,158,11,0.15); color: #fbbf24; }
.pill.paid    { background: rgba(226,175,51,0.15); color: var(--oryx-green-bright); }
.pill.pending { background: rgba(245,158,11,0.15); color: #fbbf24; }
.pill.overdue { background: rgba(239,68,68,0.15); color: var(--oryx-red-bright); }

/* ─── MATCH CARDS ────────────────────────────────────── */
.match-tabs {
  display: flex; gap: 4px;
  border-bottom: 1px solid var(--border-1);
  margin-bottom: 16px;
}
.match-tabs .mt {
  padding: 12px 4px;
  margin-right: 24px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-4);
  cursor: pointer;
  position: relative;
}
.match-tabs .mt.active { color: var(--text-1); }
.match-tabs .mt.active::after {
  content: '';
  position: absolute; bottom: -1px; left: 0; right: 0;
  height: 2px;
  background: var(--oryx-green-bright);
  border-radius: 2px;
  box-shadow: 0 0 10px var(--oryx-green-bright);
}

.match-card {
  background:
    linear-gradient(135deg, rgba(226,175,51,0.06), transparent 60%),
    var(--admin-bg-2);
  border: 1px solid var(--border-1);
  border-radius: 14px;
  padding: 14px;
  display: flex; align-items: center; gap: 12px;
  transition: all .2s;
  cursor: pointer;
  margin-bottom: 12px;
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
}
.match-card:hover { border-color: rgba(226,175,51,0.30); transform: translateY(-1px); }
.match-card .vs {
  display: flex; align-items: center; gap: 12px;
  flex: 1;
}
.team-badge {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--admin-bg-3);
  display: grid; place-items: center;
  flex-shrink: 0;
  border: 1px solid var(--border-2);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.02em;
  color: var(--text-1);
}
.team-badge.oryx { background: url('/static/oryx-logo.png') center/contain no-repeat var(--admin-bg-1); border: none; }
.match-vs-text { font-size: 11px; color: var(--text-4); font-weight: 700; letter-spacing: 0.1em; }
.match-card .vs { flex: 0 0 auto; }
.match-info { flex: 1 1 0; min-width: 0; overflow: hidden; }
.match-teams {
  font-size: 14px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.match-meta {
  font-size: 12px; color: var(--text-3);
  margin-top: 4px;
  display: flex; gap: 10px; flex-wrap: wrap;
}
.match-meta > span {
  display: inline-flex; align-items: center;
  white-space: nowrap; min-width: 0;
}
.match-meta i { color: var(--oryx-green-bright); margin-right: 4px; }

/* Action button (Manage / Build Squad) on a match-card row. */
.match-card > .btn-icon-sm,
.match-card > a.btn-icon-sm {
  flex: 0 0 auto;
  align-self: center;
  margin-left: 8px;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.2;
  border-radius: 8px;
  justify-content: center;
  white-space: nowrap;
}
.match-card > .btn-icon-sm i,
.match-card > a.btn-icon-sm i { font-size: 11px; margin-right: 4px; }

/* Narrow phones: shrink badges and hide button text — icon only. */
@media (max-width: 480px) {
  .match-card { padding: 12px; gap: 10px; }
  .match-card .vs { gap: 8px; }
  .match-card .team-badge { width: 36px; height: 36px; font-size: 12px; }
  .match-card .match-vs-text { font-size: 10px; }
  .match-card > .btn-icon-sm,
  .match-card > a.btn-icon-sm {
    padding: 6px 8px;
    margin-left: 6px;
    font-size: 0;
  }
  .match-card > .btn-icon-sm i,
  .match-card > a.btn-icon-sm i {
    font-size: 14px; margin-right: 0;
  }
}
.match-score {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px; font-weight: 800;
  padding: 6px 14px;
  border-radius: 10px;
  letter-spacing: 0.04em;
}
.match-score.won  { background: rgba(226,175,51,0.15); color: var(--oryx-green-bright); }
.match-score.draw { background: rgba(245,158,11,0.15); color: #fbbf24; }
.match-score.lost { background: rgba(239,68,68,0.15); color: var(--oryx-red-bright); }

/* ─── FOOTBALL PITCH (LINEUP) ─────────────────────────── */
.pitch-wrap {
  background:
    radial-gradient(ellipse at center, rgba(226,175,51,0.10), transparent 70%),
    linear-gradient(180deg, #0d1f12 0%, #06120a 100%);
  border: 1px solid rgba(226,175,51,0.18);
  border-radius: 16px;
  padding: 18px;
  position: relative;
  overflow: hidden;
}
.pitch {
  position: relative;
  aspect-ratio: 3 / 4;
  background:
    repeating-linear-gradient(0deg,
      rgba(255,255,255,0.025) 0,
      rgba(255,255,255,0.025) 28px,
      rgba(255,255,255,0.05)  28px,
      rgba(255,255,255,0.05)  56px);
  border: 2px solid rgba(255,255,255,0.18);
  border-radius: 8px;
}
.pitch::before, .pitch::after, .pitch-mid, .pitch-circle {
  content: '';
  position: absolute;
  pointer-events: none;
}
.pitch::before { /* halfway line */
  top: 50%; left: 0; right: 0;
  height: 2px;
  background: rgba(255,255,255,0.18);
}
.pitch-circle {
  top: 50%; left: 50%;
  width: 80px; height: 80px;
  border: 2px solid rgba(255,255,255,0.18);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.pitch-circle::after {
  content: '';
  position: absolute; top: 50%; left: 50%;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.30);
  transform: translate(-50%, -50%);
}
.pitch-box-top, .pitch-box-bottom {
  position: absolute;
  left: 22%; right: 22%;
  height: 14%;
  border: 2px solid rgba(255,255,255,0.18);
  pointer-events: none;
}
.pitch-box-top    { top: 0; border-top: none; }
.pitch-box-bottom { bottom: 0; border-bottom: none; }
.pitch-goal-top, .pitch-goal-bottom {
  position: absolute;
  left: 36%; right: 36%;
  height: 6%;
  border: 2px solid rgba(255,255,255,0.18);
}
.pitch-goal-top    { top: 0; border-top: none; }
.pitch-goal-bottom { bottom: 0; border-bottom: none; }

.player-token {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: grab;
  transition: transform .2s;
}
.player-token:hover { transform: translate(-50%, -50%) scale(1.08); }
.player-token .av {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--admin-bg-3) center/cover no-repeat;
  border: 2px solid var(--oryx-green-bright);
  box-shadow: 0 0 16px rgba(226,175,51,0.4), 0 4px 12px rgba(0,0,0,0.5);
}
.player-token .nm {
  font-size: 10px;
  font-weight: 700;
  background: rgba(0,0,0,0.6);
  padding: 2px 6px;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid rgba(226,175,51,0.30);
  letter-spacing: 0.02em;
}

.formation-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: rgba(226,175,51,0.12);
  border: 1px solid rgba(226,175,51,0.30);
  border-radius: 999px;
  font-size: 12px; font-weight: 700;
  color: var(--oryx-green-bright);
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: 0.04em;
}

/* Substitutes row */
.subs-row {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-1);
}
.subs-row .label {
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-4);
  font-weight: 700;
  margin-bottom: 12px;
}
.subs-list {
  display: flex; gap: 14px; flex-wrap: wrap;
}
.sub-token {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.sub-token .av {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--admin-bg-3) center/cover no-repeat;
  border: 1px solid var(--border-2);
}
.sub-token .nm { font-size: 11px; color: var(--text-3); font-weight: 600; }

/* ─── PLAYER PICKER (Add Players panel) ──────────────── */
.picker-search {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--admin-bg-3);
  border: 1px solid var(--border-1);
  border-radius: 10px;
  margin-bottom: 14px;
}
.picker-search input {
  flex: 1;
  background: transparent;
  border: none; outline: none;
  color: var(--text-1);
  font-size: 13px;
}

.picker-tabs {
  display: flex; gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.picker-tab {
  padding: 6px 12px;
  background: var(--admin-bg-3);
  border: 1px solid var(--border-1);
  border-radius: 999px;
  font-size: 11px; font-weight: 600;
  color: var(--text-3);
  cursor: pointer;
  transition: all .2s;
}
.picker-tab.active {
  background: rgba(226,175,51,0.15);
  color: var(--oryx-green-bright);
  border-color: rgba(226,175,51,0.30);
}

.picker-list { display: flex; flex-direction: column; gap: 8px; }
.picker-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  background: var(--admin-bg-3);
  border: 1px solid var(--border-1);
  border-radius: 10px;
  transition: all .15s;
}
.picker-row:hover { background: var(--admin-bg-4); }
.picker-row.selected { border-color: rgba(226,175,51,0.40); background: rgba(226,175,51,0.06); }
.picker-row .av {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--admin-bg-2) center/cover no-repeat;
  border: 1px solid var(--border-1);
  flex-shrink: 0;
}
.picker-row .who { flex: 1; min-width: 0; }
.picker-row .who-name { font-size: 13px; font-weight: 600; color: var(--text-1); }
.picker-row .who-pos  { font-size: 11px; color: var(--text-4); }
.picker-row .num {
  font-size: 11px; color: var(--text-4); font-weight: 700;
  margin-right: 8px;
}
.picker-row .add-btn {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(226,175,51,0.15);
  color: var(--oryx-green-bright);
  display: grid; place-items: center;
  font-size: 11px;
  cursor: pointer;
  border: 1px solid rgba(226,175,51,0.30);
}
.picker-row .add-btn:hover { background: rgba(226,175,51,0.25); }
.picker-row .remove-btn {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(239,68,68,0.15);
  color: var(--oryx-red-bright);
  display: grid; place-items: center;
  font-size: 11px;
  cursor: pointer;
  border: 1px solid rgba(239,68,68,0.30);
}

/* ─── ATTENDANCE SUMMARY DONUT ─────────────────────────── */
.att-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: center; }
.att-donut-wrap {
  position: relative;
  width: 160px; height: 160px;
  margin: 0 auto;
}
.att-donut-wrap canvas { position: absolute; inset: 0; }
.att-donut-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.att-donut-center .num { font-family: 'Space Grotesk', sans-serif; font-size: 32px; font-weight: 800; }
.att-donut-center .lbl { font-size: 11px; color: var(--text-4); }

.att-legend { display: flex; flex-direction: column; gap: 10px; }
.att-legend-item { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.att-legend-item .dot { width: 10px; height: 10px; border-radius: 3px; }
.att-legend-item .dot.green { background: var(--oryx-green-bright); }
.att-legend-item .dot.red   { background: var(--oryx-red-bright); }
.att-legend-item .dot.amber { background: #fbbf24; }
.att-legend-item .lbl { color: var(--text-3); flex: 1; }
.att-legend-item .num { font-weight: 700; }
.att-legend-item .pct { color: var(--text-4); font-size: 11px; margin-left: 6px; }

.att-history-list { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border-1); }
.att-history-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0;
  font-size: 12px;
}
.att-history-row .date { color: var(--text-3); }
.att-history-row .pct  { font-weight: 700; }

/* ─── TEAM ATTENDANCE BARS ─────────────────────────────── */
.team-bar { margin-bottom: 14px; }
.team-bar-top {
  display: flex; justify-content: space-between;
  font-size: 12px;
  margin-bottom: 6px;
}
.team-bar-top .team { font-weight: 600; color: var(--text-2); }
.team-bar-top .pct  { font-weight: 700; color: var(--text-1); }
.team-bar-track {
  height: 6px;
  background: rgba(255,255,255,0.04);
  border-radius: 3px;
  overflow: hidden;
}
.team-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--oryx-green-dim), var(--oryx-green-bright));
  border-radius: 3px;
  width: 0%;
  transition: width 1s cubic-bezier(.22,1,.36,1);
}

/* ─── REPORT HEADER (date range, export) ───────────────── */
.report-controls {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.range-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: var(--admin-bg-2);
  border: 1px solid var(--border-1);
  border-radius: 10px;
  font-size: 12px; font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
}
.range-pill i { color: var(--oryx-green-bright); }

.report-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.report-mini {
  background: var(--admin-bg-3);
  border: 1px solid var(--border-1);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}
.report-mini .num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px; font-weight: 800;
  letter-spacing: -0.02em;
}
.report-mini .lbl {
  font-size: 10px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-4);
  font-weight: 700;
  margin-top: 4px;
}

/* ─── SQUAD PICKER ─────────────────────────────────────── */
.squad-tabs {
  display: flex; gap: 4px;
  border-bottom: 1px solid var(--border-1);
  margin-bottom: 16px;
}
.squad-tabs .st {
  padding: 10px 4px;
  margin-right: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-4);
  cursor: pointer;
  position: relative;
}
.squad-tabs .st.active { color: var(--text-1); }
.squad-tabs .st.active::after {
  content: '';
  position: absolute; bottom: -1px; left: 0; right: 0;
  height: 2px;
  background: var(--oryx-green-bright);
  border-radius: 2px;
}

.match-detail-head {
  display: flex; align-items: center; justify-content: center; gap: 24px;
  padding: 16px 0 24px;
  border-bottom: 1px solid var(--border-1);
  margin-bottom: 16px;
}
.match-detail-team {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.match-detail-team .badge {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--admin-bg-3);
  display: grid; place-items: center;
  border: 1px solid var(--border-2);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
}
.match-detail-team .badge.oryx { background: url('/static/oryx-logo.png') center/contain no-repeat var(--admin-bg-1); border: none; }
.match-detail-team .nm { font-size: 13px; font-weight: 700; }
.match-detail-vs {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: var(--text-4);
  letter-spacing: 0.1em;
}
.match-detail-meta {
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
  margin-top: 8px;
}

/* ─── EMPTY / COMING SOON ─────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-4);
}
.empty-state i { font-size: 48px; margin-bottom: 16px; color: var(--text-5); }
.empty-state h3 { font-size: 18px; color: var(--text-2); margin-bottom: 6px; }
.empty-state p { font-size: 13px; }

/* ─── MOBILE SHRINK ────────────────────────────────────── */
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform .3s cubic-bezier(.22,1,.36,1);
    width: var(--sidebar-w);
    box-shadow: 0 0 60px rgba(0,0,0,0.6);
  }
  .sidebar.open { transform: translateX(0); }
  .admin-search { display: none; }
  .admin-content { padding: 16px; }
  .admin-topbar { padding: 0 16px; }
}

/* Burger button - only shown on mobile */
.burger {
  display: none;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--admin-bg-2);
  border: 1px solid var(--border-1);
  color: var(--text-1);
  align-items: center; justify-content: center;
  cursor: pointer;
}
@media (max-width: 900px) { .burger { display: flex; } }

/* Two-column layout */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 1100px) { .two-col { grid-template-columns: 1fr; } }
.three-col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}
@media (max-width: 1200px) { .three-col { grid-template-columns: 1fr; } }

/* ─── Phase 7: Match Create / Approvals / Squad Builder ──── */

.callout {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 10px;
  font-size: 12px; margin-bottom: 14px;
}
.callout-info {
  background: rgba(59,130,246,0.10);
  border: 1px solid rgba(59,130,246,0.35);
  color: #93c5fd;
}
.callout i { font-size: 13px; }

/* Form grid for match create */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  margin-bottom: 20px;
}
.form-field { display: flex; flex-direction: column; gap: 4px; }
.form-field-full { grid-column: 1 / -1; }
.form-field span {
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--text-3);
}
.form-field span em { color: #f87171; font-style: normal; margin-left: 2px; }
.form-field input,
.form-field select,
.form-field textarea {
  background: var(--bg-2);
  border: 1px solid var(--border-1);
  color: var(--text-1);
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  transition: border-color .15s, background .15s;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--oryx-green-bright, #E2AF33);
  background: var(--bg-3);
}
.form-field textarea { resize: vertical; min-height: 60px; }

.form-actions {
  display: flex; gap: 10px; justify-content: flex-end;
  margin-top: 16px;
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-1);
  color: var(--text-2);
}
.btn-ghost:hover { background: var(--bg-2); }
.btn-danger { color: #f87171; border-color: rgba(239,68,68,0.4); }
.btn-danger:hover { background: rgba(239,68,68,0.10); }

/* Picker section (match create) */
.picker-section {
  border: 1px solid var(--border-1);
  border-radius: 12px;
  padding: 14px;
  background: var(--bg-2);
  margin-top: 8px;
}
.picker-section-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 10px;
}
.picker-section-title { font-size: 14px; font-weight: 700; }
.picker-section-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.picker-section-actions { display: flex; gap: 6px; }
.picker-empty {
  padding: 16px; text-align: center; font-size: 12px;
  color: var(--text-3); font-style: italic;
}

/* Picker rows with checkbox (match create) */
.picker-list label.picker-row {
  display: grid;
  grid-template-columns: auto 36px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-3);
  border: 1px solid var(--border-1);
  border-radius: 8px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.picker-list label.picker-row:hover { border-color: var(--border-2); }
.picker-list label.picker-row:has(.mc-pick:checked) {
  border-color: rgba(226,175,51,0.5);
  background: rgba(226,175,51,0.08);
}
.picker-list .mc-pick {
  width: 16px; height: 16px;
  accent-color: var(--oryx-green-bright, #E2AF33);
}
.picker-list .av {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-2) center/cover no-repeat;
  border: 1px solid var(--border-1);
}

/* Approvals */
.approval-list { display: flex; flex-direction: column; gap: 10px; }
.approval-card {
  background: var(--bg-2);
  border: 1px solid var(--border-1);
  border-radius: 12px;
  padding: 14px 16px;
}
.approval-card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 8px;
}
.approval-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.approval-sub {
  display: flex; flex-wrap: wrap; gap: 12px;
  font-size: 11px; color: var(--text-3);
}
.approval-sub i { margin-right: 4px; opacity: 0.7; }
.approval-badge {
  padding: 4px 10px; border-radius: 999px;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.approval-badge.type-match {
  background: rgba(226,175,51,0.15);
  border: 1px solid rgba(226,175,51,0.4);
  color: var(--oryx-green-bright, #E2AF33);
}
.approval-badge.type-training {
  background: rgba(59,130,246,0.15);
  border: 1px solid rgba(59,130,246,0.4);
  color: #93c5fd;
}
.approval-meta {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 12px;
}
.approval-actions {
  display: flex; gap: 8px; justify-content: flex-end;
  border-top: 1px solid var(--border-1);
  padding-top: 12px;
}

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-radius: 999px;
  background: var(--bg-3);
  border: 1px solid var(--border-1);
  font-size: 10px; font-weight: 600; color: var(--text-2);
}
.chip i { font-size: 9px; opacity: 0.7; }
.chip-muted { color: var(--text-3); }
.chip-ok {
  background: rgba(226,175,51,0.12);
  border-color: rgba(226,175,51,0.35);
  color: var(--oryx-green-bright, #E2AF33);
}

/* Squad builder layout */
.squad-info {
  display: flex; flex-wrap: wrap; gap: 14px;
  font-size: 12px; color: var(--text-3);
  margin-bottom: 12px;
}
.squad-info i { margin-right: 5px; opacity: 0.7; }

.squad-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
}
@media (max-width: 1100px) { .squad-grid { grid-template-columns: 1fr; } }

.squad-pitch-card { padding-bottom: 14px; }
.formation-select {
  background: var(--bg-2);
  border: 1px solid var(--border-1);
  color: var(--text-1);
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
}

/* ── Pitch slots (drop targets) — small, elegant ─────────── */
.pitch-slot {
  position: absolute;
  width: 36px; height: 36px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1.5px dashed rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.03);
  display: flex; align-items: center; justify-content: center;
  transition: border-color .15s, background .15s, transform .15s, box-shadow .15s;
}
.pitch-slot .slot-label {
  font-size: 9px; font-weight: 700;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.05em;
}
.pitch-slot.drag-over {
  border-style: solid;
  border-color: #E2AF33;
  background: rgba(226,175,51,0.20);
  transform: translate(-50%, -50%) scale(1.15);
  box-shadow: 0 0 0 2px rgba(226,175,51,0.35), 0 0 18px rgba(226,175,51,0.55);
}
.pitch-slot.filled {
  border: none;
  background: transparent;
  width: 40px; height: 40px;
}
.pitch-slot.filled .slot-label { display: none; }

/* Placed player on pitch — small circular avatar with green glow */
.pitch-slot .player-chip.placed-on-pitch {
  position: absolute;
  inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-start;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  cursor: grab;
  overflow: visible;
}
.pitch-slot .player-chip.placed-on-pitch .pc-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background-color: #1a2a1a;
  background-size: cover;
  background-position: center top;
  border: 2px solid #E2AF33;
  box-shadow:
    0 0 0 1px rgba(226,175,51,0.45),
    0 0 12px rgba(226,175,51,0.85),
    0 0 22px rgba(226,175,51,0.45);
  position: relative;
}
.pitch-slot .player-chip.placed-on-pitch .pc-badge {
  position: absolute;
  bottom: -2px; right: -2px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #E2AF33;
  color: #06120a;
  font-size: 9px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid #06120a;
  line-height: 1;
}
.pitch-slot .player-chip.placed-on-pitch .pc-cap {
  position: absolute;
  top: -3px; left: -3px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #f59e0b;
  color: #06120a;
  font-size: 8px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid #06120a;
}
.pitch-slot .player-chip.placed-on-pitch .pc-tick { display: none; }
.pitch-slot .player-chip.placed-on-pitch .pc-name {
  margin-top: 4px;
  font-size: 9px; font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.85);
  max-width: 60px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  letter-spacing: 0.02em;
}
.pitch-slot .player-chip.placed-on-pitch:hover .pc-avatar {
  transform: scale(1.08);
  box-shadow:
    0 0 0 1px rgba(226,175,51,0.55),
    0 0 16px rgba(226,175,51,0.95),
    0 0 28px rgba(226,175,51,0.55);
  transition: transform .15s, box-shadow .15s;
}

/* ── Player pool chips — circular avatars ────────────────── */
.pool-section + .pool-section { margin-top: 14px; }
.pool-h {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 10px;
}
.pool-h-muted { color: var(--text-4); }
.pool-list {
  display: flex; flex-wrap: wrap; gap: 12px 10px;
}
.pool-list-muted { opacity: 0.55; }

.player-chip {
  display: inline-flex; flex-direction: column;
  align-items: center; gap: 4px;
  width: 56px;
  padding: 4px 2px;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-size: 11px;
  cursor: grab;
  user-select: none;
  transition: opacity .15s, transform .15s;
  text-align: center;
}
.player-chip:hover { transform: translateY(-1px); }
.player-chip:hover .pc-avatar {
  border-color: rgba(226,175,51,0.55);
  box-shadow: 0 0 10px rgba(226,175,51,0.35);
}
.player-chip.dragging { opacity: 0.4; transform: scale(0.96); }
.player-chip.placed { opacity: 0.35; cursor: default; }
.player-chip.placed .pc-avatar { filter: grayscale(0.5); }
.player-chip.player-chip-muted {
  cursor: not-allowed;
}
.player-chip .pc-avatar {
  position: relative;
  width: 44px; height: 44px;
  border-radius: 50%;
  background-color: #1a2a1a;
  background-size: cover;
  background-position: center top;
  border: 1.5px solid rgba(255,255,255,0.18);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.player-chip .pc-badge {
  position: absolute;
  bottom: -2px; right: -2px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #E2AF33;
  color: #06120a;
  font-size: 9px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--bg-2, #0d1f12);
  line-height: 1;
}
.player-chip .pc-cap {
  position: absolute;
  top: -3px; left: -3px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #f59e0b;
  color: #06120a;
  font-size: 8px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--bg-2, #0d1f12);
}
.player-chip .pc-tick {
  position: absolute;
  top: -2px; right: -2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #E2AF33;
  color: #06120a;
  font-size: 8px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--bg-2, #0d1f12);
}
.player-chip .pc-name {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-1);
  max-width: 56px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  line-height: 1.2;
}
.player-chip.player-chip-muted .pc-avatar {
  filter: grayscale(1);
  border-color: rgba(255,255,255,0.10);
}

/* ============================================================
   PHASE 8 — Attendance checklist + Notifications
   ============================================================ */

/* Event list cards (attendance overview) */
.att-event-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.att-event-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 12px;
  background: var(--bg-2, #111114);
  border: 1px solid var(--border-1, rgba(255,255,255,0.08));
  text-decoration: none; color: inherit;
  transition: background .15s, border-color .15s, transform .08s;
}
.att-event-card:hover {
  background: var(--bg-3, #18181d);
  border-color: var(--text-4, #71717a);
}
.att-event-card:active { transform: scale(0.997); }
.att-event-type {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(226,175,51,0.15); color: #4ade80;
  flex-shrink: 0;
}
.att-event-type.match { background: rgba(59,130,246,0.15); color: #60a5fa; }
.att-event-main { flex: 1; min-width: 0; }
.att-event-title { font-weight: 700; font-size: 13.5px; color: var(--text-1, #fff); }
.att-event-meta  { font-size: 11.5px; color: var(--text-3, #a1a1aa); margin-top: 2px; }
.att-event-progress { width: 110px; flex-shrink: 0; }
.att-event-pct { font-size: 11px; color: var(--text-3, #a1a1aa); margin-bottom: 4px; text-align: right; }
.att-event-track {
  height: 4px; border-radius: 4px;
  background: var(--bg-3, #18181d);
  border: 1px solid var(--border-1, rgba(255,255,255,0.06));
  overflow: hidden;
}
.att-event-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, #E2AF33, #C8962A);
  transition: width .25s;
}
.att-event-state {
  display: flex; align-items: center; gap: 8px; font-size: 11px;
  color: var(--text-4, #71717a);
}
.att-state {
  font-size: 10px; font-weight: 700; letter-spacing: .04em;
  padding: 3px 8px; border-radius: 999px; text-transform: uppercase;
  background: var(--bg-3, #18181d); color: var(--text-2, #d4d4d8);
  border: 1px solid var(--border-1, rgba(255,255,255,0.10));
}
.att-state-open      { background: rgba(56,189,248,0.15);  color: #38bdf8; border-color: rgba(56,189,248,0.30); }
.att-state-pending   { background: rgba(251,191,36,0.15);  color: #fbbf24; border-color: rgba(251,191,36,0.30); }
.att-state-confirmed { background: rgba(226,175,51,0.15);   color: #4ade80; border-color: rgba(226,175,51,0.30); }
.att-state-edited    { background: rgba(167,139,250,0.15); color: #a78bfa; border-color: rgba(167,139,250,0.30); }

/* Light-mode restore for the attendance events list */
html[data-theme="light"] .att-event-card {
  background: #f8fafc; border-color: #e5e7eb;
}
html[data-theme="light"] .att-event-card:hover { background: #f1f5f9; border-color: #cbd5e1; }
html[data-theme="light"] .att-event-type { background: rgba(226,175,51,0.12); color: #C8962A; }
html[data-theme="light"] .att-event-type.match { background: rgba(59,130,246,0.12); color: #2563eb; }
html[data-theme="light"] .att-event-title { color: #0f172a; }
html[data-theme="light"] .att-event-meta { color: #64748b; }
html[data-theme="light"] .att-event-pct { color: #64748b; }
html[data-theme="light"] .att-event-track { background: #e2e8f0; border-color: transparent; }
html[data-theme="light"] .att-state { background: #e2e8f0; color: #475569; border-color: transparent; }
html[data-theme="light"] .att-state-open      { background: #e0f2fe; color: #0369a1; }
html[data-theme="light"] .att-state-pending   { background: #fef3c7; color: #92400e; }
html[data-theme="light"] .att-state-confirmed { background: #dcfce7; color: #166534; }
html[data-theme="light"] .att-state-edited    { background: #ede9fe; color: #6d28d9; }

/* Per-event banners */
.att-banner {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 10px;
  font-size: 12.5px; font-weight: 600; margin: 12px 0;
}
.att-banner-success { background: rgba(226,175,51,0.12); color: #4ade80; border: 1px solid rgba(226,175,51,0.30); }
.att-banner-pending { background: rgba(251,191,36,0.12); color: #fbbf24; border: 1px solid rgba(251,191,36,0.30); }

/* Bulk row */
.att-bulk-row {
  display: flex; align-items: center; gap: 8px;
  margin: 14px 0 10px; padding-bottom: 10px;
  border-bottom: 1px dashed var(--border-1, rgba(255,255,255,0.08));
}
.att-bulk-label { font-size: 11px; color: var(--text-4); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.att-counter { font-size: 12px; font-weight: 700; color: var(--text-2, #d4d4d8); }

/* Status pills */
.att-pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600;
  padding: 6px 10px; border-radius: 999px;
  border: 1px solid var(--border-1, rgba(255,255,255,0.10));
  background: var(--bg-3, #18181d); color: var(--text-3, #a1a1aa);
  cursor: pointer; transition: all .12s;
}
.att-pill:hover:not(:disabled) { border-color: var(--text-4, #71717a); color: var(--text-1, #fff); }
.att-pill:disabled { opacity: 0.55; cursor: not-allowed; }
.att-pill-present.active { background: rgba(226,175,51,0.15);  border-color: #E2AF33; color: #4ade80; }
.att-pill-late.active    { background: rgba(251,191,36,0.15); border-color: #fbbf24; color: #fbbf24; }
.att-pill-absent.active  { background: rgba(239,68,68,0.15);  border-color: #ef4444; color: #f87171; }

/* Checklist */
.att-checklist { display: flex; flex-direction: column; gap: 8px; }
.att-row {
  border: 1px solid var(--border-1, rgba(255,255,255,0.08));
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--bg-2, #111114);
}
.att-row-head {
  display: flex; align-items: center; gap: 12px;
}
.att-row-head .av {
  width: 36px; height: 36px; border-radius: 50%;
  background-size: cover; background-position: center;
  background-color: var(--bg-3, #18181d); flex-shrink: 0;
  border: 1px solid var(--border-1, rgba(255,255,255,0.08));
}
.att-row-head .who { flex: 1; min-width: 0; }
.att-row-head .who-name { font-weight: 700; font-size: 13px; color: var(--text-1, #fff); }
.att-row-head .who-name .num {
  display: inline-block;
  font-size: 10px; font-weight: 700; padding: 1px 6px;
  border-radius: 4px; background: var(--bg-3, #18181d); color: var(--text-2, #d4d4d8);
  border: 1px solid var(--border-1, rgba(255,255,255,0.08));
  margin-right: 6px;
}
.att-row-head .who-pos { font-size: 11px; color: var(--text-4); }
.att-status-group { display: flex; gap: 4px; flex-shrink: 0; }
.att-status-group .att-pill { padding: 6px 9px; }
.att-row-extras {
  display: flex; align-items: center; gap: 10px; margin-top: 8px;
}
.att-mins {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--text-4); font-weight: 600;
}
.att-mins-input {
  width: 64px; padding: 5px 8px;
  border: 1px solid var(--border-1, rgba(255,255,255,0.10));
  border-radius: 6px;
  font-size: 12px; font-weight: 600;
  background: var(--bg-3, #18181d); color: var(--text-1, #fff);
  color-scheme: dark;
}
.att-comment {
  flex: 1; padding: 6px 10px;
  border: 1px solid var(--border-1, rgba(255,255,255,0.10));
  border-radius: 6px;
  font-size: 12px;
  background: var(--bg-3, #18181d); color: var(--text-1, #fff);
}
.att-comment::placeholder { color: var(--text-4, #71717a); }
.att-comment:focus, .att-mins-input:focus {
  outline: none; border-color: #E2AF33;
  box-shadow: 0 0 0 3px rgba(226,175,51,0.15);
  background: var(--bg-3, #18181d);
}

/* Action footer */
.att-actions {
  display: flex; gap: 8px; justify-content: flex-end;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--border-1, rgba(255,255,255,0.08));
}

/* Light-mode restore for the attendance checklist */
html[data-theme="light"] .att-banner-success { background: #dcfce7; color: #166534; border-color: transparent; }
html[data-theme="light"] .att-banner-pending { background: #fef3c7; color: #92400e; border-color: transparent; }
html[data-theme="light"] .att-bulk-row { border-bottom-color: #e5e7eb; }
html[data-theme="light"] .att-counter { color: #334155; }
html[data-theme="light"] .att-pill {
  background: #fff; color: #475569; border-color: #e5e7eb;
}
html[data-theme="light"] .att-pill:hover:not(:disabled) { border-color: #94a3b8; color: #0f172a; }
html[data-theme="light"] .att-pill-present.active { background: #dcfce7; border-color: #E2AF33; color: #166534; }
html[data-theme="light"] .att-pill-late.active    { background: #fef3c7; border-color: #fbbf24; color: #92400e; }
html[data-theme="light"] .att-pill-absent.active  { background: #fee2e2; border-color: #ef4444; color: #991b1b; }
html[data-theme="light"] .att-row { background: #fff; border-color: #e5e7eb; }
html[data-theme="light"] .att-row-head .av { background-color: #e2e8f0; border-color: #e5e7eb; }
html[data-theme="light"] .att-row-head .who-name { color: #0f172a; }
html[data-theme="light"] .att-row-head .who-name .num {
  background: #f1f5f9; color: #475569; border-color: transparent;
}
html[data-theme="light"] .att-mins-input,
html[data-theme="light"] .att-comment {
  background: #fff; color: #0f172a; border-color: #e5e7eb; color-scheme: light;
}
html[data-theme="light"] .att-actions { border-top-color: #e5e7eb; }

/* Empty state */
.empty-state {
  padding: 32px; text-align: center; color: var(--text-4);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.empty-state i { font-size: 28px; opacity: 0.5; }
.empty-state p { font-size: 13px; margin: 0; }

/* ──────────────────────────────────────────────────────────
   Notifications — top-bar bell badge + dropdown panel
   ────────────────────────────────────────────────────────── */
.topbar-icon { position: relative; }
.notif-badge {
  position: absolute; top: 4px; right: 4px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: #ef4444; color: #fff;
  font-size: 9px; font-weight: 800;
  display: grid; place-items: center;
  border: 2px solid var(--bg-1, #0b0b0b);
}
.notif-panel {
  position: fixed; top: 60px; right: 16px;
  width: 360px; max-height: 480px;
  background: var(--bg-2, #111114);
  color: var(--text-1, #f3f4f6);
  border: 1px solid var(--border-2, rgba(255,255,255,0.10));
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.45);
  z-index: 9999;
  display: none; flex-direction: column;
  overflow: hidden;
}
.notif-panel.open { display: flex; }
.notif-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-1, rgba(255,255,255,0.06));
  font-weight: 700; font-size: 13px;
  color: var(--text-1, #f3f4f6);
}
.notif-mark-all {
  background: transparent; border: 0; cursor: pointer;
  font-size: 11px; font-weight: 700;
  color: var(--oryx-green-bright, #E2AF33);
  text-transform: uppercase; letter-spacing: .05em;
}
.notif-list { flex: 1; overflow-y: auto; }
.notif-empty {
  padding: 28px 16px; text-align: center;
  color: var(--text-3, #9ca3af); font-size: 12px;
}
.notif-item {
  display: flex; gap: 12px; padding: 10px 14px;
  text-decoration: none; color: inherit;
  border-bottom: 1px solid var(--border-1, rgba(255,255,255,0.06));
  transition: background .12s;
}
.notif-item:hover { background: var(--bg-3, #18181d); }
.notif-item.unread { background: rgba(226,175,51,0.08); }
.notif-item.unread::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--oryx-green-bright, #E2AF33); flex-shrink: 0; margin-top: 8px;
}
.notif-item i { color: var(--oryx-green-bright, #E2AF33); flex-shrink: 0; margin-top: 3px; }
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-size: 12.5px; font-weight: 700; color: var(--text-1, #f3f4f6); }
.notif-sub   { font-size: 11.5px; color: var(--text-3, #9ca3af); margin-top: 2px; line-height: 1.4; }
.notif-time  { font-size: 10px; color: var(--text-4, #6b7280); margin-top: 4px; opacity: 0.8; }

/* Light theme overrides */
html[data-theme="light"] .notif-badge { border-color: #fff; }
html[data-theme="light"] .notif-panel {
  background: #fff;
  color: var(--text-1, #0f172a);
  border-color: var(--border, #e5e7eb);
  box-shadow: 0 12px 32px rgba(15,23,42,0.18);
}
html[data-theme="light"] .notif-head { border-bottom-color: var(--border, #e5e7eb); }
html[data-theme="light"] .notif-mark-all { color: #C8962A; }
html[data-theme="light"] .notif-empty { color: var(--text-4, #6b7280); }
html[data-theme="light"] .notif-item { border-bottom-color: #f1f5f9; }
html[data-theme="light"] .notif-item:hover { background: #f8fafc; }
html[data-theme="light"] .notif-item.unread { background: #f0f9ff; }
html[data-theme="light"] .notif-item.unread::before { background: #2563eb; }
html[data-theme="light"] .notif-item i { color: #C8962A; }
html[data-theme="light"] .notif-sub { color: var(--text-4, #6b7280); }
html[data-theme="light"] .notif-time { color: var(--text-4, #6b7280); }

/* ─────────────────────────────────────────────────────────────
   PHASE 10 — Finance ERP UI
───────────────────────────────────────────────────────────── */

/* Modal overlay (shared by invoices/expenses/refunds/reminders) */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(2px);
  display: none;
  align-items: center; justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-card {
  background: var(--surface-1, #fff);
  border-radius: 14px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-1, #e5e7eb);
}
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 700; }
.modal-close {
  background: transparent; border: none; cursor: pointer;
  font-size: 16px; color: var(--text-3, #6b7280);
  width: 30px; height: 30px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--surface-2, #f3f4f6); }
.modal-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.modal-body label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12px; color: var(--text-3, #6b7280); font-weight: 600;
}
.modal-body input[type="text"],
.modal-body input[type="number"],
.modal-body input[type="date"],
.modal-body select,
.modal-body textarea {
  padding: 8px 10px; border: 1px solid var(--border-1, #e5e7eb);
  border-radius: 8px; font-size: 13px; color: var(--text-1, #0f172a);
  background: var(--surface-1, #fff); font-family: inherit;
}
.modal-body input:focus,
.modal-body select:focus,
.modal-body textarea:focus {
  outline: 2px solid var(--oryx-green, #C8962A);
  outline-offset: -2px; border-color: transparent;
}
.modal-body textarea { resize: vertical; min-height: 60px; }
.modal-body .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-actions {
  display: flex; justify-content: flex-end; gap: 8px;
  margin-top: 10px; padding-top: 12px;
  border-top: 1px solid var(--border-1, #e5e7eb);
}

/* Toggle switch (for reminder rules) */
.switch {
  display: inline-block;
  position: relative;
  width: 38px; height: 22px;
  cursor: pointer;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0;
  background: #cbd5e1;
  border-radius: 22px;
  transition: background .2s;
}
.switch .slider::before {
  content: ''; position: absolute;
  width: 16px; height: 16px;
  left: 3px; top: 3px;
  background: #fff; border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.switch input:checked + .slider { background: #C8962A; }
.switch input:checked + .slider::before { transform: translateX(16px); }

/* Inline keyboard tags for template-variable docs */
code.kbd {
  display: inline-block;
  padding: 3px 8px; border-radius: 6px;
  background: #f1f5f9; color: #0f172a;
  font-family: 'Space Grotesk', monospace;
  font-size: 11px; font-weight: 600;
  border: 1px solid #e2e8f0;
}

/* Pills for additional finance statuses */
.pill.pending,
.pill.approved,
.pill.completed,
.pill.rejected {
  text-transform: capitalize; font-weight: 600;
}
.pill.pending   { background: #fef3c7; color: #92400e; }
.pill.approved  { background: #dbeafe; color: #1e40af; }
.pill.completed { background: #dcfce7; color: #166534; }
.pill.rejected  { background: #fee2e2; color: #991b1b; }

/* Category pills (expenses) */
.pill.cat-tournament_fee { background: #ede9fe; color: #5b21b6; }
.pill.cat-equipment      { background: #ccfbf1; color: #115e59; }
.pill.cat-salary         { background: #fef3c7; color: #92400e; }
.pill.cat-rent           { background: #fee2e2; color: #991b1b; }
.pill.cat-utilities      { background: #dbeafe; color: #1e40af; }
.pill.cat-travel         { background: #fce7f3; color: #9d174d; }
.pill.cat-other          { background: #f1f5f9; color: #334155; }

/* Danger button-icon variant */
.btn-icon-sm.danger {
  color: #dc2626;
}
.btn-icon-sm.danger:hover {
  background: #fee2e2;
}

/* Tighter table small text */
.muted        { color: var(--text-4, #9ca3af); }
.muted.small  { font-size: 11px; line-height: 1.3; }

/* ─── Phase 11 — Chat / Messaging ───────────────────────────── */
.chat-shell { min-height: 600px; }
.chat-shell.two-col { grid-template-columns: 360px 1fr; gap: 16px; align-items: stretch; }
.chat-side { display: flex; flex-direction: column; max-height: 760px; }
.chat-side .picker-list { flex: 1; overflow-y: auto; }
.chat-thread-list { display: flex; flex-direction: column; gap: 4px; }
.chat-row { cursor: pointer; transition: background 0.15s; padding: 10px 12px; border-radius: 10px; }
.chat-row:hover { background: rgba(255,255,255,0.04); }
.chat-row.selected { background: rgba(226,175,51,0.10); border-left: 3px solid #E2AF33; }
.chat-row-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; min-width: 48px; }
.chat-unread-badge {
  background: #E2AF33; color: #fff; font-size: 11px; font-weight: 700;
  padding: 1px 7px; border-radius: 10px; min-width: 18px; text-align: center;
}
.av-initials {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #3b82f6, #E2AF33); color: #fff;
  font-weight: 700; font-size: 13px;
}

.chat-main { display: flex; flex-direction: column; min-height: 600px; max-height: 760px; padding: 0; overflow: hidden; }
.chat-main .empty-state { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px; }
.chat-thread-view { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.chat-thread-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.chat-thread-head .av { width: 40px; height: 40px; }
.chat-thread-head .who { flex: 1; }
.chat-thread-head .who-name { font-weight: 600; font-size: 15px; }
.chat-thread-head .who-pos { font-size: 12px; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.5px; }

.chat-messages {
  flex: 1; overflow-y: auto; padding: 18px;
  display: flex; flex-direction: column; gap: 10px;
  background: rgba(0,0,0,0.15);
}
.chat-msg { display: flex; flex-direction: column; max-width: 70%; }
.chat-msg-in  { align-self: flex-start; align-items: flex-start; }
.chat-msg-out { align-self: flex-end;   align-items: flex-end; }
.chat-msg-bubble {
  padding: 9px 13px; border-radius: 14px;
  font-size: 14px; line-height: 1.4; word-wrap: break-word;
  white-space: pre-wrap;
}
.chat-msg-in .chat-msg-bubble {
  background: #1f2937; color: #e5e7eb;
  border-bottom-left-radius: 4px;
}
.chat-msg-out .chat-msg-bubble {
  background: #E2AF33; color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-msg-meta { font-size: 11px; color: #9ca3af; margin-top: 3px; display: flex; gap: 4px; }

.chat-composer {
  display: flex; gap: 10px; padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.chat-composer input {
  flex: 1; background: rgba(255,255,255,0.06); color: inherit;
  border: 1px solid rgba(255,255,255,0.1); border-radius: 20px;
  padding: 9px 16px; font-size: 14px; outline: none;
}
.chat-composer input:focus { border-color: #E2AF33; }

.chat-compose-card { width: 480px; max-width: 92vw; }
.chat-compose-card .field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.chat-compose-card .field span { font-size: 12px; font-weight: 600; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.5px; }
.chat-compose-card select,
.chat-compose-card textarea {
  background: rgba(255,255,255,0.05); color: inherit;
  border: 1px solid rgba(255,255,255,0.1); border-radius: 8px;
  padding: 9px 12px; font-size: 14px; outline: none; font-family: inherit;
}
.chat-compose-card select:focus,
.chat-compose-card textarea:focus { border-color: #E2AF33; }

/* ─── Phase 12 — Announcements ──────────────────────────────── */
.ann-list { display: flex; flex-direction: column; gap: 12px; }
.ann-row {
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
  border-radius: 12px;
  padding: 14px 16px;
}
.ann-row-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  margin-bottom: 8px;
}
.ann-title-wrap { flex: 1; min-width: 0; }
.ann-title { margin: 0 0 6px 0; font-size: 15px; font-weight: 600; }
.ann-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.ann-pills .pill {
  font-size: 11px; padding: 2px 8px; border-radius: 10px;
  background: rgba(255,255,255,0.06); display: inline-flex; align-items: center; gap: 4px;
}
.pill-club      { background: rgba(226,175,51,0.15);  color: #4ade80; }
.pill-team      { background: rgba(59,130,246,0.15); color: #60a5fa; }
.pill-parent    { background: rgba(168,85,247,0.15); color: #c084fc; }
.pill-role      { background: rgba(245,158,11,0.15); color: #fbbf24; }
.pill-sent      { background: rgba(226,175,51,0.15);  color: #4ade80; }
.pill-scheduled { background: rgba(245,158,11,0.15); color: #fbbf24; }
.pill-draft     { background: rgba(156,163,175,0.18);color: #d1d5db; }

.ann-actions { display: flex; gap: 6px; }
.ann-body   { margin: 6px 0 8px; color: #cbd5e1; line-height: 1.4; font-size: 14px; white-space: pre-wrap; }
.ann-meta   { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ann-meta a { color: #60a5fa; text-decoration: none; }
.ann-meta a:hover { text-decoration: underline; }

.field-check { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 14px; }
.field-check input[type="checkbox"] { width: 16px; height: 16px; }

/* Phase 13 — Private Session Requests */
.psr-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.psr-admin-list, .psr-list { display: flex; flex-direction: column; gap: 10px; }
.psr-row {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 12px 14px;
}
.psr-row-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 6px;
}
.psr-row-meta { display: flex; gap: 12px; flex-wrap: wrap; margin: 4px 0 6px; }
.psr-row-meta i { margin-right: 4px; opacity: 0.7; }
.psr-notes {
  margin: 6px 0; padding: 8px 10px;
  background: rgba(255,255,255,0.03);
  border-left: 2px solid rgba(96,165,250,0.4);
  border-radius: 4px;
  font-size: 13px; color: #cbd5e1; white-space: pre-wrap;
}
.psr-review { margin-top: 6px; }
.psr-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

.psr-form {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
  padding: 4px 2px;
}
.psr-form .field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.psr-form .field span { color: #94a3b8; font-size: 12px; }
.psr-form input, .psr-form select, .psr-form textarea {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px; padding: 8px 10px; color: #e5e7eb; font-size: 14px;
}
.psr-form-actions {
  display: flex; align-items: center; gap: 12px;
  padding-top: 4px;
}
@media (max-width: 640px) {
  .psr-form { grid-template-columns: 1fr; }
}

/* Phase 14 — Reports */
.report-controls {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 16px;
}
.report-range-form {
  display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap;
}
.report-range-form .field {
  display: flex; flex-direction: column; gap: 4px; font-size: 12px;
}
.report-range-form .field span { color: #9ca3af; font-size: 11px; }
.report-range-form input[type="date"] {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px; padding: 6px 10px; color: #e5e7eb; font-size: 13px;
}

.empty-state-sm {
  text-align: center; padding: 28px 16px; color: #9ca3af;
}
.empty-state-sm i { font-size: 28px; opacity: 0.5; margin-bottom: 8px; display: block; }

.exp-cat-list { display: flex; flex-direction: column; gap: 8px; padding: 4px 0; }
.exp-cat-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px;
  font-size: 13px;
}
.exp-cat-label { color: #cbd5e1; }
.exp-cat-val   { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.exp-cat-val strong { color: #e5e7eb; font-size: 14px; }

.top-attenders { display: flex; flex-direction: column; gap: 8px; padding: 4px 0; }
.ta-row {
  display: grid; grid-template-columns: 28px 1fr auto;
  align-items: center; gap: 12px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
}
.ta-rank {
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(226,175,51,0.18); color: #4ade80;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
}
.ta-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ta-info strong { color: #e5e7eb; font-size: 14px; }
.ta-pct { font-size: 16px; font-weight: 700; color: #4ade80; }

/* ─── Phase 16 — Admin Settings ─── */
.settings-label {
  display: block;
  font-size: 11px; color: var(--text-4); font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.settings-input {
  width: 100%; margin-top: 6px; padding: 10px 12px;
  background: var(--admin-bg-3); border: 1px solid var(--border-1);
  border-radius: 8px; color: var(--text-1); font-size: 13px;
  font-family: inherit;
}
.settings-input:focus { outline: none; border-color: var(--admin-accent, #ef4444); }
.settings-input:disabled { opacity: 0.6; cursor: not-allowed; }
.settings-hint { font-size: 11px; color: var(--text-4); margin-top: 4px; }
.settings-select {
  background: var(--admin-bg-3); border: 1px solid var(--border-1);
  border-radius: 6px; color: var(--text-1);
  padding: 6px 10px; font-size: 12px; font-family: inherit;
}
.settings-toggle { cursor: pointer; }
.settings-toggle input[type="checkbox"] {
  width: 38px; height: 22px; appearance: none;
  background: rgba(255,255,255,0.12); border-radius: 999px;
  position: relative; cursor: pointer; transition: background 0.2s;
}
.settings-toggle input[type="checkbox"]::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: white; transition: transform 0.2s;
}
.settings-toggle input[type="checkbox"]:checked { background: var(--admin-accent, #ef4444); }
.settings-toggle input[type="checkbox"]:checked::after { transform: translateX(16px); }
.settings-actions {
  margin-top: 16px; display: flex; justify-content: flex-end; gap: 8px;
  padding-top: 12px; border-top: 1px solid var(--border-1);
}
.flash {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 16px; padding: 10px 14px;
  border-radius: 8px; font-size: 13px;
}
.flash-ok  { background: rgba(226,175,51,0.10);  color: #4ade80; border: 1px solid rgba(226,175,51,0.25); }
.flash-err { background: rgba(239,68,68,0.10);  color: #fca5a5; border: 1px solid rgba(239,68,68,0.25); }

/* ─────────────────────────────────────────────────────────────
   PHASE 30 — Coach Note editor modal
───────────────────────────────────────────────────────────── */
.note-editor-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 1100; padding: 20px;
  -webkit-tap-highlight-color: transparent;
}
.note-editor-overlay[hidden] { display: none; }
.note-editor {
  width: min(520px, 100%);
  max-height: 90vh; overflow: auto;
  background: var(--bg-2, #111114);
  color: var(--text-1, #f3f4f6);
  border: 1px solid var(--border-2, rgba(255,255,255,0.10));
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  display: flex; flex-direction: column;
}
.note-editor-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-1, rgba(255,255,255,0.06));
}
.note-editor-head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.note-editor-close {
  background: transparent; border: 0;
  color: var(--text-3, #9ca3af);
  cursor: pointer; padding: 4px 8px; font-size: 16px;
}
.note-editor-close:hover { color: var(--text-1, #fff); }
.note-editor-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.note-editor-body textarea {
  width: 100%; resize: vertical; min-height: 100px;
  background: var(--bg-3, #18181d);
  color: var(--text-1, #f3f4f6);
  border: 1px solid var(--border-1, rgba(255,255,255,0.10));
  border-radius: 10px; padding: 10px 12px;
  font-family: inherit; font-size: 13px; line-height: 1.5;
}
.note-editor-body textarea:focus {
  outline: none; border-color: var(--oryx-green, #C8962A);
  box-shadow: 0 0 0 3px rgba(226,175,51,0.18);
}
.note-counter {
  text-align: right; font-size: 11px;
  color: var(--text-3, #9ca3af);
}
.note-history {
  border-top: 1px dashed var(--border-1, rgba(255,255,255,0.08));
  padding-top: 10px; display: flex; flex-direction: column; gap: 8px;
}
.note-history-head {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--text-3, #9ca3af);
}
.note-history-loading, .note-history-empty {
  font-size: 12px; color: var(--text-3, #9ca3af); padding: 8px 0;
}
.note-history-row {
  background: var(--bg-3, #18181d);
  border: 1px solid var(--border-1, rgba(255,255,255,0.06));
  border-radius: 10px; padding: 10px 12px;
}
.note-history-meta {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  font-size: 12px; margin-bottom: 4px;
}
.note-history-time { color: var(--text-3, #9ca3af); font-size: 11px; }
.note-history-body { font-size: 13px; line-height: 1.5; color: var(--text-2, #d4d4d8); white-space: pre-wrap; }
.note-editor-actions {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border-1, rgba(255,255,255,0.06));
}

/* Light theme */
html[data-theme="light"] .note-editor {
  background: #fff; color: var(--text-1, #0f172a);
  border-color: var(--border, #e5e7eb);
  box-shadow: 0 20px 60px rgba(15,23,42,0.18);
}
html[data-theme="light"] .note-editor-head { border-bottom-color: var(--border, #e5e7eb); }
html[data-theme="light"] .note-editor-actions { border-top-color: var(--border, #e5e7eb); }
html[data-theme="light"] .note-editor-body textarea {
  background: #f8fafc; color: var(--text-1, #0f172a);
  border-color: var(--border, #e5e7eb);
}
html[data-theme="light"] .note-history-row {
  background: #f8fafc; border-color: var(--border, #e5e7eb);
}
html[data-theme="light"] .note-history-body { color: var(--text-2, #334155); }

/* ─── Phase 31 — Players tab modals (Performance + Coach Note) ── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-backdrop[hidden] { display: none; }
.modal-backdrop .modal {
  background: var(--bg-2, #111114);
  border: 1px solid var(--border-1, #1f1f23);
  border-radius: 14px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  display: flex; flex-direction: column;
}
.modal-foot {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--border-1, #1f1f23);
}
html[data-theme="light"] .modal-backdrop .modal {
  background: #fff;
  border-color: var(--border, #e5e7eb);
}
html[data-theme="light"] .modal-foot { border-color: var(--border, #e5e7eb); }

/* Performance editor — player header */
.perf-player {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border-1, #1f1f23);
  margin-bottom: 4px;
}
.perf-player .av {
  width: 48px; height: 48px;
  border-radius: 50%;
  background-size: cover; background-position: center top;
  background-color: #1a2a1a;
  border: 2px solid var(--oryx-green-bright, #E2AF33);
  flex-shrink: 0;
}
.perf-name { font-size: 15px; font-weight: 700; color: var(--text-1); }
.perf-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; }

/* Section heading inside modal */
.perf-section { margin-top: 10px; }
.perf-section-h {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-2);
  margin-bottom: 8px;
}
.perf-section-h i { color: var(--oryx-green-bright, #E2AF33); }

/* Two-column slider grid */
.perf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}
@media (max-width: 540px) { .perf-grid { grid-template-columns: 1fr; } }
.perf-row {
  display: grid;
  grid-template-columns: 60px 1fr 50px;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--bg-3, rgba(255,255,255,0.03));
}
.perf-key {
  font-size: 11px; font-weight: 700;
  color: var(--text-2);
  letter-spacing: 0.04em;
}
.perf-row input[type="range"] {
  width: 100%;
  accent-color: var(--oryx-green-bright, #E2AF33);
}
.perf-num {
  width: 100%;
  padding: 4px 6px;
  border: 1px solid var(--border-1, #1f1f23);
  border-radius: 6px;
  background: var(--bg-2);
  color: var(--text-1);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  font-family: inherit;
}
html[data-theme="light"] .perf-row { background: #f8fafc; }
html[data-theme="light"] .perf-num { background: #fff; border-color: var(--border, #e5e7eb); color: #0f172a; }

/* Coach-note recent history */
.note-history-body {
  display: flex; flex-direction: column;
  gap: 8px; max-height: 200px; overflow-y: auto;
  padding: 8px; border-radius: 10px;
  background: var(--bg-3, rgba(255,255,255,0.03));
  border: 1px solid var(--border-1, #1f1f23);
  font-size: 12px;
}
.nh-row { display: flex; gap: 10px; align-items: flex-start; }
.nh-av {
  width: 32px; height: 32px;
  border-radius: 50%;
  background-size: cover; background-position: center;
  background-color: #1a2a1a;
  flex-shrink: 0;
}
.nh-meta { flex: 1; min-width: 0; }
.nh-head {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--text-3); margin-bottom: 2px;
}
.nh-head b { color: var(--text-1); font-weight: 700; }
.nh-date { font-size: 10px; opacity: 0.7; }
.nh-body { font-size: 12px; color: var(--text-2); white-space: pre-wrap; word-wrap: break-word; }

/* ─── Coach-note modal — mobile safety (Batch E) ─────────────
   The note modal is a flex column inside a max-height:90vh box.
   On small viewports (iPhone PWA ~600–700px inner-height), the
   perf-player header + history block + footer eat the available
   space, and because `.modal-body textarea` had no `flex-shrink`
   the textarea would collapse to 0 height as history loaded —
   which looked like "the modal appears then disappears" and
   made the input unclickable. Pin the editor size and cap history
   on mobile so the textarea always has room. */
#noteEditor {
  flex: 0 0 auto;      /* never shrink or grow — hold min-height */
  min-height: 120px;
  box-sizing: border-box;
}
#noteHistoryWrap { flex: 0 1 auto; min-height: 0; }
@media (max-width: 640px) {
  /* Trim history on phones so it can't push the textarea out */
  .note-history-body { max-height: 120px; }
  #noteHistoryWrap    { max-height: 160px; overflow: hidden; }
}

/* Form flash inside modals */
.form-flash {
  padding: 8px 10px; border-radius: 8px;
  font-size: 12px; margin-top: 4px;
}
.form-flash.flash-err {
  background: rgba(239,68,68,0.15);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,0.3);
}
.form-flash.flash-ok {
  background: rgba(226,175,51,0.12);
  color: var(--oryx-green-bright, #E2AF33);
  border: 1px solid rgba(226,175,51,0.25);
}

/* Phase 32 — Chase pending RSVP button states */
.sl-chase-btn[disabled] {
  opacity: 0.7;
  cursor: not-allowed;
}
.sl-chase-btn.sl-chase-done {
  background: rgba(226,175,51,0.14);
  color: var(--oryx-green-bright);
  border-color: rgba(226,175,51,0.35);
}
.sl-chase-btn.sl-chase-done i { color: var(--oryx-green-bright); }

/* ─── Phase 33: Quick-help drawer ────────────────────────────────── */
.help-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(2px);
  z-index: 9998;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}
body.help-open .help-backdrop {
  opacity: 1; pointer-events: auto;
}
.help-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(420px, 92vw);
  background: var(--admin-bg-1, #0f0f0f);
  border-left: 1px solid var(--border-1);
  box-shadow: -8px 0 32px rgba(0,0,0,0.45);
  z-index: 9999;
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.2,.7,.2,1);
  display: flex; flex-direction: column;
  overflow: hidden;
}
body.help-open .help-drawer {
  transform: translateX(0);
}
.help-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-1);
  background:
    linear-gradient(135deg, rgba(226,175,51,0.10), transparent 60%),
    var(--admin-bg-2);
}
.help-eyebrow {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--oryx-green-bright);
  font-weight: 700;
  margin-bottom: 2px;
}
.help-eyebrow i { margin-right: 6px; }
.help-head h3 { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; margin: 0; }
.help-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px 18px;
  display: flex; flex-direction: column; gap: 10px;
}
.help-card {
  display: flex; gap: 12px;
  background: var(--admin-bg-2);
  border: 1px solid var(--border-1);
  border-radius: 12px;
  padding: 12px;
  transition: border-color .15s, transform .15s;
}
.help-card:hover { border-color: rgba(226,175,51,0.30); }
.help-card-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 10px;
  background: rgba(226,175,51,0.12);
  color: var(--oryx-green-bright);
  display: grid; place-items: center;
  font-size: 14px;
}
.help-card-body { flex: 1; min-width: 0; }
.help-card-title {
  font-size: 13.5px; font-weight: 700;
  color: var(--text-1);
  margin-bottom: 4px;
}
.help-card-text {
  font-size: 12.5px; line-height: 1.5;
  color: var(--text-3);
}
.help-card-cta {
  display: inline-flex; align-items: center;
  margin-top: 8px;
  font-size: 12px; font-weight: 600;
  color: var(--oryx-green-bright);
  text-decoration: none;
}
.help-card-cta:hover { text-decoration: underline; }
.help-foot {
  margin-top: 6px;
  padding: 12px;
  background: var(--admin-bg-2);
  border: 1px dashed var(--border-1);
  border-radius: 12px;
}
.help-foot-title {
  font-size: 11.5px; font-weight: 700;
  color: var(--text-2);
  margin-bottom: 8px;
}
.help-foot-row {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.help-foot-row .btn-icon-sm i { margin-right: 4px; }

/* Stretch to full width on narrow phone frame */
@media (max-width: 480px) {
  .help-drawer { width: 100%; border-left: none; }
}

/* ============================================================
   Phase 33 — User Management hub (/admin/users)
   ============================================================ */

/* Tabs */
.users-tabs {
  display: flex; gap: 6px; flex-wrap: wrap;
  border-bottom: 1px solid var(--border-1);
  margin-bottom: 16px;
}
.users-tab {
  background: transparent; border: none; color: var(--text-2);
  padding: 10px 14px; font-size: 13px; font-weight: 600;
  cursor: pointer; border-bottom: 2px solid transparent;
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 8px 8px 0 0;
  transition: color .15s, border-color .15s, background .15s;
}
.users-tab:hover { color: var(--text-1); background: rgba(255,255,255,0.03); }
.users-tab.active { color: #E2AF33; border-bottom-color: #E2AF33; }
.users-tab .cnt {
  background: rgba(226,175,51,0.15); color: #E2AF33;
  border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: 700;
}
.users-tab.active .cnt { background: rgba(226,175,51,0.25); }

/* Panels */
.users-panel { display: none; }
.users-panel.open { display: block; }

/* Card head */
.card-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; margin-bottom: 14px; flex-wrap: wrap;
}
.card-head-left h3 { font-size: 16px; margin: 0 0 4px; }
.card-head-left .muted { font-size: 12px; color: var(--text-2); margin: 0; max-width: 600px; }

.btn-primary {
  background: #E2AF33; color: #001a08; border: none;
  padding: 9px 14px; border-radius: 10px; font-size: 13px; font-weight: 700;
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  transition: background .15s, transform .1s;
}
.btn-primary:hover { background: #C8962A; }
.btn-primary:active { transform: translateY(1px); }
.btn-primary i { font-size: 11px; }

/* Toolbar */
.users-toolbar {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px;
}
.users-toolbar input,
.users-toolbar select {
  background: var(--admin-bg-2); border: 1px solid var(--border-1);
  color: var(--text-1); padding: 8px 10px; border-radius: 9px;
  font-size: 13px; min-height: 36px;
}
.users-toolbar .users-search { flex: 1; min-width: 180px; }

/* User card list */
.users-card-list { display: flex; flex-direction: column; gap: 8px; }
.user-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--admin-bg-2); border: 1px solid var(--border-1);
  border-radius: 12px; padding: 12px;
  transition: border-color .15s, transform .1s;
}
.user-card:hover { border-color: rgba(226,175,51,0.3); }
.user-card[data-status="pending_approval"] { border-left: 3px solid #f59e0b; }
.user-card[data-status="rejected"]         { border-left: 3px solid #ef4444; opacity: 0.7; }

.user-avatar {
  width: 44px; height: 44px; flex-shrink: 0;
  background: rgba(226,175,51,0.15); color: #E2AF33;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.user-main { flex: 1; min-width: 0; }
.user-name {
  font-weight: 700; color: var(--text-1); font-size: 14px;
  display: flex; align-items: center; gap: 8px;
}
.user-name .jersey {
  background: rgba(255,255,255,0.08); color: var(--text-2);
  padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600;
}
.user-meta {
  display: flex; gap: 12px; flex-wrap: wrap;
  color: var(--text-2); font-size: 12px; margin-top: 4px;
}
.user-meta i { font-size: 10px; margin-right: 3px; }
.user-meta-thin {
  margin-top: 4px; color: var(--text-2); font-size: 11px;
}
.user-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.user-actions { display: flex; gap: 4px; }

/* Pills */
.pill {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.2px;
}
.pill-green  { background: rgba(226,175,51,0.15);  color: #E2AF33; }
.pill-amber  { background: rgba(245,158,11,0.15); color: #f59e0b; }
.pill-red    { background: rgba(239,68,68,0.15);  color: #ef4444; }
.pill-blue   { background: rgba(59,130,246,0.15); color: #3b82f6; }
.role-admin    { background: rgba(168,85,247,0.15); color: #a855f7; }
.role-head     { background: rgba(226,175,51,0.15);  color: #E2AF33; }
.role-coach    { background: rgba(59,130,246,0.15); color: #3b82f6; }
.role-finance  { background: rgba(245,158,11,0.15); color: #f59e0b; }
.role-parent   { background: rgba(255,255,255,0.08); color: var(--text-2); }

/* Empty state */
.empty-state {
  text-align: center; padding: 40px 20px;
  color: var(--text-2); font-size: 13px;
  border: 1px dashed var(--border-1); border-radius: 12px;
}
.empty-state i { font-size: 32px; display: block; margin-bottom: 12px; opacity: 0.5; }

/* Age groups grid */
.age-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.age-card {
  background: var(--admin-bg-2); border: 1px solid var(--border-1);
  border-radius: 12px; padding: 14px;
  position: relative;
  transition: border-color .15s, transform .1s;
}
.age-card:hover { border-color: rgba(226,175,51,0.3); transform: translateY(-1px); }
.age-card.dim { opacity: 0.5; }
.age-code {
  font-size: 22px; font-weight: 800; color: #E2AF33;
  letter-spacing: 0.5px;
}
.age-label { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.age-meta {
  display: flex; flex-direction: column; gap: 3px;
  margin-top: 10px; color: var(--text-2); font-size: 11.5px;
}
.age-meta i { font-size: 10px; margin-right: 4px; width: 12px; text-align: center; }
.age-actions {
  position: absolute; top: 8px; right: 8px;
  display: flex; gap: 2px;
}

/* Modal */
.users-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.users-modal[hidden] { display: none; }
.users-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
}
.users-modal-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 480px; max-height: 90vh;
  background: var(--admin-bg-1); border: 1px solid var(--border-1);
  border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  display: flex; flex-direction: column; overflow: hidden;
  animation: modalIn .18s ease-out;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}
.users-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--border-1);
}
.users-modal-head h3 { margin: 0; font-size: 15px; }
.users-modal-body {
  padding: 16px; overflow-y: auto; flex: 1;
}
.users-modal-body .form-row { margin-bottom: 12px; }
.users-modal-body label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--text-2); margin-bottom: 4px;
}
.users-modal-body label .req { color: #ef4444; margin-left: 2px; }
.users-modal-body input,
.users-modal-body select,
.users-modal-body textarea {
  width: 100%; box-sizing: border-box;
  background: var(--admin-bg-2); border: 1px solid var(--border-1);
  color: var(--text-1); padding: 9px 11px; border-radius: 9px;
  font-size: 13px; font-family: inherit;
}
.users-modal-body input:focus,
.users-modal-body select:focus,
.users-modal-body textarea:focus {
  outline: none; border-color: #E2AF33;
}
.users-modal-foot {
  display: flex; gap: 8px; justify-content: flex-end;
  padding-top: 12px; margin-top: 12px;
  border-top: 1px solid var(--border-1);
}
.users-modal-foot .btn-primary { padding: 8px 14px; }
.users-modal-foot .btn-secondary {
  background: var(--admin-bg-2); border: 1px solid var(--border-1);
  color: var(--text-1); padding: 8px 14px; border-radius: 10px;
  font-size: 13px; font-weight: 600; cursor: pointer;
}

.temp-pw-banner {
  background: rgba(59,130,246,0.12); border: 1px solid rgba(59,130,246,0.4);
  color: #3b82f6; padding: 12px; border-radius: 10px;
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 10px;
}
.temp-pw-banner code {
  background: rgba(0,0,0,0.3); padding: 2px 8px; border-radius: 6px;
  font-family: 'SF Mono', Menlo, monospace; font-size: 13px; font-weight: 700;
  color: #fff; user-select: all;
}
.temp-pw-banner button {
  margin-left: auto; background: transparent; border: 1px solid currentColor;
  color: inherit; padding: 4px 10px; border-radius: 6px; cursor: pointer;
  font-size: 11px; font-weight: 600;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.temp-pw-banner button:hover { background: rgba(59,130,246,0.15); }
.temp-pw-banner button.copied {
  background: rgba(226,175,51,0.18); border-color: #E2AF33; color: #E2AF33;
}

/* Mobile tweaks */
@media (max-width: 640px) {
  .users-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .users-tab { white-space: nowrap; }
  .user-card { flex-wrap: wrap; }
  .user-side, .user-actions { width: 100%; justify-content: flex-end; }
  .age-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

/* Phase 33 — Unified Approvals */
.approval-count-pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 8px; margin-left: 8px;
  background: rgba(245,158,11,0.18);
  border: 1px solid rgba(245,158,11,0.45);
  color: #fbbf24;
  border-radius: 999px;
  font-size: 11px; font-weight: 700;
}
.approval-badge { display: inline-flex; align-items: center; gap: 6px; }
.approval-badge i { font-size: 11px; }
.approval-badge.type-user {
  background: rgba(168,85,247,0.15);
  border: 1px solid rgba(168,85,247,0.4);
  color: #c4b5fd;
}
.approval-badge.type-player {
  background: rgba(14,165,233,0.15);
  border: 1px solid rgba(14,165,233,0.4);
  color: #7dd3fc;
}
.approval-badge.type-event {
  background: rgba(226,175,51,0.15);
  border: 1px solid rgba(226,175,51,0.4);
  color: var(--oryx-green-bright, #E2AF33);
}
.approval-card.type-user   { border-left: 3px solid rgba(168,85,247,0.55); }
.approval-card.type-player { border-left: 3px solid rgba(14,165,233,0.55); }
.approval-card.type-event  { border-left: 3px solid rgba(226,175,51,0.55); }
.approval-card.fade-out { opacity: 0; transform: translateX(8px); transition: all .25s ease; }

/* Phase 33 — Documents browser */
.docs-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}
.docs-summary-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--bg-2);
  border: 1px solid var(--border-1);
  border-radius: 12px;
}
.docs-summary-card i {
  font-size: 22px;
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: var(--bg-3);
  color: var(--text-2);
}
.docs-summary-card.kind-emirates_id i      { color: #fbbf24; background: rgba(245,158,11,0.12); }
.docs-summary-card.kind-insurance i        { color: #34d399; background: rgba(16,185,129,0.12); }
.docs-summary-card.kind-medical_clearance i{ color: #f87171; background: rgba(239,68,68,0.12); }
.docs-summary-card.kind-photo_id i         { color: #60a5fa; background: rgba(59,130,246,0.12); }
.docs-summary-card.kind-birth_certificate i{ color: #c4b5fd; background: rgba(168,85,247,0.12); }
.docs-summary-num   { font-size: 20px; font-weight: 800; color: var(--text-1); line-height: 1; }
.docs-summary-label { font-size: 11px; color: var(--text-3); margin-top: 4px; }

.docs-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.docs-filters .filter-input,
.docs-filters .filter-select {
  height: 34px; padding: 0 10px;
  background: var(--bg-3); border: 1px solid var(--border-1);
  border-radius: 8px; color: var(--text-1); font-size: 13px;
}
.docs-filters .filter-input { min-width: 180px; }

.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.doc-card {
  background: var(--bg-2);
  border: 1px solid var(--border-1);
  border-radius: 12px;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.doc-thumb {
  position: relative;
  height: 140px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-3);
  overflow: hidden;
}
.doc-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.doc-thumb > i {
  font-size: 48px;
  color: var(--text-3);
}
.doc-thumb > i.fa-file-pdf { color: #f87171; }
.doc-kind-tag {
  position: absolute; left: 8px; bottom: 8px;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px; font-weight: 600;
  background: rgba(0,0,0,0.55);
  color: #fff;
  backdrop-filter: blur(6px);
}
.doc-kind-tag i { font-size: 9px; }
.doc-kind-tag.kind-emirates_id      { background: rgba(245,158,11,0.85); }
.doc-kind-tag.kind-insurance        { background: rgba(16,185,129,0.85); }
.doc-kind-tag.kind-medical_clearance{ background: rgba(239,68,68,0.85); }
.doc-kind-tag.kind-photo_id         { background: rgba(59,130,246,0.85); }
.doc-kind-tag.kind-birth_certificate{ background: rgba(168,85,247,0.85); }

.doc-meta { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.doc-player {
  font-size: 14px; font-weight: 700; color: var(--text-1);
  display: flex; align-items: center; gap: 6px;
}
.doc-player i { font-size: 11px; opacity: .7; }
.doc-sub {
  display: flex; flex-wrap: wrap; gap: 10px;
  font-size: 11px; color: var(--text-3);
}
.doc-sub i { margin-right: 3px; opacity: .7; font-size: 10px; }
.doc-actions {
  display: flex; gap: 6px; margin-top: 6px;
  border-top: 1px solid var(--border-1); padding-top: 8px;
}
.doc-actions .btn-icon-sm { flex: 1; justify-content: center; }

/* Doc viewer modal (lightbox) */
.doc-viewer {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: center;
}
.doc-viewer[hidden] { display: none; }
.doc-viewer-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.78);
  backdrop-filter: blur(4px);
}
.doc-viewer-panel {
  position: relative;
  width: min(90vw, 1100px); height: min(90vh, 800px);
  background: var(--bg-2);
  border: 1px solid var(--border-1);
  border-radius: 14px;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.doc-viewer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-1);
}
.doc-viewer-title { font-weight: 700; font-size: 14px; }
.doc-viewer-actions { display: flex; gap: 8px; }
.doc-viewer-body {
  flex: 1; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  background: #000;
  overflow: auto;
}
.doc-viewer-body img,
.doc-viewer-body iframe {
  max-width: 100%; max-height: 100%;
  width: 100%; height: 100%;
  border: 0;
}
.doc-viewer-body img { object-fit: contain; }

/* ── Training create — weekday chips ── */
.weekday-row { display:flex; flex-wrap:wrap; gap:8px; margin-top:4px; }
.weekday-chip { display:inline-flex; align-items:center; gap:6px; padding:6px 12px;
  border:1px solid #2a2a2a; border-radius:999px; cursor:pointer; user-select:none;
  background:#141414; font-size:12.5px; font-weight:600; transition:all .15s; }
.weekday-chip input { accent-color:#E2AF33; }
.weekday-chip:has(input:checked) { background:rgba(226,175,51,.15); border-color:#E2AF33; color:#86efac; }
.weekday-row.disabled .weekday-chip { opacity:.45; cursor:not-allowed; }

/* ── Training event tag — pending ── */
.event-tag.pending { background:rgba(251,191,36,.15); color:#fbbf24; border:1px solid rgba(251,191,36,.4); }

/* ── Activity feed page (theme-aware) ──────────────────────── */
.activity-page{padding:0}
.activity-page-head{
  display:flex;justify-content:space-between;align-items:center;
  flex-wrap:wrap;gap:12px;margin-bottom:16px;
}
.activity-page-head h2{
  margin:0;font-size:22px;font-weight:700;
  color:var(--text-1);
}
.activity-subtitle{
  color:var(--text-3);font-size:13px;margin-top:4px;
}

.activity-card{
  background:var(--bg-2);
  border:1px solid var(--border-1);
  border-radius:12px;
  overflow:hidden;
}

.activity-filter-bar{
  display:flex;flex-wrap:wrap;gap:8px;
  padding:12px 16px;
  border-bottom:1px solid var(--border-1);
  background:var(--bg-1);
}
.activity-filter-chip{
  display:inline-flex;align-items:center;gap:6px;
  padding:6px 12px;border-radius:999px;
  background:var(--bg-3);color:var(--text-2);
  font-size:13px;font-weight:500;
  text-decoration:none;
  border:1px solid var(--border-1);
  transition:all .15s;
}
.activity-filter-chip:hover{
  background:var(--bg-4);
  border-color:var(--border-2);
  color:var(--text-1);
}
.activity-filter-chip.active{
  background:#1e40af;color:#fff;
  border-color:#1e3a8a;
}
.activity-filter-chip.active:hover{background:#1d4ed8;color:#fff}
.activity-filter-chip i{font-size:12px}

.activity-list-full{padding:0}
.activity-day-group + .activity-day-group{border-top:1px solid var(--border-1)}
.activity-day-header{
  padding:10px 16px;
  background:var(--bg-1);
  font-size:12px;font-weight:600;
  color:var(--text-3);
  text-transform:uppercase;letter-spacing:.5px;
  border-bottom:1px solid var(--border-1);
}

.activity-list-full .activity-row{
  display:flex;gap:12px;align-items:flex-start;
  padding:14px 16px;
  border-bottom:1px solid var(--border-1);
  transition:background .12s;
}
.activity-list-full .activity-row:hover{background:var(--bg-3)}
.activity-list-full .activity-row:last-child{border-bottom:none}

.activity-list-full .activity-icon{
  width:34px;height:34px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  flex-shrink:0;font-size:14px;
}
/* Coloured tinted backgrounds (work on dark or light) */
.activity-list-full .activity-icon.green{background:rgba(226,175,51,0.18);color:#4ade80}
.activity-list-full .activity-icon.red  {background:rgba(239,68,68,0.18);color:#f87171}
.activity-list-full .activity-icon.amber{background:rgba(245,158,11,0.18);color:#fbbf24}
.activity-list-full .activity-icon.blue {background:rgba(59,130,246,0.18);color:#60a5fa}
.activity-list-full .activity-icon.gray {background:rgba(148,163,184,0.18);color:#cbd5e1}

.activity-list-full .activity-body{flex:1;min-width:0}
.activity-list-full .activity-text{
  color:var(--text-1);
  font-size:14px;line-height:1.45;
  word-break:break-word;
}
.activity-list-full .activity-link{
  color:var(--text-1);
  text-decoration:none;
}
.activity-list-full .activity-link:hover{
  color:#60a5fa;
  text-decoration:underline;
}
.activity-list-full .activity-time{
  color:var(--text-4);
  font-size:12px;margin-top:3px;
}

.activity-empty{
  padding:48px 16px;text-align:center;
  color:var(--text-3);
}
.activity-empty i{font-size:32px;margin-bottom:12px;color:var(--text-4)}
.activity-empty-title{margin:0;color:var(--text-2);font-size:14px}
.activity-empty-sub{margin:6px 0 0;font-size:13px;color:var(--text-4)}

.activity-pagination{
  display:flex;justify-content:space-between;align-items:center;
  padding:12px 16px;
  border-top:1px solid var(--border-1);
  background:var(--bg-1);
}
.activity-pagination-info{color:var(--text-3);font-size:13px}

/* Light-theme overrides — make sure the page is readable when the user
   switches to the light theme. */
:root[data-theme="light"] .activity-list-full .activity-icon.green{background:#d1fae5;color:#047857}
:root[data-theme="light"] .activity-list-full .activity-icon.red  {background:#fee2e2;color:#b91c1c}
:root[data-theme="light"] .activity-list-full .activity-icon.amber{background:#fef3c7;color:#b45309}
:root[data-theme="light"] .activity-list-full .activity-icon.blue {background:#dbeafe;color:#1d4ed8}
:root[data-theme="light"] .activity-list-full .activity-icon.gray {background:#e5e7eb;color:#4b5563}
:root[data-theme="light"] .activity-list-full .activity-link:hover{color:#1d4ed8}

/* ── Phase 34 — Payment Categories (theme-aware) ──────────── */
.paycat-page{padding:0}
.paycat-head{
  display:flex;justify-content:space-between;align-items:center;
  flex-wrap:wrap;gap:12px;margin-bottom:16px;
}
.paycat-head h2{margin:0;font-size:22px;font-weight:700;color:var(--text-1)}
.paycat-sub{color:var(--text-3);font-size:13px;margin-top:4px;max-width:560px}

.paycat-card{
  background:var(--bg-2);
  border:1px solid var(--border-1);
  border-radius:12px;
  overflow:hidden;
}

.paycat-row{
  display:flex;gap:14px;align-items:center;
  padding:14px 16px;
  border-bottom:1px solid var(--border-1);
}
.paycat-row:last-child{border-bottom:none}
.paycat-row.inactive{opacity:.55}

.paycat-icon{
  width:40px;height:40px;border-radius:10px;
  display:flex;align-items:center;justify-content:center;
  flex-shrink:0;font-size:16px;
}
.paycat-icon.green {background:rgba(226,175,51,0.18); color:#4ade80}
.paycat-icon.red   {background:rgba(239,68,68,0.18); color:#f87171}
.paycat-icon.amber {background:rgba(245,158,11,0.18);color:#fbbf24}
.paycat-icon.blue  {background:rgba(59,130,246,0.18);color:#60a5fa}
.paycat-icon.purple{background:rgba(168,85,247,0.18);color:#c084fc}
.paycat-icon.gray  {background:rgba(148,163,184,0.18);color:#cbd5e1}

.paycat-body{flex:1;min-width:0}
.paycat-name{
  color:var(--text-1);font-size:15px;font-weight:600;
  display:flex;align-items:center;gap:8px;flex-wrap:wrap;
}
.paycat-meta{
  color:var(--text-3);font-size:12px;margin-top:4px;
  display:flex;gap:12px;flex-wrap:wrap;
}
.paycat-meta i{margin-right:4px;font-size:11px;opacity:.7}

.paycat-tag{
  display:inline-flex;align-items:center;gap:4px;
  font-size:11px;font-weight:500;
  padding:2px 8px;border-radius:999px;
  background:var(--bg-3);color:var(--text-2);
  border:1px solid var(--border-1);
}
.paycat-tag.mode-auto  {background:rgba(226,175,51,0.15); color:#4ade80;border-color:rgba(226,175,51,0.35)}
.paycat-tag.mode-manual{background:rgba(59,130,246,0.15);color:#60a5fa;border-color:rgba(59,130,246,0.35)}
.paycat-tag.inactive-tag{background:rgba(239,68,68,0.15);color:#f87171;border-color:rgba(239,68,68,0.35)}

.paycat-actions{display:flex;gap:6px;flex-shrink:0}
.btn-icon-sm.danger{color:#f87171}
.btn-icon-sm.danger:hover{background:rgba(239,68,68,0.12);color:#fca5a5}

.paycat-empty{
  padding:48px 16px;text-align:center;color:var(--text-3);
}
.paycat-empty i{font-size:32px;margin-bottom:12px;color:var(--text-4)}
.paycat-empty p{margin:0;color:var(--text-2)}

/* Modal form fields */
.users-modal .form-field{display:flex;flex-direction:column;gap:6px;margin-bottom:14px}
.users-modal .form-field>span{font-size:12px;font-weight:600;color:var(--text-3)}
.users-modal .form-field input[type="text"],
.users-modal .form-field input[type="number"],
.users-modal .form-field select{
  background:var(--bg-1);
  border:1px solid var(--border-1);
  border-radius:8px;
  padding:10px 12px;
  color:var(--text-1);font-size:14px;outline:none;
}
.users-modal .form-field input:focus,
.users-modal .form-field select:focus{
  border-color:rgba(59,130,246,0.5);
}
.users-modal .form-field.checkbox-field{
  flex-direction:row;align-items:center;gap:10px;
}
.users-modal .form-field.checkbox-field>span{font-size:14px;color:var(--text-1);font-weight:500}

.icon-grid{
  display:grid;grid-template-columns:repeat(8,1fr);gap:6px;
}
.icon-swatch{
  position:relative;display:flex;align-items:center;justify-content:center;
  width:36px;height:36px;border-radius:8px;
  background:var(--bg-1);border:1px solid var(--border-1);
  color:var(--text-2);cursor:pointer;font-size:14px;
  transition:all .12s;
}
.icon-swatch input{position:absolute;opacity:0;pointer-events:none}
.icon-swatch:hover{background:var(--bg-3);color:var(--text-1)}
.icon-swatch:has(input:checked){
  background:rgba(59,130,246,0.18);
  border-color:rgba(59,130,246,0.6);
  color:#60a5fa;
}

.color-row{display:flex;gap:8px;flex-wrap:wrap}
.color-swatch{
  position:relative;display:inline-flex;
  border-radius:50%;padding:3px;cursor:pointer;
  border:2px solid transparent;transition:all .12s;
}
.color-swatch input{position:absolute;opacity:0;pointer-events:none}
.color-swatch:has(input:checked){border-color:var(--text-1)}

/* Light-mode overrides */
:root[data-theme="light"] .paycat-icon.green {background:#d1fae5;color:#047857}
:root[data-theme="light"] .paycat-icon.red   {background:#fee2e2;color:#b91c1c}
:root[data-theme="light"] .paycat-icon.amber {background:#fef3c7;color:#b45309}
:root[data-theme="light"] .paycat-icon.blue  {background:#dbeafe;color:#1d4ed8}
:root[data-theme="light"] .paycat-icon.purple{background:#ede9fe;color:#6d28d9}
:root[data-theme="light"] .paycat-icon.gray  {background:#e5e7eb;color:#4b5563}

/* ── Phase 34 — Invoice 3-step wizard (theme-aware) ───────── */
.invoice-create-page{padding:0;max-width:920px}
.invoice-create-form{display:flex;flex-direction:column;gap:18px}

.invoice-step{
  background:var(--bg-2);
  border:1px solid var(--border-1);
  border-radius:12px;
  padding:18px 20px;
  transition:opacity .15s;
}
.invoice-step-head{display:flex;align-items:center;gap:12px;margin-bottom:14px}
.invoice-step-head h3{margin:0;font-size:16px;font-weight:600;color:var(--text-1)}
.invoice-step-num{
  width:28px;height:28px;border-radius:50%;
  background:rgba(59,130,246,0.18);color:#60a5fa;
  display:flex;align-items:center;justify-content:center;
  font-weight:700;font-size:13px;flex-shrink:0;
}

/* Step 1 — category cards */
.invoice-cat-grid{
  display:grid;gap:10px;
  grid-template-columns:repeat(auto-fill,minmax(220px,1fr));
}
.invoice-cat-card{
  position:relative;display:flex;gap:12px;align-items:center;
  background:var(--bg-1);
  border:1px solid var(--border-1);
  border-radius:10px;
  padding:12px;cursor:pointer;
  transition:all .12s;
}
.invoice-cat-card input{position:absolute;opacity:0;pointer-events:none}
.invoice-cat-card:hover{background:var(--bg-3);border-color:var(--border-2)}
.invoice-cat-card.selected{
  background:rgba(59,130,246,0.12);
  border-color:rgba(59,130,246,0.6);
  box-shadow:0 0 0 1px rgba(59,130,246,0.4) inset;
}
.invoice-cat-icon{
  width:40px;height:40px;border-radius:10px;
  display:flex;align-items:center;justify-content:center;
  flex-shrink:0;font-size:16px;
}
.invoice-cat-icon.green {background:rgba(226,175,51,0.18); color:#4ade80}
.invoice-cat-icon.red   {background:rgba(239,68,68,0.18); color:#f87171}
.invoice-cat-icon.amber {background:rgba(245,158,11,0.18);color:#fbbf24}
.invoice-cat-icon.blue  {background:rgba(59,130,246,0.18);color:#60a5fa}
.invoice-cat-icon.purple{background:rgba(168,85,247,0.18);color:#c084fc}
.invoice-cat-icon.gray  {background:rgba(148,163,184,0.18);color:#cbd5e1}
.invoice-cat-body{flex:1;min-width:0}
.invoice-cat-name{font-size:14px;font-weight:600;color:var(--text-1)}
.invoice-cat-meta{font-size:12px;color:var(--text-3);margin-top:3px;display:flex;gap:10px;flex-wrap:wrap}
.invoice-cat-recur{color:#4ade80}
.invoice-cat-recur i{margin-right:3px;font-size:10px}

/* Step 2 — recipient picker */
.invoice-pick-tabs{display:flex;gap:6px;margin-bottom:12px}
.invoice-tab{
  display:inline-flex;align-items:center;gap:6px;
  padding:8px 14px;border-radius:8px;
  background:var(--bg-1);color:var(--text-2);
  border:1px solid var(--border-1);
  font-size:13px;font-weight:500;cursor:pointer;
  transition:all .12s;
}
.invoice-tab:hover{background:var(--bg-3);color:var(--text-1)}
.invoice-tab.active{background:rgba(59,130,246,0.18);color:#60a5fa;border-color:rgba(59,130,246,0.5)}

.invoice-search-bar{
  display:flex;align-items:center;gap:8px;
  background:var(--bg-1);border:1px solid var(--border-1);border-radius:8px;
  padding:8px 12px;margin-bottom:10px;
}
.invoice-search-bar i{color:var(--text-4);font-size:13px}
.invoice-search-bar input{
  flex:1;background:transparent;border:none;outline:none;
  color:var(--text-1);font-size:14px;
}

.invoice-recipient-list{
  max-height:280px;overflow-y:auto;
  border:1px solid var(--border-1);border-radius:8px;
  background:var(--bg-1);
}
.invoice-recipient-row{
  display:flex;gap:10px;align-items:center;
  padding:10px 12px;cursor:pointer;
  border-bottom:1px solid var(--border-1);
}
.invoice-recipient-row:last-child{border-bottom:none}
.invoice-recipient-row:hover{background:var(--bg-3)}
.invoice-recipient-row input{flex-shrink:0}
.invoice-recipient-name{font-size:14px;font-weight:500;color:var(--text-1)}
.invoice-recipient-meta{font-size:12px;color:var(--text-3);margin-top:2px}
.invoice-recipient-meta i{font-size:10px;opacity:.7;margin-right:3px}
.invoice-recipient-summary{
  margin-top:10px;font-size:13px;color:var(--text-3);text-align:right;
}
.invoice-empty{padding:24px;text-align:center;color:var(--text-3)}

/* Step 3 — details */
.invoice-details-grid{
  display:grid;gap:12px;
  grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
}
.invoice-create-form .form-field{display:flex;flex-direction:column;gap:6px}
.invoice-create-form .form-field>span{font-size:12px;font-weight:600;color:var(--text-3)}
.invoice-create-form .form-field input,
.invoice-create-form .form-field select{
  background:var(--bg-1);
  border:1px solid var(--border-1);
  border-radius:8px;
  padding:10px 12px;
  color:var(--text-1);font-size:14px;outline:none;
}
.invoice-create-form .form-field input:focus,
.invoice-create-form .form-field select:focus{border-color:rgba(59,130,246,0.5)}
.invoice-create-form .form-field.checkbox-field{
  flex-direction:row;align-items:center;gap:10px;
}
.invoice-create-form .form-field.checkbox-field>span{font-size:14px;color:var(--text-1);font-weight:500}

.invoice-create-foot{
  display:flex;justify-content:flex-end;gap:10px;margin-top:18px;
}

/* ───────────────────────────────────────────────────────────
   Phase 34 — Compact Finance UI
   Mini KPI strip + chip filters + grouped rows + donut chart.
   Uses theme tokens so it works in dark + light modes.
   ─────────────────────────────────────────────────────────── */

/* Mini KPI strip ------------------------------------------- */
.fin-mini-strip{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin-bottom:16px;
}
@media (max-width: 900px){
  .fin-mini-strip{
    grid-template-columns:none;
    grid-auto-flow:column;
    grid-auto-columns:80%;
    overflow-x:auto;
    scroll-snap-type:x mandatory;
    padding-bottom:6px;
  }
  .fin-mini{ scroll-snap-align:start; }
}
.fin-mini{
  display:flex;align-items:center;gap:12px;
  background:var(--bg-2);
  border:1px solid var(--border-1);
  border-radius:12px;
  padding:12px 14px;
  min-height:72px;
  transition:border-color .15s ease, transform .15s ease;
}
.fin-mini:hover{ border-color:var(--border-2); }
.fin-mini-icon{
  width:38px;height:38px;flex:none;
  display:flex;align-items:center;justify-content:center;
  border-radius:10px;font-size:16px;
  background:rgba(100,116,139,0.15);
  color:var(--text-2);
}
.fin-mini.collected .fin-mini-icon{ background:rgba(16,185,129,0.18); color:#10b981; }
.fin-mini.pending   .fin-mini-icon{ background:rgba(245,158,11,0.18); color:#f59e0b; }
.fin-mini.overdue   .fin-mini-icon{ background:rgba(239,68,68,0.18);  color:#ef4444; }
.fin-mini.avg       .fin-mini-icon{ background:rgba(59,130,246,0.18); color:#3b82f6; }
.fin-mini-body{ display:flex;flex-direction:column;gap:2px;min-width:0; }
.fin-mini-label{
  font-size:11px;font-weight:600;letter-spacing:.04em;
  text-transform:uppercase;color:var(--text-3);
}
.fin-mini-value{
  font-size:18px;font-weight:700;color:var(--text-1);
  font-family:'Space Grotesk', system-ui, sans-serif;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.fin-mini-sub{ font-size:11px;color:var(--text-4); }

/* Two-column grid: list + donut ---------------------------- */
.fin-grid{
  display:grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap:16px;
  align-items:start;
}
@media (max-width: 1100px){
  .fin-grid{ grid-template-columns:1fr; }
}

/* Chip rows ----------------------------------------------- */
.fin-chip-row{
  display:flex;flex-wrap:wrap;gap:6px;
  padding:10px 14px;
  border-bottom:1px solid var(--border-1);
}
.fin-chip-row-cats{ background:var(--bg-1); }
.fin-chip{
  display:inline-flex;align-items:center;gap:6px;
  padding:6px 12px;
  border-radius:999px;
  font-size:12px;font-weight:600;
  background:var(--bg-2);
  color:var(--text-3);
  border:1px solid var(--border-1);
  cursor:pointer;
  transition:all .15s ease;
  white-space:nowrap;
}
.fin-chip:hover{
  border-color:var(--border-2);
  color:var(--text-1);
}
.fin-chip i{ font-size:11px; }
.fin-chip.active{
  background:rgba(59,130,246,0.15);
  border-color:rgba(59,130,246,0.5);
  color:#60a5fa;
}
.fin-chip.cat.active.color-green { background:rgba(16,185,129,0.18);  border-color:rgba(16,185,129,0.5);  color:#34d399; }
.fin-chip.cat.active.color-red   { background:rgba(239,68,68,0.18);   border-color:rgba(239,68,68,0.5);   color:#f87171; }
.fin-chip.cat.active.color-amber { background:rgba(245,158,11,0.18);  border-color:rgba(245,158,11,0.5);  color:#fbbf24; }
.fin-chip.cat.active.color-blue  { background:rgba(59,130,246,0.18);  border-color:rgba(59,130,246,0.5);  color:#60a5fa; }
.fin-chip.cat.active.color-purple{ background:rgba(168,85,247,0.18);  border-color:rgba(168,85,247,0.5);  color:#c084fc; }
.fin-chip.cat.active.color-gray  { background:rgba(100,116,139,0.18); border-color:rgba(100,116,139,0.5); color:#cbd5e1; }

/* Invoice rows -------------------------------------------- */
.fin-rows{ padding:6px 0 12px; }
.fin-month-group{ margin-bottom:4px; }
.fin-month-header{
  position:sticky;top:0;z-index:1;
  padding:8px 16px;
  font-size:11px;font-weight:700;
  letter-spacing:.06em;text-transform:uppercase;
  color:var(--text-4);
  background:var(--bg-1);
  border-top:1px solid var(--border-1);
  border-bottom:1px solid var(--border-1);
}
.fin-row{
  display:grid;
  grid-template-columns: 40px minmax(0,1fr) auto auto;
  align-items:center;gap:12px;
  padding:10px 16px;
  border-bottom:1px solid var(--border-1);
  transition:background .12s ease;
}
.fin-row:hover{ background:var(--bg-2); }
.fin-row-icon{
  width:36px;height:36px;border-radius:10px;
  display:flex;align-items:center;justify-content:center;
  font-size:14px;
  background:rgba(100,116,139,0.15);
  color:var(--text-2);
}
.fin-row-icon.color-green { background:rgba(16,185,129,0.18);  color:#34d399; }
.fin-row-icon.color-red   { background:rgba(239,68,68,0.18);   color:#f87171; }
.fin-row-icon.color-amber { background:rgba(245,158,11,0.18);  color:#fbbf24; }
.fin-row-icon.color-blue  { background:rgba(59,130,246,0.18);  color:#60a5fa; }
.fin-row-icon.color-purple{ background:rgba(168,85,247,0.18);  color:#c084fc; }
.fin-row-icon.color-gray  { background:rgba(100,116,139,0.18); color:#cbd5e1; }
.fin-row-main{ min-width:0; }
.fin-row-title{
  display:flex;align-items:baseline;gap:6px;flex-wrap:wrap;
  font-size:14px;color:var(--text-1);
}
.fin-row-name{ font-weight:600; }
.fin-row-cat{ color:var(--text-3);font-size:12px; }
.fin-row-sub{
  display:flex;align-items:center;gap:6px;flex-wrap:wrap;
  font-size:12px;color:var(--text-4);margin-top:2px;
}
.fin-row-sub .dot{ opacity:.5; }
.fin-row-rec{
  display:inline-flex;align-items:center;
  color:#60a5fa;font-size:11px;
}
.fin-row-right{
  display:flex;flex-direction:column;align-items:flex-end;gap:4px;
}
.fin-row-amount{
  font-family:'Space Grotesk', system-ui, sans-serif;
  font-weight:700;font-size:14px;color:var(--text-1);
  white-space:nowrap;
}
.fin-row-actions{
  display:flex;gap:4px;
}
.fin-row.status-overdue{
  background:rgba(239,68,68,0.04);
}
.fin-row.status-overdue .fin-row-amount{ color:#f87171; }

@media (max-width: 720px){
  .fin-row{ grid-template-columns: 36px minmax(0,1fr) auto; }
  .fin-row-actions{ grid-column: 2 / -1; justify-content:flex-end; margin-top:4px; }
}

/* Donut chart card ---------------------------------------- */
.fin-donut-card .card-head{
  display:flex;align-items:center;justify-content:space-between;
}
.fin-donut-wrap{
  display:flex;justify-content:center;align-items:center;
  padding:14px 8px 6px;
}
.fin-donut-svg{
  width:180px;height:180px;
}
.fin-donut-total{
  fill:var(--text-3);
  font-size:8px;font-weight:600;letter-spacing:.05em;
}
.fin-donut-amount{
  fill:var(--text-1);
  font-size:11px;font-weight:700;
  font-family:'Space Grotesk', system-ui, sans-serif;
}
.fin-donut-legend{
  list-style:none;margin:0;padding:8px 14px 14px;
  display:flex;flex-direction:column;gap:6px;
}
.fin-donut-legend li{
  display:grid;
  grid-template-columns: 12px 1fr auto auto;
  align-items:center;gap:8px;
  font-size:12px;color:var(--text-2);
}
.fin-donut-legend .dot-color{
  width:10px;height:10px;border-radius:3px;
}
.fin-donut-legend .leg-name{
  color:var(--text-1);font-weight:500;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.fin-donut-legend .leg-amt{
  color:var(--text-3);font-size:11px;
  font-family:'Space Grotesk', system-ui, sans-serif;
}
.fin-donut-legend .leg-pct{
  color:var(--text-4);font-size:11px;
  min-width:32px;text-align:right;
}

/* ───────────────────────────────────────────────────────────
   Phase 35 — Match editing (quick-edit drawer + full edit page)
   ─────────────────────────────────────────────────────────── */

/* Opponent logo on match cards (Matches list) */
.match-card .team-badge.opp-badge{
  background-color: var(--bg-3);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border-1);
  overflow: hidden;
}

/* Quick-edit drawer — logo block at top of form */
.qe-logo-row{
  display:flex;align-items:center;gap:14px;
  padding:12px;margin-bottom:14px;
  background:var(--bg-2);
  border:1px solid var(--border-1);
  border-radius:10px;
}
.qe-logo-preview{
  width:64px;height:64px;flex:none;border-radius:12px;
  background:var(--bg-3);
  border:1px solid var(--border-1);
  display:flex;align-items:center;justify-content:center;
  overflow:hidden;
}
.qe-logo-preview img{
  width:100%;height:100%;object-fit:cover;display:block;
}
.qe-logo-initials{
  font-family:'Space Grotesk',sans-serif;
  font-weight:700;font-size:22px;color:var(--text-2);
  display:flex;align-items:center;justify-content:center;
  width:100%;height:100%;
}
.qe-logo-actions{
  display:flex;flex-direction:column;gap:6px;align-items:flex-start;
}
.qe-logo-actions .btn{ cursor:pointer; }
.qe-logo-hint{ font-size:11px;color:var(--text-4); }

.qe-warn{
  display:flex;align-items:center;gap:8px;
  padding:10px 12px;margin:8px 0 4px;
  background:rgba(245,158,11,0.10);
  border:1px solid rgba(245,158,11,0.35);
  border-radius:8px;
  font-size:12px;color:var(--text-2);
}
.qe-warn i{ color:#f59e0b; }

/* Full edit page — opponent logo section */
.me-logo-section{
  padding:14px 16px;margin-bottom:16px;
  background:var(--bg-2);
  border:1px solid var(--border-1);
  border-radius:10px;
}
.me-logo-row{
  display:flex;align-items:center;gap:18px;
}
.me-logo-preview{
  width:96px;height:96px;flex:none;border-radius:14px;
  background:var(--bg-3);
  border:1px solid var(--border-1);
  display:flex;align-items:center;justify-content:center;
  overflow:hidden;
}
.me-logo-preview img{
  width:100%;height:100%;object-fit:cover;display:block;
}
.me-logo-initials{
  font-family:'Space Grotesk',sans-serif;
  font-weight:700;font-size:32px;color:var(--text-2);
  display:flex;align-items:center;justify-content:center;
  width:100%;height:100%;
}
.me-logo-actions{
  display:flex;flex-direction:column;gap:6px;
}
.me-logo-title{
  font-size:13px;font-weight:600;color:var(--text-1);
}
.me-logo-hint{ font-size:11px;color:var(--text-4); }
.me-logo-buttons{
  display:flex;gap:8px;margin-top:6px;flex-wrap:wrap;
}

.form-hint{
  display:inline-flex;align-items:center;gap:5px;
  font-size:11px;color:var(--text-4);margin-top:4px;
}
.form-hint i{ font-size:10px; }

/* Phase 35 — Opponent logo on My Matches and Schedule */
.mm-card { display:flex; align-items:center; gap:10px; }
.mm-opp {
  width:38px; height:38px; border-radius:50%;
  display:inline-flex; align-items:center; justify-content:center;
  background:var(--card-2,#1f2937); color:var(--text-2,#cbd5e1);
  font-size:12px; font-weight:600; flex-shrink:0;
  border:1px solid var(--border,rgba(255,255,255,0.08));
  margin-right:4px;
}
.event-opp-badge {
  display:inline-flex; align-items:center; justify-content:center;
  width:22px; height:22px; border-radius:50%;
  background:var(--card-2,#1f2937); color:var(--text-2,#cbd5e1);
  font-size:9px; font-weight:700; vertical-align:middle;
  margin-right:6px; flex-shrink:0;
  border:1px solid var(--border,rgba(255,255,255,0.08));
}

/* Phase 35 fix — quick-edit modal dark-mode override.
   The base .modal-* rules use --surface-1 with a #fff fallback (designed for the
   light theme). Force dark tokens here so the drawer matches the rest of the app. */
.modal-card {
  background: var(--bg-2, #111114);
  color: var(--text-1, #fff);
  border: 1px solid var(--border-1, rgba(255,255,255,0.06));
}
.modal-head {
  border-bottom-color: var(--border-1, rgba(255,255,255,0.08));
}
.modal-head h3 { color: var(--text-1, #fff); }
.modal-close { color: var(--text-3, #a1a1aa); }
.modal-close:hover { background: var(--bg-3, #18181d); color: var(--text-1, #fff); }
.modal-body label {
  color: var(--text-3, #a1a1aa);
}
.modal-body input[type="text"],
.modal-body input[type="number"],
.modal-body input[type="date"],
.modal-body input[type="time"],
.modal-body input[type="email"],
.modal-body select,
.modal-body textarea {
  background: var(--bg-3, #18181d);
  color: var(--text-1, #fff);
  border: 1px solid var(--border-1, rgba(255,255,255,0.10));
}
.modal-body input::placeholder,
.modal-body textarea::placeholder { color: var(--text-4, #71717a); }
/* Force dark UI for the native time/date pickers */
.modal-body input[type="date"],
.modal-body input[type="time"] { color-scheme: dark; }
.modal-body input:focus,
.modal-body select:focus,
.modal-body textarea:focus {
  outline: 2px solid var(--oryx-green, #C8962A);
  outline-offset: -2px;
  border-color: transparent;
  background: var(--bg-3, #18181d);
}
.modal-actions {
  border-top-color: var(--border-1, rgba(255,255,255,0.08));
}

/* Quick-edit logo preview row uses var(--bg-2) which is already dark, but the
   inner preview was using --bg-3; tighten contrast. */
.qe-logo-row {
  background: var(--bg-3, #18181d);
  border-color: var(--border-1, rgba(255,255,255,0.08));
}
.qe-logo-preview {
  background: var(--bg-2, #111114);
  border-color: var(--border-1, rgba(255,255,255,0.10));
}

/* Light-mode restore — keep the original Word-like look when user picks light */
html[data-theme="light"] .modal-card {
  background: #ffffff;
  color: #0f172a;
  border-color: #e5e7eb;
}
html[data-theme="light"] .modal-head { border-bottom-color: #e5e7eb; }
html[data-theme="light"] .modal-head h3 { color: #0f172a; }
html[data-theme="light"] .modal-body label { color: #6b7280; }
html[data-theme="light"] .modal-body input[type="text"],
html[data-theme="light"] .modal-body input[type="number"],
html[data-theme="light"] .modal-body input[type="date"],
html[data-theme="light"] .modal-body input[type="time"],
html[data-theme="light"] .modal-body input[type="email"],
html[data-theme="light"] .modal-body select,
html[data-theme="light"] .modal-body textarea {
  background: #ffffff; color: #0f172a;
  border-color: #e5e7eb; color-scheme: light;
}
html[data-theme="light"] .modal-actions { border-top-color: #e5e7eb; }

/* ─── Global admin search dropdown ─────────────────────────── */
.admin-search { position: relative; }
.admin-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  min-width: 360px;
  max-height: 480px;
  overflow-y: auto;
  background: var(--admin-bg-2, var(--bg-2, #111114));
  border: 1px solid var(--border-1, rgba(255,255,255,0.08));
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.5);
  z-index: 950;
  padding: 6px 0;
}
.admin-search-results[hidden] { display: none; }
.admin-search-section {
  padding: 8px 14px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-4, #71717a);
}
.admin-search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  cursor: pointer;
  color: var(--text-2, #d4d4d8);
  text-decoration: none;
  font-size: 13px;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}
.admin-search-item:hover,
.admin-search-item.is-active {
  background: var(--admin-bg-3, var(--bg-3, #18181d));
  color: var(--text-1, #fff);
}
.admin-search-item .ico {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--admin-bg-3, var(--bg-3, #18181d));
  color: var(--text-3, #a1a1aa);
  font-size: 12px;
  flex-shrink: 0;
}
.admin-search-item .body { flex: 1; min-width: 0; }
.admin-search-item .title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1, #fff);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.admin-search-item .meta {
  font-size: 11px;
  color: var(--text-3, #a1a1aa);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.admin-search-item mark {
  background: rgba(34, 197, 94, 0.22);
  color: inherit;
  padding: 0 2px;
  border-radius: 3px;
}
.admin-search-empty,
.admin-search-loading {
  padding: 16px 14px;
  font-size: 12px;
  color: var(--text-4, #71717a);
  text-align: center;
}
html[data-theme="light"] .admin-search-results {
  background: #fff;
  border-color: #e5e7eb;
  box-shadow: 0 18px 50px rgba(0,0,0,0.12);
}
html[data-theme="light"] .admin-search-item:hover,
html[data-theme="light"] .admin-search-item.is-active {
  background: #f3f4f6;
}

/* ─── Phase 36 — Avatar frames (player & staff) ───────────── */
/* Shared "AI avatar" framing: dark circular background with subtle
   radial gradient + soft inner ring. Works at every size from the
   32 px table cell up to the 160 px parent-dashboard hero. */
.av-frame {
  position: relative;
  border-radius: 50%;
  background-color: #0e0e10;
  background-image:
    radial-gradient(ellipse at center top, #1a1a1f 0%, #0e0e10 65%, #050507 100%);
  background-size: cover;
  background-position: center 20%;
  background-repeat: no-repeat;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,0.04),
    inset 0 -8px 16px rgba(0,0,0,0.4);
  flex-shrink: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--text-3, #a1a1aa);
}
.av-frame.has-photo {
  /* When a photo is present we composite over the dark gradient so any
     transparent background-removed PNG still has a clean studio backdrop. */
  background-blend-mode: normal;
}
.av-frame .av-fallback {
  font-size: 50%;
  opacity: 0.55;
}
.av-frame .av-edit {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--oryx-green, #E2AF33);
  color: #0a0a0b;
  border: 2px solid var(--admin-bg-1, #0a0a0b);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 10px;
  padding: 0;
  opacity: 1;
  transform: scale(1);
  transition: background .15s, transform .15s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  z-index: 2;
}
.av-frame:hover .av-edit { transform: scale(1.1); }
.av-frame .av-edit:hover { background: #C8962A; }
.av-frame.is-processing::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  border: 2px solid transparent;
  border-top-color: var(--oryx-green, #E2AF33);
  animation: av-spin 0.8s linear infinite;
}
@keyframes av-spin { to { transform: rotate(360deg); } }

/* Sizing helpers — small in tables, bigger on profile / dashboard */
.av-frame.av-sm   { width: 36px;  height: 36px; }
.av-frame.av-md   { width: 56px;  height: 56px; }
.av-frame.av-lg   { width: 96px;  height: 96px; }
.av-frame.av-xl   { width: 128px; height: 128px; }
.av-frame.av-hero { width: 168px; height: 168px; }

/* In the players table the existing .av sizing wins (32 px). We keep that
   look but let the camera overlay still appear. */
.table .player-cell .av.av-frame {
  width: 36px; height: 36px;
  border: 1px solid rgba(255,255,255,0.08);
}
.table .player-cell .av.av-frame .av-fallback { font-size: 14px; }
.table .player-cell .av.av-frame .av-edit { font-size: 8px; }

/* Coach distinguishing ring */
.av-frame.av-staff {
  box-shadow:
    inset 0 0 0 2px rgba(226,175,51,0.35),
    inset 0 -8px 16px rgba(0,0,0,0.4);
}

html[data-theme="light"] .av-frame {
  background-color: #f3f4f6;
  background-image:
    radial-gradient(ellipse at center top, #fafafa 0%, #f3f4f6 65%, #e5e7eb 100%);
  border-color: #e5e7eb;
  color: #6b7280;
  box-shadow: inset 0 0 0 2px rgba(0,0,0,0.03), inset 0 -8px 16px rgba(0,0,0,0.06);
}
html[data-theme="light"] .av-frame .av-edit {
  border-color: #fff;
}

/* ─── Phase 36 — Parent lineup view: "YOU" highlight on the parent's child ─── */
.pitch-slot.pitch-slot-mine .player-chip.placed-on-pitch .pc-avatar {
  border-color: #fbbf24;
  box-shadow:
    0 0 0 1px rgba(251,191,36,0.55),
    0 0 14px rgba(251,191,36,0.95),
    0 0 26px rgba(251,191,36,0.55);
}
.pitch-slot.pitch-slot-mine .player-chip.placed-on-pitch .pc-name {
  color: #fde68a;
}
.player-chip.pc-mine .pc-avatar {
  border-color: #fbbf24;
  box-shadow: 0 0 10px rgba(251,191,36,0.6);
}
.pc-mine-badge {
  position: absolute;
  top: -6px; right: -10px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #fbbf24;
  color: #1a1108;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.05em;
  border: 1.5px solid #06120a;
  z-index: 3;
  pointer-events: none;
}
.pitch-slot.pitch-slot-mine .player-chip.placed-on-pitch {
  position: relative;
}

/* ─── Phase 37 — Multi-team dropdown for match create ─── */
.ms-dropdown { position: relative; }
.ms-dropdown-btn {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px;
  background: var(--admin-bg-3);
  border: 1px solid var(--border-1);
  border-radius: 8px;
  color: var(--text-1);
  font-size: 13px;
  cursor: pointer;
  text-align: left;
}
.ms-dropdown-btn:hover { border-color: rgba(226,175,51,0.40); }
.ms-dropdown-btn[aria-expanded="true"] { border-color: rgba(226,175,51,0.55); }
.ms-dropdown-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-1); }
.ms-dropdown-label.placeholder { color: var(--text-4); }
.ms-dropdown-menu {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  z-index: 50;
  max-height: 280px; overflow-y: auto;
  background: var(--admin-bg-3);
  border: 1px solid var(--border-1);
  border-radius: 8px;
  padding: 4px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.45);
}
.ms-dropdown-menu[hidden] { display: none; }
.ms-dropdown-empty { padding: 12px; color: var(--text-4); font-size: 12px; text-align: center; }
.ms-dropdown-opt {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-2);
}
.ms-dropdown-opt:hover { background: var(--admin-bg-4); }
.ms-dropdown-opt input[type="checkbox"] { accent-color: var(--oryx-green-bright, #E2AF33); }
.ms-dropdown-dot {
  width: 10px; height: 10px; border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.25) inset;
}
.ms-dropdown-text { flex: 1; }
.ms-dropdown-primary-tag {
  font-size: 9px; font-weight: 700; letter-spacing: 0.06em;
  padding: 2px 6px; border-radius: 999px;
  background: rgba(226,175,51,0.18);
  color: var(--oryx-green-bright, #E2AF33);
  border: 1px solid rgba(226,175,51,0.35);
  text-transform: uppercase;
}
.ms-dropdown-opt input[type="checkbox"]:checked ~ .ms-dropdown-text { color: var(--text-1); font-weight: 600; }

/* Picker player rows: team color pill + cross-team badge */
.picker-team-group { margin-top: 12px; }
.picker-team-group:first-of-type { margin-top: 0; }
.picker-team-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-4);
  padding: 6px 4px;
  border-bottom: 1px solid var(--border-1);
  margin-bottom: 8px;
}
.picker-team-head .team-color-dot {
  width: 8px; height: 8px; border-radius: 50%;
  flex-shrink: 0;
}
.picker-team-head .team-count { margin-left: auto; color: var(--text-3); font-weight: 600; }
.picker-row .team-pill {
  font-size: 9px; font-weight: 700; letter-spacing: 0.04em;
  padding: 2px 7px; border-radius: 999px;
  text-transform: uppercase;
  margin-left: 6px;
  white-space: nowrap;
}
.picker-row .double-booked-warn {
  font-size: 10px; color: #fbbf24;
  margin-top: 2px;
}

/* ─── Phase 39 — Birthday widgets ─────────────────────────── */
.bday-banner {
  background: linear-gradient(135deg, #fff7ed 0%, #ffe9d6 100%);
  border: 1px solid #f4c585;
  border-left: 4px solid #e89a3c;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.bday-banner-head {
  display: flex; align-items: center; gap: 8px;
  color: #b45309; font-size: 14px; margin-bottom: 6px;
}
.bday-banner-head i { font-size: 16px; }
.bday-banner-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 10px 16px;
}
.bday-banner-list li {
  display: flex; flex-direction: column;
  background: rgba(255,255,255,0.6);
  padding: 6px 12px; border-radius: 6px;
}
.bday-banner-list .bday-name { font-weight: 600; color: #1f2937; font-size: 14px; }
.bday-banner-list .bday-meta { font-size: 12px; color: #6b7280; }

.bday-list { list-style: none; padding: 0; margin: 0; }
.bday-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; border-bottom: 1px solid var(--border-1);
}
.bday-row:last-child { border-bottom: none; }
.bday-row-left { display: flex; align-items: center; gap: 12px; }
.bday-row-left i {
  font-size: 14px; color: #e89a3c;
  background: #fff7ed; width: 32px; height: 32px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.bday-row-name { font-weight: 600; font-size: 14px; color: var(--text-1); }
.bday-row-meta { font-size: 12px; color: var(--text-3); }
.bday-row-right { text-align: right; }
.bday-row-date { display: block; font-weight: 600; font-size: 13px; color: var(--text-1); }
.bday-row-days { font-size: 11px; color: var(--text-3); }

/* ─── Phase 40 — Post-match notes + Match result ─────────────────────────── */
.mr-grid {
  display: flex; align-items: flex-end; justify-content: center;
  gap: 18px; margin: 10px 0 6px 0;
}
.mr-side { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 0 0 auto; }
.mr-side-label {
  font-size: 12px; font-weight: 600; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.mr-score-input {
  width: 92px; height: 72px;
  font-size: 38px; font-weight: 700; text-align: center;
  border: 2px solid var(--border-1); border-radius: 10px;
  background: #fff; color: var(--text-1);
  font-variant-numeric: tabular-nums;
}
.mr-score-input:focus {
  outline: none; border-color: #e89a3c;
  box-shadow: 0 0 0 3px rgba(232,154,60,0.15);
}
.mr-dash {
  font-size: 38px; font-weight: 700; color: var(--text-3);
  padding-bottom: 16px;
}
.mr-feedback {
  margin-top: 12px; padding: 10px 14px; border-radius: 8px;
  font-size: 13px; font-weight: 500;
}
.mr-feedback-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.mr-feedback-error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.mr-feedback-info    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

.pill-success {
  background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0;
  padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600;
}
.pill-muted {
  background: #f3f4f6; color: #6b7280; border: 1px solid #e5e7eb;
  padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 500;
  margin-left: 6px;
}

.pmn-players { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.pmn-player-row {
  border: 1px solid var(--border-1); border-radius: 10px;
  padding: 10px 12px; background: #fafbfc;
}
.pmn-player-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px; flex-wrap: wrap; gap: 6px;
}
.pmn-player-name { font-weight: 600; font-size: 14px; color: var(--text-1); }
.pmn-player-parent { font-size: 12px; }
.pmn-player-note {
  width: 100%; border: 1px solid var(--border-1); border-radius: 6px;
  padding: 8px; font-size: 13px; font-family: inherit; resize: vertical;
  background: #fff;
}
.pmn-player-note:focus {
  outline: none; border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.pmn-player-count { display: block; text-align: right; margin-top: 4px; font-size: 11px; }
.pmn-locked { background: #f9fafb; cursor: not-allowed; color: var(--text-3); }

@media (max-width: 520px) {
  .mr-score-input { width: 72px; height: 60px; font-size: 30px; }
  .mr-dash { font-size: 30px; padding-bottom: 12px; }
}
