/* =========================================================
   NITRIXA TECHNOLOGIES
   PUBLIC AUTHENTICATION UI
   ========================================================= */


/* =========================================================
   PAGE
========================================================= */

.auth-page {

    min-height: 100vh;

    background:
        radial-gradient(
            circle at 10% 10%,
            rgba(37, 99, 255, .08),
            transparent 32%
        ),
        radial-gradient(
            circle at 90% 90%,
            rgba(104, 71, 255, .07),
            transparent 32%
        ),
        var(--bg);

    position: relative;

    overflow-x: hidden;

}


/* =========================================================
   BACKGROUND
========================================================= */

.auth-background {

    position: fixed;

    inset: 0;

    pointer-events: none;

    overflow: hidden;

    z-index: 0;

}


.auth-orb {

    position: absolute;

    border-radius: 50%;

    filter: blur(1px);

    opacity: .7;

}


.auth-orb-one {

    width: 420px;

    height: 420px;

    top: -220px;

    right: -100px;

    background:
        radial-gradient(
            circle,
            rgba(37, 99, 255, .12),
            rgba(37, 99, 255, 0)
        );

}


.auth-orb-two {

    width: 360px;

    height: 360px;

    bottom: -180px;

    left: -120px;

    background:
        radial-gradient(
            circle,
            rgba(104, 71, 255, .10),
            rgba(104, 71, 255, 0)
        );

}


.auth-grid {

    position: absolute;

    inset: 0;

    opacity: .28;

    background-image:
        linear-gradient(
            rgba(23, 92, 255, .025) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(23, 92, 255, .025) 1px,
            transparent 1px
        );

    background-size:
        48px 48px;

}


/* =========================================================
   HEADER
========================================================= */

.auth-header {

    position: relative;

    z-index: 10;

    width: 100%;

    border-bottom:
        1px solid rgba(228, 234, 243, .8);

    background:
        rgba(255, 255, 255, .88);

    backdrop-filter:
        blur(16px);

}


.auth-header-inner {

    width: min(
        calc(100% - 40px),
        1240px
    );

    min-height: 76px;

    margin: 0 auto;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

}


.auth-brand {

    display: inline-flex;

    align-items: center;

}


.auth-brand img {

    width: 168px;

    max-height: 46px;

    object-fit: contain;

}


.auth-back-link {

    display: inline-flex;

    align-items: center;

    gap: 8px;

    color: var(--text-soft);

    font-size: 14px;

    font-weight: 700;

    transition:
        color var(--transition-fast),
        transform var(--transition-fast);

}


.auth-back-link:hover {

    color: var(--blue);

    transform: translateX(-2px);

}


/* =========================================================
   MAIN
========================================================= */

.auth-main {

    position: relative;

    z-index: 2;

    min-height:
        calc(100vh - 77px);

    padding:
        48px 20px 64px;

    display: flex;

    align-items: center;

    justify-content: center;

}


.auth-shell {

    width: min(
        1120px,
        100%
    );

    display: grid;

    grid-template-columns:
        minmax(0, .82fr)
        minmax(0, 1.18fr);

    background:
        rgba(255, 255, 255, .94);

    border:
        1px solid var(--border);

    border-radius:
        30px;

    box-shadow:
        var(--shadow-lg);

    overflow: hidden;

}


/* =========================================================
   BRAND PANEL
========================================================= */

.auth-brand-panel {

    position: relative;

    padding:
        58px 52px;

    background:
        linear-gradient(
            145deg,
            #06142f 0%,
            #0b2150 55%,
            #123b87 100%
        );

    color: #ffffff;

    overflow: hidden;

}


.auth-brand-panel::before {

    content: "";

    position: absolute;

    width: 420px;

    height: 420px;

    border-radius: 50%;

    right: -210px;

    top: -180px;

    background:
        radial-gradient(
            circle,
            rgba(0, 217, 255, .18),
            transparent 68%
        );

}


.auth-brand-panel::after {

    content: "";

    position: absolute;

    width: 300px;

    height: 300px;

    border-radius: 50%;

    left: -180px;

    bottom: -170px;

    background:
        radial-gradient(
            circle,
            rgba(104, 71, 255, .22),
            transparent 68%
        );

}


.auth-brand-content {

    position: relative;

    z-index: 2;

}


.auth-badge {

    display: inline-flex;

    align-items: center;

    gap: 9px;

    padding:
        8px 12px;

    border:
        1px solid rgba(255,255,255,.14);

    border-radius:
        999px;

    background:
        rgba(255,255,255,.07);

    color:
        rgba(255,255,255,.84);

    font-size:
        11px;

    font-weight:
        800;

    letter-spacing:
        .13em;

}


.auth-badge-dot {

    width: 7px;

    height: 7px;

    border-radius: 50%;

    background:
        #4fe7ff;

    box-shadow:
        0 0 14px rgba(79,231,255,.75);

}


.auth-brand-panel h1 {

    margin:
        28px 0 18px;

    max-width:
        450px;

    font-size:
        clamp(
            38px,
            4vw,
            58px
        );

    letter-spacing:
        -.045em;

    line-height:
        1.03;

}


.auth-brand-panel h1 span {

    display: block;

    background:
        linear-gradient(
            90deg,
            #ffffff,
            #83eaff
        );

    -webkit-background-clip:
        text;

    background-clip:
        text;

    color:
        transparent;

}


.auth-brand-panel > .auth-brand-content > p {

    max-width:
        470px;

    margin:
        0;

    color:
        rgba(255,255,255,.72);

    font-size:
        15px;

    line-height:
        1.75;

}


/* =========================================================
   BENEFITS
========================================================= */

.auth-benefits {

    margin-top:
        42px;

    display:
        grid;

    gap:
        18px;

}


.auth-benefit {

    display:
        flex;

    align-items:
        flex-start;

    gap:
        13px;

}


.auth-benefit-icon {

    flex:
        0 0 30px;

    width:
        30px;

    height:
        30px;

    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    border:
        1px solid rgba(120,225,255,.25);

    border-radius:
        10px;

    background:
        rgba(0,217,255,.09);

    color:
        #72eaff;

    font-size:
        14px;

    font-weight:
        900;

}


.auth-benefit strong {

    display:
        block;

    margin-bottom:
        2px;

    font-size:
        14px;

    color:
        #ffffff;

}


.auth-benefit small {

    display:
        block;

    color:
        rgba(255,255,255,.57);

    font-size:
        12px;

    line-height:
        1.5;

}


/* =========================================================
   AUTH CARD
========================================================= */

.auth-card {

    padding:
        52px;

    min-width:
        0;

}


.auth-card-header {

    margin-bottom:
        28px;

}


.auth-eyebrow {

    display:
        block;

    margin-bottom:
        8px;

    color:
        var(--blue);

    font-size:
        11px;

    font-weight:
        900;

    letter-spacing:
        .14em;

}


.auth-card-header h2 {

    margin:
        0 0 8px;

    color:
        var(--text);

    font-size:
        clamp(
            28px,
            3vw,
            38px
        );

    letter-spacing:
        -.035em;

}


.auth-card-header p {

    margin:
        0;

    color:
        var(--text-soft);

    font-size:
        14px;

}


/* =========================================================
   TABS
========================================================= */

.auth-tabs {

    display:
        grid;

    grid-template-columns:
        1fr 1fr;

    padding:
        4px;

    margin-bottom:
        24px;

    background:
        var(--surface-soft);

    border:
        1px solid var(--border);

    border-radius:
        14px;

}


.auth-tab {

    border:
        0;

    border-radius:
        10px;

    background:
        transparent;

    color:
        var(--muted);

    min-height:
        42px;

    font-size:
        13px;

    font-weight:
        800;

    transition:
        all var(--transition-fast);

}


.auth-tab:hover {

    color:
        var(--text);

}


.auth-tab.active {

    background:
        #ffffff;

    color:
        var(--blue);

    box-shadow:
        0 5px 18px rgba(15,35,75,.08);

}


/* =========================================================
   MESSAGE
========================================================= */

.auth-message {

    margin-bottom:
        18px;

    padding:
        13px 15px;

    border:
        1px solid var(--border);

    border-radius:
        12px;

    background:
        var(--surface-soft);

    color:
        var(--text-soft);

    font-size:
        13px;

    line-height:
        1.55;

}


.auth-message.success {

    border-color:
        rgba(22,163,74,.22);

    background:
        rgba(22,163,74,.06);

    color:
        #166534;

}


.auth-message.error {

    border-color:
        rgba(220,38,38,.20);

    background:
        rgba(220,38,38,.055);

    color:
        #b42318;

}


.auth-message.info {

    border-color:
        rgba(37,99,255,.20);

    background:
        rgba(37,99,255,.055);

    color:
        #174ea6;

}


/* =========================================================
   FORM
========================================================= */

.auth-form {

    display:
        block;

}


.auth-form.is-hidden,
.confirmation-panel.is-hidden {

    display:
        none !important;

}


.auth-form-grid {

    display:
        grid;

    grid-template-columns:
        1fr 1fr;

    gap:
        18px;

}


.auth-field {

    min-width:
        0;

}


.auth-field-full {

    grid-column:
        1 / -1;

}


.auth-field label {

    display:
        block;

    margin-bottom:
        7px;

    color:
        var(--text);

    font-size:
        13px;

    font-weight:
        800;

}


.auth-label-row {

    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    gap:
        12px;

    margin-bottom:
        7px;

}


.auth-label-row label {

    margin:
        0;

}


.auth-field input {

    width:
        100%;

    min-height:
        48px;

    padding:
        0 14px;

    border:
        1px solid var(--border-strong);

    border-radius:
        12px;

    outline:
        none;

    background:
        #ffffff;

    color:
        var(--text);

    font-size:
        14px;

    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast),
        background var(--transition-fast);

}


.auth-field input::placeholder {

    color:
        #9aa7b9;

}


.auth-field input:hover {

    border-color:
        #bdc9da;

}


.auth-field input:focus {

    border-color:
        rgba(37,99,255,.72);

    background:
        #ffffff;

    box-shadow:
        0 0 0 4px rgba(37,99,255,.08);

}


.auth-field input.input-error {

    border-color:
        rgba(220,38,38,.70);

    box-shadow:
        0 0 0 4px rgba(220,38,38,.06);

}


.field-help {

    display:
        block;

    margin-top:
        6px;

    color:
        var(--muted);

    font-size:
        11px;

    line-height:
        1.45;

}


/* =========================================================
   PASSWORD
========================================================= */

.password-wrapper {

    position:
        relative;

}


.password-wrapper input {

    padding-right:
        72px;

}


.password-toggle {

    position:
        absolute;

    top:
        50%;

    right:
        10px;

    transform:
        translateY(-50%);

    border:
        0;

    background:
        transparent;

    color:
        var(--blue);

    font-size:
        11px;

    font-weight:
        800;

    padding:
        7px;

}


.password-toggle:hover {

    color:
        var(--navy);

}


/* =========================================================
   TEXT BUTTONS
========================================================= */

.auth-text-button,
.auth-inline-button {

    border:
        0;

    padding:
        0;

    background:
        transparent;

    color:
        var(--blue);

    font-size:
        12px;

    font-weight:
        800;

}


.auth-text-button:hover,
.auth-inline-button:hover {

    text-decoration:
        underline;

}


/* =========================================================
   CONSENT
========================================================= */

.auth-consent {

    display:
        flex;

    align-items:
        flex-start;

    gap:
        9px;

    margin:
        20px 0;

    color:
        var(--text-soft);

    font-size:
        12px;

    line-height:
        1.55;

    cursor:
        pointer;

}


.auth-consent input {

    width:
        16px;

    height:
        16px;

    flex:
        0 0 16px;

    margin-top:
        2px;

    accent-color:
        var(--blue);

}


.auth-consent a {

    color:
        var(--blue);

    font-weight:
        700;

}


/* =========================================================
   SUBMIT
========================================================= */

.auth-submit {

    position:
        relative;

    width:
        100%;

    min-height:
        50px;

    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    gap:
        10px;

    border:
        0;

    border-radius:
        13px;

    background:
        linear-gradient(
            135deg,
            var(--blue),
            var(--violet)
        );

    color:
        #ffffff;

    font-size:
        14px;

    font-weight:
        850;

    box-shadow:
        0 12px 28px rgba(37,99,255,.20);

    transition:
        transform var(--transition-fast),
        box-shadow var(--transition-fast),
        opacity var(--transition-fast);

}


.auth-submit:hover:not(:disabled) {

    transform:
        translateY(-1px);

    box-shadow:
        0 16px 34px rgba(37,99,255,.26);

}


.auth-submit:active:not(:disabled) {

    transform:
        translateY(0);

}


.auth-submit:disabled {

    opacity:
        .68;

}


.auth-submit.secondary {

    background:
        var(--navy);

    box-shadow:
        none;

}


/* =========================================================
   SPINNER
========================================================= */

.auth-spinner {

    width:
        16px;

    height:
        16px;

    display:
        none;

    border:
        2px solid rgba(255,255,255,.35);

    border-top-color:
        #ffffff;

    border-radius:
        50%;

    animation:
        auth-spin .7s linear infinite;

}


.auth-submit.loading .auth-spinner {

    display:
        inline-block;

}


.auth-submit.loading .auth-button-text {

    opacity:
        .85;

}


@keyframes auth-spin {

    to {
        transform:
            rotate(360deg);
    }

}


/* =========================================================
   SWITCH
========================================================= */

.auth-switch-text {

    margin:
        18px 0 0;

    text-align:
        center;

    color:
        var(--muted);

    font-size:
        12px;

}


/* =========================================================
   CONFIRMATION
========================================================= */

.confirmation-panel {

    text-align:
        center;

    padding:
        20px 0 4px;

}


.confirmation-icon {

    width:
        64px;

    height:
        64px;

    margin:
        0 auto 18px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    border:
        1px solid rgba(22,163,74,.18);

    border-radius:
        20px;

    background:
        rgba(22,163,74,.07);

    color:
        #15803d;

    font-size:
        25px;

    font-weight:
        900;

}


.confirmation-panel h3 {

    margin:
        0 0 8px;

    font-size:
        24px;

    letter-spacing:
        -.02em;

}


.confirmation-panel p {

    max-width:
        460px;

    margin:
        0 auto 22px;

    color:
        var(--text-soft);

    font-size:
        13px;

    line-height:
        1.7;

}


/* =========================================================
   SECURITY
========================================================= */

.auth-security-note {

    display:
        flex;

    align-items:
        flex-start;

    gap:
        9px;

    margin-top:
        24px;

    padding-top:
        18px;

    border-top:
        1px solid var(--border);

    color:
        var(--muted);

    font-size:
        11px;

    line-height:
        1.55;

}


.security-icon {

    flex:
        0 0 auto;

}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 920px) {

    .auth-shell {

        grid-template-columns:
            1fr;

    }


    .auth-brand-panel {

        padding:
            42px 42px 38px;

    }


    .auth-brand-panel h1 {

        font-size:
            clamp(36px, 7vw, 50px);

    }


    .auth-benefits {

        grid-template-columns:
            repeat(3, 1fr);

        gap:
            12px;

        margin-top:
            30px;

    }


    .auth-benefit {

        display:
            block;

    }


    .auth-benefit-icon {

        margin-bottom:
            9px;

    }

}


@media (max-width: 700px) {

    .auth-header-inner {

        width:
            min(
                calc(100% - 28px),
                1240px
            );

        min-height:
            68px;

    }


    .auth-brand img {

        width:
            145px;

    }


    .auth-back-link {

        font-size:
            12px;

    }


    .auth-main {

        padding:
            24px 14px 40px;

        align-items:
            flex-start;

    }


    .auth-shell {

        border-radius:
            22px;

    }


    .auth-brand-panel {

        padding:
            34px 26px;

    }


    .auth-brand-panel h1 {

        margin-top:
            22px;

        font-size:
            36px;

    }


    .auth-brand-panel > .auth-brand-content > p {

        font-size:
            13px;

    }


    .auth-benefits {

        display:
            grid;

        grid-template-columns:
            1fr;

        margin-top:
            26px;

    }


    .auth-benefit {

        display:
            flex;

    }


    .auth-benefit-icon {

        margin-bottom:
            0;

    }


    .auth-card {

        padding:
            30px 22px 26px;

    }


    .auth-form-grid {

        grid-template-columns:
            1fr;

        gap:
            16px;

    }


    .auth-field-full {

        grid-column:
            auto;

    }

}


@media (max-width: 430px) {

    .auth-header-inner {

        width:
            calc(100% - 22px);

    }


    .auth-brand img {

        width:
            130px;

    }


    .auth-back-link {

        font-size:
            0;

    }


    .auth-back-link span {

        font-size:
            18px;

    }


    .auth-main {

        padding:
            16px 10px 30px;

    }


    .auth-brand-panel {

        padding:
            28px 20px;

    }


    .auth-card {

        padding:
            26px 18px 22px;

    }


    .auth-card-header h2 {

        font-size:
            28px;

    }


    .auth-tabs {

        margin-bottom:
            20px;

    }

}


/* =========================================================
   ACCESSIBILITY
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .auth-submit,
    .auth-back-link {

        transition:
            none;

    }

    .auth-spinner {

        animation:
            none;

    }

}