/* ============================================================
   NEXORA — Login (premium redesign)
   Scoped under .liberty-login so the dashboard is untouched.
   Palette: navy #05070E / cyan #00D4FF / blue #0066FF /
            violet #7B2CFF / magenta #FF00E6
   Type: Orbitron (brand) + Inter (body)
   ============================================================ */

.liberty-login {
    --nx-bg-0: #04060C;
    --nx-bg-1: #070B16;
    --nx-bg-2: #0A1020;
    --nx-cyan: #00D4FF;
    --nx-blue: #0066FF;
    --nx-violet: #7B2CFF;
    --nx-magenta: #FF00E6;
    --nx-text: #EAF2FF;
    --nx-muted: #94A3BE;
    --nx-line: rgba(148, 163, 190, 0.14);
    --nx-grad: linear-gradient(120deg, #00D4FF 0%, #0066FF 34%, #7B2CFF 68%, #FF00E6 100%);
    --nx-grad-soft: linear-gradient(135deg, rgba(0,212,255,0.16), rgba(123,44,255,0.18));
    --nx-radius: 22px;

    position: fixed;
    inset: 0;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    overflow: auto;
    background:
        radial-gradient(1200px 820px at 14% 6%,  rgba(0, 102, 255, 0.20), transparent 56%),
        radial-gradient(1050px 900px at 88% 96%, rgba(255, 0, 230, 0.14), transparent 55%),
        radial-gradient(900px 720px at 92% 8%,   rgba(0, 212, 255, 0.12), transparent 60%),
        linear-gradient(160deg, var(--nx-bg-0) 0%, var(--nx-bg-1) 55%, var(--nx-bg-2) 100%);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--nx-text);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    z-index: 1;
}

/* ---------- Cosmic background layers ---------- */
.liberty-login .lg-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
/* aurora blobs */
.liberty-login .lg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.5;
    will-change: transform;
}
.liberty-login .lg-orb-1 {
    width: 520px; height: 520px;
    top: -170px; left: -140px;
    background: radial-gradient(circle at 30% 30%, var(--nx-cyan), transparent 70%);
    animation: nx-float-1 20s ease-in-out infinite;
}
.liberty-login .lg-orb-2 {
    width: 600px; height: 600px;
    bottom: -220px; right: -160px;
    background: radial-gradient(circle at 70% 70%, var(--nx-violet), transparent 70%);
    animation: nx-float-2 24s ease-in-out infinite;
}
.liberty-login .lg-orb-3 {
    width: 380px; height: 380px;
    top: 38%; right: 18%;
    background: radial-gradient(circle at 50% 50%, var(--nx-magenta), transparent 70%);
    opacity: 0.30;
    animation: nx-float-1 28s ease-in-out infinite reverse;
}
/* starfield + grid */
.liberty-login .lg-grid {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1.4px 1.4px at 20% 30%, rgba(255,255,255,0.75), transparent),
        radial-gradient(1.2px 1.2px at 75% 20%, rgba(0,212,255,0.65), transparent),
        radial-gradient(1.3px 1.3px at 60% 70%, rgba(255,255,255,0.55), transparent),
        radial-gradient(1px 1px at 35% 80%, rgba(123,44,255,0.65), transparent),
        radial-gradient(1.1px 1.1px at 88% 60%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 10% 62%, rgba(255,255,255,0.5), transparent),
        linear-gradient(rgba(148,163,190,0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148,163,190,0.045) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 52px 52px, 52px 52px;
    -webkit-mask-image: radial-gradient(circle at 50% 42%, #000 0%, transparent 78%);
    mask-image: radial-gradient(circle at 50% 42%, #000 0%, transparent 78%);
    animation: nx-twinkle 6s ease-in-out infinite;
}
/* fine film grain + vignette */
.liberty-login::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.05;
    mix-blend-mode: soft-light;
}
.liberty-login::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(120% 120% at 50% 45%, transparent 55%, rgba(2,4,10,0.55) 100%);
}

/* ---------- Glass shell ---------- */
.liberty-login .lg-shell {
    position: relative;
    z-index: 2;
    width: min(1120px, 100%);
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    border-radius: var(--nx-radius);
    overflow: hidden;
    background: linear-gradient(180deg, rgba(15,23,44,0.62), rgba(8,12,26,0.68));
    -webkit-backdrop-filter: blur(28px) saturate(150%);
    backdrop-filter: blur(28px) saturate(150%);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.06) inset,
        0 40px 120px -30px rgba(3,7,20,0.85),
        0 0 90px -40px rgba(0,212,255,0.35);
    animation: nx-rise 0.85s cubic-bezier(0.16, 1, 0.3, 1) both;
}
/* animated gradient hairline at the very top */
.liberty-login .lg-shell::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--nx-grad);
    background-size: 300% 100%;
    opacity: 0.9;
    animation: nx-slide 8s linear infinite;
}

/* ---------- Brand panel ---------- */
.liberty-login .lg-brand {
    position: relative;
    padding: 54px 50px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    justify-content: space-between;
    background:
        radial-gradient(130% 120% at 0% 0%, rgba(0, 212, 255, 0.16), transparent 52%),
        radial-gradient(130% 120% at 100% 100%, rgba(123, 44, 255, 0.22), transparent 55%),
        linear-gradient(155deg, rgba(11,18,38,0.5) 0%, rgba(8,12,26,0.2) 100%);
    border-right: 1px solid var(--nx-line);
    overflow: hidden;
}

/* logo lockup */
.liberty-login .lg-lockup {
    display: flex;
    align-items: center;
    gap: 15px;
    animation: nx-fade-up 0.9s 0.1s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.liberty-login .lg-mark {
    position: relative;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
}
.liberty-login .lg-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 6px 18px rgba(0,140,255,0.55)) drop-shadow(0 2px 10px rgba(160,32,240,0.45));
    animation: nx-bob 6s ease-in-out infinite;
}
.liberty-login .lg-mark::after {
    content: "";
    position: absolute;
    inset: -30%;
    z-index: -1;
    background: radial-gradient(circle, rgba(0,180,255,0.42), rgba(123,44,255,0.20) 45%, transparent 70%);
    filter: blur(14px);
    animation: nx-halo 5s ease-in-out infinite;
}
.liberty-login .lg-wordmark {
    font-family: 'Orbitron', 'Inter', sans-serif;
    font-weight: 800;
    font-size: 30px;
    letter-spacing: 0.20em;
    line-height: 1;
    padding-left: 2px;
    background: linear-gradient(90deg, #EAF2FF 0%, #7CC8FF 40%, #B98BFF 72%, #FF6FE8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #EAF2FF;
    text-shadow: 0 2px 24px rgba(0,180,255,0.25);
}

.liberty-login .lg-brand-body { animation: nx-fade-up 0.9s 0.22s cubic-bezier(0.16, 1, 0.3, 1) both; }
.liberty-login .lg-brand-title {
    margin: 0 0 16px;
    font-size: clamp(28px, 3vw, 38px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #FFFFFF;
}
.liberty-login .lg-brand-title span {
    background: var(--nx-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #B98BFF; /* fallback if clip unsupported */
}
.liberty-login .lg-brand-sub {
    margin: 0;
    max-width: 30ch;
    font-size: 15.5px;
    line-height: 1.6;
    color: var(--nx-muted);
}

/* feature list */
.liberty-login .lg-features {
    list-style: none;
    margin: 26px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: nx-fade-up 0.9s 0.34s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.liberty-login .lg-features li {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 14.5px;
    font-weight: 500;
    color: #D5DEEF;
}
.liberty-login .lg-feat-ic {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 12px;
    color: var(--nx-cyan);
    font-size: 15px;
    background: var(--nx-grad-soft);
    border: 1px solid rgba(0,212,255,0.22);
    box-shadow: 0 6px 18px -8px rgba(0,140,255,0.5), 0 0 0 1px rgba(255,255,255,0.03) inset;
}

/* brand footer status */
.liberty-login .lg-brand-foot {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 12.5px;
    letter-spacing: 0.03em;
    color: var(--nx-muted);
    animation: nx-fade-up 0.9s 0.46s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.liberty-login .lg-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #00E6A8;
    box-shadow: 0 0 0 0 rgba(0,230,168,0.55);
    animation: nx-pulse 2.4s ease-out infinite;
}

/* ---------- Form card ---------- */
.liberty-login .lg-card {
    position: relative;
    padding: 56px 54px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(180deg, rgba(6,10,22,0.35), rgba(6,10,22,0.55));
    animation: nx-fade-up 0.9s 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.liberty-login .lg-card-head { margin-bottom: 30px; }
.liberty-login .lg-mark-sm {
    width: 46px; height: 46px; flex-basis: 46px;
    margin-bottom: 18px;
    display: none; /* shown on mobile only */
}
.liberty-login .lg-card-title {
    margin: 0 0 6px;
    font-size: 27px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #FFFFFF;
}
.liberty-login .lg-card-sub {
    margin: 0;
    font-size: 14.5px;
    color: var(--nx-muted);
}
.liberty-login .lg-card-sub b { color: var(--nx-cyan); font-weight: 600; }

/* inputs */
.liberty-login .login-content { width: 100%; }
.liberty-login .form-floating { position: relative; margin-bottom: 18px !important; }
.liberty-login .lg-inp-ic {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    color: var(--nx-muted);
    z-index: 3;
    pointer-events: none;
    transition: color 0.2s ease;
}
.liberty-login .form-floating:focus-within .lg-inp-ic { color: var(--nx-cyan); }

.liberty-login .form-control {
    height: 56px !important;
    padding: 18px 18px 6px 48px !important;
    font-size: 14.5px !important;
    color: #FFFFFF !important;
    background: rgba(255,255,255,0.035) !important;
    border: 1px solid rgba(255,255,255,0.09) !important;
    border-radius: 13px !important;
    box-shadow: none !important;
    transition: border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}
.liberty-login .form-control::placeholder { color: transparent; }
.liberty-login .form-control:hover { border-color: rgba(255,255,255,0.18) !important; }
.liberty-login .form-control:focus {
    background: rgba(0,212,255,0.05) !important;
    border-color: var(--nx-cyan) !important;
    box-shadow: 0 0 0 3px rgba(0,212,255,0.14), 0 8px 30px -12px rgba(0,180,255,0.5) !important;
}
/* autofill */
.liberty-login .form-control:-webkit-autofill,
.liberty-login .form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: #FFFFFF !important;
    -webkit-box-shadow: 0 0 0 1000px rgba(10,16,32,0.98) inset, 0 0 0 3px rgba(0,212,255,0.14) !important;
    caret-color: #fff;
    transition: background-color 9999s ease-in-out 0s;
}
/* floating label */
.liberty-login .form-floating > label {
    left: 34px !important;
    padding-left: 14px !important;
    color: var(--nx-muted) !important;
    font-size: 14.5px !important;
    display: flex; align-items: center;
}
.liberty-login .form-floating > .form-control:focus ~ label,
.liberty-login .form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--nx-cyan) !important;
    opacity: 0.85;
    transform: scale(0.82) translateY(-0.7rem) translateX(0.1rem) !important;
}

/* button */
.liberty-login .btn-success {
    position: relative;
    overflow: hidden;
    height: 56px !important;
    border: none !important;
    border-radius: 13px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em;
    color: #061024 !important;
    background: var(--nx-grad) !important;
    background-size: 180% 180% !important;
    box-shadow: 0 14px 34px -10px rgba(0,150,255,0.6), 0 6px 18px -8px rgba(160,32,240,0.55);
    transition: transform 0.18s ease, box-shadow 0.25s ease, background-position 0.6s ease;
    margin-top: 6px;
}
.liberty-login .btn-success:hover {
    transform: translateY(-2px);
    background-position: 100% 0 !important;
    box-shadow: 0 20px 44px -10px rgba(0,150,255,0.7), 0 8px 24px -8px rgba(255,0,230,0.5);
}
.liberty-login .btn-success:active { transform: translateY(0); }
.liberty-login .btn-success::after {
    content: "";
    position: absolute;
    top: 0; left: -60%;
    width: 45%; height: 100%;
    background: linear-gradient(120deg, transparent 20%, rgba(255,255,255,0.5) 50%, transparent 80%);
    transform: skewX(-18deg);
    animation: nx-sheen 4.5s ease-in-out infinite;
}

/* footer */
.liberty-login .lg-foot {
    margin: 26px 0 0;
    text-align: center;
    font-size: 12.5px;
    letter-spacing: 0.02em;
    color: var(--nx-muted);
}
.liberty-login .lg-foot b {
    font-weight: 600;
    background: var(--nx-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--nx-cyan);
}

/* ---------- Keyframes ---------- */
@keyframes nx-rise { from { opacity: 0; transform: translateY(22px) scale(0.99); } to { opacity: 1; transform: none; } }
@keyframes nx-fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes nx-float-1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(60px, 40px); } }
@keyframes nx-float-2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-50px, -40px); } }
@keyframes nx-twinkle { 0%,100% { opacity: 0.85; } 50% { opacity: 0.55; } }
@keyframes nx-slide { 0% { background-position: 0% 0; } 100% { background-position: 300% 0; } }
@keyframes nx-sheen { 0%, 65% { left: -60%; } 100% { left: 130%; } }
@keyframes nx-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes nx-halo { 0%,100% { opacity: 0.75; } 50% { opacity: 1; } }
@keyframes nx-pulse { 0% { box-shadow: 0 0 0 0 rgba(0,230,168,0.5); } 70% { box-shadow: 0 0 0 8px rgba(0,230,168,0); } 100% { box-shadow: 0 0 0 0 rgba(0,230,168,0); } }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .liberty-login { padding: 18px; }
    .liberty-login .lg-shell { grid-template-columns: 1fr; width: min(460px, 100%); }
    .liberty-login .lg-brand { display: none; }
    .liberty-login .lg-card { padding: 40px 30px; }
    .liberty-login .lg-mark-sm { display: grid; }
    .liberty-login .lg-card-head { text-align: center; }
    .liberty-login .lg-mark-sm { margin-left: auto; margin-right: auto; }
}

@media (min-width: 1400px) {
    .liberty-login .lg-brand { padding: 66px 62px; }
    .liberty-login .lg-card { padding: 66px 62px; }
}

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