/* ============================================================
   Watkins Ops — Global Styles
   Brand: Navy #003a5d | Gold #f8a81c | Sky #4fc3e8 | Orange #e67a2c
   Font: League Spartan (Google Fonts)
   ============================================================ */

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

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:   #003a5d;
  --gold:   #f8a81c;
  --sky:    #4fc3e8;
  --orange: #e67a2c;
  --green:  #104c2d;
  --muted-gold: #d5a74f;
  --white:  #ffffff;
  --black:  #000000;
  --gray-50:  #f8f9fa;
  --gray-100: #f1f3f5;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #6c757d;
  --gray-700: #495057;
  --gray-800: #343a40;
  --gray-900: #212529;
  --sidebar-w: 230px;
  --topbar-h: 60px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 4px rgba(0,0,0,.10);
  --shadow-md: 0 4px 16px rgba(0,0,0,.12);
  --transition: .18s ease;
}

html { font-size: 15px; }
body {
  font-family: 'League Spartan', sans-serif;
  background: var(--gray-50);
  color: var(--gray-900);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}
.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.sidebar-logo .logo-mark {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: -.5px;
  display: block;
  line-height: 1.1;
}
.sidebar-logo .logo-sub {
  font-size: .7rem;
  font-weight: 600;
  color: rgba(255,255,255,.5);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 2px;
}
.sidebar-section-label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
  padding: 18px 20px 6px;
}
.sidebar-nav { flex: 1; padding: 8px 0; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: rgba(255,255,255,.75);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 600;
  transition: background var(--transition), color var(--transition);
  border-left: 3px solid transparent;
}
.sidebar-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar-nav a.active {
  background: rgba(248,168,28,.12);
  color: var(--gold);
  border-left-color: var(--gold);
}
.sidebar-nav a .nav-icon { font-size: 1rem; width: 18px; text-align: center; }
.sidebar-footer {
  padding: 14px 20px;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: .75rem;
  color: rgba(255,255,255,.35);
}

/* ── Main wrapper ─────────────────────────────────────────── */
.main-wrapper {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Topbar ───────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  height: var(--topbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
  z-index: 90;
}
.topbar-title {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--navy);
  letter-spacing: -.3px;
}
.topbar-spacer { flex: 1; }
.topbar-search {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  padding: 6px 12px;
  font-family: 'League Spartan', sans-serif;
  font-size: .82rem;
  width: 200px;
  color: var(--gray-800);
  outline: none;
}
.topbar-search:focus { border-color: var(--sky); }

/* ── Page content ─────────────────────────────────────────── */
.page-content { padding: 24px; flex: 1; }

/* ── Page header ──────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.page-header h1 {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--navy);
  letter-spacing: -.5px;
}
.page-header-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius);
  font-family: 'League Spartan', sans-serif;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary   { background: var(--gold); color: var(--navy); }
.btn-primary:hover { background: #e09a10; }
.btn-secondary { background: var(--navy); color: var(--white); }
.btn-secondary:hover { background: #002a44; }
.btn-outline   { background: transparent; border: 1.5px solid var(--gray-300); color: var(--gray-700); }
.btn-outline:hover { border-color: var(--navy); color: var(--navy); background: var(--gray-50); }
.btn-ghost     { background: transparent; color: var(--gray-600); padding: 6px 10px; }
.btn-ghost:hover { background: var(--gray-100); color: var(--navy); }
.btn-danger    { background: #dc3545; color: #fff; }
.btn-danger:hover { background: #b02a37; }
.btn-sm { padding: 5px 11px; font-size: .76rem; }
.btn-icon { padding: 7px 8px; }

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.card-header {
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-header h3 {
  font-size: .95rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -.2px;
}
.card-header-actions { margin-left: auto; }
.card-body { padding: 20px; }

/* ── KPI grid ─────────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.kpi-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.kpi-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray-500);
  margin-bottom: 6px;
}
.kpi-value {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--navy);
  letter-spacing: -1px;
  line-height: 1;
}
.kpi-value.gold  { color: var(--gold); }
.kpi-value.sky   { color: var(--sky); }
.kpi-value.green { color: #198754; }
.kpi-value.red   { color: #dc3545; }
.kpi-sub {
  font-size: .72rem;
  color: var(--gray-500);
  margin-top: 4px;
  font-weight: 600;
}

/* ── Tables ───────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; }
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
}
table.data-table thead th {
  padding: 10px 14px;
  text-align: left;
  font-weight: 800;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--gray-500);
  border-bottom: 2px solid var(--gray-200);
  white-space: nowrap;
}
table.data-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
  color: var(--gray-800);
}
table.data-table tbody tr:hover { background: var(--gray-50); }
table.data-table tbody tr:last-child td { border-bottom: none; }

/* ── Clickable event name links in tables ─────────────────── */
a.event-link {
  color: var(--navy);
  text-decoration: none;
  font-weight: 800;
  transition: color .15s;
}
a.event-link:hover {
  color: var(--sky);
  text-decoration: underline;
  text-decoration-color: var(--sky);
}

/* ── Sortable column headers ──────────────────────────────── */
th[data-col] { cursor: pointer; user-select: none; white-space: nowrap; }
th[data-col]:hover { background: #e3edf5; }
th[data-col]::after { content: ' ⇅'; font-size: .7em; opacity: .45; }
th[data-col].sort-asc::after  { content: ' ▲'; opacity: .9; color: var(--gold); }
th[data-col].sort-desc::after { content: ' ▼'; opacity: .9; color: var(--gold); }

/* ── Status pills for 1099 / SafeSport / compliance ─────── */
.comp-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 20px;
  font-size: .67rem; font-weight: 800; text-transform: uppercase; letter-spacing: .4px;
  white-space: nowrap;
}
.comp-ok      { background:#e8f5e9; color:#1b5e20; border:1px solid #a5d6a7; }
.comp-missing { background:#ffebee; color:#b71c1c; border:1px solid #ef9a9a; }
.comp-expired { background:#fff3e0; color:#b84a00; border:1px solid #ffcc80; }
.comp-na      { background:var(--gray-100); color:var(--gray-500); border:1px solid var(--gray-300); }

/* ── Actual vs Projected toggle ──────────────────────────── */
.actual-badge {
  display:inline-block; padding:1px 7px; border-radius:10px;
  font-size:.67rem; font-weight:800; text-transform:uppercase;
  background:#e8f5e9; color:#1b5e20; border:1px solid #a5d6a7; margin-left:4px;
}
.proj-badge {
  display:inline-block; padding:1px 7px; border-radius:10px;
  font-size:.67rem; font-weight:800; text-transform:uppercase;
  background:#e3edf5; color:var(--navy); border:1px solid #b6d0e2; margin-left:4px;
}
.actual-positive { color:#1b5e20; font-weight:800; }
.actual-negative { color:#b71c1c; font-weight:800; }
.actual-neutral  { color:var(--gray-600); font-weight:700; }

/* ── Badges ───────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .6px;
  white-space: nowrap;
}
.badge-gold    { background: #fff8e1; color: #a06a00; border: 1px solid #ffe082; }
.badge-navy    { background: #e3edf5; color: var(--navy); border: 1px solid #b6d0e2; }
.badge-sky     { background: #e1f5fc; color: #006e99; border: 1px solid #b3e5fc; }
.badge-orange  { background: #fff3e0; color: #b84a00; border: 1px solid #ffcc80; }
.badge-green   { background: #e8f5e9; color: #1b5e20; border: 1px solid #a5d6a7; }
.badge-red     { background: #ffebee; color: #b71c1c; border: 1px solid #ef9a9a; }
.badge-gray    { background: var(--gray-100); color: var(--gray-600); border: 1px solid var(--gray-300); }
.badge-purple  { background: #f3e5f5; color: #4a148c; border: 1px solid #ce93d8; }
.badge-teal    { background: #e0f2f1; color: #00695c; border: 1px solid #80cbc4; }
.badge-unassigned { background: #f5f5f5; color: #757575; border: 1px dashed #bdbdbd; font-style: italic; }

/* ── Tabs ─────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: 20px;
  overflow-x: auto;
}
.tab-btn {
  padding: 10px 18px;
  font-family: 'League Spartan', sans-serif;
  font-size: .8rem;
  font-weight: 700;
  color: var(--gray-500);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--transition), border-color var(--transition);
}
.tab-btn:hover { color: var(--navy); }
.tab-btn.active { color: var(--navy); border-bottom-color: var(--gold); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Filter bar ───────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.filter-bar select, .filter-bar input {
  font-family: 'League Spartan', sans-serif;
  font-size: .8rem;
  padding: 7px 12px;
  border: 1.5px solid var(--gray-300);
  border-radius: 6px;
  color: var(--gray-800);
  background: var(--white);
  outline: none;
  transition: border-color var(--transition);
}
.filter-bar select:focus, .filter-bar input:focus { border-color: var(--sky); }

/* ── Modals ───────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  width: 540px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.modal-lg { width: 780px; }
.modal-header {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal-header h2 {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--navy);
}
.modal-close {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--gray-500);
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
}
.modal-close:hover { background: var(--gray-100); color: var(--navy); }
.modal-body { padding: 22px; flex: 1; }
.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* ── Forms ────────────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group.full { grid-column: 1 / -1; }
.form-label {
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--gray-600);
}
.form-control {
  font-family: 'League Spartan', sans-serif;
  font-size: .85rem;
  padding: 9px 12px;
  border: 1.5px solid var(--gray-300);
  border-radius: 6px;
  color: var(--gray-900);
  background: var(--white);
  outline: none;
  transition: border-color var(--transition);
}
.form-control:focus { border-color: var(--sky); }
.form-control-calc {
  background: var(--gray-50);
  border-style: dashed;
  color: var(--gray-600);
}
.form-hint { font-size: .7rem; color: var(--gray-500); font-weight: 500; }
.form-section-title {
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--navy);
  padding: 14px 0 8px;
  border-bottom: 2px solid var(--gold);
  margin-bottom: 14px;
}

/* ── Two-column page layout ───────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

/* ── Summary panel ────────────────────────────────────────── */
.summary-panel {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: sticky;
  top: 80px;
}
.summary-panel .sp-title {
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--gold);
  margin-bottom: 16px;
}
.summary-panel .sp-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: .82rem;
}
.summary-panel .sp-row:last-child { border-bottom: none; }
.summary-panel .sp-row .sp-label { color: rgba(255,255,255,.7); font-weight: 600; }
.summary-panel .sp-row .sp-val   { font-weight: 800; }
.summary-panel .sp-row.highlight .sp-val { color: var(--gold); font-size: 1.1rem; }
.summary-panel .sp-divider { border: none; border-top: 1px solid rgba(255,255,255,.18); margin: 10px 0; }

/* ── Alert / needs panel ──────────────────────────────────── */
.alert-panel { display: flex; flex-direction: column; gap: 8px; }
.alert-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: .82rem;
}
.alert-item.alert-red    { background: #fff5f5; border-color: #fecaca; }
.alert-item.alert-yellow { background: #fffbeb; border-color: #fde68a; }
.alert-item.alert-sky    { background: #f0f9ff; border-color: #bae6fd; }
.alert-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.alert-body { flex: 1; }
.alert-body strong { display: block; font-weight: 800; color: var(--navy); margin-bottom: 2px; }
.alert-body span { color: var(--gray-600); font-size: .78rem; }
.alert-action { flex-shrink: 0; }

/* ── Progress bars ────────────────────────────────────────── */
.progress-bar-wrap {
  background: var(--gray-200);
  border-radius: 20px;
  height: 8px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  border-radius: 20px;
  background: var(--gold);
  transition: width .5s ease;
}
.progress-bar.green { background: #198754; }
.progress-bar.red   { background: #dc3545; }
.progress-bar.sky   { background: var(--sky); }

/* ── Section grid 2-col ───────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; margin-bottom: 20px; }
@media (max-width: 780px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ── Breadcrumb ───────────────────────────────────────────── */
.breadcrumb {
  font-size: .76rem;
  color: var(--gray-500);
  font-weight: 600;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.breadcrumb a { color: var(--sky); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ── Membership pill ──────────────────────────────────────── */
.memb-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.memb-avp-bronze { background: #fdebd0; color: #784212; border: 1px solid #e59866; }
.memb-avp-silver { background: #eceff1; color: #455a64; border: 1px solid #b0bec5; }
.memb-avp-gold   { background: #fff8e1; color: #a06a00; border: 1px solid #ffe082; }
.memb-usav-rmr   { background: #e8eaf6; color: #283593; border: 1px solid #9fa8da; }
.memb-missing    { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }

/* ── Payment dot ──────────────────────────────────────────── */
.pay-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 5px;
  flex-shrink: 0;
}
.pay-paid    { background: #198754; }
.pay-partial { background: var(--gold); }
.pay-unpaid  { background: #dc3545; }

/* ── Toast ────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--navy);
  color: var(--white);
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: .82rem;
  font-weight: 700;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideIn .25s ease;
  max-width: 300px;
}
.toast.toast-success { border-left: 4px solid var(--gold); }
.toast.toast-error   { border-left: 4px solid #dc3545; }
@keyframes slideIn { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── Neon night special style ─────────────────────────────── */
.neon-badge {
  background: linear-gradient(135deg, #7c3aed, #db2777);
  color: #fff;
  border: none;
  text-shadow: 0 0 6px rgba(255,255,255,.4);
}
.neon-row { background: linear-gradient(90deg, rgba(124,58,237,.04), transparent); }

/* ── Utility ──────────────────────────────────────────────── */
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted  { color: var(--gray-500); font-size: .8rem; }
.text-green  { color: #198754; font-weight: 700; }
.text-red    { color: #dc3545; font-weight: 700; }
.text-gold   { color: var(--gold); font-weight: 700; }
.text-navy   { color: var(--navy); font-weight: 700; }
.fw-800 { font-weight: 800; }
.fw-700 { font-weight: 700; }
.mt-8  { margin-top: 8px; }
.mt-14 { margin-top: 14px; }
.mt-20 { margin-top: 20px; }
.mb-14 { margin-bottom: 14px; }
.mb-20 { margin-bottom: 20px; }
.flex-center { display: flex; align-items: center; gap: 8px; }
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--gray-500);
  font-size: .9rem;
  font-weight: 600;
}

/* ── Dropdown menu ────────────────────────────────────────── */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 180px;
  z-index: 150;
  overflow: hidden;
}
.dropdown-menu.open { display: block; }
.dropdown-menu a, .dropdown-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 14px;
  font-family: 'League Spartan', sans-serif;
  font-size: .8rem;
  font-weight: 700;
  color: var(--gray-700);
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition);
}
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--gray-50); color: var(--navy); }
.dropdown-divider { height: 1px; background: var(--gray-200); margin: 4px 0; }
