/* tensilegrip — mismo diseño que el boceto (canvas NqneSVgcSyyehzKLr2YF8R). */
:root {
  --bg: #F4F5F7; --card: #FFFFFF; --ink: #14171C; --ink-2: #374151; --muted: #4B5563; --muted-2: #5B6470;
  --line: #E2E5EA; --line-2: #EEF0F3; --soft: #F6F7F9; --soft-2: #F1F2F5; --blue: #1D4ED8;
  --run-fg: #1D4ED8; --run-bg: #EAF1FE; --run-dot: #2563EB;
  --ocr-fg: #15803D; --ocr-bg: #E8F6EC; --ocr-dot: #16A34A;
  --gym-fg: #C2410C; --gym-bg: #FFF1E7; --gym-dot: #EA580C;
  --hiit-fg: #7E22CE; --hiit-bg: #F4ECFD; --hiit-dot: #9333EA;
  --mob-fg: #46606F; --mob-bg: #ECF1F4; --mob-dot: #64808F;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: Actor, system-ui, sans-serif;
       font-size: 14px; line-height: 1.45; }
a { color: var(--blue); }
a:hover { color: #1E3A8A; }
button { font: inherit; color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
h1, h2, h3 { font-family: Actor, system-ui, sans-serif; }
.wrap { max-width: 1360px; margin: 0 auto; padding: 12px 16px; }

/* barra superior */
.top { background: var(--card); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.brand { font-weight: 700; font-size: 20px; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; flex: 1 1 auto; }
.nav a, .nav span { padding: 10px 12px; border-radius: 8px; color: var(--muted); text-decoration: none; }
.nav a.on { background: #EEF0F3; color: var(--ink); font-weight: 600; }
.nav span { color: #9AA3AE; cursor: default; }
.me { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; display: inline-flex;
          align-items: center; justify-content: center; font-weight: 600; }
.linkbtn { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 8px; text-decoration: underline; }

main { max-width: 1360px; margin: 0 auto; padding: 24px 16px 48px; display: flex; flex-direction: column; gap: 24px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px;
        display: flex; flex-direction: column; gap: 14px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2); }
h3.eyebrow { margin: 8px 0 0; }
.muted { color: var(--muted-2); }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 8px;
        border-radius: 999px; white-space: nowrap; }

/* macrociclo */
.macro-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.macro-head > div { flex: 1 1 320px; min-width: 0; }
.macro-head h1 { margin: 2px 0 0; font-size: 30px; line-height: 1.15; letter-spacing: -0.01em; }
.arrow { width: 44px; height: 44px; border-radius: 10px; border: 1px solid #D5DAE1; background: var(--card);
         display: inline-flex; align-items: center; justify-content: center; color: var(--ink); }
.arrow.off { opacity: 0.4; cursor: not-allowed; }
.races { display: flex; flex-wrap: wrap; gap: 8px; }
.race { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
        background: var(--card); border: 1px solid var(--line); font-size: 13px; }
.prio-A { color: #fff; background: var(--ink); }
.prio-B, .prio-C { color: var(--ink); background: var(--line); }
.result { color: #15803D; font-weight: 500; }

.layout { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.layout > .main-col { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.layout > aside { flex: 1 1 340px; min-width: 0; }

/* pestañas */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px; background: var(--soft-2); border-radius: 10px;
        align-self: flex-start; max-width: 100%; }
.tabs a { min-height: 36px; padding: 8px 14px; border-radius: 8px; color: var(--muted); text-decoration: none;
          display: inline-flex; align-items: center; gap: 6px; }
.tabs a.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(20,23,28,0.12); }
.tabs .now { font-size: 11px; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: 0.04em; }
.title-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.title-row h2 { margin: 0; font-size: 22px; }
.focus { margin: 0; color: var(--ink-2); max-width: 72ch; }

/* tarjetas de meso y micro */
.grid-meso { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.grid-micro { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.pick { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 12px; min-height: 44px;
        background: var(--card); border: 1px solid #DDE1E6; margin: 1px; color: var(--ink); text-decoration: none; }
.pick:hover { color: var(--ink); border-color: #B8BEC7; }
.pick.cur { background: #FAFBFC; }
.pick.on { border: 2px solid var(--ink); margin: 0; background: var(--card); }
.pick .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pick .k { font-size: 12px; font-weight: 600; color: var(--muted-2); }
.pick .name { font-weight: 600; font-size: 15px; line-height: 1.3; }
.grid-micro .pick .name { font-size: 14px; }
.pick .range { color: var(--muted-2); font-size: 13px; }
.badge-now { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #E8F0FE; color: var(--blue); }
.mt-load { color: #C2410C; background: #FFF1E7; } .mt-deload { color: #46606F; background: #ECF1F4; }
.mt-test { color: #7E22CE; background: #F4ECFD; } .mt-taper { color: #1D4ED8; background: #EAF1FE; }
.mt-race { color: #FFFFFF; background: var(--ink); } .mt-recovery { color: #15803D; background: #E8F6EC; }

/* semana */
.week-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.week-head .summary { color: var(--ink-2); font-size: 13px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 3px; }
.empty { border: 1px dashed #C9CED6; border-radius: 12px; padding: 28px 16px; text-align: center; color: var(--muted-2); }
.week-scroll { overflow-x: auto; margin: 0 -4px; padding: 0 4px 4px; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; min-width: 880px; }
.day { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 12px; min-height: 180px;
       background: #FAFBFC; border: 1px solid #E8EBEF; margin: 1px; }
.day.today { background: var(--card); border: 2px solid var(--blue); margin: 0; }
.day-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.day-head .dow { font-size: 12px; font-weight: 700; letter-spacing: 0.05em; color: var(--muted); }
.day-head .num { font-weight: 600; font-size: 15px; }
.day.today .num { font-weight: 700; font-size: 13px; color: #fff; background: var(--blue); border-radius: 999px; padding: 1px 8px; }
.race-day { padding: 8px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 12px; line-height: 1.35; }
.race-day b { letter-spacing: 0.04em; }
.rest { padding: 10px 8px; border-radius: 8px; background: var(--soft); color: var(--muted-2); font-size: 13px; text-align: center; }
.chip { display: flex; flex-direction: column; gap: 4px; padding: 8px; border-radius: 8px; }
.chip.missed { opacity: 0.75; }
.chip .row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.chip .t { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.chip .title { font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; hyphens: auto; }
.chip .meta { font-size: 12px; color: var(--muted); }
.st { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 20px; height: 20px;
      border-radius: 50%; background: #fff; }
.st.done { color: #15803D; } .st.missed { color: #B91C1C; } .st.pending { color: var(--muted); }
.ty-RUN { background: var(--run-bg); } .ty-RUN .t { color: var(--run-fg); } .dot-RUN { background: var(--run-dot); }
.ty-OCR { background: var(--ocr-bg); } .ty-OCR .t { color: var(--ocr-fg); } .dot-OCR { background: var(--ocr-dot); }
.ty-GYM { background: var(--gym-bg); } .ty-GYM .t { color: var(--gym-fg); } .dot-GYM { background: var(--gym-dot); }
.ty-HIIT { background: var(--hiit-bg); } .ty-HIIT .t { color: var(--hiit-fg); } .dot-HIIT { background: var(--hiit-dot); }
.ty-MOBILITY { background: var(--mob-bg); } .ty-MOBILITY .t { color: var(--mob-fg); } .dot-MOBILITY { background: var(--mob-dot); }

/* objetivos */
.goals-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.goals-head h2 { margin: 0; font-size: 22px; }
.goals-head .tabs a { min-width: 56px; justify-content: center; font-weight: 600; padding: 6px 12px; }
.scope { font-size: 13px; color: var(--muted); }
.overall { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px;
           border-radius: 10px; background: var(--soft); font-weight: 600; }
.s-ahead { color: #15803D; background: #E8F6EC; } .s-line { color: #1D4ED8; background: #EAF1FE; }
.s-behind { color: #B45309; background: #FEF3C7; } .s-future { color: var(--muted); background: #EEF0F3; }
.goal { display: flex; flex-direction: column; gap: 6px; padding-bottom: 10px; border-bottom: 1px solid var(--line-2); }
.goal .row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.goal .vals { font-size: 13px; color: var(--ink-2); }
.goal .vals strong { color: var(--ink); }
.goal .pct { font-variant-numeric: tabular-nums; color: var(--muted); }
.bar { position: relative; height: 6px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.bar .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; }
.bar .exp { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--ink); }
.fill.ahead { background: #16A34A; } .fill.line { background: #2563EB; } .fill.behind { background: #D97706; } .fill.future { background: #9AA3AE; }
.note { margin: 0; font-size: 12px; color: var(--muted-2); }

/* login */
.login { max-width: 420px; margin: 10vh auto 0; padding: 0 16px; }
.login .card { gap: 16px; }
.login h1 { margin: 0; font-size: 26px; }
.login label { font-weight: 600; }
.login input[type=email] { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #D5DAE1;
                           border-radius: 10px; font: inherit; }
.btn { min-height: 44px; padding: 10px 18px; border: 0; border-radius: 10px; background: var(--ink); color: #fff;
       font-weight: 700; cursor: pointer; }
.error { margin: 0; padding: 10px 12px; border-radius: 10px; background: #FDECEC; color: #B91C1C; }
