/* Acceso, alta y cuenta (views/acceso.js, views/alta.js, Ajustes → Cuenta y Familia) + aviso de zona. Solo tokens de base.css. */

/* ---------- Tarjeta de acceso ---------- */
.acc-card { max-width: 440px; }
.acc-card.wide { max-width: 560px; }
.acc-card .btn { margin-top: 0; }
.acc-title { font-size: 28px; font-weight: 800; letter-spacing: -.02em; color: var(--sage-ink); line-height: 1.15; overflow-wrap: anywhere; outline: none; }
.acc-sub { margin-top: 8px; color: var(--ink-2); font-size: 15px; font-weight: 600; line-height: 1.45; max-width: 420px; }
.acc-form { margin-top: 24px; gap: 14px; }
.acc-form .field { margin-bottom: 0; }
.acc-form > div { display: flex; flex-direction: column; gap: 14px; }
.acc-form .login-msg { min-height: 0; }
.acc-form .login-msg:empty { display: none; }
.acc-card .gate-art.small { width: 64px; margin-bottom: 10px; }
.acc-extra { width: 100%; display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.acc-extra:empty { display: none; }
.acc-links { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 2px; margin-top: 10px; }
.acc-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 8px; color: var(--sage-ink); font-weight: 800; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; text-align: center; border-radius: 10px; }
.acc-link:hover { background: var(--sage-wash); }
.acc-alta { width: 100%; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-direction: column; align-items: stretch; gap: 10px; text-align: center; }
.acc-alta p { color: var(--ink-2); font-weight: 700; font-size: 15px; }
.acc-nota { margin-top: 12px; font-size: 14px; color: var(--ink-2); font-weight: 600; line-height: 1.45; text-align: left; }
.acc-nota a { color: var(--sage-ink); font-weight: 800; }
.acc-nota-c { text-align: center; margin: 4px 0 22px; }
.acc-lista { margin: 16px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; color: var(--ink); font-size: 15px; font-weight: 600; line-height: 1.4; text-align: left; }
.acc-lista li::marker { color: var(--sage-strong); }

/* Entrar con Google / Apple */
.acc-oidc { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.acc-oidc-btn { width: 100%; min-height: 52px; gap: 12px; }
.acc-mark { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 14px; font-weight: 800; background: var(--sunk); color: var(--ink); flex: none; }
.acc-sep { width: 100%; display: flex; align-items: center; gap: 12px; color: var(--ink-2); font-size: 13px; font-weight: 800; }
.acc-sep::before, .acc-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Entrar: Google arriba y el correo y la contraseña desplegables; avisos de «no disponible» y «escríbenos» */
.acc-google { margin-top: 24px; gap: 4px; }
.acc-toggle { align-self: center; min-height: 44px; font-weight: 800; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; }
.acc-correo[hidden] { display: none; }
.acc-nodisp { overflow-wrap: anywhere; }
.acc-mail { color: var(--sage-ink); font-weight: 800; overflow-wrap: anywhere; }

/* Contraseña: medidor */
.pw-meter { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.pw-meter[hidden] { display: none; }
.pw-meter-track { display: block; height: 6px; border-radius: 99px; background: var(--sunk); overflow: hidden; }
.pw-meter-bar { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--peach-strong); transition: width .25s var(--ease), background .25s; }
.pw-meter[data-nivel="2"] .pw-meter-bar { background: var(--now-dot); }
.pw-meter[data-nivel="3"] .pw-meter-bar, .pw-meter[data-nivel="4"] .pw-meter-bar { background: var(--sage-strong); }
.pw-meter-text { font-size: 13px; font-weight: 700; color: var(--ink-2); min-height: 1.3em; }

/* Casilla y código */
.acc-check { display: flex; align-items: flex-start; gap: 12px; margin-top: 18px; padding: 14px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-2); font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.4; text-align: left; cursor: pointer; }
.acc-check-input { flex: none; width: 24px; height: 24px; margin: 0; accent-color: var(--sage-ink); }
.acc-check:has(.acc-check-input:checked) { box-shadow: inset 0 0 0 2px var(--sage-strong); background: var(--sage-wash); }
.acc-check:has(.acc-check-input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.acc-code { display: block; padding: 18px 10px; border-radius: 16px; border: 2px dashed var(--sage); background: var(--sage-wash); text-align: center; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: clamp(19px, 6vw, 26px); font-weight: 800; letter-spacing: .06em; color: var(--sage-ink); user-select: all; overflow-wrap: anywhere; }
.acc-code-input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; font-size: 17px; }
.acc-who { position: relative; }
.acc-who:disabled { opacity: .55; }
.acc-who-ini { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; font-weight: 800; background: var(--sage-soft); color: var(--sage-ink); }
.acc-who-nota { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.acc-choices { display: flex; flex-direction: column; gap: 12px; }
.acc-choice { min-height: 64px; padding: 0 18px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-2); font-size: 17px; font-weight: 800; color: var(--ink); text-align: left; transition: background .2s, box-shadow .2s; }
.acc-choice.on { background: var(--sage-wash); box-shadow: inset 0 0 0 2.5px var(--sage-strong); color: var(--sage-ink); }

/* ---------- Alta ---------- */
.gate:has(.alta-card) { align-items: start; padding-top: calc(20px + var(--safe-t)); }
.alta-card { text-align: left; align-items: stretch; }
.alta-card .acc-title, .alta-card .acc-sub { text-align: left; max-width: none; }
.alta-card .acc-title { margin-top: 18px; }
.alta-card .alta-form { margin-top: 20px; }
.alta-top { display: flex; align-items: center; gap: 8px; margin-left: -10px; }
.alta-back { flex: none; color: var(--ink-2); }
.alta-progress { flex: 1; height: 8px; border-radius: 99px; background: var(--sunk); overflow: hidden; }
.alta-progress span { display: block; height: 100%; border-radius: 99px; background: var(--sage-strong); transition: width .3s var(--ease); }
.alta-count { flex: none; min-width: 36px; text-align: right; font-size: 13px; font-weight: 800; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.alta-seg { margin-bottom: 4px; }
.alta-seg { display: flex; width: 100%; overflow: visible; }
.alta-seg .seg-btn { flex: 1 1 0; min-width: 0; padding: 0 6px; font-size: 14px; white-space: normal; line-height: 1.15; min-height: 48px; }
.alta-calculo { margin-top: 4px; padding: 10px 14px; border-radius: 14px; background: var(--sage-wash); color: var(--sage-ink); font-weight: 800; font-size: 15px; }
.alta-calculo[hidden] { display: none; }
.alta-loc { display: flex; flex-direction: column; gap: 14px; }
.alta-loc-manual { display: flex; flex-direction: column; gap: 14px; }
.alta-loc[hidden], .alta-loc-manual[hidden] { display: none; }
.alta-loc-estado { min-height: 1.4em; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.alta-loc-resumen { font-size: 14px; font-weight: 800; color: var(--sage-ink); }
.alta-loc-resumen:empty { display: none; }
.alta-opt { margin-top: 2px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.alta-opt summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 0 14px; font-weight: 800; font-size: 15px; color: var(--ink); cursor: pointer; list-style: none; }
.alta-opt summary::-webkit-details-marker { display: none; }
.alta-opt[open] summary { border-bottom: 1px solid var(--line); }
.alta-opt > .field { margin: 14px; }
.alta-opt-tag { flex: none; padding: 2px 10px; border-radius: 99px; background: var(--sunk); color: var(--ink-2); font-size: 12px; font-weight: 800; }

/* ---------- Ajustes: cuenta y familia ---------- */
.aj-cuenta-quien { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px; background: var(--bg); border: 1px solid var(--line); font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.aj-cuenta-quien .ico { flex: none; color: var(--sage-ink); }
.aj-formas { margin: 12px 0; display: flex; flex-direction: column; gap: 8px; }
.aj-forma { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 6px 6px 6px 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); font-weight: 700; }
.aj-forma > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.aj-forma small { display: block; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.aj-google { margin: 12px 0; padding: 14px; border-radius: 16px; background: var(--bg); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.aj-google h4 { margin: 0; font-size: 1.02rem; }
.aj-google .aj-hint { margin: 0; font-size: 14px; color: var(--ink-2); font-weight: 600; }
.aj-google .btn { width: 100%; justify-content: center; }
.aj-acciones { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.aj-acciones .btn { width: 100%; justify-content: flex-start; text-align: left; }
.aj-form-pw { margin-top: 10px; padding: 14px; border-radius: 16px; background: var(--bg); border: 1px solid var(--line); }
.aj-form-pw .field { margin-bottom: 12px; }
.aj-form-pw .login-msg { min-height: 0; margin-bottom: 8px; }
.aj-form-pw .login-msg:empty { display: none; }
.aj-personas { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.aj-persona { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); font-weight: 800; }
.aj-persona small { font-size: 13px; color: var(--ink-2); font-weight: 700; }
.aj-invita { padding: 14px; border-radius: 16px; background: var(--bg); border: 1px solid var(--line); }
.aj-invita .acc-code { margin: 10px 0; }
.aj-invita-cad { font-size: 14px; font-weight: 700; color: var(--ink-2); }

/* ---------- Aviso de zona (Hoy y Guía) ---------- */
.aviso-local { display: flex; align-items: flex-start; gap: 10px; margin: 8px var(--gutter) 0; max-width: var(--content-max); padding: 10px 6px 10px 14px; border-radius: 16px; background: var(--sage-wash); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); }
.aviso-local[hidden] { display: none; }
.aviso-local .aviso-ico { flex: none; margin-top: 3px; color: var(--sage-ink); }
.aviso-txt { flex: 1; min-width: 0; font-size: 14px; line-height: 1.45; font-weight: 600; color: var(--ink-2); }
.aviso-txt strong { color: var(--ink); font-weight: 800; }
.aviso-txt p { margin-top: 1px; }
.aviso-x { flex: none; width: 40px; height: 40px; margin: -2px 0; color: var(--ink-2); }
@media (min-width: 760px) { .aviso-local { margin-inline: auto; width: calc(100% - 2 * var(--gutter)); } }

/* Ajustes › Tus datos: exportar y borrar (confirmación en dos pasos; sin desbordar a 360–390 px) */
.aj-datos { min-width: 0; }
.aj-datos .aj-acciones .btn { white-space: normal; }
.aj-borrar { min-width: 0; }
.aj-borrar h4 { margin: 0 0 6px; font-size: 1.02rem; }
.aj-borrar .aj-row { flex-wrap: wrap; gap: 8px; }
.aj-borrar .btn { white-space: normal; text-align: center; }
.aj-reauth { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.aj-reauth .btn { width: 100%; justify-content: center; }
.aj-aviso { border: 1px solid var(--warn, #c77700); background: color-mix(in srgb, var(--warn, #c77700) 12%, transparent); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
.aj-aviso p { margin: 0; }
.aj-datos a { overflow-wrap: anywhere; }
.aviso-links { margin-top: 6px; }
.aviso-links a { color: var(--sage-ink); font-weight: 700; text-decoration: underline; overflow-wrap: anywhere; }
/* «Contarlo todo de una vez»: espera y revisión */
.alta-aviso { margin: 10px 0 0; font-weight: 700; color: var(--sage-ink); }
.alta-espera { display: flex; align-items: center; gap: 12px; margin-top: 20px; font-size: 16px; font-weight: 700; color: var(--ink-2); }
.alta-espera-punto { flex: none; width: 14px; height: 14px; border-radius: 99px; background: var(--sage-strong); animation: alta-respira 1.4s var(--ease) infinite; }
@keyframes alta-respira { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .alta-espera-punto { animation: none; } }
.alta-resumen { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.alta-fila { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.alta-fila.falta { background: var(--sunk); }
.alta-fila-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.alta-fila-et { font-size: 13px; font-weight: 800; color: var(--ink-2); }
.alta-fila-val { font-size: 16px; line-height: 1.3; color: var(--ink); overflow-wrap: anywhere; }
.alta-fila.falta .alta-fila-val { color: var(--ink-2); font-weight: 700; font-style: italic; }
.alta-cambiar { flex: none; width: auto; min-width: 92px; min-height: 44px; padding: 0 14px; }
.alta-resumen + .alta-form { margin-top: 20px; }
