*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --navy:         #050d1f;
    --deep:         #080f24;
    --blue-core:    #0a4bdb;
    --blue-mid:     #1565f5;
    --blue-bright:  #3d8bff;
    --cyan:         #00d4ff;
    --cyan-dim:     rgba(0,212,255,0.15);
    --orange:       #ff7c2a;
    --orange-dim:   rgba(255,124,42,0.12);
    --white:        #ffffff;
    --glass:        rgba(255,255,255,0.04);
    --glass-border: rgba(0,212,255,0.18);
    --text-dim:     rgba(255,255,255,0.45);
    --text-mid:     rgba(255,255,255,0.72);
    --input-bg:     rgba(255,255,255,0.05);
    --input-focus:  rgba(0,212,255,0.1);
    --danger:       #ff4f4f;
    --success:      #00e676;
    --easing:       cubic-bezier(0.77,0,0.175,1);
    --speed:        0.65s;
}

html { height: 100%; }

body {
    font-family: 'Exo 2', sans-serif;
    background: var(--navy);
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    padding: 20px;
}

body::before {
    content: '';
    position: fixed; inset: 0;
    background:
        radial-gradient(ellipse 90% 70% at 10% 95%, rgba(10,75,219,0.45) 0%, transparent 50%),
        radial-gradient(ellipse 70% 60% at 95% 5%,  rgba(0,212,255,0.18) 0%, transparent 50%),
        radial-gradient(ellipse 60% 50% at 50% 50%, rgba(255,124,42,0.04) 0%, transparent 65%),
        linear-gradient(165deg, #060d20 0%, #08102a 45%, #050b18 100%);
    pointer-events: none; z-index: 0;
}

body::after {
    content: '';
    position: fixed; inset: -60px;
    background-image:
        linear-gradient(rgba(0,212,255,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,212,255,0.035) 1px, transparent 1px);
    background-size: 70px 70px;
    animation: gridDrift 25s linear infinite;
    pointer-events: none; z-index: 0;
}

@keyframes gridDrift {
    from { transform: translate(0,0); }
    to   { transform: translate(70px, 70px); }
}

.scan-line {
    position: fixed;
    left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--cyan) 50%, transparent 100%);
    opacity: 0;
    pointer-events: none; z-index: 1;
    animation: scanDown 10s ease-in-out infinite;
}
.scan-line.s2 { animation-delay: -5s; opacity: 0; }

@keyframes scanDown {
    0%   { top: 0%; opacity: 0; }
    5%   { opacity: 0.3; }
    95%  { opacity: 0.18; }
    100% { top: 100%; opacity: 0; }
}

.orbit-ring {
    position: fixed;
    border-radius: 50%;
    border: 1px solid transparent;
    pointer-events: none; z-index: 1;
    animation: rotateSlow linear infinite;
}
.orbit-ring.r1 {
    width: 520px; height: 520px;
    top: -180px; left: -160px;
    border-color: rgba(0,212,255,0.07);
    animation-duration: 45s;
}
.orbit-ring.r2 {
    width: 310px; height: 310px;
    top: -60px; left: -55px;
    border-color: rgba(255,124,42,0.08);
    animation-duration: 28s;
    animation-direction: reverse;
}
.orbit-ring.r3 {
    width: 640px; height: 640px;
    bottom: -230px; right: -220px;
    border-color: rgba(0,212,255,0.05);
    animation-duration: 55s;
}
.orbit-ring.r4 {
    width: 380px; height: 380px;
    bottom: -100px; right: -90px;
    border-color: rgba(21,101,245,0.09);
    animation-duration: 35s;
    animation-direction: reverse;
}

@keyframes rotateSlow {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.dot {
    position: fixed;
    border-radius: 50%;
    pointer-events: none; z-index: 1;
    animation: dotPulse ease-in-out infinite;
}
.dot.d1 { width:3px;height:3px; top:14%; left:7%;   background:var(--cyan);        animation-duration:5s;   animation-delay:0s; }
.dot.d2 { width:4px;height:4px; top:33%; left:93%;  background:var(--orange);      animation-duration:7s;   animation-delay:-2s; }
.dot.d3 { width:2px;height:2px; top:68%; left:4%;   background:var(--cyan);        animation-duration:6s;   animation-delay:-3.5s; }
.dot.d4 { width:3px;height:3px; top:82%; left:81%;  background:var(--cyan);        animation-duration:8.5s; animation-delay:-5s; }
.dot.d5 { width:2px;height:2px; top:52%; left:48%;  background:var(--orange);      animation-duration:9s;   animation-delay:-1.5s; }
.dot.d6 { width:4px;height:4px; top:22%; left:66%;  background:var(--blue-bright); animation-duration:5.5s; animation-delay:-6s; }

@keyframes dotPulse {
    0%,100% { opacity:0; transform:scale(0.4); }
    50%      { opacity:0.8; transform:scale(1.8); }
}

.auth-wrapper {
    display: flex;
    width: min(1080px, 100%);
    min-height: min(680px, auto);
    border-radius: 32px;
    overflow: hidden;
    position: relative; z-index: 10;
    box-shadow:
        0 0 0 1px var(--glass-border),
        0 0 80px rgba(0,212,255,0.1),
        0 0 140px rgba(21,101,245,0.1),
        0 60px 120px rgba(0,0,0,0.7);
    animation: cardIn 0.9s var(--easing) both;
}

@keyframes cardIn {
    from { opacity:0; transform:translateY(50px) scale(0.96); }
    to   { opacity:1; transform:translateY(0) scale(1); }
}

.panel {
    width: 50%;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    transition: background var(--speed) var(--easing);
}

.panel-left {
    background: linear-gradient(150deg, #0e2f8a 0%, #0a1e68 45%, #06122e 100%);
}

.panel-right {
    background: linear-gradient(150deg, #0a1232 0%, #070d22 100%);
}

.panel-right::before {
    content: '';
    position: absolute;
    left: 0; top: 15%; bottom: 15%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--cyan) 50%, transparent);
    opacity: 0.35;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 16px;
    width: 100%;
}

.logo {
    display: block;
    filter: drop-shadow(0 0 40px rgba(0,212,255,0.55)) drop-shadow(0 8px 24px rgba(0,0,0,0.5));
    animation: floatLogo 5s ease-in-out infinite;
}

.logo-large {
    width: 240px;
    height: auto;
    margin: 0 auto;
}

@media (max-width: 860px) {
    .logo-large {
        width: 160px;
    }
}

@media (max-width: 560px) {
    .logo-large {
        width: 120px;
    }
}

@keyframes floatLogo {
    0%,100% { transform: translateY(0) rotate(-1deg); }
    50%      { transform: translateY(-12px) rotate(1deg); }
}

.info-block {
    padding: 52px 44px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 22px;
    color: var(--white);
    position: relative;
    z-index: 2;
}

.info-block::before,
.info-block::after {
    content: '';
    position: absolute;
    width: 32px; height: 32px;
    border-color: rgba(0,212,255,0.5);
    border-style: solid;
}
.info-block::before { top: 24px; left: 24px; border-width: 2px 0 0 2px; }
.info-block::after  { bottom: 24px; right: 24px; border-width: 0 2px 2px 0; }

.info-block h1 {
    font-family: 'Orbitron', monospace;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.02em;
    text-shadow: 0 0 30px rgba(0,212,255,0.45);
}
.info-block h1 .accent { color: var(--cyan); }

.info-block > p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-mid);
    font-weight: 300;
    max-width: 320px;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
    width: 100%;
    max-width: 280px;
}
.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--text-mid);
    letter-spacing: 0.02em;
}
.feat-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    animation: dotPulse 2.5s ease-in-out infinite;
}
.feat-dot.c { background: var(--cyan);        box-shadow: 0 0 10px var(--cyan);        }
.feat-dot.o { background: var(--orange);      box-shadow: 0 0 10px var(--orange);       animation-delay:-0.8s; }
.feat-dot.b { background: var(--blue-bright); box-shadow: 0 0 10px var(--blue-bright);  animation-delay:-1.6s; }

.panel-scan {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,212,255,0.04) 50%, transparent 100%);
    animation: panelSweep 5s ease-in-out infinite;
    pointer-events: none;
}
@keyframes panelSweep {
    0%   { transform: translateY(-100%); }
    100% { transform: translateY(200%); }
}

.deco-orbit {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(0,212,255,0.08);
    pointer-events: none;
}
.deco-orbit.do1 {
    width: 220px; height: 220px;
    bottom: -80px; right: -80px;
    animation: rotateSlow 18s linear infinite;
}
.deco-orbit.do2 {
    width: 130px; height: 130px;
    bottom: -30px; right: -30px;
    border-color: rgba(255,124,42,0.1);
    animation: rotateSlow 12s linear infinite reverse;
}
.deco-orbit.do3 {
    width: 60px; height: 60px;
    top: 30px; left: -20px;
    border-color: rgba(0,212,255,0.12);
    animation: rotateSlow 8s linear infinite;
}

.form-block {
    padding: 52px 44px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    position: relative; z-index: 2;
}

.sys-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Orbitron', monospace;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    color: var(--cyan);
    text-transform: uppercase;
    margin-bottom: -4px;
}
.sys-label::before {
    content: '';
    width: 22px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--cyan));
}

.form-block h2 {
    font-family: 'Orbitron', monospace;
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.02em;
    text-shadow: 0 0 25px rgba(61,139,255,0.4);
}

.form-block .sub {
    font-size: 1rem;
    color: var(--text-dim);
    margin-top: -7px;
    font-weight: 300;
    letter-spacing: 0.02em;
}

.input-group {
    display: flex;
    align-items: center;
    background: var(--input-bg);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    padding: 0 18px;
    gap: 12px;
    transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
    position: relative; overflow: hidden;
}
.input-group::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 2px;
    background: linear-gradient(90deg, var(--cyan), var(--blue-bright));
    transition: width 0.4s var(--easing);
}
.input-group:focus-within {
    border-color: rgba(0,212,255,0.28);
    background: var(--input-focus);
    box-shadow: 0 0 20px rgba(0,212,255,0.07), inset 0 1px 0 rgba(255,255,255,0.04);
}
.input-group:focus-within::after { width: 100%; }

.input-group .icon {
    font-size: 1rem;
    opacity: 0.7;
    flex-shrink: 0;
    transition: opacity 0.3s, color 0.3s;
    color: #ffffff;
    width: 20px;
    text-align: center;
}
.input-group:focus-within .icon { opacity: 1; color: #ffffff; }

.input-group .icon i,
.input-group .icon svg { color: #ffffff !important; fill: #ffffff; }

.input-group input {
    flex: 1; border: none; background: transparent;
    padding: 15px 0;
    font-family: 'Exo 2', sans-serif;
    font-size: 1rem;
    color: var(--white);
    outline: none;
    letter-spacing: 0.02em;
    min-width: 0;
}
.input-group input::placeholder { color: rgba(255,255,255,0.28); font-weight: 300; }

.toggle-pass {
    background: none; border: none; cursor: pointer;
    font-family: 'Orbitron', monospace;
    font-size: 0.52rem; font-weight: 700;
    color: var(--cyan); letter-spacing: 0.14em;
    padding: 4px 0; flex-shrink: 0;
    transition: opacity 0.2s;
    white-space: nowrap;
}
.toggle-pass:hover { opacity: 0.65; }

.remember-row {
    display: flex; align-items: center;
    justify-content: space-between;
    font-size: 0.95rem; color: var(--text-dim);
    flex-wrap: wrap;
    gap: 8px;
}
.remember-row label { display: flex; align-items: center; gap: 8px; cursor: pointer; }

.remember-row input[type=checkbox] {
    appearance: none; -webkit-appearance: none;
    width: 16px; height: 16px;
    border: 1px solid rgba(0,212,255,0.3);
    border-radius: 4px; background: transparent;
    cursor: pointer; transition: background 0.2s, border-color 0.2s;
    position: relative; flex-shrink: 0;
}
.remember-row input[type=checkbox]:checked {
    background: var(--cyan); border-color: var(--cyan);
}
.remember-row input[type=checkbox]:checked::after {
    content: '✓';
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.65rem; color: var(--navy); font-weight: 800;
}

.forgot { color: var(--cyan); text-decoration: none; font-size: 0.93rem; transition: opacity 0.2s; }
.forgot:hover { opacity: 0.65; }

.btn-primary {
    position: relative;
    background: linear-gradient(135deg, #0840c0 0%, #1565f5 55%, #3d8bff 100%);
    color: var(--white); border: none; border-radius: 12px;
    padding: 16px;
    font-family: 'Orbitron', monospace;
    font-size: 0.78rem; font-weight: 700;
    letter-spacing: 0.2em; text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.25s, box-shadow 0.25s;
    box-shadow: 0 6px 30px rgba(21,101,245,0.45), 0 0 0 1px rgba(61,139,255,0.2);
    overflow: hidden;
    width: 100%;
}
.btn-primary::before {
    content: '';
    position: absolute;
    top: -50%; left: -60%;
    width: 35%; height: 200%;
    background: rgba(255,255,255,0.14);
    transform: skewX(-20deg);
    transition: left 0.55s var(--easing);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(21,101,245,0.6), 0 0 0 1px rgba(61,139,255,0.35); }
.btn-primary:hover::before { left: 130%; }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
    display: flex; align-items: center; justify-content: center;
    gap: 10px;
    background: var(--glass); color: var(--text-mid);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 12px; padding: 14px;
    font-family: 'Exo 2', sans-serif;
    font-size: 1rem; font-weight: 500;
    cursor: pointer;
    transition: border-color 0.25s, background 0.25s, color 0.25s;
    letter-spacing: 0.03em;
    width: 100%;
}
.btn-secondary:hover {
    border-color: rgba(0,212,255,0.3);
    background: rgba(0,212,255,0.06);
    color: var(--white);
}

.divider {
    display: flex; align-items: center; gap: 12px;
    font-size: 0.65rem; color: rgba(255,255,255,0.18);
    font-family: 'Orbitron', monospace; letter-spacing: 0.12em;
}
.divider::before, .divider::after {
    content: ''; flex: 1; height: 1px;
    background: rgba(255,255,255,0.07);
}

.switch-link { text-align: center; font-size: 0.97rem; color: var(--text-dim); font-weight: 300; }
.switch-link a { color: var(--cyan); font-weight: 600; text-decoration: none; transition: opacity 0.2s; }
.switch-link a:hover { opacity: 0.65; }

.msg-box { font-size: 0.95rem; padding: 12px 14px; border-radius: 10px; display: none; letter-spacing: 0.02em; }
.msg-box.success { display:block; background:rgba(0,230,118,0.08); color:var(--success); border:1px solid rgba(0,230,118,0.22); }
.msg-box.error   { display:block; background:rgba(255,79,79,0.08);  color:var(--danger);  border:1px solid rgba(255,79,79,0.22); }

.hidden { display: none !important; }

.form-logo {
    display: none;
}
@media (max-width: 560px) {
    .form-logo {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-bottom: 4px;
    }
    .form-logo img {
        width: 100px;
        height: auto;
        filter: drop-shadow(0 0 30px rgba(0,212,255,0.5));
        animation: floatLogo 5s ease-in-out infinite;
    }
}

@keyframes slideInLeft  { from{opacity:0;transform:translateX(-35px)} to{opacity:1;transform:translateX(0)} }
@keyframes slideInRight { from{opacity:0;transform:translateX(35px)}  to{opacity:1;transform:translateX(0)} }
@keyframes riseUp       { from{opacity:0;transform:translateY(20px)}  to{opacity:1;transform:translateY(0)} }

.panel-left  .form-block,
.panel-left  .info-block  { animation: slideInLeft  0.6s var(--easing) both; }
.panel-right .form-block,
.panel-right .info-block  { animation: slideInRight 0.6s var(--easing) both; }

.sys-label               { animation: riseUp 0.5s 0.10s var(--easing) both; }
.form-block h2           { animation: riseUp 0.5s 0.16s var(--easing) both; }
.form-block .sub         { animation: riseUp 0.5s 0.20s var(--easing) both; }
.input-group:nth-of-type(1) { animation: riseUp 0.5s 0.26s var(--easing) both; }
.input-group:nth-of-type(2) { animation: riseUp 0.5s 0.32s var(--easing) both; }
.input-group:nth-of-type(3) { animation: riseUp 0.5s 0.38s var(--easing) both; }
.input-group:nth-of-type(4) { animation: riseUp 0.5s 0.44s var(--easing) both; }
.remember-row            { animation: riseUp 0.5s 0.46s var(--easing) both; }
.btn-primary             { animation: riseUp 0.5s 0.50s var(--easing) both; }
.divider                 { animation: riseUp 0.5s 0.54s var(--easing) both; }
.btn-secondary           { animation: riseUp 0.5s 0.58s var(--easing) both; }
.switch-link             { animation: riseUp 0.5s 0.62s var(--easing) both; }

.btn-primary.loading { opacity:0.7; pointer-events:none; }
.btn-primary.loading::after {
    content: '';
    position: absolute;
    width:16px; height:16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    right: 18px; top: 50%;
    transform: translateY(-50%);
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: translateY(-50%) rotate(360deg); } }

@media (max-width: 860px) {
    body { padding: 16px; align-items: center; justify-content: center; }
    .auth-wrapper {
        width: min(580px, 100%);
        min-height: unset;
        flex-direction: column;
        border-radius: 28px;
        align-items: center;
    }
    .panel { width: 100%; }
    .panel-right::before { display: none; }
    .panel-right {
        border-top: 1px solid var(--glass-border);
    }
    
    .info-block {
        padding: 40px 32px;
        gap: 18px;
        align-items: center;
        text-align: center;
    }
    .info-block h1 { font-size: 1.6rem; text-align: center; }
    .info-block > p { font-size: 0.9rem; max-width: 100%; text-align: center; }
    .feature-list { align-items: center; max-width: 100%; }
    .feature-item { font-size: 0.85rem; }

    .form-block {
        padding: 40px 36px;
        gap: 13px;
        align-items: stretch;
    }
    .form-block h2 { font-size: 1.6rem; }
    .form-block .sub { font-size: 0.88rem; }
    
    .deco-orbit.do3 { display: none; }
}

@media (max-width: 560px) {
    body {
        padding: 0;
        align-items: center;
        justify-content: center;
        background: linear-gradient(150deg, #0a1232 0%, #070d22 100%);
    }

    .auth-wrapper {
        width: 100%;
        min-height: 100svh;
        border-radius: 0;
        flex-direction: column;
        box-shadow: none;
        justify-content: center;
        align-items: center;
    }

    .panel { width: 100%; }
    .info-block { display: none !important; }

    .panel-left, .panel-right {
        background: transparent !important;
    }
    
    .panel-right { border-top: none; }
    .panel-right::before { display: none; }

    .form-block {
        padding: 48px 28px 52px;
        gap: 14px;
        min-height: 100svh;
        justify-content: center;
        align-items: stretch;
        width: 100%;
        max-width: 420px;
        margin: 0 auto;
    }

    .sys-label { font-size: 0.6rem; justify-content: center; }
    .form-block h2 { font-size: 1.4rem; text-align: center; }
    .form-block .sub { font-size: 0.85rem; text-align: center; }

    .input-group { padding: 0 14px; gap: 10px; border-radius: 10px; }
    .input-group input { font-size: 0.95rem; padding: 13px 0; }

    .btn-primary { padding: 14px; font-size: 0.7rem; letter-spacing: 0.15em; border-radius: 10px; }
    .btn-secondary { padding: 13px; font-size: 0.9rem; border-radius: 10px; }

    .remember-row { font-size: 0.85rem; }
    .forgot { font-size: 0.85rem; }
    .switch-link { font-size: 0.88rem; }
    .msg-box { font-size: 0.85rem; }

    .deco-orbit { display: none; }
}

@media (max-width: 380px) {
    .form-block { padding: 28px 20px 36px; }
    .form-block h2 { font-size: 1.2rem; }
    .sys-label { font-size: 0.52rem; letter-spacing: 0.15em; }
    .btn-primary { font-size: 0.65rem; letter-spacing: 0.1em; }
    .remember-row { flex-direction: column; align-items: flex-start; gap: 8px; }
    .input-group input { font-size: 0.88rem; }
}

@media (max-height: 600px) and (max-width: 860px) {
    .form-block {
        padding: 24px 32px;
        gap: 10px;
        min-height: unset;
        justify-content: flex-start;
        overflow-y: auto;
    }
    .form-block h2 { font-size: 1.3rem; }
    .form-block .sub { display: none; }
    .input-group input { padding: 11px 0; }
    .btn-primary { padding: 12px; }
}
/* ===== NEXORA – Logo placeholder styles ===== */
.logo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 20px rgba(0,212,255,0.45));
    animation: logoFloat 3s ease-in-out infinite;
}
@keyframes logoFloat {
    0%,100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}
.logo-placeholder-sm {
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 10px rgba(0,212,255,0.4));
    margin-bottom: 4px;
}
