:root {
    --auth-bg: radial-gradient(circle at 20% 20%, #1e3a34 0%, #0f1f1b 45%, #081311 100%);
}

body.auth-page {
    min-height: 100vh;
    margin: 0;
    background: var(--auth-bg);
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(8, 17, 15, 0.9);
    box-shadow: 0 14px 50px rgba(0, 0, 0, 0.35);
    color: #e6f1ec;
}

.auth-card .form-control,
.auth-card .form-check-input {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.auth-password-toggle {
    min-width: 2.65rem;
}

.auth-password-toggle i {
    pointer-events: none;
}

.auth-card .form-check-input {
    width: 1.1rem;
    height: 1.1rem;
    margin-top: 0.2rem;
    cursor: pointer;
}

.auth-card .form-check-input:not(:checked) {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.58);
}

.auth-card .form-check-input:checked {
    background-color: #20a36b;
    border-color: #20a36b;
}

.auth-card .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(32, 163, 107, 0.3);
}

.auth-card .form-check-label {
    color: #e6f1ec;
    cursor: pointer;
}

.auth-card .form-control:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: #20a36b;
    box-shadow: 0 0 0 0.25rem rgba(32, 163, 107, 0.2);
}

.auth-card .app-lang-group .btn {
    border-color: rgba(255, 255, 255, 0.22);
    color: #d9e8e1;
}

.auth-card .app-lang-group .btn.active,
.auth-card .app-lang-group .btn:hover {
    background: rgba(32, 163, 107, 0.22);
    border-color: rgba(32, 163, 107, 0.5);
    color: #fff;
}

.auth-reset-link {
    color: #8edab3;
    text-decoration: none;
}

.auth-reset-link:hover,
.auth-reset-link:focus {
    color: #b7f0d2;
    text-decoration: underline;
}

.auth-code-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.5rem;
}

.auth-code-input {
    text-align: center;
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: 0.02em;
    padding: 0.5rem 0;
}

.auth-code-input.is-invalid {
    border-color: #dc3545;
}

.totp-qr-wrap {
    border: 1px solid var(--bs-border-color, #ced4da);
    border-radius: 0.5rem;
    background: var(--bs-tertiary-bg, #f8f9fa);
    padding: 0.75rem;
}

.totp-qr-box {
    width: 300px;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #d4d9e2;
    border-radius: 0.4rem;
}

.totp-qr-box > canvas,
.totp-qr-box > img {
    display: block;
    width: 280px !important;
    height: 280px !important;
    image-rendering: pixelated;
}

.totp-qr-empty {
    color: #6c757d;
    font-size: 0.85rem;
    text-align: center;
    padding: 0.5rem;
}

@media (max-width: 575.98px) {
    .auth-card {
        max-width: 100%;
    }

    .auth-code-grid {
        gap: 0.35rem;
    }

    .auth-code-input {
        font-size: 1.2rem;
    }

    .totp-qr-box {
        width: 260px;
        min-height: 260px;
    }

    .totp-qr-box > canvas,
    .totp-qr-box > img {
        width: 240px !important;
        height: 240px !important;
    }
}
