:root { --fondo: #0f0d0c; --panel: #1a1716; --panel2: #24201e; --linea: #332d2a; --tinta: #f2f4f2; --gris: #9aa39e;
  --acento: #ff7a3d; --sobre: #1a0b03; --gasto: #ff7a6e; --ingreso: #3ee6a4; --aviso: #ffc65c;
  --seg-arriba: env(safe-area-inset-top); --seg-abajo: env(safe-area-inset-bottom); }
[hidden] { display: none !important; }
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { background: var(--fondo); color: var(--tinta); font: 16px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif; }
body { padding: calc(var(--seg-arriba) + 14px) 16px calc(var(--seg-abajo) + 96px); min-height: 100vh; overscroll-behavior-y: none; }
h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.5px; margin: 6px 0 14px; }
h2 { font-size: 13px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--gris); margin: 22px 4px 8px; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--tinta); background: var(--panel2); border: 1px solid var(--linea); border-radius: 12px; padding: 12px; width: 100%; }
textarea { min-height: 90px; resize: vertical; }
label { display: block; font-size: 13px; color: var(--gris); margin: 12px 2px 6px; }
.tarjeta { background: var(--panel); border: 1px solid var(--linea); border-radius: 20px; padding: 16px; margin-bottom: 12px; }
.fila { display: flex; align-items: center; gap: 12px; }
.fila > .crece { flex: 1; min-width: 0; }
.entre { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.gris { color: var(--gris); } .peq { font-size: 13px; } .grande { font-size: 34px; font-weight: 800; letter-spacing: -1px; }
.gasto { color: var(--gasto); } .ingreso { color: var(--ingreso); } .avisoc { color: var(--aviso); }
.num { font-variant-numeric: tabular-nums; }
.tres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.tres div { background: var(--panel2); border-radius: 14px; padding: 10px; } .tres b { display: block; font-size: 17px; }
.barra { height: 8px; border-radius: 99px; background: var(--panel2); overflow: hidden; margin-top: 8px; }
.barra i { display: block; height: 100%; border-radius: 99px; background: var(--acento); }
.barra i.pasa { background: var(--gasto); } .barra i.cerca { background: var(--aviso); }
.mov { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--linea); }
.mov:last-child { border-bottom: 0; }
.ico { width: 40px; height: 40px; border-radius: 12px; background: var(--panel2); display: grid; place-items: center; font-size: 20px; flex: none; }
.mov .imp { font-weight: 700; white-space: nowrap; }
.dia { font-size: 13px; color: var(--gris); margin: 14px 4px 2px; }
.boton { display: block; width: 100%; text-align: center; background: var(--acento); color: var(--sobre); font-weight: 800; padding: 14px; border-radius: 14px; margin-top: 16px; }
.boton.sec { background: var(--panel2); color: var(--tinta); font-weight: 600; }
.boton.peligro { background: transparent; color: var(--gasto); border: 1px solid var(--linea); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 12px; border-radius: 99px; background: var(--panel2); border: 1px solid var(--linea); font-size: 14px; }
.chip.si { background: var(--acento); color: var(--sobre); border-color: var(--acento); font-weight: 700; }
.selector { display: flex; background: var(--panel2); border-radius: 12px; padding: 4px; gap: 4px; }
.selector button { flex: 1; padding: 9px; border-radius: 9px; font-weight: 600; color: var(--gris); }
.selector button.si { background: var(--panel); color: var(--tinta); }
.importe { font-size: 44px; font-weight: 800; text-align: center; background: transparent; border: 0; padding: 6px; }
.mesnav { display: flex; align-items: center; justify-content: space-between; margin: 0 0 12px; }
.mesnav button { width: 40px; height: 40px; border-radius: 12px; background: var(--panel); font-size: 20px; }
.mesnav b { font-weight: 700; }
.vacio { text-align: center; color: var(--gris); padding: 26px 10px; }
.donut { display: flex; align-items: center; gap: 16px; }
.leyenda { flex: 1; font-size: 14px; } .leyenda div { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.leyenda i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.barras { display: flex; align-items: flex-end; gap: 8px; height: 120px; margin-top: 10px; }
.barras > div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; font-size: 11px; color: var(--gris); }
.barras span { width: 100%; border-radius: 6px 6px 2px 2px; background: var(--gasto); min-height: 2px; }
.barras span.ing { background: var(--ingreso); }
.par { display: flex; gap: 3px; width: 100%; align-items: flex-end; height: 96px; }
.par span { flex: 1; width: auto; }
#barra { position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: rgba(15,13,12,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--linea); padding: 6px 4px calc(var(--seg-abajo) + 6px); z-index: 5; }
#barra button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--gris); padding: 4px 0; }
#barra button span { font-size: 20px; line-height: 1; }
#barra button.activa { color: var(--acento); }
#mas { position: fixed; right: 18px; bottom: calc(var(--seg-abajo) + 78px); width: 60px; height: 60px; border-radius: 50%; background: var(--acento); color: var(--sobre);
  font-size: 34px; font-weight: 300; box-shadow: 0 10px 30px rgba(0,0,0,.5); z-index: 6; }
#hoja { position: fixed; inset: 0; z-index: 10; }
#hoja .fondo { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
#hoja .panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 92vh; overflow-y: auto; background: var(--panel); border-radius: 24px 24px 0 0;
  padding: 18px 16px calc(var(--seg-abajo) + 18px); animation: sube .22s ease-out; }
@keyframes sube { from { transform: translateY(40px); opacity: .4; } }
.cabhoja { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.cabhoja b { font-size: 19px; } .cabhoja button { color: var(--gris); font-size: 15px; padding: 6px; }
#aviso { position: fixed; left: 16px; right: 16px; bottom: calc(var(--seg-abajo) + 90px); background: var(--panel2); border: 1px solid var(--linea); padding: 12px 14px;
  border-radius: 14px; z-index: 20; text-align: center; font-size: 15px; }
#bloqueo { position: fixed; inset: 0; z-index: 50; background: var(--fondo); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 30px; }
.puntos { display: flex; gap: 14px; } .puntos i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--gris); }
.puntos i.si { background: var(--acento); border-color: var(--acento); }
.teclado { display: grid; grid-template-columns: repeat(3, 76px); gap: 14px; }
.teclado button { height: 76px; border-radius: 50%; background: var(--panel); font-size: 28px; font-weight: 500; }
.codigo { font: 700 24px ui-monospace, Menlo, monospace; letter-spacing: 2px; text-align: center; background: var(--panel2); border-radius: 14px; padding: 16px; user-select: all; -webkit-user-select: all; }
.pildora { font-size: 12px; padding: 3px 8px; border-radius: 99px; background: var(--panel2); color: var(--gris); }
.check { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--linea); flex: none; display: grid; place-items: center; font-size: 14px; }
.check.si { background: var(--acento); border-color: var(--acento); color: var(--sobre); }

/* ---------- Gym ---------- */
.dias { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 4px 0 6px; }
.dias div { text-align: center; padding: 8px 0; border-radius: 12px; background: var(--panel); font-size: 12px; color: var(--gris); }
.dias div b { display: block; font-size: 15px; color: var(--tinta); }
.dias div.hecho { background: var(--acento); color: var(--sobre); } .dias div.hecho b { color: var(--sobre); }
.dias div.hoy { outline: 2px solid var(--acento); }
.bloque { background: var(--panel2); border-radius: 14px; padding: 12px; margin-top: 8px; }
.bloque .tipo { font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--acento); }
.bloque .ej { margin-top: 4px; } .bloque .ej span { color: var(--gris); font-size: 14px; }
.mini { display: flex; gap: 6px; } .mini button { width: 34px; height: 34px; border-radius: 10px; background: var(--panel); color: var(--gris); }
#entreno { position: fixed; inset: 0; z-index: 30; background: var(--fondo); display: flex; flex-direction: column;
  padding: calc(var(--seg-arriba) + 14px) 18px calc(var(--seg-abajo) + 18px); overflow-y: auto; }
.ecab { display: flex; justify-content: space-between; align-items: center; color: var(--gris); font-size: 15px; }
.progreso { height: 6px; border-radius: 99px; background: var(--panel2); margin: 12px 0 18px; overflow: hidden; }
.progreso i { display: block; height: 100%; background: var(--acento); }
.ebloque { font-size: 13px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--acento); }
.enombre { font-size: 34px; font-weight: 800; line-height: 1.1; margin: 6px 0 4px; }
.eserie { font-size: 18px; color: var(--gris); }
.objetivo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 22px 0 10px; }
.objetivo div { background: var(--panel); border-radius: 18px; padding: 14px; text-align: center; }
.objetivo label { margin: 0 0 6px; }
.objetivo input { font-size: 34px; font-weight: 800; text-align: center; background: transparent; border: 0; padding: 0; }
.ajuste { display: flex; justify-content: center; gap: 8px; margin-top: 6px; }
.ajuste button { padding: 6px 12px; border-radius: 10px; background: var(--panel2); font-size: 15px; }
.sugerencia { background: rgba(255,122,61,.12); border: 1px solid rgba(255,122,61,.35); color: var(--tinta); border-radius: 14px; padding: 10px 12px; font-size: 14px; margin-top: 8px; }
.reloj { font-size: 96px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; letter-spacing: -3px; margin: 10px 0; }
.reloj.trabajo { color: var(--acento); } .reloj.pausa { color: #5ab4ff; }
.fase { text-align: center; font-size: 18px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--gris); }
.siguiente { text-align: center; color: var(--gris); margin-top: 6px; }
.lista-wod { background: var(--panel); border-radius: 16px; padding: 12px 14px; margin: 12px 0; }
.lista-wod div { padding: 6px 0; border-bottom: 1px solid var(--linea); font-size: 18px; } .lista-wod div:last-child { border-bottom: 0; }
.lista-wod div.ahora { color: var(--acento); font-weight: 800; }
.abajo { margin-top: auto; }
.contador { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 10px 0; }
.contador button { width: 64px; height: 64px; border-radius: 50%; background: var(--panel); font-size: 30px; }
.contador b { font-size: 48px; min-width: 80px; text-align: center; }
.linea svg { width: 100%; height: 140px; }
.pr { font-size: 12px; padding: 3px 8px; border-radius: 99px; background: var(--acento); color: var(--sobre); font-weight: 800; }
.barras span.ing { background: var(--acento); }
/* Entreno estilo Hevy */
#entreno { padding-bottom: calc(var(--seg-abajo) + 10px); }
.ecard { background: var(--panel); border: 1px solid var(--linea); border-radius: 18px; padding: 14px; margin-bottom: 12px; }
.tabla { width: 100%; border-collapse: collapse; margin-top: 10px; }
.tabla th { font-size: 11px; color: var(--gris); text-transform: uppercase; font-weight: 700; padding: 4px 2px; text-align: center; }
.tabla td { padding: 4px 2px; text-align: center; }
.tabla td:nth-child(2) { width: 26%; }
.tabla input { padding: 9px 4px; text-align: center; font-weight: 700; font-size: 17px; border-radius: 10px; }
.tabla tr.hecha td { background: rgba(255,122,61,.12); } .tabla tr.hecha input { color: var(--acento); border-color: transparent; }
.tabla tr.hecha td:first-child { border-radius: 10px 0 0 10px; } .tabla tr.hecha td:last-child { border-radius: 0 10px 10px 0; }
.tiposerie { width: 34px; height: 34px; border-radius: 9px; background: var(--panel2); font-weight: 800; font-size: 15px; line-height: 1; }
.tiposerie small { display: block; font-size: 9px; color: var(--acento); }
.tiposerie.cal { color: #ffc65c; } .tiposerie.fallo { color: #ff7a6e; } .tiposerie.drop { color: #5ab4ff; }
.ok { width: 40px; height: 38px; border-radius: 10px; background: var(--panel2); font-size: 17px; color: var(--gris); }
.ok.si { background: var(--acento); color: var(--sobre); }
.descansobar { position: fixed; left: 12px; right: 12px; bottom: calc(var(--seg-abajo) + 12px); z-index: 35; background: #23170f; border: 1px solid var(--acento); border-radius: 18px;
  padding: 10px 12px; display: flex; align-items: center; gap: 8px; box-shadow: 0 12px 30px rgba(0,0,0,.5); }
.descansobar b { font-size: 30px; flex: 1; color: #5ab4ff; }
