/* Login AOS: panel de marca con ilustración + tarjeta de cristal con los tres caminos de ingreso. */
:root {
    --aos-indigo-950: #0e0838;
    --aos-indigo-900: #170f5c;
    --aos-indigo-700: #2921c7;
    --aos-violet: #6a3df0;
    --aos-blue: #2a3bff;
    --aos-magenta: #e0239b;
    --aos-cyan: #26c6da;
    --ink: #17263b;
    --muted: #4c607b;
    --line: rgba(120, 134, 190, .30);
    --card: rgba(255, 255, 255, .74);
    --field: rgba(255, 255, 255, .92);
    --ok: #0f9d6b;
    --danger: #c0264f;
    --radius: 18px;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --ink: #eef2ff;
        --muted: #b4c0dc;
        --line: rgba(170, 190, 255, .20);
        --card: rgba(22, 30, 66, .62);
        --field: rgba(10, 16, 40, .62);
        --danger: #ff7a9c;
        color-scheme: dark;
    }
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(ellipse 46vmax 40vmax at 8% 6%, rgba(122, 160, 255, .50), transparent 64%),
        radial-gradient(ellipse 40vmax 38vmax at 96% 14%, rgba(176, 140, 255, .42), transparent 62%),
        radial-gradient(ellipse 36vmax 34vmax at 82% 96%, rgba(255, 174, 148, .34), transparent 64%),
        radial-gradient(ellipse 42vmax 38vmax at 10% 92%, rgba(118, 214, 240, .30), transparent 64%),
        linear-gradient(135deg, #edf2fc 0%, #f3eefc 52%, #f8f0f4 100%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
}

@media (prefers-color-scheme: dark) {
    body {
        background:
            radial-gradient(ellipse 48vmax 42vmax at 6% 4%, rgba(54, 108, 224, .46), transparent 64%),
            radial-gradient(ellipse 42vmax 40vmax at 96% 12%, rgba(138, 84, 238, .42), transparent 62%),
            radial-gradient(ellipse 38vmax 36vmax at 80% 95%, rgba(214, 70, 160, .26), transparent 64%),
            radial-gradient(ellipse 44vmax 40vmax at 12% 91%, rgba(28, 168, 200, .26), transparent 64%),
            linear-gradient(160deg, #080e1d 0%, #0d1428 55%, #0a0f1f 100%);
        background-attachment: fixed;
    }
}

.page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px 18px;
}

.shell {
    width: min(1120px, 100%);
    display: grid;
    grid-template-columns: 1.06fr 1fr;
    gap: 0;
    padding: 14px;
    border-radius: 36px;
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, .55);
    box-shadow: 0 40px 90px -40px rgba(30, 24, 120, .55), inset 0 1px 0 rgba(255, 255, 255, .6);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    backdrop-filter: blur(24px) saturate(160%);
}

/* ---------- Panel de marca ---------- */
.hero {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    padding: 38px 36px 28px;
    color: #fff;
    background:
        radial-gradient(ellipse 60% 46% at 10% 100%, rgba(224, 35, 155, .55), transparent 70%),
        radial-gradient(ellipse 52% 40% at 100% 0%, rgba(38, 198, 218, .34), transparent 70%),
        linear-gradient(150deg, var(--aos-indigo-950) 0%, var(--aos-indigo-700) 54%, var(--aos-violet) 100%);
    display: flex;
    flex-direction: column;
    min-height: 600px;
}

.hero::before,
.hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, .13);
}

.hero::before { width: 420px; height: 420px; right: -150px; top: -130px; }
.hero::after { width: 300px; height: 300px; left: -110px; bottom: 120px; }

/* Logo AOS SAS (vectorial) */
.wordmark { display: block; width: auto; overflow: visible; }
.hero__brand { display: flex; align-items: center; gap: 16px; margin: 0 0 22px; color: #fff; }
.wordmark--hero { height: 50px; color: #fff; filter: drop-shadow(0 6px 14px rgba(8, 4, 60, .35)); }
.hero__brand span {
    padding-left: 16px;
    border-left: 1px solid rgba(255, 255, 255, .32);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: rgba(226, 231, 255, .92);
}
.wordmark--panel { height: 54px; color: var(--aos-indigo-950); }
@media (prefers-color-scheme: dark) { .wordmark--panel { color: #fff; } }

.hero__eyebrow {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .13);
    border: 1px solid rgba(255, 255, 255, .22);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .02em;
}

.hero__eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--aos-magenta); box-shadow: 0 0 0 4px rgba(224, 35, 155, .28); }

.hero h1 {
    margin: 20px 0 10px;
    font-size: clamp(27px, 3.3vw, 38px);
    line-height: 1.12;
    letter-spacing: -.02em;
    font-weight: 800;
    max-width: 15ch;
}

.hero p.lead {
    margin: 0;
    max-width: 38ch;
    font-size: 15px;
    line-height: 1.6;
    color: rgba(226, 231, 255, .9);
}

.hero__art { margin: 6px -8px 0; flex: 1; display: flex; align-items: flex-end; justify-content: center; }
.hero__art svg { width: 100%; max-width: 520px; height: auto; display: block; overflow: visible; }

.hero__perks {
    list-style: none;
    margin: 4px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.hero__perks li {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 11px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .10);
    border: 1px solid rgba(255, 255, 255, .16);
    font-size: 12px;
    color: rgba(226, 231, 255, .85);
}

.hero__perks strong { font-size: 13px; color: #fff; font-weight: 700; }

/* ---------- Tarjeta de ingreso ---------- */
.panel {
    padding: 34px 38px 26px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand { display: flex; align-items: center; min-height: 52px; margin-bottom: 14px; }
.brand .logo { height: 46px; width: auto; max-width: 200px; object-fit: contain; }
.brand .logo-fallback { font-size: 30px; font-weight: 800; letter-spacing: -.04em; color: var(--aos-indigo-900); }
@media (prefers-color-scheme: dark) {
    .brand .logo { background: rgba(255, 255, 255, .92); padding: 6px 12px; border-radius: 12px; }
    .brand .logo-fallback { color: #fff; }
}

.panel h2 { margin: 0 0 6px; font-size: 26px; letter-spacing: -.02em; font-weight: 800; }
.panel .sub { margin: 0 0 20px; color: var(--muted); font-size: 14.5px; line-height: 1.55; }

.tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    margin-bottom: 20px;
    border-radius: 14px;
    background: rgba(120, 134, 190, .14);
    border: 1px solid var(--line);
}

.tabs a {
    text-align: center;
    padding: 10px 8px;
    border-radius: 11px;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    color: var(--muted);
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}

.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] {
    color: var(--aos-indigo-900);
    background: #fff;
    box-shadow: 0 6px 16px -8px rgba(41, 33, 199, .55);
}
@media (prefers-color-scheme: dark) { .tabs a[aria-current="page"] { color: #fff; background: linear-gradient(135deg, var(--aos-indigo-700), var(--aos-violet)); box-shadow: 0 8px 18px -10px rgba(106, 61, 240, .9); } }

.form { display: flex; flex-direction: column; gap: 14px; }

.field label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 700; }

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    border-radius: var(--radius);
    background: var(--field);
    border: 1px solid var(--line);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.input-wrapper:focus-within {
    border-color: var(--aos-violet);
    box-shadow: 0 0 0 4px rgba(106, 61, 240, .20);
}

.input-icon { width: 46px; display: grid; place-items: center; color: var(--aos-violet); flex: none; }
.input-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.input-wrapper input {
    flex: 1;
    min-width: 0;
    height: 50px;
    padding: 0 14px 0 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 15px;
}

.input-wrapper input::placeholder { color: var(--muted); opacity: .7; }

.toggle-eye {
    flex: none;
    width: 44px;
    height: 44px;
    margin-right: 3px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}
.toggle-eye:hover { color: var(--ink); background: rgba(120, 134, 190, .14); }
.toggle-eye svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Código de verificación */
.code-input {
    width: 100%;
    height: 64px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--field);
    color: var(--ink);
    text-align: center;
    font: 700 30px/1 ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
    letter-spacing: .5em;
    padding-left: .5em;
    outline: 0;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.code-input:focus { border-color: var(--aos-violet); box-shadow: 0 0 0 4px rgba(106, 61, 240, .20); }
.code-input::placeholder { color: var(--muted); opacity: .4; letter-spacing: .5em; }

.primary-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: var(--radius);
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .01em;
    cursor: pointer;
    background: linear-gradient(135deg, var(--aos-indigo-700), var(--aos-violet) 60%, #8a4cf0);
    box-shadow: 0 16px 30px -16px rgba(41, 33, 199, .85);
    transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
}
.primary-btn:hover { filter: brightness(1.07); transform: translateY(-1px); }
.primary-btn:active { transform: translateY(0); }
.primary-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; filter: none; }
.primary-btn .btn-spinner { display: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: spin .8s linear infinite; }
.primary-btn.is-loading .btn-spinner { display: inline-block; }

.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    height: 48px;
    border-radius: var(--radius);
    border: 1.5px dashed color-mix(in srgb, var(--aos-magenta) 55%, var(--line));
    background: color-mix(in srgb, var(--aos-magenta) 7%, transparent);
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}
.ghost-btn:hover { background: color-mix(in srgb, var(--aos-magenta) 14%, transparent); border-color: var(--aos-magenta); }
.ghost-btn svg { width: 17px; height: 17px; fill: none; stroke: var(--aos-magenta); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.divider { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; color: var(--muted); font-size: 12px; font-weight: 600; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.link-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.link-btn { padding: 0; border: 0; background: none; color: var(--aos-violet); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.link-btn:hover { text-decoration: underline; }
.link-btn:disabled { color: var(--muted); cursor: not-allowed; text-decoration: none; }

/* Pasos del primer ingreso */
.steps { display: flex; align-items: center; gap: 8px; margin: 0 0 20px; padding: 0; list-style: none; }
.steps li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.steps li + li::before { content: ''; width: 22px; height: 2px; border-radius: 2px; background: var(--line); }
.steps .n { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(120, 134, 190, .22); font-size: 12px; }
.steps li.is-done .n { background: var(--ok); color: #fff; }
.steps li.is-active { color: var(--ink); }
.steps li.is-active .n { background: linear-gradient(135deg, var(--aos-indigo-700), var(--aos-violet)); color: #fff; box-shadow: 0 0 0 4px rgba(106, 61, 240, .22); }

.rules { margin: -2px 0 2px; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.rules li { display: flex; align-items: center; gap: 9px; }
.rules li::before { content: ''; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); flex: none; transition: all .15s ease; }
.rules li.ok { color: var(--ink); }
.rules li.ok::before { border-color: var(--ok); background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.4l2.6 2.6L12 5.6' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }

.alert-error, .alert-ok, .alert-dev {
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 13.5px;
    line-height: 1.5;
}
.alert-error { background: rgba(192, 38, 79, .10); border: 1px solid rgba(192, 38, 79, .35); color: var(--danger); font-weight: 600; }
.alert-ok { background: rgba(15, 157, 107, .11); border: 1px solid rgba(15, 157, 107, .35); color: var(--ok); font-weight: 600; margin-bottom: 14px; }
.alert-dev { background: rgba(255, 190, 60, .16); border: 1px dashed rgba(190, 130, 20, .6); color: #7a5200; margin-bottom: 14px; }
@media (prefers-color-scheme: dark) { .alert-dev { color: #ffd98a; } }
.alert-dev code { font: 700 15px ui-monospace, Menlo, monospace; letter-spacing: .15em; }

.foot { margin: 18px 0 0; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.foot svg { width: 15px; height: 15px; fill: none; stroke: var(--ok); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
    .shell { grid-template-columns: 1fr; border-radius: 28px; }
    .hero { min-height: 0; padding: 26px 22px 18px; }
    .hero__art { display: none; }
    .hero h1 { max-width: none; font-size: 26px; margin-top: 14px; }
    .hero__perks { display: none; }
    .panel { padding: 26px 18px 18px; }
}

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