/* Estilos de la app de stock del hogar.
   Parte 1: base heredada de la maqueta. Parte 2: tema Marea (opción 1), claro/oscuro. */
/* Estilo app de salud: fondo gris claro, tarjetas blancas sin borde, listas agrupadas con separadores finos,
   números grandes redondeados y colores suaves. Índigo para Enfermería, turquesa para Cocina.
   Rojo, naranja y verde solo para el estado, siempre con una palabra al lado. */
:root {
  --bg: #F2F2F7; --surface: #FFFFFF; --surface-2: #F2F2F7; --ink: #1C1C1E; --muted: #6C6C70; --line: #E5E5EA; --glass: rgba(242,242,247,.86); --campo-borde: #767680;
  --side: #FFFFFF;
  --enf: #5856D6; --enf-soft: #EEEEFB; --enf-ink: #FFFFFF;
  --coc: #076779; --coc-soft: #E2F3F7; --coc-ink: #FFFFFF;
  --ok: #1B6E2F; --ok-bg: #E4F5E8; --warn: #B25000; --warn-bg: #FFF0DE; --bad: #D70015; --bad-bg: #FDE6E8; --on-bad: #FFFFFF;
  --focus: #B45309;
  --sombra: 0 1px 2px rgba(0,0,0,.04), 0 2px 10px rgba(0,0,0,.035); --sombra-seg: 0 1px 3px rgba(0,0,0,.14), 0 1px 1px rgba(0,0,0,.06); --sombra-fuerte: 0 12px 40px rgba(0,0,0,.18);
  --tel-marco: #0B0B0F; --tel-1: #6E6CE8; --tel-2: #1C8CA6; --tel-ink: #FFFFFF; --tel-card: rgba(255,255,255,.2);
  --acc: var(--enf); --acc-soft: var(--enf-soft); --acc-ink: var(--enf-ink);
  --display: "Nunito", "SF Pro Rounded", "Segoe UI", system-ui, sans-serif;
  --cuerpo: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #000000; --surface: #1C1C1E; --surface-2: #2C2C2E; --ink: #F2F2F7; --muted: #98989F; --line: #38383A; --glass: rgba(0,0,0,.8);
  --side: #1C1C1E;
  --enf: #8E8CFF; --enf-soft: #26254A; --enf-ink: #0B0B1A;
  --coc: #5AC8E0; --coc-soft: #0E3038; --coc-ink: #03181D;
  --ok: #30D158; --ok-bg: #0F2D17; --warn: #FF9F0A; --warn-bg: #3A2606; --bad: #FF453A; --bad-bg: #3D1210; --on-bad: #000000;
  --focus: #FFB340;
  --sombra: none; --sombra-seg: 0 1px 3px rgba(0,0,0,.5); --sombra-fuerte: 0 12px 40px rgba(0,0,0,.6);
  color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #000000; --surface: #1C1C1E; --surface-2: #2C2C2E; --ink: #F2F2F7; --muted: #98989F; --line: #38383A; --glass: rgba(0,0,0,.8);
  --side: #1C1C1E;
  --enf: #8E8CFF; --enf-soft: #26254A; --enf-ink: #0B0B1A;
  --coc: #5AC8E0; --coc-soft: #0E3038; --coc-ink: #03181D;
  --ok: #30D158; --ok-bg: #0F2D17; --warn: #FF9F0A; --warn-bg: #3A2606; --bad: #FF453A; --bad-bg: #3D1210; --on-bad: #000000;
  --focus: #FFB340;
  --sombra: none; --sombra-seg: 0 1px 3px rgba(0,0,0,.5); --sombra-fuerte: 0 12px 40px rgba(0,0,0,.6);
  color-scheme: dark; }

* { box-sizing: border-box; }
html { font-size: 17px; } html.grande { font-size: 20px; }
body { background: var(--bg); color: var(--ink); font: 400 1rem/1.45 var(--cuerpo); margin: 0; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
h1, h2, h3, p { margin: 0; }
h2 { font-family: var(--display); font-weight: 900; letter-spacing: -.01em; line-height: 1.1; text-wrap: balance; }
h3 { font-weight: 700; font-size: 1.02rem; line-height: 1.25; }
button, input, select { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.pad { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.ic { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }

.app { display: grid; min-height: 100vh; }
.app.coc { --acc: var(--coc); --acc-soft: var(--coc-soft); --acc-ink: var(--coc-ink); }
.app.pan { --acc: #B45309; --acc-soft: rgba(217,119,6,.16); --acc-ink: #FFFFFF; }
@media (min-width: 960px) { .app { grid-template-columns: 264px minmax(0, 1fr); } }

/* Menú lateral claro */
.side { display: none; }
@media (min-width: 960px) {
  .side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--side); border-right: 1px solid var(--line);
    padding-block: 20px 16px; padding-left: max(14px, env(safe-area-inset-left, 0px)); padding-right: 14px; }
}
.marca { display: flex; gap: 11px; align-items: center; padding: 0 4px; }
.marca-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--acc); color: var(--acc-ink); flex: none; }
.marca-ic .ic { width: 23px; height: 23px; stroke-width: 2.4; }
.marca-ic.chico { width: 32px; height: 32px; border-radius: 9px; } .marca-ic.chico .ic { width: 19px; height: 19px; }
.marca b { font: 900 1.15rem/1.1 var(--display); display: block; }
.marca small { color: var(--muted); font-size: .8rem; }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 3px; border-radius: 12px; background: var(--surface-2); }
.seg button { display: flex; gap: 6px; align-items: center; justify-content: center; min-height: 42px; padding: 4px 8px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); font-weight: 800; cursor: pointer; }
.seg button[aria-pressed=true] { background: var(--surface); color: var(--ink); box-shadow: var(--sombra-seg); }
.seg button[aria-pressed=true] .ic { color: var(--acc); }
.seg button[disabled] { opacity: .4; cursor: not-allowed; }

.nav-g { display: grid; gap: 1px; }
.nav-t { font-size: .74rem; color: var(--muted); font-weight: 800; padding: 6px 10px 4px; }
.nav-b { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 42px; padding: 7px 10px; border-radius: 10px; border: 0; background: transparent; color: var(--ink); font-weight: 600; cursor: pointer; text-align: left; }
.nav-b:hover { background: var(--surface-2); }
.nav-b .ic { color: var(--acc); }
.nav-b[aria-current=page] { background: var(--acc); color: var(--acc-ink); font-weight: 800; }
.nav-b[aria-current=page] .ic { color: var(--acc-ink); }
.badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--bad); color: var(--on-bad); font: 800 .76rem/22px var(--cuerpo); text-align: center; }

.yo { margin-top: auto; display: grid; gap: 10px; padding: 12px; border-radius: 14px; background: var(--surface-2); }
.yo-fila { display: flex; gap: 11px; align-items: center; min-width: 0; }
.yo-fila > span:last-child { min-width: 0; display: grid; }
.yo small, .mas-yo small { color: var(--muted); font-size: .82rem; }
.ava { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; font: 900 1.05rem/1 var(--display); background: var(--acc-soft); color: var(--acc); border: 0; }
.yo label, .mas-yo label { display: grid; gap: 4px; font-size: .78rem; font-weight: 800; color: var(--muted); }

/* Barra superior */
.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 6; background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px); border-bottom: 1px solid var(--line); }
.top .in { max-width: 1120px; width: 100%; margin-inline: auto; padding-block: 10px; display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; justify-content: space-between; }
.top-marca { display: flex; gap: 9px; align-items: center; font: 900 1.08rem/1 var(--display); }
.top-r { display: flex; gap: 8px; align-items: center; }
.chip-maq { font-size: .76rem; font-weight: 800; padding: 5px 11px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); white-space: nowrap; }
.btn-ghost { min-height: 40px; padding: 4px 14px; border-radius: 11px; border: 0; background: var(--surface); box-shadow: var(--sombra); font-weight: 700; cursor: pointer; }
.top .seg { width: 100%; }
@media (min-width: 960px) { .top .seg, .top-marca, .ava-btn { display: none !important; } }
@media (max-width: 959px) { .top-fecha, #top-letra, #top-sumar { display: none; } .main { padding-bottom: calc(86px + env(safe-area-inset-bottom, 0px)); } }
@media (max-width: 520px) { .chip-maq .largo { display: none; } }
.top-fecha { font-weight: 700; color: var(--muted); }

/* Contenido */
#app { width: 100%; max-width: 1120px; margin-inline: auto; padding-block: 22px 30px; display: grid; gap: 22px; align-content: start; }
#app.entra > * { animation: entra .3s cubic-bezier(.2,.8,.2,1) both; }
#app.entra > *:nth-child(2) { animation-delay: .03s; } #app.entra > *:nth-child(3) { animation-delay: .06s; }
@keyframes entra { from { transform: translateY(8px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { #app.entra > * { animation: none; } }
.titulo, .vista-h { display: grid; gap: 4px; }
.fecha { font-size: .8rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.titulo h2, .vista-h h2 { font-size: clamp(2rem, 1.6rem + 1.6vw, 2.6rem); }
.saludo, .vista-h p { color: var(--muted); font-size: 1.05rem; max-width: 60ch; }

.card { background: var(--surface); border-radius: 20px; padding: 16px 18px; display: grid; gap: 12px; box-shadow: var(--sombra); min-width: 0; align-content: start; }
.cards { display: grid; gap: 16px; }
@media (min-width: 900px) { .cards { grid-template-columns: 1fr 1fr; } .card.ancha { grid-column: 1 / -1; } }
.ch { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 32px; }
.ch-l { display: flex; align-items: center; gap: 7px; font-weight: 800; color: var(--k, var(--acc)); }
.ch-r { display: flex; align-items: center; gap: 2px; color: var(--muted); font-size: .9rem; font-weight: 600; background: none; border: 0; cursor: pointer; min-height: 36px; padding: 0; }
.ch-r .ic { width: 1em; height: 1em; }
.k-bad { --k: var(--bad); } .k-warn { --k: var(--warn); } .k-ok { --k: var(--ok); }
.dato { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.dato b { font: 900 2.5rem/1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.dato span { color: var(--muted); font-weight: 700; }
.ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.ul li { color: var(--muted); font-size: .94rem; } .ul b { color: var(--ink); }
.vacio { color: var(--muted); }
.link { background: none; border: 0; color: var(--acc); font-weight: 800; cursor: pointer; padding: 4px 0; min-height: 36px; justify-self: start; }

.rapidas { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rapida { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 20px; border: 0; background: var(--surface); box-shadow: var(--sombra); cursor: pointer; text-align: left; min-width: 0; }
.rapida > span:last-child { display: grid; min-width: 0; font: 900 1.08rem/1.15 var(--display); }
.rapida small { font: 400 .86rem/1.3 var(--cuerpo); color: var(--muted); }
.ri { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--acc); color: var(--acc-ink); }
.ri .ic { width: 24px; height: 24px; stroke-width: 2.6; }
.rapida.sacar .ri { background: var(--acc-soft); color: var(--acc); }
@media (max-width: 420px) { .rapida small { display: none; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 10px 22px; border-radius: 14px; border: 0; background: var(--acc); color: var(--acc-ink); font-weight: 800; cursor: pointer; }
.btn:active, .rapida:active, .redondo:active { transform: scale(.98); }
.btn.sec { background: var(--acc-soft); color: var(--acc); }
.btn.chico { min-height: 40px; padding: 6px 14px; font-size: .92rem; border-radius: 12px; }
.btn.peligro { background: var(--bad-bg); color: var(--bad); }

.n2 { --c: var(--bad); --cb: var(--bad-bg); } .n1 { --c: var(--warn); --cb: var(--warn-bg); } .n0 { --c: var(--ok); --cb: var(--ok-bg); }
.pill { font-size: .8rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--cb); color: var(--c); white-space: nowrap; }
.pill.neutro { background: var(--surface-2); color: var(--muted); }
.mini { display: flex; flex-wrap: wrap; gap: 6px; }
.mini span { padding: 4px 11px; border-radius: 999px; background: var(--cb); color: var(--c); font-weight: 800; font-size: .86rem; }
.cat { font-size: .74rem; font-weight: 700; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 2px 8px; white-space: nowrap; vertical-align: 2px; }
.msg { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; font-weight: 700; background: var(--ok-bg); color: var(--ok); }
.msg.mal { background: var(--bad-bg); color: var(--bad); }
.msg .ic { margin-top: 2px; }

/* Listas agrupadas */
.seccion { display: grid; gap: 8px; }
.sec-t { font: 900 1.25rem/1.2 var(--display); display: flex; gap: 8px; align-items: baseline; }
.sec-t span { font: 700 .9rem/1 var(--cuerpo); color: var(--muted); }
.sec-s { color: var(--muted); font-size: .92rem; }
.gl { background: var(--surface); border-radius: 20px; box-shadow: var(--sombra); overflow: hidden; }
.gl > * + *, .gl-in > * + * { border-top: 1px solid var(--line); }
.gl-in { margin-inline: -18px; }
.fila { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; padding: 13px 18px; }
.dias { width: 56px; min-height: 56px; border-radius: 16px; display: grid; place-content: center; text-align: center; background: var(--cb); color: var(--c); padding: 4px; }
.dias b { font: 900 1.35rem/1 var(--display); font-variant-numeric: tabular-nums; }
.dias span { font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; margin-top: 2px; }
.dias.stock { width: 70px; }
.dias.ico .ic { width: 24px; height: 24px; }
.fila-c { display: grid; gap: 3px; min-width: 0; }
.fila-c p { color: var(--muted); font-size: .9rem; }
.lote { font: 500 .76rem/1.3 var(--mono); color: var(--muted); letter-spacing: .02em; }
.fila-r { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
@media (max-width: 600px) { .fila { grid-template-columns: auto minmax(0, 1fr); } .fila-r { grid-column: 2; justify-content: flex-start; } }
.barra { display: flex; gap: 2px; height: 8px; border-radius: 999px; overflow: hidden; background: var(--surface-2); margin-top: 4px; max-width: 360px; }
.barra span { background: var(--c); flex-basis: 0; min-width: 5px; }
.pm { display: flex; gap: 8px; }
.redondo { width: 46px; height: 46px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--acc-soft); color: var(--acc); cursor: pointer; }
.redondo.mas { background: var(--acc); color: var(--acc-ink); }
.redondo .ic { width: 22px; height: 22px; stroke-width: 2.6; }
.mini-link { background: none; border: 0; padding: 4px 0; color: var(--acc); font-weight: 800; font-size: .88rem; cursor: pointer; justify-self: start; }
.prod form { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin-top: 6px; }
.filtros { display: flex; flex-wrap: wrap; gap: 8px; }
.filtros button { min-height: 40px; padding: 4px 15px; border-radius: 999px; border: 0; background: var(--surface); box-shadow: var(--sombra); font-weight: 700; cursor: pointer; }
.filtros button[aria-pressed=true] { background: var(--acc); color: var(--acc-ink); }

/* Gráficos */
.regla { display: grid; gap: 6px; }
.regla-pista { position: relative; height: 62px; border-radius: 12px; background: var(--surface-2); overflow: hidden; }
.regla-banda { position: absolute; top: 0; bottom: 0; }
.regla-banda.r { background: var(--bad-bg); } .regla-banda.a { background: var(--warn-bg); }
.regla-hoy { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--ink); opacity: .4; }
.punto { position: absolute; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px var(--surface); }
.regla-ticks { position: relative; height: 1.3em; font: 700 .76rem/1.3 var(--cuerpo); color: var(--muted); }
.regla-ticks span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.regla-ticks span.ini { transform: none; } .regla-ticks span.fin { transform: translateX(-100%); }
.aviso-rojo { color: var(--bad); font-weight: 800; font-size: .94rem; }

.anillos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.anillo-item { display: grid; justify-items: center; text-align: center; gap: 2px; min-width: 0; }
.anillo-item b { font-weight: 800; } .anillo-item small { color: var(--muted); font-size: .82rem; }
.anillo { position: relative; width: 74px; height: 74px; flex: none; display: block; }
.anillo svg { width: 100%; height: 100%; transform: rotate(-90deg); display: block; }
.anillo circle { fill: none; stroke-width: 9; }
.anillo .pista { stroke: var(--surface-2); } .anillo .valor { stroke: var(--acc); stroke-linecap: round; }
.anillo.lleno .valor { stroke: var(--ok); }
.anillo b { position: absolute; inset: 0; display: grid; place-items: center; font: 900 1rem/1 var(--display); }
.cob-h { display: flex; gap: 16px; align-items: center; }

.alc { display: grid; gap: 10px; }
.alc-f, .alc-escala { display: grid; grid-template-columns: minmax(0, 8.5em) minmax(0, 1fr) 3.2em; gap: 10px; align-items: center; }
.alc-n { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alc-b { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.alc-b i { display: block; height: 100%; background: var(--c); border-radius: 999px; }
.alc-d { font: 900 .95rem/1 var(--display); text-align: right; color: var(--c); }
.alc-t { position: relative; height: 1.3em; font-size: .74rem; color: var(--muted); font-weight: 700; }
.alc-t span { position: absolute; top: 0; white-space: nowrap; }

.ped { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 16px; align-items: center; padding: 13px 18px; }
.ped-n { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.ped-barra { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.ped-barra span { display: block; height: 100%; background: var(--c); border-radius: 999px; }
.ped-num { grid-column: 1 / -1; color: var(--muted); font-size: .88rem; }
.ped-num b { color: var(--ink); }
.ped-acc { grid-column: 1 / -1; }
@media (max-width: 640px) { .ped { grid-template-columns: 1fr; } }

/* Formularios */
.form-grid { display: grid; gap: 16px; }
@media (min-width: 1000px) { .form-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; } }
.campo { display: grid; gap: 5px; min-width: 0; }
.campo > span { font-weight: 800; font-size: .94rem; }
.campo small, .campo > span small { color: var(--muted); font-weight: 400; }
select, input[type=text], input[type=number], input[type=date] { min-height: 52px; padding: 10px 14px; border: 2px solid var(--campo-borde); border-radius: 13px; background: var(--surface-2); width: 100%; min-width: 0; }
select:focus, input:focus { border-color: var(--acc); background: var(--surface); outline: none; }
select option, select optgroup { background-color: var(--surface); color: var(--ink); }
select { color-scheme: inherit; }
select.sel-ok { display: none; }
.adiv { display: block; margin-top: 8px; font-weight: 700; color: var(--acc); }
.busca { margin: 12px 0; }
.busca input { font-size: 1.1rem; min-height: 52px; }
.sug-ay { margin: 0 0 8px; color: var(--muted); }
.sug-b { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { min-height: 48px; padding: 6px 18px; border-radius: 999px; border: 2px solid var(--campo-borde); background: var(--surface); color: var(--ink); font-weight: 800; cursor: pointer; }
.chips button[aria-checked=true] { background: var(--acc); color: var(--acc-ink); border-color: var(--acc); }
.dos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .dos { grid-template-columns: 1fr; } }
.nuevo { display: grid; gap: 12px; padding: 14px; border-radius: 16px; background: var(--acc-soft); }
.ayuda p { color: var(--muted); }
.pres { display: grid; gap: 12px; padding: 14px; border-radius: 16px; background: var(--acc-soft); }
.conv { font-weight: 800; padding: 10px 12px; border-radius: 12px; background: var(--surface); }
.plan { padding: 14px 16px; border-radius: 14px; background: var(--acc-soft); font-weight: 700; }
.caja { display: grid; grid-template-columns: minmax(0, 1fr) 84px; height: 140px; }
.caja-f { background: var(--surface-2); border-radius: 14px 0 0 14px; padding: 14px; display: grid; align-content: end; gap: 2px; position: relative; overflow: hidden; }
.caja-f::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 30%; background: var(--acc); }
.caja-f b { font: 900 1.25rem/1 var(--display); } .caja-f span { color: var(--muted); font-size: .86rem; }
.caja-l { background: var(--acc-soft); border-radius: 0 14px 14px 0; display: grid; place-content: center; gap: 8px; padding: 8px; }
.caja-l span { font: 700 .74rem/1.25 var(--mono); color: var(--ink); border: 1.5px dashed var(--acc); border-radius: 5px; padding: 3px 4px; text-align: center; }
.cont { display: grid; grid-template-columns: minmax(0, 1fr) 130px; gap: 4px 14px; align-items: center; padding: 12px 18px; }
.cont .sis { color: var(--muted); font-size: .9rem; } .cont .dif { grid-column: 1 / -1; font-weight: 800; min-height: 1.2em; }
.dif.s { color: var(--ok); } .dif.m { color: var(--warn); }
@media (max-width: 560px) { .cont { grid-template-columns: 1fr; } }

/* Ajustes estilo iPhone */
.ajuste { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 14px; align-items: center; width: 100%; padding: 12px 16px; border: 0; background: transparent; text-align: left; cursor: pointer; }
.ajuste > span:nth-child(2) { display: grid; min-width: 0; }
.ajuste small { color: var(--muted); font-size: .86rem; }
.ajuste > .ic { color: var(--muted); width: 1em; height: 1em; }
.aj-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--acc); color: var(--acc-ink); }
.aj-ic .ic { width: 20px; height: 20px; }
.mas-yo { padding: 16px; }
.mas-yo select { margin-top: 4px; }

/* Teléfono de avisos */
.telefonos { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.tel { width: 100%; max-width: 330px; margin-inline: auto; padding: 11px; border-radius: 48px; background: var(--tel-marco); box-shadow: var(--sombra-fuerte); }
.tel-p { min-height: 560px; border-radius: 38px; padding: 14px 13px 22px; color: var(--tel-ink); background: linear-gradient(165deg, var(--tel-1), var(--tel-2)); display: grid; align-content: start; gap: 10px; }
.tel-isla { width: 100px; height: 28px; border-radius: 999px; background: var(--tel-marco); margin: 0 auto 10px; }
.tel-hora { font: 900 4rem/1 var(--display); text-align: center; letter-spacing: -.02em; }
.tel-fecha { text-align: center; opacity: .9; margin-bottom: 16px; font-weight: 700; }
.tel-noti { background: var(--tel-card); border-radius: 20px; padding: 12px 14px; display: grid; gap: 4px; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.tel-app { display: flex; gap: 8px; align-items: center; font-size: .78rem; opacity: .92; }
.tel-app small { margin-left: auto; }
.tel-logo { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: var(--tel-ink); color: var(--tel-1); }
.tel-logo .ic { width: 15px; height: 15px; stroke-width: 2.6; }
.tel-noti ul { margin: 2px 0 0; padding-left: 18px; font-size: .9rem; display: grid; gap: 3px; }

/* Pestañas del celular */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 8; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px;
  padding: 6px max(6px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px));
  background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px); border-top: 1px solid var(--line); }
@media (min-width: 960px) { .tabbar { display: none; } }
.tab { position: relative; display: grid; justify-items: center; align-content: center; gap: 2px; padding: 4px 2px; min-height: 54px; border: 0; background: none; color: var(--muted); font-size: .7rem; line-height: 1.1; font-weight: 700; cursor: pointer; text-align: center; }
.tab .ic { width: 25px; height: 25px; }
.tab[aria-current=page] { color: var(--acc); }
.tab-c { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--acc); color: var(--acc-ink); }
.tab-c .ic { width: 22px; height: 22px; stroke-width: 2.8; }
.tab .bm { position: absolute; top: 1px; left: calc(50% + 5px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--bad); color: var(--on-bad); font: 800 .68rem/18px var(--cuerpo); }

#toast { position: fixed; z-index: 20; top: calc(12px + env(safe-area-inset-top, 0px)); left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); max-width: 420px; margin-inline: auto;
  background: var(--surface); border-radius: 22px; padding: 12px 14px; box-shadow: var(--sombra-fuerte); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start;
  transform: translateY(-200%); transition: transform .45s cubic-bezier(.2,.9,.25,1.15); }
#toast.ver { transform: translateY(0); }
#toast small { color: var(--muted); }
.toast-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--acc); color: var(--acc-ink); }
@media (min-width: 960px) { #toast { left: auto; right: 24px; margin: 0; } }
@media (prefers-reduced-motion: reduce) { #toast { transition: none; } }

button, .tab, .nav-b { min-height: 44px !important; }
.ava-btn { min-width: 44px; min-height: 44px; }
.conf { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; overflow-y: auto; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); background: rgba(0,0,0,.5); }
#lock.conf { background: var(--bg); z-index: 60; }
.vacio-g { text-align: center; display: grid; gap: 12px; justify-items: center; }
.conf-c { width: min(460px, 100%); background: var(--surface); color: var(--ink); border-radius: 20px; padding: 20px; display: grid; gap: 14px; box-shadow: var(--sombra-fuerte); }
.conf-c h3 { font: 900 1.25rem/1.2 var(--display); }
.conf-c p, .conf-c small { color: var(--muted); }
.conf-b { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.conf-c input, .conf-c select, .conf-c textarea { width: 100%; min-height: 52px; padding: 10px 14px; border: 2px solid var(--campo-borde); border-radius: 13px; background: var(--surface-2); }
.conf-c textarea { min-height: 150px; font: .8rem/1.4 var(--mono); }
.pie { max-width: 1120px; width: 100%; margin-inline: auto; padding-block: 0 26px; color: var(--muted); font-size: .85rem; display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; align-items: center; }
.mas summary { cursor: pointer; font-weight: 800; color: var(--acc); padding: 10px 2px; min-height: 44px; display: flex; align-items: center; }
.mas-c { display: grid; gap: 12px; padding: 4px 0 8px; }
.pres #e-cant { font-size: 1.5rem; font-weight: 800; min-height: 64px; }
.edita { display: grid; gap: 12px; padding: 14px; margin-top: 8px; border-radius: 14px; background: var(--acc-soft); }
.edita .acc { display: flex; flex-wrap: wrap; gap: 10px; }
.atras { justify-self: start; display: inline-flex; align-items: center; min-height: 40px; padding: 6px 12px 6px 4px; margin-left: -4px; border: 0; border-radius: 10px; background: none; color: var(--acc); font-weight: 800; font-size: 1rem; cursor: pointer; }
.atras:active { background: var(--acc-soft); }
.pare { display: grid; gap: 8px; justify-items: start; padding: 10px 12px; border-radius: 12px; background: var(--surface); }
.pare p { font-weight: 700; }
.nro { color: var(--acc); font-weight: 900; }

/* ===== PARTE 2 ===== */
/* ===== TEMA MAREA v3 (prueba): sobrio, nativo, legible; modo oscuro y claro. Solo cambia el aspecto. =====
   Marca = azul. Cocina = lavanda. Verde/ámbar/rojo = SOLO estado (siempre con palabra y símbolo). */
html:root:root:root {
  color-scheme: dark;
  --bg: #0A141D; --surface: #111F2C; --surface-2: #192B3B; --ink: #EAF1F6; --muted: #A4B8C7; --line: #223647;
  --glass: rgba(10,20,29,.9); --campo-borde: #3F576B; --side: #0C1822;
  --enf: #6DB6FF; --enf-soft: rgba(109,182,255,.16); --enf-ink: #04182B;
  --coc: #BDAEFF; --coc-soft: rgba(189,174,255,.17); --coc-ink: #1B1040;
  --ok: #55D6AE; --ok-bg: rgba(85,214,174,.14); --warn: #F4B84E; --warn-bg: rgba(244,184,78,.15); --bad: #FF8686; --bad-bg: rgba(255,134,134,.15); --on-bad: #2A0A0C;
  --focus: #F4B84E;
  --sombra: none; --sombra-seg: 0 1px 2px rgba(0,0,0,.5); --sombra-fuerte: 0 16px 40px rgba(0,0,0,.6);
  --campo-bg: #0C1823; --bar-bg: rgba(12,24,34,.95); --toast-bg: #162A3B; --seg-bg: #0C1823; --anillo: #0C1822;
  --glow: rgba(46,100,128,.30); --glow-coc: rgba(120,100,200,.22); --bg-coc: #0D0B14;
  --display: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
}
/* modo claro: elección manual (data-tema="claro") o siguiendo al teléfono (sin elección) */
html:root:root:root[data-tema="claro"] {
  color-scheme: light;
  --bg: #F2F5F8; --surface: #FFFFFF; --surface-2: #E8EEF4; --ink: #13202B; --muted: #4D6375; --line: #D2DBE3;
  --glass: rgba(242,245,248,.92); --campo-borde: #7C93A5; --side: #FFFFFF;
  --enf: #0F5FB8; --enf-soft: rgba(15,95,184,.10); --enf-ink: #FFFFFF;
  --coc: #5B3FC4; --coc-soft: rgba(91,63,196,.10); --coc-ink: #FFFFFF;
  --ok: #0A7456; --ok-bg: rgba(10,116,86,.12); --warn: #8A5400; --warn-bg: rgba(138,84,0,.13); --bad: #C0262B; --bad-bg: rgba(192,38,43,.11); --on-bad: #FFFFFF;
  --focus: #8A5400;
  --sombra: 0 1px 2px rgba(15,35,55,.06); --sombra-seg: 0 1px 2px rgba(15,35,55,.15); --sombra-fuerte: 0 16px 40px rgba(15,35,55,.22);
  --campo-bg: #FFFFFF; --bar-bg: rgba(255,255,255,.95); --toast-bg: #FFFFFF; --seg-bg: #E4EBF1; --anillo: #FFFFFF;
  --glow: rgba(15,95,184,.10); --glow-coc: rgba(91,63,196,.10); --bg-coc: #F5F3FA;
}
@media (prefers-color-scheme: light) {
  html:root:root:root:not([data-tema="oscuro"]):not([data-tema="claro"]) {
    color-scheme: light;
    --bg: #F2F5F8; --surface: #FFFFFF; --surface-2: #E8EEF4; --ink: #13202B; --muted: #4D6375; --line: #D2DBE3;
    --glass: rgba(242,245,248,.92); --campo-borde: #7C93A5; --side: #FFFFFF;
    --enf: #0F5FB8; --enf-soft: rgba(15,95,184,.10); --enf-ink: #FFFFFF;
    --coc: #5B3FC4; --coc-soft: rgba(91,63,196,.10); --coc-ink: #FFFFFF;
    --ok: #0A7456; --ok-bg: rgba(10,116,86,.12); --warn: #8A5400; --warn-bg: rgba(138,84,0,.13); --bad: #C0262B; --bad-bg: rgba(192,38,43,.11); --on-bad: #FFFFFF;
    --focus: #8A5400;
    --sombra: 0 1px 2px rgba(15,35,55,.06); --sombra-seg: 0 1px 2px rgba(15,35,55,.15); --sombra-fuerte: 0 16px 40px rgba(15,35,55,.22);
    --campo-bg: #FFFFFF; --bar-bg: rgba(255,255,255,.95); --toast-bg: #FFFFFF; --seg-bg: #E4EBF1; --anillo: #FFFFFF;
    --glow: rgba(15,95,184,.10); --glow-coc: rgba(91,63,196,.10); --bg-coc: #F5F3FA;
  }
}
html { -webkit-text-size-adjust: 100%; }
body { background: radial-gradient(120% 45% at 50% -8%, var(--glow), transparent 70%), var(--bg); font-variant-numeric: tabular-nums; }
body::before { background: var(--bg); }
body:has(.app.coc) { background: radial-gradient(120% 45% at 50% -8%, var(--glow-coc), transparent 70%), var(--bg-coc); }
body:has(.app.coc)::before { background: var(--bg-coc); }

/* tipografía: una sola familia, jerarquía por peso y tamaño; nada por debajo de 13 px */
h2, .dato b, .anillo b, .marca b, .top-marca, .sec-t, .dias b, .ava { font-family: var(--display); }
.titulo h2, .vista-h h2 { font-size: clamp(1.9rem, 1.6rem + 1.2vw, 2.4rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.08; }
h2 { font-weight: 800; letter-spacing: -.02em; }
.fecha { font-size: .8rem; font-weight: 700; letter-spacing: .08em; color: var(--muted); }
.saludo, .vista-h p { color: var(--muted); font-size: 1rem; line-height: 1.45; }
.sec-t { font-size: 1.12rem; font-weight: 700; letter-spacing: -.01em; }
.sec-t span { color: var(--muted); font-weight: 600; }
.dato b, .dias b { font-weight: 800; letter-spacing: -.03em; }
.marca b, .top-marca { font-weight: 800; letter-spacing: -.01em; }
.lote { font-family: var(--cuerpo); font-weight: 500; letter-spacing: .01em; font-size: .82rem; }
.nav-t { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; padding-top: 10px; }
.dias span { font-size: .78rem; letter-spacing: .04em; }
.cat { font-size: .8rem; }
.pill { font-size: .82rem; }
.mini span { font-size: .86rem; }
.badge { font-size: .8rem; }
.anillo-item small, .campo small, .yo small, .marca small { font-size: .86rem; }
.chip-maq { font-size: .8rem; }

/* superficies: sólidas con línea fina (nítido y liviano) */
.card, .rapida, .gl { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sombra); border-radius: 18px; }
.btn-ghost, .yo { background: var(--surface); border: 1px solid var(--line); box-shadow: none; }
.seg { background: var(--seg-bg); border: 1px solid var(--line); padding: 3px; }
.seg button { font-weight: 700; }
.seg button[aria-pressed=true] { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); }
.top { background: var(--glass); border-bottom: 1px solid var(--line); }
.side { background: var(--side); }
.nav-b { font-weight: 600; border-radius: 12px; }
.nav-b:hover { background: var(--surface-2); }
.nav-b[aria-current=page] { background: var(--enf-soft); color: var(--acc); font-weight: 700; box-shadow: none; }
.app.coc .nav-b[aria-current=page] { background: var(--coc-soft); }
.nav-b[aria-current=page] .ic { color: var(--acc); }
.gl > * + *, .gl-in > * + * { border-top: 1px solid var(--line); }
.gl { overflow: hidden; }

/* botones: color plano, sin degradé */
.btn { background: var(--acc); color: var(--acc-ink); box-shadow: none; font-weight: 700; border-radius: 14px; letter-spacing: -.005em; }
.btn.sec { background: var(--acc-soft); color: var(--acc); border: 0; }
.btn.peligro { background: var(--bad-bg); color: var(--bad); }
.btn:active, .rapida:active, .redondo:active { transform: scale(.97); }
.btn, .rapida, .tab, .nav-b, .redondo, .filtros button { transition: transform .15s ease, background-color .15s ease; }
.rapida b { font-weight: 700; }
.redondo { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.redondo.mas { background: var(--acc); color: var(--acc-ink); border-color: transparent; }
.filtros button { background: var(--surface); border: 1px solid var(--line); box-shadow: none; font-weight: 600; }
.filtros button[aria-pressed=true] { background: var(--acc); color: var(--acc-ink); border-color: transparent; font-weight: 700; }
.chips button { border-width: 1.5px; font-weight: 600; background: var(--campo-bg); }
.chips button[aria-checked=true] { font-weight: 700; background: var(--acc); }
.marca-ic { background: var(--acc); box-shadow: none; color: var(--acc-ink); }
.ava { background: var(--acc-soft); color: var(--acc); font-weight: 800; border: 0; }

/* estados: color + palabra + símbolo */
.pill { font-weight: 700; padding: 3px 10px; letter-spacing: .005em; }
.pill.n2::before { content: "▲\00a0"; font-size: .7em; } .pill.n1::before { content: "◆\00a0"; font-size: .7em; } .pill.n0::before { content: "●\00a0"; font-size: .7em; }
.mini span { font-weight: 700; }
.cat { font-weight: 600; background: var(--surface-2); color: var(--muted); }
.dias { border-radius: 14px; }
.badge, .tab .bm { font-weight: 800; }
.anillo .valor { filter: none; }
.msg { font-weight: 600; border-radius: 14px; }
.aviso-rojo, .link, .mini-link, .ch-r, .ch-l { font-weight: 700; }

/* campos */
html input:not([type=checkbox]):not([type=radio]), html select, html textarea { background: var(--campo-bg); color: var(--ink); border: 1.5px solid var(--campo-borde); border-radius: 14px; }
html input:focus, html select:focus { border-color: var(--acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 30%, transparent); background: var(--campo-bg); }
html input::placeholder { color: var(--muted); opacity: .8; }
.campo > span { font-weight: 700; }

/* barra de abajo nativa: de lado a lado, destinos de 48 px o más, con texto legible */
.tabbar { left: 0; right: 0; bottom: 0; padding: 6px max(6px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px));
  border-radius: 0; background: var(--bar-bg); border: 0; border-top: 1px solid var(--line); box-shadow: none; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .tabbar { background: var(--surface); } .top { background: var(--bg); } }
.tab { color: var(--muted); font-weight: 600; font-size: .78rem; border-radius: 14px; min-height: 56px; min-width: 48px; }
.tab[aria-current=page] { color: var(--acc); font-weight: 700; }
.tab-c { width: 44px; height: 44px; margin-top: -12px; background: var(--acc); color: var(--acc-ink); box-shadow: 0 0 0 5px var(--anillo), 0 6px 14px rgba(0,0,0,.35); animation: none; }
.tab-c .ic { width: 22px; height: 22px; }
@media (max-width: 959px) { .main { padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)); } }
#toast { background: var(--toast-bg); border: 1px solid var(--line); }

/* botón de tema (claro / oscuro / seguir al teléfono) */
#top-tema { min-height: 40px; min-width: 44px; padding: 4px 12px; font-weight: 700; }
#top-tema .t-txt { margin-left: 6px; }
@media (max-width: 520px) { #top-tema .t-txt { display: none; } }

/* entrada: breve y discreta */
#app.entra > * { animation: entra2 .35s cubic-bezier(.2,.8,.2,1) both; }
#app.entra > *:nth-child(2) { animation-delay: .04s; } #app.entra > *:nth-child(3) { animation-delay: .08s; } #app.entra > *:nth-child(4) { animation-delay: .12s; } #app.entra > *:nth-child(5) { animation-delay: .16s; }
@keyframes entra2 { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { #app.entra > * { animation: none !important; } .btn, .rapida, .tab, .redondo, .nav-b { transition: none; } }

/* cifras grandes: letra compañera sin cero tachado */
.dias b, .dato b, .anillo b, .badge, .tab .bm { font-family: "Figtree", var(--display); font-weight: 800; }

/* símbolo de estado además del color (para quien no distingue colores) */
.n2 .pill:not(.neutro)::before, .mini .n2::before { content: "▲\00a0"; font-size: .7em; }
.n1 .pill:not(.neutro)::before, .mini .n1::before { content: "◆\00a0"; font-size: .7em; }
.n0 .pill:not(.neutro)::before, .mini .n0::before { content: "●\00a0"; font-size: .7em; }
/* ===== OPCIÓN 1: el aire de la captura (vidrio, brillo, barra flotante, saludo) con la letra clara sin serif ===== */
html:root:root:root {
  --enf: #5CE0B8; --enf-soft: rgba(92,224,184,.15); --enf-ink: #04202A;
  --ok: #8CE08C; --ok-bg: rgba(140,224,140,.14);
  --vidrio-a: rgba(255,255,255,.085); --vidrio-b: rgba(255,255,255,.04); --vidrio-borde: rgba(255,255,255,.11);
  --barra-vidrio: rgba(14,37,53,.80); --brillo: 40%; --brillo-fino: 22%;
}
html:root:root:root[data-tema="claro"] {
  --enf: #0B7E69; --enf-soft: rgba(11,126,105,.11); --enf-ink: #FFFFFF; --ok: #1F7A34; --ok-bg: rgba(31,122,52,.12);
  --vidrio-a: rgba(255,255,255,.92); --vidrio-b: rgba(255,255,255,.72); --vidrio-borde: rgba(15,35,55,.10);
  --barra-vidrio: rgba(255,255,255,.86); --brillo: 16%; --brillo-fino: 9%;
}
@media (prefers-color-scheme: light) {
  html:root:root:root:not([data-tema="oscuro"]):not([data-tema="claro"]) {
    --enf: #0B7E69; --enf-soft: rgba(11,126,105,.11); --enf-ink: #FFFFFF; --ok: #1F7A34; --ok-bg: rgba(31,122,52,.12);
    --vidrio-a: rgba(255,255,255,.92); --vidrio-b: rgba(255,255,255,.72); --vidrio-borde: rgba(15,35,55,.10);
    --barra-vidrio: rgba(255,255,255,.86); --brillo: 16%; --brillo-fino: 9%;
  }
}

/* fondo: luces de color como en la captura */
body { background: radial-gradient(90% 38% at 50% -4%, rgba(30,110,140,.55), transparent 70%), radial-gradient(60% 34% at 105% 70%, rgba(92,224,184,.12), transparent 70%), linear-gradient(#0A1A28, #06101A) fixed; background-color: #06101A; }
body::before { background: #0A1A28; }
body:has(.app.coc) { background: radial-gradient(90% 38% at 50% -4%, rgba(120,100,210,.42), transparent 70%), radial-gradient(60% 34% at 105% 70%, rgba(189,174,255,.10), transparent 70%), linear-gradient(#120F1E, #0A0812) fixed; background-color: #0A0812; }
body:has(.app.coc)::before { background: #120F1E; }
html:root:root:root[data-tema="claro"] body { background: radial-gradient(90% 38% at 50% -4%, rgba(46,140,170,.20), transparent 70%), radial-gradient(60% 34% at 105% 70%, rgba(11,126,105,.08), transparent 70%), #EEF3F7; }
html:root:root:root[data-tema="claro"] body::before { background: #EEF3F7; }
html:root:root:root[data-tema="claro"] body:has(.app.coc) { background: radial-gradient(90% 38% at 50% -4%, rgba(120,100,210,.16), transparent 70%), #F3F1F9; }
html:root:root:root[data-tema="claro"] body:has(.app.coc)::before { background: #F3F1F9; }
@media (prefers-color-scheme: light) {
  html:root:root:root:not([data-tema="oscuro"]):not([data-tema="claro"]) body { background: radial-gradient(90% 38% at 50% -4%, rgba(46,140,170,.20), transparent 70%), radial-gradient(60% 34% at 105% 70%, rgba(11,126,105,.08), transparent 70%), #EEF3F7; }
  html:root:root:root:not([data-tema="oscuro"]):not([data-tema="claro"]) body::before { background: #EEF3F7; }
  html:root:root:root:not([data-tema="oscuro"]):not([data-tema="claro"]) body:has(.app.coc) { background: radial-gradient(90% 38% at 50% -4%, rgba(120,100,210,.16), transparent 70%), #F3F1F9; }
  html:root:root:root:not([data-tema="oscuro"]):not([data-tema="claro"]) body:has(.app.coc)::before { background: #F3F1F9; }
}

/* saludo grande, con el nombre destacado */
.titulo h2 { font-size: clamp(2.1rem, 1.7rem + 1.6vw, 2.8rem); line-height: 1.02; }
.nombre-sal { color: var(--acc); }
.saludo { font-size: 1.02rem; }

/* vidrio */
.card, .rapida, .gl { background: linear-gradient(var(--vidrio-a), var(--vidrio-b)); border: 1px solid var(--vidrio-borde); border-radius: 22px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: none; }
.btn-ghost, .yo { background: linear-gradient(var(--vidrio-a), var(--vidrio-b)); border: 1px solid var(--vidrio-borde); }
.seg { background: color-mix(in srgb, var(--ink) 7%, transparent); border: 1px solid var(--vidrio-borde); }
.seg button[aria-pressed=true] { background: color-mix(in srgb, var(--ink) 16%, transparent); box-shadow: none; }
.top { background: color-mix(in srgb, var(--bg) 72%, transparent); }
.side { background: color-mix(in srgb, var(--side) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }

/* botones con degradé y brillo */
.btn { background: linear-gradient(135deg, var(--acc), color-mix(in srgb, var(--acc) 55%, #2AA6C9)); box-shadow: 0 10px 26px -12px color-mix(in srgb, var(--acc) 90%, transparent); }
.btn.sec { background: var(--acc-soft); box-shadow: none; border: 1px solid var(--vidrio-borde); }
.btn.peligro { box-shadow: none; }
.redondo.mas { background: linear-gradient(135deg, var(--acc), color-mix(in srgb, var(--acc) 55%, #2AA6C9)); box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--acc) 85%, transparent); }
.nav-b[aria-current=page] { background: linear-gradient(135deg, var(--acc), color-mix(in srgb, var(--acc) 60%, #2AA6C9)); color: var(--acc-ink); box-shadow: 0 8px 22px -10px var(--acc); }
.nav-b[aria-current=page] .ic { color: var(--acc-ink); }
.app.coc .nav-b[aria-current=page] { background: linear-gradient(135deg, var(--acc), color-mix(in srgb, var(--acc) 60%, #5B8CFF)); }
.marca-ic, .ava { box-shadow: 0 0 18px -2px color-mix(in srgb, var(--acc) var(--brillo), transparent); }
.marca-ic { background: linear-gradient(140deg, var(--acc), color-mix(in srgb, var(--acc) 50%, #2AA6C9)); }
.filtros button[aria-pressed=true], .chips button[aria-checked=true] { background: linear-gradient(135deg, var(--acc), color-mix(in srgb, var(--acc) 55%, #2AA6C9)); }

/* números y etiquetas con luz */
.fecha { color: var(--acc); letter-spacing: .12em; }
.dato b { text-shadow: 0 0 22px color-mix(in srgb, var(--k, var(--acc)) var(--brillo), transparent); }
.dias b { text-shadow: 0 0 14px color-mix(in srgb, var(--c) var(--brillo), transparent); }

/* filas: barra de color a la izquierda, como la línea de tiempo de la captura */
.gl > .fila, .gl-in > .fila { position: relative; }
.gl > .fila::before, .gl-in > .fila::before { content: ""; position: absolute; left: 0; top: 14%; bottom: 14%; width: 3px; border-radius: 0 3px 3px 0; background: var(--c, transparent); box-shadow: 0 0 12px color-mix(in srgb, var(--c, transparent) var(--brillo), transparent); }
.barra span { box-shadow: 0 0 10px color-mix(in srgb, var(--c) var(--brillo), transparent); }
.dias { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 26%, transparent); }

/* barra de abajo flotante, de vidrio, con "+" grande */
.tabbar { left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); bottom: calc(12px + env(safe-area-inset-bottom, 0px)); padding: 6px; border-radius: 28px;
  background: var(--barra-vidrio); border: 1px solid var(--vidrio-borde); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%); box-shadow: 0 16px 36px -12px rgba(0,0,0,.65); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .tabbar { background: var(--surface); } }
.tab[aria-current=page] .ic { filter: drop-shadow(0 0 7px color-mix(in srgb, var(--acc) var(--brillo), transparent)); }
.tab-c { width: 50px; height: 50px; margin-top: -16px; background: linear-gradient(135deg, var(--acc), color-mix(in srgb, var(--acc) 50%, #2AA6C9)); box-shadow: 0 0 0 4px var(--anillo), 0 0 24px -2px color-mix(in srgb, var(--acc) var(--brillo), transparent); }
.tab-c .ic { width: 25px; height: 25px; stroke-width: 2.6; }
@media (max-width: 959px) { .main { padding-bottom: calc(116px + env(safe-area-inset-bottom, 0px)); } }
#toast { background: color-mix(in srgb, var(--toast-bg) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }

/* entrada con vida */
#app.entra > * { animation: entra3 .55s cubic-bezier(.2,.8,.2,1) both; }
#app.entra > *:nth-child(2) { animation-delay: .06s; } #app.entra > *:nth-child(3) { animation-delay: .12s; } #app.entra > *:nth-child(4) { animation-delay: .18s; } #app.entra > *:nth-child(5) { animation-delay: .24s; }
@keyframes entra3 { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { #app.entra > * { animation: none !important; } }

/* ===== PARTE 3: celular, como la muestra B (anillo, serif, tres cifras, lo que vence primero) ===== */
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hero-cel { display: none; }
@property --p { syntax: "<number>"; inherits: false; initial-value: 0; }
@keyframes barrido { to { --p: var(--v); } }
/* Diseño sobrio (el de la PC) también en el celular, pedido de Gabriel 29/11. El anillo grande queda guardado sin usar. */
.hero-cel { display: none; }
@media (max-width: 959px) {
  /* barra de arriba: una sola fila, marca "D" + Enfermería/Cocina + tema + usuario */
  .top .in { flex-wrap: nowrap; gap: 8px; padding-block: 8px; }
  .top-marca { order: 1; font-size: 0; gap: 0; }
  .top .seg { order: 2; width: auto; flex: 1; min-width: 0; }
  .top-r { order: 3; flex: none; }
  .top .seg button { min-height: 40px; padding: 4px 6px; font-size: .9rem; min-width: 0; }
  .top .seg .ic { display: none; }
  .top .marca-ic.chico .ic { display: none; }
  .top .marca-ic.chico::before { content: "D"; font: 800 1.15rem/1 "Fraunces", Georgia, serif; }
  #top-tema { min-height: 40px; min-width: 40px; padding: 4px 10px; }

}
@media (prefers-reduced-motion: reduce) { .ag-arco { animation: none; --p: var(--v); } }

/* Área de Pañales (apagada hasta que haya una persona con ese rol): tono ámbar */
html:root:root:root .app.pan { --acc: #E8A94B; --acc-soft: rgba(232,169,75,.18); --acc-ink: #231402; }
html:root:root:root[data-tema="claro"] .app.pan { --acc: #9A5B00; --acc-soft: rgba(154,91,0,.12); --acc-ink: #FFFFFF; }
@media (prefers-color-scheme: light) { html:root:root:root:not([data-tema="oscuro"]) .app.pan { --acc: #9A5B00; --acc-soft: rgba(154,91,0,.12); --acc-ink: #FFFFFF; } }

/* Tres áreas (con Pañales) en una sola fila */
.seg:has(button:nth-child(3)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.top .seg:has(button:nth-child(3)) button { gap: 0; padding: 4px 2px; font-size: .8125rem; }
.top .seg:has(button:nth-child(3)) button .ic { display: none; }

/* Menú lateral de la PC: Enfermería / Cocina / Pañales sin cortarse */
.side .seg button { min-width: 0; padding: 4px 6px; gap: 5px; font-size: .9rem; }
.side .seg button .ic { flex: none; width: 16px; height: 16px; }
.side .seg:has(button:nth-child(3)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.side .seg:has(button:nth-child(3)) button .ic { display: none; }

/* Netlify (plan gratis) muestra su cartel fijo abajo a la derecha, 64 px de alto. Cuando está, la barra de abajo
   sube para que el cartel no tape botones. Si algún día se pasa a un plan sin cartel, esto no hace nada. */
body:has(#nl-badge-frame) .tabbar { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 959px) { body:has(#nl-badge-frame) .main { padding-bottom: calc(190px + env(safe-area-inset-bottom, 0px)); } }
@media (min-width: 960px) { body:has(#nl-badge-frame) .main { padding-bottom: 96px; } }

/* Casillas de áreas al agregar una persona */
.checks { border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px 12px; margin: 0; display: grid; gap: 8px; }
.checks legend { padding: 0 6px; font-weight: 700; }
.checks label { display: flex; align-items: center; gap: 10px; min-height: 40px; font-weight: 600; cursor: pointer; }
.checks input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--acc); flex: none; }
.checks .todas { border-top: 1px solid var(--line); padding-top: 6px; }
.checks .jefa { font-weight: 500; }
.checks small { color: var(--muted); }
.btn.peligro-txt { color: var(--bad); }

/* Ventana con el usuario y la clave nuevos */
.cred { display: grid; gap: 10px; margin: 8px 0 12px; }
.cred > div { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.cred small { grid-column: 1; color: var(--muted); font-size: .8rem; }
.cred b { grid-column: 1; font-size: 1.15rem; letter-spacing: .02em; word-break: break-all; }
.cred button { grid-column: 2; grid-row: 1 / span 2; }
.cred-b { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.btn.wa { background: #1FA855; color: #fff; text-decoration: none; display: inline-flex; align-items: center; }
.card.instalar { border-color: color-mix(in srgb, var(--acc) 45%, var(--line)); }
.card.instalar h3 { margin: 0 0 4px; }
#f-login small { display: block; margin-top: 10px; color: var(--muted); font-size: .85rem; }

/* Ventana simple: usuario y clave grandes, WhatsApp y Copiar */
.cred b { font-size: 1.45rem; }
.btn.wa.grande { display: flex; justify-content: center; width: 100%; min-height: 52px; font-size: 1.05rem; margin: 4px 0 8px; }
.conf-c > .btn.sec[data-cp] { width: 100%; }
/* Aviso de instalar en la pantalla de entrar */
.inst { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: -4px 0 14px; padding: 10px 12px; border-radius: 12px; background: var(--acc-soft); color: var(--ink); font-size: .92rem; line-height: 1.4; }
.inst .k { display: inline-block; padding: 0 6px; border-radius: 6px; background: var(--surface); font-weight: 700; }
.inst .btn { margin-left: auto; }

/* Botón Bajar la app en la primera pantalla */
.inst { display: grid; gap: 6px; background: transparent; padding: 0; margin: 0 0 16px; }
.inst .btn.grande { width: 100%; min-height: 54px; font-size: 1.08rem; justify-content: center; margin: 0; }
.inst small { text-align: center; color: var(--muted); font-size: .85rem; }
.pasos { margin: 6px 0 4px; padding: 0; list-style: none; display: grid; gap: 12px; counter-reset: p; }
.pasos li { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 10px; font-size: 1.02rem; line-height: 1.35; }
.paso-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--acc-soft); font-size: 1.35rem; font-weight: 800; }
