/* Flash feedback specific to the login page. */
/* ==========================================================
       FLASH DEL LOGIN
       Mismo lenguaje visual que el toast del Dashboard.
       Es completamente flotante y no participa en el layout.
       ========================================================== */

    .login-flash-container {
        position: fixed !important;
        left: 50% !important;
        bottom: 1.5rem !important;
        top: auto !important;
        transform: translateX(-50%) !important;

        width: min(545px, calc(100vw - 2rem)) !important;
        margin: 0 !important;
        padding: 0 !important;

        display: flex;
        flex-direction: column;
        gap: .75rem;

        z-index: var(--z-toast, 1080) !important;
        pointer-events: none;
    }

    /* El alert de Bootstrap no controla el diseño del flash del login. */
    .login-flash-container .login-toast {
        position: relative;
        display: flex;
        align-items: center;
        width: 100%;
        min-height: 68px;
        box-sizing: border-box;

        padding: .9rem 3.25rem .9rem 1.25rem;
        margin: 0;

        background: var(--bg-card, #ffffff);
        color: var(--color-text, #1f2937);
        border: 1px solid var(--border-light, #e5e7eb);
        border-left: 3px solid var(--color-primary, #fd5d39);
        border-radius: 16px;
        box-shadow: 0 12px 30px rgba(15, 23, 42, .12);

        font-size: .95rem;
        font-weight: 500;
        line-height: 1.4;

        pointer-events: auto;
        opacity: 0;
        transform: translateY(10px);
        transition: opacity .25s ease, transform .25s ease;
    }

    .login-flash-container .login-toast.show {
        opacity: 1;
        transform: translateY(0);
    }

    .login-toast-content {
        display: flex;
        align-items: center;
        width: 100%;
        min-width: 0;
    }

    .login-toast-icon {
        flex: 0 0 24px;
        width: 24px;
        height: 24px;
        margin-right: .9rem;

        display: grid;
        place-items: center;

        border-radius: 50%;
        background: #263852;
        color: #ffffff;
        font-size: .72rem;
        font-weight: 700;
    }

    .login-toast-message {
        min-width: 0;
        color: var(--color-text, #263852);
        overflow-wrap: anywhere;
    }

    .login-toast-close {
        position: absolute;
        top: 50%;
        right: 1rem;
        transform: translateY(-50%);

        width: 28px;
        height: 28px;
        padding: 0;
        border: 0;
        background: transparent;
        color: var(--color-text-muted, #718096);

        display: grid;
        place-items: center;
        border-radius: 8px;
        cursor: pointer;
        font-size: 1.45rem;
        font-weight: 300;
        line-height: 1;

        transition: background .18s ease, color .18s ease;
    }

    .login-toast-close:hover {
        background: rgba(15, 23, 42, .06);
        color: var(--color-heading, #1f2937);
    }

    .login-toast-close:focus-visible {
        outline: 2px solid var(--color-primary, #fd5d39);
        outline-offset: 2px;
    }

    /* Variantes: mantienen el mismo aspecto del Dashboard,
       cambiando únicamente el color de la línea lateral. */
    .login-toast.toast-success {
        border-left-color: var(--color-primary, #fd5d39);
    }

    .login-toast.toast-danger {
        border-left-color: #ef4444;
    }

    .login-toast.toast-warning {
        border-left-color: #f59e0b;
    }

    .login-toast.toast-info {
        border-left-color: var(--color-primary, #fd5d39);
    }

    @media (prefers-reduced-motion: reduce) {
        .login-flash-container .login-toast {
            transition: none;
        }
    }

    @media (max-width: 576px) {
        .login-flash-container {
            bottom: .75rem !important;
            width: calc(100vw - 1.5rem) !important;
        }
    }
