/* ============================================================
   Lactancia Diana — hoja de estilos
   Paleta cálida tipo "nursery": crema, rosa y ciruela.
   ============================================================ */

:root {
  --bg:        #fff7f4;
  --bg-blur:   #ffe6de;
  --surface:   #ffffff;
  --surface-2: #fdf1ed;
  --ink:       #2e1f2b;
  --muted:     #6e5a66;
  --line:      #f0dcd6;
  --track:     #f5e0d9;

  --accent:    #e0607e;
  --accent-ink:#ffffff;
  --accent-sf: #fdeef1;
  /* Rosa más oscuro solo para fondos con texto encima: el claro se queda
     en 3.4:1 con blanco y no llega a AA. */
  --accent-btn:#c23e60;
  --accent-btn-ink:#ffffff;
  --warm:      #f0a05a;
  --ok:        #43a48a;
  /* Verde más oscuro para fondos con texto encima: el de los indicadores
     se queda en 3:1 con blanco. */
  --ok-btn:    #2f7c68;
  --ok-btn-ink:#ffffff;

  --r-lg: 26px;
  --r-md: 18px;
  --r-sm: 12px;

  --sh-sm: 0 1px 2px rgba(46,31,43,.06), 0 4px 12px rgba(46,31,43,.05);
  --sh-md: 0 2px 4px rgba(46,31,43,.06), 0 12px 32px rgba(46,31,43,.08);

  --safe-b: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #16101a;
    --bg-blur:   #2b1b2c;
    --surface:   #221827;
    --surface-2: #2b2033;
    --ink:       #f5ecf2;
    --muted:     #a793a5;
    --line:      #362a3e;
    --track:     #4a3956;

    --accent:    #ff7e9d;
    --accent-ink:#2a0d18;
    --accent-sf: #35202c;
    --accent-btn:#ff7e9d;
    --accent-btn-ink:#2a0d18;
    --warm:      #f2b077;
    --ok:        #5ac0a4;
    --ok-btn:    #5ac0a4;
    --ok-btn-ink:#2a0d18;

    --sh-sm: 0 1px 2px rgba(0,0,0,.3), 0 4px 12px rgba(0,0,0,.25);
    --sh-md: 0 2px 4px rgba(0,0,0,.3), 0 12px 32px rgba(0,0,0,.35);
  }
}

:root[data-theme="dark"] {
  --bg:        #16101a;
  --bg-blur:   #2b1b2c;
  --surface:   #221827;
  --surface-2: #2b2033;
  --ink:       #f5ecf2;
  --muted:     #a793a5;
  --line:      #362a3e;
  --track:     #4a3956;

  --accent:    #ff7e9d;
  --accent-ink:#2a0d18;
  --accent-sf: #35202c;
  --accent-btn:#ff7e9d;
  --accent-btn-ink:#2a0d18;
  --warm:      #f2b077;
  --ok:        #5ac0a4;
  --ok-btn:    #5ac0a4;
  --ok-btn-ink:#2a0d18;

  --sh-sm: 0 1px 2px rgba(0,0,0,.3), 0 4px 12px rgba(0,0,0,.25);
  --sh-md: 0 2px 4px rgba(0,0,0,.3), 0 12px 32px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }

/* Una clase con display propio (.acceso, .hogar) gana al display:none que
   el navegador aplica a [hidden], y el atributo deja de ocultar nada. */
[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100dvh;
}

/* Halo de color detrás del contenido */
body::before {
  content: "";
  position: fixed;
  inset: -20% -20% auto -20%;
  height: 60vh;
  background: radial-gradient(60% 60% at 50% 0%, var(--bg-blur) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Sin esto, min-width:auto en los hijos del grid impide que el historial
   encoja y una nota larga ensancha la página entera. */
.app > * { min-width: 0; }

/* Las tarjetas están dentro del envoltorio de la pestaña, así que el gap
   de .app ya no las alcanza: cada vista rehace la rejilla por su cuenta. */
#vistaTomas { display: grid; gap: 14px; min-width: 0; }

.app {
  position: relative;
  z-index: 1;
  width: min(100% - 32px, 560px);
  margin: 0 auto;
  padding: 18px 0 calc(28px + var(--safe-b));
  display: grid;
  gap: 14px;
}

h1, h2 { margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 1.22rem; font-weight: 700; }
h2 { font-size: 1rem; font-weight: 700; }
p  { margin: 0; }

/* ---------------- Topbar ---------------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px;
}
.topbar__id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar__sub { font-size: .8rem; color: var(--muted); }
.topbar__actions { display: flex; gap: 8px; flex: none; }

.avatar {
  flex: none;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent), var(--warm));
  color: var(--accent-ink);
  font-weight: 700; font-size: 1.05rem;
  box-shadow: var(--sh-sm);
}

.iconbtn {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--sh-sm);
  transition: transform .15s ease, background .15s ease;
}
.iconbtn:active { transform: scale(.93); }
.iconbtn svg {
  width: 19px; height: 19px;
  fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
#btnTema svg { fill: currentColor; stroke: none; }

/* ---------------- Tarjetas ---------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--sh-sm);
}

/* Próxima toma */
.card--next { display: grid; gap: 6px; }
.next__label {
  display: flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted);
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ok); flex: none;
}
.next__time {
  font-size: 2.6rem; font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}
.next__meta { font-size: .85rem; color: var(--muted); }
.next__bar {
  margin-top: 8px;
  height: 7px; border-radius: 99px;
  background: var(--surface-2);
  overflow: hidden;
}
.next__fill {
  height: 100%; width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--ok), var(--warm));
  transition: width .6s ease;
}

.card--next.is-due { border-color: var(--accent); background: var(--accent-sf); }
.card--next.is-due .dot { background: var(--accent); animation: pulso 1.6s ease-in-out infinite; }
.card--next.is-due .next__time { color: var(--accent); }
.card--next.is-due .next__fill { background: var(--accent); }
.card--next.is-soon .dot { background: var(--warm); }

@keyframes pulso {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
  70%      { box-shadow: 0 0 0 9px transparent; }
}

/* ---------------- Temporizador ---------------- */
.card--timer { display: grid; gap: 16px; justify-items: center; padding: 24px 20px; }

.ring { position: relative; width: min(66vw, 230px); aspect-ratio: 1; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring__track {
  fill: none; stroke: var(--track); stroke-width: 14;
}
.ring__fill {
  fill: none; stroke: var(--accent); stroke-width: 14;
  stroke-linecap: round;
  stroke-dasharray: 603.2;      /* 2πr con r=96 */
  stroke-dashoffset: 603.2;
  transition: stroke-dashoffset .35s linear, stroke .3s ease;
}
/* El stroke-linecap redondo pinta un punto aunque no haya progreso. */
.ring.is-zero .ring__fill { stroke: transparent; }
.ring.is-complete .ring__fill { stroke: var(--ok); }
.ring.is-paused  .ring__fill { stroke: var(--warm); }

.ring__inner {
  position: absolute; inset: 0;
  display: grid; place-content: center; text-align: center; gap: 2px;
}
.ring__time {
  font-size: 2.7rem; font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.ring__goal { font-size: .78rem; color: var(--muted); }

/* Selector de pecho */
.lados { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.lado {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 10px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
  font: inherit; font-size: .92rem; font-weight: 600;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .12s ease;
}
.lado:active { transform: scale(.98); }
.lado__ico {
  width: 24px; height: 24px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
  font-size: .72rem; font-weight: 700; color: var(--muted);
}
.lado.is-on { border-color: var(--accent); background: var(--accent-sf); color: var(--accent-btn); }
.lado.is-on .lado__ico { background: var(--accent-btn); color: var(--accent-btn-ink); }
/* Con los dos pechos usados hay que ver cuál está en curso. */
.lado.is-current { box-shadow: inset 0 0 0 2px var(--accent); }
.lado__ahora {
  font-size: .62rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--accent-btn);
}

/* Controles */
.controles { display: flex; gap: 10px; width: 100%; }

.btn {
  flex: 1;
  padding: 15px 16px;
  border: 1.5px solid transparent;
  border-radius: var(--r-md);
  font: inherit; font-size: 1rem; font-weight: 700;
  cursor: pointer;
  transition: transform .12s ease, filter .15s ease;
}
.btn:active { transform: scale(.98); }
.btn--main   { background: var(--accent-btn); color: var(--accent-btn-ink); box-shadow: var(--sh-md); }
.btn--soft   { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
.btn--done   { background: var(--ok-btn); color: var(--ok-btn-ink); }

.hint { font-size: .8rem; color: var(--muted); text-align: center; }
.hint--tight { margin-top: -6px; }
.hint--left  { text-align: left; line-height: 1.5; }

/* ---------------- Estadísticas ---------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.stat {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 6px;
  text-align: center;
  box-shadow: var(--sh-sm);
}
.stat__n {
  font-size: 1.15rem; font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.stat__l { font-size: .72rem; color: var(--muted); line-height: 1.25; }

/* ---------------- Historial ---------------- */
.card--hist { padding: 18px 16px; }
.hist__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 8px; padding: 0 4px;
}

.hist__dia {
  margin-top: 12px;
  padding: 0 4px 4px;
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: .74rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted);
}
.hist__dia span:last-child { text-transform: none; letter-spacing: 0; font-weight: 600; }

.toma {
  display: flex; align-items: center; gap: 10px;
  min-width: 0;
  padding: 11px 10px;
  border-radius: var(--r-sm);
}
.toma + .toma { border-top: 1px solid var(--line); border-radius: 0; }
.toma__lado {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--accent-sf); color: var(--accent);
  font-size: .72rem; font-weight: 700;
}
/* La parte informativa de la fila es un botón que abre la edición. */
.toma__abrir {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 4px 0;
  border: none; border-radius: var(--r-sm);
  background: none; color: inherit;
  font: inherit; text-align: left;
  cursor: pointer;
  min-height: 44px;
}
.toma__abrir:active { opacity: .6; }
.toma__abrir:hover .toma__hora { color: var(--accent-btn); }

.toma__main { flex: 1; min-width: 0; }
.toma__hora { display: block; font-size: .95rem; font-weight: 600; font-variant-numeric: tabular-nums; }
/* Fluye hasta dos líneas en vez de recortarse: en una pantalla estrecha el
   hueco y la nota no caben en una sola y son justo lo que interesa leer.
   El desbordamiento horizontal que motivó el nowrap lo resuelve el
   min-width:0 de los hijos del grid, no este recorte. */
.toma__sub {
  font-size: .8rem; color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.toma__mas  { flex: none; color: var(--muted); font-size: 1.1rem; line-height: 1; }
.toma__dur {
  flex: none;
  font-size: .85rem; font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 4px 9px; border-radius: 99px;
  background: var(--surface-2); color: var(--ink);
}
.toma__del {
  flex: none;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: none; border-radius: 50%;
  background: transparent; color: var(--muted);
  font-size: 1.1rem; line-height: 1;
  cursor: pointer;
}
.toma__del:hover { background: var(--accent-sf); color: var(--accent); }

.vacio { text-align: center; color: var(--muted); font-size: .88rem; padding: 26px 10px; }
.vacio strong { display: block; color: var(--ink); font-size: .96rem; margin-bottom: 4px; }

/* ---------------- Botones auxiliares ---------------- */
.ghostbtn, .linkbtn, .primarybtn, .dangerbtn {
  font: inherit; cursor: pointer; border-radius: var(--r-sm);
}
.ghostbtn {
  padding: 11px 14px; min-height: 44px;
  border: 1px solid var(--line);
  background: var(--surface-2); color: var(--ink);
  font-size: .82rem; font-weight: 600;
}
.linkbtn {
  border: none; background: none; color: var(--muted);
  font-size: .85rem; text-decoration: underline; text-underline-offset: 3px;
  padding: 11px 8px; min-height: 44px;
}
.primarybtn {
  padding: 13px 20px; min-height: 44px; border: none;
  background: var(--accent-btn); color: var(--accent-btn-ink);
  font-size: .95rem; font-weight: 700;
}
.dangerbtn {
  padding: 13px 16px; min-height: 44px;
  border: 1px solid var(--line);
  background: transparent; color: var(--accent);
  font-size: .88rem; font-weight: 600;
}

.foot {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  color: var(--muted); font-size: .8rem;
}

/* ---------------- Modales ---------------- */
.modal {
  border: none; padding: 0; background: transparent;
  max-width: 100%; max-height: 100%;
  color: var(--ink);
}
.modal::backdrop { background: rgba(28, 16, 26, .45); backdrop-filter: blur(3px); }
/* En oscuro el velo y la caja quedaban casi del mismo tono y los bordes del
   diálogo se difuminaban contra el fondo. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .modal::backdrop { background: rgba(0, 0, 0, .66); }
}
:root[data-theme="dark"] .modal::backdrop { background: rgba(0, 0, 0, .66); }

.modal__box {
  width: min(94vw, 420px);
  max-height: 88dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: grid; gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px 20px calc(20px + var(--safe-b));
  box-shadow: var(--sh-md);
}
.modal__title { font-size: 1.1rem; }
/* La caja tiene scroll propio, así que la barra de acciones se queda pegada
   abajo: si no, "Guardar" solo aparece tras desplazarse hasta el final.
   Los márgenes negativos compensan el relleno de .modal__box para que la
   barra llegue a los bordes. */
.modal__actions {
  position: sticky;
  bottom: calc(-20px - var(--safe-b));
  z-index: 1;
  display: flex; gap: 10px; justify-content: flex-end;
  flex-wrap: wrap;
  margin: 4px -20px calc(-20px - var(--safe-b));
  padding: 12px 20px calc(20px + var(--safe-b));
  background: var(--surface);
  border-top: 1px solid var(--line);
}
/* ---------------- Zona peligrosa ---------------- */
.peligro { display: grid; gap: 10px; }
.peligro > summary {
  font-size: .82rem; font-weight: 600; color: var(--muted);
  cursor: pointer; padding: 8px 0; min-height: 44px;
  /* display:flex quita el triángulo por defecto, así que se repone a mano
     para que se vea igual que el otro desplegable. */
  display: flex; align-items: center;
  list-style: none;
}
.peligro > summary::-webkit-details-marker { display: none; }
.peligro > summary::before {
  content: "\25B8";
  display: inline-block;
  margin-right: 8px;
  transition: transform .15s ease;
}
.peligro[open] > summary::before { transform: rotate(90deg); }
.peligro[open] > summary { color: var(--accent-btn); }
.peligro .dangerbtn { justify-self: start; border-color: var(--accent-btn); }

.field { display: grid; gap: 6px; font-size: .8rem; color: var(--muted); font-weight: 600; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.inline { display: flex; align-items: center; gap: 7px; }
.inline em { font-style: normal; font-size: .82rem; color: var(--muted); }

input[type="text"], input[type="number"], input[type="date"],
input[type="datetime-local"], input[type="password"], input[type="email"],
select {
  width: 100%;
  padding: 11px 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--ink);
  font: inherit; font-size: .95rem; font-weight: 500;
  min-height: 44px;
}
input:focus-visible, select:focus-visible, button:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.check {
  display: flex; align-items: center; gap: 10px;
  /* La casilla mide 20px, pero la etiqueta entera es pulsable: se le da
     la altura para que el objetivo real llegue a 44px. */
  min-height: 44px;
  font-size: .88rem; font-weight: 500; color: var(--ink);
}
.check input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed;
  left: 50%; bottom: calc(22px + var(--safe-b));
  /* El 140% se calcula sobre la altura del toast vacío y no bastaba para
     sacarlo de los 22px de offset: asomaba siempre por el borde. */
  transform: translate(-50%, calc(100% + 40px));
  opacity: 0;
  visibility: hidden;
  z-index: 50;
  max-width: min(90vw, 420px);
  padding: 12px 18px;
  border-radius: 99px;
  background: var(--ink); color: var(--bg);
  font-size: .88rem; font-weight: 600;
  box-shadow: var(--sh-md);
  transition: transform .3s cubic-bezier(.2,.8,.3,1),
              opacity .2s ease, visibility .3s;
  pointer-events: none;
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

/* ---------------- Responsive ---------------- */
@media (max-width: 430px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .next__time { font-size: 2.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

/* ---------------- Copia de seguridad ---------------- */
.copiatxt {
  width: 100%;
  min-height: 140px;
  resize: vertical;
  padding: 11px 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .76rem;
  line-height: 1.45;
  white-space: pre;
  overflow-x: auto;
}
.copia__botones { display: flex; gap: 8px; flex-wrap: wrap; }
.copia__botones .ghostbtn { flex: 1; min-width: 96px; }

.masdias { width: 100%; margin-top: 12px; }

/* ---------------- Sincronización ---------------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 44px; padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--surface);
  color: var(--muted);
  font: inherit; font-size: .74rem; font-weight: 600;
  cursor: pointer;
  box-shadow: var(--sh-sm);
  white-space: nowrap;
}
.chip__punto {
  width: 7px; height: 7px; flex: none;
  border-radius: 50%;
  background: var(--muted);
}
.chip.es-ok    { color: var(--ok); }
.chip.es-ok    .chip__punto { background: var(--ok); }
.chip.es-espera{ color: var(--warm); }
.chip.es-espera .chip__punto { background: var(--warm); }
.chip.es-error { color: var(--accent-btn); }
.chip.es-error .chip__punto { background: var(--accent-btn); }

/* ---------------- Hogar compartido ---------------- */
.sep { border: none; border-top: 1px solid var(--line); margin: 4px 0; }
.sub { margin: 0; font-size: .9rem; font-weight: 700; }
.hogar { display: grid; gap: 10px; }

.codigo {
  display: flex; align-items: center; gap: 8px;
}
.codigo code {
  flex: 1; min-width: 0;
  padding: 12px;
  border-radius: var(--r-sm);
  background: var(--accent-sf);
  color: var(--accent-btn);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .95rem; font-weight: 700;
  letter-spacing: .04em;
  text-align: center;
  overflow-x: auto;
}
.detalle summary {
  font-size: .82rem; color: var(--muted); font-weight: 600;
  cursor: pointer; padding: 6px 0;
}
.inline--gap { gap: 8px; margin-top: 8px; }
.inline--gap input { flex: 1; min-width: 0; }

/* ---------------- Pantalla de acceso ---------------- */
.acceso {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  padding: 24px 16px calc(24px + var(--safe-b));
  background: var(--bg);
  overflow-y: auto;
}
.acceso__caja {
  width: min(100%, 380px);
  display: grid; gap: 14px;
}
.acceso__marca { display: grid; justify-items: center; gap: 6px; text-align: center; }
.acceso__marca h2 { font-size: 1.35rem; }
.avatar--grande { width: 62px; height: 62px; font-size: 1.5rem; margin-bottom: 6px; }

.acceso__error {
  padding: 11px 13px;
  border-radius: var(--r-sm);
  background: var(--accent-sf);
  color: var(--accent-btn);
  font-size: .85rem; font-weight: 600;
}
.acceso__enviar { width: 100%; }
.acceso__pie {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; flex-wrap: wrap;
  font-size: .85rem; color: var(--muted);
}
.acceso__local { justify-self: center; margin-top: 4px; }

/* ---------------- Cambio de contraseña ---------------- */
.clave { display: grid; gap: 10px; }
.clave__botones { display: flex; gap: 8px; flex-wrap: wrap; }
.clave__botones .ghostbtn { flex: 1; min-width: 140px; }

/* ---------------- Instalar como app ---------------- */
.instalar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px;
  border: 1.5px solid var(--accent);
  border-radius: var(--r-lg);
  background: var(--accent-sf);
  box-shadow: var(--sh-sm);
}
.instalar__txt { flex: 1; min-width: 160px; display: grid; gap: 2px; }
.instalar__txt strong { font-size: .95rem; }
.instalar__txt span { font-size: .8rem; color: var(--muted); line-height: 1.4; }
.instalar__botones { display: flex; align-items: center; gap: 8px; }
.instalar__botones .primarybtn { padding: 11px 18px; font-size: .9rem; }

.pasos { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.pasos li { font-size: .9rem; line-height: 1.5; }
.pasos code {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--surface-2);
  font-size: .85em;
}
