:root {
    --bg:          #0a0e14;
    --bg-2:        #0f141c;
    --bg-3:        #141b25;
    --accent:      #007acc;
    --accent-2:    #22a3ff;
    --accent-3:    #4dd0ff;
    --glow:        rgba(0, 122, 204, 0.35);
    --border:      #1c2530;
    --border-2:    #2a3644;
    --danger:      #ef4444;
    --text:        #f2f5f8;
    --text-2:      #9aa7b5;
    --text-3:      #5c6874;
    --font-display:'Space Grotesk', system-ui, sans-serif;
    --font-body:   'Inter', system-ui, sans-serif;
    --font-mono:   'JetBrains Mono', ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    overflow-x: hidden;
}

/* ── Fondos compartidos ──────────────────────────────────────── */
.bg-glow {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background:
        radial-gradient(ellipse 60% 55% at 22% 40%, rgba(0, 122, 204, 0.20), transparent 65%),
        radial-gradient(ellipse 50% 50% at 80% 80%, rgba(34, 163, 255, 0.08), transparent 70%);
}
.bg-dots {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background-image: radial-gradient(circle, rgba(0, 122, 204, 0.25) 1px, transparent 1px);
    background-size: 28px 28px;
    mask: radial-gradient(ellipse 60% 70% at 25% 45%, black 10%, transparent 80%);
    -webkit-mask: radial-gradient(ellipse 60% 70% at 25% 45%, black 10%, transparent 80%);
    animation: dots-drift 24s linear infinite;
}
@keyframes dots-drift { to { background-position: 28px 28px; } }

/* ── Panel izquierdo: branding ───────────────────────────────── */
.panel-brand {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 56px;
    border-right: 1px solid var(--border);
    overflow: hidden;
}

.orb-wrap {
    position: absolute;
    right: -18%; top: 50%;
    transform: translateY(-50%);
    width: 620px; height: 620px;
    display: grid; place-items: center;
    pointer-events: none;
    opacity: .5;
}
.orb-halo {
    position: absolute;
    width: 400px; height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,122,204,.30) 0%, rgba(0,122,204,.08) 45%, transparent 70%);
    animation: halo-pulse 7s ease-in-out infinite;
}
@keyframes halo-pulse {
    0%, 100% { transform: scale(1);    opacity: .8; }
    50%      { transform: scale(1.1);  opacity: 1;  }
}
.ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(0, 122, 204, .20);
}
.ring-1 { width: 300px; height: 300px; border-style: dashed; animation: spin 34s linear infinite; }
.ring-2 { width: 430px; height: 430px; animation: spin 52s linear infinite reverse; }
.ring-3 { width: 560px; height: 560px; border-color: rgba(0,122,204,.09); }
@keyframes spin { to { transform: rotate(360deg); } }
.orb-core {
    width: 76px; height: 76px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-3));
    box-shadow: 0 0 70px var(--glow), 0 0 0 1px rgba(255,255,255,.08);
    display: grid; place-items: center;
    color: #fff; font-size: 26px;
    z-index: 1;
}

.brand-top { position: relative; z-index: 2; }
.brand {
    display: inline-flex; align-items: center; gap: 12px;
    text-decoration: none; margin-bottom: 56px;
}
.brand-mark {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent-3));
    display: grid; place-items: center;
    color: #fff; font-size: 17px;
    box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 8px 24px var(--glow);
}
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: -.02em; color: var(--text); }
.brand-sub  { font-family: var(--font-mono); font-size: 9px; color: var(--text-3); letter-spacing: .16em; }

.pill {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 7px 15px;
    border-radius: 999px;
    background: rgba(0, 122, 204, .08);
    border: 1px solid rgba(0, 122, 204, .28);
    font-size: 11.5px;
    font-weight: 500;
    color: var(--accent-2);
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 26px;
}
.pill-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent-2);
    box-shadow: 0 0 0 3px rgba(34,163,255,.18);
    animation: dot-pulse 2.2s ease-in-out infinite;
}
@keyframes dot-pulse { 50% { box-shadow: 0 0 0 6px rgba(34,163,255,.05); } }

.panel-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(30px, 3vw, 42px);
    line-height: 1.08;
    letter-spacing: -.03em;
    margin-bottom: 18px;
    max-width: 460px;
}
.panel-title .grad {
    background: linear-gradient(100deg, var(--accent-2) 10%, var(--accent-3) 60%, #8fe3ff 95%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.panel-desc {
    color: var(--text-2);
    font-size: 14.5px;
    line-height: 1.65;
    max-width: 400px;
}

.panel-features {
    position: relative; z-index: 2;
    display: flex; flex-direction: column; gap: 14px;
}
.feature { display: flex; align-items: center; gap: 13px; }
.feature-icon {
    width: 34px; height: 34px;
    border-radius: 9px;
    background: rgba(0,122,204,.08);
    border: 1px solid rgba(0,122,204,.22);
    color: var(--accent-2);
    display: grid; place-items: center;
    font-size: 12px;
    flex-shrink: 0;
}
.feature-text { font-size: 12.5px; color: var(--text-2); }

/* ── Panel derecho: formulario ───────────────────────────────── */
.panel-form {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 32px;
}
.form-box { width: 100%; max-width: 400px; }

.form-head { margin-bottom: 32px; }
.form-head h1 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 26px;
    letter-spacing: -.02em;
    margin-bottom: 7px;
}
.form-head p { color: var(--text-2); font-size: 13.5px; }

.alert {
    display: flex; align-items: flex-start; gap: 11px;
    padding: 13px 16px;
    border-radius: 10px;
    background: rgba(239, 68, 68, .07);
    border: 1px solid rgba(239, 68, 68, .28);
    border-left-width: 3px;
    margin-bottom: 22px;
    font-size: 12.5px;
    color: #fca5a5;
    line-height: 1.5;
}
.alert i { margin-top: 1px; flex-shrink: 0; }

.alert-ok {
    background: rgba(34, 197, 94, .07);
    border-color: rgba(34, 197, 94, .28);
    color: #86efac;
}

.field { margin-bottom: 18px; }
.field-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 8px;
}
.field-wrap { position: relative; }
.field-icon {
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-3);
    font-size: 13px;
    pointer-events: none;
    transition: color .2s;
}
.field-wrap:focus-within .field-icon { color: var(--accent-2); }

.input {
    width: 100%;
    padding: 13px 15px 13px 42px;
    border-radius: 10px;
    background: var(--bg-2);
    border: 1px solid var(--border-2);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.input::placeholder { color: var(--text-3); }
.input:focus {
    border-color: var(--accent);
    background: var(--bg-3);
    box-shadow: 0 0 0 3px rgba(0, 122, 204, .13);
}
.input.has-error { border-color: rgba(239,68,68,.5); }

.toggle-pass {
    position: absolute;
    right: 12px; top: 50%;
    transform: translateY(-50%);
    background: none; border: none;
    color: var(--text-3);
    cursor: pointer;
    padding: 6px;
    font-size: 13px;
    transition: color .2s;
}
.toggle-pass:hover { color: var(--text); }

.field-error {
    margin-top: 6px;
    font-size: 11.5px;
    color: #fca5a5;
}

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 26px;
    flex-wrap: wrap;
}
.check {
    display: inline-flex; align-items: center; gap: 9px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-2);
    user-select: none;
}
.check input {
    width: 16px; height: 16px;
    accent-color: var(--accent);
    cursor: pointer;
}
.link {
    font-size: 13px;
    color: var(--accent-2);
    text-decoration: none;
    transition: color .18s;
}
.link:hover { color: var(--accent-3); text-decoration: underline; }

.btn-submit {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14.5px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 26px var(--glow);
    transition: transform .2s, box-shadow .2s;
}
.btn-submit:hover { transform: translateY(-1px); box-shadow: 0 12px 34px var(--glow); }
.btn-submit:active { transform: translateY(0); }
.btn-submit i { font-size: 12px; transition: transform .25s; }
.btn-submit:hover i { transform: translateX(3px); }

.form-foot {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 12.5px;
    color: var(--text-3);
    line-height: 1.7;
}
.form-foot a { color: var(--accent-2); text-decoration: none; }
.form-foot a:hover { text-decoration: underline; }

.back-home {
    position: absolute;
    top: 28px; right: 32px;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--border-2);
    color: var(--text-2);
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 500;
    transition: all .2s;
}
.back-home:hover { color: var(--text); border-color: var(--accent); background: rgba(0,122,204,.07); }

/* ── Logo móvil (solo cuando se oculta el panel izquierdo) ───── */
.mobile-brand { display: none; text-align: center; margin-bottom: 30px; }
.mobile-brand .brand-mark { margin: 0 auto 12px; width: 52px; height: 52px; font-size: 21px; border-radius: 13px; }
.mobile-brand .brand-name { font-size: 17px; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 980px) {
    body { grid-template-columns: 1fr; }
    .panel-brand { display: none; }
    .mobile-brand { display: block; }
    .bg-dots {
        mask: radial-gradient(ellipse 90% 60% at 50% 30%, black 10%, transparent 80%);
        -webkit-mask: radial-gradient(ellipse 90% 60% at 50% 30%, black 10%, transparent 80%);
    }
    .back-home { top: 20px; right: 20px; }
}
@media (max-width: 480px) {
    .panel-form { padding: 80px 22px 40px; }
    .back-home span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition-duration: .01ms !important; }
}