/* Tema · capa visual común a panel y app (va la última en cada página).
   Fondo antracita casi negro, paneles algo más claros, esquinas amplias y líneas casi invisibles. */
:root {
  --bg: #121316;
  --surface: #1a1c20;
  --surface-2: #23262b;
  --surface-3: #2d3036;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --fg: #f4f4f6;
  --muted: #9ea2ab;
  --accent: #bca8ff;
  --accent-ink: #15121f;
  --accent-soft: rgba(188, 168, 255, .14);
  --accent-line: rgba(188, 168, 255, .45);
  --danger: #ff6b7a;
  --ok: #3ddc97;
  --warn: #f5b94c;
  --mono: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r: 10px;
  --r-lg: 16px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
}

body { background: var(--bg); font-weight: 400; letter-spacing: .005em; -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
::selection { background: var(--accent-soft); }

/* Títulos en minúscula normal y seminegrita; la letra estrecha queda para la marca y los rótulos pequeños */
h1, h2, h3 { font-family: var(--body); text-transform: none; letter-spacing: -.01em; font-weight: 600; line-height: 1.2; }
h1 { font-size: 28px; }
h2 { font-size: 20px; }
h3 { font-size: 17px; }
.kicker { font-family: var(--display); }
.num { font-family: var(--body); font-variant-numeric: tabular-nums; }

/* ---------- Formularios ---------- */
label, .lbl { font-size: 13px; font-weight: 500; color: var(--muted); margin: 16px 0 7px; letter-spacing: .01em; }
input, select, textarea {
  min-height: 46px; padding: 11px 14px; color: var(--fg); font-weight: 500;
  background: rgba(255, 255, 255, .025); border: 1px solid var(--line-2); border-radius: var(--r);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input::placeholder, textarea::placeholder { color: #6f737c; font-weight: 400; }
input:hover, select:hover, textarea:hover { border-color: rgba(255, 255, 255, .2); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); background: rgba(255, 255, 255, .04); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%239ea2ab' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 5l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
select option { background: var(--surface-2); color: var(--fg); }
input[type=checkbox], input[type=radio] { min-height: 0; padding: 0; }
input[type=date], input[type=time] { color-scheme: dark; }
textarea { line-height: 1.45; }
.check { font-weight: 500; }

/* ---------- Botones ---------- */
.btn { min-height: 44px; padding: 10px 18px; border-radius: var(--r); font-weight: 600; letter-spacing: .01em; transition: background .15s, box-shadow .15s, transform .05s; }
.btn:not(.ghost):not(.danger) { box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 22%, transparent); }
.btn:not(.ghost):not(.danger):hover { background: color-mix(in srgb, var(--accent) 82%, #fff); box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: var(--surface-2); border: 1px solid transparent; color: var(--fg); }
.btn.ghost:hover { background: var(--surface-3); }
.btn.danger { background: rgba(255, 107, 122, .08); border: 1px solid rgba(255, 107, 122, .35); }
.btn.danger:hover { background: rgba(255, 107, 122, .14); }
.btn.sm { min-height: 36px; padding: 7px 13px; font-size: 14px; border-radius: 9px; }
.btn:disabled { opacity: .45; box-shadow: none; }

/* ---------- Superficies ---------- */
.card, .block:not(.btn), .totals, .photos-bar, .end-box, .invite, .summary .box, .note-box {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
}
.empty { border: 1px dashed var(--line-2); border-radius: var(--r-lg); background: rgba(255, 255, 255, .015); }
.msg { border-radius: var(--r); }
.msg.ok { background: rgba(61, 220, 151, .1); color: #c9f5e0; }
.msg.err { background: rgba(255, 107, 122, .1); }
.tag { padding: 3px 10px; font-weight: 600; background: var(--surface-3); color: #c9ccd2; }
.tag.accent { background: var(--accent-soft); color: #e2d9ff; }
.warn, .tag.warn { color: var(--warn); }

/* ---------- Pestañas y segmentos ---------- */
.tabs, .seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.tabs button, .seg button, .seg button:first-child, .seg button:last-child {
  border: 0; border-radius: 9px; padding: 8px 14px; color: var(--muted); background: transparent; font-weight: 600; font-size: 14px;
}
.tabs button:hover, .seg button:hover { color: var(--fg); }
.tabs button[aria-selected=true], .seg button[aria-pressed=true] { color: var(--fg); background: var(--surface-3); box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 2px 8px rgba(0, 0, 0, .25); }
.seg button[aria-pressed=true] { color: var(--accent-ink); background: var(--accent); }

/* ---------- Chips ---------- */
.chips button { border: 1px solid transparent; background: var(--surface-2); color: #c9ccd2; padding: 7px 13px; font-weight: 500; }
.chips button:hover { background: var(--surface-3); }
.chips button[aria-pressed=true], .chips .rm { background: var(--accent-soft); border-color: var(--accent-line); color: #fff; }

/* ---------- Tablas ---------- */
.table th, .mtable th { font-family: var(--body); text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 500; color: var(--muted); border-bottom: 1px solid var(--line); }
.table td, .mtable td { border-bottom: 1px solid var(--line); }
.table tr.row:hover td { background: rgba(255, 255, 255, .025); }
.mtable td { font-family: var(--body); }

/* ---------- Diálogos ---------- */
dialog { background: var(--surface); border: 1px solid var(--line-2); border-radius: 20px; box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(5, 6, 8, .72); backdrop-filter: blur(3px); }
.dlg-head { background: var(--surface); border-bottom: 1px solid var(--line); padding: 18px 22px; }
.dlg-head h2 { font-size: 20px; }
.dlg-body { padding: 6px 22px 26px; }
.dlg-body h3 { font-size: 16px; }

/* ---------- Panel: menú lateral con iconos ---------- */
.side { background: #16171b; border-right: 1px solid var(--line); padding: 26px 16px; }
.side .brand { padding: 0 6px; }
.nav { gap: 2px; }
.nav a, .nav .soon { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; font-weight: 500; color: #c4c7ce; }
.nav a:hover { background: rgba(255, 255, 255, .04); color: var(--fg); }
.nav a.on { background: var(--accent-soft); box-shadow: none; color: #fff; font-weight: 600; }
.nav a::before { content: ''; width: 20px; height: 20px; flex: none; background: currentColor; opacity: .9;
  -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
.nav a.on::before { background: var(--accent); opacity: 1; }
.nav a[href="/panel/"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c.9-4.2 4-6.5 8-6.5s7.1 2.3 8 6.5'/%3E%3C/svg%3E"); }
.nav a[href^="/panel/biblioteca"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3v8a2 2 0 0 0 4 0V3M9 11v10M17 3c-2 1.5-3 4-3 7h3v11'/%3E%3C/svg%3E"); }
.nav a[href^="/panel/ejercicios"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 7v10M3.5 9.5v5M17.5 7v10M20.5 9.5v5M6.5 12h11'/%3E%3C/svg%3E"); }
.nav a[href^="/panel/formularios"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='4' width='14' height='17' rx='2'/%3E%3Cpath d='M9 4V3h6v1M8.5 10h7M8.5 14h7M8.5 18h4'/%3E%3C/svg%3E"); }
.nav a[href^="/panel/ajustes"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h10M18 7h2M4 17h4M12 17h8'/%3E%3Ccircle cx='16' cy='7' r='2'/%3E%3Ccircle cx='10' cy='17' r='2'/%3E%3C/svg%3E"); }
.nav a[href^="/panel/guia"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M9.6 9.3a2.5 2.5 0 0 1 4.8.9c0 1.7-2.4 2.2-2.4 3.6M12 17.2h.01'/%3E%3C/svg%3E"); }
.nav a[href="/admin/"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3.5'/%3E%3Cpath d='M2.5 20c.7-3.6 3.3-5.5 6.5-5.5s5.8 1.9 6.5 5.5M16 4.8a3.5 3.5 0 0 1 0 6.4M18 14.8c1.9.7 3.1 2.4 3.5 5.2'/%3E%3C/svg%3E"); }
.main { padding: 30px 34px 70px; }
.head { margin-bottom: 22px; }
.head h1 { font-size: 30px; }
.back { color: var(--muted); }

/* ---------- Iconos de sección (filas tipo ficha) ---------- */
.sico { display: inline-block; width: 22px; height: 22px; flex: none; background: currentColor;
  -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }

/* =================== Iconos de sección =================== */
.i-basal { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='16' height='16' rx='3'/%3E%3Cpath d='M8 9h8M12 9l2-2'/%3E%3C/svg%3E"); }
.i-act { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 4.5c1.6 0 2.5 1.6 2.5 3.8S8.6 12 7 12s-2.5-1.4-2.5-3.7S5.4 4.5 7 4.5zM5.3 14.5h3.4l-.3 3a1.4 1.4 0 0 1-2.8 0zM17 7.5c1.6 0 2.5 1.6 2.5 3.8S18.6 15 17 15s-2.5-1.4-2.5-3.7S15.4 7.5 17 7.5zM15.3 17.5h3.4l-.3 1.7a1.4 1.4 0 0 1-2.8 0z'/%3E%3C/svg%3E"); }
.i-reto { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12a8 8 0 1 1-8-8'/%3E%3Cpath d='M16 12a4 4 0 1 1-4-4M12 12l7-7M16 5h3v3'/%3E%3C/svg%3E"); }
.i-obj { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='6.5'/%3E%3Cpath d='M12 2.5v4M12 17.5v4M2.5 12h4M17.5 12h4'/%3E%3C/svg%3E"); }
.i-food { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 19c0-8 5-14 14-14 0 9-6 14-14 14zM5 19l7-7'/%3E%3C/svg%3E"); }
.i-meals { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5' width='17' height='15' rx='2.5'/%3E%3Cpath d='M3.5 9.5h17M8 3v4M16 3v4M8 13h.01M12 13h.01M16 13h.01M8 16.5h.01M12 16.5h.01'/%3E%3C/svg%3E"); }
.i-cook { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 13.5V19a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1v-5.5M6 13.5a3.5 3.5 0 1 1 1.3-6.8A4.5 4.5 0 0 1 16.7 6.7 3.5 3.5 0 1 1 18 13.5zM6 16.5h12'/%3E%3C/svg%3E"); }
.i-kcal { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21a6.5 6.5 0 0 1-6.5-6.5c0-4 3.5-6 3.5-10 2 1.2 3.4 3 3.8 5 .9-.7 1.5-1.8 1.7-3 1.9 1.8 4 4.8 4 8A6.5 6.5 0 0 1 12 21z'/%3E%3C/svg%3E"); }
.i-macros { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Ccircle cx='12' cy='12' r='3.5'/%3E%3Cpath d='M12 3.5v5M19.4 16.3l-4.3-2.5'/%3E%3C/svg%3E"); }
.i-split { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Crect x='3.5' y='4' width='17' height='16' rx='2.5'/%3E%3Cpath d='M3.5 9.5h17M3.5 14.5h17M9.5 4v16'/%3E%3C/svg%3E"); }
.i-train { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.5' y='7' width='17' height='10' rx='2.5'/%3E%3Cpath d='M21.5 10.5v3M6.5 10v4M10 10v4'/%3E%3C/svg%3E"); }
.i-alert { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.5l9 16H3z'/%3E%3Cpath d='M12 10v4M12 17h.01'/%3E%3C/svg%3E"); }
.i-heart { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20s-7.5-4.6-7.5-10A4.3 4.3 0 0 1 12 7.4 4.3 4.3 0 0 1 19.5 10c0 5.4-7.5 10-7.5 10z'/%3E%3C/svg%3E"); }
.i-chart { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19l5-6 4 3 7-9'/%3E%3Cpath d='M15 7h5v5'/%3E%3C/svg%3E"); }
.i-ruler { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.5' y='8' width='19' height='8' rx='2'/%3E%3Cpath d='M7 8v3M11 8v4M15 8v3M19 8v2'/%3E%3C/svg%3E"); }
.i-eye { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 12S6 5.5 12 5.5 21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E"); }
.i-dumb { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M6.5 7v10M3.5 9.5v5M17.5 7v10M20.5 9.5v5M6.5 12h11'/%3E%3C/svg%3E"); }
.i-note { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 4h10l4 4v12H5z'/%3E%3Cpath d='M15 4v4h4M8.5 12.5h7M8.5 16h5'/%3E%3C/svg%3E"); }

/* =================== Ficha del cliente: filas con icono a la izquierda =================== */
.pane .block { padding: 22px 24px; margin-bottom: 14px; }
.pane .block > h3 { display: flex; align-items: center; gap: 12px; font-size: 17px; margin-bottom: 6px; }
.pane .block > h3 .sico { color: #c9ccd2; }
@media (min-width: 1000px) {
  #t-anamnesis .block, #t-estrategia .block, #t-restricciones .block, #t-app .block {
    display: grid; grid-template-columns: 230px minmax(0, 1fr); column-gap: 28px; align-items: start;
  }
  #t-anamnesis .block > *, #t-estrategia .block > *, #t-restricciones .block > *, #t-app .block > * { grid-column: 2; }
  #t-anamnesis .block > h3, #t-estrategia .block > h3, #t-restricciones .block > h3, #t-app .block > h3 { grid-column: 1; grid-row: 1 / span 30; margin: 12px 0 0; }
  #t-anamnesis .block > :nth-child(2), #t-estrategia .block > :nth-child(2), #t-restricciones .block > :nth-child(2), #t-app .block > :nth-child(2) { margin-top: 0; }
  .pane .block label:first-child, .pane .block .grid3 > div > label, .pane .block .grid6 > div > label { margin-top: 0; }
}
.flags .tag { padding: 4px 11px; }
.result div { background: var(--surface-2); border-radius: 12px; }
.result .total { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); }
.result .v { font-family: var(--body); font-weight: 600; font-size: 24px; }
.split .meal { background: var(--surface-2); border-radius: 12px; }
.chips.big button { border-radius: 12px; padding: 10px 14px; }

/* =================== Creador de plan =================== */
.grid-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 10px 10px 12px; }
.week-grid { gap: 0 6px; }
.day { background: transparent; border: 0; border-radius: 0; }
.day.today { border: 0; }
.day-head { border: 0; justify-content: center; position: relative; height: 44px; }
.day-head b { font-family: var(--body); text-transform: none; letter-spacing: 0; font-weight: 500; color: #c9ccd2; font-size: 15px; }
.day.today .day-head b { color: #fff; }
.day.today .day-head b::after { content: ''; }
.day-menu { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); opacity: 0; transition: opacity .15s; background: var(--surface); border-radius: 8px; padding: 2px; }
.day:hover .day-menu, .day:focus-within .day-menu { opacity: 1; }
.day-body { background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px); border-radius: 10px; }
.axis span { color: #7c808a; font-size: 12px; }
.day-body .item { background: var(--surface-2); border: 0; border-radius: 10px; padding: 7px 10px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); transition: background .12s; }
.day-body .item:hover { background: var(--surface-3); }
.item .t { color: #8f939c; }
.item .t b { font-family: var(--body); text-transform: none; letter-spacing: 0; font-weight: 500; color: #8f939c; font-size: 12px; }
.day-body .item .n { font-weight: 600; font-size: 14px; }
.item .k { color: #a7abb3; }
.item .n.empty-slot { color: #cbbcff; }
.day-body .item.workout { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 30%, transparent), color-mix(in srgb, var(--accent) 18%, transparent)); border-left: 3px solid var(--accent); }
.day-body .item.workout .t, .day-body .item.workout .t b { color: #e2d9ff; }
.day-body .item.intake { background: transparent; border: 1px dashed var(--line-2); }
.day-body .item.dragging { box-shadow: 0 14px 34px rgba(0, 0, 0, .55), 0 0 0 1px var(--accent-line); }
.day.drop .day-body { background-color: color-mix(in srgb, var(--accent) 5%, transparent); }
.day.drop { border: 0; }
.fill { background: var(--accent-soft); border: 1px dashed var(--accent-line); border-radius: 10px; font-weight: 600; }
.day.out { opacity: .35; }
.foot { margin: 8px 2px 0; padding: 10px 11px 11px; background: var(--surface-2); border: 0; border-radius: 12px; }
.foot .kc b { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.foot.ok .kc b { color: var(--ok); }
.foot.off .kc b { color: var(--danger); }
.bar .track { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .08); }
.bar span:first-child { font-weight: 600; }
.bar.hc span:first-child { color: #cbbcff; }
.bar.p span:first-child { color: #9cc8ff; }
.bar.g span:first-child { color: #f5c76b; }
.bar.p .fillb { background: #7fb8ff; }
.bar.g .fillb { background: #f5b94c; }
.vsexp { font-weight: 700; }
.vsbar { height: 4px; background: rgba(255, 255, 255, .08); }
.summary .box { border-radius: 14px; padding: 12px 16px; }
.summary .v { font-family: var(--body); font-weight: 600; }
.weeknav b { font-family: var(--body); text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 17px; }
.planbar select { min-height: 40px; }
.note-box { border-left: 0; }
.note-head b { font-family: var(--body); text-transform: none; letter-spacing: 0; font-size: 16px; }
.note-box[data-open=false] .note-body::after { background: linear-gradient(transparent, var(--surface)); }
.popmenu { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 14px; padding: 6px; box-shadow: var(--shadow); }
.popmenu button { background: transparent; border-radius: 9px; padding: 9px 12px; }
.popmenu button:hover { background: var(--surface-3); }
.target div { background: var(--surface-2); border-radius: 12px; font-family: var(--body); }
.pick { background: var(--surface-2); border: 1px solid transparent; border-radius: 12px; }
.pick:hover { border-color: var(--accent-line); }
.pick img, .pick .noimg { border-radius: 9px; }
.pick .mc { font-family: var(--body); }
.choice label { background: var(--surface-2); border: 1px solid transparent; border-radius: 12px; }
.choice label:has(input:checked) { background: var(--accent-soft); border-color: var(--accent-line); }
.ings td { border-bottom: 1px solid var(--line); }
.rt-table td { border-bottom: 1px solid var(--line); }

/* =================== Biblioteca =================== */
.rc { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; transition: transform .12s, border-color .12s; }
.rc:hover { border-color: var(--line-2); transform: translateY(-2px); }
.rc .img { border-radius: 0; }
.mac { font-family: var(--body); }
.exrow { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.exrow:hover { border-color: var(--accent-line); }

.day-head .dn { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 4px; margin-left: 2px; border-radius: 50%; }
.day.today .day-head .dn { background: var(--accent); color: var(--accent-ink); font-weight: 700; }

/* Rótulos pequeños sin mayúsculas forzadas */
.summary .k, .result .k { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 500; }

/* =================== App del cliente =================== */
.top { background: rgba(18, 19, 22, .86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.screen h1 { font-size: 30px; letter-spacing: -.02em; }
.sec { font-family: var(--body); text-transform: none; letter-spacing: 0; font-size: 15px; font-weight: 600; color: var(--muted); }
.card { border-radius: 18px; padding: 16px 18px; }
a.card:active, .meal:active { background: var(--surface-2); }

/* Barra de pestañas flotante */
body { padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom, 0px) + 34px); }
.tabbar {
  left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); height: var(--tabbar); padding: 6px;
  background: rgba(30, 32, 37, .9); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--line-2); border-radius: 26px; box-shadow: 0 12px 32px rgba(0, 0, 0, .45);
  max-width: 560px; margin: 0 auto;
}
.tabbar a { border-radius: 20px; font-weight: 500; font-size: 11px; gap: 2px; }
.tabbar a.on { background: var(--surface-3); color: #fff; }
.tabbar svg { width: 23px; height: 23px; }

/* Semana: días en círculo */
.week { gap: 4px; margin: 16px 0 18px; }
.week button { background: transparent; border: 0; padding: 8px 0 6px; border-radius: 22px; gap: 6px; }
.week button span:first-child { font-size: 13px; text-transform: none; color: var(--muted); font-weight: 500; }
.week button span:last-child { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-2); font-family: var(--body); font-weight: 600; font-size: 16px; }
.week button[aria-selected=true] { background: var(--surface-2); }
.week button[aria-selected=true] span:first-child { color: #fff; }
.week button[aria-selected=true] span:last-child { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.week button.today:not([aria-selected=true]) { border: 0; }
.week button.today:not([aria-selected=true]) span:last-child { border-color: var(--accent-line); color: #e2d9ff; }
.weeknav button { background: var(--surface-2); border: 0; border-radius: 12px; }

/* Comidas, entrenos y resumen */
.meal { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 10px; gap: 14px; margin-top: 12px; }
.meal img, .meal .noimg { border-radius: 13px; width: 84px; height: 84px; }
.meal .when b { font-family: var(--body); text-transform: none; letter-spacing: 0; font-weight: 600; color: #cbbcff; }
.meal .nm { font-size: 17px; }
.meal .kc { font-family: var(--body); font-weight: 500; }
.work { border-radius: 18px; border: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 22%, transparent), color-mix(in srgb, var(--accent) 12%, transparent)); box-shadow: inset 3px 0 0 var(--accent); padding: 14px 16px; }
.ring { border-radius: 20px; padding: 20px; gap: 20px; }
.ring-title { font-family: var(--body); text-transform: none; letter-spacing: -.01em; font-size: 22px; font-weight: 600; color: var(--fg); margin: 28px 0 -2px; }
.ring .legend .num { font-family: var(--body); font-weight: 600; }
.ring .legend div { font-size: 15px; }
.hero { border-radius: 18px; }
.ing-list li { padding: 11px 0; }
.ing-list .num { font-family: var(--body); font-weight: 500; }
.sheet { background: var(--bg); }
.quick .card { border-radius: 18px; }
.patterns label { border-radius: 14px; background: var(--surface); border-color: var(--line); }
.patterns b { font-family: var(--body); text-transform: none; letter-spacing: 0; }
.shop-item { border-bottom: 1px solid var(--line); }
.shop-group h3 { font-size: 14px; }
.kicker { letter-spacing: .12em; }
.ex .num { font-family: var(--body); }
.sets input[type=number] { min-height: 44px; }

.ring { flex-direction: column; align-items: stretch; padding: 22px 18px 16px; }
.ring svg { width: 210px; height: 210px; margin: 0 auto 14px; }
.ring .legend { gap: 0; }
.ring .legend div { padding: 12px 6px; border-top: 1px solid var(--line); font-size: 16px; }
.ring .legend div:first-child { border-top: 0; }
.ring .legend i { width: 11px; height: 11px; margin-right: 12px; }

/* Ficha › Planes */
.plans-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.plans-head .btn span { font-size: 18px; line-height: 1; }
.plan-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.plan-card { display: block; padding: 18px 20px; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); transition: border-color .15s, transform .12s; }
.plan-card:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.plan-card.old { opacity: .6; }
.pc-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pc-top b { font-size: 17px; }
.pc-dates { margin-top: 8px; font-weight: 500; white-space: nowrap; }
.pc-dates .muted { font-size: 14px; }
.pc-meta { margin-top: 4px; }

/* Campos numéricos sin flechas del navegador */
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
/* Fila de necesidad basal: la fecha y el sexo con más sitio para que no se partan */
#t-anamnesis .grid6 { grid-template-columns: 1.5fr 1.2fr repeat(4, 1fr); }
#t-anamnesis .grid6 label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.item .swapped { margin-top: 4px; padding-top: 4px; border-top: 1px dashed var(--line-2); font-size: 12px; color: #9cc8ff; }
.pick .fav { color: #f5c76b; }

/* App: cambiar receta y favoritas */
.meal { position: relative; cursor: pointer; }
.meal .meal-main { flex: 1; min-width: 0; padding-right: 34px; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none; padding: 0; font: inherit; font-size: 20px; line-height: 1;
  color: #c9ccd2; background: var(--surface-2); border: 0; border-radius: 12px; cursor: pointer; }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:active { background: var(--surface-3); }
.meal > .icon-btn { position: absolute; right: 10px; bottom: 10px; }
.icon-btn.star.on { color: #f5c76b; }
.fav-mark { color: #f5c76b; }
.title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.title-actions { display: flex; gap: 8px; padding-top: 2px; }
.sw-list { display: grid; gap: 10px; margin-top: 16px; }
.sw-item { display: flex; gap: 8px; align-items: center; }
.sw-pick { flex: 1; min-width: 0; display: flex; gap: 12px; align-items: center; text-align: left; font: inherit; color: var(--fg); cursor: pointer;
  padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.sw-pick:active { border-color: var(--accent-line); }
.sw-pick img, .sw-pick .noimg { width: 60px; height: 60px; border-radius: 12px; object-fit: cover; background: var(--surface-2); flex: none; }
.sw-pick .nm { font-weight: 600; }

/* Creador: vista con fotos */
.view-photo .day-body .item.photo { padding: 0 0 9px; overflow: hidden; }
.item.photo .ph { position: relative; aspect-ratio: 4 / 3; background: var(--surface-3) center / cover no-repeat; border-radius: 10px 10px 0 0; margin-bottom: 7px; }
.item.photo .ph.none { display: grid; place-items: center; aspect-ratio: 16 / 7; }
.item.photo .ph-t { position: absolute; left: 6px; top: 6px; padding: 2px 8px; font-size: 11px; font-weight: 600; color: #fff; background: rgba(10, 11, 13, .72); border-radius: 99px; backdrop-filter: blur(4px); }
.item.photo .n { white-space: normal !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding: 0 10px; font-size: 14px; line-height: 1.25; }
.item.photo .k { padding: 0 10px; margin-top: 4px; }
.item.photo .mm { display: flex; gap: 8px; padding: 0 10px; margin-top: 3px; font-size: 12px; font-weight: 600; }
.item.photo .mm .hc { color: #cbbcff; }
.item.photo .mm .p { color: #9cc8ff; }
.item.photo .mm .g { color: #f5c76b; }
.item.photo .dessert, .item.photo .swapped { margin: 6px 10px 0; }
#view-seg button { padding: 6px 12px; font-size: 13px; }
.item.photo .k .ex { display: block; font-size: 11px; color: #d8ceff; }

/* ---------- Entreno real que apunta el cliente ---------- */
.wk-status { margin-top: 8px; font-size: 14px; font-weight: 600; color: #7ee2a8; }
.wk-status.skipped { color: #ff9b9b; }
.wk-status .muted { font-weight: 400; }
.work.skipped { opacity: .72; }
.meal .extra.adj { color: #e2d9ff; }
.past-days { display: flex; overflow-x: auto; gap: 6px; scroll-snap-type: x proximity; padding-bottom: 4px; }
.past-days button { flex: 0 0 52px; scroll-snap-align: center; }
button.card.row-link { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
/* Panel: estado del entreno en el calendario */
.day-body .item .actual { margin-top: 3px; font-size: 11px; font-weight: 600; color: #b9f5d0; line-height: 1.25; }
.day-body .item .actual.skipped { color: #ffb4b4; }
.day .extras { padding: 6px 8px 0; }
.day .extras .actual { font-size: 11px; font-weight: 600; color: #b9f5d0; background: rgba(126, 226, 168, .1); border-radius: 8px; padding: 4px 6px; margin-bottom: 4px; }

/* ---------- Formularios en la app del cliente ---------- */
.checkin { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; border: 1px solid var(--accent); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 16%, transparent), color-mix(in srgb, var(--accent) 6%, transparent)); }
.checkin b { font-size: 17px; }
.fm-progress { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; font-size: 13px; color: var(--muted); }
.fm-progress .bar { flex: 1; height: 6px; border-radius: 6px; background: var(--line-2); overflow: hidden; }
.fm-progress .bar i { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.fm-intro { margin: 12px 0 6px; line-height: 1.5; }
.fm-fields { display: flex; flex-direction: column; gap: 18px; margin-top: 14px; }
.fq { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.fq-label { font-weight: 600; font-size: 16px; line-height: 1.35; }
.fq-help { font-size: 13px; color: var(--muted); line-height: 1.4; }
.fq input, .fq textarea { margin: 2px 0 0; }
.fq.err .fq-label { color: #ff8fa3; }
.fq.err input, .fq.err textarea, .fq.err .fq-opts, .fq.err .fq-scale { outline: 1px solid #ff5c7a; border-radius: 12px; }
.fq-num { display: flex; align-items: center; gap: 8px; }
.fq-num input { max-width: 140px; }
.fq-scale { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.fq-scale button, .fq-opts button { font: inherit; color: var(--fg); background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer; }
.fq-scale button { padding: 10px 0; font-weight: 600; }
.fq-opts { display: flex; flex-direction: column; gap: 6px; }
.fq-opts button { text-align: left; padding: 12px 14px; }
.fq-scale button[aria-pressed=true], .fq-opts button[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.fq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fq-sub { display: flex; flex-direction: column; gap: 4px; font-size: 14px; margin: 0; }
.fq-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fq-photo { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; aspect-ratio: 3 / 4; border: 1px dashed var(--line-2); border-radius: 14px; background: var(--surface); cursor: pointer; overflow: hidden; position: relative; margin: 0; }
.fq-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fq-photo.has .small { position: absolute; bottom: 6px; background: rgba(0, 0, 0, .6); padding: 2px 8px; border-radius: 8px; }
.fq-photo.busy { opacity: .5; }
.fq-plus { font-size: 28px; color: var(--accent); }
.fm-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 24px; }
.fm-nav .btn { min-width: 120px; }
.fq-label { color: var(--fg); }
.checkin, .checkin * { text-decoration: none; color: inherit; }
.checkin .kicker { color: var(--accent); }
.checkin .muted { color: var(--muted); }
.checkin .btn { color: var(--accent-ink); }

/* ---------- Panel: seguimiento en la ficha ---------- */
.tabs .badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; }
.fu-top .fu-status { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.fu-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; max-width: 980px; }
.fu-item { border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); }
.fu-item.unread { border-color: var(--accent-line, var(--accent)); }
.fu-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-align: left; }
.fu-head .dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--accent); vertical-align: middle; }
.fu-body { padding: 0 16px 16px; display: grid; gap: 12px; }
.fu-body h4 { margin: 10px 0 0; font-family: var(--display); text-transform: uppercase; letter-spacing: .06em; color: var(--accent); font-size: 13px; }
.fu-qa { display: grid; gap: 3px; line-height: 1.45; }
.fu-photos { display: flex; gap: 10px; flex-wrap: wrap; }
.fu-photos a { display: grid; gap: 4px; text-align: center; font-size: 12px; color: var(--muted); }
.fu-photos img { width: 150px; height: 200px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line-2); }
.checkin.late { border-color: #f2b84b; background: linear-gradient(180deg, rgba(242, 184, 75, .16), rgba(242, 184, 75, .05)); }
.checkin.late .kicker { color: #f2b84b; }
.tag.late { background: rgba(242, 184, 75, .16); color: #f2b84b; }
#push-set b, .push-card b { display: block; margin-bottom: 4px; }

/* Gramos o medidas caseras en la receta */
.sec-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sec-row .sec { margin-bottom: 0; }
.seg.measures { margin: 14px 0 6px; }
.seg.measures button { font-size: 13px; padding: 6px 10px; }
.ing-list .num small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; text-align: right; }
.seg.measures { flex: 0 0 auto; } .seg.measures button { flex: 0 0 auto; white-space: nowrap; padding: 6px 12px; }

/* Ficha · tareas y documentos */
.doc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tag.ok { color: var(--ok, #57c78a); border-color: currentColor; }
.doc-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; max-width: 980px; }
.doc-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border: 1px solid var(--line-2, var(--line)); border-radius: 16px; background: var(--surface); }
.doc-main { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.doc-main b { overflow-wrap: anywhere; }
.doc-text { flex-basis: 100%; padding-top: 10px; border-top: 1px solid var(--line); white-space: normal; overflow-wrap: anywhere; }

/* Entrenos · semanas tipo */
.nav a[href^="/panel/entrenos"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5' width='17' height='15' rx='2'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4M7.5 14.5l2 2 3.5-4'/%3E%3C/svg%3E"); }
.wk-cards { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.wk-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 280px; padding: 16px 18px; text-align: left; font: inherit; color: inherit; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line-2, var(--line)); border-radius: 16px; }
.wk-card:hover { border-color: var(--accent-line, var(--accent)); }
.wk-card.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.wk-card b { font-size: 15px; }
.wk-days { list-style: none; margin: 8px 0 0; padding: 0; font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
.wk-days b { display: inline-block; width: 34px; font-size: 13px; color: var(--fg); }
.wk-editor { margin-top: 20px; max-width: 1100px; }
.wk-ed-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.wk-ed-head h2 { margin: 0; }
@media (max-width: 720px) { .wk-card { width: 100%; } #wk-wrap { overflow-x: auto; } }

/* Barra lateral del panel: solo iconos; el nombre sale al pasar el cursor */
.layout { grid-template-columns: 76px 1fr; }
.side { padding: 22px 12px; align-items: center; }
.side .brand { padding: 0; justify-content: center; }
.side .brand-word, .side .brand-sub, .side #who { display: none; }
.side .brand img { width: 30px; }
.nav { align-items: center; }
.nav a { position: relative; justify-content: center; width: 46px; height: 46px; padding: 0; gap: 0; font-size: 0; }
.nav a::before { width: 22px; height: 22px; }
.side-foot { align-items: center; }
#logout { position: relative; width: 46px; height: 46px; padding: 0; font-size: 0; display: inline-flex; align-items: center; justify-content: center; }
#logout::before { content: ''; width: 20px; height: 20px; background: currentColor;
  --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-4M10 16l-4-4 4-4M6 12h10'/%3E%3C/svg%3E");
  -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
[data-tip]::after { content: attr(data-tip); position: absolute; left: calc(100% + 10px); top: 50%; transform: translate(-4px, -50%); z-index: 50;
  padding: 6px 10px; border-radius: 8px; background: #2a2b31; border: 1px solid var(--line); color: #fff; font: 600 13px/1 var(--body); white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .12s, transform .12s; box-shadow: 0 6px 20px rgba(0, 0, 0, .35); }
.nav a[data-tip]:hover::after, .nav a[data-tip]:focus-visible::after, #logout:hover::after, #logout:focus-visible::after { opacity: 1; transform: translate(0, -50%); }
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .side { padding: 10px 12px; }
  .side .brand { display: none; }
  .nav { justify-content: space-between; flex: 1; gap: 2px; }
  [data-tip]::after { display: none; }
}

/* Sección activa: solo el icono en rosa, sin fondo */
.nav a.on, .nav a.on:hover { background: none; box-shadow: none; }
.day-body .item.workout .k { color: #e2d9ff; font-weight: 600; }
/* Calendario · vista con macros: debajo de las kcal, gramos de HC / P / G (lo que lleva / objetivo de la toma) */
.view-macros .item .mm { display: flex; flex-wrap: wrap; gap: 2px 8px; margin-top: 3px; font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.view-macros .item .mm .hc { color: #cbbcff; }
.view-macros .item .mm .p { color: #9cc8ff; }
.view-macros .item .mm .g { color: #f5c76b; }
/* Comida · aplicar a otros días */
.copy-days { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.copy-days h3 { margin: 0 0 8px; }
.wd-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.wd-chips button { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line-2, var(--line)); background: transparent; color: var(--fg); font: 600 15px var(--body); cursor: pointer; }
.wd-chips button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.wd-chips button:disabled { opacity: .55; cursor: default; }

/* Clientes · planes que tocan esta semana */
.due { margin: 6px 0 22px; }
.due h2 { font-size: 18px; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.due h2 .num { font-size: 13px; background: var(--accent); color: var(--accent-ink); border-radius: 99px; padding: 2px 9px; }
.due-ok { color: var(--ok, #57c78a); font-weight: 600; margin: 0; }
.due-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.due-item { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line-2, var(--line)); border-radius: 14px; background: var(--surface); color: inherit; text-decoration: none; }
.due-item:hover { border-color: var(--accent); }
.due-item.late { border-color: rgba(255, 90, 90, .55); }
.due-item span { font-size: 13.5px; color: var(--muted); }
.due-item .due-act { color: var(--accent); font-weight: 600; }

/* Firma de la plataforma: siempre visible, también con el logo del nutricionista */
.powered { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 9px; line-height: 1.1; letter-spacing: .04em; color: var(--muted); text-align: center; }
.powered b { font-family: var(--display); font-size: 10px; font-weight: 700; letter-spacing: .12em; color: var(--fg); }
.powered-app { flex-direction: row; justify-content: center; gap: 6px; margin: 22px 0 10px; font-size: 11px; }
.powered-app b { font-size: 12px; }
@media (max-width: 860px) { .side .powered { display: none; } }
