/*
 | Login screen — red/white, mobile-first.
 | Colours come from the Auth Page screen through CSS custom properties.
 */

.auth-shell {
    --auth-primary: #c1121f;
    --auth-accent: #6a0d14;
    --auth-radius: 18px;
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: #fff;
    color: #1f2937;
    font-family: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    overflow-x: hidden;
}

.auth-split {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    min-height: 100vh;
    min-height: 100dvh;
}

/* Brand side ------------------------------------------------------------- */

.auth-brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    padding: clamp(1.5rem, 4vw, 3.5rem);
    color: #fff;
    overflow: hidden;
    background: linear-gradient(155deg, var(--auth-accent) 0%, var(--auth-primary) 100%);
}

.auth-brand-panel.has-image {
    background-image: linear-gradient(155deg, rgba(0, 0, 0, .74), rgba(0, 0, 0, .42)), var(--auth-bg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.auth-brand-panel::after {
    content: "";
    position: absolute;
    right: -18%;
    bottom: -28%;
    width: 26rem;
    height: 26rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    pointer-events: none;
}

.auth-brand-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: .75rem;
    font-weight: 600;
    letter-spacing: .02em;
}

.auth-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .28);
    font-size: 1.25rem;
}

.auth-hero {
    position: relative;
    z-index: 1;
    max-width: 34rem;
}

.auth-hero h1 {
    margin: 0 0 .75rem;
    font-size: clamp(1.9rem, 3.4vw, 3rem);
    line-height: 1.1;
    font-weight: 700;
}

.auth-hero p {
    margin: 0;
    font-size: clamp(.95rem, 1.2vw, 1.1rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, .86);
}

.auth-points {
    list-style: none;
    margin: 1.75rem 0 0;
    padding: 0;
    display: grid;
    gap: .6rem;
}

.auth-points li {
    display: flex;
    gap: .6rem;
    align-items: flex-start;
    font-size: .95rem;
    color: rgba(255, 255, 255, .9);
}

.auth-points i {
    margin-top: .15rem;
}

.auth-brand-footer {
    position: relative;
    z-index: 1;
    font-size: .8rem;
    color: rgba(255, 255, 255, .65);
}

/* Form side -------------------------------------------------------------- */

.auth-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.25rem, 4vw, 3.5rem);
    background: #fff;
}

.auth-card {
    width: 100%;
    max-width: 26rem;
}

.auth-card h2 {
    margin: 0 0 .35rem;
    font-size: 1.6rem;
    font-weight: 700;
    color: #111827;
}

.auth-lead {
    margin: 0 0 1.75rem;
    font-size: .95rem;
    color: #6b7280;
}

.auth-card .form-label {
    font-weight: 600;
    font-size: .9rem;
    color: #374151;
}

.auth-card .form-control.form-control-lg {
    height: 3rem;
    border-radius: 12px;
    border-color: #e5e7eb;
    font-size: 1rem;
}

.auth-card .form-control.form-control-lg:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 .2rem rgba(193, 18, 31, .15);
}

.auth-field {
    position: relative;
}

.auth-password-toggle {
    position: absolute;
    inset-inline-end: .6rem;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #6b7280;
    padding: .4rem .5rem;
    line-height: 1;
    border-radius: 8px;
}

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

.auth-submit {
    height: 3rem;
    border: 0;
    border-radius: 12px;
    background: var(--auth-primary);
    color: #fff;
    font-weight: 600;
    transition: filter .15s ease, transform .15s ease;
}

.auth-submit:hover,
.auth-submit:focus {
    background: var(--auth-primary);
    color: #fff;
    filter: brightness(.94);
}

.auth-submit:active {
    transform: translateY(1px);
}

.auth-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: .25rem 0 1.25rem;
    font-size: .9rem;
}

.auth-note {
    margin: 1.5rem 0 0;
    font-size: .85rem;
    color: #6b7280;
    text-align: center;
}

.auth-alert {
    border-radius: 12px;
    font-size: .9rem;
}

/* Mobile ----------------------------------------------------------------- */

@media (max-width: 991.98px) {
    .auth-split {
        grid-template-columns: 1fr;
        min-height: 100dvh;
    }

    .auth-brand-panel {
        gap: 1rem;
        padding: 1.25rem 1.25rem 1.5rem;
        border-radius: 0 0 22px 22px;
    }

    .auth-hero h1 {
        font-size: 1.55rem;
        margin-bottom: .35rem;
    }

    .auth-hero p {
        font-size: .9rem;
    }

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

    .auth-form-panel {
        align-items: flex-start;
        padding: 1.25rem 1.15rem 2.5rem;
    }

    .auth-card {
        max-width: none;
    }

    .auth-card h2 {
        font-size: 1.35rem;
    }

    .auth-card .form-control.form-control-lg,
    .auth-submit {
        height: 3.15rem;
        font-size: 1rem;
    }
}

@media (max-width: 380px) {
    .auth-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: .5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-submit {
        transition: none;
    }
}
