/* ==========================================================
   NEXUS AUTHENTICATION SCREENS
   ========================================================== */

:root {
    --nx-auth-bg: #050913;
    --nx-auth-panel: rgba(12, 20, 36, 0.92);
    --nx-auth-panel-border: rgba(148, 163, 184, 0.16);
    --nx-auth-field: rgba(5, 11, 24, 0.86);
    --nx-auth-field-border: rgba(148, 163, 184, 0.23);
    --nx-auth-text: #f8fafc;
    --nx-auth-muted: #94a3b8;
    --nx-auth-primary: #3b82f6;
    --nx-auth-primary-hover: #60a5fa;
    --nx-auth-danger: #f87171;
}

html,
body {
    min-height: 100%;
}

.nx-auth-body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(
            circle at top left,
            rgba(37, 99, 235, 0.13),
            transparent 36%
        ),
        radial-gradient(
            circle at bottom right,
            rgba(14, 165, 233, 0.09),
            transparent 32%
        ),
        var(--nx-auth-bg);
    color: var(--nx-auth-text);
}

.nx-auth-shell {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 100vh;
    min-height: 100svh;
    padding: 32px 20px;
    overflow: hidden;
    isolation: isolate;
}

.nx-auth-background {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.nx-auth-grid {
    position: absolute;
    inset: 0;
    opacity: 0.17;
    background-image:
        linear-gradient(
            rgba(148, 163, 184, 0.08) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(148, 163, 184, 0.08) 1px,
            transparent 1px
        );
    background-size: 52px 52px;
    mask-image:
        radial-gradient(
            circle at center,
            black 20%,
            transparent 78%
        );
}

.nx-auth-orb {
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 999px;
    filter: blur(90px);
    opacity: 0.16;
}

.nx-auth-orb--one {
    top: -170px;
    left: -120px;
    background: #2563eb;
}

.nx-auth-orb--two {
    right: -150px;
    bottom: -190px;
    background: #0ea5e9;
}

.nx-auth-container {
    width: 100%;
    max-width: 460px;
}

.nx-auth-card {
    position: relative;
    padding: 38px;
    border: 1px solid var(--nx-auth-panel-border);
    border-radius: 22px;
    background: var(--nx-auth-panel);
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.035);
    backdrop-filter: blur(18px);
}

.nx-auth-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 28px;
}

.nx-auth-brand img {
    display: block;
    width: min(100%, 255px);
    height: auto;
}

.nx-auth-heading {
    margin-bottom: 30px;
    text-align: center;
}

.nx-auth-heading h1 {
    margin: 0 0 10px;
    color: var(--nx-auth-text);
    font-size: clamp(1.65rem, 4vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.035em;
}

.nx-auth-heading p {
    margin: 0;
    color: var(--nx-auth-muted);
    font-size: 0.96rem;
    line-height: 1.6;
}

.nx-auth-form {
    display: grid;
    gap: 20px;
}

.nx-auth-field {
    display: grid;
    gap: 8px;
}

.nx-auth-field label {
    color: #dbe5f1;
    font-size: 0.91rem;
    font-weight: 600;
}

.nx-auth-input-wrap {
    position: relative;
}

.nx-auth-input {
    display: block;
    width: 100%;
    min-height: 50px;
    box-sizing: border-box;
    padding: 0 15px;
    border: 1px solid var(--nx-auth-field-border);
    border-radius: 11px;
    outline: none;
    background: var(--nx-auth-field);
    color: var(--nx-auth-text);
    font: inherit;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        background-color 160ms ease;
}

.nx-auth-input::placeholder {
    color: #64748b;
}

.nx-auth-input:hover {
    border-color: rgba(148, 163, 184, 0.38);
}

.nx-auth-input:focus {
    border-color: var(--nx-auth-primary);
    background: rgba(8, 16, 31, 0.96);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14);
}

.nx-auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: -2px;
}

.nx-auth-remember {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--nx-auth-muted);
    font-size: 0.89rem;
    cursor: pointer;
    user-select: none;
}

.nx-auth-remember input {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--nx-auth-primary);
}

.nx-auth-link {
    color: #93c5fd;
    font-size: 0.89rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 160ms ease;
}

.nx-auth-link:hover,
.nx-auth-link:focus-visible {
    color: #dbeafe;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.nx-auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 50px;
    padding: 0 20px;
    border: 1px solid rgba(96, 165, 250, 0.42);
    border-radius: 11px;
    background:
        linear-gradient(
            135deg,
            #2563eb,
            #3b82f6
        );
    color: #ffffff;
    font: inherit;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow:
        0 12px 30px rgba(37, 99, 235, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
    transition:
        transform 160ms ease,
        background 160ms ease,
        box-shadow 160ms ease;
}

.nx-auth-submit:hover {
    transform: translateY(-1px);
    background:
        linear-gradient(
            135deg,
            #3b82f6,
            #60a5fa
        );
    box-shadow:
        0 16px 34px rgba(37, 99, 235, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.nx-auth-submit:active {
    transform: translateY(0);
}

.nx-auth-submit:focus-visible {
    outline: 3px solid rgba(147, 197, 253, 0.5);
    outline-offset: 3px;
}

.nx-auth-notice {
    padding: 12px 14px;
    border: 1px solid rgba(248, 113, 113, 0.25);
    border-radius: 10px;
    background: rgba(127, 29, 29, 0.16);
    color: #fecaca;
    font-size: 0.9rem;
    line-height: 1.5;
}

.nx-auth-footer {
    margin-top: 26px;
    color: #64748b;
    text-align: center;
    font-size: 0.78rem;
    line-height: 1.7;
}

.nx-auth-footer strong {
    color: #94a3b8;
    font-weight: 600;
}

.nx-auth-footer__dot {
    display: inline-block;
    margin: 0 7px;
    opacity: 0.5;
}

@media (max-width: 560px) {
    .nx-auth-shell {
        align-items: center;
        padding: 20px 14px;
    }

    .nx-auth-card {
        padding: 30px 22px;
        border-radius: 18px;
    }

    .nx-auth-brand img {
        width: min(100%, 220px);
    }

    .nx-auth-options {
        align-items: flex-start;
        flex-direction: column;
        gap: 13px;
    }

    .nx-auth-footer__dot {
        display: none;
    }

    .nx-auth-footer span {
        display: block;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
