* {
    box-sizing: border-box;
}

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

body.auth-body {
    margin: 0;
    min-height: 100vh;
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: #ffffff;
    background: #101010;
}

.auth-page {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 470px);
    align-items: center;
    padding: 42px;
}

.auth-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("/assets/img/auth/login-bg-desktop.webp");
    background-size: cover;
    background-position: center center;
    z-index: 0;
}

.auth-page::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 22% 58%, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.36) 48%, rgba(0, 0, 0, 0.58) 100%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.03) 0%, rgba(0, 0, 0, 0.14) 48%, rgba(0, 0, 0, 0.62) 100%);
    z-index: 1;
}

.auth-brand-copy,
.auth-card {
    position: relative;
    z-index: 2;
}

.auth-brand-copy {
    align-self: end;
    max-width: 560px;
    padding: 0 0 26px 18px;
}

.auth-brand-copy h1 {
    margin: 0 0 10px;
    font-size: clamp(34px, 4vw, 58px);
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: #ffffff;
    text-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
}

.auth-brand-copy p {
    margin: 0;
    max-width: 420px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 15px;
    line-height: 1.7;
    text-shadow: 0 10px 28px rgba(0, 0, 0, 0.36);
}

.auth-card-wrap {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 430px;
    justify-self: end;
}

.auth-card {
    width: 100%;
    padding: 34px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: 0 28px 75px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.auth-logo {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    margin: 0 auto 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.22);
}

.auth-logo img {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.auth-title {
    margin: 0;
    text-align: center;
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.03em;
}

.auth-subtitle {
    margin: 8px auto 24px;
    max-width: 285px;
    text-align: center;
    color: rgba(255, 255, 255, 0.76);
    line-height: 1.6;
}

.auth-alert {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.45;
}

.auth-alert-danger {
    border: 1px solid rgba(255, 96, 96, 0.42);
    background: rgba(127, 29, 29, 0.44);
    color: #ffe5e5;
}

.auth-alert-success {
    border: 1px solid rgba(74, 222, 128, 0.42);
    background: rgba(20, 83, 45, 0.44);
    color: #dcfce7;
}

.auth-field {
    position: relative;
    margin-bottom: 16px;
}

.auth-field i {
    position: absolute;
    left: 19px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    pointer-events: none;
}

.auth-input {
    width: 100%;
    height: 58px;
    padding: 0 18px 0 52px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.17);
    outline: none;
    font-size: 15px;
    font-weight: 600;
    transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-input::placeholder {
    color: rgba(255, 255, 255, 0.72);
    font-weight: 600;
}

.auth-input:focus {
    border-color: rgba(255, 100, 51, 0.95);
    box-shadow: 0 0 0 4px rgba(255, 100, 51, 0.18);
    background: rgba(255, 255, 255, 0.23);
}

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 4px 0 22px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    user-select: none;
}

.auth-check input {
    width: 17px;
    height: 17px;
    accent-color: #ff6433;
}

.auth-help {
    color: rgba(255, 255, 255, 0.76);
    text-decoration: none;
}

.auth-help:hover {
    color: #ffffff;
}

.auth-btn {
    width: 100%;
    height: 60px;
    border: none;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #ff7a3d 0%, #ff4f2e 100%);
    box-shadow: 0 18px 34px rgba(255, 88, 48, 0.33);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.auth-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 22px 42px rgba(255, 88, 48, 0.42);
    filter: brightness(1.03);
}

.auth-footnote {
    margin: 18px 0 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.64);
    font-size: 12px;
    line-height: 1.55;
}

@media (max-width: 991px) {
    .auth-page {
        display: flex;
        align-items: flex-end;
        justify-content: center;
        min-height: 100svh;
        padding: 22px 18px 26px;
    }

    .auth-page::before {
        background-image: url("/assets/img/auth/login-bg-mobile-v2.webp");
        background-size: cover;
        background-position: center top;
        background-repeat: no-repeat;
    }

    .auth-page::after {
        background:
            linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.18) 42%, rgba(0, 0, 0, 0.68) 100%);
    }

    .auth-brand-copy {
        display: none;
    }

    .auth-card-wrap {
        max-width: 450px;
        justify-self: auto;
    }

    .auth-card {
        padding: 24px 20px 22px;
        border-radius: 30px;
        background: rgba(255, 255, 255, 0.14);
        box-shadow: 0 24px 56px rgba(0, 0, 0, 0.32);
    }

    .auth-logo {
        width: 66px;
        height: 66px;
        border-radius: 22px;
        margin-bottom: 14px;
    }

    .auth-logo img {
        width: 46px;
        height: 46px;
    }

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

    .auth-subtitle {
        margin-bottom: 20px;
        font-size: 13px;
    }
}

@media (max-width: 420px) {
    .auth-page {
        padding-left: 14px;
        padding-right: 14px;
        padding-bottom: 18px;
    }

    .auth-page::before {
        background-image: url("/assets/img/auth/login-bg-mobile-v2.webp");
        background-size: cover;
        background-position: center top;
        background-repeat: no-repeat;
    }

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

    .auth-input,
    .auth-btn {
        height: 56px;
    }

    .auth-row {
        font-size: 12px;
    }
}
