/* ============================================================
   TOOLSPOT — BODY FAT CALCULATOR STYLES
   ============================================================ */

:root {
  --tool-cyan: #06b6d4;
  --tool-cyan-soft: rgba(6, 182, 212, 0.12);
  --tool-cyan-glow: rgba(6, 182, 212, 0.25);
  --tool-cyan-hover: #0891b2;
}

body.light {
  --tool-cyan: #0891b2;
  --tool-cyan-soft: rgba(8, 145, 178, 0.08);
  --tool-cyan-glow: rgba(8, 145, 178, 0.15);
  --tool-cyan-hover: #0e7490;
}

/* ── ANALYSIS & OUTCOME HERO ── */
.result-hero {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.3s ease;
}

.result-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.result-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-3);
  letter-spacing: 0.5px;
}

.risk-badge {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Body fat badge categories color presets */
.risk-essential { background: rgba(139, 92, 246, 0.15); border: 1px solid rgba(139, 92, 246, 0.3); color: #c084fc; }
.risk-athletes { background: rgba(6, 182, 212, 0.15); border: 1px solid rgba(6, 182, 212, 0.3); color: #22d3ee; }
.risk-fitness { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.3); color: #34d399; }
.risk-acceptable { background: rgba(245, 158, 11, 0.15); border: 1px solid rgba(245, 158, 11, 0.3); color: #fbbf24; }
.risk-obese { background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.3); color: #f87171; }

body.light .risk-essential { background: rgba(139, 92, 246, 0.1); border-color: rgba(139, 92, 246, 0.2); color: #7c3aed; }
body.light .risk-athletes { background: rgba(8, 145, 178, 0.1); border-color: rgba(8, 145, 178, 0.2); color: #0891b2; }
body.light .risk-fitness { background: rgba(5, 150, 105, 0.1); border-color: rgba(5, 150, 105, 0.2); color: #059669; }
body.light .risk-acceptable { background: rgba(217, 119, 6, 0.1); border-color: rgba(217, 119, 6, 0.2); color: #b45309; }
body.light .risk-obese { background: rgba(220, 38, 38, 0.1); border-color: rgba(220, 38, 38, 0.2); color: #b91c1c; }

.result-val {
  font-family: 'Outfit', sans-serif;
  font-size: 36px;
  font-weight: 800;
  color: var(--text);
  margin: 6px 0;
  letter-spacing: -0.5px;
}

.sys-dia-unit {
  font-size: 14px;
  color: var(--text-3);
  font-weight: 500;
}

.result-subtitle {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
}

.hero-gauge-container {
  margin: 16px 0 8px;
}

.speedometer-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.gauge-axis {
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 1.5;
}

.gauge-ticks text {
  fill: rgba(255, 255, 255, 0.3);
  font-size: 8px;
  font-weight: 600;
}

.gauge-pointer path {
  fill: var(--text);
}

.pointer-bubble {
  fill: var(--text);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.pointer-bubble-text {
  font-family: 'Outfit', sans-serif;
  font-size: 9px;
  font-weight: 800;
  fill: #000000;
}

body.light .pointer-bubble-text {
  fill: #ffffff !important;
}

/* ── COMPOSITION PROGRESS BAR ── */
.comp-bar-container {
  margin: 16px 0;
}

.comp-bar {
  display: flex;
  height: 28px;
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.comp-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.seg-lean {
  background: linear-gradient(90deg, #0891b2 0%, #06b6d4 100%);
  box-shadow: inset -3px 0 8px rgba(0, 0, 0, 0.2);
}

.seg-fat {
  background: linear-gradient(90deg, #ea580c 0%, #f97316 100%);
  box-shadow: inset 3px 0 8px rgba(0, 0, 0, 0.2);
}

.comp-legend-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 14px;
}

.legend-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 12px;
  transition: all 0.3s ease;
}

.legend-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

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

.legend-title .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.item-lean .dot { background: #06b6d4; }
.item-fat .dot { background: #f97316; }

.legend-val {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.legend-desc {
  font-size: 11px;
  color: var(--text-2);
  line-height: 1.4;
}

/* ── ANATOMICAL VISUAL GUIDE ── */
.anatomy-guide-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 290px;
  padding: 10px 0;
  position: relative;
  overflow: hidden;
}

.anatomy-svg {
  display: none;
  height: 100%;
  width: auto;
  opacity: 0;
  transform: scale(0.95);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.anatomy-svg.active {
  display: block;
  opacity: 1;
  transform: scale(1);
}

.silhouette-path {
  fill: rgba(255, 255, 255, 0.04);
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 1.5;
  transition: all 0.3s ease;
}

.indicator-line {
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 1.5;
  stroke-dasharray: 4 3;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.indicator-dot {
  fill: #ffffff;
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 2;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.indicator-text {
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  font-weight: 600;
  fill: var(--text-2);
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
}

/* SVG Highlight Focus States */
.indicator-group.highlighted .silhouette-path {
  stroke: rgba(6, 182, 212, 0.25);
  fill: rgba(6, 182, 212, 0.03);
}

.indicator-group.highlighted .indicator-line {
  stroke: #06b6d4;
  stroke-width: 2;
  stroke-dasharray: none;
  filter: drop-shadow(0 0 2px rgba(6, 182, 212, 0.5));
}

.indicator-group.highlighted .indicator-dot {
  fill: #06b6d4;
  stroke: rgba(6, 182, 212, 0.4);
  stroke-width: 4;
  r: 4.5;
  animation: pulse-dot 1.5s infinite;
}

.indicator-group.highlighted .indicator-text {
  fill: #06b6d4;
  font-weight: 700;
}

@keyframes pulse-dot {
  0% { stroke-width: 3; }
  50% { stroke-width: 7; }
  100% { stroke-width: 3; }
}

/* ── SPEEDOMETER GAUGE COLORS ── */
.seg-essential { fill: #8b5cf6; } /* Purple */
.seg-athletes { fill: #06b6d4; }  /* Cyan */
.seg-fitness { fill: #10b981; }   /* Emerald Green */
.seg-acceptable { fill: #eab308; }/* Yellow */
.seg-obese { fill: #ef4444; }     /* Red */

/* ── TARGET PLANNER & GOAL CARD ── */
.goal-projection-card {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.05) 0%, rgba(6, 182, 212, 0.01) 100%);
  border: 1px solid rgba(6, 182, 212, 0.15);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.goal-proj-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.goal-proj-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #06b6d4;
}

.goal-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  text-transform: uppercase;
}

.goal-badge.goal-loss {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.goal-badge.goal-gain {
  background: rgba(96, 165, 250, 0.15);
  color: #60a5fa;
}

.goal-badge.goal-maintain {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-2);
}

.goal-weight-display {
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: #ffffff;
  margin-top: 8px;
}

.goal-desc-text {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.45;
  margin-top: 6px;
}

/* Custom Teal Goal Slider */
.target-slider::-webkit-slider-thumb {
  border-color: #06b6d4 !important;
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.15), 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.target-slider::-moz-range-thumb {
  border-color: #06b6d4 !important;
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.15) !important;
}

/* ── CALORIC ESTIMATOR CARDS ── */
.calorie-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.calorie-card {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 16px;
  transition: all 0.3s ease;
}

.calorie-card:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

.highlight-tdee {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(6, 182, 212, 0.1);
}

.highlight-tdee:hover {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border-color: rgba(6, 182, 212, 0.18);
}

.cal-card-label {
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
  display: block;
  margin-bottom: 6px;
}

.cal-card-val {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
}

.highlight-tdee .cal-card-val {
  color: #06b6d4;
}

.cal-card-desc {
  font-family: 'Figtree', sans-serif;
  font-size: 11px;
  color: var(--text-2);
  line-height: 1.35;
}

.dietary-goals-row {
  display: flex;
  gap: 12px;
  width: 100%;
}

.diet-goal-badge {
  flex: 1;
  text-align: center;
  font-family: 'Figtree', sans-serif;
  font-size: 11px;
  font-weight: 700;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.diet-goal-badge span {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
}

.badge-loss {
  background: rgba(244, 63, 94, 0.06);
  border-color: rgba(244, 63, 94, 0.15);
  color: #f43f5e;
}

.badge-gain {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

/* ── HEALTH RISK PROFILE ── */
.risk-card-grid {
  display: flex;
  align-items: center;
  gap: 20px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
}

.profile-risk-badge {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 800;
  padding: 10px 16px;
  border-radius: 8px;
  text-align: center;
  text-transform: uppercase;
}

#unified-risk-badge.risk-low {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

#unified-risk-badge.risk-elevated {
  background: rgba(234, 179, 8, 0.12);
  color: #eab308;
  border: 1px solid rgba(234, 179, 8, 0.2);
}

#unified-risk-badge.risk-high {
  background: rgba(249, 115, 22, 0.12);
  color: #f97316;
  border: 1px solid rgba(249, 115, 22, 0.2);
}

#unified-risk-badge.risk-veryhigh {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

body.light #unified-risk-badge.risk-low {
  background: rgba(5, 150, 105, 0.1);
  color: #059669;
  border-color: rgba(5, 150, 105, 0.2);
}

body.light #unified-risk-badge.risk-elevated {
  background: rgba(217, 119, 6, 0.1);
  color: #b45309;
  border-color: rgba(217, 119, 6, 0.2);
}

body.light #unified-risk-badge.risk-high {
  background: rgba(220, 38, 38, 0.1);
  color: #b91c1c;
  border-color: rgba(220, 38, 38, 0.2);
}

body.light #unified-risk-badge.risk-veryhigh {
  background: rgba(220, 38, 38, 0.1);
  color: #b91c1c;
  border-color: rgba(220, 38, 38, 0.2);
}

.risk-profile-stats {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: 'Figtree', sans-serif;
}

.risk-stat-item {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.risk-stat-item .stat-name {
  color: var(--text-2);
}

.risk-stat-item .stat-val {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  color: #ffffff;
}

.health-risk-desc {
  font-family: 'Figtree', sans-serif;
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.45;
}

/* ── COMPARATIVE METHODOLOGY GRID ── */
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
}

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

.comp-method-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
}

.comp-method-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  pointer-events: none;
}

.comp-method-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.comp-method-card.active-card {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.05) 0%, rgba(6, 182, 212, 0.01) 100%);
  border: 1px solid rgba(6, 182, 212, 0.2);
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.08), inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.comp-method-card.active-card::before {
  background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.3), transparent);
}

.comp-method-card.active-card:hover {
  border-color: rgba(6, 182, 212, 0.35);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.08) 0%, rgba(6, 182, 212, 0.02) 100%);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.12);
}

body.light .comp-method-card {
  background: rgba(0, 0, 0, 0.015);
  border-color: rgba(0, 0, 0, 0.05);
}

body.light .comp-method-card:hover {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}

body.light .comp-method-card.active-card {
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.05) 0%, rgba(8, 145, 178, 0.01) 100%);
  border-color: rgba(8, 145, 178, 0.25);
  box-shadow: 0 4px 12px rgba(8, 145, 178, 0.04);
}

.method-name {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-2);
}

body.light .method-name {
  color: #475569;
}

.comp-method-card.active-card .method-name {
  color: #06b6d4;
}

body.light .comp-method-card.active-card .method-name {
  color: #0891b2;
}

.method-val {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin: 4px 0;
}

body.light .method-val {
  color: #0f172a;
}

.comp-method-card.active-card .method-val {
  color: #06b6d4;
}

body.light .comp-method-card.active-card .method-val {
  color: #0891b2;
}

.method-desc {
  font-family: 'Figtree', sans-serif;
  font-size: 11px;
  color: var(--text-3);
  line-height: 1.4;
  margin: 0;
}

body.light .method-desc {
  color: #64748b;
}

.panel-subtitle-text {
  font-family: 'Figtree', sans-serif;
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.5;
  margin-bottom: 16px;
}

body.light .panel-subtitle-text {
  color: #475569;
}

/* ── TAPE MEASURE SPEEDOMETER RECTS ── */
body.light .gauge-axis {
  stroke: rgba(15, 23, 42, 0.15) !important;
}

body.light .silhouette-path {
  fill: rgba(15, 23, 42, 0.02);
  stroke: rgba(15, 23, 42, 0.12);
}

body.light .indicator-line {
  stroke: rgba(15, 23, 42, 0.25);
}

body.light .indicator-dot {
  fill: #334155;
  stroke: rgba(15, 23, 42, 0.2);
}

body.light .legend-card {
  background: rgba(15, 23, 42, 0.015);
  border-color: rgba(15, 23, 42, 0.05);
}

body.light .legend-val {
  color: #0f172a;
}

body.light .calorie-card {
  background: rgba(15, 23, 42, 0.015);
  border-color: rgba(15, 23, 42, 0.05);
}

body.light .cal-card-val {
  color: #0f172a;
}

body.light .highlight-tdee .cal-card-val {
  color: #0891b2;
}

body.light .risk-card-grid {
  background: rgba(15, 23, 42, 0.015);
  border-color: rgba(15, 23, 42, 0.05);
}

body.light .risk-stat-item .stat-val {
  color: #0f172a;
}

body.light .goal-weight-display {
  color: #0f172a;
}

/* ── LIGHT GAUGE TEXTS ── */
body.light #scale-axis-ticks text {
  fill: #334155 !important;
}

/* ── MODE & SEX TABS (Glassmorphic) ── */
.mode-toggle {
  position: relative;
  display: flex;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  z-index: 1;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.3s ease;
  margin-bottom: 24px;
}

.mode-toggle::before {
  content: '';
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.15) 0%, rgba(6, 182, 212, 0.06) 100%);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 8px;
  transition: transform 0.28s cubic-bezier(0.25, 1, 0.5, 1), background 0.28s, border-color 0.28s;
  z-index: 0;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

/* Unit Toggle (2 choices) */
#unit-toggle.mode-toggle::before {
  width: calc(50% - 6px);
}
#unit-toggle.mode-toggle.active-metric::before {
  transform: translateX(0);
}
#unit-toggle.mode-toggle.active-imperial::before {
  transform: translateX(calc(100% + 4px));
}

/* Sex Toggle (2 choices) */
#sex-toggle.mode-toggle::before {
  width: calc(50% - 6px);
}
#sex-toggle.mode-toggle.active-male::before {
  transform: translateX(0);
}
#sex-toggle.mode-toggle.active-female::before {
  transform: translateX(calc(100% + 4px));
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.15) 0%, rgba(236, 72, 153, 0.06) 100%);
  border-color: rgba(236, 72, 153, 0.3);
  box-shadow: 0 4px 15px rgba(236, 72, 153, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

.mode-btn {
  position: relative;
  z-index: 2;
  flex: 1;
  background: transparent !important;
  border: none;
  padding: 10px 16px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 8px;
  box-shadow: none !important;
  transition: color 0.28s cubic-bezier(0.25, 1, 0.5, 1), 
              transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.mode-btn:hover {
  color: var(--text);
}

.mode-btn.active {
  color: #22d3ee !important; /* Cyan active color */
  text-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

#sex-toggle.active-female .mode-btn.active {
  color: #f472b6 !important; /* Pink active color */
  text-shadow: 0 0 10px rgba(236, 72, 153, 0.3);
}

.mode-btn:active {
  transform: scale(0.97);
}

/* Light mode overrides for toggles */
body.light .mode-toggle {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.05);
}

body.light .mode-toggle::before {
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.12) 0%, rgba(8, 145, 178, 0.04) 100%);
  border-color: rgba(8, 145, 178, 0.25);
  box-shadow: 0 4px 12px rgba(8, 145, 178, 0.06), inset 0 1px 1px rgba(255, 255, 255, 0.5);
}

body.light #sex-toggle.mode-toggle.active-female::before {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.12) 0%, rgba(236, 72, 153, 0.04) 100%);
  border-color: rgba(236, 72, 153, 0.25);
}

body.light .mode-btn {
  color: #556b82;
}

body.light .mode-btn:hover {
  color: #0f172a;
}

body.light .mode-btn.active {
  color: #0891b2 !important;
  text-shadow: none;
}

body.light #sex-toggle.active-female .mode-btn.active {
  color: #db2777 !important;
}

/* ── INPUT HEADERS & COMPACT SLIDER OVERRIDES ── */
.input-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.input-header label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
}

body.light .input-header label {
  color: #334155;
}

.input-header .inp-box {
  width: 110px;
  height: 32px;
  border-radius: 8px;
}

.input-header .inp-box input {
  padding: 6px 10px;
  text-align: right;
  font-size: 14px;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  width: 100%;
  border: none;
  background: transparent;
  outline: none;
  color: var(--text);
}

.input-header .inp-box .inp-suf {
  padding-right: 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  white-space: nowrap;
}

/* Local input box focus overrides for Cyan theme */
.inp-box:focus-within {
  border-color: rgba(6, 182, 212, 0.5) !important;
  background-color: rgba(6, 182, 212, 0.06) !important;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.08) !important;
}
body.light .inp-box:focus-within {
  border-color: rgba(8, 145, 178, 0.55) !important;
  background-color: rgba(8, 145, 178, 0.04) !important;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.10) !important;
}

/* Target Goal Input styling color match */
#target-fat-val {
  color: #06b6d4 !important;
}
#target-fat-val + .inp-suf {
  color: #06b6d4 !important;
}
body.light #target-fat-val, body.light #target-fat-val + .inp-suf {
  color: #0891b2 !important;
}

/* ── SLIDER WRAPPERS & CUSTOM SLIDERS ── */
.slider-wrap {
  position: relative;
  padding-bottom: 4px;
}

.range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 10px;
  outline: none;
  cursor: pointer;
  background: linear-gradient(to right, #06b6d4 0%, #06b6d4 var(--fill, 50%), 
    rgba(255, 255, 255, 0.1) var(--fill, 50%), rgba(255, 255, 255, 0.1) 100%) !important;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: #fff !important;
  border: 3px solid #06b6d4 !important;
  border-radius: 50% !important;
  cursor: pointer;
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.15), 0 2px 8px rgba(0, 0, 0, 0.3) !important;
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2) !important;
}

.range-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #fff !important;
  border: 3px solid #06b6d4 !important;
  border-radius: 50% !important;
  cursor: pointer;
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.15) !important;
}

body.light .range-slider {
  background: linear-gradient(to right, #0891b2 0%, #0891b2 var(--fill, 50%), 
    rgba(15, 23, 42, 0.08) var(--fill, 50%), rgba(15, 23, 42, 0.08) 100%) !important;
}

body.light .range-slider::-webkit-slider-thumb {
  border-color: #0891b2 !important;
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.1), 0 2px 6px rgba(0, 0, 0, 0.1) !important;
}

body.light .range-slider::-moz-range-thumb {
  border-color: #0891b2 !important;
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.1) !important;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
}

.range-labels span {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-3);
}

body.light .range-labels span {
  color: #64748b;
}

/* ── RISK SUBCARD STYLING (FOR PROJECTION CARD) ── */
.risk-subcard {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  animation: fadeIn 0.4s ease forwards;
}

body.light .risk-subcard {
  background: rgba(0, 0, 0, 0.015) !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
}

/* Screen default for print-only header */
.print-only-header {
  display: none !important;
}

/* ── PRINT MEDIA CALORIC & SILHOUETTE SHEETS ── */
@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  /* Show print-only header */
  .print-only-header {
    display: block !important;
    margin-bottom: 16px;
  }
  .print-brand {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    border-bottom: 1.5px solid #000000;
    padding-bottom: 4px;
  }
  .print-logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 800;
    color: #000000 !important;
  }
  .print-logo-text span {
    color: #0891b2 !important;
  }
  .print-report-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    color: #555555 !important;
    letter-spacing: 0.5px;
  }
  .print-title {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: #000000 !important;
    margin: 10px 0 8px;
    letter-spacing: -0.5px;
  }
  .print-meta-grid {
    display: flex;
    gap: 20px;
    font-size: 11px;
    color: #222222 !important;
    background: #f8f9fa !important;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    margin-bottom: 12px;
  }

  body[data-page="tool"] .visual-guide-panel {
    display: none !important;
  }
  
  body[data-page="tool"] .goal-planner-panel {
    display: none !important;
  }

  body[data-page="tool"] .action-panel {
    display: none !important;
  }

  body[data-page="tool"] .log-panel {
    display: none !important;
  }

  .calorie-panel {
    break-inside: avoid;
    margin-top: 15px !important;
  }

  .comparison-panel {
    break-inside: avoid;
    margin-top: 15px !important;
  }

  .health-risk-panel {
    break-inside: avoid;
    margin-top: 15px !important;
  }

  .comp-legend-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* ── Theme Button Overrides ── */
.rb-btn-primary {
  background: rgba(6, 182, 212, 0.1) !important;
  border-color: rgba(6, 182, 212, 0.25) !important;
  color: var(--tool-cyan) !important;
}

.rb-btn-primary:hover {
  background: rgba(6, 182, 212, 0.16) !important;
  border-color: rgba(6, 182, 212, 0.35) !important;
  color: var(--text) !important;
}

body.light .rb-btn-primary {
  background: rgba(8, 145, 178, 0.08) !important;
  border-color: rgba(8, 145, 178, 0.2) !important;
  color: var(--tool-cyan) !important;
}

body.light .rb-btn-primary:hover {
  background: rgba(8, 145, 178, 0.12) !important;
  border-color: rgba(8, 145, 178, 0.35) !important;
  color: var(--tool-cyan-hover) !important;
}

/* Responsive Action Row */
.action-row {
  display: flex;
  gap: 12px;
}

@media (max-width: 768px) {
  .action-row {
    flex-direction: column;
  }
}

/* ── HISTORY TABLE ── */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

body.light .table-responsive {
  border-color: rgba(0, 0, 0, 0.06);
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.history-table th {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.01);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-3);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  white-space: nowrap;
}

.history-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-2);
  vertical-align: middle;
}

.history-table tbody tr:last-child td {
  border-bottom: none;
}

.history-table tr:hover td {
  background: rgba(255, 255, 255, 0.015);
}

.history-table td strong {
  color: var(--text);
}

body.light .history-table th {
  border-bottom-color: rgba(0, 0, 0, 0.08);
  color: #64748b;
  background: rgba(0, 0, 0, 0.01);
}

body.light .history-table td {
  border-bottom-color: rgba(0, 0, 0, 0.04);
  color: #334155;
}

body.light .history-table tr:hover td {
  background: rgba(0, 0, 0, 0.01);
}

body.light .history-table td strong {
  color: #0f172a;
}

.delete-entry-btn {
  background: transparent !important;
  border: none !important;
  color: #ef4444 !important;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 6px;
  transition: background 0.2s;
}

.delete-entry-btn:hover {
  background: rgba(239, 68, 68, 0.1) !important;
}

/* ── Panel Title UI Standard Overrides ── */
.panel-title {
  font-family: 'Outfit', sans-serif !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 1.5px !important;
  text-transform: uppercase !important;
  color: rgba(255, 255, 255, 0.4) !important;
  margin-bottom: 20px !important;
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  width: 100% !important;
}

body.light .panel-title {
  color: #64748b !important;
}
