/* Even Playground UI (EP Brand Guide aligned)
   Brand colors from "EP - Brand Guide.pdf":
   - Royal Purple: #4B2E83
   - Dark Purple:  #2F1C5A
   - Light Purple: #6A4FB3
   - Playground Lime: #7AC142
   - Electric Cyan: #1EB6E8
   - Soft Grey: #F2F4F7
*/

:root{
  --ep-purple:#4B2E83;
  --ep-purple-dark:#2F1C5A;
  --ep-purple-light:#6A4FB3;
  --ep-lime:#7AC142;
  --ep-cyan:#1EB6E8;
  --ep-surface:#FFFFFF;
  --ep-bg:#F2F4F7;

  --text:#0b1020;
  --text-muted:#5b6478;
  --border:rgba(47,28,90,.14);

  --radius-sm:4px;
  --radius:8px;
  --radius-md:12px;
  --shadow-sm:0 1px 3px rgba(47,28,90,.08);
  --shadow:0 2px 8px rgba(47,28,90,.10);
  --shadow-md:0 8px 24px rgba(47,28,90,.14);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background:var(--ep-bg);
  color:var(--text);
}
a{color:var(--ep-cyan);text-decoration:none}
a:hover{text-decoration:underline}

.container{max-width:1120px;margin:0 auto;padding:0 18px}

/* Top nav (public) */
.topbar{background:var(--ep-surface);border-bottom:1px solid var(--border)}
.topbar .row{display:flex;gap:18px;align-items:center;padding:16px 0;flex-wrap:wrap}
.brand{font-weight:900;letter-spacing:.2px;color:var(--ep-purple-dark)}
.pill{
  display:inline-flex;align-items:center;gap:10px;
  padding:6px 12px;border-radius:9999px;
  background:rgba(30,182,232,.10);color:var(--ep-purple-dark);
  border:1px solid rgba(30,182,232,.22);
  font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.6px;
}

/* Shell (authenticated) */
.shell{min-height:100vh;display:grid;grid-template-columns:260px 1fr}
.sidebar-toggle{
  display:inline-flex;align-items:center;justify-content:center;
  width:40px;height:40px;border-radius:10px;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(255,255,255,.08);
  color:#fff;cursor:pointer;
}
.sidebar-toggle:hover{background:rgba(255,255,255,.12)}

body.sidebar-collapsed .shell{grid-template-columns:84px 1fr}
body.sidebar-collapsed .sidebar{padding:18px 12px}
body.sidebar-collapsed .sidebar .role{display:none}
body.sidebar-collapsed .nav a{justify-content:center}
body.sidebar-collapsed .nav a .nav-label{display:none}
body.sidebar-collapsed .nav a .nav-dot{display:inline-block}
.nav-dot{
  display:none;
  width:10px;height:10px;border-radius:9999px;
  background:rgba(255,255,255,.68);
}
body.sidebar-collapsed .nav a.active .nav-dot{background:var(--ep-lime)}
.sidebar{
  background:linear-gradient(180deg,var(--ep-purple-dark),var(--ep-purple));
  color:#fff;
  padding:22px 18px;
}
.sidebar .logo{font-weight:900;font-size:16px;letter-spacing:.3px}
.sidebar .role{margin-top:6px;font-size:12px;color:rgba(255,255,255,.78)}
.nav{margin-top:18px;display:flex;flex-direction:column;gap:6px}
.nav a{
  display:flex;align-items:center;gap:10px;
  padding:10px 12px;border-radius:10px;
  color:#fff;text-decoration:none;
}
.nav a:hover{background:rgba(255,255,255,.08)}
.nav a.active{background:rgba(122,193,66,.18);border:1px solid rgba(122,193,66,.32)}
.main{padding:26px}
.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px}
.page-title{margin:0;font-size:22px;line-height:1.2;color:var(--ep-purple-dark)}
.page-sub{margin:6px 0 0;color:var(--text-muted)}
.actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}

/* Cards / sections */
.card{
  background:var(--ep-surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow-sm);
  padding:18px;
}
.card.elevated{border:0;box-shadow:var(--shadow)}
.grid{display:grid;gap:14px}
.grid.cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.grid.cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:980px){.grid.cols-3{grid-template-columns:1fr}}
@media(max-width:760px){
  .shell{grid-template-columns:1fr}
  .sidebar{position:sticky;top:0;z-index:2}
  .main{padding:18px}
}

/* Buttons */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:10px;
  height:42px;
  padding:0 16px;
  border-radius:var(--radius);
  border:1px solid transparent;
  font-weight:900;
  letter-spacing:.2px;
  cursor:pointer;
  text-decoration:none;
  user-select:none;
}
.btn:disabled{opacity:.45;cursor:not-allowed}
.btn-primary{
  background:var(--ep-lime);
  color:var(--ep-purple-dark);
}
.btn-primary:hover{filter:brightness(.96)}
.btn-secondary{
  background:transparent;
  color:var(--ep-purple-dark);
  border-color:rgba(47,28,90,.35);
}
.btn-secondary:hover{background:rgba(47,28,90,.06)}
.btn-ghost{
  background:transparent;color:var(--text-muted);border-color:transparent;
}
.btn-ghost:hover{background:rgba(242,244,247,.9)}
.btn-danger{
  background:#dc2626;color:#fff;border-color:transparent;
}
.btn-danger:hover{filter:brightness(.96)}
.btn-sm{height:32px;padding:0 12px;font-size:13px}
.btn-lg{height:48px;padding:0 18px;font-size:16px}

/* Inputs */
.field{display:flex;flex-direction:column;gap:6px;margin-bottom:14px}
.label{font-size:12px;font-weight:900;letter-spacing:.7px;text-transform:uppercase;color:var(--ep-purple-dark)}
.input, select.input, textarea.input{
  width:100%;
  padding:10px 14px;
  border-radius:var(--radius);
  border:1px solid rgba(47,28,90,.22);
  background:var(--ep-surface);
  outline:none;
}
.input:focus{
  border-color:rgba(30,182,232,.95);
  box-shadow:0 0 0 3px rgba(30,182,232,.18);
}
.help{font-size:12px;color:var(--text-muted)}
.error{font-size:12px;color:#dc2626}

/* Badges */
.chip{
  display:inline-flex;align-items:center;
  padding:4px 12px;border-radius:var(--radius-sm);
  font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.5px;
  border:1px solid rgba(47,28,90,.14);
  background:#fff;color:var(--ep-purple-dark);
}
.chip.success{background:rgba(122,193,66,.16);border-color:rgba(122,193,66,.30)}
.chip.info{background:rgba(30,182,232,.12);border-color:rgba(30,182,232,.26)}
.chip.warn{background:rgba(234,179,8,.14);border-color:rgba(234,179,8,.28)}
.chip.error{background:rgba(220,38,38,.12);border-color:rgba(220,38,38,.22)}

/* Tables (simple) */
table{width:100%;border-collapse:collapse}
th,td{padding:12px 10px;border-bottom:1px solid rgba(47,28,90,.10);text-align:left}
th{font-size:12px;text-transform:uppercase;letter-spacing:.6px;color:var(--ep-purple-dark)}

/* ============================================================
   Two-column auth layout (login + admin login)
   Brand panel left, form panel right. Full viewport.
   ============================================================ */
.auth-shell{
  min-height:100vh;
  width:100%;
  display:grid;
  grid-template-columns:minmax(0,7fr) minmax(0,3fr);
  background:var(--ep-bg);
}
.auth-aside{
  position:relative;
  background:linear-gradient(135deg,var(--ep-purple-dark) 0%,var(--ep-purple) 60%,var(--ep-purple-light) 100%);
  color:#fff;
  padding:clamp(48px,5vw,96px) clamp(40px,5vw,120px);
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  overflow:hidden;
}
.auth-aside.admin{
  background:linear-gradient(135deg,#1a0f3a 0%,var(--ep-purple-dark) 55%,var(--ep-purple) 100%);
}
.auth-aside::after{
  content:"";
  position:absolute;
  right:-160px;bottom:-160px;
  width:480px;height:480px;border-radius:9999px;
  background:radial-gradient(circle at 30% 30%, rgba(30,182,232,.42), rgba(30,182,232,0) 60%);
  pointer-events:none;
}
.auth-aside::before{
  content:"";
  position:absolute;
  left:-120px;top:-120px;
  width:360px;height:360px;border-radius:9999px;
  background:radial-gradient(circle at 70% 70%, rgba(122,193,66,.30), rgba(122,193,66,0) 60%);
  pointer-events:none;
}
.auth-aside .auth-brand{
  font-weight:900;letter-spacing:.4px;font-size:18px;
  display:flex;align-items:center;gap:10px;
  position:relative;z-index:1;
}
.auth-aside .auth-brand .dot{width:14px;height:14px;border-radius:4px;background:var(--ep-lime)}
.auth-aside .auth-headline{
  position:relative;z-index:1;
  font-size:clamp(36px,4.2vw,72px);line-height:1.02;font-weight:900;
  letter-spacing:.5px;text-transform:uppercase;
  margin:0 0 20px;max-width:18ch;
}
.auth-aside .auth-tagline{
  position:relative;z-index:1;
  color:rgba(255,255,255,.86);
  font-size:clamp(15px,1.1vw,20px);line-height:1.55;max-width:58ch;
  margin:0 0 28px;
}
.auth-aside .auth-points{
  position:relative;z-index:1;
  list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:12px;
}
.auth-aside .auth-points li{
  display:flex;align-items:flex-start;gap:12px;
  font-size:14px;color:rgba(255,255,255,.92);
}
.auth-aside .auth-points li::before{
  content:"";flex:0 0 auto;
  width:10px;height:10px;border-radius:9999px;
  background:var(--ep-lime);
  margin-top:6px;
  box-shadow:0 0 0 4px rgba(122,193,66,.18);
}
.auth-aside .auth-footer{
  position:relative;z-index:1;
  font-size:12px;color:rgba(255,255,255,.66);
}
.auth-aside .auth-chip{
  display:inline-flex;align-items:center;gap:8px;
  padding:6px 12px;border-radius:9999px;
  background:rgba(30,182,232,.18);border:1px solid rgba(30,182,232,.36);
  color:#fff;font-size:11px;font-weight:900;letter-spacing:.8px;text-transform:uppercase;
  margin-bottom:14px;
  position:relative;z-index:1;
}
.auth-aside.admin .auth-chip{
  background:rgba(220,38,38,.18);border-color:rgba(220,38,38,.45);
}
.auth-form-panel{
  display:flex;align-items:center;justify-content:center;
  padding:clamp(40px,4vw,80px) clamp(24px,2.5vw,56px);
  background:var(--ep-bg);
  min-width:0;
}
.auth-form-panel .auth-card{
  width:100%;max-width:460px;
  background:var(--ep-surface);
  border:1px solid var(--border);
  border-radius:16px;
  box-shadow:var(--shadow-md);
  padding:clamp(28px,2.4vw,44px) clamp(24px,2.2vw,40px);
}
.auth-form-panel .auth-card h1{
  margin:0 0 6px;color:var(--ep-purple-dark);
  font-size:28px;line-height:1.15;
}
.auth-form-panel .auth-card .lede{
  margin:0 0 26px;color:var(--text-muted);font-size:14px;
}
.auth-form-panel .alert{
  border-left:4px solid #dc2626;background:#fff5f5;
  padding:12px 14px;border-radius:8px;margin-bottom:18px;
  font-size:13px;color:#7a1b1b;
}
.auth-form-panel .auth-alt{
  margin-top:18px;font-size:13px;color:var(--text-muted);
  display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;
}
.auth-form-panel .auth-alt a{color:var(--ep-purple);font-weight:700}
@media(max-width:1100px){
  .auth-shell{grid-template-columns:minmax(0,6fr) minmax(0,4fr)}
}
@media(max-width:900px){
  .auth-shell{grid-template-columns:1fr}
  .auth-aside{padding:36px 28px;min-height:auto}
  .auth-aside .auth-headline{font-size:32px}
  .auth-form-panel{padding:36px 22px}
}

/* ============================================================
   Multi-step wizard (full-width athlete setup)
   ============================================================ */
.wizard{
  max-width:none;
  margin:0;
}
.wizard .wizard-head{
  background:linear-gradient(135deg,var(--ep-purple-dark),var(--ep-purple));
  color:#fff;
  padding:28px 32px;border-radius:14px;
  margin-bottom:22px;
  position:relative;overflow:hidden;
}
.wizard .wizard-head::after{
  content:"";position:absolute;right:-80px;top:-80px;
  width:240px;height:240px;border-radius:9999px;
  background:radial-gradient(circle, rgba(30,182,232,.32), rgba(30,182,232,0) 65%);
}
.wizard .wizard-head h1{margin:0;color:#fff;font-size:26px;letter-spacing:.4px}
.wizard .wizard-head p{margin:6px 0 0;color:rgba(255,255,255,.82);font-size:14px}
.wizard-steps{
  display:flex;gap:12px;margin-top:18px;flex-wrap:wrap;position:relative;z-index:1;
}
.wizard-steps .step{
  display:flex;align-items:center;gap:8px;
  padding:8px 14px;border-radius:9999px;
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.18);
  color:#fff;font-size:12px;font-weight:800;
  letter-spacing:.6px;text-transform:uppercase;
}
.wizard-steps .step.active{
  background:var(--ep-lime);color:var(--ep-purple-dark);
  border-color:var(--ep-lime);
}
.wizard-steps .step.done{
  background:rgba(122,193,66,.22);border-color:rgba(122,193,66,.5);color:#fff;
}
.wizard-steps .step .num{
  display:inline-flex;align-items:center;justify-content:center;
  width:20px;height:20px;border-radius:9999px;
  background:rgba(0,0,0,.16);font-size:11px;font-weight:900;
}
.wizard-steps .step.active .num{background:var(--ep-purple-dark);color:var(--ep-lime)}
.wizard-body{
  background:var(--ep-surface);border-radius:12px;padding:26px 28px;
  box-shadow:var(--shadow);
}
.wizard-body .section-title{
  font-size:13px;font-weight:900;color:var(--ep-purple-dark);
  text-transform:uppercase;letter-spacing:.8px;
  margin:0 0 14px;
  display:flex;align-items:center;gap:10px;
}
.wizard-body .section-title::before{
  content:"";width:10px;height:10px;border-radius:3px;background:var(--ep-cyan);
}
.wizard-grid{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;
}
@media(max-width:1100px){.wizard-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.wizard-grid{grid-template-columns:1fr}}
.wizard-step-panel{display:none}
.wizard-step-panel.active{display:block}
.wizard-nav{
  display:flex;justify-content:space-between;gap:12px;margin-top:24px;flex-wrap:wrap;
  padding-top:18px;border-top:1px solid var(--border);
}
.wizard-note{
  background:rgba(30,182,232,.08);
  border-left:4px solid var(--ep-cyan);
  padding:12px 14px;border-radius:8px;font-size:13px;color:var(--text);
  margin-top:14px;
}
.wizard-note.warn{background:rgba(234,179,8,.10);border-left-color:#eab308}
.wizard-note.good{background:rgba(122,193,66,.12);border-left-color:var(--ep-lime)}

/* ============================================================
   Admin dashboard — KPI tiles, sparkline, role bars, mini stats
   ============================================================ */
.kpi-row{
  display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:14px;
}
@media(max-width:1200px){.kpi-row{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:680px){.kpi-row{grid-template-columns:repeat(2,minmax(0,1fr))}}
.kpi-card{
  background:var(--ep-surface);border-radius:12px;
  padding:18px 16px;border:1px solid var(--border);
  box-shadow:var(--shadow-sm);
  position:relative;overflow:hidden;
}
.kpi-card::before{
  content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--ep-purple);
}
.kpi-card.lime::before{background:var(--ep-lime)}
.kpi-card.cyan::before{background:var(--ep-cyan)}
.kpi-card.warn::before{background:#eab308}
.kpi-card .kpi-label{
  font-size:11px;font-weight:900;letter-spacing:.8px;text-transform:uppercase;
  color:var(--text-muted);margin-bottom:6px;
}
.kpi-card .kpi-value{
  font-size:32px;font-weight:900;color:var(--ep-purple-dark);line-height:1;letter-spacing:.3px;
}
.kpi-card .kpi-sub{
  margin-top:6px;font-size:12px;color:var(--text-muted);
}

.spark{
  display:flex;align-items:flex-end;gap:6px;height:140px;
  border-bottom:1px dashed var(--border);padding-bottom:6px;
}
.spark-col{
  flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:4px;height:100%;
}
.spark-bar{
  width:100%;max-width:28px;
  background:linear-gradient(180deg,var(--ep-cyan),var(--ep-purple));
  border-radius:4px 4px 0 0;
  min-height:4px;
}
.spark-val{font-size:10px;color:var(--text-muted);font-weight:700}

.mini-stats{display:flex;gap:24px;flex-wrap:wrap}
.mini-stats .mini-num{font-size:30px;font-weight:900;color:var(--ep-purple-dark);line-height:1}
.mini-stats .mini-label{font-size:11px;color:var(--text-muted);text-transform:uppercase;letter-spacing:.6px;margin-top:4px}

.role-bar{
  display:grid;grid-template-columns:110px 1fr 50px;align-items:center;gap:10px;margin-bottom:8px;
}
.role-bar-label{font-size:12px;font-weight:800;color:var(--ep-purple-dark);text-transform:uppercase;letter-spacing:.4px}
.role-bar-track{
  height:8px;background:rgba(47,28,90,.08);border-radius:9999px;overflow:hidden;
}
.role-bar-fill{display:block;height:100%;background:linear-gradient(90deg,var(--ep-lime),var(--ep-cyan))}
.role-bar-count{font-size:12px;font-weight:900;color:var(--ep-purple-dark);text-align:right}

/* Filter-form row layout */
.filter-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;align-items:end}
@media(max-width:980px){.filter-row{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Inline action forms in admin tables */
.row-actions{display:flex;gap:6px;flex-wrap:wrap}
.row-actions form{display:inline-block;margin:0}
.row-actions button{height:28px;padding:0 10px;font-size:12px;font-weight:800;border-radius:6px;cursor:pointer;border:1px solid transparent}
.row-actions .ra-suspend{background:#fef2f2;color:#991b1b;border-color:#fecaca}
.row-actions .ra-suspend:hover{background:#fee2e2}
.row-actions .ra-reactivate{background:#ecfdf5;color:#065f46;border-color:#a7f3d0}
.row-actions .ra-reactivate:hover{background:#d1fae5}
.row-actions .ra-role{background:var(--ep-surface);color:var(--ep-purple-dark);border-color:rgba(47,28,90,.22)}
.row-actions select{height:28px;font-size:12px;border-radius:6px;border:1px solid rgba(47,28,90,.22);padding:0 6px}

/* Tab strip (used on audit page) */
.tabstrip{display:flex;gap:4px;border-bottom:1px solid var(--border);margin-bottom:14px}
.tabstrip a{
  padding:10px 14px;font-weight:800;font-size:13px;letter-spacing:.3px;color:var(--text-muted);
  border:1px solid transparent;border-bottom:none;border-radius:8px 8px 0 0;
}
.tabstrip a.active{
  color:var(--ep-purple-dark);background:var(--ep-surface);
  border-color:var(--border);border-bottom:1px solid var(--ep-surface);position:relative;top:1px;
}
.tabstrip a:hover{text-decoration:none}

/* Log tail (monospace) */
.log-tail{
  background:#0b1020;color:#cdd5e0;border-radius:8px;padding:12px 14px;
  font-family: ui-monospace, "JetBrains Mono", Consolas, monospace; font-size:12px;line-height:1.55;
  max-height:420px;overflow:auto;
}
.log-tail .ln{display:block;white-space:pre-wrap;word-break:break-word}

/* Settings key/value editor */
.settings-row{
  display:grid;grid-template-columns:240px 1fr auto;gap:12px;align-items:center;
  padding:12px 0;border-bottom:1px solid var(--border);
}
.settings-row .k{font-weight:900;color:var(--ep-purple-dark);font-family:ui-monospace,Consolas,monospace;font-size:13px}
.settings-row .v textarea, .settings-row .v input{width:100%}

/* Diagnostics health pills */
.health-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
@media(max-width:760px){.health-row{grid-template-columns:repeat(2,minmax(0,1fr))}}
.health-tile{
  background:var(--ep-surface);border:1px solid var(--border);border-radius:10px;padding:14px;
}
.health-tile .ht-label{font-size:11px;text-transform:uppercase;letter-spacing:.6px;color:var(--text-muted);font-weight:800}
.health-tile .ht-value{font-size:20px;font-weight:900;color:var(--ep-purple-dark);margin-top:4px}
.health-tile.ok{border-left:4px solid var(--ep-lime)}
.health-tile.warn{border-left:4px solid #eab308}
.health-tile.error{border-left:4px solid #dc2626}

/* =================================================================
   MOBILE SHELL — sticky topbar + off-canvas drawer
   Desktop ≥ 901px: hidden topbar, sticky sidebar.
   Mobile ≤ 900px: topbar visible, sidebar slides in from left.
   ================================================================= */
.mtb{display:none}
.mtb-backdrop{display:none}

@media (max-width: 900px) {
  /* Topbar shown */
  .mtb{
    display:flex;align-items:center;gap:12px;
    position:sticky;top:0;left:0;right:0;z-index:50;
    height:56px;padding:0 14px;
    background:#4B2E83;color:#fff;
    box-shadow:0 2px 8px rgba(0,0,0,.18);
    padding-top:env(safe-area-inset-top, 0);
    height:calc(56px + env(safe-area-inset-top, 0px));
  }
  .mtb-burger{
    appearance:none;border:0;background:transparent;
    width:44px;height:44px;border-radius:10px;
    color:#fff;cursor:pointer;
    display:inline-flex;align-items:center;justify-content:center;
    flex-shrink:0;
  }
  .mtb-burger:hover{background:rgba(255,255,255,.10)}
  .mtb-brand{
    display:inline-flex;align-items:center;gap:10px;
    color:#fff;text-decoration:none;font-weight:900;
    flex:1;min-width:0;
  }
  .mtb-logo{
    width:22px;height:22px;border-radius:5px;
    background:var(--ep-lime,#7AC142);flex-shrink:0;
  }
  .mtb-name{
    font-size:15px;letter-spacing:.2px;
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  }
  .mtb-avatar{
    width:36px;height:36px;border-radius:9999px;flex-shrink:0;
    background:var(--ep-lime,#7AC142);color:#0F172A;
    display:inline-flex;align-items:center;justify-content:center;
    font-weight:900;font-size:14px;
  }

  /* Shell becomes single column, sidebar overlays */
  .shell{grid-template-columns:1fr;min-height:calc(100vh - 56px)}
  .shell > .sidebar{
    position:fixed;top:0;left:0;bottom:0;z-index:90;
    width:min(86vw, 320px);height:100vh;
    transform:translateX(-100%);
    transition:transform .25s ease;
    box-shadow:0 0 0 0 rgba(0,0,0,0);
  }
  body.drawer-open .shell > .sidebar{
    transform:translateX(0);
    box-shadow:8px 0 28px rgba(0,0,0,.35);
  }
  .mtb-backdrop{
    position:fixed;inset:0;z-index:80;
    background:rgba(15,23,42,.55);
    backdrop-filter:blur(2px);
    display:block;opacity:0;pointer-events:none;
    transition:opacity .2s ease;
  }
  body.drawer-open .mtb-backdrop{opacity:1;pointer-events:auto}
  body.drawer-open{overflow:hidden}

  /* Main content gets more breathing room */
  .main{padding:14px}
}

/* Touch-friendly nav rows */
.nav a{min-height:44px}

/* =================================================================
   MOBILE POLISH — small-screen tightening for the athlete dashboard
   ================================================================= */
@media (max-width: 720px) {
  /* Prevent iOS Safari zoom on focus; force inputs ≥ 16px. */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="search"],
  input[type="tel"],
  input[type="url"],
  input[type="date"],
  input[type="datetime-local"],
  input[type="month"],
  input[type="week"],
  input[type="time"],
  select,
  textarea {
    font-size: 16px !important;
  }

  /* Heading scale */
  h1 { font-size: 24px; line-height: 1.2; }
  h2 { font-size: 18px; line-height: 1.25; }
  h3 { font-size: 16px; }

  /* Tables — let them horizontally scroll inside their wrapper */
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Full-width primary buttons inside cards */
  .card .btn-primary,
  .card .btn,
  .blog-actions .blog-btn-primary { width: 100%; }
  .blog-actions { display: flex; flex-direction: column; gap: 8px; }

  /* Comfortable touch padding on links */
  a[href] { -webkit-tap-highlight-color: rgba(122,193,66,.18); }

  /* Page padding consistent across views */
  .main { padding: 14px 14px 80px; }
  .container { padding-left: 14px; padding-right: 14px; }
}

/* Edge-to-edge tap target safety: anything that looks clickable should be ≥ 40px tall */
@media (pointer: coarse) {
  button, .btn, a.btn, .blog-btn, .community-btn, .chat-btn, .zone-btn { min-height: 40px; }
}

/* === sections/buzz.css === */
/* Buzz + Admin Blog — Bundle A
   Class prefixes: .buzz-* (athlete-facing) and .blog-* (admin-facing).
   Uses existing CSS variables from ep-ui.v3.css (--ep-purple, --ep-purple-dark, --ep-lime, --text, --text-muted). */

/* -------- Buzz list -------- */
.buzz-page { font-family: inherit; }
.buzz-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 18px;
}
.buzz-head h1 {
  margin: 0 0 4px; font-size: 24px; font-weight: 800;
  color: var(--ep-purple-dark); letter-spacing: -.2px;
}
.buzz-sub { margin: 0; font-size: 13px; color: var(--text-muted); }

.buzz-empty {
  padding: 32px; text-align: center; color: var(--text-muted); font-size: 13px;
  border: 1px dashed rgba(47,28,90,.18); border-radius: 12px; background: #fff;
}

.buzz-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.buzz-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid rgba(47,28,90,.08); border-radius: 12px;
  box-shadow: 0 1px 3px rgba(47,28,90,.06); overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}
.buzz-card:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(47,28,90,.10); }

.buzz-card-img { display: block; width: 100%; aspect-ratio: 16/9; background: rgba(47,28,90,.05); overflow: hidden; }
.buzz-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.buzz-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.buzz-card-meta { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-muted); }
.buzz-card-title { margin: 0; font-size: 16px; font-weight: 800; line-height: 1.3; color: var(--ep-purple-dark); }
.buzz-card-title a { color: inherit; text-decoration: none; }
.buzz-card-title a:hover { color: var(--ep-purple); }
.buzz-card-excerpt { margin: 0; font-size: 13px; color: var(--text); line-height: 1.45; }

.buzz-chip {
  display: inline-block; padding: 3px 10px; border-radius: 9999px;
  font-size: 10px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase;
}
.buzz-chip-news { background: rgba(122,193,66,.18); color: #3a6a1f; }
.buzz-chip-rss  { background: rgba(30,182,232,.14); color: #0b6e8a; }
.buzz-time { font-size: 11px; color: var(--text-muted); }

/* -------- Buzz article (single post) -------- */
.buzz-article { max-width: 760px; margin: 0 auto; font-family: inherit; }
.buzz-crumbs { margin-bottom: 14px; font-size: 12px; }
.buzz-crumbs a { color: var(--ep-purple); text-decoration: none; font-weight: 700; }
.buzz-crumbs a:hover { text-decoration: underline; }

.buzz-article-head { margin-bottom: 18px; }
.buzz-article-head h1 {
  margin: 8px 0 6px; font-size: 30px; font-weight: 800; line-height: 1.15;
  color: var(--ep-purple-dark); letter-spacing: -.3px;
}
.buzz-article-meta { font-size: 12px; color: var(--text-muted); }

.buzz-article-hero { margin: 0 0 18px; }
.buzz-article-hero img {
  width: 100%; max-height: 460px; object-fit: cover;
  border-radius: 12px; display: block;
}

.buzz-article-lede {
  font-size: 17px; line-height: 1.5; color: var(--text);
  margin: 0 0 18px; font-weight: 500;
}

.buzz-article-body { font-size: 16px; line-height: 1.65; color: var(--text); }
.buzz-article-body h2,
.buzz-article-body h3,
.buzz-article-body h4 { color: var(--ep-purple-dark); font-weight: 800; margin: 28px 0 10px; }
.buzz-article-body h2 { font-size: 22px; }
.buzz-article-body h3 { font-size: 18px; }
.buzz-article-body h4 { font-size: 16px; }
.buzz-article-body p { margin: 0 0 14px; }
.buzz-article-body a { color: var(--ep-purple); }
.buzz-article-body ul, .buzz-article-body ol { margin: 0 0 14px 22px; }
.buzz-article-body blockquote {
  margin: 16px 0; padding: 10px 16px; border-left: 4px solid var(--ep-lime);
  background: rgba(122,193,66,.08); color: var(--text); border-radius: 6px;
}
.buzz-article-body img { max-width: 100%; height: auto; border-radius: 8px; }
.buzz-article-body hr { border: 0; border-top: 1px solid rgba(47,28,90,.12); margin: 20px 0; }

/* -------- Admin blog list -------- */
.blog-admin { font-family: inherit; }
.blog-admin-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
}
.blog-admin-head h1 {
  margin: 0 0 4px; font-size: 22px; font-weight: 800; color: var(--ep-purple-dark);
}
.blog-sub { margin: 0; font-size: 13px; color: var(--text-muted); }

.blog-filter {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px;
  font-size: 12px; color: var(--text-muted);
}
.blog-filter label { font-weight: 800; text-transform: uppercase; letter-spacing: .5px; font-size: 10px; }
.blog-filter select {
  height: 32px; padding: 0 8px; font-size: 12px; font-family: inherit;
  border: 1px solid rgba(47,28,90,.18); border-radius: 8px; background: #fff;
}

.blog-empty {
  padding: 24px; text-align: center; color: var(--text-muted); font-size: 13px;
  border: 1px dashed rgba(47,28,90,.18); border-radius: 12px; background: #fff;
}

.blog-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
  background: #fff; border: 1px solid rgba(47,28,90,.08); border-radius: 12px; overflow: hidden;
}
.blog-table th {
  text-align: left; padding: 10px 12px; font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted);
  background: rgba(47,28,90,.04); border-bottom: 1px solid rgba(47,28,90,.08);
}
.blog-table td { padding: 10px 12px; border-bottom: 1px solid rgba(47,28,90,.05); vertical-align: top; }
.blog-table tr:last-child td { border-bottom: 0; }
.blog-row-title { font-weight: 700; color: var(--ep-purple-dark); }
.blog-row-slug { font-size: 11px; color: var(--text-muted); font-family: ui-monospace, monospace; margin-top: 2px; }
.blog-row-actions { white-space: nowrap; text-align: right; }

.blog-status {
  display: inline-block; padding: 3px 8px; border-radius: 9999px;
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px;
}
.blog-status-draft     { background: rgba(47,28,90,.08); color: var(--ep-purple-dark); }
.blog-status-scheduled { background: rgba(240,180,0,.18); color: #855D00; }
.blog-status-published { background: rgba(122,193,66,.18); color: #3a6a1f; }
.blog-status-archived  { background: rgba(220,38,38,.10); color: #b91c1c; }

/* -------- Admin blog form -------- */
.blog-form-page { font-family: inherit; }
.blog-form {
  background: #fff; border: 1px solid rgba(47,28,90,.08); border-radius: 12px;
  padding: 18px; box-shadow: 0 1px 3px rgba(47,28,90,.06); margin-bottom: 18px;
}
.blog-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 720px) { .blog-grid-2 { grid-template-columns: 1fr; } }

.blog-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.blog-field > span {
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px;
  color: var(--text-muted);
}
.blog-field input,
.blog-field select,
.blog-field textarea {
  font-family: inherit; font-size: 13px; color: var(--text);
  padding: 9px 10px; border: 1px solid rgba(47,28,90,.18); border-radius: 8px;
  background: #fff; outline: none;
}
.blog-field input:focus,
.blog-field select:focus,
.blog-field textarea:focus {
  border-color: #1EB6E8; box-shadow: 0 0 0 3px rgba(30,182,232,.18);
}
.blog-field textarea { resize: vertical; min-height: 80px; font-family: ui-monospace, monospace; line-height: 1.45; }
.blog-help { font-size: 11px; color: var(--text-muted); }

.blog-featured-preview {
  margin-top: 8px; max-width: 240px; max-height: 140px; object-fit: cover;
  border-radius: 8px; border: 1px solid rgba(47,28,90,.08);
}

.blog-actions { display: flex; gap: 10px; align-items: center; margin-top: 8px; }

.blog-upload {
  background: #fff; border: 1px solid rgba(47,28,90,.08); border-radius: 12px;
  padding: 16px 18px; box-shadow: 0 1px 3px rgba(47,28,90,.06);
}
.blog-upload h2 { margin: 0 0 4px; font-size: 14px; font-weight: 800; color: var(--ep-purple-dark); }
.blog-upload form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.blog-upload-status { font-size: 12px; color: var(--text-muted); }

/* -------- Buttons (scoped) -------- */
.blog-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 700;
  font-family: inherit; cursor: pointer; border: 0; text-decoration: none;
  background: #fff; color: var(--ep-purple-dark); border: 1px solid rgba(47,28,90,.18);
}
.blog-btn:hover { background: rgba(47,28,90,.04); }
.blog-btn-primary { background: var(--ep-purple); color: #fff; border-color: var(--ep-purple); }
.blog-btn-primary:hover { background: var(--ep-purple-dark); }
.blog-btn-danger { background: #fff; color: #b91c1c; border: 1px solid rgba(220,38,38,.28); }
.blog-btn-danger:hover { background: rgba(220,38,38,.06); }
.blog-btn-link { background: transparent; border: 0; color: var(--ep-purple); padding: 8px 6px; }
.blog-btn-link:hover { text-decoration: underline; background: transparent; }

/* Taxonomy + chips for blog v2 */
.cat-chip{
  display:inline-block;padding:3px 10px;border-radius:9999px;
  font-size:11px;font-weight:800;color:#fff;letter-spacing:.4px;text-transform:uppercase;
  background:#4B2E83;
}
.tag-chip{
  display:inline-block;padding:3px 10px;border-radius:9999px;
  font-size:11px;font-weight:700;
  background:rgba(75,46,131,.08);color:#4B2E83;
}
.tax-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:18px}
@media(max-width:900px){.tax-grid{grid-template-columns:1fr}}
.tax-card{
  background:#fff;border:1px solid rgba(47,28,90,.08);
  border-radius:14px;padding:18px;
  box-shadow:0 2px 8px rgba(75,46,131,.04);
}
.tax-title{margin:0 0 12px;font-size:18px;font-weight:900;color:#0F172A;display:flex;align-items:center;gap:8px}
.tax-count{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:24px;padding:0 8px;height:20px;border-radius:9999px;
  background:rgba(75,46,131,.10);color:#4B2E83;
  font-size:11px;font-weight:800;
}
.tax-form{margin-bottom:14px}
.tax-form-row{display:flex;gap:8px;align-items:center;margin-bottom:6px}
.tax-form input[name="name"]{
  flex:1;height:36px;padding:0 10px;border:1px solid rgba(47,28,90,.18);border-radius:8px;font-size:13px;
}
.tax-form input[name="description"]{
  width:100%;height:32px;padding:0 10px;border:1px solid rgba(47,28,90,.18);border-radius:8px;font-size:12px;
}
.tax-form input[type="color"]{width:42px;height:36px;border:1px solid rgba(47,28,90,.18);border-radius:8px;background:#fff;cursor:pointer}
.blog-admin-actions{display:flex;gap:10px;align-items:center}
.blog-btn-outline{
  display:inline-block;padding:8px 14px;border-radius:10px;
  background:transparent;color:#4B2E83;border:1px solid #4B2E83;
  font-weight:700;font-size:13px;text-decoration:none;cursor:pointer;
}
.blog-btn-outline:hover{background:rgba(75,46,131,.06)}
.blog-flash{
  padding:10px 14px;border-radius:10px;
  background:rgba(122,193,66,.14);color:#3a5a16;border:1px solid rgba(122,193,66,.35);
  font-size:13px;font-weight:600;margin:0 0 14px;
}

.buzz-cat-bar{
  display:flex;flex-wrap:wrap;gap:8px;
  padding:14px 0;margin:0 0 14px;
  border-bottom:1px solid rgba(47,28,90,.10);
}
.buzz-cat-pill{
  display:inline-block;padding:6px 14px;border-radius:9999px;
  background:#fff;color:#4B2E83;border:1px solid rgba(75,46,131,.22);
  font-size:13px;font-weight:700;text-decoration:none;
}
.buzz-cat-pill:hover{background:rgba(75,46,131,.06)}
.buzz-cat-pill.is-active{background:#4B2E83;color:#fff;border-color:#4B2E83}
.buzz-article-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}

/* Buzz feed — horizontal full-width rows */
.buzz-feed{
  list-style:none;margin:0;padding:0;
  display:flex;flex-direction:column;gap:14px;
}
.buzz-row{
  display:flex;align-items:stretch;gap:18px;
  background:#fff;border:1px solid rgba(47,28,90,.08);
  border-radius:14px;padding:14px;
  box-shadow:0 2px 8px rgba(75,46,131,.04);
  transition:transform .15s ease,box-shadow .15s ease;
}
.buzz-row:hover{transform:translateY(-2px);box-shadow:0 6px 18px rgba(75,46,131,.10)}
.buzz-row-img{
  flex:0 0 240px;width:240px;aspect-ratio:16/10;
  display:block;overflow:hidden;border-radius:10px;background:#0F172A;
}
.buzz-row-img img{width:100%;height:100%;object-fit:cover;display:block}
.buzz-row-body{display:flex;flex-direction:column;gap:8px;min-width:0;flex:1}
.buzz-row-meta{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.buzz-row-title{margin:0;font-size:20px;font-weight:900;line-height:1.25;letter-spacing:-.2px}
.buzz-row-title a{color:#0F172A;text-decoration:none}
.buzz-row-title a:hover{color:#4B2E83}
.buzz-row-excerpt{margin:0;color:#475569;font-size:14px;line-height:1.55;max-width:80ch}
.buzz-row-cta{
  margin-top:auto;
  align-self:flex-start;
  font-size:13px;font-weight:800;color:#4B2E83;text-decoration:none;
}
.buzz-row-cta:hover{text-decoration:underline}
@media(max-width:720px){
  .buzz-row{flex-direction:column;gap:12px}
  .buzz-row-img{flex-basis:auto;width:100%;aspect-ratio:16/9}
  .buzz-row-title{font-size:18px}
}

/* RSS reader footer */
.buzz-rss-foot{
  margin-top:28px;padding:18px 22px;
  background:rgba(75,46,131,.05);
  border:1px solid rgba(75,46,131,.18);
  border-radius:12px;
  display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;
}
.buzz-rss-foot p{margin:0;color:#475569;font-size:14px}
.buzz-rss-open{
  display:inline-block;padding:10px 18px;border-radius:10px;
  background:#4B2E83;color:#fff;font-weight:800;font-size:13px;text-decoration:none;
}
.buzz-rss-open:hover{filter:brightness(1.08)}

/* === sections/community.css === */
/* Bundle B — Community (groups + chat + videos)
   Class prefixes: .community-*, .chat-*
   Main thread integrates load via ep-ui.v4 bump. */

.community-page { padding: 24px; max-width: 1200px; margin: 0 auto; }
.community-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 24px; }
.community-head h1 { margin: 0 0 4px; font-size: 28px; }
.community-sub { color: var(--text-muted, #6b7280); margin: 0; font-size: 14px; }

.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.community-card {
  display: flex; flex-direction: column; justify-content: space-between;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}
.community-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.06); }
.community-card-body { padding: 16px 16px 8px; }
.community-card-title { margin: 0 0 8px; font-size: 18px; }
.community-card-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted, #6b7280); margin-bottom: 8px; }
.community-card-desc { margin: 8px 0 0; font-size: 14px; line-height: 1.5; color: var(--text, #111827); }
.community-card-actions { display: flex; gap: 8px; padding: 12px 16px 16px; border-top: 1px solid var(--border, #e5e7eb); }

.community-meta-dot { color: var(--text-muted, #6b7280); }
.community-members { font-weight: 500; }

.community-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .03em;
  background: #eef2ff;
  color: #3730a3;
  font-weight: 600;
}
.community-chip-open { background: #ecfdf5; color: #047857; }
.community-chip-invite_only { background: #fef3c7; color: #92400e; }
.community-chip-closed { background: #fee2e2; color: #991b1b; }
.community-chip-role { background: #f3e8ff; color: #6b21a8; margin-left: 6px; }
.community-chip-pinned { background: #fff7ed; color: #9a3412; }

.community-status { font-size: 11px; padding: 2px 8px; border-radius: 4px; text-transform: uppercase; }
.community-status-active { background: #d1fae5; color: #065f46; }
.community-status-archived { background: #e5e7eb; color: #374151; }

.community-btn {
  display: inline-block;
  padding: 8px 14px;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  background: #f3f4f6;
  color: #111827;
  font-family: inherit;
}
.community-btn-primary { background: var(--brand, #4f46e5); color: #fff; }
.community-btn-primary:hover { background: var(--brand-hover, #4338ca); }
.community-btn-ghost { background: transparent; border-color: var(--border, #e5e7eb); color: var(--text, #111827); }
.community-btn-link { background: transparent; color: var(--brand, #4f46e5); padding: 8px 4px; }
.community-btn-link:hover { text-decoration: underline; }

.community-inline-form { display: inline; margin: 0; }

.community-empty {
  padding: 32px;
  text-align: center;
  border-radius: 12px;
  border: 1px dashed var(--border, #e5e7eb);
  color: var(--text-muted, #6b7280);
  background: var(--surface, #fff);
}
.community-empty-sm { padding: 16px; font-size: 13px; }

/* Single-group page layout */
.community-show-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  padding-bottom: 16px; border-bottom: 1px solid var(--border, #e5e7eb); margin-bottom: 16px;
}
.community-show-head h1 { margin: 4px 0 8px; font-size: 26px; }
.community-show-meta { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted, #6b7280); }
.community-show-desc { margin: 8px 0 0; max-width: 720px; line-height: 1.5; }
.community-back { font-size: 13px; color: var(--brand, #4f46e5); text-decoration: none; }
.community-back:hover { text-decoration: underline; }

.community-show-body {
  display: grid;
  grid-template-columns: 1fr 320px;
  grid-template-areas:
    "pinned members"
    "chat   members";
  gap: 16px;
}
.community-pinned { grid-area: pinned; }
.community-members-list { grid-area: members; }
.chat-panel { grid-area: chat; min-height: 480px; display: flex; flex-direction: column; }

@media (max-width: 900px) {
  .community-show-body {
    grid-template-columns: 1fr;
    grid-template-areas:
      "pinned"
      "chat"
      "members";
  }
}

.community-section-title { font-size: 14px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted, #6b7280); margin: 0 0 8px; }

.community-video {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  padding: 16px;
}
.community-video-title { margin: 0 0 8px; font-size: 16px; }
.community-video-player { width: 100%; max-height: 360px; border-radius: 8px; background: #000; }
.community-video-desc { margin: 8px 0 0; font-size: 13px; color: var(--text-muted, #6b7280); }

.community-members-ul { list-style: none; margin: 0; padding: 0; max-height: 480px; overflow-y: auto; background: var(--surface, #fff); border: 1px solid var(--border, #e5e7eb); border-radius: 12px; }
.community-member { display: flex; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--border, #e5e7eb); font-size: 14px; }
.community-member:last-child { border-bottom: none; }
.community-member-name { flex: 1; }

/* Chat */
.chat-panel { background: var(--surface, #fff); border: 1px solid var(--border, #e5e7eb); border-radius: 12px; padding: 16px; }
.chat-messages {
  flex: 1;
  overflow-y: auto;
  max-height: 480px;
  min-height: 320px;
  padding: 8px;
  background: #fafafa;
  border-radius: 8px;
  border: 1px solid var(--border, #e5e7eb);
  margin-bottom: 12px;
}
.chat-empty { text-align: center; color: var(--text-muted, #6b7280); padding: 32px 0; font-size: 13px; }

.chat-message {
  padding: 8px 10px;
  margin-bottom: 6px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--border, #e5e7eb);
}
.chat-message-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 12px; }
.chat-author { font-weight: 600; color: var(--text, #111827); }
.chat-time { color: var(--text-muted, #6b7280); font-size: 11px; flex: 1; }
.chat-delete {
  background: transparent;
  border: none;
  color: #b91c1c;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0 6px;
  border-radius: 4px;
}
.chat-delete:hover { background: #fee2e2; }

.chat-body { font-size: 14px; line-height: 1.45; color: var(--text, #111827); word-wrap: break-word; overflow-wrap: anywhere; white-space: pre-wrap; }
.chat-body a { color: var(--brand, #4f46e5); text-decoration: underline; }

.chat-composer { display: flex; gap: 8px; align-items: flex-end; }
.chat-input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  resize: vertical;
  min-height: 44px;
  font-family: inherit;
  font-size: 14px;
}
.chat-send { white-space: nowrap; }
.chat-status { font-size: 12px; color: var(--text-muted, #6b7280); min-height: 16px; margin-top: 6px; }

/* Admin tables */
.community-admin, .community-form-page { padding: 24px; max-width: 1200px; margin: 0 auto; }
.community-admin-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 24px; }
.community-admin-head h1 { margin: 0 0 4px; font-size: 24px; }

.community-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  overflow: hidden;
  font-size: 14px;
}
.community-table th, .community-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border, #e5e7eb); }
.community-table th { background: #f9fafb; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted, #6b7280); }
.community-table tr:last-child td { border-bottom: none; }
.community-row-slug { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--text-muted, #6b7280); }
.community-row-actions { text-align: right; white-space: nowrap; }

/* Admin form */
.community-form { display: flex; flex-direction: column; gap: 16px; background: var(--surface, #fff); padding: 20px; border: 1px solid var(--border, #e5e7eb); border-radius: 12px; margin-bottom: 24px; }
.community-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.community-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
@media (max-width: 720px) {
  .community-grid-2, .community-grid-3 { grid-template-columns: 1fr; }
}
.community-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.community-field span { font-weight: 500; color: var(--text, #111827); }
.community-field input, .community-field textarea, .community-field select {
  padding: 8px 10px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  background: #fff;
}
.community-field textarea { resize: vertical; min-height: 80px; }
.community-actions { display: flex; gap: 8px; }
.community-help { color: var(--text-muted, #6b7280); font-size: 13px; margin: 0 0 12px; }
.community-upload, .community-videos { margin-top: 24px; }
.community-upload h2, .community-videos h2 { font-size: 18px; margin: 0 0 8px; }

.community-video-embed{position:relative;width:100%;aspect-ratio:16/9;background:#000;border-radius:10px;overflow:hidden}
.community-video-embed iframe{position:absolute;inset:0;width:100%;height:100%;border:0}

/* ============================================================
   CHAT SHELL — premium 2-col chat + members layout
   ============================================================ */
.chat-shell{max-width:1180px;margin:0 auto;padding:24px 18px 64px}

.chat-head{
  display:flex;align-items:flex-start;justify-content:space-between;gap:18px;
  background:linear-gradient(135deg,#3b1e6e 0%,#4B2E83 60%,#1d3a6e 100%);
  color:#fff;
  border-radius:18px;padding:22px 26px;margin:0 0 18px;
  box-shadow:0 6px 22px rgba(75,46,131,.18);
}
.chat-head-left{min-width:0;flex:1}
.chat-back{color:rgba(255,255,255,.78);text-decoration:none;font-size:12px;font-weight:700;letter-spacing:.4px;text-transform:uppercase}
.chat-back:hover{color:#fff}
.chat-group-name{margin:6px 0 6px;font-size:30px;font-weight:900;letter-spacing:-.5px;color:#fff;line-height:1.1}
.chat-head-meta{display:flex;align-items:center;gap:8px;font-size:13px;color:rgba(255,255,255,.78)}
.chat-vis{
  display:inline-block;padding:3px 10px;border-radius:9999px;
  font-size:11px;font-weight:800;letter-spacing:.5px;text-transform:uppercase;
  background:rgba(255,255,255,.12);color:#fff;border:1px solid rgba(255,255,255,.18);
}
.chat-vis-open{background:rgba(122,193,66,.22);border-color:rgba(122,193,66,.55);color:#cdf2a0}
.chat-dot{opacity:.5}
.chat-group-desc{margin:10px 0 0;color:rgba(255,255,255,.85);font-size:14px;line-height:1.45;max-width:60ch}
.chat-head-right{display:flex;gap:8px;flex-shrink:0}
.chat-inline-form{margin:0}
.chat-btn{
  display:inline-block;padding:10px 18px;border:0;border-radius:10px;
  font-size:13px;font-weight:800;cursor:pointer;text-decoration:none;font-family:inherit;
}
.chat-btn-primary{background:#7AC142;color:#0F172A}
.chat-btn-primary:hover{filter:brightness(1.06)}
.chat-btn-ghost{background:rgba(255,255,255,.10);color:#fff;border:1px solid rgba(255,255,255,.22)}
.chat-btn-ghost:hover{background:rgba(255,255,255,.18)}
.chat-btn-link{background:transparent;color:#4B2E83;text-decoration:underline}

.chat-grid{
  display:grid;grid-template-columns:1fr 290px;gap:18px;
  align-items:start;
}
@media(max-width:900px){.chat-grid{grid-template-columns:1fr}}

.chat-main{display:flex;flex-direction:column;gap:18px;min-width:0}

/* Pinned video — compact card above chat */
.chat-pinned{
  background:#fff;border:1px solid rgba(47,28,90,.08);
  border-radius:14px;padding:14px;
  box-shadow:0 2px 8px rgba(75,46,131,.05);
}
.chat-pinned-label{font-size:11px;font-weight:800;letter-spacing:1px;text-transform:uppercase;color:#7AC142;margin-bottom:6px}
.chat-pinned-title{margin:0 0 10px;font-size:16px;font-weight:800;color:#0F172A}
.chat-pinned-media{width:100%;border-radius:10px;background:#000;display:block}
.chat-pinned-embed{position:relative;width:100%;aspect-ratio:16/9;background:#000;border-radius:10px;overflow:hidden}
.chat-pinned-embed iframe{position:absolute;inset:0;width:100%;height:100%;border:0}

/* Chat panel */
.chat-panel{
  background:#fff;border:1px solid rgba(47,28,90,.08);
  border-radius:14px;
  box-shadow:0 2px 8px rgba(75,46,131,.05);
  display:flex;flex-direction:column;min-height:520px;
}
.chat-panel-head{
  display:flex;align-items:baseline;justify-content:space-between;
  padding:14px 18px;border-bottom:1px solid rgba(47,28,90,.08);
}
.chat-panel-title{margin:0;font-size:16px;font-weight:900;color:#0F172A}
.chat-panel-sub{font-size:11px;font-weight:700;color:#64748b;letter-spacing:.4px;text-transform:uppercase}

.chat-stream{
  flex:1;min-height:380px;max-height:60vh;
  overflow-y:auto;
  padding:18px 16px;display:flex;flex-direction:column;gap:12px;
  background:#F8FAFC;
}
.chat-empty{text-align:center;padding:24px 12px;color:#94a3b8;font-size:13px}
.chat-empty-sm{padding:12px;font-size:12px}

.chat-row{display:flex;align-items:flex-end;gap:10px;max-width:78%}
.chat-row.is-other{align-self:flex-start}
.chat-row.is-own{align-self:flex-end;flex-direction:row-reverse;margin-left:auto}
.chat-avatar{
  flex:0 0 36px;width:36px;height:36px;border-radius:9999px;
  display:inline-flex;align-items:center;justify-content:center;
  color:#fff;font-weight:900;font-size:14px;
  box-shadow:0 2px 6px rgba(0,0,0,.10);
}
.chat-bubble{
  background:#fff;border:1px solid rgba(75,46,131,.14);
  border-radius:14px;padding:10px 14px;
  box-shadow:0 1px 3px rgba(75,46,131,.05);
  max-width:100%;
}
.chat-row.is-own .chat-bubble{
  background:#7AC142;border-color:#7AC142;color:#0F172A;
  box-shadow:0 2px 8px rgba(122,193,66,.30);
}
.chat-bubble-head{display:flex;align-items:baseline;gap:8px;margin-bottom:3px}
.chat-author{font-size:12px;font-weight:800;color:#4B2E83}
.chat-row.is-own .chat-author{color:#0F172A}
.chat-time{font-size:11px;color:#94a3b8;margin-left:auto}
.chat-row.is-own .chat-time{color:rgba(15,23,42,.55)}
.chat-delete{
  border:0;background:transparent;color:#94a3b8;cursor:pointer;
  font-size:18px;line-height:1;padding:0 4px;
}
.chat-delete:hover{color:#dc2626}
.chat-body{font-size:14px;color:#0F172A;line-height:1.45;word-wrap:break-word;overflow-wrap:anywhere}
.chat-body a{color:#4B2E83;text-decoration:underline}
.chat-row.is-own .chat-body a{color:#0F172A;text-decoration:underline}

.chat-composer{
  display:flex;gap:10px;align-items:flex-end;
  padding:12px 14px;border-top:1px solid rgba(47,28,90,.08);
  background:#fff;border-radius:0 0 14px 14px;
}
.chat-input{
  flex:1;min-height:46px;max-height:120px;
  padding:10px 14px;border:1px solid rgba(75,46,131,.22);border-radius:12px;
  font-family:inherit;font-size:14px;line-height:1.4;resize:vertical;background:#fff;
}
.chat-input:focus{outline:2px solid #7AC142;outline-offset:1px;border-color:#7AC142}
.chat-send{padding:12px 22px;height:46px;white-space:nowrap}
.chat-status{padding:6px 14px;font-size:12px;color:#64748b;min-height:22px}

/* Join gate when not a member */
.chat-join-gate{
  margin:24px;padding:32px 24px;text-align:center;
  background:linear-gradient(135deg,rgba(122,193,66,.10),rgba(75,46,131,.06));
  border:1px dashed rgba(75,46,131,.30);border-radius:14px;
}
.chat-join-icon{font-size:36px;margin-bottom:8px}
.chat-join-gate h3{margin:0 0 8px;font-size:18px;font-weight:900;color:#0F172A}
.chat-join-gate p{margin:0;color:#475569;font-size:14px;line-height:1.55}

/* Members sidebar */
.chat-members{
  background:#fff;border:1px solid rgba(47,28,90,.08);
  border-radius:14px;box-shadow:0 2px 8px rgba(75,46,131,.05);
  position:sticky;top:18px;
  max-height:calc(100vh - 36px);overflow-y:auto;
}
.chat-members-head{
  display:flex;align-items:center;justify-content:space-between;
  padding:14px 16px;border-bottom:1px solid rgba(47,28,90,.08);
}
.chat-members-head h2{margin:0;font-size:14px;font-weight:900;color:#0F172A}
.chat-members-count{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:24px;padding:0 8px;height:20px;border-radius:9999px;
  background:rgba(75,46,131,.10);color:#4B2E83;
  font-size:11px;font-weight:800;
}
.chat-members-list{list-style:none;margin:0;padding:6px 0}
.chat-member{
  display:flex;align-items:center;gap:10px;
  padding:8px 14px;
}
.chat-member:hover{background:rgba(75,46,131,.04)}
.chat-member-avatar{
  flex:0 0 36px;width:36px;height:36px;border-radius:9999px;
  display:inline-flex;align-items:center;justify-content:center;
  color:#fff;font-weight:900;font-size:14px;
}
.chat-member-name{
  flex:1;min-width:0;font-size:13px;font-weight:700;color:#0F172A;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.chat-you{font-weight:600;color:#64748b;font-size:11px;margin-left:4px}
.chat-role{
  font-size:10px;font-weight:800;letter-spacing:.5px;text-transform:uppercase;
  padding:2px 8px;border-radius:9999px;
}
.chat-role-owner{background:#7AC142;color:#0F172A}
.chat-role-moderator{background:rgba(75,46,131,.15);color:#4B2E83}

/* === sections/zone.css === */
/* Zone — Bundle C (Participants / Compare / Marketplace)
   Class prefixes: .zone-*. Uses existing CSS variables from ep-ui.v3.css
   (--ep-purple, --ep-purple-dark, --ep-lime, --text, --text-muted). */

/* -------- Page shell -------- */
.zone-page { font-family: inherit; }
.zone-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
}
.zone-head h1 {
  margin: 0 0 4px; font-size: 24px; font-weight: 800;
  color: var(--ep-purple-dark); letter-spacing: -.2px;
}
.zone-sub { margin: 0; font-size: 13px; color: var(--text-muted); }

.zone-empty {
  padding: 32px; text-align: center; color: var(--text-muted); font-size: 13px;
  border: 1px dashed rgba(47,28,90,.18); border-radius: 12px; background: #fff;
}
.zone-empty a { color: var(--ep-purple); font-weight: 700; text-decoration: none; }
.zone-empty code { font-family: ui-monospace, monospace; font-size: 12px; }

/* -------- Sub-nav tabs -------- */
.zone-tabs {
  display: inline-flex; gap: 4px; padding: 4px;
  background: rgba(47,28,90,.06); border-radius: 9999px; margin-bottom: 18px;
}
.zone-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 9999px;
  font-size: 13px; font-weight: 700; color: var(--text-muted);
  text-decoration: none; transition: background .15s ease, color .15s ease;
}
.zone-tab:hover { color: var(--ep-purple-dark); background: rgba(255,255,255,.6); }
.zone-tab.is-active {
  background: #fff; color: var(--ep-purple-dark);
  box-shadow: 0 1px 3px rgba(47,28,90,.08);
}

/* -------- Shared bits -------- */
.zone-avatar {
  width: 44px; height: 44px; flex: 0 0 44px; border-radius: 9999px;
  background: var(--ep-lime, #7AC142); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: "Space Grotesk", sans-serif; font-weight: 800; font-size: 17px;
}
.zone-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 14px; border-radius: 8px; font-size: 12px; font-weight: 700;
  cursor: pointer; border: 0; text-decoration: none; font-family: inherit;
}
.zone-btn-outline { background: #fff; color: var(--ep-purple-dark); border: 1px solid rgba(47,28,90,.18); }
.zone-btn-outline:hover { background: rgba(47,28,90,.04); }
.zone-btn-lime { background: var(--ep-lime, #7AC142); color: var(--ep-purple-dark, #2F1C5A); }
.zone-btn-lime:hover { filter: brightness(.96); }

/* -------- Participants grid -------- */
.zone-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.zone-card {
  display: flex; flex-direction: column; gap: 12px;
  background: #fff; border: 1px solid rgba(47,28,90,.08); border-radius: 12px;
  padding: 16px; box-shadow: 0 1px 3px rgba(47,28,90,.06);
  transition: transform .15s ease, box-shadow .15s ease;
}
.zone-card:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(47,28,90,.10); }
.zone-card-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.zone-card-id { min-width: 0; }
.zone-card-name {
  margin: 0; font-size: 15px; font-weight: 800; color: var(--ep-purple-dark);
  line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.zone-card-meta { font-size: 11px; color: var(--text-muted); display: flex; gap: 4px; flex-wrap: wrap; }
.zone-card-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin: 0; padding: 10px; border-radius: 8px;
  background: rgba(47,28,90,.04);
}
.zone-card-stats > div { text-align: center; }
.zone-card-stats dt {
  font-size: 9px; font-weight: 800; letter-spacing: .4px;
  text-transform: uppercase; color: var(--text-muted); margin: 0 0 2px;
}
.zone-card-stats dd {
  margin: 0; font-family: "Space Grotesk", sans-serif;
  font-size: 16px; font-weight: 800; color: var(--ep-purple-dark);
}
.zone-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.zone-card-actions .zone-btn { flex: 1; }

/* -------- Compare grid -------- */
.zone-compare {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.zone-compare[data-cols="1"] { grid-template-columns: minmax(0, 360px); }
.zone-compare-col {
  background: #fff; border: 1px solid rgba(47,28,90,.08); border-radius: 12px;
  padding: 16px; box-shadow: 0 1px 3px rgba(47,28,90,.06);
  display: flex; flex-direction: column; gap: 12px;
}
.zone-compare-head { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.zone-compare-name {
  margin: 0; font-size: 15px; font-weight: 800; color: var(--ep-purple-dark); line-height: 1.25;
}
.zone-compare-name a { color: inherit; text-decoration: none; }
.zone-compare-name a:hover { color: var(--ep-purple); }
.zone-compare-sub { font-size: 11px; color: var(--text-muted); }
.zone-compare-stats { display: grid; gap: 6px; margin: 0; }
.zone-compare-stats > div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  padding: 6px 0; border-bottom: 1px dashed rgba(47,28,90,.08);
}
.zone-compare-stats > div:last-child { border-bottom: 0; }
.zone-compare-stats dt {
  font-size: 10px; font-weight: 800; letter-spacing: .4px;
  text-transform: uppercase; color: var(--text-muted); margin: 0;
}
.zone-compare-stats dd {
  margin: 0; font-family: "Space Grotesk", sans-serif;
  font-size: 14px; font-weight: 800; color: var(--ep-purple-dark);
}
.zone-compare-metric { flex-direction: column; align-items: stretch !important; }
.zone-compare-metric dd { text-align: right; font-size: 12px; }
.zone-compare-metric dd strong { display: block; font-size: 10px; color: var(--text-muted); font-weight: 700; }

.zone-compare-missing { background: rgba(47,28,90,.03); border-style: dashed; }
.zone-compare-empty { text-align: center; color: var(--text-muted); padding: 20px 0; }
.zone-compare-empty h3 { margin: 0 0 6px; font-size: 13px; font-weight: 800; color: var(--ep-purple-dark); }
.zone-compare-empty p { margin: 0; font-size: 12px; }
.zone-compare-empty code { font-family: ui-monospace, monospace; font-size: 11px; }

/* -------- Marketplace list -------- */
.zone-marketplace {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.zone-marketplace-row {
  display: grid;
  grid-template-columns: 48px 44px 1fr auto;
  align-items: center; gap: 14px;
  background: #fff; border: 1px solid rgba(47,28,90,.08); border-radius: 12px;
  padding: 12px 16px; box-shadow: 0 1px 3px rgba(47,28,90,.06);
}
.zone-marketplace-rank {
  font-family: "Space Grotesk", sans-serif; font-size: 16px; font-weight: 800;
  color: var(--ep-purple); text-align: center;
}
.zone-marketplace-id { min-width: 0; }
.zone-marketplace-name {
  display: block; font-size: 14px; font-weight: 800; color: var(--ep-purple-dark);
  text-decoration: none; line-height: 1.25;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.zone-marketplace-name:hover { color: var(--ep-purple); }
.zone-marketplace-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.zone-marketplace-value { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.zone-marketplace-price {
  font-family: "Space Grotesk", sans-serif; font-size: 15px; font-weight: 800;
  color: var(--ep-purple-dark); letter-spacing: -.2px;
}
.zone-marketplace-chip {
  display: inline-block; padding: 2px 8px; border-radius: 9999px;
  background: rgba(240,180,0,.16); color: #7a5a00;
  font-size: 9px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase;
}

@media (max-width: 600px) {
  .zone-marketplace-row { grid-template-columns: 32px 36px 1fr; gap: 10px; padding: 10px 12px; }
  .zone-marketplace-value { grid-column: 2 / -1; align-items: flex-start; text-align: left; }
}

/* Compare picker — two-slot athlete selector */
.zone-compare-picker{
  display:grid;
  grid-template-columns:1fr auto 1fr auto;
  gap:14px;align-items:end;
  background:rgba(122,193,66,.06);
  border:1px solid rgba(122,193,66,.22);
  border-radius:14px;
  padding:14px 16px;
  margin:18px 0;
}
.zone-compare-picker-slot{display:flex;flex-direction:column;gap:6px;min-width:0}
.zone-compare-picker-slot label{font-size:12px;font-weight:700;letter-spacing:.6px;text-transform:uppercase;color:var(--text-muted,#555)}
.zone-compare-picker-slot select{
  height:42px;padding:0 12px;
  border:1px solid rgba(47,28,90,.22);
  border-radius:10px;background:#fff;
  font-size:14px;font-weight:600;
  min-width:0;width:100%;
}
.zone-compare-picker-slot select:focus{outline:2px solid var(--ep-lime,#7AC142);outline-offset:1px}
.zone-compare-vs{
  display:inline-flex;align-items:center;justify-content:center;
  padding:0 12px;height:42px;
  font-size:16px;font-weight:900;letter-spacing:1px;
  color:var(--ep-purple,#4B2E83);
}
.zone-compare-go{
  height:42px;padding:0 22px;
  background:var(--ep-purple,#4B2E83);color:#fff;
  border:0;border-radius:10px;
  font-size:14px;font-weight:800;cursor:pointer;
  white-space:nowrap;
}
.zone-compare-go:hover{filter:brightness(1.08)}
@media(max-width:720px){
  .zone-compare-picker{grid-template-columns:1fr}
  .zone-compare-vs{display:none}
}

/* Compare 2-step pick */
.zone-card-selected{
  outline:3px solid var(--ep-lime,#7AC142);
  outline-offset:-1px;
  box-shadow:0 0 0 6px rgba(122,193,66,.12),0 6px 18px rgba(75,46,131,.10);
  transform:translateY(-2px);
}
.zone-compare-banner{
  display:flex;align-items:center;gap:14px;
  margin:0 0 14px;padding:12px 16px;
  background:linear-gradient(135deg,rgba(122,193,66,.14),rgba(75,46,131,.06));
  border:1px solid rgba(122,193,66,.35);
  border-radius:12px;
  font-size:14px;color:#0F172A;
}
.zone-compare-banner[hidden]{display:none}
.zone-compare-banner-icon{
  display:inline-flex;width:32px;height:32px;border-radius:10px;
  background:var(--ep-lime,#7AC142);color:#0F172A;
  align-items:center;justify-content:center;font-size:18px;font-weight:900;
  flex:0 0 32px;
}
.zone-compare-banner-text{flex:1}
.zone-compare-banner-text strong{color:var(--ep-purple,#4B2E83)}
.zone-compare-banner-clear{
  border:0;background:transparent;
  color:var(--ep-purple,#4B2E83);font-weight:700;cursor:pointer;
  text-decoration:underline;font-size:13px;padding:6px 10px;
}
.zone-compare-banner-clear:hover{color:#2c1a52}

/* === sections/profile.css === */
/* =================================================================
   PROFILE — premium public/dashboard athlete profile
   Used by:
   - /athletes/{slug}            (marketing/athlete-public.php)
   - /app/athlete/profile        (app/athlete-profile.php)
   Class prefix: .pp-* (public profile)
   Brand: lime #7AC142, purple #4B2E83, cyan #1FB6FF
   ================================================================= */

.pp-shell{max-width:1180px;margin:0 auto;padding:24px 18px 64px}
.pp-page{max-width:1180px;margin:0 auto;padding:0 0 64px}

/* ---------- FLASH ---------- */
.pp-flash{
  padding:12px 16px;border-radius:12px;margin:0 0 18px;
  font-size:14px;font-weight:600;
}
.pp-flash-ok{background:rgba(122,193,66,.14);color:#3a5a16;border:1px solid rgba(122,193,66,.45)}
.pp-flash-err{background:rgba(220,38,38,.10);color:#991b1b;border:1px solid rgba(220,38,38,.35)}

/* ---------- ONBOARD ---------- */
.pp-onboard{
  background:#fff;border:1px solid rgba(47,28,90,.08);
  border-radius:18px;padding:48px 36px;text-align:center;
  box-shadow:0 4px 16px rgba(75,46,131,.06);
}
.pp-onboard-icon{
  display:inline-flex;align-items:center;justify-content:center;
  width:64px;height:64px;border-radius:16px;
  background:linear-gradient(135deg,#7AC142,#4B2E83);
  color:#fff;font-size:28px;margin-bottom:18px;
}
.pp-onboard h1{margin:0 0 10px;font-size:28px;font-weight:900;color:#0F172A}
.pp-onboard p{margin:0 auto 24px;max-width:520px;color:#475569;font-size:15px;line-height:1.55}
.pp-onboard-cta{
  display:inline-block;padding:12px 26px;border-radius:12px;
  background:#4B2E83;color:#fff;text-decoration:none;
  font-weight:800;font-size:14px;letter-spacing:.3px;
}
.pp-onboard-cta:hover{filter:brightness(1.08)}

/* ---------- HERO ---------- */
.pp-hero{
  position:relative;overflow:hidden;
  border-radius:24px;
  margin:0 0 22px;
  padding:0;
  background:#0F172A;
  isolation:isolate;
}
.pp-hero-bg{
  position:absolute;inset:0;z-index:0;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(31,182,255,.55) 0%, rgba(31,182,255,0) 60%),
    radial-gradient(80% 100% at 0% 100%, rgba(122,193,66,.35) 0%, rgba(122,193,66,0) 55%),
    linear-gradient(135deg,#3b1e6e 0%,#4B2E83 45%,#1d3a6e 100%);
}
.pp-hero-grain{
  position:absolute;inset:0;z-index:1;opacity:.22;mix-blend-mode:overlay;
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,.04) 0 2px, transparent 2px 6px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,.03) 0 1px, transparent 1px 5px);
}
.pp-hero-inner{
  position:relative;z-index:2;
  display:flex;align-items:flex-start;justify-content:space-between;gap:32px;
  padding:32px 36px 24px;
}
.pp-hero-left{flex:1;min-width:0}
.pp-hero-right{display:flex;flex-direction:column;align-items:flex-end;gap:10px}
.pp-hero-eyebrow{
  display:inline-flex;align-items:center;gap:8px;
  font-size:11px;font-weight:800;letter-spacing:1.5px;text-transform:uppercase;
  color:rgba(255,255,255,.72);
}
.pp-dot{
  width:8px;height:8px;border-radius:9999px;background:#7AC142;
  box-shadow:0 0 0 4px rgba(122,193,66,.18);
}
.pp-hero-id{display:flex;align-items:center;gap:22px;margin-top:18px}
.pp-avatar{
  width:96px;height:96px;border-radius:24px;flex:0 0 96px;
  background:linear-gradient(135deg,#7AC142 0%,#5fa030 100%);
  color:#0F172A;
  display:inline-flex;align-items:center;justify-content:center;
  font-size:42px;font-weight:900;
  box-shadow:0 8px 24px rgba(122,193,66,.4),inset 0 -4px 0 rgba(0,0,0,.12);
}
.pp-hero-id-meta{min-width:0}
.pp-name{
  margin:0;color:#fff;font-size:42px;line-height:1.05;font-weight:900;
  letter-spacing:-.5px;
  text-shadow:0 2px 8px rgba(0,0,0,.25);
}
.pp-pill-row{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.pp-pill{
  display:inline-flex;align-items:center;
  padding:5px 12px;border-radius:9999px;
  font-size:12px;font-weight:700;letter-spacing:.2px;
  background:#7AC142;color:#0F172A;
}
.pp-pill-ghost{
  background:rgba(255,255,255,.10);color:rgba(255,255,255,.92);
  border:1px solid rgba(255,255,255,.18);
}
.pp-verified{
  display:inline-flex;align-items:center;gap:6px;
  padding:7px 14px;border-radius:9999px;
  background:rgba(122,193,66,.18);color:#cdf2a0;
  border:1px solid rgba(122,193,66,.45);
  font-size:12px;font-weight:800;letter-spacing:.5px;text-transform:uppercase;
}
.pp-verified span{color:#7AC142}
.pp-visibility{
  display:inline-flex;align-items:center;gap:8px;
  padding:7px 14px;border-radius:9999px;
  font-size:12px;font-weight:800;letter-spacing:.5px;text-transform:uppercase;
}
.pp-visibility-public{background:rgba(122,193,66,.20);color:#cdf2a0;border:1px solid rgba(122,193,66,.45)}
.pp-visibility-private{background:rgba(255,255,255,.10);color:rgba(255,255,255,.85);border:1px solid rgba(255,255,255,.20)}
.pp-visibility-dot{width:8px;height:8px;border-radius:9999px;background:currentColor;opacity:.8}
.pp-edit{
  color:#fff;text-decoration:none;font-size:13px;font-weight:700;
  padding:8px 14px;border-radius:10px;
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.18);
  transition:background .15s ease;
}
.pp-edit:hover{background:rgba(255,255,255,.20)}

/* ---------- STAT STRIP ---------- */
.pp-stat-strip{
  position:relative;z-index:2;
  display:grid;grid-template-columns:repeat(4,1fr);gap:1px;
  background:rgba(255,255,255,.08);
  border-top:1px solid rgba(255,255,255,.08);
}
.pp-stat{
  background:rgba(15,23,42,.55);
  padding:18px 22px;
  display:flex;flex-direction:column;gap:4px;
  backdrop-filter:blur(6px);
}
.pp-stat-label{
  font-size:10px;font-weight:800;letter-spacing:1.2px;text-transform:uppercase;
  color:rgba(255,255,255,.55);
}
.pp-stat-value{font-size:26px;font-weight:900;color:#fff;line-height:1}
.pp-stat-foot{font-size:10px;color:rgba(255,255,255,.45);margin-top:2px}

/* ---------- BIO STRIP ---------- */
.pp-bio{
  background:#fff;
  border:1px solid rgba(47,28,90,.08);
  border-radius:16px;
  padding:18px 22px;
  display:flex;flex-wrap:wrap;gap:24px 36px;
  box-shadow:0 4px 16px rgba(75,46,131,.06);
  margin:0 0 22px;
}
.pp-bio-item{display:flex;flex-direction:column;gap:4px;min-width:0}
.pp-bio-label{font-size:10px;font-weight:800;letter-spacing:1px;text-transform:uppercase;color:#64748b}
.pp-bio-value{font-size:14px;font-weight:700;color:#0F172A}
.pp-bio-chip{
  display:inline-block;
  padding:2px 8px;border-radius:6px;
  background:rgba(75,46,131,.06);color:#4B2E83;
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;font-weight:600;
}

/* ---------- SECTIONS ---------- */
.pp-section{margin:0 0 22px}
.pp-section-head{
  display:flex;align-items:baseline;justify-content:space-between;
  padding:0 4px 12px;
  border-bottom:1px solid rgba(47,28,90,.10);
  margin-bottom:16px;
}
.pp-section-title{margin:0;font-size:20px;font-weight:900;color:#0F172A;letter-spacing:-.2px}
.pp-section-meta{font-size:12px;font-weight:600;color:#64748b}
.pp-empty{
  background:#fff;border:1px dashed rgba(47,28,90,.18);
  border-radius:14px;padding:24px;text-align:center;
  color:#64748b;font-size:14px;
}

/* ---------- ACHIEVEMENTS GRID ---------- */
.pp-ach-grid{
  display:grid;grid-template-columns:repeat(4,1fr);gap:14px;
}
.pp-ach{
  display:flex;gap:12px;align-items:flex-start;
  background:#fff;border:1px solid rgba(47,28,90,.08);
  border-radius:14px;padding:16px;
  box-shadow:0 2px 8px rgba(75,46,131,.04);
  transition:transform .15s ease,box-shadow .15s ease;
}
.pp-ach:hover{transform:translateY(-2px);box-shadow:0 6px 18px rgba(75,46,131,.10)}
.pp-ach-icon{
  flex:0 0 38px;width:38px;height:38px;border-radius:10px;
  background:linear-gradient(135deg,rgba(122,193,66,.20),rgba(75,46,131,.18));
  color:#4B2E83;font-size:18px;font-weight:900;
  display:inline-flex;align-items:center;justify-content:center;
}
.pp-ach-body{min-width:0;flex:1}
.pp-ach-title{margin:0 0 4px;font-size:14px;font-weight:800;color:#0F172A;line-height:1.25}
.pp-ach-meta{font-size:11px;color:#64748b;display:flex;gap:4px;flex-wrap:wrap;text-transform:uppercase;letter-spacing:.4px;font-weight:700}
.pp-ach-issuer{margin:6px 0 0;font-size:12px;color:#475569}

/* ---------- HIGHLIGHTS GRID ---------- */
.pp-hl-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.pp-hl{
  background:#fff;border:1px solid rgba(47,28,90,.08);
  border-radius:14px;overflow:hidden;
  box-shadow:0 2px 8px rgba(75,46,131,.04);
  transition:transform .15s ease,box-shadow .15s ease;
}
.pp-hl:hover{transform:translateY(-2px);box-shadow:0 6px 18px rgba(75,46,131,.10)}
.pp-hl-thumb{position:relative;width:100%;aspect-ratio:16/9;background:#0F172A;overflow:hidden}
.pp-hl-media{width:100%;height:100%;object-fit:cover;display:block}
.pp-hl-play{
  position:absolute;inset:0;
  display:inline-flex;align-items:center;justify-content:center;
  font-size:42px;color:rgba(255,255,255,.92);
  text-shadow:0 4px 14px rgba(0,0,0,.5);
  pointer-events:none;
}
.pp-hl-meta{padding:12px 14px}
.pp-hl-title{margin:0 0 2px;font-size:13px;font-weight:800;color:#0F172A;line-height:1.3;
  display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}
.pp-hl-date{font-size:11px;color:#64748b;font-weight:600}

/* ---------- MATCHES LIST ---------- */
.pp-match-list{
  background:#fff;border:1px solid rgba(47,28,90,.08);
  border-radius:14px;overflow:hidden;
  box-shadow:0 2px 8px rgba(75,46,131,.04);
}
.pp-match-row{
  display:grid;
  grid-template-columns:110px 1fr 90px 90px 60px;
  align-items:center;
  padding:12px 18px;
  font-size:13px;color:#0F172A;
  border-top:1px solid rgba(47,28,90,.06);
}
.pp-match-row:first-child{border-top:0}
.pp-match-head{
  font-size:10px;font-weight:800;letter-spacing:1px;text-transform:uppercase;
  color:#64748b;background:rgba(47,28,90,.03);
}
.pp-match-date{font-family:ui-monospace,monospace;font-size:12px;color:#475569}
.pp-match-opp{font-weight:700}
.pp-match-result{
  display:inline-flex;align-items:center;justify-content:center;
  padding:3px 10px;border-radius:9999px;
  font-size:11px;font-weight:900;letter-spacing:.5px;
  width:max-content;
}
.pp-result-win{background:rgba(122,193,66,.18);color:#3a5a16}
.pp-result-loss{background:rgba(220,38,38,.12);color:#991b1b}
.pp-result-draw{background:rgba(100,116,139,.14);color:#334155}
.pp-result-na{background:rgba(100,116,139,.08);color:#64748b}
.pp-match-ga{font-weight:700;color:#0F172A}
.pp-match-min{font-family:ui-monospace,monospace;font-size:12px;color:#475569}

/* ---------- FOOTER ---------- */
.pp-footer{
  margin-top:14px;text-align:center;
  font-size:12px;color:#94a3b8;
}
.pp-footer code{font-size:11px;color:#64748b}

/* ---------- RESPONSIVE ---------- */
@media (max-width:900px){
  .pp-hero-inner{flex-direction:column;padding:24px 22px 18px}
  .pp-hero-right{align-items:flex-start;flex-direction:row;gap:8px}
  .pp-name{font-size:32px}
  .pp-avatar{width:72px;height:72px;border-radius:18px;font-size:30px;flex-basis:72px}
  .pp-stat-strip{grid-template-columns:repeat(2,1fr)}
  .pp-ach-grid{grid-template-columns:repeat(2,1fr)}
  .pp-hl-grid{grid-template-columns:repeat(2,1fr)}
  .pp-match-row{grid-template-columns:90px 1fr 70px}
  .pp-match-row > :nth-child(4),
  .pp-match-row > :nth-child(5){display:none}
}
@media (max-width:560px){
  .pp-stat-strip{grid-template-columns:1fr 1fr}
  .pp-ach-grid{grid-template-columns:1fr}
  .pp-hl-grid{grid-template-columns:1fr}
  .pp-name{font-size:26px}
  .pp-bio{padding:14px 16px;gap:14px 22px}
  .pp-hero{border-radius:18px}
}

/* v9 — mobile form fix (task: Athlete device optimisation).
   CSS-grid cells default to min-width:auto, so a native <input type=date> can't shrink and
   overflows into the neighbouring cell (the DOB/Nationality overlap on phones). Letting the
   cells + controls shrink fixes the overflow; the hard single-column fallback covers small phones. */
.wizard-grid .field,.profile-grid .profile-field{min-width:0}
.wizard-grid .input,.wizard-grid select.input,.wizard-grid textarea.input,
.profile-grid .input,.profile-grid select.input,.profile-grid textarea.input{max-width:100%;min-width:0}
@media (max-width:640px){
  .wizard-grid,.profile-grid{grid-template-columns:1fr}
}
