/* ── CSS Variables ──────────────────────────────────────────────────────────── */
:root {
  --bg:          #0D1117;
  --surface:     #161B22;
  --surface-2:   #1C2330;
  --surface-3:   #21262D;
  --border:      rgba(255,255,255,0.08);
  --border-light: rgba(255,255,255,0.05);
  --text:        #CDD9E5;
  --text-bright: #E6EDF3;
  --text-muted:  rgba(205,217,229,0.45);

  /* UI accent — Arctic cyan/teal (não confundir com grupos musculares) */
  --accent:      #00D4FF;
  --accent-d:    rgba(0,212,255,0.10);
  --accent-2:    #00FFB3;

  /* Grupos musculares — cores semânticas mantidas */
  --push:        #FF6B35;
  --pull:        #58A6FF;
  --lower:       #3FB950;
  --arms:        #D2A8FF;
  --cardio:      #11FBA6;
  --gold:        #E3B341;
  --danger:      #F85149;
  --success:     #00FFB3;

  --push-dim:    rgba(255, 107, 53, 0.12);
  --pull-dim:    rgba(88, 166, 255, 0.12);
  --lower-dim:   rgba(63, 185, 80, 0.12);
  --arms-dim:    rgba(210, 168, 255, 0.12);

  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'Space Grotesk', system-ui, sans-serif;
  --font-mono:    'Space Mono', monospace;

  --radius:      14px;
  --radius-sm:   9px;
  --radius-xs:   5px;
  --shadow:      0 2px 8px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.04);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.6);
  --transition:  0.18s ease;
}

/* ── Reset & Base ────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, button, select, textarea { font-size: 1rem; }
img { max-width: 100%; }

/* ── Navbar ──────────────────────────────────────────────────────────────────── */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 60px;
  background: rgba(13,17,23,0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.nav-logo { display: block; height: 48px; width: auto; }
.auth-logo { display: block; height: 64px; width: auto; margin: 0 auto; }

.nav-right {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

/* ── Main Content ────────────────────────────────────────────────────────────── */
.main-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ── Buttons ─────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.2rem;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  transition: opacity var(--transition), transform var(--transition), background var(--transition);
  white-space: nowrap;
  cursor: pointer;
}
.btn:hover { opacity: 0.88; transform: translateY(-1px); }
.btn:active { transform: translateY(0); opacity: 1; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-primary  { background: var(--accent); color: #0D1117; }
.btn-secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-danger   { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.btn-danger:hover { background: rgba(248,81,73,0.1); }
.btn-lg { padding: 0.75rem 1.75rem; font-size: 1rem; }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
.btn-save {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0D1117;
  font-size: 1rem;
  padding: 0.75rem 2rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
}

.btn--push  { background: var(--push);  color: #fff; }
.btn--pull  { background: var(--pull);  color: #0D1117; }
.btn--lower { background: var(--lower); color: #0D1117; }
.btn--arms  { background: var(--arms);  color: #0D1117; }

.btn-video {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  background: rgba(255, 0, 0, 0.15);
  color: #ff4444;
  border: 1px solid rgba(255, 0, 0, 0.3);
  border-radius: var(--radius-xs);
  font-size: 0.8rem;
  font-weight: 600;
  transition: background var(--transition);
  white-space: nowrap;
}
.btn-video:hover { background: rgba(255, 0, 0, 0.25); }

/* ── Badges ──────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.badge--active   { background: rgba(63, 185, 80, 0.18); color: var(--success); border: 1px solid rgba(63,185,80,0.3); }
.badge--inactive { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }

/* ── Page Header ─────────────────────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 2rem;
}
.page-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.5rem;
  letter-spacing: 0.04em;
  color: var(--text-bright);
  line-height: 1;
}
.page-subtitle { color: var(--text-muted); margin-top: 0.4rem; }

.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.section-subtitle { color: var(--text-muted); font-size: 0.875rem; margin-top: -0.5rem; margin-bottom: 1.25rem; }

/* ── Workout Grid (Home) ─────────────────────────────────────────────────────── */
.workout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.workout-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  cursor: pointer;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.workout-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0,212,255,0.15);
}
.workout-card--active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(0,212,255,0.2), var(--shadow);
}
.workout-card--active:hover { border-color: var(--success); }

.workout-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.workout-date { font-size: 0.78rem; color: var(--text-muted); }
.workout-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  color: var(--text-bright);
  line-height: 1.1;
}
.workout-meta-info { font-size: 0.82rem; color: var(--text-muted); }

.workout-stats {
  display: flex;
  gap: 1.5rem;
}
.stat { display: flex; flex-direction: column; }
.stat-value { font-family: var(--font-mono); font-weight: 700; font-size: 1.2rem; color: var(--text-bright); }
.stat-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

.workout-groups-preview {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.group-pill {
  padding: 0.15rem 0.6rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.group-pill--push  { background: var(--push-dim);  color: var(--push);  border: 1px solid rgba(255,107,53,0.25); }
.group-pill--pull  { background: var(--pull-dim);  color: var(--pull);  border: 1px solid rgba(88,166,255,0.25); }
.group-pill--lower { background: var(--lower-dim); color: var(--lower); border: 1px solid rgba(63,185,80,0.25); }
.group-pill--arms  { background: var(--arms-dim);  color: var(--arms);  border: 1px solid rgba(210,168,255,0.25); }

.workout-card-footer { margin-top: auto; }
.card-link { font-size: 0.85rem; color: var(--text-muted); }

/* ── Empty State ─────────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 5rem 2rem;
}
.empty-icon   { font-size: 4rem; margin-bottom: 1rem; }
.empty-title  { font-size: 1.5rem; font-weight: 700; color: var(--text-bright); margin-bottom: 0.5rem; }
.empty-text   { color: var(--text-muted); margin-bottom: 1.5rem; }

/* ── Upload Modal ────────────────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.modal-title { font-weight: 700; font-size: 1.1rem; color: var(--text-bright); }
.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-xs);
  transition: color var(--transition);
}
.modal-close:hover { color: var(--text-bright); }
.modal-body { padding: 1.5rem; display: flex; flex-direction: column; gap: 1.25rem; }
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
}

/* ── Form Elements ───────────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-label { font-weight: 600; font-size: 0.875rem; color: var(--text-bright); }
.form-input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-bright);
  padding: 0.65rem 0.9rem;
  width: 100%;
  transition: border-color var(--transition);
}
.form-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,212,255,0.08); }
.form-hint { font-size: 0.78rem; color: var(--text-muted); }

.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 2.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-d);
}
.drop-zone.has-file { border-color: var(--success); background: var(--lower-dim); }
.drop-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.drop-text { font-weight: 500; color: var(--text-bright); }
.drop-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.25rem; }

.upload-progress { display: flex; flex-direction: column; gap: 0.5rem; }
.progress-bar {
  height: 6px;
  background: var(--surface-2);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 3px;
  animation: progressPulse 1.5s ease-in-out infinite;
}
@keyframes progressPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}
.progress-text { font-size: 0.82rem; color: var(--text-muted); text-align: center; }

/* ── New plan split button ───────────────────────────────────────────────────── */
.new-plan-split { display:flex; gap:.35rem; align-items:center; }

/* ── Manual Plan Builder ─────────────────────────────────────────────────────── */
.plan-builder { display:flex; flex-direction:column; gap:1.5rem; max-width:600px; padding:0 0 6rem; }
.plan-group { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; }
.plan-group-header { display:flex; align-items:center; gap:.5rem; padding:.75rem 1rem; background:rgba(255,255,255,.03); border-bottom:1px solid var(--border); }
.plan-group-type { background:var(--surface); color:var(--text-bright); border:1px solid var(--border); border-radius:var(--radius-sm); padding:.35rem .6rem; font-size:.82rem; font-weight:700; flex-shrink:0; }
.plan-group-label { flex:1; background:transparent; border:none; color:var(--text-muted); font-size:.82rem; font-family:var(--font-mono); padding:.2rem .4rem; outline:none; min-width:0; }
.plan-group-label:focus { color:var(--text); }
.plan-group-label::placeholder { color:var(--text-muted); opacity:.5; }
.plan-group-remove { background:none; border:none; color:var(--text-muted); cursor:pointer; font-size:1rem; padding:.2rem .4rem; line-height:1; }
.plan-group-remove:hover { color:var(--danger,#ff4d4d); }
.plan-ex-list { display:flex; flex-direction:column; }
.plan-ex-row { display:flex; align-items:center; gap:.5rem; padding:.5rem 1rem; border-bottom:1px solid rgba(255,255,255,.04); }
.plan-ex-row:last-child { border-bottom:none; }
.plan-ex-name { flex:1; background:transparent; border:none; color:var(--text); font-size:.875rem; padding:.2rem; outline:none; min-width:0; }
.plan-ex-name:focus { color:var(--text-bright); }
.plan-ex-name::placeholder { color:var(--text-muted); opacity:.5; }
.plan-ex-sets { width:44px; background:var(--surface-raised,rgba(255,255,255,.06)); border:1px solid var(--border); border-radius:4px; color:var(--text); font-family:var(--font-mono); font-size:.8rem; text-align:center; padding:.2rem; }
.plan-ex-reps { width:90px; background:var(--surface-raised,rgba(255,255,255,.06)); border:1px solid var(--border); border-radius:4px; color:var(--text); font-family:var(--font-mono); font-size:.8rem; padding:.2rem .4rem; }
.plan-ex-remove { background:none; border:none; color:var(--text-muted); cursor:pointer; font-size:.85rem; padding:.2rem; line-height:1; flex-shrink:0; }
.plan-ex-remove:hover { color:var(--danger,#ff4d4d); }
.plan-ex-bw { width:40px; display:flex; align-items:center; justify-content:center; flex-shrink:0; cursor:pointer; }
.plan-ex-bw input[type="checkbox"] { width:15px; height:15px; cursor:pointer; accent-color:var(--accent-2); }
.plan-ex-row--cardio .plan-ex-duration { flex:1 0 140px; max-width:160px; background:var(--surface-raised,rgba(255,255,255,.06)); border:1px solid var(--border); border-radius:4px; color:var(--text); font-family:var(--font-mono); font-size:.8rem; padding:.2rem .4rem; }
.plan-add-ex { display:flex; align-items:center; gap:.4rem; padding:.5rem 1rem; color:var(--accent); font-size:.8rem; cursor:pointer; background:none; border:none; border-top:1px solid rgba(255,255,255,.04); width:100%; text-align:left; }
.plan-add-ex:hover { background:var(--accent-d); }
.plan-ex-header { display:flex; gap:.5rem; padding:.3rem 1rem; border-bottom:1px solid rgba(255,255,255,.04); }
.plan-ex-header span { font-size:.7rem; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--text-muted); }
.plan-add-group-btn { display:flex; align-items:center; justify-content:center; gap:.5rem; padding:.75rem; border:2px dashed var(--border); border-radius:var(--radius); color:var(--text-muted); font-size:.85rem; cursor:pointer; background:none; width:100%; transition:border-color var(--transition),color var(--transition); }
.plan-add-group-btn:hover { border-color:var(--accent); color:var(--accent); }

/* ── PDF Confirm Modal ───────────────────────────────────────────────────────── */
.pdf-confirm-intro { font-size:.85rem; color:var(--text-muted); margin:0; }
.pdf-confirm-athlete { font-size:.9rem; color:var(--text-bright); margin:.25rem 0; }
.pdf-confirm-notes { font-size:.82rem; color:var(--text-muted); font-style:italic; margin:.25rem 0 .75rem; }
.pdf-confirm-scroll { max-height:320px; overflow-y:auto; display:flex; flex-direction:column; gap:.75rem; }
.pdf-confirm-group { background:var(--surface-2,rgba(255,255,255,.04)); border:1px solid var(--border); border-radius:var(--radius-sm); padding:.75rem 1rem; }
.pdf-confirm-group-name { font-weight:700; font-size:.85rem; color:var(--accent); text-transform:uppercase; letter-spacing:.05em; margin-bottom:.4rem; }
.pdf-confirm-exlist { margin:0; padding:0 0 0 1.1rem; list-style:disc; }
.pdf-confirm-exlist li { font-size:.82rem; color:var(--text); line-height:1.7; }

/* ── Activity Import ─────────────────────────────────────────────────────────── */
.act-import-preview { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:1.25rem 1.5rem; display:flex; flex-direction:column; gap:.6rem; }
.act-import-stat { display:flex; justify-content:space-between; align-items:center; font-size:.9rem; }
.act-import-stat span:first-child { color:var(--text-muted); }
.act-import-stat strong { color:var(--text-bright); font-family:var(--font-mono); }
.act-laps-table { width:100%; border-collapse:collapse; font-size:.8rem; margin-top:.5rem; }
.act-laps-table th { color:var(--text-muted); font-weight:600; text-align:left; padding:.3rem .5rem; border-bottom:1px solid var(--border); }
.act-laps-table td { padding:.3rem .5rem; border-bottom:1px solid rgba(255,255,255,.04); }

/* ── CrossFit Record ─────────────────────────────────────────────────────────── */
.cf-record { display:flex; flex-direction:column; gap:1.5rem; max-width:520px; margin:0 auto; padding:1rem 0 5rem; }
.cf-scoring-row { display:flex; gap:.5rem; }
.cf-scoring-btn { flex:1; padding:.6rem; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--surface); color:var(--text-muted); font-size:.85rem; cursor:pointer; transition:border-color var(--transition),color var(--transition); }
.cf-scoring-btn.active { border-color:var(--accent); color:var(--accent); background:var(--accent-d); }
.cf-result-hint { font-size:.78rem; color:var(--text-muted); margin-top:.3rem; }

/* ── Hyrox Step-by-step ──────────────────────────────────────────────────────── */
.hyrox-header { display:flex; align-items:center; justify-content:space-between; padding:.75rem 1rem; background:var(--surface); border-bottom:1px solid var(--border); position:sticky; top:0; z-index:10; }
.hyrox-progress-label { font-size:.75rem; color:var(--text-muted); }
.hyrox-progress-val { font-size:.9rem; color:var(--accent); font-family:var(--font-mono); font-weight:700; }
.hyrox-step { display:none; flex-direction:column; gap:1.25rem; padding:1rem; max-width:520px; margin:0 auto; }
.hyrox-step.active { display:flex; }
.hyrox-step-badge { font-size:.7rem; font-weight:700; text-transform:uppercase; letter-spacing:.1em; color:var(--text-muted); }
.hyrox-step-badge--run { color:var(--accent); }
.hyrox-step-badge--station { color:var(--accent-2); }
.hyrox-step-name { font-size:1.2rem; font-weight:700; color:var(--text-bright); }
.hyrox-step-target { font-size:.82rem; color:var(--text-muted); }
.hyrox-chrono { font-family:var(--font-mono); font-size:2.5rem; font-weight:700; color:var(--accent); text-align:center; padding:.75rem; background:var(--surface); border-radius:var(--radius); border:1px solid var(--border); }
.hyrox-chrono-controls { display:flex; gap:.75rem; }
.hyrox-chrono-btn { flex:1; padding:.7rem; border-radius:var(--radius-sm); font-size:.9rem; font-weight:600; cursor:pointer; border:none; }
.hyrox-chrono-btn--start { background:var(--accent); color:#000; }
.hyrox-chrono-btn--stop  { background:var(--accent-2); color:#000; }
.hyrox-metric-row { display:flex; gap:.75rem; align-items:center; }
.hyrox-metric-label { font-size:.82rem; color:var(--text-muted); width:90px; flex-shrink:0; }
.hyrox-nav-row { display:flex; gap:.75rem; padding-top:.5rem; }
.hyrox-nav-btn { flex:1; padding:.75rem; border-radius:var(--radius-sm); font-size:.9rem; font-weight:600; cursor:pointer; border:none; }
.hyrox-nav-btn--prev { background:var(--surface); color:var(--text); border:1px solid var(--border); }
.hyrox-nav-btn--next { background:var(--accent); color:#000; }
.hyrox-done-panel { display:none; flex-direction:column; gap:1rem; align-items:center; padding:2rem 1rem; text-align:center; }
.hyrox-done-panel.active { display:flex; }

/* ── Workout Detail ──────────────────────────────────────────────────────────── */
.workout-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.workout-header-top { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.4rem; }
.athlete-name { font-size: 0.85rem; color: var(--text-muted); }
.workout-detail-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.8rem;
  letter-spacing: 0.04em;
  color: var(--text-bright);
  line-height: 1;
}
.workout-period { color: var(--text-muted); font-size: 0.875rem; margin-top: 0.3rem; }
.workout-header-actions { display: flex; gap: 0.75rem; align-items: center; flex-shrink: 0; }

.summary-bar {
  display: flex;
  gap: 2rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}
.summary-item { display: flex; flex-direction: column; }
.summary-value { font-family: var(--font-mono); font-size: 2rem; font-weight: 700; color: var(--text-bright); line-height: 1; }
.summary-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 0.2rem; }

/* ── Group text colours (used in history + edit_session) ─────────────────────── */
.group-text--push  { color: var(--push); }
.group-text--pull  { color: var(--pull); }
.group-text--lower { color: var(--lower); }
.group-text--arms  { color: var(--arms); }

/* ── Block Cards (workout detail inspection view) ────────────────────────────── */
.blocks-list { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem; }

.block-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}
.block-card--push   { border-left-color: var(--push); }
.block-card--pull   { border-left-color: var(--pull); }
.block-card--lower  { border-left-color: var(--lower); }
.block-card--arms   { border-left-color: var(--arms); }
.block-card--cardio { border-left-color: var(--cardio); }

.block-card-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.block-icon { flex-shrink: 0; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; }
.block-icon svg { width: 48px; height: 48px; }
.block-card--push   .block-icon { color: var(--push); }
.block-card--pull   .block-icon { color: var(--pull); }
.block-card--lower  .block-icon { color: var(--lower); }
.block-card--arms   .block-icon { color: var(--arms); }
.block-card--cardio .block-icon { color: var(--cardio); }

.block-title-area { flex: 1; min-width: 0; }
.block-name { font-family: 'Bebas Neue', sans-serif; font-size: 1.5rem; letter-spacing: 0.05em; line-height: 1; color: var(--text-bright); margin-bottom: 0.2rem; }
.block-description { font-size: 0.8rem; color: var(--text-muted); }

.block-card-stats { display: flex; flex-direction: column; align-items: flex-end; gap: 0.2rem; flex-shrink: 0; }
.block-stat { font-size: 0.72rem; color: var(--text-muted); }
.block-stat-link { font-size: 0.72rem; color: var(--text-muted); text-decoration: none; }
.block-stat-link:hover { color: var(--accent); }

.block-exercises {
  list-style: none;
  padding: 0.75rem 0 0;
  margin: 0;
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.block-exercise { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.block-exercise-name { font-size: 0.82rem; color: var(--text-bright); }
.block-exercise-detail { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }

.history-link-section { margin: 1.5rem 0; }
.danger-zone { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border-light); }

/* ── Notes Card ──────────────────────────────────────────────────────────────── */
.notes-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-top: 2rem;
}
.notes-title { font-weight: 600; color: var(--text-bright); margin-bottom: 0.5rem; }
.notes-text { color: var(--text-muted); font-size: 0.875rem; white-space: pre-line; }


/* ── Session Page ────────────────────────────────────────────────────────────── */
.session-banner {
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid;
}
.session-banner--push  { background: var(--push-dim);  border-color: var(--push);  }
.session-banner--pull  { background: var(--pull-dim);  border-color: var(--pull);  }
.session-banner--lower { background: var(--lower-dim); border-color: var(--lower); }
.session-banner--arms  { background: var(--arms-dim);  border-color: var(--arms);  }

.session-banner-date { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.3rem; }
.session-banner-quote { font-style: italic; color: var(--text-bright); font-size: 0.95rem; line-height: 1.5; }

.session-group-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.session-group-icon { font-size: 2.5rem; display: flex; align-items: center; }
.session-group-icon svg { width: 40px; height: 40px; }
.session-group-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.8rem;
  letter-spacing: 0.05em;
  line-height: 1;
}
.session-group-desc { color: var(--text-muted); font-size: 0.875rem; }
.last-session-badge { margin-left: auto; text-align: right; }
.last-session-label { display: block; font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.last-session-date  { font-weight: 600; font-size: 0.875rem; color: var(--gold); }

/* ── Exercise Cards ──────────────────────────────────────────────────────────── */
.exercises-container { display: flex; flex-direction: column; gap: 1.25rem; }

.exercise-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.exercise-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  gap: 0.75rem;
  flex-wrap: wrap;
}
.exercise-title-row { display: flex; align-items: center; gap: 0.75rem; flex: 1; }
.exercise-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}
.exercise-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-bright);
  line-height: 1.3;
}

.last-session-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.5rem 1.25rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border-light);
}
.last-label { font-size: 0.72rem; color: var(--text-muted); margin-right: 0.2rem; font-weight: 600; }
.last-set-chip {
  font-size: 0.72rem;
  color: var(--gold);
  background: rgba(227, 179, 65, 0.1);
  border: 1px solid rgba(227, 179, 65, 0.2);
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
}

/* ── Sets Table ──────────────────────────────────────────────────────────────── */
.sets-table-wrapper { overflow-x: auto; }
.sets-table {
  width: 100%;
  border-collapse: collapse;
}
.sets-table th {
  text-align: left;
  padding: 0.6rem 1rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.sets-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border-light);
}
.sets-table tr:last-child td { border-bottom: none; }
.sets-table tr.set-done { background: rgba(63, 185, 80, 0.06); }
.sets-table tr.set-done .set-num-cell { color: var(--success); }

.set-num-cell { font-weight: 700; color: var(--text-muted); width: 60px; }
.set-target-cell { width: 80px; }
.set-input-cell { width: 130px; }
.set-check-cell { width: 50px; text-align: center; }

.target-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}

.set-input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-bright);
  padding: 0.5rem 0.65rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  transition: border-color var(--transition);
  -moz-appearance: textfield;
}
.set-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,212,255,0.08); }
.set-input::-webkit-inner-spin-button, .set-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.set-done .set-input { border-color: rgba(63, 185, 80, 0.3); }

.check-btn {
  background: none;
  border: 2px solid var(--border);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 auto;
}
.check-btn:hover { border-color: var(--accent); color: var(--accent); }
.set-done .check-btn {
  border-color: var(--accent-2);
  background: rgba(0,255,179,0.12);
  color: var(--accent-2);
}

/* ── Save Bar ────────────────────────────────────────────────────────────────── */
.save-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(22, 27, 34, 0.95);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(12px);
  z-index: 50;
}
.save-bar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.save-bar-info { font-size: 0.85rem; color: var(--text-muted); }

/* Save bar extras (duration + RPE) */
.save-bar-extras {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex: 1;
}
.save-extra-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.save-extra-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.save-extra-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.save-extra-input {
  width: 56px;
  padding: 0.3rem 0.4rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-bright);
  font-size: 0.9rem;
  text-align: center;
}
.save-extra-input:focus { outline: none; border-color: var(--accent); }
.save-extra-unit { font-size: 0.78rem; color: var(--text-muted); }

/* RPE Picker */
.rpe-picker {
  display: flex;
  gap: 3px;
}
.rpe-btn {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  padding: 0;
}
.rpe-btn--easy   { border-color: rgba(63,185,80,0.3);   color: var(--success); }
.rpe-btn--medium { border-color: rgba(227,179,65,0.3);  color: var(--gold); }
.rpe-btn--hard   { border-color: rgba(248,81,73,0.3);   color: var(--danger); }
.rpe-btn--active.rpe-btn--easy   { background: rgba(63,185,80,0.2);  color: var(--success); }
.rpe-btn--active.rpe-btn--medium { background: rgba(227,179,65,0.2); color: var(--gold); }
.rpe-btn--active.rpe-btn--hard   { background: rgba(248,81,73,0.2);  color: var(--danger); }
.rpe-btn:hover { opacity: 0.8; transform: scale(1.1); }

/* ── KPI Dashboard ───────────────────────────────────────────────────────────── */
.kpi-plan-badge {
  padding: 0.3rem 0.75rem;
  border-radius: 99px;
  border: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}
.kpi-plan-badge--premium {
  border-color: rgba(227,179,65,0.4);
  color: var(--gold);
  background: rgba(227,179,65,0.08);
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
}
.kpi-card--locked { opacity: 0.6; pointer-events: none; }

.kpi-lock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(13,17,23,0.6);
  backdrop-filter: blur(3px);
  z-index: 2;
  border-radius: var(--radius);
}
.kpi-lock-overlay span {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gold);
}

.kpi-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.kpi-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 0.2rem;
}
.kpi-desc { font-size: 0.78rem; color: var(--text-muted); max-width: 540px; }

.kpi-chart-wrap { height: 220px; position: relative; }

.kpi-toggles { display: flex; flex-wrap: wrap; gap: 0.4rem; flex-shrink: 0; }
.kpi-toggle-btn {
  padding: 0.25rem 0.65rem;
  border-radius: 99px;
  border: 1px solid;
  font-size: 0.72rem;
  font-weight: 600;
  background: transparent;
  cursor: pointer;
  opacity: 0.45;
  transition: opacity var(--transition);
}
.kpi-toggle-btn--active { opacity: 1; }

.kpi-select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text);
  font-size: 0.8rem;
  padding: 0.35rem 0.6rem;
  max-width: 200px;
  flex-shrink: 0;
}
.wtype-select {
  background: var(--surface-2);
  border: 1px solid rgba(0,212,255,.25);
  border-radius: var(--radius-xs);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.55rem;
  cursor: pointer;
  flex-shrink: 0;
}

/* ── Dev plan preview banner ─────────────────────────────────────────────────── */
.dev-plan-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .85rem;
  padding: .45rem .75rem;
  background: rgba(255,184,48,.07);
  border: 1px dashed rgba(255,184,48,.35);
  border-radius: var(--radius-sm);
  font-size: .72rem;
}
.dev-plan-label { color: var(--text-muted); }
.dev-plan-label strong { color: var(--gold); }
.dev-plan-toggle { display: flex; gap: .3rem; }
.dev-plan-btn {
  padding: .2rem .55rem;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: .68rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: .04em;
  transition: all var(--transition);
}
.dev-plan-btn--active {
  background: var(--gold);
  border-color: var(--gold);
  color: #0D1117;
}
.dev-plan-btn--reset {
  color: var(--text-muted);
  font-size: .8rem;
  line-height: 1;
  padding: .15rem .45rem;
}
.dev-plan-btn:hover:not(.dev-plan-btn--active) { border-color: var(--gold); color: var(--gold); }

.kpi-section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin: 2rem 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.kpi-lock-badge {
  background: rgba(227,179,65,0.1);
  border: 1px solid rgba(227,179,65,0.3);
  color: var(--gold);
  font-size: 0.68rem;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
}

.kpi-placeholder, .kpi-empty-msg {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-style: italic;
}

/* ── History Page ────────────────────────────────────────────────────────────── */
.history-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.history-group-icon { font-size: 3rem; display: flex; align-items: center; }
.history-group-icon svg { width: 48px; height: 48px; }
.history-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.8rem;
  letter-spacing: 0.05em;
  line-height: 1;
}
.history-subtitle { color: var(--text-muted); font-size: 0.875rem; }

.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1rem;
}
.chart-wrapper {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.chart-title { font-weight: 600; font-size: 0.875rem; color: var(--text-bright); margin-bottom: 0.75rem; }

.history-sessions { display: flex; flex-direction: column; gap: 1.25rem; }
.history-session-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.history-session-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.25rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.history-session-date { display: flex; align-items: center; gap: 0.5rem; }
.hist-day  { font-weight: 700; color: var(--text-bright); }
.hist-time { font-size: 0.8rem; color: var(--text-muted); }
.history-session-stats { font-size: 0.8rem; color: var(--text-muted); }
.session-actions { display: flex; gap: 0.5rem; margin-left: auto; }

.history-exercises { padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: 0.85rem; }
.history-exercise {}
.history-ex-name { font-weight: 600; font-size: 0.875rem; color: var(--text-bright); margin-bottom: 0.4rem; }
.history-sets { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.history-set-chip {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  padding: 0.25rem 0.6rem;
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  font-size: 0.78rem;
}
.history-set-chip.has-weight { border-color: rgba(0,212,255,0.2); }
.hset-num    { color: var(--text-muted); font-weight: 600; }
.hset-weight { font-family: var(--font-mono); color: var(--accent); font-weight: 700; }
.hset-reps   { color: var(--text-bright); }
.hset-target { color: var(--text-muted); font-size: 0.7rem; }

/* ── Toast ───────────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-bright);
  z-index: 999;
  transition: transform 0.25s ease, opacity 0.25s ease;
  opacity: 0;
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.toast--success { border-color: rgba(0,255,179,0.4); color: var(--success); }
.toast.toast--error   { border-color: rgba(248,81,73,0.4); color: var(--danger); }

/* ── Cardio Session ──────────────────────────────────────────────────────────── */
.cardio-session-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.cardio-group-icon { display: flex; align-items: center; }
.cardio-group-icon svg { width: 56px; height: 56px; }
.cardio-session-title { margin: 0; font-size: 1.5rem; font-weight: 700; color: var(--text-bright); }
.cardio-session-date { margin: 0.2rem 0 0; font-size: 0.85rem; color: var(--text-muted); }
.cardio-quote { color: var(--text-muted); font-style: italic; margin-bottom: 1.5rem; font-size: 0.9rem; }
.cardio-form { display: flex; flex-direction: column; gap: 1.25rem; max-width: 560px; }
.cardio-actions { margin-top: 0.5rem; }
.btn-large { padding: 0.75rem 1.5rem; font-size: 1rem; width: 100%; justify-content: center; }
.required { color: var(--danger); }

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .main-content { padding: 1rem 1rem 4rem; }
  .navbar { padding: 0 1rem; }

  .page-title { font-size: 1.8rem; }
  .workout-grid { grid-template-columns: 1fr; }
  .charts-grid  { grid-template-columns: 1fr; }

  .workout-detail-title { font-size: 2rem; }
  .workout-header { flex-direction: column; }
  .workout-header-actions { flex-direction: row; }

  .session-group-name { font-size: 2rem; }
  .sets-table th, .sets-table td { padding: 0.55rem 0.65rem; }
  .set-input { font-size: 1.1rem; padding: 0.55rem 0.4rem; }

  .summary-bar { gap: 1rem; }
}

/* ── Auth Pages ──────────────────────────────────────────────────────────────── */
.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem;
  background: var(--bg);
}

.auth-container {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.auth-brand {
  display: flex;
  align-items: center;
  margin-bottom: 0.25rem;
}

.auth-tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

.auth-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 1.5rem;
}

.auth-error {
  background: rgba(248, 81, 73, 0.12);
  border: 1px solid rgba(248, 81, 73, 0.3);
  border-radius: var(--radius-sm);
  color: var(--danger);
  font-size: 0.875rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
}

.btn-block { width: 100%; margin-top: 0.5rem; }

.auth-switch {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.auth-link { color: var(--accent); font-weight: 500; }
.auth-link:hover { text-decoration: underline; }

/* Role Selector */
.role-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.25rem;
}
.role-option { cursor: pointer; }
.role-option input[type="radio"] { display: none; }
.role-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 1rem 0.75rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  transition: border-color var(--transition), background var(--transition);
  text-align: center;
}
.role-option input:checked + .role-card {
  border-color: var(--accent);
  background: rgba(0, 212, 255, 0.07);
}
.role-icon { font-size: 1.5rem; }
.role-name { font-size: 0.8rem; font-weight: 600; color: var(--text-bright); }
.role-desc { font-size: 0.72rem; color: var(--text-muted); }

.form-hint-inline { color: var(--text-muted); font-size: 0.8rem; font-weight: 400; }

/* OAuth buttons */
.oauth-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.btn-oauth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: opacity var(--transition), transform var(--transition);
  cursor: pointer;
}
.btn-oauth:hover { opacity: 0.88; transform: translateY(-1px); }

.btn-oauth--google {
  background: #fff;
  color: #3c4043;
  border-color: #dadce0;
}

.oauth-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.oauth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  margin: 0.25rem 0 1rem;
}
.oauth-divider::before,
.oauth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.invite-notice {
  background: rgba(88, 166, 255, 0.1);
  border: 1px solid rgba(88, 166, 255, 0.25);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: var(--pull);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.invite-notice-icon { font-size: 1.1rem; flex-shrink: 0; }

/* ── Navbar extras ───────────────────────────────────────────────────────────── */
.nav-user-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-right: 0.25rem;
}
.btn-sm {
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
}

/* ── Nav Avatar ──────────────────────────────────────────────────────────────── */
.nav-avatar-wrap {
  position: relative;
}

.nav-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color var(--transition), opacity var(--transition);
  position: relative;
  flex-shrink: 0;
}
.nav-avatar:hover { border-color: var(--accent); }
.nav-avatar--loading { opacity: 0.5; pointer-events: none; }

.nav-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.nav-avatar-letter {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.nav-avatar-edit {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  background: rgba(0,0,0,0.55);
  opacity: 0;
  transition: opacity var(--transition);
  border-radius: 50%;
}
.nav-avatar:hover .nav-avatar-edit { opacity: 1; }

/* Dropdown menu */
.nav-avatar-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  min-width: 140px;
  overflow: hidden;
  display: none;
  z-index: 200;
}
.nav-avatar-menu.show { display: block; }

.nav-avatar-menu-name {
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.nav-avatar-menu-item {
  display: block;
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
  color: var(--text);
  transition: background var(--transition);
}
.nav-avatar-menu-item:hover { background: var(--surface-2); }
.nav-avatar-menu-item--danger { color: var(--danger); }

/* ── PT Dashboard ────────────────────────────────────────────────────────────── */
.pt-clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.pt-client-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: border-color var(--transition), transform var(--transition);
  cursor: pointer;
}
.pt-client-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(0,212,255,0.12), var(--shadow);
}

.pt-client-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pt-client-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: #0D1117;
  flex-shrink: 0;
}

.pt-client-info { flex: 1; min-width: 0; }
.pt-client-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pt-client-email {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pt-client-alert {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}
.pt-client-alert--green  { background: rgba(63,185,80,0.15); color: var(--success); }
.pt-client-alert--orange { background: rgba(227,179,65,0.15); color: var(--gold); }
.pt-client-alert--red    { background: rgba(248,81,73,0.15);  color: var(--danger); }

.pt-week-progress { display: flex; flex-direction: column; gap: 0.4rem; }
.pt-week-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.pt-week-fraction { font-weight: 600; }
.pt-week-bar {
  height: 6px;
  background: var(--surface-3);
  border-radius: 99px;
  overflow: hidden;
}
.pt-week-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.4s ease;
}
.pt-week-fill--green  { background: var(--success); }
.pt-week-fill--orange { background: var(--gold); }
.pt-week-fill--red    { background: var(--danger); }

.pt-client-no-plan {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}
.pt-client-last {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.pt-client-footer { margin-top: auto; }

/* PT Viewing Banner */
.pt-viewing-banner {
  background: rgba(88, 166, 255, 0.08);
  border: 1px solid rgba(88, 166, 255, 0.2);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--pull);
  margin-bottom: 1.25rem;
  gap: 0.75rem;
}

/* Invite modal */
.invite-result { display: flex; flex-direction: column; gap: 0.75rem; }
.invite-code-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
}
.invite-code-text {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--accent);
  flex: 1;
}
.invite-link-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
}
.invite-link-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  word-break: break-all;
}

/* ── Connect PT Banner (index page) ─────────────────────────────────────────── */
.connect-pt-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-top: 1.5rem;
}
.connect-pt-banner-text {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.connect-pt-banner-icon { font-size: 1.4rem; flex-shrink: 0; }
.connect-pt-banner-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-bright);
}
.connect-pt-banner-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.connect-pt-banner-action {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.connect-pt-input {
  width: 130px;
  padding: 0.45rem 0.75rem;
  font-size: 0.875rem;
}

.pt-linked-banner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 255, 179, 0.07);
  border: 1px solid rgba(0, 255, 179, 0.2);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  color: var(--success);
  margin-top: 1.25rem;
}

/* connect_pt.html card */
.connect-pt-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  margin-bottom: 0.5rem;
}
.connect-pt-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 0.2rem;
}
.connect-pt-email {
  font-size: 0.82rem;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .auth-card { padding: 1.5rem; }
  .role-selector { grid-template-columns: 1fr 1fr; }
  .pt-clients-grid { grid-template-columns: 1fr; }
  .pt-viewing-banner { flex-direction: column; align-items: flex-start; }
  .connect-pt-banner { flex-direction: column; align-items: flex-start; }
  .connect-pt-banner-action { width: 100%; }
  .connect-pt-input { flex: 1; width: auto; }
}

/* ── Assessment List ─────────────────────────────────────────────────────────── */
.assessment-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.assessment-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}
.assessment-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.assessment-date {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-bright);
}
.assessment-card-actions {
  display: flex;
  gap: 0.5rem;
}
.assessment-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}
.assessment-metric {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.assessment-metric-value {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
}
.assessment-metric-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.assessment-metric--notes .assessment-metric-value {
  color: var(--text);
  font-weight: 400;
  font-style: italic;
  font-size: 0.85rem;
}
.assessment-bilateral-tag {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--pull);
  opacity: 0.8;
}

/* ── Assessment Form ─────────────────────────────────────────────────────────── */
.assessment-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 860px;
}
.assessment-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.assessment-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-bright);
  margin: 0 0 0.35rem 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.assessment-section-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 1rem 0;
}
.section-badge {
  font-size: 0.68rem;
  font-weight: 600;
  background: rgba(0, 212, 255, 0.12);
  color: var(--accent);
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: 99px;
  padding: 0.1em 0.55em;
  letter-spacing: 0.03em;
}
.form-grid { display: grid; gap: 1rem; }
.form-grid--3 { grid-template-columns: repeat(3, 1fr); }
.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.form-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form-input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-bright);
  font-size: 0.95rem;
  font-family: inherit;
  padding: 0.6rem 0.75rem;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.form-input:focus {
  outline: none;
  border-color: var(--push);
}
.form-textarea { resize: vertical; min-height: 80px; }

/* Composition live preview */
.composition-preview {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.comp-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.comp-value {
  font-size: 1.1rem;
  font-weight: 700;
}
.comp-item--lean .comp-value { color: var(--pull); }
.comp-item--fat  .comp-value { color: var(--push); }
.comp-item span:last-child {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Bilateral table */
.bilateral-table {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.bilateral-header {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 0.6fr;
  gap: 0.5rem;
  padding: 0 0.25rem;
}
.bilateral-side {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
}
.bilateral-side--left  { color: var(--pull); }
.bilateral-side--right { color: var(--push); }
.bilateral-diff-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
}
.bilateral-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 0.6fr;
  align-items: center;
  gap: 0.5rem;
}
.bilateral-muscle {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}
.bilateral-input { text-align: center; }
.bilateral-diff {
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
}
.bilateral-diff--ok   { color: var(--success); }
.bilateral-diff--warn { color: var(--danger); }

.assessment-form-actions {
  display: flex;
  gap: 1rem;
  padding-bottom: 2rem;
}

/* ── KPI: Composição Corporal extras ────────────────────────────────────────── */
.kpi-chart-wrap--radar { height: 320px; }
.kpi-assessment-link {
  font-size: 0.8rem;
  color: var(--push);
  text-decoration: none;
  white-space: nowrap;
}
.kpi-assessment-link:hover { text-decoration: underline; }
.kpi-bilateral-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.kpi-no-assessment {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.kpi-no-assessment p { margin: 0 0 1.25rem; font-size: 0.9rem; }

/* Nav avatar menu item regular */
.nav-avatar-menu-item {
  display: block;
  padding: 0.5rem 0.85rem;
  font-size: 0.82rem;
  color: var(--text);
  text-decoration: none;
  border-radius: var(--radius-xs);
  transition: background 0.15s;
}
.nav-avatar-menu-item:hover { background: var(--surface-3); }
.nav-avatar-menu-item--danger { color: var(--danger); }

@media (max-width: 640px) {
  .form-grid--3 { grid-template-columns: 1fr 1fr; }
  .bilateral-header,
  .bilateral-row { grid-template-columns: 1.2fr 1fr 1fr 0.6fr; }
  .assessment-form-actions { flex-direction: column; }
  .kpi-chart-wrap--radar { height: 260px; }
}

/* ── Arctic Dashboard ─────────────────────────────────────────────────────── */

/* Streak pill (navbar) */
.dash-streak-pill {
  display: flex; align-items: center; gap: .3rem;
  font-size: .7rem; font-weight: 600; color: var(--gold);
  background: rgba(227,179,65,.08); border: 1px solid rgba(227,179,65,.2);
  padding: .3rem .65rem; border-radius: 99px;
}

/* Hero */
.stat-hero { margin-bottom: 1.5rem; }
.stat-greeting {
  font-size: .72rem; font-weight: 500; color: var(--text-muted);
  letter-spacing: .06em; text-transform: uppercase; margin-bottom: .3rem;
}
.stat-week { font-size: 1rem; font-weight: 600; color: var(--text-bright); margin-bottom: 1.25rem; }
.stat-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .5rem; }
.stat-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .9rem .8rem;
}
.stat-box-main {
  grid-column: span 3;
  background: linear-gradient(135deg, var(--accent-d), rgba(0,255,179,.05));
  border: 1px solid rgba(0,212,255,.2); border-radius: var(--radius);
  padding: 1.1rem 1.25rem; display: flex; justify-content: space-between; align-items: center;
}
.sbm-label {
  font-size: .65rem; font-weight: 600; color: var(--accent);
  text-transform: uppercase; letter-spacing: .1em; margin-bottom: .3rem;
}
.sbm-val {
  font-family: var(--font-mono); font-size: 2rem; font-weight: 700;
  color: var(--accent); line-height: 1;
}
.sbm-unit { font-size: 1rem; color: var(--text-muted); }
.sbm-delta { margin-top: .4rem; font-size: .68rem; font-weight: 600; }
.sbm-right { text-align: right; }
.sbm-right-lbl { font-size: .62rem; color: var(--text-muted); margin-bottom: .4rem; }
.sbm-right-val {
  font-family: var(--font-mono); font-size: 2rem; font-weight: 700;
  color: var(--text-bright); line-height: 1;
}
.sbm-right-total { font-size: 1rem; color: var(--text-muted); }
.sbm-right-sub { font-size: .62rem; color: var(--text-muted); margin-top: .2rem; }
.stat-label {
  font-size: .65rem; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .1em; margin-bottom: .3rem;
}
.stat-n {
  font-family: var(--font-mono); font-size: 1.2rem; font-weight: 700;
  color: var(--text-bright); line-height: 1;
}
.stat-n--empty { color: var(--text-muted); }
.stat-u {
  font-size: .62rem; color: var(--text-muted); margin-top: .15rem;
  text-transform: uppercase; letter-spacing: .08em;
}
.stat-delta { font-size: .68rem; font-weight: 600; margin-top: .35rem; }
.delta-pos { color: var(--accent-2); }
.delta-neg { color: var(--danger); }

/* Week strip */
.week-strip {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .85rem 1rem; margin-bottom: 1.5rem;
}
.ws-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .75rem; }
.ws-title { font-size: .65rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .1em; }
.ws-pct { font-size: .72rem; font-weight: 700; color: var(--accent); }
.ws-days { display: flex; gap: .35rem; align-items: center; margin-bottom: .75rem; }
.ws-day { flex: 1; text-align: center; }
.ws-lbl { font-size: .55rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; margin-bottom: .3rem; }
.ws-dot { height: 4px; border-radius: 99px; }
.ws-dot--done { background: var(--accent); }
.ws-dot--today { background: linear-gradient(90deg, var(--accent), var(--accent-2)); box-shadow: 0 0 8px var(--accent); }
.ws-dot--rest { background: rgba(205,217,229,.15); }
.ws-bar { height: 4px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.ws-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 99px; transition: width .6s ease; }

/* Section headers */
.sh { margin-bottom: .6rem; display: flex; justify-content: space-between; align-items: center; }
.sh-title { font-size: .65rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }
.sh-link { font-size: .7rem; color: var(--accent); font-weight: 600; text-decoration: none; }
.sh-link:hover { text-decoration: underline; }

/* Today CTA */
.today-cta {
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--accent-d), rgba(0,255,179,.07));
  border: 1px solid rgba(0,212,255,.25); border-radius: var(--radius);
  padding: 1.15rem 1.25rem; display: flex; align-items: center;
  gap: 1rem; cursor: pointer; text-decoration: none; transition: border-color .2s;
}
.today-cta:hover { border-color: rgba(0,212,255,.45); }
.cta-icon {
  width: 46px; height: 46px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center; font-size: 1.3rem; flex-shrink: 0;
}
.cta-body { flex: 1; min-width: 0; }
.cta-label { font-size: .62rem; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .1em; margin-bottom: .2rem; }
.cta-title { font-size: 1.1rem; font-weight: 700; color: var(--text-bright); margin-bottom: .1rem; font-family: var(--font-display); letter-spacing: .04em; }
.cta-sub { font-size: .68rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cta-arr { font-size: 1.3rem; color: var(--accent); opacity: .6; flex-shrink: 0; }

/* Group scroll */
.group-scroll {
  overflow-x: auto; display: flex; gap: .65rem;
  margin: 0 -1.5rem 1.5rem; padding: 0 1.5rem .25rem;
  scrollbar-width: none;
}
.group-scroll::-webkit-scrollbar { display: none; }
.dash-gc {
  flex-shrink: 0; width: 155px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.1rem; position: relative;
  overflow: hidden; cursor: pointer; text-decoration: none; display: block;
  transition: border-color .18s, transform .15s;
}
.dash-gc:hover { transform: translateY(-2px); }
.dash-gc::before { content: ''; position: absolute; top: 0; left: 0; bottom: 0; width: 3px; }
.dash-gc--push::before  { background: var(--accent); }
.dash-gc--pull::before  { background: var(--accent-2); }
.dash-gc--lower::before { background: var(--gold); }
.dash-gc--arms::before  { background: var(--danger); }
.dash-gc--push:hover  { border-color: var(--accent); }
.dash-gc--pull:hover  { border-color: var(--accent-2); }
.dash-gc--lower:hover { border-color: var(--gold); }
.dash-gc--arms:hover  { border-color: var(--danger); }
.gc-badge-urgent {
  position: absolute; top: .6rem; right: .6rem;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--danger); box-shadow: 0 0 6px var(--danger);
}
.gc-emoji { font-size: 1.4rem; margin-bottom: .6rem; display: block; }
.gc-name { font-family: var(--font-mono); font-size: .8rem; font-weight: 700; color: var(--text-bright); margin-bottom: .2rem; }
.gc-sub { font-size: .62rem; color: var(--text-muted); margin-bottom: .65rem; line-height: 1.4; }
.gc-status { font-size: .62rem; font-weight: 600; padding: .2rem .5rem; border-radius: 99px; display: inline-block; }
.gc-status--warn { background: rgba(248,81,73,.1); color: var(--danger); border: 1px solid rgba(248,81,73,.2); }
.gc-status--ok   { background: rgba(0,255,179,.08); color: var(--accent-2); border: 1px solid rgba(0,255,179,.2); }
.gc-status--never{ background: rgba(227,179,65,.08); color: var(--gold); border: 1px solid rgba(227,179,65,.2); }

/* KPI strip */
.kpi-strip { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: 1.5rem; }
.kpi-tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .85rem 1rem; }
.kpi-tile-label { font-size: .6rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); margin-bottom: .3rem; }
.kpi-tile-val { font-family: var(--font-mono); font-size: 1.35rem; font-weight: 700; color: var(--text-bright); }
.kpi-tile-unit { font-size: .65rem; color: var(--text-muted); font-weight: 400; }
.kpi-tile-delta { font-size: .65rem; font-weight: 600; margin-top: .15rem; }

/* Session feed */
.sess-list { display: flex; flex-direction: column; gap: .45rem; margin-bottom: 2rem; }
.sess-row {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: .75rem 1rem;
  display: flex; align-items: center; gap: .85rem;
}
.sess-line { width: 3px; align-self: stretch; border-radius: 99px; flex-shrink: 0; }
.sess-body { flex: 1; min-width: 0; }
.sess-grp { font-family: var(--font-mono); font-size: .72rem; font-weight: 700; margin-bottom: .1rem; }
.sess-dt { font-size: .63rem; color: var(--text-muted); }
.sess-meta { display: flex; flex-direction: column; align-items: flex-end; gap: .15rem; flex-shrink: 0; }
.sess-vol { font-family: var(--font-mono); font-size: .8rem; font-weight: 700; color: var(--text-bright); }
.sess-delta-pos { font-size: .62rem; color: var(--accent-2); }
.sess-delta-neg { font-size: .62rem; color: var(--danger); }
.rpe-dots { display: flex; gap: 2px; align-items: center; margin-top: .25rem; }
.rpe-dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.1); }
.rpe-dot--on { background: var(--accent); }
.rpe-dot--hi { background: var(--gold); }

/* Other plans (no active plan state) */
.other-plans-list { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 2rem; }
.other-plan-item {
  display: flex; align-items: center; gap: 1rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: .75rem 1rem;
  text-decoration: none; color: var(--text); transition: border-color var(--transition);
}
.other-plan-item:hover { border-color: var(--accent); }
.other-plan-name { flex: 1; font-weight: 500; color: var(--text-bright); }
.other-plan-date { font-family: var(--font-mono); font-size: .72rem; color: var(--text-muted); }
.other-plan-arrow { color: var(--text-muted); }

@media (max-width: 640px) {
  .group-scroll { margin-left: -1rem; margin-right: -1rem; padding-left: 1rem; padding-right: 1rem; }
  .stat-row { gap: .4rem; }
  .sbm-val { font-size: 1.6rem; }
  .sbm-right-val { font-size: 1.6rem; }
}

/* ── KPI Page — Arctic Ecrã 3 ───────────────────────────────────────────────── */

.kpi-page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.25rem;
}
.kpi-page-title {
  font-family: var(--font-mono); font-size: 1.5rem; font-weight: 700;
  color: var(--text-bright);
}
.kpi-page-sub { font-size: .75rem; color: var(--text-muted); margin-top: .2rem; }
.kpi-wtype-badge {
  display: inline-block; margin: 0 .25rem;
  padding: .1rem .45rem; border-radius: 99px;
  font-size: .6rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  background: rgba(0,212,255,.12); color: var(--accent); border: 1px solid rgba(0,212,255,.25);
}

.kpi-scrolltabs {
  display: flex; gap: .4rem; margin-bottom: 1.25rem;
  overflow-x: auto; scrollbar-width: none;
}
.kpi-scrolltabs::-webkit-scrollbar { display: none; }
.kpi-stab {
  flex-shrink: 0; padding: .38rem .85rem; border-radius: 99px;
  font-size: .68rem; font-weight: 600; border: 1px solid var(--border);
  color: var(--text-muted); background: var(--surface); cursor: pointer;
  white-space: nowrap; transition: all .15s;
}
.kpi-stab--active {
  background: var(--accent-d); border-color: rgba(0,212,255,.35);
  color: var(--accent);
}

/* Card header — replaces kpi-card-header */
.kc-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; margin-bottom: .9rem;
}
.kc-left { flex: 1; min-width: 0; }
.kc-title { font-size: .9rem; font-weight: 700; color: var(--text-bright); }
.kc-sub { font-size: .72rem; color: var(--text-muted); margin-top: .12rem; }
.kc-badge {
  flex-shrink: 0; font-size: .68rem; font-weight: 700; padding: .2rem .6rem;
  border-radius: 99px; background: var(--accent-d); color: var(--accent);
  border: 1px solid rgba(0,212,255,.25); white-space: nowrap;
}
.kc-badge--teal { background: rgba(0,255,179,.08); color: var(--accent-2); border-color: rgba(0,255,179,.25); }
.kc-badge--gold { background: rgba(227,179,65,.08); color: var(--gold); border-color: rgba(227,179,65,.25); }
.kc-badge--blue { background: rgba(88,166,255,.1); color: var(--pull); border-color: rgba(88,166,255,.25); }
.kc-badge--soon { background: rgba(205,217,229,.12); color: var(--text-muted); border-color: rgba(205,217,229,.2); }
.kpi-card--soon { opacity: 0.5; pointer-events: none; }

/* Meta row below charts */
.kpi-meta-row { display: flex; gap: .5rem; margin-top: 1rem; }
.kpi-meta {
  flex: 1; background: rgba(255,255,255,.03); border: 1px solid var(--border);
  border-radius: 10px; padding: .6rem; text-align: center;
}
.kpi-meta-val {
  font-family: var(--font-mono); font-size: .9rem; font-weight: 700;
  color: var(--text-bright); display: block;
}
.kpi-meta-label {
  font-size: .57rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-muted); margin-top: .1rem; display: block;
}

/* ── KPI summary tiles ───────────────────────────────────────────────────────── */
.kpi-tile-body {
  display: flex; align-items: center; justify-content: space-between;
  padding: .9rem 0 .5rem;
}
.kpi-tile-main { display: flex; align-items: baseline; gap: .35rem; }
.kpi-tile-val {
  font-size: 2.4rem; font-weight: 700; color: var(--text-bright);
  line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.kpi-tile-unit { font-size: .85rem; color: var(--text-muted); font-weight: 500; }
.kpi-tile-val--empty { color: var(--text-muted); }
.kpi-tile-subtitle {
  font-size: .75rem; color: var(--text-muted); font-style: italic;
  margin: -.1rem 0 .4rem; line-height: 1.4;
}

/* ── Assessment Page — Arctic Ecrã 4 ────────────────────────────────────────── */

.assess-hero {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 1.25rem; gap: 1rem;
}
.assess-hero-l { min-width: 0; }
.assess-tag {
  font-size: .6rem; font-weight: 700; letter-spacing: .15em;
  text-transform: uppercase; color: var(--accent); margin-bottom: .3rem;
}
.assess-title {
  font-family: var(--font-mono); font-size: 1.3rem; font-weight: 700;
  color: var(--text-bright);
}
.assess-add-btn {
  padding: .5rem 1.1rem; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0D1117; font-size: .7rem; font-weight: 700; border: none;
  text-decoration: none; display: inline-flex; align-items: center;
  flex-shrink: 0; white-space: nowrap; cursor: pointer;
}

.assess-cards { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1.5rem; }
.assess-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.1rem;
}
.assess-card--faded { opacity: .7; }

.ac-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: .7rem; gap: .5rem; flex-wrap: wrap;
}
.ac-date {
  font-family: var(--font-mono); font-size: .78rem; font-weight: 700;
  color: var(--text-bright); display: flex; align-items: center; gap: .4rem;
}
.ac-tag-current {
  font-size: .6rem; color: var(--accent);
  font-family: var(--font-body); font-weight: 600;
}
.ac-tag-initial { font-size: .6rem; color: var(--text-muted); font-family: var(--font-body); }
.ac-actions { display: flex; gap: .4rem; }
.ac-action {
  font-size: .63rem; font-weight: 600; padding: .22rem .65rem; border-radius: 7px;
  cursor: pointer; border: 1px solid var(--border); color: var(--text-muted);
  background: transparent; text-decoration: none; transition: border-color .15s, color .15s;
}
.ac-action:hover { border-color: var(--accent); color: var(--accent); }
.ac-action--danger { color: var(--danger); border-color: rgba(248,81,73,.2); }
.ac-action--danger:hover { background: rgba(248,81,73,.08); color: var(--danger); border-color: rgba(248,81,73,.35); }

.ac-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: .35rem; }
.ac-metric {
  background: rgba(255,255,255,.03); border: 1px solid var(--border);
  border-radius: 9px; padding: .5rem .35rem; text-align: center;
}
.ac-metric-val {
  font-family: var(--font-mono); font-size: .82rem; font-weight: 700;
  color: var(--text-bright); display: block; line-height: 1.1;
}
.ac-metric-unit { font-size: .55rem; color: var(--text-muted); }
.ac-metric-label {
  font-size: .52rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--text-muted); margin-top: .12rem; display: block;
}
.ac-metric--hl .ac-metric-val { color: var(--accent); }

.ac-bilateral {
  margin-top: .6rem; padding-top: .6rem; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
}
.ac-bilateral-label { font-size: .62rem; color: var(--text-muted); }
.ac-bilateral-tag {
  font-size: .6rem; font-weight: 600; padding: .15rem .5rem; border-radius: 99px;
  background: rgba(0,255,179,.08); color: var(--accent-2);
  border: 1px solid rgba(0,255,179,.2);
}

/* ── Assessment Form — Arctic ────────────────────────────────────────────────── */

.af-card {
  background: var(--surface); border: 1px solid rgba(0,212,255,.18);
  border-radius: var(--radius); padding: 1.25rem 1.15rem; margin-bottom: 1.1rem;
}
.af-section-title {
  font-size: .62rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; color: var(--accent); margin-bottom: .75rem;
}
.af-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: 1rem; }
.af-grid--3 { grid-template-columns: 1fr 1fr 1fr; }
.af-field { display: flex; flex-direction: column; gap: .28rem; }
.af-field label {
  font-size: .6rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .1em; color: var(--text-muted);
}
.af-input {
  background: rgba(255,255,255,.05); border: 1px solid var(--border);
  border-radius: 9px; color: var(--text-bright); font-size: .88rem; font-weight: 600;
  padding: .5rem .75rem; font-family: var(--font-mono); width: 100%;
  box-sizing: border-box; transition: border-color .15s;
}
.af-input:focus { border-color: rgba(0,212,255,.4); outline: none; box-shadow: 0 0 0 2px rgba(0,212,255,.08); }
.af-input[type="date"] { font-family: var(--font-body); }
.af-textarea { resize: vertical; min-height: 80px; font-family: var(--font-body); }
.af-preview {
  background: rgba(0,212,255,.06); border: 1px solid rgba(0,212,255,.2);
  border-radius: 10px; padding: .75rem 1rem; display: flex; gap: 2rem;
  margin-bottom: 1rem;
}
.afp-val {
  font-family: var(--font-mono); font-size: 1rem; font-weight: 700;
  color: var(--accent); display: block;
}
.afp-label {
  font-size: .58rem; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: .08em; display: block;
}
.af-save-btn {
  width: 100%; padding: .65rem; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0D1117; font-size: .78rem; font-weight: 700; border: none;
  cursor: pointer; margin-top: .5rem; transition: opacity .15s;
}
.af-save-btn:hover { opacity: .88; }
.af-save-btn:disabled { opacity: .45; cursor: not-allowed; }
.af-cancel-link {
  display: inline-flex; align-items: center; padding: .65rem 1rem;
  border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-muted); font-size: .78rem; font-weight: 600;
  text-decoration: none; transition: border-color .15s;
}
.af-cancel-link:hover { border-color: var(--accent); color: var(--accent); }
.af-actions { display: flex; gap: .6rem; align-items: center; padding-bottom: 2rem; }
.af-actions .af-save-btn { flex: 2; }
.af-actions .af-cancel-link { flex: 1; text-align: center; justify-content: center; }

@media (max-width: 640px) {
  .ac-metrics { grid-template-columns: repeat(2, 1fr); }
  .af-grid--3 { grid-template-columns: 1fr 1fr; }
}

/* ── Session Page — Arctic Ecrã 2 ────────────────────────────────────────────── */

/* REC pill */
.sess-rec-dot {
  display: flex; align-items: center; gap: .3rem;
  font-size: .7rem; font-weight: 700; letter-spacing: .04em;
  color: var(--danger); background: rgba(248,81,73,.1);
  border: 1px solid rgba(248,81,73,.2);
  padding: .3rem .65rem; border-radius: 99px;
}

/* Workout header card */
.sess-wh {
  margin-bottom: .85rem;
  background: linear-gradient(135deg, rgba(0,212,255,.08), rgba(0,255,179,.05));
  border: 1px solid rgba(0,212,255,.22); border-radius: var(--radius);
  padding: 1rem 1.15rem;
}
.sess-wh-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: .65rem;
}
.sess-wh-name {
  font-family: var(--font-mono); font-size: 1.3rem; font-weight: 700;
  color: var(--text-bright);
}
.sess-wh-actions { display: flex; align-items: center; gap: .5rem; }
.sess-wh-back {
  padding: .45rem .85rem; border-radius: 9px;
  background: transparent; border: 1px solid var(--border);
  color: var(--text-muted); font-size: .7rem; font-weight: 700;
  text-decoration: none; transition: border-color .15s, color .15s;
}
.sess-wh-back:hover { border-color: var(--accent); color: var(--accent); }
.sess-wh-end {
  padding: .45rem 1rem; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0D1117; font-size: .7rem; font-weight: 700; border: none;
  transition: opacity .15s, background .15s;
}
.sess-wh-end:disabled {
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-muted); opacity: .45; cursor: not-allowed;
}
.exit-modal-msg { color: var(--text-muted); font-size: .9rem; line-height: 1.6; }
.sess-wh-stats { display: flex; gap: 1.5rem; }
.sess-wh-stat label {
  font-size: .57rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-muted); display: block; margin-bottom: .1rem;
}
.sess-wh-stat span {
  font-family: var(--font-mono); font-size: .9rem; font-weight: 700;
  color: var(--text-bright);
}

/* Rest timer */
.rest-timer {
  margin-bottom: .75rem;
  background: rgba(0,212,255,.06); border: 1px solid rgba(0,212,255,.2);
  border-radius: var(--radius); padding: .85rem 1.15rem;
  display: flex; align-items: center; justify-content: space-between;
}
.rt-label {
  font-size: .6rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--accent);
}
.rt-next { font-size: .62rem; color: var(--text-muted); margin-top: .1rem; }
.rt-time {
  font-family: var(--font-mono); font-size: 1.6rem; font-weight: 700;
  color: var(--accent);
}
.rt-skip { font-size: .67rem; font-weight: 600; color: var(--text-muted); cursor: pointer; }
.rt-skip:hover { color: var(--accent); }

/* Last session context bar */
.last-sess-ctx {
  font-size: .63rem; color: var(--text-muted);
  margin-bottom: .75rem; padding: .35rem .75rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xs);
}

/* Exercise block */
.ex-block {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; margin-bottom: .7rem;
  transition: border-color .2s;
}
.ex-block--active { border-color: rgba(0,212,255,.3); }

.ex-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: .8rem 1rem; border-bottom: 1px solid var(--border);
}
.ex-head-l { display: flex; align-items: center; gap: .6rem; }
.ex-num {
  width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0;
  background: var(--accent-d); border: 1px solid rgba(0,212,255,.25);
  display: grid; place-items: center;
  font-size: .6rem; font-weight: 700; color: var(--accent);
  font-family: var(--font-mono);
}
.ex-title { font-size: .82rem; font-weight: 600; color: var(--text-bright); }
.ex-prog { font-size: .63rem; color: var(--text-muted); margin-top: .1rem; }
.ex-video-link {
  width: 26px; height: 26px; border-radius: 6px; flex-shrink: 0;
  background: rgba(255,0,0,.12); border: 1px solid rgba(255,0,0,.25);
  color: #ff4444; display: grid; place-items: center; font-size: .9rem;
  text-decoration: none; line-height: 1;
}

/* Sets table — session context overrides */
.ex-block .sets-table th {
  font-size: .57rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--text-muted); padding: .5rem 1rem;
  text-align: left; background: rgba(255,255,255,.02); border-bottom: none;
}
.ex-block .sets-table td {
  font-size: .78rem; padding: .55rem 1rem;
  border-top: 1px solid rgba(255,255,255,.04);
  border-bottom: none; font-family: var(--font-mono);
}
.ex-block .sets-table tr:last-child td { border-bottom: none; }
.ex-block .sets-table .set-row.set-done td { color: var(--text-muted); }
.ex-block .sets-table .set-row.set-done .set-num-td { color: var(--accent); }

/* Number inputs */
.weight-input, .reps-input {
  background: rgba(255,255,255,.07); border: 1px solid rgba(0,212,255,.3);
  border-radius: 7px; color: var(--text-bright);
  font-size: .8rem; font-weight: 700; font-family: var(--font-mono);
  width: 58px; padding: .35rem .5rem; text-align: center;
  -moz-appearance: textfield;
}
.weight-input:focus, .reps-input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0,212,255,.1);
}
.weight-input::-webkit-inner-spin-button,
.weight-input::-webkit-outer-spin-button,
.reps-input::-webkit-inner-spin-button,
.reps-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* Check button */
.set-check-btn {
  background: none; border: none; padding: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.set-check-icon {
  width: 22px; height: 22px; border-radius: 6px;
  display: grid; place-items: center; font-size: .7rem; font-weight: 700;
  color: var(--text-muted); border: 1px dashed rgba(255,255,255,.2);
  background: rgba(255,255,255,.03); transition: all .15s;
  font-family: var(--font-mono); line-height: 1;
}
.set-check-btn:hover .set-check-icon {
  border-color: rgba(0,212,255,.5); color: var(--accent);
}
.set-check-btn--done .set-check-icon {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: 1px solid transparent; color: #0D1117;
}

/* Action bar */
.sess-action-bar { display: flex; gap: .5rem; margin-bottom: 2rem; }
.sess-btn-secondary {
  flex: 1; padding: .65rem; border-radius: 9px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-muted); font-size: .72rem; font-weight: 700;
  transition: border-color .15s, color .15s;
}
.sess-btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.sess-btn-primary {
  flex: 2; padding: .65rem; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0D1117; font-size: .78rem; font-weight: 700; border: none;
  transition: opacity .15s;
}
.sess-btn-primary:hover { opacity: .88; }
.sess-btn-primary:disabled { opacity: .45; cursor: not-allowed; }

/* Finish modal summary */
.sess-finish-summary {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: .75rem 1rem;
}
.sess-finish-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: .35rem 0; font-size: .875rem;
  border-bottom: 1px solid var(--border-light);
}
.sess-finish-row:last-child { border-bottom: none; }

/* ── KPI Dashboard — Editor Drawer & Drag Handle ────────────────────────────── */

/* Personalizar button in page header */
.kpi-edit-btn {
  flex-shrink: 0;
  padding: .4rem .9rem; border-radius: var(--radius-sm);
  font-size: .72rem; font-weight: 700; letter-spacing: .04em;
  background: var(--surface); border: 1px solid rgba(0,212,255,.25);
  color: var(--accent); cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.kpi-edit-btn:hover { background: var(--accent-d); border-color: rgba(0,212,255,.5); }

/* Drag handle on KPI card (pro only) */
.kpi-drag-handle {
  position: absolute; top: .6rem; right: .6rem;
  font-size: 1.1rem; color: var(--text-muted); cursor: grab;
  opacity: 0; transition: opacity .15s;
  user-select: none; line-height: 1;
}
.kpi-card { position: relative; }
.kpi-card:hover .kpi-drag-handle { opacity: .55; }
.kpi-drag-handle:hover { opacity: 1 !important; color: var(--accent); }
.kpi-drag-handle:active { cursor: grabbing; }

/* SortableJS ghost */
.kpi-card--ghost {
  opacity: .35;
  border: 1px dashed rgba(0,212,255,.4) !important;
  background: rgba(0,212,255,.04) !important;
}

/* Overlay behind drawer */
.kpi-editor-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(2px);
}

/* Slide-out drawer from right */
.kpi-editor {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 1001;
  width: min(420px, 95vw);
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 32px rgba(0,0,0,.6);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
}
.kpi-editor--open { transform: translateX(0); }

/* Drawer header */
.kpi-editor-hdr {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: .75rem; padding: 1.1rem 1.25rem; flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}
.kpi-editor-hdr-title {
  font-family: var(--font-mono); font-size: .95rem; font-weight: 700;
  color: var(--text-bright);
}
.kpi-editor-hdr-sub {
  font-size: .7rem; color: var(--accent); margin-top: .15rem;
  font-weight: 600; letter-spacing: .04em;
}
.kpi-editor-close {
  background: none; border: none; color: var(--text-muted); font-size: 1.4rem;
  cursor: pointer; line-height: 1; padding: 0; flex-shrink: 0;
  transition: color .15s;
}
.kpi-editor-close:hover { color: var(--text-bright); }

/* Scrollable body */
.kpi-editor-body {
  flex: 1; overflow-y: auto; padding: .75rem 1.25rem;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.kpi-editor-body::-webkit-scrollbar { width: 5px; }
.kpi-editor-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 9px; }

/* Hint text */
.kpi-editor-hint {
  font-size: .75rem; color: var(--text-muted); margin-bottom: .85rem;
  padding: .55rem .75rem; border-radius: var(--radius-xs);
  background: rgba(255,255,255,.03); border: 1px solid var(--border);
  line-height: 1.5;
}
.kpi-editor-hint strong { color: var(--text-bright); }

/* Each KPI row */
.kpi-editor-item {
  border-bottom: 1px solid var(--border-light);
  padding: .6rem 0;
}
.kpi-editor-item:last-child { border-bottom: none; }
.kpi-editor-item--locked { opacity: .5; }

.kpi-editor-row {
  display: flex; align-items: center; gap: .75rem;
  cursor: pointer;
}
.kpi-editor-item--locked .kpi-editor-row { cursor: default; }

/* Checkbox */
.kpi-editor-cb {
  flex-shrink: 0; width: 16px; height: 16px; cursor: pointer;
  accent-color: var(--accent);
}
.kpi-editor-cb:disabled { cursor: default; }

/* Text info */
.kpi-editor-info { flex: 1; min-width: 0; }
.kpi-editor-name {
  display: block; font-size: .82rem; font-weight: 600; color: var(--text-bright);
}
.kpi-editor-desc {
  display: block; font-size: .68rem; color: var(--text-muted);
  margin-top: .12rem; line-height: 1.4;
}

/* Pills */
.kpi-editor-pill {
  flex-shrink: 0; font-size: .58rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; padding: .15rem .45rem; border-radius: 99px;
  white-space: nowrap;
}
.kpi-editor-pill--free {
  background: rgba(0,255,179,.1); color: var(--accent-2);
  border: 1px solid rgba(0,255,179,.25);
}
.kpi-editor-pill--pro {
  background: var(--accent-d); color: var(--accent);
  border: 1px solid rgba(0,212,255,.25);
}
.kpi-editor-pill--lock {
  background: rgba(255,255,255,.05); color: var(--text-muted);
  border: 1px solid var(--border);
}

/* Drawer footer */
.kpi-editor-footer {
  display: flex; gap: .6rem; justify-content: flex-end;
  padding: .85rem 1.25rem; flex-shrink: 0;
  border-top: 1px solid var(--border);
}
.kpi-editor-footer .btn-save {
  font-size: .78rem; padding: .5rem 1.25rem;
}

/* ── RGPD: Consent checkbox ──────────────────────────────────────────────── */
.form-group--consent { margin-bottom: 1.25rem; }

.consent-label {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  cursor: pointer;
  font-size: .84rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.consent-label input[type="checkbox"] {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: .2rem;
  accent-color: var(--accent);
  cursor: pointer;
}
.consent-label strong { color: var(--text); }

/* ── RGPD: Deletion banner ───────────────────────────────────────────────── */
.deletion-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: .6rem 1.25rem;
  background: rgba(248, 81, 73, .12);
  border-bottom: 1px solid rgba(248, 81, 73, .3);
  font-size: .82rem;
  color: var(--danger);
  flex-wrap: wrap;
  text-align: center;
}
.deletion-banner-cancel {
  background: none;
  border: 1px solid var(--danger);
  border-radius: var(--radius-xs);
  color: var(--danger);
  font-size: .78rem;
  font-family: inherit;
  padding: .25rem .7rem;
  cursor: pointer;
  transition: background var(--transition);
  white-space: nowrap;
}
.deletion-banner-cancel:hover { background: rgba(248, 81, 73, .15); }

/* ── Legal document page ─────────────────────────────────────────────────── */
.legal-doc {
  max-width: 760px;
  margin: 2.5rem auto;
  padding: 0 1.25rem 4rem;
}
.legal-doc-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--text-bright);
  margin-bottom: 2rem;
  letter-spacing: .04em;
}
.legal-doc-body {
  color: var(--text);
  line-height: 1.75;
  font-size: .92rem;
}
.legal-doc-body h1,
.legal-doc-body h2 { color: var(--text-bright); margin: 2rem 0 .75rem; }
.legal-doc-body h3 { color: var(--text-bright); margin: 1.5rem 0 .5rem; }
.legal-doc-body p  { margin: 0 0 1rem; }
.legal-doc-body ul,
.legal-doc-body ol { padding-left: 1.5rem; margin: 0 0 1rem; }
.legal-doc-body li { margin-bottom: .35rem; }
.legal-doc-body a  { color: var(--accent); }
.legal-doc-body a:hover { text-decoration: underline; }
.legal-doc-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}
.legal-doc-body strong { color: var(--text-bright); }

/* ── Nav avatar menu extras ──────────────────────────────────────────────── */
.nav-avatar-menu-divider {
  height: 1px;
  background: var(--border);
  margin: .35rem .85rem;
}
.nav-avatar-menu-btn {
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-size: .82rem;
  padding: .5rem .85rem;
  font-family: inherit;
  border-radius: var(--radius-xs);
  transition: background 0.15s;
  cursor: pointer;
}
.nav-avatar-menu-btn:hover { background: var(--surface-3); }

