/* ============================================
   VENTANAS EMERGENTES (SfDialog): estilo único
   Encabezado blanco, botones abajo a la derecha:
   principal verde lleno, secundarios como texto,
   destructivos (clase dlg-peligro) en rojo.
   ============================================ */

.e-dlg-overlay {
    background-color: rgba(20, 40, 34, 0.55) !important;
    opacity: 1 !important;
}

.e-dialog:not(.e-filter-popup):not(.e-ccdlg) {
    border: 0 !important;
    border-radius: 16px !important;
    box-shadow: 0 24px 60px rgba(10, 30, 24, 0.35) !important;
    overflow: hidden;
}

    .e-dialog:not(.e-filter-popup):not(.e-ccdlg) .e-dlg-header-content {
        background: #ffffff !important;
        padding: 16px 20px !important;
        border-bottom: 1px solid #eef3f1 !important;
        border-radius: 16px 16px 0 0 !important;
    }

    .e-dialog:not(.e-filter-popup):not(.e-ccdlg) .e-dlg-header,
    .e-dialog:not(.e-filter-popup):not(.e-ccdlg) .e-dlg-header > * {
        font-family: 'Montserrat', sans-serif;
        font-size: 16px !important;
        font-weight: 700 !important;
        letter-spacing: 0.2px;
        color: #1d3a32 !important;
    }

    .e-dialog:not(.e-filter-popup):not(.e-ccdlg) .e-dlg-closeicon-btn {
        width: 36px !important;
        height: 36px !important;
        border-radius: 10px !important;
    }

        .e-dialog:not(.e-filter-popup):not(.e-ccdlg) .e-dlg-closeicon-btn:hover {
            background: #eef3f1 !important;
        }

    .e-dialog:not(.e-filter-popup):not(.e-ccdlg) .e-dlg-content {
        padding: 18px 22px !important;
    }

    .e-dialog:not(.e-filter-popup):not(.e-ccdlg) .e-footer-content {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        align-items: center;
        gap: 10px;
        padding: 12px 20px !important;
        background: #f8fbfa !important;
        border-top: 1px solid #eef3f1 !important;
        border-radius: 0 0 16px 16px !important;
    }

        /* Todos los botones del pie con la misma forma; la acción principal queda a la derecha */
        .e-dialog:not(.e-filter-popup):not(.e-ccdlg) .e-footer-content .e-btn {
            order: 2;
            height: 38px !important;
            min-width: 0;
            margin: 0 !important;
            padding: 0 16px !important;
            border-radius: 8px !important;
            font-size: 12.5px !important;
            font-weight: 700 !important;
            box-shadow: none !important;
            transition: background 0.15s ease, color 0.15s ease;
        }

            .e-dialog:not(.e-filter-popup):not(.e-ccdlg) .e-footer-content .e-btn .e-btn-icon {
                color: inherit !important;
            }

            /* Principal */
            .e-dialog:not(.e-filter-popup):not(.e-ccdlg) .e-footer-content .e-btn.e-success,
            .e-dialog:not(.e-filter-popup):not(.e-ccdlg) .e-footer-content .e-btn.e-primary {
                background: #2fa37b !important;
                border: 1px solid #2fa37b !important;
                color: #ffffff !important;
            }

                .e-dialog:not(.e-filter-popup):not(.e-ccdlg) .e-footer-content .e-btn.e-success:hover,
                .e-dialog:not(.e-filter-popup):not(.e-ccdlg) .e-footer-content .e-btn.e-primary:hover {
                    background: #258a67 !important;
                    border-color: #258a67 !important;
                }

                .e-dialog:not(.e-filter-popup):not(.e-ccdlg) .e-footer-content .e-btn.e-success:disabled,
                .e-dialog:not(.e-filter-popup):not(.e-ccdlg) .e-footer-content .e-btn.e-primary:disabled {
                    background: #a9d6c4 !important;
                    border-color: #a9d6c4 !important;
                }

            /* Secundarios: Cancelar, Salir, Cerrar… */
            .e-dialog:not(.e-filter-popup):not(.e-ccdlg) .e-footer-content .e-btn:not(.e-success):not(.e-primary):not(.dlg-peligro) {
                order: 1;
                background: transparent !important;
                border: 1px solid transparent !important;
                color: #3d5249 !important;
            }

                .e-dialog:not(.e-filter-popup):not(.e-ccdlg) .e-footer-content .e-btn:not(.e-success):not(.e-primary):not(.dlg-peligro):hover {
                    background: #eef3f1 !important;
                    color: #1d3a32 !important;
                }

            /* Destructivos: Eliminar, Rechazar, Salir sin guardar… */
            .e-dialog:not(.e-filter-popup):not(.e-ccdlg) .e-footer-content .e-btn.dlg-peligro {
                background: #c0392b !important;
                border: 1px solid #c0392b !important;
                color: #ffffff !important;
            }

                .e-dialog:not(.e-filter-popup):not(.e-ccdlg) .e-footer-content .e-btn.dlg-peligro:hover {
                    background: #a5301f !important;
                    border-color: #a5301f !important;
                }

/* Cuenta regresiva de la sesión por inactividad */
.inactividad {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 8px 4px 4px 4px;
}

.inactividad-anillo {
    position: relative;
    width: 96px;
    height: 96px;
}

    .inactividad-anillo circle {
        transition: stroke-dashoffset 0.9s linear;
    }

.inactividad-numero {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

    .inactividad-numero strong {
        font-size: 26px;
        color: #1d3a32;
    }

    .inactividad-numero span {
        margin-top: 2px;
        font-size: 10.5px;
        color: #5a6a63;
    }

.inactividad h2 {
    margin: 16px 0 0 0;
    font-size: 16px;
    font-weight: 700;
    color: #1d3a32;
}

.inactividad p {
    margin: 6px 0 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: #3d5249;
}

/* Encabezado con ícono: <Header><span class="dlg-titulo"><i class="dlg-icono fa fa-…"></i> TÍTULO</span></Header> */
.dlg-titulo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-transform: uppercase;
}

.dlg-icono {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #e8f5ef;
    color: #227b5d;
    font-size: 15px !important;
    flex-shrink: 0;
}

.dlg-icono-peligro {
    background: #fbeae8;
    color: #c0392b;
}

.dlg-icono-aviso {
    background: #fdf3e1;
    color: #b7791f;
}

/* Anchos estándar: chico 440px (confirmaciones), mediano 680px (formularios), grande 960px (tablas/detalle), completo 1200px (detalles con tablas anchas) */
.e-dialog.dlg-chico { width: 440px !important; }
.e-dialog.dlg-mediano { width: 680px !important; }
.e-dialog.dlg-grande { width: 960px !important; }
.e-dialog.dlg-completo { width: 1200px !important; }
/* Cruces de liquidación (pendientes ↔ pagados): todo el ancho de la pantalla */
.e-dialog.dlg-cruce { width: calc(100vw - 32px) !important; }

.e-dialog.dlg-chico,
.e-dialog.dlg-mediano,
.e-dialog.dlg-grande,
.e-dialog.dlg-completo,
.e-dialog.dlg-cruce {
    max-width: calc(100vw - 32px) !important;
}
