:root {
    --gx-login-purple: #514678;
    --gx-login-purple-dark: #352b59;
    --gx-login-purple-soft: #f1edfb;
    --gx-login-border: #e1e6ee;
    --gx-login-text: #33445a;
    --gx-login-muted: #7d8da1;
    --gx-login-bg: #f5f7fa;
    --gx-login-success: #2f8a55;
    --gx-login-danger: #b94949;
    --gx-login-warning: #9a6b13;
}

* {
    box-sizing: border-box;
}

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

body {
    min-height: 100vh;
    background: var(--gx-login-bg);
    color: var(--gx-login-text);
    font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

[hidden] {
    display: none !important;
}

.gx-login-page {
    overflow-x: hidden;
}

.gx-login-shell {
    position: relative;
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 32px 20px;
    overflow: hidden;
    background-color: #171226;
    background-image:
        linear-gradient(135deg, rgba(20, 15, 38, .72), rgba(31, 24, 53, .58)),
        var(--gx-login-background);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
}

.gx-login-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 50% 42%, rgba(255, 255, 255, .035), transparent 40%);
}

.gx-login-shell::after {
    content: none;
}

.gx-login-stage {
    position: relative;
    z-index: 1;
    display: flex;
    width: min(480px, 100%);
    flex-direction: column;
    align-items: center;
    gap: 22px;
}

.gx-login-brand {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.gx-login-logo {
    display: block;
    width: min(390px, 92%);
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 12px 28px rgba(5, 3, 14, .28));
}

.gx-login-card {
    position: relative;
    width: min(430px, 100%);
    padding: 34px 36px 24px;
    border: 1px solid rgba(216, 222, 232, .94);
    border-radius: 24px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 24px 70px rgba(42, 52, 68, .14);
    backdrop-filter: blur(18px);
}

.gx-login-environment {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 29px;
    padding: 0 11px;
    border: 1px solid #dcd4ee;
    border-radius: 999px;
    background: var(--gx-login-purple-soft);
    color: #65548e;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .01em;
}

.gx-login-environment svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
}

.gx-login-copy {
    margin-bottom: 21px;
    text-align: center;
}

.gx-login-eyebrow {
    display: block;
    margin-bottom: 6px;
    color: #77689a;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.gx-login-copy h1 {
    margin: 0;
    color: #2f4056;
    font-size: 25px;
    font-weight: 700;
    letter-spacing: -.025em;
}

.gx-login-copy p {
    margin: 7px 0 0;
    color: var(--gx-login-muted);
    font-size: 12px;
    line-height: 1.55;
}

.gx-login-form {
    display: grid;
    gap: 14px;
}

.gx-login-field {
    display: grid;
    gap: 7px;
    color: #4a5b70;
    font-size: 11px;
    font-weight: 650;
}

.gx-login-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.gx-login-input-wrap > svg {
    position: absolute;
    z-index: 1;
    left: 14px;
    width: 17px;
    height: 17px;
    fill: none;
    stroke: #8377a3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
    pointer-events: none;
}

.gx-login-input {
    width: 100%;
    height: 48px;
    padding: 0 14px 0 43px;
    border: 1px solid #d9e0e9;
    border-radius: 11px;
    outline: 0;
    background: #fff;
    color: #34465c;
    font-size: 13px;
    font-weight: 500;
    transition: border-color .14s ease, box-shadow .14s ease, background .14s ease;
}

.gx-login-input::placeholder {
    color: #a2adba;
    font-weight: 400;
}

.gx-login-input:hover {
    border-color: #c5ccda;
}

.gx-login-input:focus {
    border-color: #8c7eb1;
    box-shadow: 0 0 0 3px rgba(81, 70, 120, .08);
}

.gx-login-links {
    display: flex;
    justify-content: flex-end;
    margin-top: -1px;
}

.gx-login-links a,
.gx-login-inline-link {
    color: #66558f;
    font-size: 11px;
    font-weight: 650;
    text-decoration: none;
}

.gx-login-links a:hover,
.gx-login-inline-link:hover {
    text-decoration: underline;
}

.gx-login-submit {
    display: flex;
    width: 100%;
    height: 48px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 3px;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--gx-login-purple-dark), var(--gx-login-purple));
    color: #fff;
    box-shadow: 0 10px 24px rgba(61, 50, 96, .18);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .14s ease, box-shadow .14s ease, filter .14s ease;
}

.gx-login-submit svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
}

.gx-login-submit:hover {
    filter: brightness(1.04);
    box-shadow: 0 13px 28px rgba(61, 50, 96, .23);
    transform: translateY(-1px);
}

.gx-login-submit:active {
    transform: translateY(0);
}

.gx-login-alert {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: start;
    gap: 9px;
    padding: 11px 12px;
    border: 1px solid;
    border-radius: 10px;
    font-size: 10.5px;
    font-weight: 500;
    line-height: 1.5;
}

.gx-login-alert svg {
    width: 16px;
    height: 16px;
    margin-top: 1px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.gx-login-alert-warning {
    border-color: #ead7a9;
    background: #fff9ed;
    color: var(--gx-login-warning);
}

.gx-login-alert-danger {
    border-color: #eccaca;
    background: #fff4f4;
    color: var(--gx-login-danger);
}

.gx-login-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 25px;
    padding-top: 18px;
    border-top: 1px solid #edf0f4;
    color: #9aa5b3;
    font-size: 9.5px;
    font-weight: 500;
}

.gx-login-footer i {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #b7c0ca;
}

.gx-auth-state {
    display: grid;
    justify-items: center;
    gap: 15px;
    padding: 5px 0 3px;
    text-align: center;
}

.gx-auth-state-icon {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 15px;
    background: var(--gx-login-purple-soft);
    color: #6b5a91;
}

.gx-auth-state-icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.gx-auth-state h1 {
    margin: 0;
    color: #304158;
    font-size: 21px;
    font-weight: 700;
}

.gx-auth-state p {
    margin: 0;
    color: var(--gx-login-muted);
    font-size: 12px;
    line-height: 1.6;
}

.gx-session-modal {
    position: fixed;
    z-index: 20000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
}

.gx-session-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(29, 34, 48, .58);
    backdrop-filter: blur(3px);
}

.gx-session-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(500px, 100%);
    overflow: hidden;
    border: 1px solid #dfe4ec;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 28px 90px rgba(25, 30, 43, .28);
}

.gx-session-modal-head {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 21px 22px 15px;
}

.gx-session-modal-icon {
    display: grid;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 13px;
    background: #fff3e1;
    color: #b87812;
}

.gx-session-modal-icon svg,
.gx-session-modal-current svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.gx-session-modal-kicker {
    display: block;
    margin-bottom: 3px;
    color: #8f99a7;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.gx-session-modal-head h2 {
    margin: 0;
    color: #304158;
    font-size: 19px;
    font-weight: 700;
}

.gx-session-modal-body {
    padding: 0 22px 20px;
    color: #68788a;
    font-size: 12px;
    line-height: 1.6;
}

.gx-session-modal-body p {
    margin: 0;
}

.gx-session-modal-current {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 14px;
    padding: 11px 12px;
    border-radius: 10px;
    background: #f5f7fa;
    color: #4c5f74;
    font-size: 11px;
}

.gx-session-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    padding: 14px 22px 20px;
    border-top: 1px solid #edf0f4;
}

.gx-session-modal-btn {
    min-height: 40px;
    padding: 0 15px;
    border: 1px solid transparent;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.gx-session-modal-btn-secondary {
    border-color: #dfe4eb;
    background: #fff;
    color: #66778a;
}

.gx-session-modal-btn-primary {
    background: var(--gx-login-purple);
    color: #fff;
}

@media (max-width: 640px) {
    .gx-login-shell {
        align-items: center;
        padding: max(18px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom));
    }

    .gx-login-stage {
        gap: 16px;
    }

    .gx-login-logo {
        width: min(300px, 88%);
    }

    .gx-login-card {
        padding: 28px 21px 21px;
        border-radius: 20px;
    }

    .gx-login-copy h1 {
        font-size: 23px;
    }

    .gx-login-input,
    .gx-login-submit {
        height: 50px;
    }

    .gx-login-input {
        font-size: 16px;
    }

    .gx-login-footer {
        flex-wrap: wrap;
        text-align: center;
    }

    .gx-session-modal {
        align-items: end;
        padding: 12px;
    }

    .gx-session-modal-dialog {
        max-height: calc(100vh - 24px);
        border-radius: 18px;
    }

    .gx-session-modal-actions {
        flex-direction: column-reverse;
    }

    .gx-session-modal-btn {
        width: 100%;
    }
}

@media (max-height: 660px) and (min-width: 641px) {
    .gx-login-shell {
        align-items: start;
        padding-top: 24px;
        padding-bottom: 24px;
    }
}
