/* ============ Marca DANIEL ============ */
:root {
  --negro: #0E0E0E; --oro: #D4A72C; --oro-claro: #F3E3B3; --hueso: #F2EDE3; --granate: #7A1F2B;
  --blanco: #FFFFFF; --gris: #6B6760; --linea: #E2DBCD; --verde: #2E7D4F; --verde-claro: #DCEFE3;
  --radio: 16px; --sombra: 0 2px 10px rgba(14,14,14,.08);
  --titulo: 'Oswald', 'Arial Narrow', sans-serif; --texto: 'Roboto', system-ui, sans-serif;
  /* Colores por función: así el modo oscuro solo cambia estas líneas */
  --bg: var(--hueso); --surface: var(--blanco); --surface-2: var(--hueso); --ink: var(--negro); --night: var(--negro);
  --inp-bg: #fff; --gold-soft: var(--oro-claro); --ok-soft: var(--verde-claro); --err-soft: #F8E1E4;
}
/* Modo oscuro (app del cliente: Perfil → Apariencia) */
:root[data-theme="dark"] {
  --bg: var(--negro); --surface: #191919; --surface-2: #232323; --ink: var(--hueso); --night: #050505;
  --linea: #2F2F2F; --gris: #A39E94; --inp-bg: #232323; --sombra: none;
  --gold-soft: color-mix(in srgb, var(--oro) 20%, #191919); --ok-soft: #15301F; --err-soft: #3A1418;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 18px/1.4 var(--texto); }
body { min-height: 100dvh; overscroll-behavior-y: contain; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--titulo); font-weight: 600; letter-spacing: .02em; margin: 0 0 .4em; text-transform: uppercase; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
a { color: var(--granate); }
.muted { color: var(--gris); font-size: .88rem; }
.center { text-align: center; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.hidden { display: none !important; }

/* ============ Estructura ============ */
.app { max-width: 640px; margin: 0 auto; padding-bottom: 96px; }
.app.wide { max-width: 1100px; }
.topbar { position: sticky; top: 0; z-index: 10; background: var(--night); color: var(--hueso);
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; display: flex; align-items: center; gap: 12px; }
.brand { font-family: var(--titulo); font-weight: 700; letter-spacing: .25em; color: var(--oro); font-size: 1.15rem; }
.topbar .who { margin-left: auto; font-size: .85rem; opacity: .8; text-align: right; }
.topbar button { background: none; border: 1px solid #333; color: var(--hueso); border-radius: 10px; padding: 6px 10px; font-size: .8rem; }
main { padding: 16px; }
.demo-banner { background: var(--oro); color: var(--negro); text-align: center; font-size: .8rem; padding: 4px 8px; font-weight: 500; }

/* Barra de pestañas inferior */
.tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 10; background: var(--night); display: flex;
  padding-bottom: env(safe-area-inset-bottom); }
.tabs button { flex: 1; background: none; border: 0; color: #9a958b; padding: 10px 4px 12px; display: flex; flex-direction: column;
  align-items: center; gap: 2px; font-size: .8rem; font-family: var(--titulo); letter-spacing: .06em; text-transform: uppercase; }
.tabs button .ico { font-size: 1.6rem; line-height: 1; }
.tabs button.on { color: var(--oro); }

/* ============ Tarjetas y botones ============ */
.card { background: var(--surface); border-radius: var(--radio); box-shadow: var(--sombra); padding: 16px; margin-bottom: 14px; }
.card.dark { background: var(--night); color: var(--hueso); }
.card.gold { background: var(--gold-soft); }
.card.done { outline: 3px solid var(--verde); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 0 20px;
  border-radius: 14px; border: 0; background: var(--oro); color: var(--negro); font-family: var(--titulo); font-size: 1.1rem;
  letter-spacing: .05em; text-transform: uppercase; cursor: pointer; text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn.block { width: 100%; }
.btn.dark { background: var(--night); color: var(--oro); }
.btn.ghost { background: transparent; border: 2px solid var(--ink); color: var(--ink); }
.btn.red { background: var(--granate); color: #fff; }
.btn.green { background: var(--verde); color: #fff; }
.btn.small { min-height: 40px; font-size: .9rem; padding: 0 14px; border-radius: 10px; }
.btn[disabled] { opacity: .5; }
.link { background: none; border: 0; color: var(--granate); text-decoration: underline; padding: 6px 0; cursor: pointer; font-size: .9rem; }

/* ============ Formularios ============ */
label.f { display: block; margin-bottom: 12px; }
label.f > span { display: block; font-size: .85rem; color: var(--gris); margin-bottom: 4px; }
.inp { width: 100%; min-height: 52px; border: 2px solid var(--linea); border-radius: 12px; padding: 10px 12px; background: var(--inp-bg); }
.inp:focus { outline: none; border-color: var(--oro); }
textarea.inp { min-height: 90px; resize: vertical; }
.err { background: var(--err-soft); color: var(--granate); border-radius: 10px; padding: 10px 12px; font-size: .9rem; }
.okmsg { background: var(--ok-soft); color: var(--verde); border-radius: 10px; padding: 10px 12px; font-size: .9rem; }

/* ============ Entreno ============ */
.day-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 12px; }
.day-head .date { font-size: .9rem; color: var(--gris); text-transform: capitalize; }
.progress { height: 10px; background: var(--linea); border-radius: 10px; overflow: hidden; }
.progress > div { height: 100%; background: var(--oro); transition: width .3s; }
.ex-title { display: flex; gap: 10px; align-items: flex-start; }
.ex-num { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--night); color: var(--oro);
  display: grid; place-items: center; font-family: var(--titulo); }
.ex-title.ok .ex-num { background: var(--verde); color: #fff; }
.target { display: inline-block; background: var(--surface-2); border-radius: 8px; padding: 2px 8px; font-size: .85rem; margin: 2px 4px 0 0; }
.coach-note { background: var(--gold-soft); border-radius: 10px; padding: 8px 10px; font-size: .9rem; margin-top: 8px; }
.set { border-top: 1px solid var(--linea); padding: 12px 0 4px; }
.set-top { display: flex; gap: 8px; align-items: center; }
.set-n { font-family: var(--titulo); width: 68px; flex: none; font-size: .9rem; white-space: nowrap; }
.set.saved .set-n { color: var(--verde); }
.numbox { flex: 1; position: relative; }
.numbox input { width: 100%; height: 56px; border: 2px solid var(--linea); border-radius: 12px; text-align: center; font-size: 1.35rem; font-weight: 500; background: var(--inp-bg); }
.numbox input:focus { outline: none; border-color: var(--oro); }
.numbox small { position: absolute; right: 8px; top: 4px; font-size: .65rem; color: var(--gris); }
.efforts { display: flex; gap: 6px; margin-top: 8px; }
.efforts button { flex: 1; min-height: 52px; border-radius: 12px; border: 2px solid var(--linea); background: var(--inp-bg);
  font-size: .95rem; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; padding: 4px; }
.efforts button .e { font-size: 1.2rem; }
.efforts button.on.facil { background: var(--verde); border-color: var(--verde); color: #fff; }
.efforts button.on.justo { background: var(--oro); border-color: var(--oro); }
.efforts button.on.tope { background: var(--granate); border-color: var(--granate); color: #fff; }
.efforts button.on.rir { background: var(--night); border-color: var(--oro); color: var(--oro); }
.efforts button.on.rir.fail { background: var(--granate); border-color: var(--granate); color: #fff; }
.efforts.six button { font-size: .85rem; }
.prev { font-size: .8rem; color: var(--gris); margin: 4px 0 0 72px; }
.ex-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.ex-actions .btn { flex: 1; min-height: 48px; font-size: .95rem; }
.uploading { margin-top: 10px; font-size: .9rem; }
.rest-day { text-align: center; padding: 30px 16px; }
.rest-day .big { font-size: 4rem; }

/* ============ Nutrición y hábitos ============ */
.meal { display: flex; gap: 12px; align-items: flex-start; }
.meal .txt { flex: 1; white-space: pre-line; }
.meal .opt { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; margin-top: 8px; font-size: .95rem; }
.check { flex: none; width: 64px; height: 64px; border-radius: 16px; border: 3px solid var(--linea); background: var(--inp-bg); font-size: 1.8rem; display: grid; place-items: center; cursor: pointer; }
.check.on { background: var(--verde); border-color: var(--verde); color: #fff; }
.habit { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--linea); }
.habit:first-of-type { border-top: 0; }
.habit .ico { font-size: 1.6rem; width: 36px; text-align: center; }
.habit .check { width: 52px; height: 52px; font-size: 1.4rem; }
.score { font-family: var(--titulo); font-size: 2.2rem; color: var(--oro); line-height: 1; }

/* ============ Progreso ============ */
.big-num { font-family: var(--titulo); font-size: 2.6rem; line-height: 1; }
.chart { width: 100%; height: auto; display: block; }
.chart .axis { stroke: var(--linea); stroke-width: 1; }
.chart text { font: 11px var(--texto); fill: var(--gris); }
.chart .line { fill: none; stroke: var(--oro); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: rgba(212,167,44,.15); }
.chart .dot { fill: var(--ink); }
.stars { display: flex; gap: 6px; }
.stars button { flex: 1; min-height: 52px; border-radius: 12px; border: 2px solid var(--linea); background: var(--inp-bg); font-size: 1.5rem; }
.stars button.on { background: var(--gold-soft); border-color: var(--oro); }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photos img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 10px; background: var(--linea); }
.list-row { display: flex; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--linea); font-size: .95rem; }

/* ============ Login ============ */
.login { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 24px; max-width: 440px; margin: 0 auto; }
.login .logo { font-family: var(--titulo); font-size: 3rem; letter-spacing: .3em; color: var(--oro); text-align: center; background: var(--night);
  border-radius: 20px; padding: 26px 0 22px; margin-bottom: 24px; }
.login .logo small { display: block; font-size: .8rem; letter-spacing: .25em; color: var(--hueso); margin-top: 4px; }

/* ============ Panel del entrenador ============ */
.coach-nav { display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px; background: #1b1b1b; position: sticky; top: 56px; z-index: 9; }
.coach-nav button { flex: none; background: none; border: 1px solid #333; color: #ccc; border-radius: 999px; padding: 8px 14px; font-size: .85rem; cursor: pointer; }
.coach-nav button.on { background: var(--oro); color: var(--negro); border-color: var(--oro); }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.client-card { cursor: pointer; }
.client-card:hover { outline: 2px solid var(--oro); }
.badge { display: inline-block; background: var(--granate); color: #fff; border-radius: 999px; padding: 2px 10px; font-size: .78rem; margin: 2px 4px 2px 0; }
.badge.gold { background: var(--oro); color: var(--negro); }
.badge.grey { background: var(--linea); color: var(--negro); }
.badge.green { background: var(--verde); }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.kpi { background: var(--surface-2); border-radius: 10px; padding: 8px; text-align: center; }
.kpi b { display: block; font-family: var(--titulo); font-size: 1.3rem; }
.kpi span { font-size: .72rem; color: var(--gris); }
.subtabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.subtabs button { background: var(--inp-bg); border: 2px solid var(--linea); border-radius: 999px; padding: 8px 14px; font-size: .9rem; cursor: pointer; }
.subtabs button.on { background: var(--night); color: var(--oro); border-color: var(--night); }
.week-pills { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 10px; }
.week-pills button { flex: none; min-width: 44px; height: 40px; border-radius: 10px; border: 2px solid var(--linea); background: var(--inp-bg); cursor: pointer; }
.week-pills button.on { background: var(--oro); border-color: var(--oro); font-weight: 700; }
.ed-ex { display: grid; grid-template-columns: 1fr; gap: 6px; border-top: 1px solid var(--linea); padding: 10px 0; }
.ed-ex .mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ed-ex .inp { min-height: 42px; padding: 6px 8px; font-size: .95rem; }
.ed-ex .mini label span { font-size: .7rem; color: var(--gris); display: block; }
table.t { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.t th { text-align: left; font-family: var(--titulo); font-weight: 500; text-transform: uppercase; font-size: .78rem; color: var(--gris); border-bottom: 2px solid var(--linea); padding: 6px; }
table.t td { border-bottom: 1px solid var(--linea); padding: 6px; vertical-align: top; }
.scroll-x { overflow-x: auto; }
video.review { width: 100%; max-height: 60vh; background: #000; border-radius: 12px; }
.toast { position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%); background: var(--night); color: var(--oro);
  padding: 12px 20px; border-radius: 999px; z-index: 50; font-size: .95rem; box-shadow: var(--sombra); max-width: 90vw; text-align: center; }
@media (min-width: 760px) {
  .ed-ex { grid-template-columns: 2fr 3fr; align-items: end; }
}

/* Objetivo en la gráfica, barras de cumplimiento y racha */
.chart .goal { stroke: var(--verde); stroke-width: 2; stroke-dasharray: 6 5; }
.chart .goal-t { fill: var(--verde); font-weight: 700; }
.meter { margin: 10px 0; font-size: .95rem; }
.meter .progress { margin-top: 4px; }
.streak { display: inline-flex; align-items: center; gap: 4px; background: var(--night); color: var(--oro); border-radius: 999px; padding: 4px 12px; font-family: var(--titulo); font-size: .95rem; }
.big-streak { font-family: var(--titulo); font-size: 3rem; color: var(--oro); line-height: 1; }
.mini-bars { display: flex; gap: 4px; align-items: flex-end; height: 50px; margin-top: 8px; }
.mini-bars div { flex: 1; background: var(--oro); border-radius: 4px 4px 0 0; min-height: 3px; position: relative; }
.mini-bars div.low { background: var(--granate); } .mini-bars div.ok { background: var(--verde); }
.daychips { display: flex; gap: 4px; flex-wrap: wrap; }
.daychips button { width: 34px; height: 34px; border-radius: 8px; border: 2px solid var(--linea); background: var(--inp-bg); font-size: .8rem; cursor: pointer; }
.daychips button.on { background: var(--night); border-color: var(--night); color: var(--oro); }
.macros { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; }
.macros div { background: rgba(255,255,255,.08); border-radius: 10px; padding: 6px 2px; }
.macros b { display: block; font-family: var(--titulo); font-size: 1.2rem; color: var(--oro); }
.macros span { font-size: .7rem; opacity: .8; }

.mini-bars div.none { background: var(--linea); }
.t.nowrap td, .t.nowrap th { white-space: nowrap; }

/* Logros */
.badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 4px; }
.badge-item { text-align: center; background: var(--surface-2); border-radius: 12px; padding: 10px 4px; opacity: .45; filter: grayscale(1); }
.badge-item.on { opacity: 1; filter: none; background: var(--gold-soft); }
.badge-item .b-ico { font-size: 1.8rem; line-height: 1.1; }
.badge-item .b-t { font-size: .72rem; margin-top: 4px; line-height: 1.15; }
.tabs button { font-size: .72rem; }

/* =====================================================================
   REDISEÑO FASE 2 · App del cliente
   ===================================================================== */
.topbar .who { margin-left: auto; }
.seg { display: flex; background: var(--surface-2); border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { flex: 1; border: 0; background: none; border-radius: 9px; min-height: 44px; font-size: .95rem; cursor: pointer; color: var(--ink); }
.seg button.on { background: var(--surface); box-shadow: 0 1px 4px rgba(0,0,0,.15); font-weight: 600; }
:root[data-theme="dark"] .seg button.on { background: #3a3a3a; }

/* Inicio */
.hello h1 { font-size: 1.7rem; margin: 4px 0 0; }
.hello p { margin: 2px 0 14px; color: var(--gris); }
.coach-card { display: flex; align-items: center; gap: 12px; }
.avatar { flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--night); color: var(--oro); display: grid; place-items: center;
  font-family: var(--titulo); font-size: 1.5rem; border: 2px solid var(--oro); }
.coach-card .wa { flex: none; width: 48px; height: 48px; border-radius: 50%; background: #25D366; color: #fff; display: grid; place-items: center; font-size: 1.4rem; text-decoration: none; }
.sec-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.sec-title h2 { margin: 0; }
.sec-title .link { padding: 0; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.tiles .card { margin: 0; cursor: pointer; }
.tile-n { font-family: var(--titulo); font-size: 2rem; line-height: 1.05; }
.tile-l { font-size: .85rem; color: var(--gris); }
.today-card { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.today-card .ico { font-size: 2.2rem; }
.go-arrow { font-size: 1.6rem; color: var(--oro); }

/* Semana con anillos */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 14px; }
.week button { border: 0; background: none; padding: 4px 0 6px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; color: var(--ink); }
.week button .wd { font-size: .72rem; color: var(--gris); text-transform: uppercase; letter-spacing: .04em; }
.week button.sel { background: var(--surface); box-shadow: var(--sombra); }
:root[data-theme="dark"] .week button.sel { background: #262626; }
.ring { position: relative; width: 42px; height: 42px; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring .bg { fill: none; stroke: var(--linea); stroke-width: 4; }
.ring .fg { fill: none; stroke: var(--oro); stroke-width: 4; stroke-linecap: round; transition: stroke-dasharray .4s; }
.ring.full .fg { stroke: var(--verde); }
.ring.rest .bg { stroke-dasharray: 2 4; }
.ring .num { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--titulo); font-size: 1.05rem; }
.ring.today .num { color: var(--oro); }
.week-legend { display: flex; gap: 14px; justify-content: center; font-size: .75rem; color: var(--gris); margin: -6px 0 12px; }
.week-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }

/* Lista de ejercicios */
.ex-row { display: flex; align-items: center; gap: 12px; padding: 14px; cursor: pointer; }
.ex-row .ex-num { width: 40px; height: 40px; font-size: 1.1rem; }
.ex-row.ok .ex-num { background: var(--verde); color: #fff; }
.ex-row h3 { margin: 0; font-size: 1.05rem; }
.ex-row .sum { font-size: .85rem; color: var(--gris); margin-top: 2px; }
.ex-row .cnt { font-family: var(--titulo); font-size: 1.1rem; color: var(--gris); }
.ex-row.ok .cnt { color: var(--verde); }
.bar-pct { height: 30px; border-radius: 10px; background: var(--surface-2); overflow: hidden; position: relative; margin-bottom: 14px; }
.bar-pct > div { height: 100%; background: var(--oro); transition: width .4s; }
.bar-pct span { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--titulo); font-size: .95rem; }

/* Hoja inferior (ejercicio) */
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 40; animation: fade .2s; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; background: var(--surface); border-radius: 22px 22px 0 0;
  max-height: 92dvh; overflow-y: auto; padding: 8px 16px calc(24px + env(safe-area-inset-bottom)); animation: up .25s ease-out;
  max-width: 640px; margin: 0 auto; box-shadow: 0 -6px 30px rgba(0,0,0,.25); }
.sheet .handle { width: 44px; height: 5px; border-radius: 3px; background: var(--linea); margin: 4px auto 10px; }
.sheet h2 { text-align: center; font-size: 1.4rem; margin-bottom: 8px; }
.sheet .close { position: absolute; right: 12px; top: 12px; border: 0; background: var(--surface-2); width: 40px; height: 40px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; color: var(--ink); }
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* Temporizador de descanso */
.timer { display: flex; align-items: center; gap: 8px; justify-content: center; background: var(--surface-2); border-radius: 16px; padding: 8px; margin-bottom: 12px; }
.timer .t { font-family: var(--titulo); font-size: 2.1rem; min-width: 96px; text-align: center; font-variant-numeric: tabular-nums; }
.timer.run .t { color: var(--oro); }
.timer.end .t { color: var(--verde); }
.timer button { border: 0; border-radius: 12px; min-width: 52px; height: 44px; background: var(--surface); color: var(--ink); font-size: .9rem; cursor: pointer; }
.timer button.main { background: var(--oro); color: var(--negro); font-family: var(--titulo); padding: 0 14px; }

/* Tabla de series */
.sets-head, .set2 .r { display: grid; grid-template-columns: 34px 1fr 76px 76px; gap: 8px; align-items: center; }
.sets-head { font-size: .72rem; color: var(--gris); text-transform: uppercase; letter-spacing: .04em; padding: 0 2px 4px; text-align: center; }
.set2 { border-top: 1px solid var(--linea); padding: 10px 2px; }
.set2 .n { font-family: var(--titulo); font-size: 1.15rem; text-align: center; }
.set2.saved .n { color: var(--verde); }
.set2 .obj { text-align: center; font-size: .92rem; color: var(--gris); }
.set2 input { width: 100%; height: 50px; border: 2px solid var(--linea); border-radius: 12px; text-align: center; font-size: 1.25rem; font-weight: 500; background: var(--inp-bg); }
.set2 input:focus { outline: none; border-color: var(--oro); }
.set2.saved input { border-color: color-mix(in srgb, var(--verde) 55%, var(--linea)); }
.set2 .efforts { margin-top: 8px; }
.set2 .efforts button { min-height: 44px; font-size: .85rem; }
.set2.extra .n::after { content: '+'; font-size: .7rem; vertical-align: top; color: var(--oro); }
.pm { display: flex; justify-content: center; gap: 12px; margin: 8px 0 14px; }
.pm button { width: 64px; height: 40px; border-radius: 999px; border: 0; font-size: 1.3rem; cursor: pointer; background: var(--surface-2); color: var(--ink); }
.pm button.add { background: var(--oro); color: var(--negro); }
.info-box { background: var(--surface-2); border-radius: 14px; padding: 12px; margin-top: 12px; font-size: .95rem; }
.info-box h3 { font-size: .95rem; margin-bottom: 6px; }
.alt { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-top: 1px solid var(--linea); }
.alt:first-of-type { border-top: 0; }

/* Récords */
.rec { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 0; border-top: 1px solid var(--linea); }
.rec:first-of-type { border-top: 0; }
.rec .rm { font-family: var(--titulo); font-size: 1.35rem; color: var(--oro); text-align: right; }
.rec .d { font-size: .8rem; color: var(--gris); }

/* Perfil */
.me { display: flex; align-items: center; gap: 14px; }
.me .avatar { width: 64px; height: 64px; font-size: 1.9rem; }
.menu { padding: 4px 16px; }
.menu > button, .menu > a { display: flex; width: 100%; align-items: center; gap: 12px; padding: 14px 0; border: 0; border-top: 1px solid var(--linea);
  background: none; color: var(--ink); text-decoration: none; font-size: 1rem; text-align: left; cursor: pointer; }
.menu > :first-child { border-top: 0; }
.menu .mi { font-size: 1.4rem; width: 30px; text-align: center; }
.menu .chev { margin-left: auto; color: var(--gris); }

.day-head .badge { white-space: nowrap; flex: none; }

/* ============ Fase 3 · Editor de rutinas ============ */
.week-pills button.ws-ok { border-color: var(--verde); }
.week-pills button.ws-part { border-color: var(--oro); }
.week-pills button.ws-miss { border-color: var(--granate); }
.legend { display: flex; gap: 14px; font-size: .78rem; margin: -2px 0 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: middle; }
.legend i.ok { background: var(--verde); } .legend i.part { background: var(--oro); } .legend i.miss { background: var(--granate); }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 4px; }
.cal-col { background: var(--surface); border-radius: 12px; padding: 6px; min-height: 92px; display: flex; flex-direction: column; gap: 6px; border: 2px dashed transparent; }
.cal-col.drop { border-color: var(--linea); }
.cal-h { font-family: var(--titulo); text-transform: uppercase; font-size: .8rem; text-align: center; }
.cal-day { background: var(--surface-2); border-radius: 9px; padding: 6px; font-size: .78rem; cursor: grab; border-left: 4px solid var(--linea); display: flex; flex-direction: column; overflow: hidden; }
.cal-day b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-day span { color: var(--gris); }
.cal-day.st-ok, .day-ed.st-ok { border-left-color: var(--verde); }
.cal-day.st-part, .day-ed.st-part { border-left-color: var(--oro); }
.cal-day.st-miss, .day-ed.st-miss { border-left-color: var(--granate); }
.cal-day.st-today, .day-ed.st-today { border-left-color: var(--negro); }
.day-ed { border-left: 6px solid transparent; scroll-margin-top: 120px; }
.cal-add { border: 0; background: none; color: var(--gris); font-size: 1.4rem; cursor: pointer; flex: 1; border-radius: 9px; }
.cal-add:hover { background: var(--surface-2); }
.adv { background: var(--surface-2); border-radius: 12px; padding: 10px; margin-top: 6px; }
.adv .mini { grid-template-columns: repeat(3, 1fr); }
.plan { margin-top: 6px; }
.plan-r { display: grid; grid-template-columns: 44px 1fr 1fr 1fr; gap: 6px; align-items: center; margin-top: 4px; }
.plan-r.head { font-size: .72rem; color: var(--gris); text-transform: uppercase; }
.plan-r .inp { min-height: 40px; padding: 4px 8px; }
@media (max-width: 700px) { .cal { grid-template-columns: repeat(7, 74px); overflow-x: auto; } }
/* Cliente: etiquetas de técnica y superserie */
.tag-ss { display: inline-block; background: var(--oro); color: var(--negro); font-family: var(--titulo); font-size: .75rem; border-radius: 6px; padding: 0 6px; margin-right: 6px; vertical-align: middle; }
.tag-tech { display: inline-block; background: var(--granate); color: #fff; font-size: .72rem; border-radius: 6px; padding: 1px 6px; margin-left: 6px; vertical-align: middle; }

/* ============ Fase 4 · Nutrición con alimentos ============ */
.chip { border: 2px solid var(--linea); background: var(--inp-bg); color: var(--ink); border-radius: 999px; padding: 6px 12px; font-size: .88rem; cursor: pointer; }
.chip.on { background: var(--night); color: var(--oro); border-color: var(--night); }
.meal-foods { margin-top: 10px; }
.food-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--linea); }
.food-row .g { display: flex; align-items: center; gap: 4px; }
.food-row .g .inp { width: 78px; min-height: 42px; text-align: center; padding: 4px; }
.food-search { position: relative; margin-top: 8px; }
.food-hits { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: var(--surface); border: 1px solid var(--linea); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.18); overflow: hidden; }
.food-hits button { display: flex; flex-direction: column; align-items: flex-start; width: 100%; border: 0; border-top: 1px solid var(--linea); background: none; padding: 8px 12px; text-align: left; cursor: pointer; color: var(--ink); }
.food-hits button:first-child { border-top: 0; }
.food-hits button:hover { background: var(--surface-2); }
.tot { margin-top: 8px; font-size: .88rem; background: var(--surface-2); border-radius: 10px; padding: 6px 10px; }
.tgt { display: grid; grid-template-columns: 90px auto 1fr; gap: 2px 10px; align-items: baseline; margin: 8px 0; }
.tgt .progress { grid-column: 1 / -1; height: 8px; }
.food-li { padding: 6px 0; border-top: 1px solid var(--linea); }
.food-li:first-child { border-top: 0; }
.swap { border: 0; background: var(--surface-2); border-radius: 10px; width: 40px; height: 36px; font-size: 1rem; cursor: pointer; flex: none; }
.eq { background: var(--gold-soft); border-radius: 10px; padding: 8px 10px; margin-top: 6px; font-size: .92rem; }

/* ============ Fase 5 · Marca blanca ============ */
.top-logo { max-height: 30px; max-width: 160px; display: block; }
.brand-logo { max-height: 90px; max-width: 80%; display: block; margin: 0 auto; }

.powered { margin-top: 18px; opacity: .8; font-size: .8rem; letter-spacing: .04em; }
