@font-face {
    font-family: "Gendox Montserrat";
    src: url("fonts/Montserrat-Variable.ttf") format("truetype");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

body.auth-screen {
    --auth-blue: #2563eb;
    --auth-blue-strong: #1d4ed8;
    --auth-blue-deep: #123a84;
    --auth-blue-soft: #eaf4ff;
    --auth-ink: #172033;
    --auth-muted: #738099;
    --auth-line: #dbe4f0;
    min-height: 100vh;
    display: grid;
    place-items: center;
    margin: 0;
    padding: 28px;
    overflow-x: hidden;
    color: var(--auth-ink);
    background: linear-gradient(135deg, #f4f5fc 0%, #f7f9fd 54%, #f7eff3 100%);
    font-family: "Gendox Montserrat", Inter, ui-sans-serif, system-ui, sans-serif;
}

body.auth-screen *,
body.auth-screen *::before,
body.auth-screen *::after {
    box-sizing: border-box;
}

body.auth-screen .auth-card,
body.auth-screen .auth-card.compact-auth {
    position: relative;
    width: min(1180px, 100%);
    min-height: min(720px, calc(100vh - 56px));
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr);
    gap: 18px;
    padding: 18px;
    overflow: hidden;
    border: 1px solid rgba(147, 197, 253, 0.92);
    border-radius: 28px !important;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 28px 80px rgba(41, 81, 139, 0.18), 0 0 0 6px rgba(255, 255, 255, 0.38) !important;
}

body.auth-screen .auth-form,
body.auth-screen section.auth-form,
body.auth-screen div.auth-form {
    min-width: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    align-content: stretch;
    gap: 0;
    padding: 24px 48px 22px;
    overflow: visible;
    border: 0 !important;
    border-radius: 20px !important;
    background: #ffffff !important;
    box-shadow: none !important;
}

body.auth-screen .auth-brand {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    color: var(--auth-ink);
    text-decoration: none;
}

body.auth-screen .auth-brand img {
    display: block;
    width: 138px;
    height: auto;
    max-height: 44px;
    object-fit: contain;
}

body.auth-screen .auth-form-content {
    width: min(100%, 390px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-self: center;
    justify-self: center;
    gap: 14px;
    padding: 28px 0;
}

body.auth-screen .auth-form-content > * {
    min-width: 0;
}

body.auth-screen .auth-form-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    margin: 0 auto 2px;
    border: 1px solid rgba(37, 99, 235, 0.22);
    border-radius: 12px;
    color: #ffffff;
    background: var(--auth-blue);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.25);
}

body.auth-screen .auth-form-icon svg {
    width: 21px;
    height: 21px;
    stroke-width: 1.8;
}

body.auth-screen .auth-form-header {
    display: grid;
    gap: 6px;
    text-align: center;
}

body.auth-screen .auth-form-header h1,
body.auth-screen .auth-form-header h2,
body.auth-screen .auth-form-content > h1,
body.auth-screen .auth-form-content > h2 {
    margin: 0;
    color: var(--auth-ink);
    font-size: 27px;
    line-height: 1.16;
    font-weight: 720;
    letter-spacing: 0;
    text-align: center;
}

body.auth-screen .auth-form-header p,
body.auth-screen .auth-form-copy {
    margin: 0;
    color: var(--auth-muted);
    font-size: 13px;
    line-height: 1.55;
    text-align: center;
}

body.auth-screen .auth-context {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 2px auto 0;
    color: var(--auth-blue-strong);
    font-size: 11px;
    font-weight: 760;
}

body.auth-screen .auth-context img {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    object-fit: contain;
}

body.auth-screen .auth-mode-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    margin-top: 6px;
    padding: 4px;
    border: 1px solid var(--auth-line);
    border-radius: 12px;
    background: #f7f9fc;
}

body.auth-screen .auth-mode-switch a {
    min-height: 34px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #526079;
    font-size: 12px;
    font-weight: 680;
    text-decoration: none;
}

body.auth-screen .auth-mode-switch a[aria-current="page"] {
    color: #ffffff;
    background: var(--auth-blue);
    box-shadow: 0 7px 16px rgba(37, 99, 235, 0.2);
}

body.auth-screen .auth-form-content label:not(.auth-check) {
    display: grid;
    gap: 7px;
    margin: 0;
    color: #536078;
    font-size: 12px;
    font-weight: 670;
}

body.auth-screen .auth-nested-form {
    display: grid;
    gap: 14px;
}

body.auth-screen .auth-form-content input:not([type="checkbox"]),
body.auth-screen .auth-form-content select,
body.auth-screen .auth-form-content textarea {
    width: 100%;
    min-height: 46px;
    margin: 0;
    padding: 0 14px;
    border: 1px solid var(--auth-line) !important;
    border-radius: 12px !important;
    outline: 0;
    color: var(--auth-ink);
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.02);
    font: inherit;
    font-size: 13px;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

body.auth-screen .auth-form-content input:not([type="checkbox"]):focus,
body.auth-screen .auth-form-content select:focus,
body.auth-screen .auth-form-content textarea:focus {
    border-color: rgba(37, 99, 235, 0.76) !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

body.auth-screen .auth-form-content input:disabled {
    color: #7e899d;
    background: #f3f6fa;
}

body.auth-screen .auth-password-field {
    position: relative;
    display: block;
}

body.auth-screen .auth-password-field input {
    padding-right: 48px !important;
}

body.auth-screen .auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 7px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    color: #8995a9;
    background: transparent;
    cursor: pointer;
}

body.auth-screen .auth-password-toggle:hover,
body.auth-screen .auth-password-toggle:focus-visible {
    color: var(--auth-blue-strong);
    background: var(--auth-blue-soft);
}

body.auth-screen .auth-password-toggle svg {
    width: 18px;
    height: 18px;
}

body.auth-screen .auth-form-content .button,
body.auth-screen .auth-form-content button.button,
body.auth-screen .auth-form-content a.button {
    width: 100%;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 2px 0 0;
    padding: 0 18px;
    border: 1px solid var(--auth-blue) !important;
    border-radius: 12px !important;
    color: #ffffff;
    background: var(--auth-blue) !important;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18) !important;
    font-size: 13px;
    font-weight: 720;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

body.auth-screen .auth-form-content .button:hover,
body.auth-screen .auth-form-content button.button:hover,
body.auth-screen .auth-form-content a.button:hover {
    border-color: var(--auth-blue-strong) !important;
    color: #ffffff;
    background: var(--auth-blue-strong) !important;
}

body.auth-screen .auth-form-content .button.secondary,
body.auth-screen .auth-form-content a.button.secondary,
body.auth-screen .auth-form-content button.button.secondary {
    border-color: var(--auth-line) !important;
    color: #40506a;
    background: #ffffff !important;
    box-shadow: none !important;
}

body.auth-screen .auth-form-content .button.secondary:hover,
body.auth-screen .auth-form-content a.button.secondary:hover,
body.auth-screen .auth-form-content button.button.secondary:hover {
    border-color: rgba(37, 99, 235, 0.4) !important;
    color: var(--auth-blue-strong);
    background: #f8fbff !important;
}

body.auth-screen .auth-form-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: -2px;
}

body.auth-screen .auth-link,
body.auth-screen .auth-form-meta a {
    width: fit-content;
    margin: 0 auto;
    padding: 0;
    border: 0;
    border-radius: 0 !important;
    color: var(--auth-blue-strong);
    background: transparent;
    font-size: 12px;
    font-weight: 650;
    text-align: center;
    text-decoration: none;
}

body.auth-screen .auth-link:hover,
body.auth-screen .auth-form-meta a:hover {
    text-decoration: underline;
}

body.auth-screen .auth-form-meta .auth-link {
    margin: 0 0 0 auto;
}

body.auth-screen .auth-legal-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 14px;
    margin: 0;
    padding: 10px 0 0;
    color: #8b96a8;
    font-size: 10px;
    font-weight: 620;
}

body.auth-screen .auth-legal-links a {
    color: #8b96a8;
    text-decoration: none;
}

body.auth-screen .auth-legal-links a:hover {
    color: var(--auth-blue-strong);
}

body.auth-screen .error-box,
body.auth-screen .success-box {
    margin: 0;
    padding: 11px 13px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.45;
    text-align: left;
}

body.auth-screen .error-box {
    border: 1px solid #fecaca;
    color: #991b1b;
    background: #fff1f2;
}

body.auth-screen .success-box {
    border: 1px solid #bbf7d0;
    color: #166534;
    background: #f0fdf4;
}

body.auth-screen .auth-intro {
    position: relative;
    min-width: 0;
    min-height: 100%;
    display: grid;
    grid-template-rows: auto minmax(320px, 1fr) auto;
    gap: 16px;
    padding: 38px 42px 24px;
    overflow: hidden;
    border: 1px solid rgba(147, 197, 253, 0.44);
    border-radius: 20px !important;
    background: #e8f3ff;
    isolation: isolate;
}

body.auth-screen .auth-intro::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0.48;
    background-image:
        linear-gradient(rgba(37, 99, 235, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 99, 235, 0.07) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(to bottom, transparent 0%, #000 30%, #000 72%, transparent 100%);
}

body.auth-screen .auth-visual-heading {
    display: grid;
    justify-items: center;
    gap: 5px;
    text-align: center;
}

body.auth-screen .auth-visual-heading span {
    color: var(--auth-blue-strong);
    font-size: 11px;
    font-weight: 760;
    text-transform: uppercase;
}

body.auth-screen .auth-visual-heading h2 {
    max-width: 430px;
    margin: 0;
    color: var(--auth-ink);
    font-size: 24px;
    line-height: 1.25;
    font-weight: 680;
    letter-spacing: 0;
}

body.auth-screen .auth-orbit {
    position: relative;
    width: min(100%, 360px);
    aspect-ratio: 1;
    align-self: center;
    justify-self: center;
}

body.auth-screen .auth-orbit-ring,
body.auth-screen .auth-orbit-core,
body.auth-screen .auth-orbit-node {
    position: absolute;
    border-radius: 999px;
}

body.auth-screen .auth-orbit-ring {
    top: 50%;
    left: 50%;
    border: 1px solid rgba(37, 99, 235, 0.32);
    transform: translate(-50%, -50%);
}

body.auth-screen .auth-orbit-ring-one {
    width: 39.45%;
    height: 39.45%;
}

body.auth-screen .auth-orbit-ring-two {
    width: 66.12%;
    height: 66.12%;
}

body.auth-screen .auth-orbit-ring-three {
    width: 92.78%;
    height: 92.78%;
}

body.auth-screen .auth-orbit-core {
    top: 50%;
    left: 50%;
    width: 80px;
    height: 80px;
    display: grid;
    place-items: center;
    border: 8px solid rgba(255, 255, 255, 0.68);
    background: var(--auth-blue);
    box-shadow: 0 18px 38px rgba(37, 99, 235, 0.3);
    transform: translate(-50%, -50%);
}

body.auth-screen .auth-orbit-core img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

body.auth-screen .auth-orbit-node {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 5px solid rgba(255, 255, 255, 0.82);
    color: #ffffff;
    background: var(--auth-blue);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.2);
}

body.auth-screen .auth-orbit-node svg {
    width: 18px;
    height: 18px;
    stroke-width: 1.9;
}

body.auth-screen .auth-orbit-node-documents { top: 19.45%; left: 44.17%; }
body.auth-screen .auth-orbit-node-sales { top: 41.95%; right: 12.78%; background: #06a6da; }
body.auth-screen .auth-orbit-node-stock { bottom: 10.56%; right: 31.12%; background: #0f7a65; }
body.auth-screen .auth-orbit-node-finance { bottom: 20.28%; left: 11.95%; background: #7657d5; }
body.auth-screen .auth-orbit-node-team { top: 21.12%; left: 8.62%; background: #16a36a; }
body.auth-screen .auth-orbit-node-insights { top: 43.34%; left: 24.45%; background: #ef7a2f; }

body.auth-screen .auth-visual-footer {
    width: 100%;
    min-width: 0;
    display: grid;
    justify-items: center;
    gap: 14px;
    padding-inline: 18px;
    overflow: hidden;
    text-align: center;
}

body.auth-screen .auth-visual-footer p {
    width: 100%;
    max-width: 100%;
    margin: 0;
    color: #526079;
    font-size: 12px;
    line-height: 1.55;
    font-weight: 540;
    overflow-wrap: anywhere;
}

body.auth-screen .auth-visual-pages {
    display: flex;
    align-items: center;
    gap: 6px;
}

body.auth-screen .auth-visual-pages span {
    width: 20px;
    height: 3px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.18);
}

body.auth-screen .auth-visual-pages span:first-child {
    width: 28px;
    background: var(--auth-blue);
}

@media (max-width: 900px) {
    body.auth-screen {
        padding: 18px;
    }

    body.auth-screen .auth-card,
    body.auth-screen .auth-card.compact-auth {
        min-height: 0;
        grid-template-columns: 1fr;
        padding: 12px;
    }

    body.auth-screen .auth-form,
    body.auth-screen section.auth-form,
    body.auth-screen div.auth-form {
        min-height: 650px;
        padding: 24px 38px 20px;
    }

    body.auth-screen .auth-intro {
        min-height: 470px;
        grid-template-rows: auto minmax(260px, 1fr) auto;
    }

    body.auth-screen .auth-orbit {
        width: 320px;
        height: 320px;
        transform: scale(0.88);
    }
}

@media (max-width: 560px) {
    body.auth-screen {
        display: block;
        padding: 0;
        background: #ffffff;
    }

    body.auth-screen .auth-card,
    body.auth-screen .auth-card.compact-auth {
        width: 100%;
        min-height: 100vh;
        gap: 0;
        padding: 0;
        border: 0;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    body.auth-screen .auth-form,
    body.auth-screen section.auth-form,
    body.auth-screen div.auth-form {
        min-height: 100vh;
        padding: 22px 22px 18px;
        border-radius: 0 !important;
    }

    body.auth-screen .auth-brand img {
        width: 126px;
    }

    body.auth-screen .auth-form-content {
        width: 100%;
        padding: 26px 0;
    }

    body.auth-screen .auth-form-header h1,
    body.auth-screen .auth-form-header h2,
    body.auth-screen .auth-form-content > h1,
    body.auth-screen .auth-form-content > h2 {
        font-size: 24px;
    }

    body.auth-screen .auth-intro {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.auth-screen *,
    body.auth-screen *::before,
    body.auth-screen *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* Gendox neural data field */
body.auth-screen .auth-mode-switch,
body.auth-screen .auth-mode-switch a,
body.auth-screen .auth-form-content .button,
body.auth-screen .auth-form-content button.button,
body.auth-screen .auth-form-content a.button {
    border-radius: 999px !important;
}

body.auth-screen .auth-password-toggle {
    top: 50% !important;
    display: grid !important;
    place-items: center !important;
    padding: 0 !important;
    line-height: 0 !important;
    transform: translateY(-50%) !important;
}

body.auth-screen .auth-password-toggle svg {
    display: block !important;
    margin: 0 !important;
}

body.auth-screen .auth-intro {
    grid-template-rows: auto minmax(390px, 1fr) auto;
    overflow: hidden;
}

body.auth-screen .auth-visual-heading h2 {
    max-width: 520px;
    font-size: clamp(32px, 3.6vw, 50px);
}

body.auth-screen .auth-data-stage {
    --pointer-x: 50%;
    --pointer-y: 50%;
    position: relative;
    width: min(100%, 560px);
    min-height: 390px;
    justify-self: center;
    isolation: isolate;
    border-radius: 38% 62% 54% 46% / 46% 36% 64% 54%;
    background:
        radial-gradient(circle at var(--pointer-x) var(--pointer-y), rgba(82, 150, 255, .24), transparent 26%),
        radial-gradient(circle at 50% 50%, rgba(54, 115, 246, .2), transparent 52%);
    transition: background-position 180ms ease;
}

body.auth-screen .auth-data-canvas {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
}

body.auth-screen .auth-data-stage .auth-orbit-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    border: 1px solid rgba(137, 184, 255, .16);
    border-radius: 50%;
    transform: translate(-50%, -50%) rotate(-16deg);
    box-shadow: inset 0 0 38px rgba(75, 137, 255, .05);
}

body.auth-screen .auth-data-stage .auth-orbit-ring-one {
    width: 70%;
    aspect-ratio: 1.55;
}

body.auth-screen .auth-data-stage .auth-orbit-ring-two {
    width: 86%;
    aspect-ratio: 1.55;
    border-style: dashed;
    animation: auth-data-drift 28s linear infinite;
}

body.auth-screen .auth-data-stage .auth-orbit-ring-three {
    width: 48%;
    aspect-ratio: 1.1;
    transform: translate(-50%, -50%) rotate(58deg);
    animation: auth-data-drift-reverse 22s linear infinite;
}

body.auth-screen .auth-data-beam {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    width: 84%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(132, 185, 255, .7), transparent);
    filter: drop-shadow(0 0 7px #5598ff);
    transform: translate(-50%, -50%) rotate(-24deg);
    animation: auth-data-beam 7s ease-in-out infinite;
}

body.auth-screen .auth-data-core {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 4;
    display: grid;
    place-items: center;
    width: 118px;
    height: 118px;
    border: 1px solid rgba(196, 220, 255, .55);
    border-radius: 34px;
    background: linear-gradient(145deg, rgba(76, 139, 255, .95), rgba(25, 70, 189, .82));
    box-shadow: 0 25px 70px rgba(0, 8, 35, .58), inset 0 1px 0 rgba(255,255,255,.42), 0 0 70px rgba(67, 132, 255, .42);
    transform: translate(-50%, -50%) rotate(-7deg);
    backdrop-filter: blur(15px);
}

body.auth-screen .auth-data-core::before,
body.auth-screen .auth-data-core-ring {
    content: "";
    position: absolute;
    inset: -17px;
    border: 1px solid rgba(143, 188, 255, .24);
    border-radius: 42px;
    animation: auth-core-pulse 3s ease-out infinite;
}

body.auth-screen .auth-data-core-ring { inset: -34px; animation-delay: -1.5s; }
body.auth-screen .auth-data-core img { width: 62px; height: 62px; transform: rotate(7deg); }
body.auth-screen .auth-data-core small {
    position: absolute;
    right: -17px;
    bottom: 8px;
    color: rgba(215, 231, 255, .8);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .18em;
    transform: rotate(7deg);
}

body.auth-screen .auth-data-stage .auth-orbit-node {
    --node-x: 50%;
    --node-y: 50%;
    --node-scale: 1;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border: 1px solid rgba(190, 216, 255, .34);
    border-radius: 18px;
    color: #f4f5fc;
    background: linear-gradient(145deg, rgba(72, 131, 244, .76), rgba(20, 54, 136, .72));
    box-shadow: 0 18px 42px rgba(0, 8, 38, .42), inset 0 1px 0 rgba(255,255,255,.28), 0 0 24px rgba(74, 139, 255, .2);
    transform: translate(calc(var(--node-x) - 50%), calc(var(--node-y) - 50%)) scale(var(--node-scale));
    transition: border-color 180ms ease, box-shadow 180ms ease;
    animation: none;
    backdrop-filter: blur(15px) saturate(140%);
    will-change: transform;
}

body.auth-screen .auth-data-stage .auth-orbit-node svg { width: 25px; height: 25px; }
body.auth-screen .auth-data-stage .auth-orbit-node:nth-of-type(5),
body.auth-screen .auth-data-stage .auth-orbit-node:nth-of-type(8) { width: 68px; height: 68px; border-radius: 22px; }

body.auth-screen .auth-visual-footer { padding-bottom: 5px; }
body.auth-screen .auth-visual-footer p { max-width: 520px; }

@keyframes auth-data-drift {
    to { transform: translate(-50%, -50%) rotate(344deg); }
}
@keyframes auth-data-drift-reverse {
    to { transform: translate(-50%, -50%) rotate(-302deg); }
}
@keyframes auth-data-beam {
    0%, 100% { opacity: .22; transform: translate(-50%, -50%) rotate(-24deg) scaleX(.72); }
    50% { opacity: .9; transform: translate(-50%, -50%) rotate(-24deg) scaleX(1); }
}
@keyframes auth-core-pulse {
    0% { opacity: .75; transform: scale(.82); }
    100% { opacity: 0; transform: scale(1.32); }
}

@media (max-width: 900px) {
    body.auth-screen .auth-data-stage { width: min(100%, 620px); }
}

@media (prefers-reduced-motion: reduce) {
    body.auth-screen .auth-data-stage .auth-orbit-ring,
    body.auth-screen .auth-data-beam,
    body.auth-screen .auth-data-core::before,
    body.auth-screen .auth-data-core-ring { animation: none !important; }
}

/* Refined Gendox auth surface — translucent, dimensional, and intentionally calm. */
body.auth-screen {
    --auth-blue: #2764f5;
    --auth-blue-strong: #1d4ed8;
    --auth-blue-deep: #081a45;
    --auth-blue-soft: #f2f4fc;
    --auth-ink: #111c35;
    --auth-muted: #64728d;
    --auth-line: rgba(117, 143, 187, 0.22);
    position: relative;
    isolation: isolate;
    padding: clamp(18px, 3vw, 48px);
    background:
        radial-gradient(circle at 10% 8%, rgba(68, 142, 255, 0.28), transparent 29%),
        radial-gradient(circle at 92% 88%, rgba(121, 90, 255, 0.17), transparent 31%),
        linear-gradient(145deg, #eaf3ff 0%, #f7f9fd 46%, #f2f4fc 100%);
}

body.auth-screen::before,
body.auth-screen::after {
    content: "";
    position: fixed;
    z-index: -1;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(8px);
}

body.auth-screen::before {
    top: -18vw;
    right: -10vw;
    width: 46vw;
    height: 46vw;
    border: 1px solid rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 80px rgba(58, 127, 255, 0.12);
}

body.auth-screen::after {
    bottom: -20vw;
    left: -12vw;
    width: 42vw;
    height: 42vw;
    background: rgba(81, 134, 255, 0.1);
}

body.auth-screen .auth-card,
body.auth-screen .auth-card.compact-auth {
    width: min(1240px, 100%);
    max-width: 1240px;
    min-height: min(760px, calc(100vh - clamp(36px, 6vw, 96px)));
    grid-template-columns: minmax(430px, 0.92fr) minmax(480px, 1.08fr);
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 34px !important;
    background: rgba(255, 255, 255, 0.48);
    box-shadow:
        0 40px 110px rgba(27, 61, 121, 0.18),
        0 8px 30px rgba(50, 91, 153, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(30px) saturate(145%);
    -webkit-backdrop-filter: blur(30px) saturate(145%);
}

body.auth-screen .auth-form,
body.auth-screen section.auth-form,
body.auth-screen div.auth-form {
    padding: clamp(28px, 4vw, 56px) clamp(30px, 5vw, 68px) 28px;
    border: 1px solid rgba(255, 255, 255, 0.72) !important;
    border-radius: 25px !important;
    background: rgba(255, 255, 255, 0.72) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

body.auth-screen .auth-brand {
    position: relative;
    z-index: 2;
}

body.auth-screen .auth-brand img {
    width: 142px;
}

body.auth-screen .auth-form-content {
    width: min(100%, 410px);
    gap: 15px;
    padding-block: 34px;
}

body.auth-screen .auth-form-icon {
    width: 46px;
    height: 46px;
    margin-bottom: 3px;
    border: 1px solid rgba(255, 255, 255, 0.52);
    border-radius: 14px;
    background: linear-gradient(145deg, #4b86ff, #1f57e2);
    box-shadow: 0 14px 32px rgba(38, 98, 238, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

body.auth-screen .auth-form-header {
    gap: 8px;
}

body.auth-screen .auth-form-header h1,
body.auth-screen .auth-form-header h2,
body.auth-screen .auth-form-content > h1,
body.auth-screen .auth-form-content > h2 {
    font-size: clamp(27px, 2.25vw, 34px);
    line-height: 1.1;
    font-weight: 710;
    letter-spacing: -0.035em;
}

body.auth-screen .auth-form-header p,
body.auth-screen .auth-form-copy {
    max-width: 360px;
    margin-inline: auto;
    font-size: 13px;
    line-height: 1.65;
}

body.auth-screen .auth-mode-switch {
    gap: 5px;
    margin-top: 10px;
    padding: 5px;
    border-color: rgba(108, 135, 180, 0.18);
    border-radius: 15px;
    background: rgba(226, 235, 249, 0.62);
    box-shadow: inset 0 1px 2px rgba(46, 73, 114, 0.05);
}

body.auth-screen .auth-mode-switch a {
    min-height: 38px;
    border-radius: 11px;
    transition: color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

body.auth-screen .auth-mode-switch a[aria-current="page"] {
    background: rgba(255, 255, 255, 0.92);
    color: var(--auth-blue-strong);
    box-shadow: 0 7px 18px rgba(53, 84, 137, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

body.auth-screen .auth-form-content label:not(.auth-check) {
    gap: 8px;
    color: #485873;
    font-size: 11.5px;
    font-weight: 720;
}

body.auth-screen .auth-form-content input:not([type="checkbox"]),
body.auth-screen .auth-form-content select,
body.auth-screen .auth-form-content textarea {
    min-height: 50px;
    padding-inline: 16px;
    border-color: rgba(104, 131, 174, 0.22) !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 5px 16px rgba(51, 78, 119, 0.04);
    transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease, transform 180ms ease;
}

body.auth-screen .auth-form-content input:not([type="checkbox"]):hover,
body.auth-screen .auth-form-content select:hover,
body.auth-screen .auth-form-content textarea:hover {
    border-color: rgba(71, 113, 190, 0.36) !important;
    background: rgba(255, 255, 255, 0.9);
}

body.auth-screen .auth-form-content input:not([type="checkbox"]):focus,
body.auth-screen .auth-form-content select:focus,
body.auth-screen .auth-form-content textarea:focus {
    border-color: rgba(39, 100, 245, 0.58) !important;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(39, 100, 245, 0.1), 0 12px 24px rgba(38, 76, 145, 0.07);
}

body.auth-screen .auth-form-content .button,
body.auth-screen .auth-form-content button.button,
body.auth-screen .auth-form-content a.button {
    min-height: 50px;
    border: 0 !important;
    border-radius: 14px !important;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 58%, #1d4ed8 100%) !important;
    box-shadow: 0 15px 32px rgba(31, 86, 220, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
    transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

body.auth-screen .auth-form-content .button:hover,
body.auth-screen .auth-form-content button.button:hover,
body.auth-screen .auth-form-content a.button:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 58%, #1d4ed8 100%) !important;
    box-shadow: 0 19px 38px rgba(31, 86, 220, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
    filter: saturate(1.08);
}

body.auth-screen .auth-form-content .button:active,
body.auth-screen .auth-form-content button.button:active {
    transform: translateY(0);
}

body.auth-screen .auth-password-toggle {
    right: 8px;
    border-radius: 10px;
}

body.auth-screen .auth-legal-links {
    opacity: 0.78;
}

body.auth-screen .auth-intro {
    min-height: 100%;
    grid-template-rows: auto minmax(350px, 1fr) auto;
    gap: 18px;
    padding: clamp(36px, 4vw, 54px) clamp(32px, 4vw, 54px) 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px !important;
    color: #fff;
    background:
        radial-gradient(circle at 80% 12%, rgba(86, 147, 255, 0.45), transparent 31%),
        radial-gradient(circle at 18% 82%, rgba(90, 63, 214, 0.28), transparent 36%),
        linear-gradient(145deg, #102f78 0%, #0b2259 46%, #071735 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 -50px 100px rgba(1, 10, 35, 0.2);
}

body.auth-screen .auth-intro::before {
    inset: -1px;
    opacity: 0.82;
    background-image:
        linear-gradient(rgba(152, 192, 255, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(152, 192, 255, 0.07) 1px, transparent 1px),
        radial-gradient(circle at 50% 48%, rgba(65, 126, 255, 0.22), transparent 38%);
    background-size: 34px 34px, 34px 34px, 100% 100%;
    mask-image: linear-gradient(to bottom, #000 0%, #000 76%, transparent 100%);
}

body.auth-screen .auth-intro::after {
    content: "";
    position: absolute;
    inset: auto -20% -32% 8%;
    z-index: -1;
    height: 58%;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.26);
    filter: blur(55px);
}

body.auth-screen .auth-visual-heading {
    justify-items: start;
    gap: 10px;
    text-align: left;
}

body.auth-screen .auth-visual-heading span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 11px;
    border: 1px solid rgba(170, 204, 255, 0.18);
    border-radius: 999px;
    color: #c8dcff;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(10px);
}

body.auth-screen .auth-visual-heading span::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #72a3ff;
    box-shadow: 0 0 0 4px rgba(114, 163, 255, 0.13), 0 0 18px #72a3ff;
}

body.auth-screen .auth-visual-heading h2 {
    max-width: 470px;
    color: #fff;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.06;
    font-weight: 650;
    letter-spacing: -0.045em;
}

body.auth-screen .auth-orbit {
    width: min(100%, 400px);
    filter: drop-shadow(0 30px 44px rgba(0, 8, 30, 0.3));
}

body.auth-screen .auth-orbit::before,
body.auth-screen .auth-orbit::after {
    content: "";
    position: absolute;
    inset: 15%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(78, 140, 255, 0.23), transparent 68%);
    animation: auth-pulse 5.5s ease-in-out infinite;
}

body.auth-screen .auth-orbit::after {
    inset: 27%;
    background: rgba(106, 155, 255, 0.14);
    filter: blur(22px);
    animation-delay: -2.75s;
}

body.auth-screen .auth-orbit-ring {
    border-color: rgba(159, 195, 255, 0.24);
    box-shadow: inset 0 0 26px rgba(105, 157, 255, 0.04);
}

body.auth-screen .auth-orbit-ring-two {
    border-style: dashed;
    animation: auth-spin 34s linear infinite;
}

body.auth-screen .auth-orbit-ring-three {
    animation: auth-spin-reverse 52s linear infinite;
}

body.auth-screen .auth-orbit-core {
    width: 94px;
    height: 94px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: linear-gradient(145deg, rgba(82, 143, 255, 0.98), rgba(27, 76, 198, 0.95));
    box-shadow: 0 24px 55px rgba(0, 10, 42, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.38), 0 0 0 10px rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
}

body.auth-screen .auth-orbit-core img {
    width: 58px;
    height: 58px;
}

body.auth-screen .auth-orbit-node {
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    background: rgba(42, 105, 239, 0.68);
    box-shadow: 0 15px 35px rgba(0, 10, 40, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 0 0 6px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px) saturate(135%);
    animation: auth-float 5.4s ease-in-out infinite;
}

body.auth-screen .auth-orbit-node-sales { background: rgba(8, 166, 218, 0.66); animation-delay: -0.8s; }
body.auth-screen .auth-orbit-node-stock { background: rgba(15, 122, 101, 0.7); animation-delay: -1.6s; }
body.auth-screen .auth-orbit-node-finance { background: rgba(118, 87, 213, 0.72); animation-delay: -2.4s; }
body.auth-screen .auth-orbit-node-team { background: rgba(22, 163, 106, 0.7); animation-delay: -3.2s; }
body.auth-screen .auth-orbit-node-insights { background: rgba(239, 122, 47, 0.72); animation-delay: -4s; }

body.auth-screen .auth-visual-footer {
    justify-items: start;
    padding-inline: 0;
    text-align: left;
}

body.auth-screen .auth-visual-footer p {
    max-width: 470px;
    color: rgba(225, 235, 255, 0.74);
    font-size: 12.5px;
    line-height: 1.65;
}

body.auth-screen .auth-visual-pages span {
    background: rgba(174, 204, 255, 0.2);
}

body.auth-screen .auth-visual-pages span:first-child {
    width: 36px;
    background: #77a7ff;
    box-shadow: 0 0 16px rgba(119, 167, 255, 0.55);
}

@keyframes auth-spin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes auth-spin-reverse {
    from { transform: translate(-50%, -50%) rotate(360deg); }
    to { transform: translate(-50%, -50%) rotate(0deg); }
}

@keyframes auth-float {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -7px; }
}

@keyframes auth-pulse {
    0%, 100% { opacity: 0.55; transform: scale(0.94); }
    50% { opacity: 1; transform: scale(1.08); }
}

@media (max-width: 900px) {
    body.auth-screen .auth-card,
    body.auth-screen .auth-card.compact-auth {
        grid-template-columns: minmax(0, 1fr);
    }

    body.auth-screen .auth-intro {
        min-height: 520px;
    }

    body.auth-screen .auth-visual-heading,
    body.auth-screen .auth-visual-footer {
        justify-items: center;
        text-align: center;
    }
}

@media (max-width: 560px) {
    body.auth-screen {
        width: 100%;
        max-width: 100vw;
        padding: 0;
        overflow-x: hidden;
        background:
            radial-gradient(circle at 50% 0%, rgba(72, 137, 255, 0.18), transparent 34%),
            #f4f8ff;
    }

    body.auth-screen .auth-card,
    body.auth-screen .auth-card.compact-auth {
        width: 100%;
        max-width: 100vw;
        min-width: 0;
        padding: 0;
        overflow: hidden;
        background: transparent;
    }

    body.auth-screen .auth-form,
    body.auth-screen section.auth-form,
    body.auth-screen div.auth-form {
        width: 100%;
        max-width: 100vw;
        min-width: 0;
        padding: 24px 22px 18px;
        overflow: hidden;
        background: rgba(255, 255, 255, 0.72) !important;
    }

    body.auth-screen .auth-form-content {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        padding-block: 34px;
    }

    body.auth-screen .auth-mode-switch,
    body.auth-screen .auth-form-content label,
    body.auth-screen .auth-nested-form,
    body.auth-screen .auth-legal-links {
        min-width: 0;
        max-width: 100%;
    }

    body.auth-screen .auth-form-header,
    body.auth-screen .auth-form-header h1,
    body.auth-screen .auth-form-header p,
    body.auth-screen .auth-link {
        min-width: 0;
        max-width: 100%;
        overflow-wrap: anywhere;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.auth-screen .auth-orbit-ring,
    body.auth-screen .auth-orbit-node,
    body.auth-screen .auth-orbit::before,
    body.auth-screen .auth-orbit::after {
        animation: none !important;
    }
}

/* Final auth motion: Magic UI Flickering Grid. */
body.auth-screen .auth-form-content .button,
body.auth-screen .auth-form-content button.button,
body.auth-screen .auth-form-content a.button,
body.auth-screen .auth-mode-switch,
body.auth-screen .auth-mode-switch a {
    border-radius: 999px !important;
}

body.auth-screen .auth-data-stage[data-magic-flicker-stage] {
    position: relative;
    width: 100%;
    min-height: 390px;
    overflow: hidden;
    border-radius: 24px;
    background: radial-gradient(circle at 50% 50%, rgba(60, 124, 247, .2), transparent 57%);
    mask-image: radial-gradient(ellipse 82% 72% at center, #000 42%, transparent 100%);
}

body.auth-screen .auth-data-stage[data-magic-flicker-stage] .auth-data-canvas {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
}

body.auth-screen .auth-data-stage[data-magic-flicker-stage] :is(
    .auth-orbit-ring,
    .auth-data-beam,
    .auth-orbit-node,
    .auth-data-core
) {
    display: none !important;
}

@media (max-width: 560px) {
    body.auth-screen {
        min-height: 100dvh;
        padding: 12px !important;
        background:
            radial-gradient(circle at 15% 8%, rgba(54, 117, 245, .2), transparent 32%),
            linear-gradient(155deg, #e9f2ff 0%, #f7faff 52%, #f2f4fc 100%) !important;
    }

    body.auth-screen .auth-card,
    body.auth-screen .auth-card.compact-auth {
        position: relative;
        min-height: calc(100dvh - 24px) !important;
        overflow: hidden !important;
        border: 1px solid rgba(255,255,255,.78) !important;
        border-radius: 26px !important;
        background: rgba(255,255,255,.36) !important;
        box-shadow: 0 24px 60px rgba(34, 68, 124, .14) !important;
    }

    body.auth-screen .auth-intro {
        position: absolute !important;
        inset: 0 !important;
        z-index: 0 !important;
        min-height: 100% !important;
        display: block !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 26px !important;
        background: transparent !important;
        box-shadow: none !important;
        pointer-events: none;
    }

    body.auth-screen .auth-intro :is(.auth-visual-heading, .auth-visual-footer) { display: none !important; }
    body.auth-screen .auth-data-stage[data-magic-flicker-stage] {
        position: absolute;
        inset: 0;
        width: 100%;
        min-height: 100%;
        border-radius: 26px;
        opacity: .92;
        mask-image: linear-gradient(to bottom, #000, rgba(0,0,0,.42) 58%, transparent 94%);
    }

    body.auth-screen .auth-form,
    body.auth-screen section.auth-form,
    body.auth-screen div.auth-form {
        position: relative;
        z-index: 1;
        min-height: calc(100dvh - 24px) !important;
        padding: 24px 18px 18px !important;
        border: 1px solid rgba(255,255,255,.62) !important;
        border-radius: 25px !important;
        background: rgba(255,255,255,.7) !important;
        box-shadow: inset 0 1px 0 rgba(255,255,255,.92) !important;
        backdrop-filter: blur(12px) saturate(128%);
        -webkit-backdrop-filter: blur(12px) saturate(128%);
    }

    body.auth-screen .auth-form-content { padding-block: clamp(26px, 7vh, 54px) !important; }
}
