/* ═══════════════════════════════════════════════════
   Login Page — 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;
}

.auth-wrap { display: flex; min-height: 100vh; }

/* ════════════════════════════════
   LEFT PANEL — COSMIC
════════════════════════════════ */
.auth-left {
    width: 48%; flex-shrink: 0;
    background: #020b18;
    display: flex; flex-direction: column;
    justify-content: space-between;
    padding: 2.5rem 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 44% 98%,  rgba(255,255,255,.4), transparent),
        radial-gradient(1px   1px   at 96% 16%,  rgba(255,255,255,.6), transparent),
        radial-gradient(1.5px 1.5px at 50% 3%,   rgba(255,255,255,.5), transparent);
}

/* Nebula blobs */
.al-nebula { position: absolute; border-radius: 50%; pointer-events: none; z-index: 1; }
.al-neb1 { width: 500px; height: 400px; background: radial-gradient(circle, rgba(37,99,235,.22), transparent 70%); top: -120px; left: -100px; filter: blur(70px); }
.al-neb2 { width: 380px; height: 380px; background: radial-gradient(circle, rgba(124,58,237,.16), transparent 70%); bottom: -80px; right: -80px; filter: blur(80px); }
.al-neb3 { width: 240px; height: 240px; background: radial-gradient(circle, rgba(245,158,11,.09), transparent 70%); top: 45%; right: 8%; filter: blur(60px); }

/* Logo */
.left-logo {
    position: relative; z-index: 5;
    display: flex; align-items: center; gap: .75rem;
    text-decoration: none;
}
.left-logo img { height: 52px; filter: none; }

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

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

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

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

/* Text */
.left-title {
    font-size: 3.2rem; font-weight: 900; color: #fff;
    line-height: 1.05; letter-spacing: -.03em;
    margin-bottom: 1rem;
}
.left-title .accent {
    background: linear-gradient(90deg, #60a5fa, #a78bfa, #fbbf24);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.left-desc {
    color: rgba(226,232,240,.62); font-size: 1.08rem;
    line-height: 1.72; max-width: 310px; margin-bottom: 1.4rem;
}
.left-bullets { display: flex; flex-direction: column; align-items: flex-start; gap: .55rem; }
.left-bullet {
    display: flex; align-items: center; gap: .6rem;
    color: rgba(226,232,240,.75); font-size: 1rem;
}
.left-bullet .dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: #3b82f6; flex-shrink: 0;
    box-shadow: 0 0 8px #3b82f6;
}

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

/* ════════════════════════════════
   RIGHT PANEL
════════════════════════════════ */
.auth-right {
    flex: 1; background: #030b1a;
    display: flex; align-items: center; justify-content: center;
    padding: 3rem 2rem;
    position: relative; overflow: hidden;
}

/* Subtle space glow on right */
.auth-right::before {
    content: ''; position: absolute;
    width: 500px; height: 400px; border-radius: 50%;
    background: radial-gradient(circle, rgba(37,99,235,.07), transparent 70%);
    top: -140px; right: -140px; filter: blur(60px); pointer-events: none;
}
.auth-right::after {
    content: ''; position: absolute;
    width: 350px; height: 350px; border-radius: 50%;
    background: radial-gradient(circle, rgba(124,58,237,.05), transparent 70%);
    bottom: -100px; left: -100px; filter: blur(60px); pointer-events: none;
}

/* Glassmorphism form card */
.auth-form-card {
    width: 100%; max-width: 440px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 24px; padding: 2.75rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 20px 60px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.04);
    position: relative; z-index: 5;
}

/* Back link */
.back-link {
    display: inline-flex; align-items: center; gap: .45rem;
    color: rgba(226,232,240,.48); text-decoration: none;
    font-size: .85rem; font-weight: 500;
    transition: color .2s; margin-bottom: 1.75rem;
}
.back-link:hover { color: #fff; }

/* Headings */
.form-heading {
    font-size: 1.6rem; font-weight: 800; color: #fff;
    margin-bottom: .4rem; line-height: 1.2;
}
.form-sub {
    color: rgba(226,232,240,.48); font-size: .9rem;
    margin-bottom: 1.75rem;
}

/* Error box */
.err-box {
    background: rgba(239,68,68,.1);
    border: 1px solid rgba(239,68,68,.28);
    border-radius: 10px; padding: .88rem 1.1rem;
    margin-bottom: 1.25rem; color: #fca5a5;
    font-size: .88rem; display: flex; align-items: flex-start; gap: .5rem;
}
.err-box i { color: #f87171; font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }

/* Form fields */
.field { margin-bottom: 1.2rem; }
.field label {
    display: block; font-size: .78rem; font-weight: 700;
    color: rgba(226,232,240,.6); margin-bottom: .45rem;
    letter-spacing: .05em; text-transform: uppercase;
}
.field input {
    width: 100%; padding: .85rem 1rem;
    background: rgba(255,255,255,.06);
    border: 1.5px solid rgba(255,255,255,.1);
    border-radius: 10px; font-size: .95rem;
    color: #e2e8f0; outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
    font-family: inherit;
}
.field input::placeholder { color: rgba(226,232,240,.22); }
.field input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,.15);
    background: rgba(255,255,255,.09);
}
.field input.is-invalid {
    border-color: rgba(239,68,68,.5);
    background: rgba(239,68,68,.06);
}

/* Remember + forgot */
.form-row {
    display: flex; align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem; flex-wrap: wrap; gap: .5rem;
}
.check-label {
    display: flex; align-items: center; gap: .5rem;
    font-size: .86rem; color: rgba(226,232,240,.5); cursor: pointer;
}
.check-label input[type=checkbox] { accent-color: #3b82f6; width: 15px; height: 15px; }
.forgot-link {
    font-size: .86rem; font-weight: 600;
    color: #60a5fa; text-decoration: none; transition: color .2s;
}
.forgot-link:hover { color: #93c5fd; }

/* Submit button */
.btn-submit {
    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: .55rem;
    box-shadow: 0 8px 24px rgba(37,99,235,.4);
    font-family: inherit;
}
.btn-submit:hover {
    background: #1d4ed8;
    box-shadow: 0 12px 32px rgba(37,99,235,.55);
    transform: translateY(-2px);
}

/* Footer text */
.auth-footer-txt {
    text-align: center; margin-top: 1.5rem;
    font-size: .88rem; color: rgba(226,232,240,.42);
}
.auth-footer-txt a { color: #60a5fa; font-weight: 600; text-decoration: none; }
.auth-footer-txt a:hover { color: #93c5fd; }

/* ════════════════════════════════
   RESPONSIVE
════════════════════════════════ */
@media (max-width: 900px) {
    .auth-left { width: 44%; padding: 2rem 2rem; }
    .left-visual { width: 240px; height: 240px; }
    .al-o3 { width: 240px; height: 240px; }
    .al-o2 { width: 182px; height: 182px; }
    .al-o1 { width: 126px; height: 126px; }
    .al-portrait { width: 90px; height: 90px; }
    .al-portrait-frame { width: 90px; height: 90px; }
}
@media (max-width: 768px) {
    .auth-left { display: none; }
    .auth-right {
        background: #020b18;
        padding: 2rem 1.25rem;
        align-items: flex-start;
        padding-top: 3rem;
    }
    .auth-form-card {
        border: none; background: transparent;
        backdrop-filter: none; box-shadow: none;
        padding: 1rem 0;
    }
}
