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

:root {
  --bg: #0a0a0a;
  --bg-card: rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.07);
  --bg-elevated: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.08);
  --border-subtle: rgba(255,255,255,0.05);
  --text: #f5f5f7;
  --text-secondary: rgba(255,255,255,0.55);
  --text-tertiary: rgba(255,255,255,0.35);
  --blue: #5ac8fa;
  --blue-dim: rgba(90,200,250,0.15);
  --green: #34C759;
  --green-dim: rgba(52,199,89,0.15);
  --red: #FF3B30;
  --red-dim: rgba(255,59,48,0.15);
  --orange: #FF9500;
  --orange-dim: rgba(255,149,0,0.15);
  --gold: #ffd60a;
  --purple: #BF5AF2;
  --purple-dim: rgba(191,90,242,0.12);
  --ai-grad-1: #5ac8fa;
  --ai-grad-2: #BF5AF2;
  --font-body: 'Manrope', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

#app {
  padding: 0 16px 90px 16px;
  max-width: 480px;
  margin: 0 auto;
}

/* Tab Bar */
#tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: rgba(10,10,10,0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  z-index: 100;
}

.tab {
  background: none;
  border: none;
  color: var(--text-tertiary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-family: var(--font-body);
  font-size: 10px;
  padding: 6px 16px;
  cursor: pointer;
  transition: color 0.2s;
}

.tab i { font-size: 22px; }
.tab.active { color: var(--blue); }

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}

.card-accent {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius-md);
  padding: 16px;
}

/* AI Block */
.ai-block {
  background: linear-gradient(135deg, rgba(90,200,250,0.08), rgba(191,90,242,0.06));
  border: 1px solid rgba(90,200,250,0.15);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.ai-block .ai-icon { color: var(--blue); margin-right: 8px; }
.ai-block p { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }

/* Typography */
.section-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 8px;
}

.stat-value {
  font-family: var(--font-mono);
  font-weight: 500;
}

.mono { font-family: var(--font-mono); }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
}
.badge-green { background: var(--green-dim); color: var(--green); }
.badge-red { background: var(--red-dim); color: var(--red); }
.badge-orange { background: var(--orange-dim); color: var(--orange); }
.badge-blue { background: var(--blue-dim); color: var(--blue); }

/* Progress bar */
.progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s;
}

/* Header */
.screen-header {
  display: flex;
  align-items: center;
  padding: 12px 0;
  gap: 8px;
}
.screen-header .back-btn {
  background: none;
  border: none;
  color: var(--blue);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
}
.screen-header h1 {
  font-size: 18px;
  font-weight: 600;
}

/* Grid layouts */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.muscle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

/* Loading */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-tertiary);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Hide tab bar on sub-screens */
body.hide-tabs #tab-bar { display: none; }
body.hide-tabs #app { padding-bottom: 16px; }

/* Streak dots */
.streak-dot {
  width: 10px; height: 10px; border-radius: 50%; display: inline-block;
}
.dot-done { background: var(--green); }
.dot-pending { border: 1.5px solid var(--text-tertiary); }
.dot-next { background: var(--blue); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

/* Volume cell (legacy - kept for reference) */
.volume-cell {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: var(--radius-sm);
  background: var(--bg-card);
}
.volume-cell .mono { margin-left: auto; }
.volume-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

/* Volume Section — segmented bars */
.volume-section { margin-bottom: 16px; }
.volume-category { margin-bottom: 12px; }
.volume-category-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-tertiary);
  font-weight: 600;
  margin-bottom: 6px;
  padding-left: 2px;
}
.volume-row {
  display: flex;
  align-items: center;
  padding: 6px 0;
  gap: 8px;
}
.volume-row-name {
  width: 110px;
  font-size: 12px;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.volume-row-bar {
  flex: 1;
  display: flex;
  gap: 2px;
  height: 14px;
  align-items: center;
}
.volume-segment {
  flex: 1;
  height: 100%;
  border-radius: 2px;
  background: rgba(255,255,255,0.06);
  position: relative;
}
.volume-segment.filled-low {
  background: var(--red);
  opacity: 0.6;
}
.volume-segment.filled-ok {
  background: var(--green);
  opacity: 0.8;
}
.volume-segment.filled-high {
  background: var(--orange);
  opacity: 0.8;
}
.volume-row-value {
  width: 40px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

/* Template card hover */
.template-card { transition: background 0.2s; }
.template-card:active { background: var(--bg-card-hover); }

/* ═══════════════════════════════════════════
   BODY MEASUREMENTS
   ═══════════════════════════════════════════ */
.photo-area {
  width: 100%; height: 200px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  margin-bottom: 8px;
}
.photo-area img { width: 100%; height: 100%; object-fit: cover; }
.photo-tabs {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  display: flex; background: rgba(0,0,0,0.6); border-radius: 8px; overflow: hidden; z-index: 2;
}
.photo-tab {
  padding: 4px 12px; font-size: 10px; font-weight: 600;
  color: var(--text-tertiary); cursor: pointer; transition: all 0.2s;
}
.photo-tab.active { background: rgba(90,200,250,0.25); color: var(--blue); }
.thumb-row { display: flex; gap: 6px; margin-bottom: 12px; overflow-x: auto; padding-bottom: 4px; }
.thumb {
  min-width: 52px; height: 52px; border-radius: 8px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 8px; color: var(--text-tertiary); cursor: pointer; overflow: hidden;
  transition: border-color 0.2s;
}
.thumb.active { border-color: var(--blue); box-shadow: 0 0 8px rgba(90,200,250,0.2); }
.thumb img { width: 100%; height: 36px; object-fit: cover; border-radius: 4px; }
.measure-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--border-subtle);
}
.measure-row:last-child { border-bottom: none; }
.measure-name { font-size: 12px; color: var(--text-secondary); }
.measure-val { font-family: var(--font-mono); font-size: 13px; font-weight: 600; }
.measure-delta { font-family: var(--font-mono); font-size: 11px; font-weight: 600; }

/* Form */
.form-group { margin-bottom: 12px; }
.form-group-label {
  font-size: 9px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--text-tertiary); margin-bottom: 6px; padding-left: 2px;
}
.form-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; border-bottom: 1px solid var(--border-subtle);
}
.form-row:last-child { border-bottom: none; }
.form-row label { font-size: 12px; color: var(--text-secondary); }
.form-input {
  background: rgba(255,255,255,0.06); border: 1px solid var(--border); border-radius: 6px;
  color: var(--text); font-family: var(--font-mono); font-size: 13px; font-weight: 500;
  padding: 6px 10px; width: 90px; text-align: right; outline: none;
  -moz-appearance: textfield;
}
.form-input::-webkit-inner-spin-button { display: none; }
.form-input:focus { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(90,200,250,0.1); }
.form-input-date { width: 130px; text-align: center; color-scheme: dark; }
.form-unit { font-size: 10px; color: var(--text-tertiary); margin-left: 4px; width: 20px; }
.form-prev { font-size: 9px; color: var(--text-tertiary); font-family: var(--font-mono); text-align: right; margin-top: 2px; }
.photo-upload-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.photo-upload-zone {
  height: 110px; border: 2px dashed var(--border); border-radius: var(--radius-md);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; color: var(--text-tertiary); cursor: pointer; transition: all 0.2s;
  position: relative; overflow: hidden;
}
.photo-upload-zone:active { border-color: var(--blue); color: var(--blue); }
.photo-upload-zone img { width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; left: 0; }
.photo-upload-zone .upload-icon { font-size: 22px; }
.photo-upload-zone .upload-label { font-size: 10px; font-weight: 600; }
.photo-upload-zone .photo-delete {
  position: absolute; top: 4px; right: 4px; z-index: 2;
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(0,0,0,0.6); border: none; color: var(--red);
  font-size: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--blue), #4AB0E0); color: #000;
  border: none; border-radius: var(--radius-md); padding: 12px;
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  cursor: pointer; width: 100%; box-shadow: 0 4px 16px rgba(90,200,250,0.25);
  transition: opacity 0.2s;
}
.btn-primary:active { opacity: 0.7; }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-secondary {
  background: var(--bg-card); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-md); padding: 10px;
  font-family: var(--font-body); font-size: 13px; font-weight: 500;
  cursor: pointer; width: 100%;
}
.btn-secondary:active { background: rgba(255,255,255,0.1); }
.btn-danger {
  background: var(--red-dim); color: var(--red);
  border: 1px solid rgba(255,59,48,0.2); border-radius: var(--radius-md); padding: 10px;
  font-family: var(--font-body); font-size: 13px; font-weight: 500;
  cursor: pointer; width: 100%;
}

/* Compare */
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.compare-photo {
  height: 200px; background: rgba(255,255,255,0.03);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; overflow: hidden; position: relative;
}
.compare-photo img { width: 100%; height: 100%; object-fit: cover; }
.compare-label {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 6px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7)); text-align: center; font-size: 11px;
}
.delta-table { width: 100%; font-size: 12px; border-collapse: collapse; }
.delta-table td { padding: 6px 0; border-bottom: 1px solid var(--border-subtle); }
.delta-table tr:last-child td { border-bottom: none; }

/* AI Insight (body section) */
.ai-insight {
  background: linear-gradient(135deg, rgba(90,200,250,0.08), rgba(191,90,242,0.08));
  border: 1px solid rgba(90,200,250,0.15); border-radius: var(--radius-md);
  padding: 12px; margin-bottom: 10px; position: relative; overflow: hidden;
}
.ai-insight::before {
  content: ''; position: absolute; top: -30px; right: -30px;
  width: 80px; height: 80px;
  background: radial-gradient(circle, rgba(191,90,242,0.15), transparent 70%);
  pointer-events: none;
}
.ai-insight-label {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 1px; color: var(--blue); margin-bottom: 6px;
}
.ai-insight p { font-size: 12px; line-height: 1.5; color: rgba(255,255,255,0.75); }
.ai-insight-glow {
  box-shadow: 0 0 30px rgba(90,200,250,0.06), 0 0 60px rgba(191,90,242,0.04);
}

/* Empty state */
.body-empty {
  text-align: center; padding: 48px 16px; color: var(--text-tertiary);
}
.body-empty i { font-size: 48px; display: block; margin-bottom: 12px; }
.body-empty p { font-size: 13px; margin-bottom: 16px; }

/* Hint */
.hint { font-size: 10px; color: var(--text-tertiary); text-align: center; margin-bottom: 12px; }
/* ═══ PHASE BAR ═══ */
.phase-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}
.phase-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.phase-bulk { background: var(--green-dim); color: var(--green); }
.phase-cut { background: var(--orange-dim); color: var(--orange); }
.phase-maintain { background: rgba(255,255,255,0.08); color: var(--text-secondary); }
.week-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

/* ═══ CROSS-DOMAIN ALERT ═══ */
.cross-alert {
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}
.cross-alert-medium {
  background: linear-gradient(135deg, rgba(255,149,0,0.1), rgba(255,204,0,0.04));
  border: 1px solid rgba(255,149,0,0.2);
}
.cross-alert-high {
  background: linear-gradient(135deg, rgba(255,59,48,0.1), rgba(255,149,0,0.06));
  border: 1px solid rgba(255,59,48,0.2);
}
.alert-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 0;
}
.alert-icon-wrap {
  width: 32px; height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}
.alert-icon-wrap.warn { background: var(--orange-dim); color: var(--orange); }
.alert-icon-wrap.crit { background: var(--red-dim); color: var(--red); }
.alert-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.alert-body {
  padding: 8px 14px 12px;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255,255,255,0.6);
}

/* ═══ TEMPLATE GROUP ═══ */
.template-header {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 6px;
  padding-left: 2px;
}
.template-day {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.template-date {
  font-size: 11px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}
.template-group { margin-bottom: 12px; }

/* ═══ ACTION CARD ═══ */
.action-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  border-left: 3px solid transparent;
}
.action-card.increase { border-left-color: var(--green); }
.action-card.decrease { border-left-color: var(--red); }
.action-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}
.action-icon.up { background: var(--green-dim); color: var(--green); }
.action-icon.down { background: var(--red-dim); color: var(--red); }
.action-text { flex: 1; min-width: 0; }
.action-exercise {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 1px;
}
.action-target {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.action-weight {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.action-weight.green { color: var(--green); }
.action-weight.orange { color: var(--orange); }
.action-reps {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}
.action-prev {
  font-size: 10px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  margin-top: 1px;
}

/* ═══ PRAISE CARD ═══ */
.praise-card {
  padding: 14px;
  background: linear-gradient(135deg, rgba(52,199,89,0.1), rgba(52,199,89,0.03));
  border: 1px solid rgba(52,199,89,0.18);
  border-radius: var(--radius-md);
  margin-top: 14px;
}
.praise-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--green);
  margin-bottom: 8px;
}
.praise-main {
  font-size: 14px;
  color: var(--text);
  line-height: 1.4;
}

/* ═══ ALL GOOD STATE ═══ */
.all-good {
  text-align: center;
  padding: 28px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin: 14px 0;
}
.all-good-icon {
  font-size: 36px;
  color: var(--green);
  margin-bottom: 10px;
  display: block;
}
.all-good-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.all-good-sub {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* ═══ UPDATED AT ═══ */
.updated-at {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 10px;
  color: var(--text-tertiary);
  margin-top: 16px;
  font-family: var(--font-mono);
}

/* ═══ SETTINGS ═══ */
.settings-section { margin-bottom: 16px; }
.settings-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  padding-left: 2px;
}
.segment-control {
  display: flex;
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.segment-btn {
  flex: 1;
  text-align: center;
  padding: 8px 4px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  transition: all 0.2s ease;
  cursor: pointer;
}
.segment-btn.active-bulk { background: var(--green-dim); color: var(--green); }
.segment-btn.active-cut { background: var(--orange-dim); color: var(--orange); }
.segment-btn.active-maint { background: rgba(255,255,255,0.1); color: var(--text); }
.input-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 8px;
}
.input-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.input-row:last-child { border-bottom: none; }
.input-name { font-size: 13px; color: var(--text-secondary); }
.input-value {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  text-align: right;
  width: 72px;
  padding: 4px 8px;
  outline: none;
  -moz-appearance: textfield;
}
.input-value:focus { border-color: var(--blue); background: rgba(90,200,250,0.06); }
.input-value::-webkit-outer-spin-button,
.input-value::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.input-unit { font-size: 11px; color: var(--text-tertiary); margin-left: 2px; }
.input-group-header { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.input-group-icon {
  width: 24px; height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}
.input-group-title { font-size: 13px; font-weight: 600; color: var(--text); }
.btn-save {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  background: linear-gradient(135deg, var(--blue), #4AB0E0);
  color: #000;
  box-shadow: 0 4px 16px rgba(90,200,250,0.25);
  margin-top: 12px;
}
.btn-save:active { transform: scale(0.98); }
   NUTRITION REDESIGN
   ═══════════════════════════════════════════ */

/* Energy Balance Bars */
.eb-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 80px;
  padding: 0 2px;
  position: relative;
  margin-bottom: 4px;
}

.eb-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  position: relative;
}

.eb-bar {
  width: 100%;
  border-radius: 4px 4px 2px 2px;
  position: relative;
  min-height: 4px;
  transition: height 0.4s ease;
}

.eb-bar.training-day {
  background: linear-gradient(180deg, rgba(90,200,250,0.6), rgba(90,200,250,0.25));
}

.eb-bar.rest-day {
  background: linear-gradient(180deg, rgba(52,199,89,0.6), rgba(52,199,89,0.25));
}

.eb-bar.today {
  box-shadow: 0 0 8px rgba(90,200,250,0.3);
  border: 1px solid rgba(90,200,250,0.4);
}

.eb-day {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-tertiary);
  margin-top: 4px;
  text-align: center;
}

.eb-day.today {
  color: var(--blue);
  font-weight: 600;
}

.eb-target-line {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px dashed rgba(255,255,255,0.15);
  z-index: 5;
  pointer-events: none;
}

/* Protein Ring */
.protein-ring-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.protein-ring {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.protein-ring circle {
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
}

.protein-ring .track { stroke: rgba(255,255,255,0.06); }
.protein-ring .fill { stroke: var(--green); transition: stroke-dashoffset 0.6s ease; }

/* Adherence Dots */
.adherence-row {
  display: flex;
  gap: 5px;
  margin-top: 6px;
}

.adh-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.adh-dot.hit { background: var(--green); opacity: 0.8; }
.adh-dot.miss { background: rgba(255,255,255,0.08); }
.adh-dot.today { border: 1px solid var(--blue); background: rgba(90,200,250,0.15); }
.adh-dot.today_hit { background: var(--green); border: 1px solid var(--blue); }
.adh-dot.today_miss { background: rgba(255,255,255,0.08); border: 1px solid var(--blue); }
.adh-dot.future { background: rgba(255,255,255,0.03); opacity: 0.3; }

/* Fiber Bar */
.fiber-track {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 6px;
}

.fiber-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--orange), #ffd60a);
  transition: width 0.5s ease;
}

/* Weekly trend mini bars */
.trend-mini {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 28px;
}

.trend-mini-bar {
  flex: 1;
  border-radius: 2px;
  min-height: 3px;
}

/* Stat pills row */
.stat-row {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.stat-pill {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 8px;
  text-align: center;
}

.stat-pill .stat-value {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
}

.stat-pill .stat-label {
  font-size: 9px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* Phase Selector */
.phase-selector {
  display: flex;
  gap: 0;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 12px;
}

.phase-btn {
  flex: 1;
  padding: 10px 4px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  background: none;
  border-right: 1px solid var(--border-subtle);
}

.phase-btn:last-child { border-right: none; }

.phase-btn.active { background: var(--green-dim); color: var(--green); }
.phase-btn.active.cut { background: var(--red-dim); color: var(--red); }
.phase-btn.active.maintain { background: var(--blue-dim); color: var(--blue); }

/* Settings */
.setting-group { margin-bottom: 14px; }

.setting-group-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.setting-row:last-child { border-bottom: none; }

.setting-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.setting-input {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  width: 80px;
  text-align: center;
  -webkit-appearance: none;
}

.setting-input:focus {
  outline: none;
  border-color: var(--blue);
}

.setting-unit {
  font-size: 10px;
  color: var(--text-tertiary);
  margin-left: 4px;
}

.setting-hint {
  font-size: 10px;
  color: var(--text-tertiary);
  margin-top: 4px;
  line-height: 1.4;
}

/* AI Insight card (nutrition) */
.ai-insight {
  background: linear-gradient(135deg, rgba(90,200,250,0.08), rgba(191,90,242,0.08));
  border: 1px solid rgba(90,200,250,0.15);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 10px;
}

/* ═══════════════════════════════════════════
   AI SCREEN V2 — Intelligence Engine
   ═══════════════════════════════════════════ */

/* Phase bar V2 — with readiness badge */
.phase-bar-v2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
}

.readiness-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.readiness-badge.green { background: var(--green-dim); color: var(--green); }
.readiness-badge.orange { background: var(--orange-dim); color: var(--orange); }
.readiness-badge.red { background: var(--red-dim); color: var(--red); }

/* Readiness Gauge */
.readiness-gauge {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 16px 16px;
  margin-bottom: 14px;
}

.readiness-ring {
  position: relative;
  width: 140px;
  height: 140px;
  margin-bottom: 10px;
}

.readiness-ring svg {
  width: 140px;
  height: 140px;
  transform: rotate(-90deg);
}

.readiness-ring circle {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
}

.readiness-ring .track {
  stroke: rgba(255,255,255,0.06);
}

.readiness-ring .fill {
  transition: stroke-dashoffset 0.8s ease;
}

.readiness-score {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
}

.readiness-score.green { color: var(--green); }
.readiness-score.orange { color: var(--orange); }
.readiness-score.red { color: var(--red); }

.readiness-status {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.readiness-action {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
  max-width: 280px;
  line-height: 1.4;
}

.cold-start-note {
  font-size: 10px;
  color: var(--text-tertiary);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Mini Dials Row */
.mini-dials {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.mini-dial {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 8px;
  text-align: center;
}

.mini-dial-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-tertiary);
  font-weight: 500;
  margin-bottom: 4px;
}

.mini-dial-value {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.mini-dial-z {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  margin-top: 2px;
}

.mini-dial-z.positive { color: var(--green); }
.mini-dial-z.negative { color: var(--red); }
.mini-dial-z.neutral { color: var(--text-tertiary); }

/* Key Insight Hero Card */
.key-insight {
  background: linear-gradient(135deg, rgba(90,200,250,0.12), rgba(191,90,242,0.08));
  border: 1px solid rgba(90,200,250,0.2);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}

.key-insight::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--ai-grad-1), var(--ai-grad-2));
}

.key-insight-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.key-insight-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
  background: linear-gradient(135deg, rgba(90,200,250,0.2), rgba(191,90,242,0.15));
  color: var(--blue);
}

.key-insight-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.key-insight-detail {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 8px;
}

.key-insight-action {
  font-size: 12px;
  color: var(--blue);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Signal Cards */
.signals-section {
  margin-bottom: 14px;
}

.signal-card {
  display: flex;
  gap: 10px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  border-left: 3px solid var(--orange);
}

.signal-card.warning { border-left-color: var(--orange); }
.signal-card.danger { border-left-color: var(--red); }
.signal-card.info { border-left-color: var(--blue); }

.signal-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}

.signal-icon.warning { background: var(--orange-dim); color: var(--orange); }
.signal-icon.danger { background: var(--red-dim); color: var(--red); }
.signal-icon.info { background: var(--blue-dim); color: var(--blue); }

.signal-body { flex: 1; min-width: 0; }

.signal-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.signal-detail {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 4px;
}

.signal-action {
  font-size: 11px;
  color: var(--blue);
  font-weight: 500;
}

/* Template Actions V2 */
.action-reason {
  font-size: 10px;
  color: var(--text-tertiary);
  margin-top: 2px;
  font-style: italic;
}

/* Nutrition Summary */
.nutrition-summary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 14px;
}

.nutrition-summary-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.nutrition-summary-header i {
  color: var(--blue);
  font-size: 14px;
}

.nutrition-summary-header span {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.nutrition-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.nutrition-stat-row:last-child { border-bottom: none; }

.nutrition-stat-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.nutrition-stat-value {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.protein-progress-wrap {
  margin-top: 8px;
}

.protein-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}

.protein-progress-bar {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}

.protein-progress-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--green);
  transition: width 0.5s ease;
}

.protein-progress-fill.low { background: var(--orange); }

.calorie-rec {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 8px 10px;
  background: rgba(90,200,250,0.06);
  border: 1px solid rgba(90,200,250,0.12);
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.calorie-rec i { color: var(--blue); font-size: 14px; flex-shrink: 0; }

/* Volume Bars V2 — with MEV/MAV zone markers */
.volume-v2-section {
  margin-bottom: 14px;
}

.volume-v2-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.volume-v2-header i {
  color: var(--purple);
  font-size: 14px;
}

.volume-v2-header span {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.volume-bar-v2 {
  margin-bottom: 8px;
}

.volume-bar-v2-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}

.volume-bar-v2-name {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: capitalize;
}

.volume-bar-v2-sets {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
}

.volume-bar-v2-track {
  position: relative;
  height: 14px;
  background: rgba(255,255,255,0.04);
  border-radius: 4px;
  overflow: hidden;
}

.volume-bar-v2-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
  min-width: 2px;
}

.volume-bar-v2-fill.below-mev { background: var(--red); opacity: 0.7; }
.volume-bar-v2-fill.optimal { background: var(--green); opacity: 0.8; }
.volume-bar-v2-fill.above-mav { background: var(--orange); opacity: 0.7; }

.volume-bar-v2-marker {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 2px;
  border-radius: 1px;
  z-index: 2;
}

.volume-bar-v2-marker.mev { background: rgba(255,255,255,0.2); }
.volume-bar-v2-marker.mav { background: rgba(255,255,255,0.2); }

.volume-bar-v2-marker-label {
  display: none;
}

.volume-bar-v2-status {
  font-size: 10px;
  margin-top: 2px;
  font-weight: 500;
}

.volume-bar-v2-status.below-mev { color: var(--red); }
.volume-bar-v2-status.optimal { color: var(--green); }
.volume-bar-v2-status.above-mav { color: var(--orange); }

.volume-advisor {
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(191,90,242,0.06);
  border: 1px solid rgba(191,90,242,0.12);
  border-radius: var(--radius-sm);
}

.volume-advisor-summary {
  font-size: 12px;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 6px;
}

.volume-advisor-detail {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
  padding-left: 8px;
  border-left: 2px solid rgba(191,90,242,0.2);
  margin-bottom: 4px;
}

.volume-advisor-detail:last-child { margin-bottom: 0; }

/* ACWR Warnings */
.acwr-section {
  margin-bottom: 14px;
}

.acwr-warning {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--orange);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
}

.acwr-warning.spike { border-left-color: var(--red); }

.acwr-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
  background: var(--orange-dim);
  color: var(--orange);
}

.acwr-warning.spike .acwr-icon {
  background: var(--red-dim);
  color: var(--red);
}

.acwr-body { flex: 1; min-width: 0; }

.acwr-muscle {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  text-transform: capitalize;
}

.acwr-text {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.3;
}

.acwr-value {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.acwr-value.caution { color: var(--orange); }
.acwr-value.spike { color: var(--red); }

/* Deload Status */
.deload-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  font-size: 12px;
  color: var(--text-secondary);
}

.deload-status i {
  font-size: 16px;
  color: var(--text-tertiary);
}

.deload-status.needed {
  border-left: 3px solid var(--orange);
}

.deload-status.needed i {
  color: var(--orange);
}

/* Praise V2 — multiple items */
.praise-v2 {
  padding: 14px;
  background: linear-gradient(135deg, rgba(52,199,89,0.1), rgba(52,199,89,0.03));
  border: 1px solid rgba(52,199,89,0.18);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
}

.praise-v2-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--green);
  margin-bottom: 8px;
}

.praise-v2-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}

.praise-v2-item i {
  color: var(--green);
  font-size: 12px;
  flex-shrink: 0;
}

.praise-v2-item + .praise-v2-item {
  margin-top: 4px;
}

/* Section Divider Label */
.v2-section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-tertiary);
  font-weight: 600;
  margin-bottom: 8px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.v2-section-label i {
  font-size: 12px;
}

/* V2 overflow containment */
.readiness-gauge, .mini-dials, .key-insight, .signals-section,
.template-group, .nutrition-summary, .volume-v2-section,
.acwr-section, .deload-status, .praise-v2 {
  overflow: hidden;
  max-width: 100%;
}

.volume-bar-v2 {
  overflow: hidden;
  max-width: 100%;
}

.volume-bar-v2-label {
  overflow: hidden;
}

/* ═══ EXERCISE DETAIL REDESIGN ═══ */
.ex-muscles { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.ex-muscle { font-size: 10px; padding: 3px 10px; border-radius: 12px; background: var(--blue-dim); color: var(--blue); font-weight: 500; }
.ex-muscle.secondary { background: rgba(255,255,255,0.05); color: var(--text-tertiary); }

.ex-rec { border-radius: var(--radius-md); padding: 14px 16px; margin-bottom: 14px; }
.ex-rec.hold { background: linear-gradient(135deg, rgba(90,200,250,0.06), rgba(90,200,250,0.02)); border: 1px solid rgba(90,200,250,0.12); }
.ex-rec.increase, .ex-rec.rep-increase { background: linear-gradient(135deg, rgba(52,199,89,0.08), rgba(52,199,89,0.02)); border: 1px solid rgba(52,199,89,0.15); }
.ex-rec.decrease { background: linear-gradient(135deg, rgba(255,59,48,0.06), rgba(255,59,48,0.02)); border: 1px solid rgba(255,59,48,0.12); }
.ex-rec-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 5px; }
.ex-rec.hold .ex-rec-label { color: var(--blue); }
.ex-rec.increase .ex-rec-label, .ex-rec.rep-increase .ex-rec-label { color: var(--green); }
.ex-rec.decrease .ex-rec-label { color: var(--red); }
.ex-rec-main { font-size: 17px; font-weight: 700; font-family: var(--font-mono); }
.ex-rec.hold .ex-rec-main { color: var(--blue); }
.ex-rec.increase .ex-rec-main, .ex-rec.rep-increase .ex-rec-main { color: var(--green); }
.ex-rec.decrease .ex-rec-main { color: var(--red); }
.ex-rec-why { font-size: 12px; color: var(--text-secondary); margin-top: 4px; line-height: 1.4; }

.ex-chart-glued { border-radius: var(--radius-md) var(--radius-md) 0 0; border: 1px solid var(--border); background: var(--bg-card); margin-bottom: 0; overflow: hidden; height: 130px; }
.ex-history-glued { background: var(--bg-card); border: 1px solid var(--border); border-top: none; border-radius: 0 0 var(--radius-md) var(--radius-md); margin-bottom: 12px; padding: 0 12px; }
.ex-history-note { font-size: 10px; color: var(--text-tertiary); font-style: italic; text-align: center; padding: 6px 0 2px; border-bottom: 1px solid var(--border); }

.rr-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 4px; }
.rr-cell { text-align: center; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 2px; }
.rr-label { font-size: 9px; color: var(--text-tertiary); font-weight: 600; }
.rr-val { font-family: var(--font-mono); font-size: 15px; font-weight: 700; margin-top: 2px; }

.ex-ai { background: linear-gradient(135deg, rgba(90,200,250,0.06), rgba(191,90,242,0.04)); border: 1px solid rgba(90,200,250,0.12); border-radius: var(--radius-md); padding: 16px; margin-bottom: 10px; position: relative; overflow: hidden; }
.ex-ai::before { content: ''; position: absolute; top: -20px; right: -20px; width: 60px; height: 60px; background: radial-gradient(circle, rgba(191,90,242,0.1), transparent 70%); pointer-events: none; }
.ex-ai-label { display: flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--blue); margin-bottom: 10px; }
.ex-ai-text { font-size: 13px; color: rgba(255,255,255,0.8); line-height: 1.6; }
.ex-ai-bar { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.06); }
.ex-ai-bar-title { font-size: 11px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.ex-ai-track { height: 8px; background: rgba(255,255,255,0.06); border-radius: 4px; position: relative; }
.ex-ai-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, rgba(255,255,255,0.03), rgba(90,200,250,0.15), rgba(191,90,242,0.15), rgba(255,215,10,0.15)); width: 100%; }
.ex-ai-marker { position: absolute; top: -4px; width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid var(--blue); transform: translateX(-50%); background: var(--bg); }
.ex-ai-bar-labels { display: flex; justify-content: space-between; margin-top: 5px; font-size: 9px; color: var(--text-tertiary); }

@keyframes progress { 0% { width: 0%; } 100% { width: 95%; } }


/* Body Analysis V2 */
.ba2-section { margin-bottom: 14px; }
.ba2-header { font-size: 10px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.ba2-metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.ba2-metric { background: var(--bg-card); border-radius: var(--radius-sm); padding: 12px; }
.ba2-metric-label { font-size: 10px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 4px; }
.ba2-metric-value { font-size: 22px; font-weight: 700; font-family: var(--font-mono); }
.ba2-metric-sub { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }
.ba2-comp-row { display: flex; gap: 8px; margin-bottom: 8px; }
.ba2-comp-card { flex: 1; background: var(--bg-card); border-radius: var(--radius-sm); padding: 12px; text-align: center; }
.ba2-comp-val { font-size: 24px; font-weight: 800; }
.ba2-comp-label { font-size: 10px; color: var(--text-tertiary); margin-top: 2px; text-transform: uppercase; }
.ba2-progress-row { display: flex; align-items: center; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.ba2-progress-row:last-child { border-bottom: none; }
.ba2-progress-name { flex: 1; font-size: 13px; color: var(--text-secondary); }
.ba2-progress-delta { font-size: 12px; font-weight: 600; font-family: var(--font-mono); min-width: 50px; text-align: right; }
.ba2-progress-vals { font-size: 11px; color: var(--text-tertiary); font-family: var(--font-mono); margin-right: 8px; }
.ba2-trend-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
.ba2-trend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ba2-trend-text { font-size: 12px; color: var(--text-secondary); flex: 1; }
.ba2-trend-val { font-size: 12px; font-weight: 600; font-family: var(--font-mono); }
.ba2-verdict { background: linear-gradient(135deg, rgba(90,200,250,0.08), rgba(191,90,242,0.08)); border: 1px solid rgba(90,200,250,0.15); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; }
.ba2-verdict-title { font-size: 12px; font-weight: 700; color: var(--blue); margin-bottom: 6px; display: flex; align-items: center; gap: 5px; }
.ba2-verdict-text { font-size: 13px; line-height: 1.5; color: var(--text); opacity: 0.85; }
.ba2-rec { background: var(--bg-card); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 8px; border-left: 3px solid; }
.ba2-rec-title { font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.ba2-rec-text { font-size: 12px; line-height: 1.4; color: var(--text-secondary); }
.ba2-next { text-align: center; padding: 12px; background: var(--bg-card); border-radius: var(--radius); }
.ba2-divider { height: 1px; background: rgba(255,255,255,0.06); margin: 12px 0; }

/* Compare Slider V2 */
.cmp-photo-box { position: relative; width: 100%; aspect-ratio: 3/4; border-radius: var(--radius-md); overflow: hidden; background: #000; margin-bottom: 4px; touch-action: none; }
.cmp-photo-box img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.cmp-before { z-index: 2; }
.cmp-after { z-index: 1; }
.cmp-slider { position: absolute; top: 0; bottom: 0; z-index: 3; width: 2px; transform: translateX(-50%); cursor: ew-resize; }
.cmp-slider-line { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; transform: translateX(-50%); background: rgba(255,255,255,0.8); }
.cmp-slider-handle { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 36px; height: 36px; border-radius: 50%; background: rgba(0,0,0,0.6); border: 2px solid rgba(255,255,255,0.8); display: flex; align-items: center; justify-content: center; color: #fff; backdrop-filter: blur(4px); }
.cmp-label { position: absolute; bottom: 8px; z-index: 4; font-size: 11px; line-height: 1.3; padding: 4px 8px; border-radius: 6px; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); color: var(--text-secondary); }
.cmp-label-left { left: 8px; }
.cmp-label-right { right: 8px; }
.cmp-delta-row { display: flex; align-items: center; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.cmp-delta-row:last-child { border-bottom: none; }
.cmp-delta-name { width: 90px; font-size: 13px; color: var(--text-secondary); }
.cmp-delta-bar-wrap { flex: 1; height: 12px; display: flex; align-items: center; }
.cmp-delta-bar { height: 8px; border-radius: 4px; min-width: 4px; }
.cmp-delta-val { min-width: 50px; text-align: right; font-size: 13px; font-weight: 600; }

/* Volume History Grid */
.vol-hg { width: 100%; border-collapse: separate; border-spacing: 0 1px; }
.vol-hg th { font-size: 9px; font-weight: 600; color: var(--text-tertiary); text-align: center; padding: 3px 2px; text-transform: uppercase; }
.vol-hg th:first-child { text-align: left; width: 84px; }
.vol-hg td { text-align: center; padding: 3px 2px; font-family: 'SF Mono', monospace; font-size: 10px; font-weight: 500; border-radius: 3px; }
.vol-hg td:first-child { text-align: left; font-family: inherit; font-weight: 400; color: var(--text-secondary); }
.vol-hg td.zr { background: rgba(255,69,58,0.12); color: var(--red); }
.vol-hg td.zg { background: rgba(52,199,89,0.12); color: var(--green); }
.vol-hg td.zo { background: rgba(255,159,10,0.12); color: var(--orange); }
.vol-hg td.z0 { color: rgba(255,255,255,0.12); font-size: 8px; }
.vol-hg td.dim, .vol-hg th.dim { opacity: 0.35; }
.vol-hg .cat-row td { font-size: 9px; font-weight: 700; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.4px; padding: 7px 2px 2px; background: none; text-align: left; }
.vol-hg .tot-row td { font-weight: 700; color: var(--text-secondary); border-top: 1px solid rgba(255,255,255,0.08); padding-top: 5px; }
.vol-hg .wk-ct { font-size: 7px; color: var(--text-tertiary); display: block; }
.vol-legend { display: flex; gap: 10px; margin: 6px 0; font-size: 8px; color: var(--text-tertiary); }
.vol-legend-dot { display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin-right: 3px; vertical-align: middle; }
.vol-ai { background: var(--card-bg, #232323); border-radius: 12px; padding: 12px; margin-top: 12px; border-left: 3px solid var(--blue); }
.vol-ai-hdr { font-size: 11px; font-weight: 600; color: var(--blue); margin-bottom: 8px; }
.vol-ai-row { display: flex; gap: 8px; font-size: 11px; line-height: 1.45; color: var(--text-secondary); margin-bottom: 7px; }
.vol-ai-row:last-child { margin-bottom: 0; }
.vol-ai-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.vol-ai-dot.w { background: var(--red); }
.vol-ai-dot.a { background: var(--orange); }
.vol-ai-dot.g { background: var(--green); }
.last-week-banner { display: flex; align-items: center; gap: 6px; padding: 6px 10px; background: rgba(10,132,255,0.08); border-radius: 8px; margin-bottom: 8px; font-size: 11px; color: var(--blue); }
