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

body.auth-page {
    min-height: 100vh;
    margin: 0;
    color: #211f1f;
    background: #f7f3f2;
    overflow-x: hidden;
}

.auth-shell {
    width: 100%;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr);
    align-items: stretch;
}

.auth-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    padding: clamp(2rem, 5vw, 5rem);
    color: #ffffff;
    background-image:
        linear-gradient(135deg, rgba(18, 14, 15, 0.9) 0%, rgba(118, 8, 16, 0.72) 56%, rgba(19, 15, 16, 0.78) 100%),
        var(--auth-bg-image);
    background-size: cover;
    background-position: center;
}

.auth-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.18), transparent 30%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.36));
    pointer-events: none;
}

.auth-hero-content {
    position: relative;
    z-index: 1;
    width: min(100%, 620px);
}

.auth-hero-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 0.85rem;
    margin-bottom: 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff0e8;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.auth-hero h2 {
    max-width: 12ch;
    margin: 0;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: clamp(2.25rem, 4.5vw, 4.45rem);
    font-weight: 800;
    line-height: 1;
}

.auth-hero p {
    max-width: 560px;
    margin: 1.25rem 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(1rem, 1.45vw, 1.12rem);
    line-height: 1.7;
}

.auth-hero-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 1.75rem;
}

.auth-hero-highlights span {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 700;
}

.auth-hero-highlights i {
    color: #ffd15c;
    font-size: 1rem;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    align-self: center;
    justify-self: center;
    margin: clamp(1.25rem, 4vw, 4rem);
    padding: clamp(1.5rem, 3vw, 2rem);
    border: 1px solid rgba(154, 0, 7, 0.08);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(41, 23, 23, 0.12);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid rgba(154, 0, 7, 0.14);
}

.auth-brand img {
    width: 78px;
    height: 78px;
    flex: 0 0 78px;
    padding: 8px;
    border-radius: 50%;
    background: #ffffff;
    object-fit: contain;
    object-position: center;
    box-shadow: 0 12px 28px rgba(154, 0, 7, 0.18);
}

.auth-kicker {
    display: block;
    margin-bottom: 0.2rem;
    color: var(--color-primary-dark);
    font-size: 0.78rem;
    font-weight: 800;
}

.auth-brand h1 {
    margin: 0;
    color: #1f1a1a;
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.15;
}

.auth-brand p {
    margin: 0.25rem 0 0;
    color: #6f6262;
    font-size: 0.88rem;
    line-height: 1.45;
}

.auth-form-heading {
    margin-bottom: 1.35rem;
}

.auth-form-heading h2 {
    margin: 0;
    color: #211f1f;
    font-size: 1.35rem;
    font-weight: 800;
}

.auth-form-heading p {
    margin: 0.4rem 0 0;
    color: #726767;
    font-size: 0.9rem;
    line-height: 1.5;
}

.auth-form .form-label {
    margin-bottom: 0.45rem;
    color: #3b3333;
}

.auth-input-group {
    min-height: 48px;
    border: 1px solid rgba(154, 0, 7, 0.16);
    border-radius: 8px;
    background: #fbf8f7;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.auth-input-group:focus-within {
    border-color: var(--color-primary-light);
    background: #ffffff;
    box-shadow: 0 0 0 0.22rem rgba(211, 47, 47, 0.16);
}

.auth-input-group .input-group-text,
.auth-input-group .form-control,
.auth-input-group .btn {
    border: 0;
    background: transparent;
}

.auth-input-group .input-group-text {
    width: 48px;
    justify-content: center;
    color: var(--color-primary-dark);
}

.auth-input-group .form-control {
    min-height: 48px;
    padding-left: 0;
    color: #211f1f;
    box-shadow: none;
}

.auth-input-group .form-control:focus {
    box-shadow: none;
}

.auth-password-toggle {
    width: 48px;
    color: #706464;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus {
    color: var(--color-primary-dark);
}

.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 1rem 0 1.35rem;
}

.auth-link {
    color: var(--color-primary-dark);
    font-weight: 700;
    text-decoration: none;
}

.auth-link:hover,
.auth-link:focus {
    color: var(--color-primary);
    text-decoration: underline;
}

.auth-submit {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
    box-shadow: 0 14px 28px rgba(154, 0, 7, 0.24);
}

.auth-submit:hover,
.auth-submit:focus {
    background: linear-gradient(135deg, #850006, var(--color-primary-dark));
    box-shadow: 0 16px 30px rgba(154, 0, 7, 0.3);
}

.auth-secondary-action {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border-radius: 8px;
    font-weight: 700;
}

.auth-alert {
    border: 0;
    border-radius: 8px;
    font-size: 0.9rem;
}

.auth-help-panel {
    padding: 1rem;
    margin-bottom: 1.3rem;
    border: 1px solid rgba(154, 0, 7, 0.12);
    border-radius: 8px;
    background: #fff6f4;
}

.auth-help-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    border-radius: 50%;
    background: rgba(211, 47, 47, 0.12);
    color: var(--color-primary-dark);
}

.auth-card-footer {
    margin: 1.4rem 0 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(154, 0, 7, 0.12);
    color: #847777;
    text-align: center;
    font-size: 0.76rem;
}

.auth-page .form-check-input:checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.auth-page .text-danger {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.8rem;
}

@media (max-width: 991.98px) {
    .auth-shell {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .auth-hero {
        width: 100%;
        min-height: auto;
        align-items: center;
        padding: 3rem 1.5rem;
    }

    .auth-hero-content {
        max-width: 680px;
    }

    .auth-hero h2 {
        max-width: 18ch;
        font-size: 2.35rem;
    }

    .auth-hero p {
        max-width: 620px;
    }

    .auth-card {
        width: min(100% - 2rem, 440px);
        justify-self: center;
        margin: 1.25rem 1rem 2rem;
    }
}

@media (max-width: 575.98px) {
    .auth-hero {
        padding: 2rem 1rem;
        background-position: center top;
    }

    .auth-hero-kicker {
        min-height: 30px;
        margin-bottom: 0.85rem;
        font-size: 0.72rem;
    }

    .auth-hero h2 {
        max-width: 15ch;
        font-size: 2rem;
    }

    .auth-hero p {
        margin-top: 1rem;
        font-size: 0.94rem;
        line-height: 1.6;
    }

    .auth-hero-highlights {
        gap: 0.5rem;
        margin-top: 1.25rem;
    }

    .auth-hero-highlights span {
        min-height: 34px;
        padding: 0 0.75rem;
        font-size: 0.82rem;
    }

    .auth-card {
        padding: 1.25rem;
    }

    .auth-brand {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .auth-brand img {
        width: 70px;
        height: 70px;
        flex-basis: 70px;
    }

    .auth-brand h1 {
        font-size: 1.55rem;
    }

    .auth-options {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.75rem;
    }
}
