@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --bg:#0b0c10;--surf:#13141a;--surf2:#1c1d26;--surf3:#22232e;
  --border:#2a2b38;--accent:#e8f400;--blue:#00c8ff;--red:#ff4422;
  --orange:#ff8c00;--purple:#b06eff;--green:#00e676;
  --text:#eeeef2;--fg:#eeeef2;--muted:#6b6b82;--input-bg:#1c1d26;
}

*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent;}
html{scroll-behavior:smooth;}
body{
  background:var(--bg);color:var(--text);
  font-family:'Outfit',sans-serif;font-size:15px;
  min-height:100vh;overflow-x:hidden;
  padding-bottom:80px;
}

/* ── SPLASH ── */
.splash-screen{position:fixed;inset:0;z-index:999;background:var(--bg);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.8rem;transition:opacity .35s ease;}
.splash-screen.fade-out{opacity:0;pointer-events:none;}
.splash-shuttle{width:72px;height:72px;color:var(--accent);filter:drop-shadow(0 0 14px var(--accent));animation:splashPulse 1.4s ease-in-out infinite;}
.splash-logo{font-family:'Bebas Neue',sans-serif;font-size:2rem;letter-spacing:.05em;color:var(--text);}
.splash-logo em{color:var(--accent);font-style:normal;}
.splash-spinner{width:18px;height:18px;border:2px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:spin .7s linear infinite;margin-top:.4rem;}
@keyframes splashPulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.65;transform:scale(.92)}}

/* ── AUTH SCREEN ── */
.auth-screen{
  min-height:100vh;display:flex;flex-direction:column;
  align-items:center;justify-content:center;padding:2rem 1.4rem;
}
.auth-logo{
  font-family:'Bebas Neue',sans-serif;font-size:3rem;
  letter-spacing:.04em;margin-bottom:.3rem;
  display:flex;flex-direction:column;align-items:center;gap:.5rem;
}
.auth-logo em{color:var(--accent);font-style:normal;}
.auth-shuttle{
  width:68px;height:auto;
  color:var(--accent);
  filter:drop-shadow(0 0 10px rgba(232,244,0,.4));
}
.auth-sub{font-size:.75rem;color:var(--muted);margin-bottom:2.5rem;text-align:center;}
.auth-card{
  width:100%;max-width:360px;background:var(--surf);
  border:1px solid var(--border);border-radius:16px;padding:1.6rem;
}
.auth-err{
  background:rgba(255,68,34,.08);border:1px solid rgba(255,68,34,.2);
  border-radius:8px;padding:.6rem .8rem;font-size:.72rem;color:#ffb3a3;
  margin-bottom:.8rem;display:none;
}
.auth-err.show{display:block;}
/* Auth tabs */
.auth-tabs{display:flex;gap:3px;background:var(--bg);border-radius:10px;padding:3px;margin-bottom:1.2rem;}
.auth-tab{flex:1;padding:.48rem;text-align:center;font-size:.8rem;font-weight:600;border-radius:8px;cursor:pointer;color:var(--muted);transition:all .2s;}
.auth-tab.active{background:var(--card);color:var(--text);}
.field-req{color:var(--accent);font-size:.75em;}
.auth-legal{font-size:.62rem;color:var(--muted);text-align:center;margin-top:.8rem;line-height:1.5;}

/* ── LUMBAR WARNING ── */
.lumbar-warning{
  background:rgba(255,140,0,.1);border:1px solid rgba(255,140,0,.35);
  border-radius:8px;padding:.7rem .9rem;font-size:.72rem;color:#ffb347;
  margin-bottom:.8rem;line-height:1.7;display:none;
}
.lumbar-warning strong{color:#ffd580;}
.lumbar-warning svg{width:14px;height:14px;vertical-align:middle;margin-right:.3rem;}

/* ── HEADER ── */
.header{
  background:var(--surf);border-bottom:1px solid var(--border);
  padding:1.2rem 1.4rem .9rem;
  display:flex;align-items:center;justify-content:space-between;
}
.header-left h1{font-family:'Bebas Neue',sans-serif;font-size:1.8rem;letter-spacing:.04em;line-height:1;display:flex;align-items:center;gap:.4rem;}
.header-left h1 em{color:var(--accent);font-style:normal;}
.header-shuttle{width:20px;height:auto;color:var(--accent);flex-shrink:0;}
.header-date{font-size:.65rem;color:var(--muted);margin-top:.1rem;text-transform:uppercase;letter-spacing:.08em;}
.header-right{display:flex;align-items:center;gap:.7rem;}
.streak{
  display:flex;flex-direction:column;align-items:center;
  background:rgba(232,244,0,.08);border:1px solid rgba(232,244,0,.2);
  border-radius:10px;padding:.4rem .7rem;
}
.streak-n{font-family:'Bebas Neue',sans-serif;font-size:1.5rem;color:var(--accent);line-height:1;}
.streak-l{font-size:.55rem;color:var(--muted);text-transform:uppercase;letter-spacing:.07em;display:flex;align-items:center;gap:.25rem;}
.streak-l svg{width:11px;height:11px;color:var(--accent);}
.logout-btn{width:28px;height:28px;border-radius:6px;background:none;border:none;color:rgba(255,255,255,.22);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:color .2s;}
.logout-btn:hover,.logout-btn:active{color:var(--red);}
.logout-btn svg{width:15px;height:15px;}

/* ── BOTTOM NAV ── */
.nav{
  position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:480px;z-index:200;
  background:var(--surf);border-top:1px solid var(--border);
  display:grid;grid-template-columns:repeat(5,1fr);
  padding-bottom:env(safe-area-inset-bottom);
}
.nav-item{
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  padding:.65rem .4rem;cursor:pointer;user-select:none;
  transition:color .2s;color:var(--muted);
  font-size:.55rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;gap:.3rem;
}
.nav-item.active{color:var(--accent);}
.nav-icon svg{width:21px;height:21px;}

/* ── PAGES ── */
.page{display:none;padding:1.5rem 1.4rem;}
.page.active{display:block;animation:fadeUp .25s ease both;}
@keyframes fadeUp{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}

/* ── SECTION TITLE ── */
.sec{font-family:'Bebas Neue',sans-serif;font-size:1.6rem;letter-spacing:.03em;line-height:1;margin-bottom:.4rem;}
.sec em{color:var(--accent);font-style:normal;}
.sec-sub{font-size:.72rem;color:var(--muted);margin-bottom:1.5rem;line-height:1.5;}

/* ── KPI ROW ── */
.kpis{display:grid;grid-template-columns:repeat(3,1fr);gap:.5rem;margin-bottom:1.5rem;}
.kpi{background:var(--surf);border:1px solid var(--border);border-radius:10px;padding:.85rem .6rem;text-align:center;}
.kpi-v{font-family:'Bebas Neue',sans-serif;font-size:1.8rem;line-height:1;}
.kpi-v.g{color:var(--accent)}.kpi-v.b{color:var(--blue)}.kpi-v.o{color:var(--orange)}.kpi-v.p{color:var(--purple)}
.kpi-l{font-size:.57rem;color:var(--muted);text-transform:uppercase;letter-spacing:.06em;margin-top:.2rem;}

/* ── WEEK STRIP ── */
.week-strip{display:grid;grid-template-columns:repeat(7,1fr);gap:.3rem;margin-bottom:1.5rem;}
.ws-day{background:var(--surf);border:1px solid var(--border);border-radius:8px;padding:.5rem .3rem;text-align:center;}
.ws-label{font-size:.55rem;color:var(--muted);text-transform:uppercase;margin-bottom:.3rem;}
.ws-dot{width:8px;height:8px;border-radius:50%;background:var(--border);margin:0 auto;}
.ws-dot.gym{background:var(--accent);}
.ws-dot.run{background:var(--orange);}
.ws-dot.badm{background:var(--blue);}
.ws-dot.sleep{background:var(--purple);}
.ws-dot.multi{background:conic-gradient(var(--accent) 50%,var(--blue) 50%);}

/* ── SESSION CARDS ── */
.sess-card{background:var(--surf);border:1px solid var(--border);border-radius:12px;margin-bottom:.9rem;overflow:hidden;}
.sess-head{display:flex;align-items:center;gap:.75rem;padding:.85rem 1rem;cursor:pointer;}
.sess-ico{width:34px;height:34px;border-radius:8px;display:flex;align-items:center;justify-content:center;}
.sess-ico svg{width:18px;height:18px;}
.ico-g{background:rgba(232,244,0,.12);color:var(--accent);}
.ico-b{background:rgba(0,200,255,.12);color:var(--blue);}
.ico-r{background:rgba(255,68,34,.12);color:var(--red);}
.ico-o{background:rgba(255,140,0,.12);color:var(--orange);}
.ico-p{background:rgba(176,110,255,.12);color:var(--purple);}
.sess-info{flex:1;min-width:0;}
.sess-title{font-size:.85rem;font-weight:700;}
.sess-sub{font-size:.62rem;color:var(--muted);margin-top:.05rem;}
.sess-rpe{font-family:'Bebas Neue',sans-serif;font-size:1.4rem;line-height:1;flex-shrink:0;}
.sess-body{display:none;padding:.8rem 1rem;border-top:1px solid var(--border);font-size:.72rem;line-height:1.8;color:var(--muted);}
.sess-body.open{display:block;}
.sess-body strong{color:var(--text);}
.sess-ex-row{display:flex;justify-content:space-between;padding:.3rem 0;border-bottom:1px solid var(--border);font-size:.71rem;}
.sess-ex-row:last-child{border-bottom:none;}
/* .del-btn is defined in SESSION ACTIONS block below */

/* ── FORM ── */
.type-btns{display:grid;grid-template-columns:repeat(3,1fr);gap:.5rem;margin-bottom:.8rem;}
.type-btn{
  background:var(--surf);border:1px solid var(--border);
  border-radius:10px;padding:.7rem .4rem;text-align:center;
  cursor:pointer;transition:all .18s;user-select:none;
}
.type-btn.sel-gym{border-color:var(--accent);background:rgba(232,244,0,.08);}
.type-btn.sel-run{border-color:var(--orange);background:rgba(255,140,0,.08);}
.type-btn.sel-badm{border-color:var(--blue);background:rgba(0,200,255,.08);}
.type-btn.sel-sleep{border-color:var(--purple);background:rgba(176,110,255,.08);}
.type-btn-ico{display:flex;align-items:center;justify-content:center;margin-bottom:.2rem;}
.type-btn-ico svg{width:26px;height:26px;}
.type-btn-label{font-size:.6rem;color:var(--muted);font-weight:600;text-transform:uppercase;letter-spacing:.06em;}

.field{margin-bottom:.9rem;}
.field label{display:block;font-size:.65rem;font-weight:700;text-transform:uppercase;letter-spacing:.09em;color:var(--muted);margin-bottom:.35rem;}
.field input,.field select,.field textarea{
  width:100%;background:var(--input-bg);border:1px solid var(--border);
  border-radius:8px;padding:.7rem .9rem;color:var(--text);
  font-family:'Outfit',sans-serif;font-size:.9rem;outline:none;
  transition:border-color .18s;-webkit-appearance:none;appearance:none;
}
.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--accent);}
.field textarea{resize:none;height:70px;}

.slider-val{font-family:'Bebas Neue',sans-serif;font-size:2.5rem;color:var(--accent);text-align:center;line-height:1;margin-bottom:.3rem;}
input[type=range]{width:100%;height:6px;border-radius:100px;background:var(--border);outline:none;-webkit-appearance:none;appearance:none;cursor:pointer;}
input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:22px;height:22px;border-radius:50%;background:var(--accent);cursor:pointer;box-shadow:0 0 0 4px rgba(232,244,0,.2);}
.slider-labels{display:flex;justify-content:space-between;font-size:.58rem;color:var(--muted);margin-top:.4rem;}

/* ── Exercise carousel ── */
.add-ex-btn{width:100%;background:rgba(232,244,0,.06);border:1px dashed rgba(232,244,0,.22);border-radius:10px;padding:.7rem;color:var(--accent);font-size:.78rem;font-weight:600;cursor:pointer;text-align:center;margin-top:.6rem;transition:background .15s;}
.add-ex-btn:active{background:rgba(232,244,0,.1);}

.ex-carousel-nav{display:flex;align-items:center;justify-content:space-between;margin-bottom:.5rem;}
.ex-nav-btn{width:38px;height:38px;border-radius:10px;background:rgba(255,255,255,.06);border:1px solid var(--border);color:var(--text);cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:background .15s,border-color .15s;}
.ex-nav-btn:active{background:rgba(255,255,255,.1);}
.ex-nav-btn svg{width:18px;height:18px;}
.ex-nav-btn:disabled{opacity:.22;cursor:default;}
.ex-nav-count{font-size:.8rem;font-weight:600;color:var(--muted);font-variant-numeric:tabular-nums;}
.ex-progress-bar{height:3px;background:rgba(255,255,255,.09);border-radius:2px;margin-bottom:.9rem;overflow:hidden;}
.ex-progress-fill{height:100%;background:var(--accent);border-radius:2px;transition:width .3s ease;}

.ex-card{background:var(--surf);border:1px solid var(--border);border-radius:14px;padding:1.15rem 1.1rem;animation:fadeIn .15s ease both;}
@keyframes fadeIn{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}
.ex-card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:.6rem;margin-bottom:.9rem;}
.ex-card-meta{flex:1;min-width:0;}
.ex-category-chip{display:inline-block;font-size:.6rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;padding:.2rem .55rem;border-radius:5px;margin-bottom:.35rem;}
.chip-calentamiento{background:rgba(255,165,0,.15);color:#ffb347;}
.chip-activacion   {background:rgba(100,220,100,.12);color:#6ee06e;}
.chip-principal    {background:rgba(232,244,0,.12);color:var(--accent);}
.chip-unilateral   {background:rgba(100,180,255,.12);color:#7ec8ff;}
.chip-explosividad {background:rgba(255,80,80,.12);color:#ff7070;}
.chip-finisher     {background:rgba(200,100,255,.12);color:#d070ff;}
.chip-core         {background:rgba(255,160,50,.12);color:#ffa030;}
.chip-tiron        {background:rgba(100,220,200,.12);color:#60dcc0;}
.chip-empuje       {background:rgba(80,150,255,.12);color:#5096ff;}
.chip-muneca       {background:rgba(255,200,80,.12);color:#ffcc40;}
.chip-circuito     {background:rgba(232,244,0,.12);color:var(--accent);}
.chip-estabilidad  {background:rgba(150,200,100,.12);color:#96c864;}

.ex-card-name{font-size:1.08rem;font-weight:700;color:var(--text);background:none;border:none;border-bottom:1px solid transparent;padding:.1rem 0;width:100%;font-family:inherit;}
.ex-card-name:focus{outline:none;border-bottom-color:var(--accent);}
.ex-card-name[readonly]{cursor:default;}
.ex-info-btn{width:32px;height:32px;border-radius:8px;background:rgba(255,255,255,.06);border:1px solid var(--border);color:var(--muted);cursor:pointer;flex-shrink:0;display:flex;align-items:center;justify-content:center;transition:color .15s,background .15s;}
.ex-info-btn svg{width:17px;height:17px;}
.ex-info-btn.open{background:rgba(232,244,0,.1);border-color:var(--accent);color:var(--accent);}
.ex-info-panel{background:rgba(232,244,0,.05);border-left:2px solid var(--accent);border-radius:0 8px 8px 0;padding:.6rem .75rem;font-size:.7rem;color:var(--muted);line-height:1.65;margin-bottom:.85rem;}

/* ── Set rows ── */
.set-rows{display:flex;flex-direction:column;gap:.45rem;margin-bottom:.8rem;}
.set-row{display:grid;grid-template-columns:26px minmax(0,1fr) minmax(0,1fr) 42px;gap:.35rem;align-items:center;min-height:46px;}
.set-label{font-size:.65rem;font-weight:800;color:var(--muted);text-align:center;letter-spacing:.02em;}
.set-field{display:flex;align-items:center;gap:.25rem;}
.set-field input{flex:1;min-width:0;padding:.6rem .4rem;font-size:.9rem;text-align:center;border-radius:7px;}
.set-unit{font-size:.63rem;font-weight:600;color:var(--muted);white-space:nowrap;}
.set-row.done .set-field input{background:rgba(100,200,100,.08);border-color:rgba(100,200,100,.2);color:rgba(255,255,255,.4);}
.set-done-btn{width:42px;height:42px;border-radius:11px;background:rgba(255,255,255,.05);border:1px solid var(--border);cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:background .15s,border-color .15s,color .15s;color:rgba(255,255,255,.25);}
.set-done-btn svg{width:18px;height:18px;}
.set-done-btn.done{background:rgba(100,200,100,.18);border-color:rgba(100,200,100,.4);color:#6ec86e;}
.add-set-btn{background:none;border:1px dashed rgba(255,255,255,.13);border-radius:8px;color:var(--muted);font-size:.72rem;padding:.55rem .6rem;cursor:pointer;width:100%;font-family:inherit;transition:background .15s;}
.add-set-btn:active{background:rgba(255,255,255,.05);}

.sleep-stars{display:flex;gap:.5rem;justify-content:center;margin:.5rem 0;}
.star{width:32px;height:32px;cursor:pointer;color:var(--border);transition:color .15s,transform .15s;display:flex;align-items:center;justify-content:center;}
.star svg{width:28px;height:28px;}
.star.lit{color:var(--accent);}

.submit-btn{width:100%;padding:.9rem;border-radius:10px;background:var(--accent);color:#0b0c10;font-family:'Outfit',sans-serif;font-size:.95rem;font-weight:700;border:none;cursor:pointer;margin-top:.4rem;transition:opacity .18s;}
.submit-btn:disabled{opacity:.5;cursor:not-allowed;}

/* ── FILTER PILLS ── */
.filter-pills{display:flex;gap:.4rem;margin-bottom:1.4rem;overflow-x:auto;scrollbar-width:none;padding-bottom:.2rem;}
.filter-pills::-webkit-scrollbar{display:none;}
.fpill{flex-shrink:0;font-size:.63rem;font-weight:700;letter-spacing:.07em;text-transform:uppercase;padding:.3rem .75rem;border-radius:100px;border:1px solid var(--border);color:var(--muted);cursor:pointer;transition:all .18s;user-select:none;}
.fpill.fa{border-color:var(--accent);color:var(--accent);background:rgba(232,244,0,.07);}
.fpill.fg{border-color:var(--accent);color:var(--accent);background:rgba(232,244,0,.07);}
.fpill.fr{border-color:var(--orange);color:var(--orange);background:rgba(255,140,0,.07);}
.fpill.fb{border-color:var(--blue);color:var(--blue);background:rgba(0,200,255,.07);}
.fpill.fp{border-color:var(--purple);color:var(--purple);background:rgba(176,110,255,.07);}

/* ── SLEEP DIALOG ── */
.sleep-dialog{position:fixed;inset:0;z-index:400;display:flex;flex-direction:column;justify-content:flex-end;}
.sleep-dialog-backdrop{flex:1;background:rgba(0,0,0,.55);}
.sleep-dialog-sheet{
  background:var(--surf);border-radius:20px 20px 0 0;
  padding:1.4rem 1.4rem calc(1.4rem + env(safe-area-inset-bottom));
  border-top:1px solid var(--border);
  animation:slideUp .25s ease both;
}
@keyframes slideUp{from{transform:translateY(100%)}to{transform:translateY(0)}}
.sleep-dialog-title{font-family:'Bebas Neue',sans-serif;font-size:1.6rem;letter-spacing:.03em;margin-bottom:.1rem;}
.sleep-dialog-title em{color:var(--purple);font-style:normal;}
.sleep-dialog-sub{font-size:.72rem;color:var(--muted);margin-bottom:1.2rem;}
.sleep-dialog-skip{width:100%;background:none;border:none;color:var(--muted);font-size:.78rem;padding:.6rem;cursor:pointer;margin-top:.3rem;}

/* ── TODAY'S PLAN BANNER ── */
.today-plan{
  display:flex;align-items:center;gap:.75rem;
  background:var(--surf);border:1px solid rgba(232,244,0,.25);
  border-radius:12px;padding:.85rem 1rem;margin-bottom:1.4rem;
  transition:border-color .2s;
}
.today-plan.today-done{border-color:rgba(0,230,118,.2);background:rgba(0,230,118,.03);}
.today-ico{width:36px;height:36px;border-radius:9px;display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.today-ico svg{width:18px;height:18px;}
.today-info{flex:1;min-width:0;}
.today-label{font-size:.55rem;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:var(--muted);margin-bottom:.15rem;}
.today-sess{font-size:.82rem;font-weight:700;line-height:1.3;}
.today-status{flex-shrink:0;display:flex;align-items:center;}
.today-status svg{width:22px;height:22px;}
.today-btn{
  width:32px;height:32px;border-radius:8px;
  background:var(--accent);border:none;color:#0b0c10;
  display:flex;align-items:center;justify-content:center;cursor:pointer;
}
.today-btn svg{width:16px;height:16px;}

/* ── RECOVERY INDEX ── */
.today-recovery{display:flex;flex-direction:column;align-items:center;gap:.15rem;flex-shrink:0;margin:0 .2rem;}
.today-rec-arc{position:relative;width:38px;height:38px;}
.today-rec-svg{width:38px;height:38px;transform:rotate(-220deg);}
.today-rec-track{fill:none;stroke:var(--surf2);stroke-width:3.5;stroke-linecap:round;}
.today-rec-fill{fill:none;stroke-width:3.5;stroke-linecap:round;transition:stroke-dasharray .6s ease;}
.today-rec-num{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:.6rem;font-weight:800;line-height:1;}
.today-rec-label{font-size:.5rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);}

/* ── PLAN UPDATE BANNER ── */
.plan-update-banner{
  display:none;align-items:center;gap:.7rem;
  background:rgba(232,244,0,.06);border:1px solid rgba(232,244,0,.3);
  border-radius:10px;padding:.75rem 1rem;margin-bottom:1rem;flex-wrap:wrap;
}
.plan-update-banner p{flex:1;font-size:.72rem;color:var(--muted);line-height:1.5;min-width:140px;}
.plan-update-banner p strong{color:var(--accent);}
.plan-update-actions{display:flex;gap:.4rem;flex-shrink:0;}
.pua-apply{
  font-size:.65rem;font-weight:700;padding:.35rem .75rem;border-radius:6px;
  background:var(--accent);color:#0b0c10;border:none;cursor:pointer;
}
.pua-dismiss{
  font-size:.65rem;font-weight:700;padding:.35rem .75rem;border-radius:6px;
  background:transparent;color:var(--muted);border:1px solid var(--border);cursor:pointer;
}

/* ── STATS ── */
.chart-wrap{background:var(--surf);border:1px solid var(--border);border-radius:12px;padding:1rem;margin-bottom:.8rem;}
.chart-title{font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);margin-bottom:.8rem;display:flex;align-items:center;gap:.35rem;}
.chart-title svg{width:13px;height:13px;flex-shrink:0;}

/* ── EMPTY / LOADING ── */
.empty{text-align:center;padding:3rem 1rem;color:var(--muted);font-size:.8rem;}
.empty svg{width:44px;height:44px;margin:0 auto .7rem;display:block;opacity:.35;}
.loading{text-align:center;padding:2rem;color:var(--muted);font-size:.8rem;}
.spinner{display:inline-block;width:20px;height:20px;border:2px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:spin .7s linear infinite;margin-bottom:.5rem;}
@keyframes spin{to{transform:rotate(360deg)}}

/* ── TOAST ── */
.toast{position:fixed;bottom:90px;left:50%;transform:translateX(-50%) translateY(20px);max-width:440px;width:calc(100% - 2.8rem);background:var(--accent);color:#0b0c10;font-size:.78rem;font-weight:700;padding:.55rem 1.2rem;border-radius:100px;opacity:0;transition:all .3s;pointer-events:none;white-space:nowrap;z-index:300;display:flex;align-items:center;gap:.4rem;}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0);}
.toast svg{width:14px;height:14px;}

.tip-inline{background:rgba(232,244,0,.05);border-left:2px solid var(--accent);border-radius:0 6px 6px 0;padding:.6rem .8rem;font-size:.7rem;color:var(--muted);line-height:1.6;margin-bottom:.8rem;}
.zone-badge{display:inline-block;padding:.15rem .45rem;border-radius:4px;font-size:.62rem;font-weight:700;margin-left:.3rem;}
.z1{background:rgba(100,200,100,.15);color:#64c864;}
.z2{background:rgba(100,180,255,.15);color:#64b4ff;}
.z3{background:rgba(255,200,0,.15);color:#ffc800;}
.z4{background:rgba(255,140,0,.15);color:#ff8c00;}
.z5{background:rgba(255,68,34,.15);color:#ff4422;}

/* ── STAMINA INDICATORS ── */
.stamina-pill{display:inline-flex;align-items:center;gap:.3rem;font-size:.72rem;}
.stamina-pill svg{width:13px;height:13px;}

/* ── TEMPLATE EDITOR ── */
.tpl-ex-row{display:flex;align-items:center;gap:.5rem;margin-bottom:.5rem;background:var(--surf2);border:1px solid var(--border);border-radius:8px;padding:.6rem .7rem;}
.tpl-ex-fields{flex:1;min-width:0;display:flex;flex-direction:column;gap:.3rem;}
.tpl-ex-meta{display:flex;gap:.4rem;}
.tpl-ex-meta input{background:var(--input-bg);border:1px solid var(--border);border-radius:6px;padding:.4rem .5rem;color:var(--text);font-family:'Outfit',sans-serif;font-size:.8rem;outline:none;}
.tpl-ex-meta input:focus{border-color:var(--accent);}
.tpl-name{width:100%;background:var(--input-bg);border:1px solid var(--border);border-radius:6px;padding:.45rem .6rem;color:var(--text);font-family:'Outfit',sans-serif;font-size:.82rem;outline:none;}
.tpl-name:focus{border-color:var(--accent);}
.tpl-ex-controls{display:flex;flex-direction:column;gap:.3rem;flex-shrink:0;}
.tpl-btn{width:26px;height:26px;border-radius:5px;border:1px solid var(--border);background:var(--surf3);color:var(--muted);font-size:.75rem;cursor:pointer;display:flex;align-items:center;justify-content:center;user-select:none;}
.tpl-btn:active{opacity:.7;}
.tpl-del{border-color:rgba(255,68,34,.3);color:var(--red);background:rgba(255,68,34,.08);}
.tpl-del svg{width:13px;height:13px;}
.settings-section{margin-bottom:1.4rem;}
.settings-label{font-size:.65rem;font-weight:700;text-transform:uppercase;letter-spacing:.09em;color:var(--muted);margin-bottom:.6rem;}
/* ── COLLAPSIBLE SETTINGS SECTIONS ── */
.settings-section-header{display:flex;align-items:center;justify-content:space-between;cursor:pointer;user-select:none;padding:.1rem 0 .5rem;}
.settings-section-header .settings-label{margin-bottom:0;}
.settings-chevron{width:16px;height:16px;color:var(--muted);transition:transform .25s ease;flex-shrink:0;}
.settings-section.open .settings-chevron{transform:rotate(180deg);}
.settings-collapsible{max-height:0;overflow:hidden;transition:max-height .35s ease;}
.settings-section.open .settings-collapsible{max-height:1800px;}
/* ── WEEKLY SCHEDULE EDITOR ── */
.sched-row{display:flex;align-items:center;gap:.6rem;padding:.35rem 0;border-bottom:1px solid var(--border);}
.sched-row:last-child{border-bottom:none;}
.sched-day{font-size:.75rem;font-weight:700;color:var(--muted);width:2.4rem;flex-shrink:0;text-transform:uppercase;letter-spacing:.04em;}
.sched-sel{flex:1;background:var(--surf);border:1px solid var(--border);border-radius:8px;color:var(--text);font-family:'Outfit',sans-serif;font-size:.78rem;padding:.38rem .5rem;appearance:none;-webkit-appearance:none;cursor:pointer;}
.sched-sel:focus{outline:none;border-color:var(--accent);}
/* ── PRO BADGE (inline en settings label) ── */
/* ── PROFILE HEADER ── */
.profile-header{display:flex;align-items:center;gap:1rem;padding:1.2rem 0 1.4rem;}
.profile-avatar{width:52px;height:52px;border-radius:50%;background:linear-gradient(135deg,var(--accent),#ffb700);display:flex;align-items:center;justify-content:center;font-size:1.4rem;font-weight:800;color:#0b0c10;flex-shrink:0;letter-spacing:-.02em;}
.profile-info{display:flex;flex-direction:column;gap:.35rem;min-width:0;}
.profile-name{font-size:.95rem;font-weight:700;color:var(--text);}
.profile-email{font-size:.72rem;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.profile-bio{font-size:.72rem;color:var(--muted);margin-top:.2rem;}
.profile-badges{display:flex;align-items:center;gap:.4rem;flex-wrap:wrap;}
.profile-plan{display:inline-flex;align-items:center;font-size:.65rem;font-weight:700;padding:.18rem .5rem;border-radius:5px;letter-spacing:.03em;}
.profile-plan--pro{background:linear-gradient(135deg,var(--accent),#ffb700);color:#0b0c10;}
.profile-plan--trial{background:rgba(255,183,0,.15);border:1px solid rgba(255,183,0,.3);color:var(--accent);}
.profile-plan--free{background:var(--surf);border:1px solid var(--border);color:var(--muted);}
.profile-streak{font-size:.65rem;color:var(--muted);}
/* ── PRO BADGE (inline en settings label) ── */
.pro-badge{display:inline-block;font-size:.52rem;font-weight:800;letter-spacing:.08em;padding:.1rem .35rem;background:linear-gradient(135deg,var(--accent),#ffb700);color:#0b0c10;border-radius:4px;vertical-align:middle;margin-left:.4rem;line-height:1.4;}
/* ── TRIAL BANNER ── */
.trial-banner{display:flex;align-items:center;justify-content:space-between;gap:.6rem;padding:.55rem .8rem;border-radius:10px;font-size:.72rem;font-weight:500;margin-bottom:.6rem;flex-wrap:wrap;}
.trial-warning{background:rgba(255,183,0,.1);border:1px solid rgba(255,183,0,.25);color:var(--accent);}
.trial-expired{background:rgba(255,68,34,.08);border:1px solid rgba(255,68,34,.2);color:var(--red);}
.trial-cta{font-weight:700;cursor:pointer;text-decoration:underline;white-space:nowrap;}
/* ── PRO GATE DIALOG ── */
.pro-gate-badge{display:inline-block;font-size:.65rem;font-weight:800;letter-spacing:.12em;padding:.25rem .7rem;background:linear-gradient(135deg,var(--accent),#ffb700);color:#0b0c10;border-radius:6px;margin-bottom:.2rem;}
.pro-gate-price{display:flex;align-items:baseline;gap:.35rem;justify-content:center;margin:.7rem 0 .2rem;}
.pro-gate-amount{font-size:2rem;font-weight:800;color:var(--text);}
.pro-gate-period{font-size:.75rem;color:var(--muted);}
.pro-gate-cta{background:linear-gradient(135deg,var(--accent),#ffb700)!important;color:#0b0c10!important;font-weight:700;}
/* ── HISTORY PRO GATE (footer del listado) ── */
.hist-pro-gate{display:flex;flex-direction:column;align-items:center;gap:.6rem;padding:1.2rem;margin-top:.5rem;border:1px dashed var(--border);border-radius:12px;font-size:.75rem;color:var(--muted);text-align:center;}
.hist-pro-btn{padding:.45rem 1rem;background:rgba(255,183,0,.1);border:1px solid rgba(255,183,0,.3);border-radius:8px;color:var(--accent);font-size:.75rem;font-weight:700;font-family:'Outfit',sans-serif;cursor:pointer;}
.hist-pro-btn:active{opacity:.7;}
/* ── QUICK LOG ROW (peso + sueño en página registrar) ── */
.quick-log-row{margin-top:.5rem;margin-bottom:1.2rem;display:grid;grid-template-columns:1fr 1fr;gap:.5rem;}
.quick-log-btn{display:flex;align-items:center;gap:.6rem;width:100%;background:var(--surf);border:1px solid var(--border);border-radius:12px;padding:.65rem .9rem;font-size:.78rem;color:var(--text);cursor:pointer;font-family:'Outfit',sans-serif;}
.quick-log-btn:active{opacity:.75;}
.quick-log-btn svg{width:16px;height:16px;flex-shrink:0;}
.quick-log-btn:first-child svg{color:var(--green);}
.quick-log-btn:last-child svg{color:var(--purple);}
/* ── METRIC SESSION CARD (sueño) ── */
.sess-card--metric{background:transparent;border-color:var(--border);opacity:.85;margin-bottom:.5rem;}
.sess-card--metric .sess-head{padding:.6rem .9rem;cursor:default;}
.sess-card--metric .sess-ico{width:28px;height:28px;border-radius:6px;}
.sess-card--metric .sess-ico svg{width:14px;height:14px;}
.sess-title--metric{font-size:.82rem;font-weight:600;color:var(--text);letter-spacing:.01em;}
.metric-del{display:flex;align-items:center;color:var(--muted);cursor:pointer;padding:.2rem;}
.metric-del svg{width:14px;height:14px;}
.metric-del:active{color:var(--red);}
/* ── SETTINGS ROWS (cuenta) ── */
.settings-row{display:flex;align-items:center;justify-content:space-between;padding:.75rem 0;border-bottom:1px solid var(--border);cursor:pointer;font-size:.85rem;color:var(--text);}
.settings-row:last-child{border-bottom:none;}
.settings-row:active{opacity:.6;}
.settings-row-chevron{width:14px;height:14px;color:var(--muted);flex-shrink:0;}
.settings-row-action{background:none;border:none;font-size:.72rem;color:var(--accent);font-family:'Outfit',sans-serif;cursor:pointer;padding:0;font-weight:600;}

/* ── PREVIOUS EXERCISE DATA ── */
.ex-prev-data{font-size:.65rem;color:var(--muted);margin-bottom:.8rem;display:flex;align-items:center;gap:.35rem;line-height:1.4;background:rgba(255,255,255,.03);border-radius:7px;padding:.35rem .55rem;}
.ex-prev-data svg{width:12px;height:12px;flex-shrink:0;opacity:.5;}

/* ── REST TIMER ── */
.rest-timer{display:flex;align-items:center;gap:.7rem;background:rgba(232,244,0,.04);border:1px solid rgba(232,244,0,.15);border-radius:12px;padding:.6rem .9rem;margin-bottom:.75rem;}
.rest-timer-bar-track{flex:1;height:4px;background:rgba(255,255,255,.09);border-radius:2px;overflow:hidden;}
.rest-timer-bar{height:100%;background:var(--accent);border-radius:2px;transition:width 1s linear;}
.rest-timer-count{font-family:'Bebas Neue',sans-serif;font-size:1.15rem;color:var(--accent);min-width:2.8rem;text-align:right;font-variant-numeric:tabular-nums;line-height:1;}
.rest-timer-skip{width:22px;height:22px;border-radius:5px;background:none;border:none;color:rgba(255,255,255,.3);cursor:pointer;font-size:1.1rem;line-height:1;display:flex;align-items:center;justify-content:center;padding:0;flex-shrink:0;transition:color .15s;}
.rest-timer-skip:active{color:var(--text);}

/* ── EXERCISE PROGRESSION CHART ── */
.ex-prog-select{width:100%;background:var(--input-bg);border:1px solid var(--border);border-radius:8px;padding:.45rem .6rem;color:var(--fg);font-family:'Outfit',sans-serif;font-size:.78rem;outline:none;cursor:pointer;margin-top:.4rem;}
.ex-prog-select:focus{border-color:var(--accent);}

/* ── EXERCISE INFO PANEL ── */
.ex-info-text{font-size:.7rem;color:var(--muted);line-height:1.65;margin:0;}
.ex-web-search-btn{display:inline-block;margin-top:.45rem;color:var(--muted);font-size:.62rem;text-decoration:none;opacity:.7;transition:opacity .15s;}
.ex-web-search-btn::after{content:' ↗';font-size:.55rem;}
.ex-web-search-btn:hover{opacity:1;color:var(--fg);}

/* ── STATS REDESIGN ── */
.stats-kpi-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:.5rem;margin-bottom:1.2rem;}
.stats-kpi{background:var(--surf);border:1px solid var(--border);border-radius:12px;padding:.9rem .75rem;display:flex;flex-direction:column;align-items:center;gap:.15rem;}
.stats-kpi-val{font-family:'Bebas Neue',sans-serif;font-size:2rem;line-height:1;}
.stats-kpi-val.g{color:var(--accent)}.stats-kpi-val.o{color:var(--orange)}.stats-kpi-val.b{color:var(--blue)}.stats-kpi-val.p{color:var(--purple)}
.stats-kpi-label{font-size:.55rem;color:var(--muted);text-transform:uppercase;letter-spacing:.07em;}
.stats-kpi-trend{font-size:.58rem;font-weight:700;margin-top:.1rem;}
.stats-kpi-trend.up{color:var(--green)}.stats-kpi-trend.down{color:var(--red)}.stats-kpi-trend.flat{color:var(--muted)}
.stats-section{background:var(--surf);border:1px solid var(--border);border-radius:12px;padding:1.1rem;margin-bottom:1.1rem;}
.stats-title{font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);margin-bottom:.8rem;display:flex;align-items:center;gap:.35rem;}
.stats-title svg{width:13px;height:13px;flex-shrink:0;}
.stats-canvas-wrap{position:relative;width:100%;}
.ex-prog-toggle{display:flex;gap:.35rem;margin:.6rem 0 .4rem;}
.ex-prog-pill{flex:1;text-align:center;padding:.35rem 0;border-radius:20px;font-size:.65rem;font-weight:700;cursor:pointer;border:1px solid var(--border);color:var(--muted);background:transparent;transition:all .2s;}
.ex-prog-pill.active{background:rgba(232,244,0,.15);border-color:var(--accent);color:var(--accent);}
.stat-1rm-list{display:grid;grid-template-columns:repeat(2,1fr);gap:.45rem;margin-top:.2rem;}
.stat-1rm-card{background:var(--surf2);border:1px solid var(--border);border-radius:10px;padding:.7rem .65rem;}
.stat-1rm-name{font-size:.58rem;color:var(--muted);text-transform:uppercase;letter-spacing:.05em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:.2rem;}
.stat-1rm-val{font-family:'Bebas Neue',sans-serif;font-size:1.55rem;color:var(--accent);line-height:1;}
.stat-1rm-trend{font-size:.6rem;font-weight:700;margin-top:.15rem;}
.stat-1rm-trend.up{color:var(--green)}.stat-1rm-trend.down{color:var(--red)}.stat-1rm-trend.flat{color:var(--muted)}
.stat-insight{display:flex;align-items:flex-start;gap:.6rem;padding:.55rem .65rem;border-radius:8px;margin-bottom:.45rem;font-size:.72rem;line-height:1.5;border-left:3px solid var(--border);}
.stat-insight:last-child{margin-bottom:0;}
.stat-insight.warn{border-left-color:var(--red);background:rgba(255,68,34,.06);}
.stat-insight.caution{border-left-color:var(--orange);background:rgba(255,140,0,.06);}
.stat-insight.ok{border-left-color:var(--green);background:rgba(0,230,118,.06);}
.stat-insight.info{border-left-color:var(--blue);background:rgba(0,200,255,.05);}
.stat-insight svg{width:14px;height:14px;flex-shrink:0;margin-top:.1rem;}

/* ── BADMINTON FC ── */
.badm-hr-pill{display:inline-flex;align-items:baseline;gap:.25rem;background:var(--surf2);border:1px solid var(--border);border-radius:20px;padding:.3rem .75rem;margin-bottom:.4rem;}
.badm-hr-unit{font-size:.65rem;color:var(--muted);text-transform:uppercase;letter-spacing:.05em;}

/* ── BODY WEIGHT HISTORY ── */
.bw-row{display:flex;justify-content:space-between;align-items:center;padding:.4rem 0;border-bottom:1px solid var(--border);font-size:.75rem;}
.bw-row:last-child{border-bottom:none;}
.bw-date{color:var(--muted);}
.bw-val{font-weight:700;color:var(--orange);}

/* ── BADMINTON PERFORMANCE DIMENSIONS ── */
.perf-dims{display:flex;flex-direction:column;gap:.5rem;margin-top:.2rem;}
.perf-row{display:flex;align-items:center;gap:.6rem;}
.perf-label{min-width:82px;font-size:.7rem;color:var(--muted);}
.perf-slider{flex:1;-webkit-appearance:none;appearance:none;height:4px;border-radius:2px;background:var(--border);outline:none;cursor:pointer;}
.perf-slider::-webkit-slider-thumb{-webkit-appearance:none;width:14px;height:14px;border-radius:50%;background:var(--blue);cursor:pointer;border:2px solid var(--bg);}
.perf-slider::-moz-range-thumb{width:14px;height:14px;border-radius:50%;background:var(--blue);cursor:pointer;border:2px solid var(--bg);}
.perf-val{min-width:14px;text-align:right;font-size:.75rem;font-weight:700;color:var(--blue);}

/* Historial: mini-barras de dimensiones */
.perf-bars{display:flex;flex-direction:column;gap:.35rem;margin-top:.5rem;}
.perf-bar-row{display:flex;align-items:center;gap:.5rem;}
.perf-bar-label{min-width:80px;font-size:.62rem;color:var(--muted);}
.perf-bar-track{flex:1;height:5px;background:var(--border);border-radius:100px;overflow:hidden;}
.perf-bar-fill{height:100%;background:var(--blue);border-radius:100px;transition:width .3s;}
.perf-bar-num{min-width:12px;font-size:.62rem;font-weight:700;color:var(--blue);text-align:right;}

/* ── BADMINTON STATS ── */
.badm-stamina-bars{display:flex;flex-direction:column;gap:.35rem;margin-bottom:.2rem;}
.badm-stamina-row{display:flex;align-items:center;gap:.5rem;}
.badm-stamina-label{min-width:140px;font-size:.62rem;color:var(--muted);}
.badm-stamina-track{flex:1;height:6px;background:var(--border);border-radius:100px;overflow:hidden;}
.badm-stamina-fill{height:100%;border-radius:100px;transition:width .3s;}
.badm-stamina-count{min-width:16px;font-size:.65rem;font-weight:700;text-align:right;}

/* ── SESSION ACTIONS (edit + delete) ── */
.sess-actions{display:flex;align-items:center;gap:.5rem;margin-top:.8rem;flex-wrap:wrap;}
.edit-btn,
.del-btn,
.share-btn{
  display:inline-flex;align-items:center;gap:.3rem;
  margin-top:0;padding:.38rem .75rem;
  border-radius:8px;font-size:.72rem;font-weight:600;
  font-family:'Outfit',sans-serif;cursor:pointer;
  transition:opacity .15s;white-space:nowrap;line-height:1;
}
.edit-btn {background:rgba(0,200,255,.07); border:1px solid rgba(0,200,255,.22); color:var(--blue);}
.del-btn  {background:rgba(255,68,34,.07); border:1px solid rgba(255,68,34,.22); color:var(--red);}
.share-btn{background:rgba(232,244,0,.07); border:1px solid rgba(232,244,0,.22); color:var(--accent);}
.edit-btn:active,.del-btn:active,.share-btn:active{opacity:.6;}
/* ── INLINE DELETE CONFIRMATION ── */
.del-confirm-text{font-size:.7rem;color:var(--muted);flex:1;}
.del-confirm-yes{display:inline-flex;align-items:center;gap:.25rem;padding:.38rem .65rem;background:rgba(255,68,34,.12);border:1px solid rgba(255,68,34,.3);border-radius:8px;color:var(--red);font-size:.72rem;font-weight:700;cursor:pointer;font-family:'Outfit',sans-serif;}
.del-confirm-yes:active{opacity:.7;}
.del-confirm-no{padding:.38rem .6rem;font-size:.72rem;color:var(--muted);cursor:pointer;font-family:'Outfit',sans-serif;}
.del-confirm-no:active{opacity:.6;}
/* metric-del confirmation */
.metric-del-wrap{display:flex;align-items:center;gap:.35rem;margin-left:auto;}

/* ── EVAL PILL ── */
.eval-pill{font-size:.62rem;font-weight:700;padding:.15rem .4rem;border-radius:99px;white-space:nowrap;line-height:1.4;cursor:default;}
.eval-pill.hit  {color:var(--green); background:color-mix(in srgb,var(--green)  18%,transparent);}
.eval-pill.over {color:var(--accent);background:color-mix(in srgb,var(--accent) 18%,transparent);}
.eval-pill.close{color:var(--orange);background:color-mix(in srgb,var(--orange) 18%,transparent);}
.eval-pill.under{color:var(--red);   background:color-mix(in srgb,var(--red)    18%,transparent);}
.eval-pill:not(.hit):not(.over):not(.close):not(.under){color:var(--muted);background:color-mix(in srgb,var(--muted) 12%,transparent);}

/* ── ACTIVITY RINGS ── */
.rings-row{display:flex;justify-content:space-around;align-items:center;padding:.6rem 0 1.5rem;}
.ring-item{display:flex;flex-direction:column;align-items:center;gap:.35rem;}
.ring-svg-wrap{position:relative;width:82px;height:82px;}
.ring-svg{width:82px;height:82px;}
.ring-track{fill:none;stroke:var(--surf2);stroke-width:8;stroke-linecap:round;}
.ring-fill{fill:none;stroke-width:8;stroke-linecap:round;animation:ring-draw .75s .05s cubic-bezier(.4,0,.2,1) both;}
@keyframes ring-draw{from{stroke-dashoffset:226.19;}}
.ring-center{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;}
.ring-val{font-size:.82rem;font-weight:700;letter-spacing:-.02em;text-align:center;line-height:1;}
.ring-lbl{font-size:.58rem;color:var(--muted);text-transform:uppercase;letter-spacing:.06em;text-align:center;}

/* ── WEEKLY SUMMARY ── */
#weeklySummary{margin:.2rem 0 1.5rem;}
.wsum-card{background:var(--surf);border:1px solid var(--border);border-radius:16px;padding:1rem 1.1rem;}
.wsum-top{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:.75rem;}
.wsum-headline{font-size:.85rem;font-weight:700;color:var(--text);line-height:1.2;}
.wsum-sub{font-size:.62rem;color:var(--muted);margin-top:.2rem;text-transform:uppercase;letter-spacing:.07em;}
.wsum-counter{display:flex;align-items:baseline;gap:.05rem;flex-shrink:0;}
.wsum-done{font-family:'Bebas Neue',sans-serif;font-size:2rem;color:var(--accent);line-height:1;}
.wsum-slash{font-size:1rem;color:var(--border);margin:0 .1rem;}
.wsum-total{font-family:'Bebas Neue',sans-serif;font-size:1.2rem;color:var(--muted);line-height:1;}
.wsum-segs{display:flex;gap:4px;margin-bottom:.85rem;}
.wsum-seg{flex:1;height:5px;border-radius:3px;background:var(--surf2);}
.wsum-seg-done{background:var(--accent);}
.wsum-stats{display:flex;gap:0;border-top:1px solid var(--border);padding-top:.75rem;}
.wsum-stat{flex:1;text-align:center;border-right:1px solid var(--border);}
.wsum-stat:last-child{border-right:none;}
.wsum-stat-val{font-size:.95rem;font-weight:700;color:var(--text);display:flex;align-items:baseline;justify-content:center;gap:.2rem;}
.wsum-unit{font-size:.6rem;font-weight:400;color:var(--muted);text-transform:uppercase;}
.wsum-stat-lbl{font-size:.58rem;color:var(--muted);margin-top:.2rem;text-transform:uppercase;letter-spacing:.06em;}
.wsum-up{color:var(--green);font-size:.65rem;font-weight:600;}
.wsum-down{color:var(--red);font-size:.65rem;font-weight:600;}

/* ── HEATMAP — 18 semanas sin scroll ── */
.hm-main{display:flex;align-items:flex-start;gap:4px;width:100%;}
.hm-days{display:flex;flex-direction:column;gap:2px;flex-shrink:0;padding-top:14px;}
.hm-day-lbl{height:11px;width:12px;font-size:.48rem;color:var(--muted);line-height:11px;text-align:right;}
.hm-cols-wrap{flex:1;min-width:0;}
.hm-months{display:grid;grid-template-columns:repeat(18,1fr);margin-bottom:2px;}
.hm-month{font-size:.48rem;color:var(--muted);line-height:1;overflow:hidden;white-space:nowrap;}
.hm-grid{display:grid;grid-template-columns:repeat(18,1fr);gap:2px;}
.hm-col{display:flex;flex-direction:column;gap:2px;}
.hm-cell{width:100%;aspect-ratio:1;border-radius:2px;background:var(--surf2);transition:opacity .1s;}
.hm-cell.hm-active{opacity:.9;}
.hm-cell.hm-future{background:transparent;pointer-events:none;}
.hm-cell:not(.hm-future):hover{opacity:1;outline:1px solid rgba(255,255,255,.35);}
.hm-legend{display:flex;align-items:center;gap:.45rem;margin-top:.8rem;font-size:.6rem;color:var(--muted);flex-wrap:wrap;}
.hm-lg-dot{width:8px;height:8px;border-radius:2px;display:inline-block;flex-shrink:0;vertical-align:middle;}

/* ── ZONE HINT ── */
.zone-hint{display:none;font-size:.72rem;padding:.3rem .6rem;border-radius:8px;margin-top:.35rem;transition:opacity .2s;}
.zone-hint--show{display:block;}
.zone-hint--z1{background:rgba(59,130,246,.12);color:var(--blue);}
.zone-hint--z2{background:rgba(34,197,94,.12);color:var(--green);}
.zone-hint--z3{background:rgba(234,179,8,.12);color:var(--accent);}
.zone-hint--z4{background:rgba(249,115,22,.12);color:var(--orange);}
.zone-hint--z5{background:rgba(239,68,68,.12);color:var(--red);}

/* ── PR BADGE ── */
.pr-badge{display:inline-block;font-size:.58rem;font-weight:700;background:rgba(234,179,8,.18);color:var(--accent);border:1px solid rgba(234,179,8,.35);border-radius:4px;padding:.05rem .3rem;margin-left:.35rem;vertical-align:middle;letter-spacing:.04em;}

/* ── ONBOARDING OVERLAY ── */
#onboardingOverlay{position:fixed;inset:0;background:var(--bg);z-index:200;display:flex;flex-direction:column;overflow-y:auto;}
.ob-progress-track{height:3px;background:var(--surf2);flex-shrink:0;}
.ob-progress-bar{height:3px;background:var(--accent);transition:width .35s ease;width:0%;}
.ob-container{flex:1;display:flex;flex-direction:column;padding:1.4rem 1.2rem 2rem;max-width:480px;margin:0 auto;width:100%;}
.ob-step-label{font-size:.65rem;color:var(--muted);letter-spacing:.1em;text-transform:uppercase;margin-bottom:1.4rem;}
.ob-question{font-family:'Bebas Neue',sans-serif;font-size:1.7rem;line-height:1.15;color:var(--text);margin-bottom:.5rem;letter-spacing:.02em;}
.ob-sub{font-size:.75rem;color:var(--muted);margin-bottom:1.4rem;line-height:1.6;}
.ob-options{display:flex;flex-direction:column;gap:.55rem;flex:1;}
.ob-card{display:flex;align-items:center;gap:.85rem;padding:.75rem .9rem;border-radius:14px;background:var(--surf);border:1.5px solid var(--border);cursor:pointer;transition:border-color .15s,background .15s;-webkit-tap-highlight-color:transparent;}
.ob-card:active{opacity:.8;}
.ob-card.ob-selected{border-color:var(--accent);background:rgba(232,244,0,.07);}
.ob-card-icon{font-size:1.4rem;flex-shrink:0;width:2rem;text-align:center;}
.ob-card-body{flex:1;min-width:0;}
.ob-card-label{font-size:.82rem;font-weight:600;color:var(--text);margin-bottom:.15rem;}
.ob-card-desc{font-size:.68rem;color:var(--muted);line-height:1.45;}
.ob-card-check{width:20px;flex-shrink:0;color:var(--accent);}
.ob-sched-wrap{width:100%;margin-top:.25rem;}
.ob-actions{margin-top:1.4rem;display:flex;flex-direction:column;gap:.5rem;align-items:stretch;}
.ob-next{background:var(--accent);color:#0b0c10;border:none;border-radius:12px;padding:.85rem 1rem;font-size:.9rem;font-weight:700;font-family:'Outfit',sans-serif;cursor:pointer;transition:opacity .15s;}
.ob-next:disabled{opacity:.35;cursor:not-allowed;}
.ob-next:not(:disabled):active{opacity:.8;}
.ob-back{background:none;border:1px solid var(--border);border-radius:12px;padding:.7rem 1rem;font-size:.8rem;color:var(--muted);font-family:'Outfit',sans-serif;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;}
.ob-skip{background:none;border:none;font-size:.72rem;color:var(--muted);cursor:pointer;font-family:'Outfit',sans-serif;padding:.4rem;text-align:center;text-decoration:underline;text-underline-offset:3px;}

/* ── GYM LEVEL SELECTOR ── */
.gym-level-cards{display:flex;flex-direction:column;gap:.6rem;margin-bottom:.4rem;}
.gym-level-card{display:flex;align-items:flex-start;gap:.8rem;padding:.75rem .9rem;border-radius:12px;background:var(--surf2);border:1.5px solid var(--border);cursor:pointer;transition:border-color .15s,background .15s;}
.gym-level-card:active{opacity:.8;}
.gym-level-card.selected{border-color:var(--accent);background:rgba(232,244,0,.06);}
.gym-level-icon{display:flex;align-items:center;flex-shrink:0;color:var(--accent);}
.gym-level-title{font-size:.82rem;font-weight:600;color:var(--text);margin-bottom:.2rem;}
.gym-level-desc{font-size:.68rem;color:var(--muted);line-height:1.5;}

/* ── PWA INSTALL BANNER ── */
#installBanner{
  position:fixed;bottom:calc(64px + env(safe-area-inset-bottom));left:50%;
  transform:translateX(-50%) translateY(20px);
  width:calc(100% - 2rem);max-width:460px;
  background:var(--surf2);border:1px solid var(--border);border-radius:14px;
  display:flex;align-items:center;gap:.75rem;padding:.75rem .9rem;
  z-index:190;box-shadow:0 8px 32px rgba(0,0,0,.45);
  animation:installSlideUp .3s ease both;
}
@keyframes installSlideUp{from{opacity:0;transform:translateX(-50%) translateY(20px)}to{opacity:1;transform:translateX(-50%) translateY(0)}}
.install-icon{width:40px;height:40px;border-radius:10px;flex-shrink:0;}
.install-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:.15rem;}
.install-text strong{font-size:.82rem;color:var(--text);}
.install-text span{font-size:.7rem;color:var(--muted);line-height:1.4;}
.install-btn{background:var(--accent);color:#0b0c10;border:none;border-radius:8px;padding:.45rem .9rem;font-size:.78rem;font-weight:700;font-family:'Outfit',sans-serif;cursor:pointer;flex-shrink:0;white-space:nowrap;}
.install-dismiss{background:none;border:none;color:var(--muted);cursor:pointer;padding:.25rem;display:flex;align-items:center;flex-shrink:0;}
.install-dismiss svg{width:16px;height:16px;}
.install-dismiss:hover{color:var(--text);}

/* ── APP SHELL — columna centrada en escritorio ── */
#app{max-width:480px;margin:0 auto;min-height:100vh;position:relative;}

@media(min-width:520px){
  body{background:#06070a;}
  #app{border-left:1px solid var(--border);border-right:1px solid var(--border);}
}

/* ── TABLET / DESKTOP ── */
@media(min-width:768px){
  body{font-size:16px;padding-bottom:90px;}
  #app{max-width:700px;}
  .nav{max-width:700px;padding-bottom:0;}
  .nav-item{padding:.85rem .5rem;}
  .nav-icon svg{width:22px;height:22px;}
  .page{padding:2rem 2.2rem;}
  .auth-card{max-width:420px;}

  /* Cards en 2 columnas en home e historial */
  #recentList,#histList{display:grid;grid-template-columns:repeat(2,1fr);gap:.9rem;}
  #recentList .sess-card,#histList .sess-card{margin-bottom:0;}
  #recentList .empty,#histList .empty{grid-column:1/-1;}

  /* Stats: KPIs en 4 columnas */
  .stats-kpi-grid{grid-template-columns:repeat(4,1fr);}

  /* Formulario más cómodo */
  .type-btns{gap:.7rem;}
  .type-btn{padding:.9rem .5rem;}
  .btn-primary,.btn-secondary{padding:.85rem 1.4rem;font-size:.9rem;}

  /* Modales centrados (no full-bottom-sheet) */
  .sleep-dialog{align-items:center;padding:1.5rem;}
  .sleep-dialog-sheet{border-radius:16px;max-width:460px;width:100%;margin:0 auto;}
}

/* ── TOUR DE BIENVENIDA ── */
#tourOverlay{position:fixed;inset:0;z-index:450;display:flex;flex-direction:column;justify-content:flex-end;}
.tour-backdrop{flex:1;background:rgba(0,0,0,.6);}
.tour-sheet{background:var(--surf);border-radius:20px 20px 0 0;border-top:1px solid var(--border);padding:1.6rem 1.4rem calc(1.8rem + env(safe-area-inset-bottom));animation:slideUp .25s ease both;}
.tour-dots{display:flex;gap:.4rem;justify-content:center;margin-bottom:1.4rem;}
.tour-dot{width:6px;height:6px;border-radius:50%;background:var(--border);transition:all .2s;}
.tour-dot--active{width:18px;border-radius:3px;background:var(--accent);}
.tour-icon{color:var(--accent);margin-bottom:.85rem;}
.tour-icon svg{display:block;}
.tour-title{font-size:1.05rem;font-weight:700;color:var(--text);margin-bottom:.45rem;}
.tour-desc{font-size:.78rem;color:var(--muted);line-height:1.65;margin-bottom:1.4rem;}
.tour-actions{display:flex;align-items:center;gap:.8rem;}
.tour-skip-btn{background:none;border:none;color:var(--muted);font-size:.78rem;padding:.4rem 0;cursor:pointer;font-family:'Outfit',sans-serif;flex-shrink:0;}
.tour-next-btn{flex:1;background:var(--accent);color:#0b0c10;border:none;border-radius:10px;padding:.72rem 1.2rem;font-size:.84rem;font-weight:700;cursor:pointer;font-family:'Outfit',sans-serif;}

/* ── MATCHES ── */
.match-balance-bar{display:flex;align-items:center;justify-content:space-between;background:var(--surf);border:1px solid var(--border);border-radius:12px;padding:.75rem 1rem;margin-bottom:1rem;}
.mbb-stat{display:flex;flex-direction:column;align-items:center;gap:.1rem;flex:1;}
.mbb-n{font-family:'Bebas Neue',sans-serif;font-size:1.5rem;line-height:1;color:var(--text);}
.mbb-l{font-size:.55rem;color:var(--muted);text-transform:uppercase;letter-spacing:.06em;}
.mbb-win{color:var(--green);}
.mbb-loss{color:var(--red);}
.mbb-pct{color:var(--blue);}
.mbb-div{width:1px;height:2rem;background:var(--border);flex-shrink:0;}
.hist-shortcut-btn{display:flex;align-items:center;gap:.5rem;width:100%;background:none;border:1px solid var(--border);border-radius:10px;padding:.7rem 1rem;color:var(--muted);font-size:.78rem;font-weight:600;font-family:'Outfit',sans-serif;cursor:pointer;margin-top:.4rem;transition:border-color .18s,color .18s;}
.hist-shortcut-btn:active{border-color:var(--accent);color:var(--accent);}
.hist-shortcut-btn svg{width:16px;height:16px;flex-shrink:0;}

.match-new-session-btn{background:rgba(0,200,255,.1);border:1px solid rgba(0,200,255,.3);color:var(--blue);border-radius:9px;padding:.45rem .85rem;font-size:.72rem;font-weight:700;cursor:pointer;font-family:'Outfit',sans-serif;white-space:nowrap;flex-shrink:0;margin-top:.35rem;}

.matches-empty{text-align:center;padding:3rem 1rem;}
.matches-empty-icon{font-size:2.5rem;margin-bottom:.8rem;}
.matches-empty-title{font-size:.95rem;font-weight:700;color:var(--text);margin-bottom:.3rem;}
.matches-empty-sub{font-size:.75rem;color:var(--muted);}

.match-session-card{background:var(--surf);border:1px solid var(--border);border-radius:12px;margin-bottom:.9rem;overflow:hidden;}
.match-session-head{display:flex;align-items:center;gap:.75rem;padding:.85rem 1rem;cursor:pointer;}
.match-chevron{width:16px;height:16px;color:var(--muted);flex-shrink:0;transition:transform .2s;}
.match-session-body{display:none;border-top:1px solid var(--border);padding:.7rem 1rem .9rem;}
.match-session-body.open{display:block;}
.match-session-head:has(+ .match-session-body.open) .match-chevron{transform:rotate(180deg);}

.match-row{display:flex;align-items:center;gap:.6rem;padding:.5rem 0;border-bottom:1px solid var(--border);}
.match-row:last-of-type{border-bottom:none;}
.match-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0;}
.match-win{background:var(--green);}
.match-loss{background:var(--red);}
.match-abandoned{background:var(--muted);}
.match-row-info{flex:1;min-width:0;}
.match-title-label{font-size:.68rem;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.06em;}
.match-rival-label{font-size:.82rem;color:var(--text);}
.match-rival-label strong{color:var(--text);}
.match-meta{font-size:.65rem;color:var(--muted);margin-top:.05rem;}
.match-result-badge{font-size:.6rem;font-weight:700;text-transform:uppercase;letter-spacing:.07em;padding:.2rem .5rem;border-radius:5px;flex-shrink:0;}
.match-result-badge.match-win{background:rgba(0,230,118,.12);color:var(--green);}
.match-result-badge.match-loss{background:rgba(255,68,34,.12);color:var(--red);}
.match-result-badge.match-abandoned{background:rgba(107,107,130,.12);color:var(--muted);}
.match-del-btn{background:none;border:none;color:var(--muted);cursor:pointer;padding:.3rem;display:flex;align-items:center;flex-shrink:0;transition:color .15s;}
.match-del-btn:hover{color:var(--red);}

.match-add-btn{width:100%;margin-top:.7rem;background:rgba(0,200,255,.06);border:1px dashed rgba(0,200,255,.25);border-radius:9px;padding:.55rem;color:var(--blue);font-size:.78rem;font-weight:600;cursor:pointer;font-family:'Outfit',sans-serif;transition:background .15s;}
.match-add-btn:active{background:rgba(0,200,255,.1);}
.match-del-session-btn{width:100%;margin-top:.4rem;background:none;border:none;color:var(--muted);font-size:.72rem;cursor:pointer;font-family:'Outfit',sans-serif;padding:.3rem;}
.match-del-session-btn:hover{color:var(--red);}
.match-empty-row{font-size:.75rem;color:var(--muted);padding:.4rem 0 .6rem;text-align:center;}

/* Result button group in match modal */
.mmd-result-group{display:grid;grid-template-columns:repeat(3,1fr);gap:.4rem;}
.mmd-result-btn{background:var(--surf2);border:1px solid var(--border);border-radius:9px;padding:.55rem .3rem;font-size:.78rem;font-weight:700;font-family:'Outfit',sans-serif;color:var(--muted);cursor:pointer;transition:all .18s;}
.mmd-result-btn.mmd-win.active{background:rgba(0,230,118,.12);border-color:var(--green);color:var(--green);}
.mmd-result-btn.mmd-loss.active{background:rgba(255,68,34,.12);border-color:var(--red);color:var(--red);}
.mmd-result-btn.mmd-abandoned.active{background:rgba(107,107,130,.12);border-color:var(--muted);color:var(--text);}

/* Set rows in match modal */
.mmd-set-row{display:grid;grid-template-columns:40px 1fr 16px 1fr 28px;align-items:center;gap:.35rem;margin-bottom:.4rem;}
.mmd-set-label{font-size:.65rem;font-weight:700;color:var(--muted);text-transform:uppercase;}
.mmd-set-sep{text-align:center;color:var(--muted);font-weight:700;}
.mmd-set-row input{background:var(--input-bg);border:1px solid var(--border);border-radius:7px;padding:.55rem .4rem;color:var(--text);font-family:'Outfit',sans-serif;font-size:.9rem;text-align:center;outline:none;width:100%;}
.mmd-set-row input:focus{border-color:var(--blue);}
.mmd-set-del{background:none;border:none;color:var(--muted);font-size:1rem;cursor:pointer;padding:0;line-height:1;transition:color .15s;}
.mmd-set-del:hover{color:var(--red);}

/* ── Match summary card ── */
.match-summary-card{background:var(--surf);border:1px solid var(--border);border-radius:12px;padding:1rem 1.1rem;margin-bottom:1rem;}
.match-summary-main{display:flex;align-items:stretch;gap:1.1rem;}
.match-summary-pct{font-family:'Bebas Neue',sans-serif;font-size:3rem;color:var(--blue);line-height:1;flex-shrink:0;display:flex;align-items:center;}
.match-summary-pct-unit{font-size:1.4rem;color:var(--blue);align-self:flex-end;margin-bottom:.15rem;}
.match-summary-divider{width:1px;background:var(--border);flex-shrink:0;border-radius:1px;}
.match-summary-right{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:space-between;gap:.3rem;}
.match-summary-record{display:flex;align-items:center;gap:.5rem;}
.msr-win{font-family:'Bebas Neue',sans-serif;font-size:1.2rem;color:var(--green);line-height:1;}
.msr-loss{font-family:'Bebas Neue',sans-serif;font-size:1.2rem;color:var(--red);line-height:1;}
.msr-sep{color:var(--border);font-size:.8rem;}
.msr-total{font-size:.68rem;color:var(--muted);margin-left:auto;}
.match-summary-bar{height:3px;background:var(--border);border-radius:2px;overflow:hidden;}
.match-summary-bar-fill{height:100%;background:var(--blue);border-radius:2px;transition:width .4s ease;}
.match-summary-streak{font-size:.68rem;color:var(--muted);}
.match-summary-streak strong{color:var(--text);}

/* ── Rivals section ── */
.rivals-section{margin-bottom:1rem;}
.rivals-section-header{display:flex;align-items:center;gap:.5rem;margin-bottom:.55rem;}
.rivals-section-header .stats-title{margin-bottom:0;}
.rivals-count{font-size:.62rem;font-weight:700;background:var(--surf2);border:1px solid var(--border);border-radius:100px;padding:.1rem .42rem;color:var(--muted);}

.rival-card{background:var(--surf);border:1px solid var(--border);border-radius:10px;margin-bottom:.4rem;overflow:hidden;}
.rival-card-head{display:flex;align-items:center;gap:.55rem;padding:.65rem .9rem;cursor:pointer;list-style:none;user-select:none;}
.rival-card-head::-webkit-details-marker{display:none;}
.rival-card-name{font-size:.84rem;font-weight:700;color:var(--text);flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.rival-card-meta{display:flex;align-items:center;gap:.25rem;flex-shrink:0;}
.rcard-w{font-family:'Bebas Neue',sans-serif;font-size:1rem;color:var(--green);line-height:1;}
.rcard-l{font-family:'Bebas Neue',sans-serif;font-size:1rem;color:var(--red);line-height:1;}
.rcard-sep{font-size:.7rem;color:var(--border);}
.rival-winbar{width:28px;height:3px;background:var(--border);border-radius:2px;overflow:hidden;margin-left:.2rem;}
.rival-winbar div{height:100%;background:var(--green);border-radius:2px;}
.rival-chevron{width:13px;height:13px;color:var(--muted);flex-shrink:0;transition:transform .2s;margin-left:.1rem;}
details[open] .rival-chevron{transform:rotate(180deg);}

.rival-card-detail{border-top:1px solid var(--border);padding:.5rem .9rem .6rem;}
.rival-match-row{display:flex;align-items:center;gap:.55rem;padding:.35rem 0;border-bottom:1px solid rgba(255,255,255,.04);}
.rival-match-row:last-child{border-bottom:none;}
.rival-match-info{display:flex;align-items:center;gap:.4rem;flex:1;min-width:0;flex-wrap:wrap;}
.rival-match-date{font-size:.72rem;color:var(--muted);flex-shrink:0;}
.rival-match-title{font-size:.72rem;color:var(--text);font-weight:600;}
.rival-match-score{font-size:.68rem;color:var(--muted);font-variant-numeric:tabular-nums;}
.rival-match-result{flex-shrink:0;}
