/* ===== EMPRESACONTROL UI: TOAST ===== */

#ec-toast-contenedor {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: min(380px, calc(100vw - 32px));
    pointer-events: none;
}

.ec-toast {
    display: grid;
    grid-template-columns: 34px 1fr 28px;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 12px 14px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.22);
    border-left: 5px solid #64748b;
    opacity: 0;
    transform: translateX(30px);
    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
    pointer-events: auto;
}

.ec-toast.activo {
    opacity: 1;
    transform: translateX(0);
}

.ec-toast-icono {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 16px;
    font-weight: 800;
}

.ec-toast-mensaje {
    color: #0f172a;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 600;
}

.ec-toast-cerrar {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #64748b;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.ec-toast-cerrar:hover {
    background: #f1f5f9;
    color: #0f172a;
}

/* ÉXITO */

.ec-toast-exito {
    border-left-color: #16a34a;
}

.ec-toast-exito .ec-toast-icono {
    background: #dcfce7;
    color: #15803d;
}

/* ERROR */

.ec-toast-error {
    border-left-color: #dc2626;
}

.ec-toast-error .ec-toast-icono {
    background: #fee2e2;
    color: #b91c1c;
}

/* ADVERTENCIA */

.ec-toast-advertencia {
    border-left-color: #f59e0b;
}

.ec-toast-advertencia .ec-toast-icono {
    background: #fef3c7;
    color: #b45309;
}

/* INFORMACIÓN */

.ec-toast-info {
    border-left-color: #2563eb;
}

.ec-toast-info .ec-toast-icono {
    background: #dbeafe;
    color: #1d4ed8;
}

@media (max-width: 600px) {
    #ec-toast-contenedor {
        top: 14px;
        right: 14px;
        left: 14px;
        width: auto;
    }
}

/* ===== EMPRESACONTROL UI: CONFIRMACIÓN ===== */

.ec-confirm-fondo {
    position: fixed;
    inset: 0;
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.58);
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.2s ease,
        visibility 0.2s ease;
}

.ec-confirm-fondo.activo {
    opacity: 1;
    visibility: visible;
}

.ec-confirm-modal {
    width: min(430px, 100%);
    padding: 28px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.3);
    text-align: center;
    transform: scale(0.94) translateY(12px);
    transition: transform 0.2s ease;
}

.ec-confirm-fondo.activo .ec-confirm-modal {
    transform: scale(1) translateY(0);
}

.ec-confirm-icono {
    width: 58px;
    height: 58px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 28px;
    font-weight: 800;
}

.ec-confirm-peligro {
    background: #fee2e2;
    color: #b91c1c;
}

.ec-confirm-advertencia {
    background: #fef3c7;
    color: #b45309;
}

.ec-confirm-info {
    background: #dbeafe;
    color: #1d4ed8;
}

.ec-confirm-titulo {
    margin: 0 0 10px;
    color: #0f172a;
    font-size: 21px;
    line-height: 1.25;
}

.ec-confirm-mensaje {
    margin-bottom: 24px;
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-line;
}

.ec-confirm-acciones {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.ec-confirm-cancelar,
.ec-confirm-aceptar {
    min-width: 120px;
    padding: 11px 18px;
    border-radius: 10px;
    border: 0;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        background 0.15s ease;
}

.ec-confirm-cancelar {
    background: #e2e8f0;
    color: #334155;
}

.ec-confirm-cancelar:hover {
    background: #cbd5e1;
}

.ec-confirm-aceptar {
    color: #ffffff;
}

.ec-confirm-boton-peligro {
    background: #dc2626;
}

.ec-confirm-boton-peligro:hover {
    background: #b91c1c;
}

.ec-confirm-boton-advertencia {
    background: #f59e0b;
}

.ec-confirm-boton-advertencia:hover {
    background: #d97706;
}

.ec-confirm-boton-info {
    background: #2563eb;
}

.ec-confirm-boton-info:hover {
    background: #1d4ed8;
}

.ec-confirm-cancelar:hover,
.ec-confirm-aceptar:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
}

@media (max-width: 520px) {
    .ec-confirm-modal {
        padding: 22px 18px;
    }

    .ec-confirm-acciones {
        flex-direction: column-reverse;
    }

    .ec-confirm-cancelar,
    .ec-confirm-aceptar {
        width: 100%;
    }
}

/* ===== EMPRESACONTROL UI: LOADER ===== */

#ec-loader {
    position: fixed;
    inset: 0;
    z-index: 100002;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.2s ease,
        visibility 0.2s ease;
}

#ec-loader.activo {
    opacity: 1;
    visibility: visible;
}

.ec-loader-contenido {
    min-width: 230px;
    padding: 26px 24px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
    text-align: center;
    transform: translateY(12px) scale(0.96);
    transition: transform 0.2s ease;
}

#ec-loader.activo .ec-loader-contenido {
    transform: translateY(0) scale(1);
}

.ec-loader-spinner {
    width: 44px;
    height: 44px;
    margin: 0 auto 15px;
    border: 4px solid #dbeafe;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: ec-loader-girar 0.8s linear infinite;
}

.ec-loader-texto {
    color: #0f172a;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}

@keyframes ec-loader-girar {
    to {
        transform: rotate(360deg);
    }
}



