/* IronTrack — graphite / volt. Shared components across all views. */
:root {
  --bg: #10120f;
  --panel: #1b1e19;
  --panel2: #252922;
  --line: #343a30;
  --text: #f3f5ed;
  --muted: #a5ad9d;
  --accent: #d2f85a;
  --red: var(--accent);
  --radius: 24px;
}
body { background: radial-gradient(ellipse at 80% 0, #242d192e, transparent 45%), var(--bg); }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline-color: var(--accent); }
button:active:not(:disabled) { transform: scale(.97); }
.shell { padding-left: 264px; padding-right: 40px; }
.topbar { background: transparent; border-bottom-color: #ffffff0c; margin-bottom: 28px; z-index: 45; }
.brand { letter-spacing: -.06em; font-size: 25px; left: 30px; }
.brand b { color: var(--accent); }
.context-label { font-size: 12px; letter-spacing: .025em; }
.bottom-nav { width: 224px; background: #151812; border-color: #ffffff09; padding: 112px 18px 24px; }
.bottom-nav button { border-radius: 16px; color: #a5ad9d; gap: 12px; }
.bottom-nav button:hover { background: #ffffff07; }
.bottom-nav button.active { background: var(--accent); color: #20280e; box-shadow: none; }
.bottom-nav button small { font-size: 14px; }
.bottom-nav svg { display: block; width: 23px; height: 23px; }
.bottom-nav:after { content: "BUILT FOR PROGRESS"; font-size: 9px; color: #858f78; letter-spacing: .16em; }
.athlete-select { border-radius: 30px; background: #20251b; border-color: #ffffff10; padding-right: 16px; }
.icon-button { border-radius: 50%; }
.ai-button { background: #d2c5f2; border: 0; color: #302143; }
.page-head h1 { font-size: clamp(28px, 3.3vw, 44px); font-weight: 650; letter-spacing: -.055em; margin: 9px 0; }
.page-head .muted { font-size: 14px; }
.greeting-dot { color: var(--accent); }
.eyebrow { font-size: 10px; letter-spacing: .15em; color: var(--muted); }
.date-chip { border: 1px solid var(--line); border-radius: 30px; padding: 10px 15px; font-size: 12px; color: #c4cbbd; white-space: nowrap; }
.card { background: var(--panel); border: 1px solid #ffffff08; border-radius: var(--radius); padding: 24px; }
.card-title h2 { font-size: 18px; font-weight: 600; letter-spacing: -.035em; }
.card-title .eyebrow { margin-bottom: 8px; }
.btn { border-radius: 30px; font-size: 13px; background: #292e24; border-color: #ffffff0d; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #20280e; font-weight: 750; }
.btn.primary:hover { background: #e1ff86; }
.btn.ghost { background: transparent; }
.btn.danger { color: #ffabaa; border-color: #694343; }
.input, select.input, textarea.input { border-radius: 14px; background: #131710; border-color: #39412f; }
.tabs-inline button.active { background: var(--accent); border-color: var(--accent); color: #20280e; }
.dashboard-lead { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; margin-bottom: 20px; }
.training-hero { position: relative; isolation: isolate; overflow: hidden; min-height: 320px; padding: 30px; background: radial-gradient(ellipse at 95% 15%, #9fbd5860, transparent 60%), linear-gradient(120deg, #262f1b, #3a4627); border-color: #768e4133; }
.hero-content { position: relative; z-index: 2; max-width: 80%; }
.hero-label { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #d8e1ca; }
.live-dot { width: 6px; height: 6px; border-radius: 100%; background: var(--accent); box-shadow: 0 0 0 4px #d2f85a14; }
.training-hero h2 { font-size: clamp(34px, 4vw, 56px); font-weight: 700; line-height: 1.02; letter-spacing: -.055em; margin: 22px 0 14px; }
.training-hero p { font-size: 13px; color: #c1cbb5; line-height: 1.6; margin: 0 0 24px; max-width: 290px; }
.training-hero .btn { padding: 13px 20px; display: inline-flex; gap: 22px; align-items: center; }
.training-hero .timer { font-size: 24px; font-variant-numeric: tabular-nums; margin: -8px 0 14px; color: var(--accent); }
.hero-word { position: absolute; bottom: -15px; right: -5px; font-size: clamp(55px, 6vw, 95px); font-weight: 900; letter-spacing: -.065em; color: #e7f5c809; z-index: -1; }
.hero-art { position: absolute; width: 250px; height: 250px; right: -42px; top: 62px; transform: rotate(-32deg); opacity: .8; z-index: -1; }
.weight { position: absolute; width: 77px; height: 170px; border-radius: 35%; background: linear-gradient(90deg, #0c100a, #3a4231 45%, #141b0d 70%, #53603d); border: 2px solid #73875155; box-shadow: 15px 18px 25px #0b110a88, inset 8px 0 8px #acbe6033; z-index: 1; }
.weight-one { top: 36px; left: 10px; }
.weight-two { top: 36px; right: 10px; }
.weight-bar { position: absolute; height: 28px; top: 104px; left: 30px; right: 25px; background: linear-gradient(#616c4c, #bdc6a3 30%, #343b29 70%, #141a0f); border-radius: 10px; }
.week-card { display: flex; flex-direction: column; }
.week-total { display: flex; align-items: center; gap: 14px; }
.week-total strong { font-size: 58px; letter-spacing: -.07em; font-weight: 600; line-height: 1.2; }
.week-total span { font-size: 12px; color: var(--muted); line-height: 1.5; }
.week-chart { height: 122px; display: flex; gap: 12px; margin: 16px 0 12px; }
.week-column { flex: 1; min-width: 0; text-align: center; font-size: 10px; color: var(--muted); }
.week-track { height: 100px; display: flex; align-items: end; border-bottom: 1px solid #ffffff0d; margin-bottom: 10px; }
.week-bar { width: 100%; background: #78895a; border-radius: 7px 7px 3px 3px; min-height: 3px; }
.week-column.current .week-bar { background: var(--accent); }
.week-column.current { color: var(--accent); }
.week-caption { margin-top: auto; color: var(--muted); font-size: 11px; padding-top: 12px; }
.grid.metrics { gap: 14px; }
.metric { min-height: 118px; gap: 12px; padding: 20px; }
.metric:first-child { border: 1px solid #ffffff08; }
.metric span { display: flex; align-items: center; justify-content: space-between; font-size: 12px; width: 100%; }
.metric i { font-style: normal; font-size: 19px; color: var(--accent); }
.metric strong { font-size: 36px; font-weight: 500; }
.metric:nth-child(2) { background: #d2c5f2; color: #302641; }
.metric:nth-child(2) span, .metric:nth-child(2) i { color: #514563; }
.metric:nth-child(3) i { color: #d2c5f2; }
.cal-day { border-radius: 14px; }
.cal-day:hover { background: #343d29; }
.cal-day.today { background: var(--accent); color: #20280e; font-weight: 750; }
.cal-day.has { border-color: #56663a; }
.cal-day.has:after { background: var(--accent); }
.cal-day.today.has:after { background: #20280e; }
.history-card { text-align: left; border-radius: 0; }
.history-card:hover { background: #ffffff04; }
.history-card .list-main { flex: 1; }
.history-card .sub { font-size: 11px; }
.session-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px; background: #2e3723; color: var(--accent); flex-shrink: 0; }
.history-card .badge { font-size: 10px; white-space: nowrap; }
.recommend, .rest-control output { color: #d2c5f2; }
.badge.red { color: var(--accent); background: #29321e; border-color: #4b6030; }
.active-workout { background: #252e1d; border-color: #4b6030; }
.ai-message.user { background: #394629; }
.sticky-save { background: #252c20ed; backdrop-filter: blur(16px); border-color: #556445; border-radius: 22px; }
.chart .gridline { stroke: #333b2b; }
.workout-exercise { border-radius: 24px; }
.workout-coach { margin-top: 20px; padding: 18px; border: 1px solid #b8a4de30; border-radius: 18px; background: linear-gradient(125deg, #b8a4de0c, #d2f85a06); }
.coach-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; font-weight: 650; }
.coach-spark { color: #d2c5f2; margin-right: 5px; }
.coach-heading .btn { color: #e0d4f8; border-color: #b8a4de40; background: #b8a4de10; }
.coach-values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.coach-values > div { padding: 12px; background: #13171070; border-radius: 12px; }
.coach-values strong { display: block; color: var(--accent); font-size: 26px; font-weight: 600; letter-spacing: -.04em; }
.coach-values small { font-size: 12px; font-weight: 400; letter-spacing: 0; }
.coach-values span { display: block; color: var(--muted); font-size: 11px; margin-top: 5px; }
.coach-reason { font-size: 13px; line-height: 1.6; margin: 14px 0 6px; }
.coach-footnote { font-size: 11px; line-height: 1.5; color: var(--muted); margin: 12px 0 0; }
.coach-stale { color: #d2c5f2; font-size: 12px; line-height: 1.5; margin-bottom: 0; }
.coach-error { color: #ffabaa; font-size: 13px; line-height: 1.5; }
@media (min-width: 1550px) { .shell { padding-left: 284px; padding-right: 64px; } }
@media (max-width: 1100px) {
  .shell { padding-left: 244px; padding-right: 20px; }
  .dashboard-lead { grid-template-columns: 1.2fr 1fr; gap: 14px; }
  .training-hero { padding: 24px; }
  .hero-art { right: -100px; opacity: .5; }
  .grid.metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .metric { padding: 16px; }
  .metric span { font-size: 11px; }
}
@media (max-width: 760px) {
  .shell { padding: 0 18px calc(120px + env(safe-area-inset-bottom)); }
  .topbar { height: 80px; margin-bottom: 16px; }
  .brand { font-size: 22px; }
  .athlete-select { font-size: 13px; width: 135px; }
  .page-head { margin-bottom: 24px; }
  .page-head h1 { font-size: 32px; }
  .date-chip { border: 0; padding: 0; font-size: 11px; }
  .dashboard-lead { grid-template-columns: 1fr; gap: 14px; margin-bottom: 14px; }
  .training-hero { min-height: 300px; padding: 26px; }
  .training-hero h2 { font-size: 46px; }
  .hero-art { right: -35px; opacity: .7; top: 52px; }
  .hero-content { max-width: 90%; }
  .hero-word { font-size: 66px; }
  .week-card { display: grid; grid-template-columns: 100px minmax(0, 1fr); column-gap: 16px; padding: 20px; }
  .week-card .card-title { grid-column: 1/-1; margin-bottom: 8px; }
  .week-total { flex-direction: column; align-items: start; gap: 0; justify-content: center; }
  .week-total strong { font-size: 48px; }
  .week-chart { margin: 0; height: 108px; gap: 9px; }
  .week-track { height: 82px; }
  .week-caption { grid-column: 1/-1; padding-top: 20px; }
  .grid.metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .metric { min-height: 106px; padding: 18px; }
  .metric strong { font-size: 34px; }
  .metric span { font-size: 12px; }
  .card { border-radius: 22px; }
  .bottom-nav { inset: auto 10px calc(10px + env(safe-area-inset-bottom)); width: auto; padding: 6px 3px; gap: 0; border: 1px solid #ffffff13; border-radius: 25px; background: #20251bf0; backdrop-filter: blur(22px); box-shadow: 0 8px 32px #0006; }
  .bottom-nav button { border-radius: 20px; padding: 10px 0; gap: 5px; min-height: 59px; }
  .bottom-nav button.active { color: var(--accent); background: #d2f85a12; }
  .bottom-nav button small { font-size: 9px; }
  .bottom-nav svg { width: 21px; height: 21px; }
  .bottom-nav button span { width: 21px; }
  .bottom-nav:has([data-view="library"][hidden]) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .history-card { flex-wrap: nowrap; gap: 10px; }
  .cal-day { min-height: 42px; }
  .sticky-save { bottom: calc(92px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: no-preference) {
  .dashboard-lead, .grid.metrics { animation: arrive .35s ease-out both; }
  .grid.metrics { animation-delay: .06s; }
  @keyframes arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
}
