:root,
[data-theme="light"] {
    --gx-auth-primary: #39CAFF;
    --gx-auth-primary-dark: #1db8f5;
    --gx-auth-primary-deep: #0891b2;
    --gx-auth-primary-soft: rgba(57, 202, 255, 0.16);
    --gx-auth-primary-glow: rgba(57, 202, 255, 0.38);
    --gx-auth-ink: #0b1220;
    --gx-auth-text: #152033;
    --gx-auth-muted: #64748b;
    --gx-auth-border: #d7e0ea;
    --gx-auth-surface: #ffffff;
    --gx-auth-surface-soft: #f7fafc;
    --gx-auth-label: #334155;
    --gx-auth-icon: #94a3b8;
    --gx-auth-input-bg: #ffffff;
    --gx-auth-page-bg:
        radial-gradient(1200px 600px at 8% -10%, rgba(57, 202, 255, 0.22), transparent 55%),
        radial-gradient(900px 500px at 100% 0%, rgba(8, 145, 178, 0.14), transparent 50%),
        linear-gradient(160deg, #e8f1f7 0%, #f4f7fb 42%, #eef3f8 100%);
    --gx-auth-panel-bg: linear-gradient(180deg, #ffffff 0%, var(--gx-auth-surface-soft) 100%);
    --gx-auth-shell-border: rgba(255, 255, 255, 0.7);
    --gx-auth-brand-deep: #062033;
    --gx-auth-brand-mid: #0b3a52;
    --gx-auth-radius: 22px;
    --gx-auth-radius-sm: 12px;
    --gx-auth-shadow: 0 28px 80px rgba(6, 32, 51, 0.18);
    --gx-auth-font: "Manrope", system-ui, sans-serif;
    --gx-auth-display: "Sora", "Manrope", system-ui, sans-serif;
    --gx-auth-toggle-bg: rgba(255, 255, 255, 0.92);
    --gx-auth-toggle-border: rgba(15, 23, 42, 0.08);
    --gx-auth-toggle-color: #0f172a;
    --gx-auth-alert-success-bg: #ecfdf5;
    --gx-auth-alert-success-border: #a7f3d0;
    --gx-auth-alert-success-text: #047857;
    --gx-auth-alert-info-bg: #eff6ff;
    --gx-auth-alert-info-border: #bfdbfe;
    --gx-auth-alert-info-text: #1d4ed8;
}

[data-theme="dark"] {
    --gx-auth-primary: #39CAFF;
    --gx-auth-primary-dark: #1db8f5;
    --gx-auth-primary-deep: #67e8f9;
    --gx-auth-primary-soft: rgba(57, 202, 255, 0.18);
    --gx-auth-primary-glow: rgba(57, 202, 255, 0.28);
    --gx-auth-ink: #f1f5f9;
    --gx-auth-text: #e2e8f0;
    --gx-auth-muted: #94a3b8;
    --gx-auth-border: #334155;
    --gx-auth-surface: #0f172a;
    --gx-auth-surface-soft: #111827;
    --gx-auth-label: #cbd5e1;
    --gx-auth-icon: #64748b;
    --gx-auth-input-bg: #1e293b;
    --gx-auth-page-bg:
        radial-gradient(1200px 600px at 8% -10%, rgba(57, 202, 255, 0.12), transparent 55%),
        radial-gradient(900px 500px at 100% 0%, rgba(8, 145, 178, 0.1), transparent 50%),
        linear-gradient(160deg, #020617 0%, #0b1220 42%, #0f172a 100%);
    --gx-auth-panel-bg: linear-gradient(180deg, #0f172a 0%, #111827 100%);
    --gx-auth-shell-border: rgba(148, 163, 184, 0.12);
    --gx-auth-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
    --gx-auth-toggle-bg: rgba(30, 41, 59, 0.92);
    --gx-auth-toggle-border: rgba(148, 163, 184, 0.18);
    --gx-auth-toggle-color: #e2e8f0;
    --gx-auth-alert-success-bg: rgba(6, 78, 59, 0.35);
    --gx-auth-alert-success-border: rgba(52, 211, 153, 0.35);
    --gx-auth-alert-success-text: #6ee7b7;
    --gx-auth-alert-info-bg: rgba(30, 58, 138, 0.35);
    --gx-auth-alert-info-border: rgba(96, 165, 250, 0.35);
    --gx-auth-alert-info-text: #93c5fd;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

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

body {
    font-family: var(--gx-auth-font);
    color: var(--gx-auth-text);
    background: var(--gx-auth-page-bg);
    -webkit-font-smoothing: antialiased;
    transition: background 0.25s ease, color 0.25s ease;
}

.gx-auth-theme-toggle {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 20;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--gx-auth-toggle-border);
    background: var(--gx-auth-toggle-bg);
    color: var(--gx-auth-toggle-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(6, 32, 51, 0.12);
    backdrop-filter: blur(8px);
    transition: transform 0.18s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.gx-auth-theme-toggle:hover,
.gx-auth-theme-toggle:focus {
    transform: translateY(-1px);
    outline: none;
    box-shadow: 0 14px 28px rgba(6, 32, 51, 0.18);
}

.gx-auth-theme-toggle .fa-sun-o {
    display: none;
}

.gx-auth-theme-toggle .fa-moon-o {
    display: inline;
}

[data-theme="dark"] .gx-auth-theme-toggle .fa-sun-o {
    display: inline;
}

[data-theme="dark"] .gx-auth-theme-toggle .fa-moon-o {
    display: none;
}

.gx-auth-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 18px;
    overflow: hidden;
}

.gx-auth-ambient {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.gx-auth-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.55;
    animation: gx-auth-float 12s ease-in-out infinite;
}

.gx-auth-orb-a {
    width: 280px;
    height: 280px;
    top: -80px;
    left: -60px;
    background: rgba(57, 202, 255, 0.35);
}

.gx-auth-orb-b {
    width: 220px;
    height: 220px;
    right: -40px;
    bottom: 12%;
    background: rgba(8, 145, 178, 0.22);
    animation-delay: -4s;
}

.gx-auth-orb-c {
    width: 160px;
    height: 160px;
    left: 42%;
    bottom: -50px;
    background: rgba(14, 165, 233, 0.18);
    animation-delay: -7s;
}

[data-theme="dark"] .gx-auth-orb {
    opacity: 0.35;
}

.gx-auth-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1040px;
    min-height: 640px;
    display: grid;
    grid-template-columns: minmax(280px, 1.08fr) minmax(300px, 0.92fr);
    background: var(--gx-auth-surface);
    border-radius: var(--gx-auth-radius);
    overflow: hidden;
    box-shadow: var(--gx-auth-shadow);
    border: 1px solid var(--gx-auth-shell-border);
    animation: gx-auth-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.gx-auth-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 44px 40px 32px;
    color: #fff;
    background:
        linear-gradient(160deg, #07324a 0%, #0a4f6e 38%, #0e7ea8 72%, #39caff 100%);
    overflow: hidden;
}

.gx-auth-brand-mesh {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: radial-gradient(circle at 30% 20%, #000 20%, transparent 75%);
    opacity: 0.7;
}

.gx-auth-brand::after {
    content: "";
    position: absolute;
    width: 320px;
    height: 320px;
    right: -90px;
    bottom: -110px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(57, 202, 255, 0.45) 0%, transparent 70%);
    animation: gx-auth-pulse 8s ease-in-out infinite;
}

.gx-auth-brand-inner {
    position: relative;
    z-index: 1;
    animation: gx-auth-fade-left 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

.gx-auth-brand-logo-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    padding: 18px 22px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 16px 40px rgba(6, 32, 51, 0.22);
}

.gx-auth-brand-logo {
    display: block;
    width: min(220px, 72vw);
    height: auto;
}

.gx-auth-brand-tagline {
    margin: 0 0 28px;
    max-width: 320px;
    font-family: var(--gx-auth-display);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.02em;
    color: rgba(255, 255, 255, 0.96);
}

.gx-auth-brand-points {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 12px;
}

.gx-auth-brand-points li {
    position: relative;
    padding-left: 28px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.82);
}

.gx-auth-brand-points li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(57, 202, 255, 0.2);
    box-shadow: inset 0 0 0 1px rgba(57, 202, 255, 0.55);
}

.gx-auth-brand-points li::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gx-auth-primary);
}

.gx-auth-brand-foot {
    position: relative;
    z-index: 1;
    margin: 36px 0 0;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.55);
}

.gx-auth-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 44px 36px;
    background: var(--gx-auth-panel-bg);
    animation: gx-auth-fade-right 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.gx-auth-panel-head {
    margin-bottom: 28px;
}

.gx-auth-form-title {
    margin: 0 0 8px;
    font-family: var(--gx-auth-display);
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--gx-auth-ink);
    line-height: 1.15;
}

.gx-auth-form-sub {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--gx-auth-muted);
    font-weight: 500;
}

.gx-auth-panel-body {
    width: 100%;
}

.gx-auth-form {
    width: 100%;
}

.gx-auth-field {
    margin-bottom: 18px;
}

.gx-auth-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--gx-auth-label);
    margin-bottom: 8px;
    letter-spacing: 0.01em;
}

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

.gx-auth-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gx-auth-icon);
    font-size: 15px;
    pointer-events: none;
    z-index: 1;
}

.gx-auth-input {
    width: 100%;
    min-height: 50px;
    background: var(--gx-auth-input-bg);
    border: 1px solid var(--gx-auth-border);
    border-radius: var(--gx-auth-radius-sm);
    padding: 12px 14px 12px 42px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    color: var(--gx-auth-text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.gx-auth-input::placeholder {
    color: var(--gx-auth-icon);
    font-weight: 500;
}

.gx-auth-input:hover:not(:focus):not(.is-invalid) {
    border-color: #b6c4d4;
}

[data-theme="dark"] .gx-auth-input:hover:not(:focus):not(.is-invalid) {
    border-color: #475569;
}

.gx-auth-input:focus {
    outline: none;
    border-color: var(--gx-auth-primary);
    box-shadow: 0 0 0 4px var(--gx-auth-primary-soft);
    background: var(--gx-auth-input-bg);
}

.gx-auth-input.is-invalid {
    border-color: #ef4444;
}

.gx-auth-input.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.gx-auth-password-wrap {
    position: relative;
}

.gx-auth-input-password {
    padding-right: 46px;
}

.gx-auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--gx-auth-icon);
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.gx-auth-password-toggle:hover,
.gx-auth-password-toggle:focus {
    color: var(--gx-auth-primary-deep);
    background: rgba(57, 202, 255, 0.1);
    outline: none;
}

.gx-auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 24px;
    flex-wrap: wrap;
}

.gx-auth-remember {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--gx-auth-text);
    user-select: none;
}

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

.gx-auth-link {
    color: var(--gx-auth-muted);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s ease;
}

.gx-auth-link:hover {
    color: var(--gx-auth-primary-deep);
}

.gx-auth-link-strong {
    color: var(--gx-auth-primary-deep);
    font-weight: 700;
}

.gx-auth-btn {
    width: 100%;
    min-height: 52px;
    border: 0;
    border-radius: var(--gx-auth-radius-sm);
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 0.01em;
    color: #062033;
    background: linear-gradient(135deg, var(--gx-auth-primary) 0%, var(--gx-auth-primary-dark) 100%);
    box-shadow: 0 12px 28px var(--gx-auth-primary-glow);
    transition: transform 0.18s ease, box-shadow 0.2s ease, filter 0.2s ease;
    cursor: pointer;
}

.gx-auth-btn:hover,
.gx-auth-btn:focus {
    color: #062033;
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(57, 202, 255, 0.48);
    filter: brightness(1.02);
    outline: none;
}

.gx-auth-btn:active {
    transform: translateY(0);
}

.gx-auth-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: var(--gx-auth-muted);
    font-weight: 500;
}

.gx-auth-copy {
    margin: 28px 0 0;
    text-align: center;
    font-size: 12px;
    color: var(--gx-auth-icon);
    font-weight: 600;
}

.gx-auth-copy-mobile {
    display: none;
}

.gx-auth-alert {
    border-radius: var(--gx-auth-radius-sm);
    padding: 12px 14px;
    font-size: 14px;
    margin-bottom: 18px;
    font-weight: 600;
}

.gx-auth-alert-success {
    background: var(--gx-auth-alert-success-bg);
    border: 1px solid var(--gx-auth-alert-success-border);
    color: var(--gx-auth-alert-success-text);
}

.gx-auth-alert-info {
    background: var(--gx-auth-alert-info-bg);
    border: 1px solid var(--gx-auth-alert-info-border);
    color: var(--gx-auth-alert-info-text);
}

.gx-auth-panel .invalid-feedback {
    display: block;
    font-size: 13px;
    margin-top: 6px;
    color: #ef4444;
    font-weight: 600;
}

.gx-auth-verify-text {
    font-size: 14px;
    line-height: 1.65;
    color: var(--gx-auth-muted);
    margin-bottom: 22px;
    font-weight: 500;
}

.gx-auth-verify-text strong {
    display: block;
    margin-bottom: 6px;
    color: var(--gx-auth-text);
    font-weight: 700;
}

@keyframes gx-auth-rise {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes gx-auth-fade-left {
    from {
        opacity: 0;
        transform: translateX(-16px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes gx-auth-fade-right {
    from {
        opacity: 0;
        transform: translateX(16px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes gx-auth-float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(18px);
    }
}

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

@media (max-width: 767.98px) {
    .gx-auth-page {
        padding: 16px 12px;
        align-items: flex-start;
    }

    .gx-auth-theme-toggle {
        top: 12px;
        right: 12px;
        width: 38px;
        height: 38px;
    }

    .gx-auth-shell {
        grid-template-columns: 1fr;
        max-width: 480px;
        min-height: 0;
    }

    .gx-auth-brand {
        padding: 28px 24px 24px;
        min-height: 0;
    }

    .gx-auth-brand-tagline {
        margin-bottom: 0;
        font-size: 17px;
        max-width: none;
    }

    .gx-auth-brand-points,
    .gx-auth-brand-foot {
        display: none;
    }

    .gx-auth-brand-logo-wrap {
        margin-bottom: 16px;
        padding: 12px 16px;
    }

    .gx-auth-brand-logo {
        width: 150px;
    }

    .gx-auth-panel {
        padding: 28px 22px 22px;
    }

    .gx-auth-copy-mobile {
        display: block;
    }

    .gx-auth-form-title {
        font-size: 24px;
    }
}

@media (max-width: 479.98px) {
    .gx-auth-shell {
        border-radius: 18px;
    }

    .gx-auth-brand {
        padding: 22px 18px 20px;
    }

    .gx-auth-panel {
        padding: 24px 18px 20px;
    }

    .gx-auth-options {
        margin-bottom: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gx-auth-shell,
    .gx-auth-brand-inner,
    .gx-auth-panel,
    .gx-auth-orb,
    .gx-auth-brand::after {
        animation: none !important;
    }

    .gx-auth-btn:hover,
    .gx-auth-btn:focus,
    .gx-auth-theme-toggle:hover,
    .gx-auth-theme-toggle:focus {
        transform: none;
    }
}
