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

:root {
  --page-bg: #f5f6fa;
  --sidebar-bg: #14162b;
  --sidebar-width: 260px;
  --surface: #ffffff;
  --surface2: #f5f6fb;
  --border: #e8e9f2;
  --accent: #6c5ce7;
  --accent-hover: #5b4fd6;
  --accent-glow: rgba(108, 92, 231, 0.14);
  --accent-rgb: 108, 92, 231;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --text-dim: #9ca3af;
  --success: #16a34a;
  --error: #dc2626;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-card: 0 1px 2px rgba(16, 24, 40, 0.04), 0 4px 16px rgba(16, 24, 40, 0.06);
}

html { scroll-behavior: smooth; }

body {
  background: var(--page-bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Header / sidebar ──
   Same markup as before (logo + header-right > nav + lang-toggle +
   userChipSlot) -- turned into a fixed left sidebar with pure CSS
   (flex-direction: column + fixed position), no HTML/JS changes needed.
   --text/--text-muted/--surface2/--border are redefined within this scope
   only, so every descendant that already read those tokens (nav links,
   the lang toggle, the user chip) automatically gets the light-on-dark
   palette the sidebar needs instead of the page's light-theme values. */
.site-header {
  --text: #ffffff;
  --text-muted: #9496b3;
  --surface2: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background:
    url("images/sidebar-wave.png") left bottom / 100% auto no-repeat,
    radial-gradient(500px 260px at 20% 105%, rgba(148, 130, 255, 0.22), transparent 70%),
    linear-gradient(165deg, #15112a 0%, #1a1440 40%, #241a52 75%, #2e1e66 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
}

.header-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 24px 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: #ffffff;
  padding: 0 8px;
  margin-bottom: 28px;
}

.logo-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-icon img { width: 30px; height: auto; display: block; }

.header-right { display: flex; flex-direction: column; flex: 1; gap: 16px; min-height: 0; }

.nav { display: flex; flex-direction: column; gap: 2px; }

.lang-toggle { display: flex; gap: 6px; margin-top: auto; padding: 0 8px; }

.lang-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
  letter-spacing: 0.3px;
}
.lang-btn:hover { color: var(--text); border-color: var(--text-muted); }
.lang-btn.active { color: #ffffff; border-color: transparent; background: linear-gradient(135deg, #9b8cff, #6c5ce7); }

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover { color: var(--text); background: var(--surface2); }
.nav-link.active {
  color: #ffffff;
  background: linear-gradient(120deg, #8b7cff, #6c5ce7);
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(108, 92, 231, 0.35);
}
.nav-icon { display: inline-flex; flex-shrink: 0; }
.nav-icon svg { display: block; }

/* ── Main ── */
.main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 32px 80px;
  margin-left: var(--sidebar-width);
}

/* Fixed sidebars don't work on phone-width screens -- collapse back to a
   plain top bar there instead of eating half the viewport. */
@media (max-width: 860px) {
  .site-header {
    position: static;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .header-inner { flex-direction: row; align-items: center; padding: 12px 16px; }
  .logo { margin-bottom: 0; }
  .header-right { flex-direction: row; align-items: center; gap: 12px; }
  .nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .nav-link { padding: 6px 12px; }
  .lang-toggle { margin-top: 0; padding: 0; }
  .main { margin-left: 0; }
}

/* ── Page title ── */
.page-title-block { margin-bottom: 32px; }
.page-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}
.page-subtitle { color: var(--text-muted); font-size: 15px; }

/* ── Card ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 28px 32px;
  margin-bottom: 24px;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
}

.card-desc {
  color: var(--text-muted);
  font-size: 13.5px;
  margin-bottom: 24px;
}

/* ── Fields ── */
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 560px) {
  .fields { grid-template-columns: 1fr; }
}

.field-group { display: flex; flex-direction: column; gap: 8px; }

.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-field {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15px;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  -moz-appearance: textfield;
}
.input-field::-webkit-inner-spin-button,
.input-field::-webkit-outer-spin-button { -webkit-appearance: none; }
.input-field::placeholder { color: var(--text-dim); }
.input-field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.age-row { display: flex; gap: 10px; align-items: center; }
.age-input { flex: 1; }

.toggle-group { display: flex; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; }
.toggle-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  padding: 9px 14px;
  transition: background 0.15s, color 0.15s;
}
.toggle-btn.active { background: var(--accent); color: #fff; }
.toggle-btn:not(.active):hover { background: var(--border); color: var(--text); }

/* ── Switch row (account settings) ── */
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.switch-row-text { flex: 1; }
.switch-row-label { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.switch-row-hint { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: background 0.2s, border-color 0.2s;
}
.switch-slider::before {
  content: "";
  position: absolute;
  height: 18px; width: 18px;
  left: 3px; top: 3px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}
.switch input:checked + .switch-slider { background: var(--accent-glow); border-color: var(--accent); }
.switch input:checked + .switch-slider::before { transform: translateX(20px); background: var(--accent); }
.switch input:disabled + .switch-slider { opacity: 0.6; cursor: default; }

.height-row { display: flex; gap: 10px; align-items: center; }
.height-input { flex: 1; }
.unit-badge {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  flex-shrink: 0;
}

/* ── Categories ── */
.categories { display: flex; flex-direction: column; gap: 16px; }

.category-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.2s;
}
.category-card.uploaded { border-color: var(--success); }
.category-card.uploading { border-color: var(--accent); }

.category-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
}

.category-icon { font-size: 24px; flex-shrink: 0; }

.category-info { flex: 1; min-width: 0; }

.category-name { font-size: 15px; font-weight: 600; }
.category-status { font-size: 13px; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.category-status.done { color: var(--success); }
.category-status.error { color: var(--error); }

.category-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

.upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #fff;
  border-radius: 20px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  white-space: nowrap;
}
.upload-btn:hover { background: var(--accent-hover); }
.upload-btn:active { transform: scale(0.97); }
.upload-btn-icon { font-style: normal; }
.file-input { display: none; }

.remove-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.remove-btn:hover { background: var(--error); border-color: var(--error); color: #fff; }

/* ── Progress ── */
.upload-progress {
  padding: 0 20px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.progress-bar {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s ease;
}
.progress-label { font-size: 12px; color: var(--text-muted); white-space: nowrap; min-width: 70px; text-align: right; }

/* ── Video preview ── */
.video-preview {
  padding: 0 20px 16px;
}
.video-preview video {
  width: 100%;
  max-height: 200px;
  border-radius: var(--radius-sm);
  background: #000;
  display: block;
}
.preview-pending {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-2, rgba(255,255,255,0.04));
  color: var(--text-muted);
  font-size: 13px;
}

/* ── Submit ── */
.submit-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px 0 0;
}

.submit-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.2px;
  padding: 18px 60px;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 24px rgba(var(--accent-rgb), 0.25);
}
.submit-btn:hover { background: var(--accent-hover); box-shadow: 0 6px 32px rgba(var(--accent-rgb), 0.4); transform: translateY(-1px); }
.submit-btn:active { transform: scale(0.98) translateY(0); }
.submit-btn:disabled { background: var(--surface2); color: var(--text-dim); box-shadow: none; cursor: not-allowed; transform: none; }

.submit-hint { color: var(--text-dim); font-size: 13px; }

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 999;
  pointer-events: none;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { border-color: var(--success); color: var(--success); }
.toast.error { border-color: var(--error); color: var(--error); }

/* ── Waiting panel ── */
.waiting-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-top: 24px;
}

.waiting-inner {
  display: flex;
  align-items: center;
  gap: 20px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

.waiting-text { flex: 1; }
.waiting-title { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.waiting-sub { font-size: 13px; color: var(--text-muted); }
.waiting-progress { font-size: 13px; color: var(--accent); font-weight: 600; margin-top: 6px; }

.cancel-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 20px;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.cancel-btn:hover { border-color: var(--error); color: var(--error); background: rgba(220,38,38,0.07); }

/* ── Results ── */
.results-card { margin-top: 24px; }
.history-empty { text-align: center; color: var(--text-muted); }
.history-session + .history-session { margin-top: 24px; }

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.results-badge {
  background: var(--success);
  color: #fff;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  letter-spacing: 0.3px;
}

.results-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Result athlete header ── */
.result-athlete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  flex-wrap: wrap;
}
.result-athlete-info { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.athlete-name { font-size: 16px; font-weight: 700; color: var(--text); }
.athlete-chip { font-size: 12px; color: var(--text-muted); background: var(--surface); padding: 3px 10px; border-radius: 20px; }

/* ── Result panel (per category) ── */
.result-panel {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.result-panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.rp-icon { font-size: 18px; line-height: 1; }
.rp-name { font-size: 14px; font-weight: 600; flex: 1; }
.rp-time { font-size: 12px; color: var(--text-muted); }
.rp-error { padding: 10px 16px; color: var(--error); font-size: 13px; }

/* badges */
.rp-badge { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 10px; text-transform: uppercase; letter-spacing: 0.04em; }
.badge-success { background: rgba(22,163,74,.1);  color: #15803d; border: 1px solid rgba(22,163,74,.25); }
.badge-error   { background: rgba(220,38,38,.1);   color: #b91c1c; border: 1px solid rgba(220,38,38,.25); }
.badge-warn    { background: rgba(217,119,6,.1);   color: #b45309; border: 1px solid rgba(217,119,6,.25); }
.badge-muted   { background: var(--surface); color: var(--text-muted); border: 1px solid var(--border); }

/* panel body: media + metrics side by side */
.rp-body {
  display: flex;
  gap: 16px;
  padding: 16px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.rp-media {
  flex: 0 0 auto;
  width: min(340px, 100%);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000;
}
.rp-media video,
.rp-media img {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
}
.rp-download {
  display: block;
  text-align: center;
  padding: 8px;
  font-size: 12px;
  color: var(--accent);
  background: var(--surface2);
  text-decoration: none;
  border-top: 1px solid var(--border);
}
.rp-download:hover { background: var(--border); }
.rp-metrics-col { flex: 1; min-width: 200px; }

/* ── Metric cards grid ── */
.result-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 4px;
}
.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  text-align: center;
}
.metric-card.metric-hi {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), .06);
}
.metric-value { font-size: 20px; font-weight: 700; color: var(--text); line-height: 1.2; }
.metric-card.metric-hi .metric-value { color: var(--accent); }
.metric-unit { font-size: 11px; font-weight: 400; color: var(--text-muted); }
.metric-label { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

.result-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 14px 0 6px;
}

/* ── Sport suitability bars ── */
.sport-bars { display: flex; flex-direction: column; gap: 7px; }
.sport-bar-row { display: flex; align-items: center; gap: 8px; }
.sport-bar-label { width: 100px; font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sport-bar-track { flex: 1; height: 7px; background: var(--surface); border-radius: 4px; overflow: hidden; }
.sport-bar-fill  { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), #4834d4); transition: width .8s ease; }
.sport-bar-score { width: 38px; font-size: 12px; color: var(--text); text-align: right; }

/* ── JSON viewer button & drawer ── */
.json-btn {
  margin-left: auto;
  background: var(--surface2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 11px;
  font-family: monospace;
  padding: 3px 8px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.json-btn:hover, .json-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.json-drawer {
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  overflow: auto;
  max-height: 420px;
}
.json-drawer.hidden { display: none; }
.json-pre {
  font-family: 'Consolas', 'Fira Mono', monospace;
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: pre;
  line-height: 1.55;
}

/* ── Data quality warning ── */
.dq-warning {
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.5;
}
.dq-unreliable { background: rgba(220,38,38,0.08); border: 1px solid rgba(220,38,38,0.3); color: #b91c1c; }
.dq-questionable { background: rgba(217,119,6,0.08); border: 1px solid rgba(217,119,6,0.3); color: #b45309; }
.dq-title { font-weight: 600; margin-bottom: 4px; }
.dq-issues { margin: 4px 0 0 16px; font-size: 12px; opacity: 0.9; }
.dq-issues li { margin-bottom: 3px; }

/* ── AI Summary ── */
.ai-card { margin-top: 24px; border-color: rgba(var(--accent-rgb), 0.3); }

.ai-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.ai-icon {
  font-size: 18px;
  color: var(--accent);
  flex-shrink: 0;
}

.ai-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: auto;
  flex-shrink: 0;
}

.ai-download-btn {
  flex-shrink: 0;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.ai-download-btn:hover {
  background: var(--accent);
  color: #000;
}

.ai-icon-btn {
  margin-left: auto;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.ai-icon-btn:hover:not(:disabled) { background: var(--accent-glow); color: var(--accent); border-color: var(--accent); }
.ai-icon-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.ai-body {
  color: var(--text);
  font-size: 15px;
  line-height: 1.75;
  white-space: pre-wrap;
  min-height: 20px;
}

.ai-report-meta {
  font-size: 11.5px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  margin-top: -10px;
  margin-bottom: 16px;
}

.ai-body strong, .ai-body b { color: var(--accent); font-weight: 700; }

/* ── Utility ── */
.hidden { display: none !important; }

/* ── Camera button variants ── */
.camera-open-btn {
  background: #1a2a1a;
  border: 1px solid #2a4a2a;
  color: #00ffc4;
}
.camera-open-btn:hover { background: #1e3a1e; border-color: #00ffc4; }
.upload-btn-secondary {
  background: var(--surface2);
  font-size: 13px;
  padding: 0 12px;
  color: var(--text-muted);
}
.upload-btn-secondary:hover { background: var(--border); color: var(--text); }
.upload-btn-browse {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
}
.upload-btn-browse:hover { background: var(--border); border-color: var(--accent); color: var(--accent); }
.upload-btn-sm { padding: 6px 12px; font-size: 12px; gap: 4px; }

/* ── Body photo slots ── */
.body-photo-slots { display: flex; flex-direction: column; gap: 0; margin: 8px 0 12px; }
.body-slot { border-top: 1px solid var(--border); padding: 10px 0 6px; }
.body-slot-row { display: flex; align-items: center; gap: 10px; }
.body-slot-label { font-size: 13px; font-weight: 600; color: var(--text-muted); width: 52px; flex-shrink: 0; }
.body-slot-row .category-status { flex: 1; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.body-slot-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.body-slot .video-preview img { max-height: 160px; width: 100%; object-fit: contain; border-radius: var(--radius-sm); margin-top: 6px; }

/* ── Camera modal ── */
.camera-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.camera-container {
  width: 100%;
  height: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
}
.camera-wrapper {
  position: relative;
  flex: 1;
  overflow: hidden;
  background: #000;
}
#cameraFeed {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Pose guide overlay ── */
.pose-guide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}
.pose-svg {
  width: 55%;
  height: 88%;
  opacity: 0.82;
  animation: pulse-guide 2.4s ease-in-out infinite;
}
@keyframes pulse-guide {
  0%, 100% { opacity: 0.75; filter: drop-shadow(0 0 6px #00ffc4); }
  50%       { opacity: 0.95; filter: drop-shadow(0 0 18px #00ffc4) drop-shadow(0 0 6px #00ffc4); }
}
.guide-instructions {
  width: 100%;
  padding: 10px 0 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
}
.guide-line {
  font-size: 13px;
  font-weight: 600;
  color: #00ffc4;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.8);
}

/* ── Camera controls bar ── */
.camera-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px 24px;
  background: #0a0a0a;
  gap: 16px;
}
.cam-btn {
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: transform 0.12s, background 0.15s;
}
.cam-btn:active { transform: scale(0.93); }
.cam-cancel {
  background: var(--surface2);
  color: var(--text-muted);
  padding: 10px 20px;
  flex: 1;
}
.cam-cancel:hover { background: var(--border); color: var(--text); }
.cam-flip {
  background: var(--surface2);
  color: var(--text-muted);
  padding: 10px 16px;
  font-size: 18px;
  flex: 1;
}
.cam-flip:hover { background: var(--border); color: var(--text); }

/* ── Shutter button ── */
.cam-capture {
  background: #00ffc4;
  color: #000;
  padding: 14px 28px;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 2;
  justify-content: center;
  box-shadow: 0 0 20px rgba(0,255,196,0.35);
}
.cam-capture:hover { background: #00e8b0; box-shadow: 0 0 30px rgba(0,255,196,0.5); }
.cam-shutter {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #000;
  border: 2px solid #000;
  box-shadow: 0 0 0 3px #00ffc4;
  flex-shrink: 0;
}

/* ── Auth: header user chip ──
   On the sidebar (its only real placement -- see #userChipSlot), rendered
   as a compact "plan" card: label, credits row, logout pill. Elsewhere
   (there is currently no other placement) the plain-row rules below still
   apply as a fallback. */
.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 6px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-muted);
}
.user-chip-email { color: var(--text); font-weight: 500; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip-credits {
  color: var(--accent, var(--text-muted));
  font-weight: 500;
  white-space: nowrap;
  border-left: 1px solid var(--border);
  padding-left: 10px;
}
.user-chip-logout {
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 3px 10px;
  font-size: 12px;
  transition: color .15s, border-color .15s;
}
.user-chip-logout:hover { color: var(--text); border-color: var(--text-muted); }

.user-plan-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.09);
}
.user-plan-label { font-size: 13px; font-weight: 700; color: #ffffff; }
.user-plan-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.user-plan-credits { display: flex; align-items: center; gap: 6px; color: #cabfff; font-weight: 600; font-size: 13px; white-space: nowrap; }
.user-plan-logout {
  color: #ffffff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.user-plan-logout:hover { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.24); }

/* ── Auth: login/register page ── */
.auth-main {
  max-width: 420px;
  margin: 0 auto;
  padding: 64px 24px 80px;
}
.auth-logo { text-align: center; font-size: 22px; font-weight: 700; letter-spacing: -0.3px; margin-bottom: 6px; }
.auth-tagline { text-align: center; color: var(--text-muted); font-size: 14px; margin-bottom: 32px; }

.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; }

.auth-providers { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.auth-provider-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s, opacity .15s;
  text-decoration: none;
}
.auth-provider-btn svg { flex-shrink: 0; }
.auth-provider-btn:hover:not(:disabled) { background: var(--border); }
.auth-provider-btn:disabled,
.auth-provider-btn.disabled {
  opacity: .45;
  cursor: not-allowed;
}
.auth-provider-google { background: #fff; color: #1f1f1f; border-color: #fff; }
.auth-provider-google:hover:not(:disabled) { background: #f2f2f2; }
.auth-provider-yahoo { background: #5f01d1; color: #fff; border-color: #5f01d1; }
.auth-provider-yahoo:hover:not(:disabled) { background: #6f1de0; }

.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--text-dim); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 22px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.auth-tabs { display: flex; gap: 4px; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 3px; margin-bottom: 22px; }
.auth-tab {
  flex: 1;
  text-align: center;
  padding: 8px;
  border-radius: 6px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.auth-tab.active { background: var(--accent); color: #fff; }

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form.hidden { display: none; }

.auth-error {
  display: none;
  background: rgba(255, 92, 92, 0.12);
  border: 1px solid var(--error);
  color: var(--error);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
}
.auth-error.show { display: block; }

.auth-dev { margin-top: 24px; }
.auth-dev summary {
  cursor: pointer;
  color: var(--text-dim);
  font-size: 12.5px;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.auth-dev summary::-webkit-details-marker { display: none; }
.auth-dev summary::before { content: '▸'; transition: transform .15s; }
.auth-dev[open] summary::before { transform: rotate(90deg); }
.auth-dev summary:hover { color: var(--text-muted); }
.auth-dev-body { display: flex; gap: 8px; margin-top: 12px; }
.auth-dev-body .input-field { flex: 1; }
.auth-dev-hint { color: var(--text-dim); font-size: 12px; margin-top: 8px; }

/* ── Admin panel ── */
.admin-layout { display: flex; gap: 24px; align-items: flex-start; }
@media (max-width: 720px) { .admin-layout { flex-direction: column; } }

.admin-users-col { width: 320px; flex-shrink: 0; }
@media (max-width: 720px) { .admin-users-col { width: 100%; } }

.admin-users-list { display: flex; flex-direction: column; gap: 8px; max-height: 70vh; overflow-y: auto; }
.admin-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  cursor: pointer;
  text-align: left;
  width: 100%;
  color: var(--text);
  font: inherit;
}
.admin-user-row:hover { border-color: var(--text-muted); }
.admin-user-row.active { border-color: var(--accent); background: var(--accent-glow); }
.admin-user-email { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-user-meta { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.admin-user-count {
  font-size: 11.5px;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 8px;
  font-variant-numeric: tabular-nums;
}
.admin-user-provider {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-dim);
}
.admin-user-credits {
  font-size: 11.5px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.admin-detail-col { flex: 1; min-width: 0; }
.admin-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.admin-detail-email { font-size: 18px; font-weight: 600; }

.admin-delete-btn {
  background: transparent;
  border: 1px solid var(--error);
  color: var(--error);
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.admin-delete-btn:hover:not(:disabled) { background: var(--error); color: #fff; }
.admin-delete-btn:disabled { opacity: .5; cursor: not-allowed; }

.admin-empty-state { color: var(--text-muted); text-align: center; padding: 48px 0; }

.admin-ai-template { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }
.admin-ai-template-title { font-size: 15px; margin-bottom: 4px; }
.admin-ai-template-tokens { font-family: 'Consolas', 'Fira Mono', monospace; font-size: 12px; }
.admin-ai-template-textarea {
  width: 100%;
  min-height: 340px;
  margin-top: 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: 'Consolas', 'Fira Mono', monospace;
  font-size: 12.5px;
  color: var(--text);
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.admin-ai-template-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.admin-ai-template-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 10px; }
.admin-ai-template-status { font-size: 12.5px; color: var(--text-muted); margin-right: auto; }
.admin-ai-template-status.success { color: var(--success); }
.admin-ai-template-status.error { color: var(--error); }
.admin-ai-template-reset {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.admin-ai-template-reset:hover:not(:disabled) { color: var(--text); border-color: var(--text-muted); }
.admin-ai-template-save {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.admin-ai-template-save:hover:not(:disabled) { background: var(--accent-hover); }
.admin-ai-template-reset:disabled, .admin-ai-template-save:disabled { opacity: 0.6; cursor: not-allowed; }

.version-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.version-card {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
}
.version-name {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.version-number {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.version-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.version-unavailable { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ── My Children page ── */

.select-field {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15px;
  padding: 10px 14px;
  outline: none;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.select-field:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

.eula-box {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  max-height: 220px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.eula-box p { margin-bottom: 10px; }
.eula-box strong { color: var(--text); }

.checkbox-row { display: flex; align-items: flex-start; gap: 10px; }
.checkbox-row input[type="checkbox"] { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; accent-color: var(--accent); }
.checkbox-row label { font-size: 14px; color: var(--text); cursor: pointer; }

.status-banner {
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 500;
}
.status-banner.success { background: rgba(22,163,74,0.1); border: 1px solid var(--success); color: var(--success); }
.status-banner.error   { background: rgba(220,38,38,0.12); border: 1px solid var(--error); color: var(--error); }
.status-banner.info    { background: var(--accent-glow); border: 1px solid var(--accent); color: var(--accent); }

.test-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 12px;
}
.test-card-info { flex: 1; }
.test-card-type { font-size: 15px; font-weight: 600; color: var(--text); }
.test-card-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.badge.processing { background: var(--accent-glow); color: var(--accent); }
.badge.processing .badge-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: badge-pulse 1.2s infinite; }
@keyframes badge-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.badge.success { background: rgba(22,163,74,0.1); color: var(--success); }
.badge.partial { background: rgba(217,119,6,0.1); color: #b45309; }
.badge.error, .badge.empty, .badge.skipped { background: rgba(220,38,38,0.12); color: var(--error); }

.test-card-toggle, .test-card-delete {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
}
.test-card-toggle:hover { color: var(--text); border-color: var(--text-muted); }
.test-card-delete:hover { color: var(--error); border-color: var(--error); }

.session-delete-btn {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 999px;
  border: 1px solid var(--error);
  background: rgba(220,38,38,.08);
  color: var(--error);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  padding: 0;
  cursor: pointer;
}
.session-delete-btn:hover { background: var(--error); color: #fff; }

.test-card-json {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-top: 12px;
  font-size: 12px;
  max-height: 300px;
  overflow: auto;
  white-space: pre-wrap;
  color: var(--text-muted);
}

/* ── Dashboard page ── */
.dash-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.dash-summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 18px 20px;
}
.dash-summary-label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 6px; }
.dash-summary-value { font-size: 26px; font-weight: 700; color: var(--text); }
.dash-summary-unit { font-size: 13px; font-weight: 500; color: var(--text-muted); margin-left: 4px; }
.dash-summary-meta { font-size: 12px; color: var(--text-dim); margin-top: 6px; }
.dash-summary-delta { font-size: 13px; font-weight: 600; margin-top: 8px; }
.dash-delta-up { color: var(--success); }
.dash-delta-down { color: var(--error); }
.dash-delta-flat { color: var(--text-muted); }

.dash-chart-svg { width: 100%; height: auto; display: block; }
.dash-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; }
.dash-legend-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); }
.dash-legend-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

.dash-summary-icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--accent-glow);
  font-size: 18px;
  margin-bottom: 12px;
}

/* ── Acasă: top bar (search + bell + avatar) ── */
.home-topbar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 20px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.home-search {
  flex: 1;
  max-width: 420px;
  position: relative;
  display: flex;
  align-items: center;
}
.home-search-icon { position: absolute; left: 16px; font-size: 14px; opacity: 0.5; pointer-events: none; }
.home-search-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 11px 16px 11px 40px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.home-search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.home-search-input::placeholder { color: var(--text-dim); }

.home-child-select {
  border-radius: 999px;
  padding: 11px 16px;
  width: 100%;
}

/* ── Scanner combo (experimental child-selector UI, design: combo-scanner-style.html, recolored to the site's light theme) ── */
.scan-native-select { display: none; }

.scan-combo { position: relative; width: 100%; font-family: inherit; }

.scan-trigger {
  position: relative;
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  overflow: hidden;
  font: inherit;
  text-align: left;
  box-shadow: var(--shadow-card);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.scan-trigger:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); transform: translateY(-1px); }

.scan-trigger::after {
  content: "";
  position: absolute; top: 0; bottom: 0; left: 10%; width: 2px;
  background: #43f6c0;
  box-shadow: 0 0 6px #43f6c0, 0 0 16px #43f6c0, 0 0 32px #43f6c0;
  animation: scan-sweep 2.6s infinite alternate ease-in-out;
  pointer-events: none;
}
@keyframes scan-sweep { from { left: 10%; } to { left: 90%; } }

.scan-trigger::before {
  content: "";
  position: absolute; top: 0; bottom: 0; left: 0; width: 80px;
  background: linear-gradient(90deg, transparent, #43f6c022, transparent);
  filter: blur(8px);
  animation: scan-glow 2.6s infinite alternate ease-in-out;
  pointer-events: none;
}
@keyframes scan-glow { from { transform: translateX(-20px); } to { transform: translateX(300px); } }

.scan-trigger-content { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; min-width: 0; }

.scan-avatar {
  width: 34px; height: 34px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 9px;
  background: var(--accent-glow);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  color: var(--accent);
  font-size: 10.5px; font-weight: 800;
}
.scan-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.scan-name { font-size: 13.5px; font-weight: 700; letter-spacing: -0.2px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scan-meta { color: var(--text-muted); font-size: 10.5px; }

.scan-arrow { position: relative; z-index: 2; color: var(--text-dim); font-size: 16px; flex-shrink: 0; transition: transform 0.25s ease, color 0.25s ease; }
.scan-combo.open .scan-arrow { transform: rotate(180deg); color: var(--accent); }

.scan-menu {
  position: absolute; z-index: 100;
  top: calc(100% + 8px); left: 0; right: 0;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(16, 24, 40, 0.16), 0 0 0 1px var(--border);
  opacity: 0;
  visibility: hidden;
  max-height: 340px;
  overflow-y: auto;
  transform: translateY(-7px) scale(0.985);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}
.scan-combo.open .scan-menu { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

.scan-menu-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 8px 9px;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 8.5px; letter-spacing: 1px; text-transform: uppercase;
}
.scan-menu-header span:last-child { color: var(--accent); }

.scan-options { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }

.scan-option {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.scan-option:hover { background: var(--surface2); }
.scan-option.selected { background: var(--accent-glow); border: 1px solid rgba(var(--accent-rgb), 0.25); box-shadow: inset 3px 0 var(--accent); }

.scan-option-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.scan-option .scan-avatar { width: 30px; height: 30px; font-size: 9.5px; }
.scan-option-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.scan-option-name { font-size: 12.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scan-option-meta { color: var(--text-muted); font-size: 9.5px; }

.scan-check { margin-left: 8px; color: var(--accent); opacity: 0; flex-shrink: 0; transition: opacity 0.2s; }
.scan-option.selected .scan-check { opacity: 1; }

.home-topbar-right { display: flex; align-items: center; gap: 16px; margin-left: auto; }

.home-bell {
  position: relative;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s, background 0.2s;
}
.home-bell:hover { border-color: var(--text-muted); background: var(--surface2); }
.home-bell-badge {
  position: absolute;
  top: -2px; right: -2px;
  min-width: 18px; height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--error);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.home-avatar-chip { display: flex; align-items: center; gap: 10px; }
.home-avatar-circle {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.home-avatar-name { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; }
.home-avatar-email { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }

/* ── Acasă: welcome row + banner ── */
.home-welcome-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.home-banner {
  flex: 1;
  min-width: 260px;
  max-width: 460px;
  background: linear-gradient(120deg, var(--accent), #4834d4);
  border-radius: var(--radius);
  padding: 22px 26px;
  color: #fff;
  box-shadow: 0 8px 28px var(--accent-glow);
}
.home-banner-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.home-banner-sub { font-size: 13px; opacity: 0.85; }

/* ── Acasă: two-column layout ── */
.home-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 960px) {
  .home-grid { grid-template-columns: 1fr; }
}
.home-col-main, .home-col-side { min-width: 0; }

.home-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.home-see-all { font-size: 13px; color: var(--accent); text-decoration: none; font-weight: 600; white-space: nowrap; }
.home-see-all:hover { text-decoration: underline; }

/* ── Acasă: session history rows ── */
.home-session-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}
.home-session-row:hover { background: var(--surface2); }
.home-session-row + .home-session-row { border-top: 1px solid var(--border); }

.home-session-thumb {
  position: relative;
  width: 88px; height: 62px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000;
  display: flex; align-items: center; justify-content: center;
}
.home-session-thumb img, .home-session-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-session-thumb-fallback { font-size: 22px; }
.home-session-play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.25);
  color: #fff;
  font-size: 14px;
  pointer-events: none;
}

.home-session-info { flex: 1; min-width: 0; }
.home-session-date { font-size: 12px; color: var(--text-dim); margin-bottom: 2px; }
.home-session-name { font-size: 14.5px; font-weight: 600; color: var(--text); }
.home-session-cat { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.home-session-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.home-session-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-glow);
  border-radius: 20px;
  padding: 2px 9px;
}

.home-session-vitals {
  display: flex;
  gap: 18px;
  flex-shrink: 0;
  text-align: right;
  font-size: 13px;
  color: var(--text-muted);
}
.home-session-vitals strong { color: var(--text); font-size: 15px; }
.home-session-vitals-label { font-size: 11px; color: var(--text-dim); }

/* ── Acasă: performance score donut ── */
.home-score-card { text-align: center; }
.home-donut-wrap { position: relative; display: inline-block; margin: 4px 0 8px; }
.home-donut-center {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.home-donut-value { font-size: 30px; font-weight: 800; color: var(--text); }
.home-donut-max { font-size: 14px; font-weight: 600; color: var(--text-muted); }
.home-donut-sub-title { font-size: 14.5px; font-weight: 700; color: var(--text); margin-top: 4px; }
.home-donut-sub { font-size: 12.5px; color: var(--text-muted); margin-bottom: 16px; }
.home-donut-breakdown { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.home-donut-breakdown-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); }
.home-donut-breakdown-row strong { margin-left: auto; color: var(--text); }

.home-score-empty { padding: 12px 4px 4px; }
.home-score-empty-icon { font-size: 28px; opacity: 0.5; margin-bottom: 10px; }
.home-score-empty-title { font-size: 14.5px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.home-score-empty-sub { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; margin-bottom: 14px; }

/* ── Acasă: AI recommendations ── */
.home-ai-recs { display: flex; flex-direction: column; gap: 10px; }
.home-ai-rec-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.1s, border-color 0.15s;
}
.home-ai-rec-card:hover { box-shadow: var(--shadow-card); transform: translateY(-1px); border-color: var(--text-muted); }
.home-ai-rec-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.home-ai-rec-body { flex: 1; min-width: 0; }
.home-ai-rec-title { font-size: 13.5px; font-weight: 600; color: var(--text); }
.home-ai-rec-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.home-ai-rec-arrow { margin-left: auto; color: var(--text-dim); font-size: 15px; flex-shrink: 0; }

/* ── Acasă: bottom CTA banner ── */
.home-cta-banner {
  display: block;
  background: linear-gradient(135deg, #1a1c35, #2a1f4d);
  border-radius: var(--radius);
  padding: 22px 24px;
  text-decoration: none;
  color: #fff;
  transition: transform 0.15s, box-shadow 0.2s;
}
.home-cta-banner:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,0.25); }
.home-cta-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.home-cta-sub { font-size: 12.5px; opacity: 0.75; margin-bottom: 14px; }
.home-cta-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 999px;
}

@media (max-width: 560px) {
  .home-topbar { flex-wrap: wrap; }
  .home-search { max-width: 100%; order: 2; }
  .home-avatar-email { display: none; }
}
