/* ============================================================================
 * skin.css — ARETE dashboard redesign (dark-only HUD).
 * Loaded AFTER the legacy inline <style>, so these rules win and reshape the
 * program to match the activation screen: deep space, restrained cyan palette,
 * glowing hairline frames, generous space. Light mode is neutralized here.
 * ========================================================================== */

/* ---- palette: one cyan family (+ green/amber/red kept only for real scores) ----
 * Applied to BOTH :root and the old light theme so light mode can never show. */
:root,
[data-theme="light"] {
  --bg: #03101e;
  --accent: #27d3ff;
  --accent-dim: rgba(39, 211, 255, 0.55);
  --text: #bfe6f5;
  --text-dim: rgba(191, 230, 245, 0.85);
  --text-faint: rgba(191, 230, 245, 0.48);
  --border: rgba(39, 211, 255, 0.16);
  --border2: rgba(39, 211, 255, 0.09);
  --corner: rgba(39, 211, 255, 0.5);
  --grid: rgba(39, 211, 255, 0.035);
  --logo-glow: 0 0 22px rgba(39, 211, 255, 0.75), 0 0 50px rgba(39, 211, 255, 0.3);
}

/* deep-space background everywhere (kills the old light background too) */
body,
[data-theme="light"] body {
  background: radial-gradient(circle at 50% 22%, #08192c 0%, #03101e 52%, #01070f 100%) fixed !important;
  color: var(--text) !important;
}
body::before { opacity: 0.55; }                 /* calmer grid */
.scanline { opacity: 0.5; }

.wrap { padding: 18px 16px 60px !important; }

/* ---- header: minimal, glowing, no boxy frame ---- */
.header {
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid var(--border) !important;
  padding: 16px 6px 24px !important;
  margin-bottom: 24px !important;
}
.header .hdr-corner { display: none !important; }
.logo-mark { letter-spacing: 14px !important; }
.vitality-num { text-shadow: 0 0 34px rgba(39, 211, 255, 0.35); }

/* ---- tabs: underline style, no boxes ---- */
.tabs {
  gap: 4px !important;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px !important;
}
.tab {
  border: none !important;
  background: transparent !important;
  padding: 11px 20px !important;
  opacity: 0.55;
  transition: opacity 0.2s, color 0.2s;
}
.tab:hover { opacity: 0.85; }
.tab.active {
  opacity: 1;
  background: transparent !important;
  border-bottom: 2px solid var(--accent) !important;
  color: var(--accent) !important;
  text-shadow: 0 0 12px var(--accent-dim) !important;
}

/* ---- panels: floating glowing HUD frames ---- */
.panel {
  background: rgba(8, 22, 40, 0.42) !important;
  border: 1px solid var(--border) !important;
  border-radius: 16px !important;
  padding: 24px !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), inset 0 0 60px rgba(0, 140, 210, 0.045) !important;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.panel::before, .panel::after { display: none !important; }   /* drop corner ticks */
.panel-title {
  color: var(--accent) !important;
  text-shadow: 0 0 10px var(--accent-dim);
  letter-spacing: 3px !important;
}

/* ---- score cards: unify to cyan, soften ---- */
.score-card {
  background: rgba(8, 22, 40, 0.4) !important;
  border: 1px solid var(--border2) !important;
  border-radius: 12px !important;
}
.score-card:hover { border-color: var(--accent-dim) !important; }
.sc-stripe {
  background: var(--accent) !important;
  box-shadow: 0 0 10px var(--accent-dim) !important;
  opacity: 0.65 !important;
}
.sc-bar-fill {
  background: linear-gradient(90deg, #1a93c8, var(--accent)) !important;
  box-shadow: 0 0 8px var(--accent-dim);
}
.sc-score { color: var(--accent) !important; text-shadow: 0 0 12px var(--accent-dim); }
.sc-icon { color: var(--accent-dim); }

/* ---- the legend rainbow dots -> single cyan ---- */
.weight-legend {
  background: rgba(8, 22, 40, 0.4) !important;
  border: 1px solid var(--border2) !important;
  border-radius: 10px;
}
.weight-legend .wl-dot { background: var(--accent) !important; opacity: 0.7; box-shadow: 0 0 6px var(--accent-dim); }

/* ---- Vitality Orb hero (the centerpiece) ---- */
.header .hdr-right { padding-right: 0 !important; }
.vitality-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: min(82vw, 340px);
  max-width: 360px;
  margin: 4px auto 30px;
}
.vital-orb { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.vh-center { position: relative; z-index: 2; text-align: center; }
.vitality-hero .vitality-lbl { font-size: 10px; letter-spacing: 5px; color: var(--accent-dim); text-transform: uppercase; margin-bottom: 4px; }
.vitality-hero .vitality-num { font-size: clamp(56px, 17vw, 88px); line-height: 1; letter-spacing: -2px; }
.vitality-hero .vitality-sub { font-size: 10px; letter-spacing: 3px; margin-top: 8px; }

/* ---- header logo as the Greek wordmark (lowercase, not uppercased) ---- */
.logo-mark { text-transform: none !important; letter-spacing: 6px !important; }

/* ---- wider canvas; declutter; unify remaining accent colors ---- */
.wrap { max-width: 1500px !important; }
.sc-weight { display: none !important; }
.gp-value { color: var(--accent) !important; text-shadow: 0 0 12px var(--accent-dim); }

/* ---- 3-column command-center report (fills the width) ---- */
.report-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr 1fr;
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}
.report-orb { display: flex; align-items: flex-start; justify-content: center; padding-top: 4px; }
.report-side { display: flex; flex-direction: column; gap: 18px; }
.report-side .gp-strip { display: flex; flex-direction: column; gap: 12px; }
.report-stash { display: none !important; }

/* body-composition cards reflow to fit any column width (no overflow) */
.bodycomp-strip { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)) !important; gap: 10px !important; }

@media (max-width: 920px) {
  .report-grid { grid-template-columns: 1fr; }
  .report-orb { order: -1; }            /* orb leads on mobile */
  /* header must never clip on a phone: let the status info wrap below */
  .header { flex-wrap: wrap; padding: 14px 4px 18px !important; }
  .header .hdr-right { width: 100%; text-align: left !important; padding-top: 6px; }
  .header .live-row { justify-content: flex-start !important; }
  /* tab bar scrolls within itself instead of stretching the page width */
  .tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: 0 0 auto; white-space: nowrap; padding: 11px 14px !important; }
}

/* ════ NEW command readout (orb · directive · gauges · ribbon) ════ */
.cmd { max-width: 880px; margin: 6px auto 0; display: flex; flex-direction: column; align-items: center; gap: 26px; }

.cmd-orb { position: relative; display: flex; align-items: center; justify-content: center; height: min(78vw, 330px); width: 100%; }
.cmd-orb .vital-orb { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.cmd-orb .vh-center { position: relative; z-index: 2; text-align: center; }
.cmd-orb .vitality-lbl { font-size: 10px; letter-spacing: 5px; color: var(--accent-dim); text-transform: uppercase; margin-bottom: 4px; }
.cmd-orb .vitality-num { font-size: clamp(52px, 15vw, 84px); line-height: 1; letter-spacing: -2px; }
.cmd-orb .vitality-sub { font-size: 10px; letter-spacing: 3px; margin-top: 8px; }

.cmd-directive { width: 100%; max-width: 700px; text-align: center; font-size: clamp(12px, 2.5vw, 15px); letter-spacing: 0.5px; line-height: 1.7; color: var(--text-dim); padding: 14px 20px; border: 1px solid var(--border); border-radius: 12px; background: rgba(8, 22, 40, 0.4); box-shadow: 0 0 30px rgba(0, 140, 210, 0.05); }
.cmd-directive b { color: #eaffff; font-weight: 700; }
.dir-mark { color: var(--accent); text-shadow: 0 0 10px var(--accent-dim); margin-right: 4px; }
.dir-sep { color: var(--accent-dim); margin: 0 8px; }

.cmd-gauges { display: grid; grid-template-columns: repeat(5, 1fr); justify-items: center; align-items: start; gap: clamp(6px, 2vw, 22px); width: 100%; }
.gauge { display: flex; flex-direction: column; align-items: center; gap: 9px; }
.gauge-ring { position: relative; width: clamp(66px, 18vw, 88px); height: clamp(66px, 18vw, 88px); }
.gauge-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.g-track { fill: none; stroke: rgba(39, 211, 255, 0.12); stroke-width: 5; }
.g-arc { fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round; filter: drop-shadow(0 0 5px rgba(39, 211, 255, 0.5)); }
.g-val { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: clamp(18px, 5vw, 25px); font-weight: 700; color: #eaffff; }
.g-lbl { font-size: 9px; letter-spacing: 2px; color: var(--text-faint); text-transform: uppercase; }

.cmd-ribbon { display: flex; justify-content: center; flex-wrap: wrap; width: 100%; max-width: 760px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.rib-item { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 13px clamp(12px, 3vw, 26px); border-right: 1px solid var(--border2); }
.rib-item:last-child { border-right: none; }
.rib-l { font-size: 8px; letter-spacing: 2px; color: var(--text-faint); text-transform: uppercase; }
.rib-v { font-size: clamp(14px, 3.5vw, 18px); color: var(--accent); font-weight: 700; }

/* keep everything inside the viewport on phones */
.cmd, .cmd-directive, .cmd-gauges, .cmd-ribbon { max-width: 100%; }
.cmd-directive { overflow-wrap: anywhere; }
@media (max-width: 440px) {
  .cmd-gauges { gap: 9px; }
  .gauge-ring { width: 60px; height: 60px; }
  .g-val { font-size: 18px; }
  .rib-item { padding: 12px 10px; }
}

/* ════ richer HUD: framed flanking panels + corner brackets + chart ════ */
.cmd-stage { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 18px; align-items: start; margin-bottom: 18px; width: 100%; }

.hud-frame { position: relative; background: rgba(8, 22, 40, 0.42); border: 1px solid var(--border); border-radius: 4px; padding: 18px 20px; box-shadow: 0 0 30px rgba(0, 140, 210, 0.05), inset 0 0 40px rgba(0, 140, 210, 0.03); }
.hud-frame::before, .hud-frame::after { content: ''; position: absolute; width: 15px; height: 15px; border: 2px solid var(--accent); opacity: 0.85; }
.hud-frame::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.hud-frame::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.hud-title { font-size: 9px; letter-spacing: 3px; color: var(--accent-dim); text-transform: uppercase; margin-bottom: 14px; }
.hud-title-sub { margin-top: 20px; }

/* vitals list */
.cmd-stats { display: flex; flex-direction: column; }
.stat-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border2); }
.stat-row:last-child { border-bottom: none; }
.stat-l { font-size: 9px; letter-spacing: 2px; color: var(--text-faint); text-transform: uppercase; }
.stat-v { font-size: 14px; font-weight: 700; color: var(--accent); }

/* 7-day vitality bar chart */
.cmd-spark { display: flex; align-items: flex-end; gap: 6px; height: 92px; }
.spark-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; }
.spark-wrap { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.spark-bar { width: 100%; max-width: 16px; background: linear-gradient(180deg, var(--accent), #1a93c8); border-radius: 2px 2px 0 0; box-shadow: 0 0 6px var(--accent-dim); opacity: 0.5; }
.spark-bar.recent { opacity: 1; }
.spark-lbl { font-size: 7px; letter-spacing: 1px; color: var(--text-faint); }

/* Vitality number — refined palette (no yellow) */
.vitality-num.good { color: #2fe6b0 !important; text-shadow: 0 0 30px rgba(47, 230, 176, 0.5) !important; }
.vitality-num.ok   { color: #27d3ff !important; text-shadow: 0 0 30px rgba(39, 211, 255, 0.55) !important; }
.vitality-num.low  { color: #ffb454 !important; text-shadow: 0 0 30px rgba(255, 180, 84, 0.45) !important; }
.vitality-num.bad  { color: #ff5d73 !important; text-shadow: 0 0 30px rgba(255, 93, 115, 0.45) !important; }

@media (max-width: 920px) {
  .cmd-stage { grid-template-columns: 1fr; }
  .cmd-stage .cmd-orb { order: -1; }
}

/* ---- generic cards/strips that use these tokens come along for free ---- */
