/* NutriGes — pantallas de acceso (alta, verificar, entrar, recuperar). Se carga DESPUÉS de portada.css y usa su paleta,
   su barra superior y sus botones. Móvil primero (390 px), modo claro y oscuro. Sin estilos en línea (CSP). */
:root {
  --campo-bg: #ffffff; --campo-borde: #d9cffc; --campo-tx: #1d2a44; --msg-error-bg: #ffe3e3; --msg-error-tx: #9b1c1c;
  --msg-info-bg: #dcf8ea; --msg-info-tx: #0d5c3a; --card-borde: rgba(106, 61, 240, .1);
}
:root[data-tema="oscuro"] {
  --campo-bg: #170f3a; --campo-borde: #4b3b94; --campo-tx: #f3efff; --msg-error-bg: #4a1b2a; --msg-error-tx: #ffc9c9;
  --msg-info-bg: #123f35; --msg-info-tx: #b4f5d6; --card-borde: rgba(255, 255, 255, .1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-tema="claro"]) {
    --campo-bg: #170f3a; --campo-borde: #4b3b94; --campo-tx: #f3efff; --msg-error-bg: #4a1b2a; --msg-error-tx: #ffc9c9;
    --msg-info-bg: #123f35; --msg-info-tx: #b4f5d6; --card-borde: rgba(255, 255, 255, .1);
  }
}

body.en-acceso { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; background: #3d1fa8; }
.acc { position: relative; flex: 1; overflow: hidden; padding: 20px 14px 28px; background: linear-gradient(135deg, #5a2ee6 0%, #c4237a 52%, #ff7a3d 100%); }
.acc::before, .acc::after { content: ""; position: absolute; border-radius: 62% 38% 55% 45% / 48% 58% 42% 52%; pointer-events: none; animation: morph 14s ease-in-out infinite alternate; }
.acc::before { width: 380px; height: 380px; left: -150px; top: -110px; background: radial-gradient(circle at 30% 30%, #4cc9f0, rgba(76, 201, 240, 0)); opacity: .7; }
.acc::after { width: 460px; height: 460px; right: -190px; bottom: -150px; background: radial-gradient(circle at 40% 40%, #ffd23f, rgba(255, 210, 63, 0)); opacity: .6; animation-delay: -5s; }
:root[data-tema="oscuro"] .acc { background: linear-gradient(135deg, #2a1676 0%, #7a1859 55%, #a1442a 100%); }
@media (prefers-color-scheme: dark) { :root:not([data-tema="claro"]) .acc { background: linear-gradient(135deg, #2a1676 0%, #7a1859 55%, #a1442a 100%); } }

.acc-card { position: relative; z-index: 1; width: 100%; max-width: 480px; margin: 0 auto; padding: 24px 20px 22px; background: var(--card-bg); color: var(--card-tx); border-radius: 30px; border: 1px solid var(--card-borde); box-shadow: 0 30px 60px -24px rgba(30, 5, 90, .7); }
.acc-card h1 { font-size: clamp(1.7rem, 7vw, 2.15rem); line-height: 1.08; font-weight: 900; letter-spacing: -.025em; margin-bottom: .35rem; }
.acc-sub { color: var(--suave); line-height: 1.5; margin-bottom: 1.1rem; overflow-wrap: anywhere; }
.gran-emoji { font-size: 2.6rem; line-height: 1; margin-bottom: .45rem; }
.acc-aparte { text-align: center; margin-top: 1rem; font-size: .98rem; color: var(--suave); }
.acc-aparte a { color: #6a3df0; font-weight: 800; }
:root[data-tema="oscuro"] .acc-aparte a { color: #ffd23f; }
@media (prefers-color-scheme: dark) { :root:not([data-tema="claro"]) .acc-aparte a { color: #ffd23f; } }
.acc-pie { padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); text-align: center; font-size: .85rem; background: #16103a; color: #cfc7f5; }
.acc-pie a { color: inherit; }

/* pasos del alta */
.pasos { display: flex; gap: 6px; margin: 0 0 1.1rem; padding: 0; list-style: none; }
.pasos li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .74rem; font-weight: 800; color: var(--suave); text-align: center; line-height: 1.15; }
.pasos b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #ece6ff; color: #6a3df0; font-size: 1rem; }
:root[data-tema="oscuro"] .pasos li:not(.on):not(.hecho) b { background: #3a2a80; color: #e0d6ff; }
.pasos li.on { color: var(--card-tx); }
.pasos li.on b { background: linear-gradient(135deg, #6a3df0, #e02a80); color: #fff; box-shadow: 0 8px 18px -6px rgba(106, 61, 240, .7); }
.pasos li.hecho b { background: #3fcf8e; color: #05281f; }

/* campos */
.campo { margin: 0 0 1rem; }
.campo-t { display: block; font-weight: 800; font-size: .95rem; margin-bottom: .35rem; }
.campo-in { display: block; width: 100%; min-height: 54px; padding: .75rem 1rem; font: inherit; font-size: 1.05rem; color: var(--campo-tx); background: var(--campo-bg); border: 2px solid var(--campo-borde); border-radius: 16px; transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none; }
.campo-in::placeholder { color: var(--suave); opacity: .6; }
.campo-in:focus { outline: none; border-color: #6a3df0; box-shadow: 0 0 0 4px rgba(106, 61, 240, .22); }
.campo small { display: block; margin-top: .35rem; font-size: .85rem; line-height: 1.4; color: var(--suave); }
.campo small a { color: #6a3df0; font-weight: 800; }
:root[data-tema="oscuro"] .campo small a { color: #ffd23f; }
.clave-caja { position: relative; display: block; }
.clave-caja .campo-in { padding-right: 56px; }
.ver-clave { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; font-size: 1.25rem; cursor: pointer; color: inherit; }
.ver-clave:hover { background: rgba(106, 61, 240, .12); }
.codigo-in { text-align: center; font-size: 2rem; font-weight: 900; letter-spacing: .42em; padding-left: calc(1rem + .42em); font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; min-height: 66px; }
.codigo-in::placeholder { letter-spacing: .42em; }

/* medidor de fuerza */
.fuerza { display: flex; align-items: center; gap: 5px; margin-top: .5rem; min-height: 20px; }
.fuerza i { flex: none; width: 15%; max-width: 54px; height: 7px; border-radius: 7px; background: #e6e0fb; transition: background .2s; }
:root[data-tema="oscuro"] .fuerza i { background: #3a2a80; }
@media (prefers-color-scheme: dark) { :root:not([data-tema="claro"]) .fuerza i { background: #3a2a80; } :root:not([data-tema="claro"]) .pasos li:not(.on):not(.hecho) b { background: #3a2a80; color: #e0d6ff; } :root:not([data-tema="claro"]) .campo small a, :root:not([data-tema="claro"]) .casilla a { color: #ffd23f; } }
.fuerza em { margin-left: .35rem; font-style: normal; font-weight: 800; font-size: .85rem; }
.fuerza.n1 i:nth-child(-n+1) { background: #ff6b6b; }
.fuerza.n2 i:nth-child(-n+2) { background: #ffb627; }
.fuerza.n3 i:nth-child(-n+3) { background: #9bdc3a; }
.fuerza.n4 i:nth-child(-n+4) { background: #3fcf8e; }
.fuerza.n1 em { color: #d6453d; } .fuerza.n2 em { color: #b87400; } .fuerza.n3 em { color: #4f8a10; } .fuerza.n4 em { color: #0d8f57; }
:root[data-tema="oscuro"] .fuerza.n1 em { color: #ff9a9a; } :root[data-tema="oscuro"] .fuerza.n2 em { color: #ffd166; } :root[data-tema="oscuro"] .fuerza.n3 em { color: #c6f36b; } :root[data-tema="oscuro"] .fuerza.n4 em { color: #6ff0b2; }
.coincide.si { color: #0d8f57; font-weight: 800; } .coincide.no { color: #d6453d; font-weight: 800; }
:root[data-tema="oscuro"] .coincide.si { color: #6ff0b2; } :root[data-tema="oscuro"] .coincide.no { color: #ff9a9a; }


/* casillas legales */
.legales { display: grid; gap: .55rem; margin: 1.1rem 0 1rem; }
.casilla { display: flex; gap: .7rem; align-items: flex-start; padding: .75rem .85rem; border-radius: 16px; background: rgba(106, 61, 240, .07); line-height: 1.4; font-size: .95rem; cursor: pointer; }
.casilla input { flex: none; width: 24px; height: 24px; margin: 1px 0 0; accent-color: #6a3df0; cursor: pointer; }
.casilla a { color: #6a3df0; font-weight: 800; }
:root[data-tema="oscuro"] .casilla a { color: #ffd23f; }
.casilla small { display: block; margin-top: .2rem; font-size: .82rem; color: var(--suave); }
.confianza { margin: 0 0 1rem; }

/* captcha */
.captcha { margin: 1.1rem 0 1.2rem; padding: 14px; border-radius: 20px; background: linear-gradient(160deg, rgba(76, 201, 240, .16), rgba(106, 61, 240, .1)); border: 1px dashed var(--campo-borde); }
.captcha .campo-t { margin-bottom: .5rem; }
.captcha .campo { margin: 0; }
.captcha-fila { display: flex; gap: 10px; align-items: stretch; margin-bottom: .9rem; }
.captcha-img { flex: 1; min-width: 0; border-radius: 12px; overflow: hidden; background: #f3f6f8; display: grid; place-items: center; }
.captcha-img svg { width: 100%; height: auto; max-height: 72px; }
.captcha-otra { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 64px; border: 2px solid var(--campo-borde); border-radius: 14px; background: var(--campo-bg); color: var(--campo-tx); font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 6px 4px; }
.captcha-otra:hover { border-color: #6a3df0; }
.captcha-otra-t { font-size: .62rem; font-weight: 800; line-height: 1.1; text-align: center; }
.captcha-otra[disabled] { opacity: .5; }
.captcha .campo-in { text-align: center; font-size: 1.5rem; font-weight: 900; letter-spacing: .4em; padding-left: calc(1rem + .4em); font-family: ui-monospace, Consolas, monospace; }
.captcha .campo-in::placeholder { letter-spacing: .3em; }

/* botones y mensajes */
.btn-bloque { width: 100%; }
.acc-card .btn-grande { font-size: 1.15rem; padding: 1em 1.2em; box-shadow: 0 14px 28px -10px rgba(255, 140, 20, .65); }
.acc-card .btn[disabled] { opacity: .6; cursor: wait; transform: none; }
.btn-enlace { display: block; width: 100%; margin-top: .8rem; padding: .85em; border: 2px solid var(--campo-borde); border-radius: 999px; background: transparent; color: var(--card-tx); font: inherit; font-weight: 800; cursor: pointer; }
.btn-enlace:hover:not([disabled]) { border-color: #6a3df0; }
.btn-enlace[disabled] { opacity: .55; cursor: default; }
.msg { margin: 0 0 1rem; padding: .8em 1em; border-radius: 16px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.msg-error { background: var(--msg-error-bg); color: var(--msg-error-tx); }
.msg-info { background: var(--msg-info-bg); color: var(--msg-info-tx); }
.prueba-banner { display: flex; gap: .7rem; align-items: center; margin: 0 0 1rem; padding: .8em 1em; border-radius: 18px; background: linear-gradient(135deg, #ffe066, #ffb627); color: #2b1500; line-height: 1.35; font-size: .95rem; }
.prueba-banner > span:first-child { font-size: 1.7rem; }

@media (min-width: 560px) {
  .acc { padding: 40px 20px 48px; }
  .acc-card { padding: 32px 32px 28px; }
}
@media (max-width: 380px) {
  .codigo-in { letter-spacing: .3em; font-size: 1.7rem; }
  .pasos li { font-size: .68rem; }
}
@media (prefers-reduced-motion: reduce) { .acc::before, .acc::after { animation: none; } }
