:root {
    --auth-primary: #00d4ff;
    --auth-primary-dark: #0077ff;
    --auth-secondary: #7c3aed;
    --auth-bg-1: #06111f;
    --auth-bg-2: #0b2545;
    --auth-card: rgba(255, 255, 255, .96);
    --auth-text: #102033;
    --auth-muted: #6b7280;
    --auth-border: #dbeafe;
    --auth-danger: #ef4444;
    --auth-radius: 24px;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--auth-text);
    background:
        radial-gradient(circle at top left, rgba(0, 212, 255, .35), transparent 34%),
        radial-gradient(circle at bottom right, rgba(124, 58, 237, .35), transparent 34%),
        linear-gradient(135deg, var(--auth-bg-1), var(--auth-bg-2));
}

.auth-page {
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    overflow: hidden;
}

.auth-box {
    width: min(1080px, 100%);
    max-height: calc(100svh - 20px);
    display: grid;
    grid-template-columns: 310px 1fr;
    overflow: hidden;
    border-radius: var(--auth-radius);
    background: var(--auth-card);
    box-shadow: 0 26px 80px rgba(0, 0, 0, .34), 0 0 0 1px rgba(255, 255, 255, .22);
}

.auth-box-login {
    width: min(650px, 100%);
    grid-template-columns: 330px 1fr;
}

.auth-box-register {
    width: min(800px, 100%);
    grid-template-columns: 300px 1fr;
}

.auth-side {
    position: relative;
    padding: 28px 26px;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background:
        linear-gradient(145deg, rgba(0, 212, 255, .86), rgba(0, 119, 255, .78), rgba(124, 58, 237, .86));
    background-size: cover;
    isolation: isolate;
}

.auth-side::after {
    content: "";
    position: absolute;
    inset: 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, .24);
    pointer-events: none;
}

.auth-side-icon {
    width: 58px;
    height: 58px;
    border-radius: 19px;
    display: grid;
    place-items: center;
    margin-bottom: 14px;
    background: rgba(255, 255, 255, .18);
    box-shadow: 0 0 30px rgba(0, 212, 255, .42);
}

.auth-side-icon i {
    font-size: 29px;
}

.auth-side h1 {
    margin: 0 0 8px;
    font-size: clamp(25px, 3.4vw, 38px);
    font-weight: 800;
    letter-spacing: -.04em;
}

.auth-side p {
    margin: 0;
    max-width: 280px;
    line-height: 1.48;
    color: rgba(255, 255, 255, .9);
    font-size: 14px;
}

.auth-content {
    padding: 18px 22px;
    overflow: auto;
    scrollbar-width: thin;
}

.auth-heading {
    margin-bottom: 10px;
}

.auth-heading h2 {
    margin: 0 0 2px;
    font-size: clamp(22px, 2.5vw, 29px);
    font-weight: 800;
    letter-spacing: -.03em;
}

.auth-heading p {
    margin: 0;
    color: var(--auth-muted);
    font-size: 13px;
}

.auth-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
}

.auth-form-grid.auth-one {
    grid-template-columns: 1fr;
}

.auth-field {
    position: relative;
}

.auth-full {
    grid-column: 1 / -1;
}

.auth-label {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 700;
    color: #26364d;
}

.auth-input,
.auth-select,
.auth-captcha-input {
    width: 100%;
    height: 38px;
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    background: #f8fbff;
    color: var(--auth-text);
    outline: none;
    padding: 0 39px 0 12px;
    font-size: 13px;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.auth-select {
    appearance: none;
}

.auth-input:focus,
.auth-select:focus,
.auth-captcha-input:focus {
    border-color: var(--auth-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, .16);
}

.auth-icon,
.auth-toggle-password {
    position: absolute;
    right: 12px;
    bottom: 10px;
    color: var(--auth-primary-dark);
    line-height: 1;
    font-size: 14px;
}

.auth-toggle-password {
    cursor: pointer;
    user-select: none;
}

.auth-help {
    margin-top: -1px;
    padding: 6px 10px;
    border-radius: 12px;
    font-size: 11.5px;
    line-height: 1.35;
    color: #075985;
    background: #ecfeff;
    border: 1px solid #bae6fd;
}

.auth-captcha {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 9px;
    margin: 10px 0;
    align-items: center;
}

.auth-captcha img {
    width: 150px;
    height: 42px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 13px;
    border: 1px solid rgba(0, 212, 255, .42);
    background:
        linear-gradient(135deg, rgba(0, 212, 255, .16), rgba(124, 58, 237, .16)),
        #071426;
    box-shadow:
        inset 0 0 24px rgba(0, 212, 255, .16),
        0 10px 20px rgba(0, 119, 255, .12);
}

.auth-captcha-input {
    height: 42px;
    padding: 0 12px;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
    text-align: center;
}

.auth-qr-preview,
.auth-qr-box {
    border-radius: 14px;
    border: 1px solid rgba(0, 212, 255, .35);
    background: linear-gradient(135deg, rgba(0, 212, 255, .10), rgba(124, 58, 237, .10)), #f8fbff;
    box-shadow: inset 0 0 24px rgba(0, 212, 255, .10);
}

.auth-qr-preview img,
.auth-qr-box img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.auth-button {
    width: 100%;
    height: 42px;
    border: 0;
    border-radius: 14px;
    color: #fff;
    font-weight: 800;
    letter-spacing: .02em;
    background: linear-gradient(135deg, var(--auth-primary), var(--auth-primary-dark), var(--auth-secondary));
    box-shadow: 0 14px 28px rgba(0, 119, 255, .26);
    transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.auth-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 38px rgba(0, 119, 255, .32);
}

.auth-button:disabled {
    opacity: .65;
    cursor: not-allowed;
}

.auth-link {
    margin-top: 8px;
    text-align: center;
    font-size: 13px;
    color: var(--auth-muted);
}

.auth-link a {
    color: var(--auth-primary-dark);
    font-weight: 800;
    text-decoration: none;
}

.auth-link a:hover {
    text-decoration: underline;
}

.auth-floating-home {
    position: fixed;
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(135deg, var(--auth-primary), var(--auth-secondary));
    box-shadow: 0 14px 32px rgba(0, 0, 0, .26);
}

@media (max-width: 991.98px) {
    .auth-page {
        align-items: flex-start;
        padding: 10px;
        overflow: auto;
    }

    .auth-box,
    .auth-box-login,
    .auth-box-register {
        max-height: none;
        min-height: calc(100svh - 20px);
        grid-template-columns: 1fr;
    }

    .auth-side {
        min-height: auto;
        padding: 18px 20px;
    }

    .auth-side::after {
        inset: 9px;
    }

    .auth-side-icon {
        width: 50px;
        height: 50px;
        border-radius: 16px;
        margin-bottom: 9px;
    }

    .auth-side-icon i {
        font-size: 25px;
    }

    .auth-side p {
        max-width: none;
        font-size: 13px;
        line-height: 1.42;
    }

    .auth-content {
        padding: 16px;
    }
}

@media (max-width: 575.98px) {
    .auth-page {
        padding: 0;
    }

    .auth-box,
    .auth-box-login,
    .auth-box-register {
        min-height: 100svh;
        border-radius: 0;
    }

    .auth-side {
        padding: 15px 16px;
    }

    .auth-side h1 {
        font-size: 24px;
    }

    .auth-form-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .auth-full {
        grid-column: auto;
    }

    .auth-captcha {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .auth-captcha img {
        width: 100%;
        height: 40px;
    }

    .auth-content {
        padding: 14px;
    }

    .auth-input,
    .auth-select {
        height: 38px;
    }

    .auth-captcha-input {
        height: 40px;
    }
}

@media (max-width: 380px) {
    .auth-captcha {
        grid-template-columns: 1fr;
    }
}

@media (max-height: 760px) and (min-width: 992px) {
    .auth-page {
        padding: 8px;
    }

    .auth-box,
    .auth-box-login,
    .auth-box-register {
        max-height: calc(100svh - 16px);
    }

    .auth-side {
        padding: 20px;
    }

    .auth-content {
        padding: 14px 18px;
    }

    .auth-side-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 10px;
    }

    .auth-side-icon i {
        font-size: 25px;
    }

    .auth-side h1 {
        margin-bottom: 6px;
    }

    .auth-side p {
        line-height: 1.38;
    }

    .auth-heading {
        margin-bottom: 8px;
    }

    .auth-form-grid {
        gap: 7px 9px;
    }

    .auth-label {
        margin-bottom: 3px;
        font-size: 11.5px;
    }

    .auth-input,
    .auth-select {
        height: 36px;
    }

    .auth-captcha {
        margin: 8px 0;
        grid-template-columns: 140px 1fr;
    }

    .auth-captcha img,
    .auth-captcha-input {
        height: 38px;
    }

    .auth-button {
        height: 40px;
    }

    .auth-link {
        margin-top: 7px;
    }
}
