/* Páginas de acceso de TopSEO (entrar, olvidé la contraseña, elegir contraseña).
   Misma identidad que la portada: blanco, cobalto, y el ámbar solo en el botón
   de acción principal. */
:root, body.portal {
    --bg: #FFFFFF; --surface: #F3F6FB; --ink: #0E1A33; --text: #101A2C; --muted: #55637B;
    --primary: #1B47E5; --cta: #FFC53D; --cta-ink: #121826;
    --success: #0E7A53; --danger: #C0271F; --line: #E1E7F2; --line-2: #8C98AD;
    --ease: cubic-bezier(.16, 1, .3, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body, body.portal {
    margin: 0; min-height: 100svh; display: flex; flex-direction: column;
    background: #fff; color: var(--text);
    font-family: 'Hanken Grotesk', system-ui, Helvetica, Arial, sans-serif;
    font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased;
}
/* Trama de puntos, solo detrás de la tarjeta */
body::before {
    content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background: radial-gradient(#cfd8ec 1.5px, transparent 1.6px) 0 0 / 24px 24px;
    -webkit-mask: radial-gradient(520px 420px at 50% 46%, #000 30%, transparent 75%);
    mask: radial-gradient(520px 420px at 50% 46%, #000 30%, transparent 75%);
}
.login-top { position: relative; z-index: 1; padding: 22px 24px; }
.login-top a { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text);
    font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-weight: 700; font-size: 1.3rem; letter-spacing: -.02em; }
.login-top svg { width: 32px; height: 32px; }
.login-top b { color: var(--primary); }
.login-wrapper { position: relative; z-index: 1; flex: 1; display: grid; place-items: center; padding: 16px 20px 56px; }
.login-card { position: relative; width: 100%; max-width: 430px; background: #fff; border: 1px solid var(--line); border-radius: 14px;
    /* el bloque cobalto de detrás es una sombra sólida: un ::before con z-index
       negativo se pintaría ENCIMA del fondo de la tarjeta */
    box-shadow: 12px 12px 0 var(--primary);
    opacity: 0; transform: translateY(18px); animation: card-in .7s var(--ease) .05s forwards; }
@keyframes card-in { to { opacity: 1; transform: none; } }
.login-header { padding: 34px 32px 8px; }
.login-logo, .login-lock { display: none; }
.login-title { margin: 0; font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-weight: 700; font-size: 1.9rem; line-height: 1.1; letter-spacing: -.025em; }
.login-subtitle { margin: 8px 0 0; color: var(--muted); }
.login-form { padding: 20px 32px 30px; }
.form-group { margin-bottom: 18px; }
.form-label { display: block; margin-bottom: 7px; font-weight: 600; font-size: .95rem; }
.form-input-wrapper { position: relative; }
.form-input { width: 100%; min-height: 50px; padding: 12px 46px 12px 44px; font: inherit; color: var(--text);
    background-color: #fff; border: 1px solid var(--line-2); border-radius: 10px; transition: border-color .2s, box-shadow .2s; }
.form-input::placeholder { color: #7a869b; }
.form-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(27,71,229,.2); }
.form-input-wrapper > svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.form-input:focus ~ svg { color: var(--primary); }
.password-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; display: grid; place-items: center;
    background: transparent; border: 0; border-radius: 8px; color: var(--muted); cursor: pointer; }
.password-toggle:hover { color: var(--primary); background: var(--surface); }
.password-toggle svg { width: 18px; height: 18px; }
.login-btn { width: 100%; min-height: 50px; margin-top: 6px; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    font: inherit; font-weight: 600; color: var(--cta-ink); background: var(--cta); border: 0; border-radius: 10px; cursor: pointer;
    transition: transform .2s var(--ease), box-shadow .2s, background .2s; }
.login-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 20px -6px rgba(255,197,61,.9); }
.login-btn:disabled { cursor: wait; opacity: .85; }
.login-btn svg { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.login-btn:hover svg { transform: translateX(4px); }
.login-btn[style*="--success"] { color: #fff; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.particle-loader { display: inline-flex; gap: 4px; }
.particle-loader span { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: dot 1s ease-in-out infinite; }
.particle-loader span:nth-child(2) { animation-delay: .15s; } .particle-loader span:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
.login-error { display: none; align-items: flex-start; gap: 10px; padding: 12px 14px; margin-bottom: 18px; border-radius: 10px;
    background: #FDECEA; border: 1px solid #f1b5b0; color: var(--danger); font-size: .95rem; font-weight: 500; }
.login-error.visible { display: flex; animation: card-in .3s var(--ease) forwards; }
.login-error svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.login-footer { padding: 16px 32px 22px; border-top: 1px solid var(--line); text-align: center; }
.login-footer-text { margin: 0; font-size: .92rem; color: var(--muted); }
.login-footer-text a { color: var(--primary); font-weight: 600; text-decoration: none; }
.login-footer-text a:hover { text-decoration: underline; }
@media (max-width: 480px) {
    .login-header { padding: 28px 22px 6px; } .login-form { padding: 18px 22px 24px; } .login-footer { padding: 14px 22px 20px; }
    .login-card { box-shadow: 8px 10px 0 var(--primary); }
    .login-title { font-size: 1.65rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* Enlace secundario bajo el formulario y mensajes de estado */
.login-aux { margin: 14px 0 0; text-align: center; font-size: .92rem; }
.login-aux a { color: var(--primary); font-weight: 600; text-decoration: none; }
.login-aux a:hover { text-decoration: underline; }
.login-ok { display: none; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 8px 32px 34px; }
.login-ok.visible { display: flex; animation: card-in .5s var(--ease) forwards; }
.login-ok svg { width: 72px; height: 72px; }
.login-ok circle { fill: none; stroke: var(--primary); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 214; stroke-dashoffset: 214; transform: rotate(-90deg); transform-origin: center; }
.login-ok path { fill: none; stroke: var(--primary); stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; }
.login-ok.visible circle { animation: ok-draw .7s var(--ease) .1s forwards; }
.login-ok.visible path { animation: ok-draw .45s var(--ease) .6s forwards; }
@keyframes ok-draw { to { stroke-dashoffset: 0; } }
.login-ok h2 { margin: 0; font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-weight: 700; font-size: 1.5rem; letter-spacing: -.02em; }
.login-ok p { margin: 0; color: var(--muted); }
.login-ok .login-btn { margin-top: 8px; text-decoration: none; }
.form-hint { margin: 6px 0 0; font-size: .85rem; color: var(--muted); }

/* ── Alta ───────────────────────────────────────────── */
.signup-card { max-width: 500px; }
.form-input.plain { padding-left: 14px; padding-right: 14px; }
.pick-set { border: 0; margin: 0 0 16px; padding: 0; min-inline-size: 0; }
.pick-set legend { padding: 0; margin-bottom: 7px; }
.pick-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pick-row label { position: relative; cursor: pointer; flex: 1 1 auto; }
.pick-row input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; appearance: none; -webkit-appearance: none; }
.pick-row span { display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 10px; font-weight: 500; font-size: .95rem; color: var(--muted); text-align: center; transition: border-color .2s, background .2s, color .2s; }
.pick-row input:checked + span { color: var(--primary); border-color: var(--primary); background: var(--surface); box-shadow: inset 0 0 0 1px var(--primary); }
.pick-row input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.signup-total { margin: 0 0 20px; padding: 12px 14px; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 500; font-size: .95rem; }
.check { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 18px; font-size: .92rem; color: var(--muted); cursor: pointer; position: relative; }
.check input { position: absolute; opacity: 0; width: 22px; height: 22px; margin: 0; cursor: pointer; appearance: none; -webkit-appearance: none; }
.check-box { flex: none; width: 22px; height: 22px; border: 1.5px solid var(--line-2); border-radius: 6px; background: #fff; position: relative; transition: background .2s, border-color .2s; }
.check input:checked + .check-box { background: var(--primary); border-color: var(--primary); }
.check input:checked + .check-box::after { content: ''; position: absolute; left: 7px; top: 3px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2.4px 2.4px 0; transform: rotate(45deg); }
.check input:focus-visible + .check-box { outline: 2px solid var(--primary); outline-offset: 2px; }
.check a { color: var(--primary); font-weight: 600; }
/* ── Texto legal ────────────────────────────────────── */
.legal-wrap { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; padding: 24px 24px 72px; }
.legal-wrap h2 { margin: 28px 0 8px; font-size: 1.1rem; font-weight: 600; }
.legal-wrap p { margin: 0 0 12px; color: var(--text); }
.legal-wrap a { color: var(--primary); }
.legal-wrap ul { margin: 0 0 12px; padding-left: 20px; color: var(--text); }
.legal-wrap li { margin: 0 0 6px; }
.legal-draft { padding: 10px 14px; border-radius: 10px; background: #FFF4DC; border: 1px solid #e6c27a; color: #A05A00 !important; font-weight: 500; }
