/* ═══════════════════════════════════════════════════
   Password Pages — Cosmic Redesign
═══════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: #020b18; overflow-x: hidden;
}

/* ════════════════════════════════
   LAYOUT
════════════════════════════════ */
.auth-split { display: flex; min-height: 100vh; width: 100%; }

/* ════════════════════════════════
   LEFT PANEL — COSMIC
════════════════════════════════ */
.auth-left {
    width: 44%; flex-shrink: 0;
    background: #020b18;
    display: flex; flex-direction: column;
    justify-content: space-between;
    padding: 2.75rem 3rem;
    position: relative; overflow: hidden;
}

/* Static starfield */
.auth-left::before {
    content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
    background-image:
        radial-gradient(1.5px 1.5px at 5% 8%,   rgba(255,255,255,.8), transparent),
        radial-gradient(1px   1px   at 15% 32%,  rgba(255,255,255,.6), transparent),
        radial-gradient(1.5px 1.5px at 25% 68%,  rgba(255,255,255,.7), transparent),
        radial-gradient(1px   1px   at 35% 18%,  rgba(255,255,255,.5), transparent),
        radial-gradient(2px   2px   at 47% 82%,  rgba(255,255,255,.6), transparent),
        radial-gradient(1px   1px   at 54% 44%,  rgba(255,255,255,.4), transparent),
        radial-gradient(1.5px 1.5px at 62% 12%,  rgba(255,255,255,.7), transparent),
        radial-gradient(1px   1px   at 71% 58%,  rgba(255,255,255,.5), transparent),
        radial-gradient(1.5px 1.5px at 80% 28%,  rgba(255,255,255,.6), transparent),
        radial-gradient(1px   1px   at 90% 72%,  rgba(255,255,255,.5), transparent),
        radial-gradient(1px   1px   at 12% 90%,  rgba(255,255,255,.4), transparent),
        radial-gradient(1.5px 1.5px at 42% 55%,  rgba(255,255,255,.5), transparent),
        radial-gradient(1px   1px   at 68% 94%,  rgba(255,255,255,.4), transparent),
        radial-gradient(2px   2px   at 76% 5%,   rgba(255,255,255,.6), transparent),
        radial-gradient(1px   1px   at 22% 74%,  rgba(255,255,255,.4), transparent),
        radial-gradient(1.5px 1.5px at 33% 40%,  rgba(255,255,255,.5), transparent),
        radial-gradient(1px   1px   at 58% 25%,  rgba(255,255,255,.6), transparent),
        radial-gradient(1px   1px   at 88% 50%,  rgba(255,255,255,.4), transparent),
        radial-gradient(1.5px 1.5px at 6% 52%,   rgba(255,255,255,.5), transparent),
        radial-gradient(1px   1px   at 96% 16%,  rgba(255,255,255,.6), transparent);
}

/* Nebulae */
.ap-nebula { position: absolute; border-radius: 50%; pointer-events: none; z-index: 1; }
.ap-neb1 { width: 480px; height: 380px; background: radial-gradient(circle, rgba(37,99,235,.22), transparent 70%); top: -110px; left: -90px; filter: blur(70px); }
.ap-neb2 { width: 360px; height: 360px; background: radial-gradient(circle, rgba(124,58,237,.16), transparent 70%); bottom: -70px; right: -70px; filter: blur(80px); }
.ap-neb3 { width: 220px; height: 220px; background: radial-gradient(circle, rgba(245,158,11,.09), transparent 70%); top: 45%; right: 8%; filter: blur(55px); }

/* JS Stars */
#ap-stars { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.ap-star { position: absolute; border-radius: 50%; background: #fff; animation: ap-twinkle var(--dur,3s) var(--delay,0s) ease-in-out infinite alternate; opacity: var(--op,.4); }
@keyframes ap-twinkle { from { opacity: var(--op,.4); transform: scale(1); } to { opacity: calc(var(--op,.4)*0.22); transform: scale(.5); } }

/* Logo */
.brand-logo {
    position: relative; z-index: 5;
    display: block; margin-bottom: 0;
}
.brand-logo img { height: 52px; }

/* Left inner body */
.auth-left-inner {
    position: relative; z-index: 5;
    flex: 1; display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    padding: 2rem 0; text-align: center;
}

/* Orbital system */
.ap-visual {
    position: relative;
    width: 240px; height: 240px;
    margin: 0 auto 2rem;
}
.ap-orbit {
    position: absolute; border-radius: 50%;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    animation: ap-spin linear infinite;
}
@keyframes ap-spin {
    from { transform: translate(-50%,-50%) rotate(0deg); }
    to   { transform: translate(-50%,-50%) rotate(360deg); }
}
.ap-o1 { width: 130px; height: 130px; border: 1px solid rgba(59,130,246,.32); animation-duration: 8s; }
.ap-o2 { width: 185px; height: 185px; border: 1px solid rgba(168,85,247,.22); animation-duration: 15s; animation-direction: reverse; }
.ap-o3 { width: 240px; height: 240px; border: 1px solid rgba(245,158,11,.16); animation-duration: 24s; }

.ap-dot {
    position: absolute; border-radius: 50%;
    top: -4.5px; left: 50%; transform: translateX(-50%);
    width: 9px; height: 9px;
    background: #3b82f6;
    box-shadow: 0 0 12px #3b82f6, 0 0 24px rgba(59,130,246,.5);
}
.ap-dot-purple { background: #a855f7; box-shadow: 0 0 12px #a855f7, 0 0 24px rgba(168,85,247,.5); }
.ap-dot-gold   { background: #fbbf24; box-shadow: 0 0 12px #fbbf24, 0 0 24px rgba(251,191,36,.5); width: 8px; height: 8px; top: -4px; }

.ap-portrait {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    width: 95px; height: 95px;
}
.ap-portrait-frame {
    width: 95px; height: 95px; border-radius: 50%;
    background: conic-gradient(from 0deg, #3b82f6, #a855f7, #fbbf24, #06b6d4, #3b82f6);
    padding: 3px;
    box-shadow: 0 0 35px rgba(37,99,235,.5), 0 0 70px rgba(37,99,235,.2);
    animation: ap-spin 18s linear infinite;
}
.ap-portrait-inner {
    width: 100%; height: 100%; border-radius: 50%; overflow: hidden;
    background: #091628;
    animation: ap-spin 18s linear infinite reverse;
}
.ap-portrait-inner img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}

/* Tagline */
.auth-tagline { margin-bottom: 1.75rem; }
.auth-tagline h2 {
    font-size: 1.65rem; font-weight: 900; color: #fff;
    line-height: 1.2; margin-bottom: .6rem;
    letter-spacing: -.02em;
}
.auth-tagline h2 span {
    background: linear-gradient(90deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.auth-tagline p { font-size: .88rem; color: rgba(226,232,240,.5); line-height: 1.65; max-width: 280px; }

/* Feature items */
.auth-features { display: flex; flex-direction: column; gap: .6rem; width: 100%; max-width: 300px; }
.auth-feature-item {
    display: flex; align-items: center; gap: .75rem;
    padding: .75rem 1rem;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 10px;
    font-size: .84rem; color: rgba(226,232,240,.72);
}
.auth-feature-item i { font-size: 1.2rem; color: #60a5fa; flex-shrink: 0; }

/* Left footer */
.auth-left-footer {
    position: relative; z-index: 5;
    color: rgba(226,232,240,.22); font-size: .78rem;
    text-align: center;
}

/* ════════════════════════════════
   RIGHT PANEL
════════════════════════════════ */
.auth-right {
    flex: 1; background: #030b1a;
    display: flex; align-items: center; justify-content: center;
    padding: 3rem 2.5rem;
    position: relative; overflow: hidden;
}
.auth-right::before {
    content: ''; position: absolute;
    width: 450px; height: 350px; border-radius: 50%;
    background: radial-gradient(circle, rgba(37,99,235,.06), transparent 70%);
    top: -120px; right: -120px; filter: blur(60px); pointer-events: none;
}

.auth-right-inner {
    width: 100%; max-width: 420px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 24px; padding: 2.5rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 20px 60px rgba(0,0,0,.45);
    position: relative; z-index: 5;
}

/* Form header */
.auth-form-header { margin-bottom: 1.75rem; }
.auth-form-header h1 {
    font-size: 1.55rem; font-weight: 800; color: #fff;
    margin-bottom: .4rem; line-height: 1.2;
}
.auth-form-header p { color: rgba(226,232,240,.48); font-size: .88rem; }

/* Alerts */
.alert-success-custom {
    display: flex; align-items: center; gap: .6rem;
    padding: .9rem 1rem;
    background: rgba(22,163,74,.08);
    border: 1px solid rgba(22,163,74,.22);
    border-radius: 10px; color: #4ade80;
    margin-bottom: 1.25rem; font-size: .86rem;
}
.alert-success-custom i { font-size: 1.15rem; color: #4ade80; flex-shrink: 0; }

.alert-error-custom {
    display: flex; align-items: flex-start; gap: .6rem;
    padding: .9rem 1rem;
    background: rgba(239,68,68,.08);
    border: 1px solid rgba(239,68,68,.22);
    border-radius: 10px; color: #fca5a5;
    margin-bottom: 1.25rem; font-size: .86rem;
}
.alert-error-custom i { font-size: 1.15rem; color: #f87171; flex-shrink: 0; margin-top: 1px; }

/* Form groups */
.form-group { margin-bottom: 1.1rem; }
.form-group label {
    display: block; font-size: .76rem; font-weight: 700;
    color: rgba(226,232,240,.58); margin-bottom: .4rem;
    text-transform: uppercase; letter-spacing: .05em;
}

/* Input wrap */
.input-wrap { position: relative; }
.input-wrap i {
    position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
    font-size: 1.1rem; color: rgba(226,232,240,.3); pointer-events: none;
}
.input-wrap input {
    width: 100%; padding: .82rem 1rem .82rem 40px;
    background: rgba(255,255,255,.06);
    border: 1.5px solid rgba(255,255,255,.1);
    border-radius: 10px; font-size: .93rem;
    color: #e2e8f0; outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
    font-family: inherit;
}
.input-wrap input::placeholder { color: rgba(226,232,240,.22); }
.input-wrap input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,.15);
    background: rgba(255,255,255,.09);
}
.input-wrap input.is-invalid {
    border-color: rgba(239,68,68,.5);
    background: rgba(239,68,68,.05);
}

/* Submit button */
.submit-btn {
    width: 100%; background: #2563eb; color: #fff;
    padding: .9rem; border-radius: 12px; border: none;
    cursor: pointer; font-size: 1rem; font-weight: 700;
    transition: all .25s;
    display: flex; align-items: center; justify-content: center; gap: .5rem;
    box-shadow: 0 8px 24px rgba(37,99,235,.4);
    margin-top: .5rem; font-family: inherit;
}
.submit-btn:hover {
    background: #1d4ed8;
    box-shadow: 0 12px 32px rgba(37,99,235,.55);
    transform: translateY(-2px);
}

/* Footer link */
.form-footer { text-align: center; margin-top: 1.25rem; }
.form-footer a {
    color: #60a5fa; text-decoration: none;
    font-size: .86rem; font-weight: 600;
    display: inline-flex; align-items: center; gap: .35rem;
    transition: color .2s;
}
.form-footer a:hover { color: #93c5fd; }

/* ════════════════════════════════
   RESPONSIVE
════════════════════════════════ */
@media (max-width: 900px) {
    .auth-left { display: none; }
    .auth-right { background: #020b18; padding: 2.5rem 1.25rem; }
    .auth-right-inner { border: none; background: transparent; backdrop-filter: none; box-shadow: none; padding: 0; }
}
