.modal-backdrop.show {
    opacity: 0.45;
    backdrop-filter: blur(3px);
}



.modal-content {
    border: none;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    animation: modalFadeIn 0.25s ease;
}

@keyframes modalFadeIn {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}


.modal-header {
    border-bottom: none;
    padding: 1.5rem 1.75rem;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
}

.modal-title {
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-header .btn-close {
    filter: invert(1);
    opacity: 0.9;
}


/* Variante ambiental (aguas) */
.modal-header-ambiental {
    background: linear-gradient(135deg, #10b981, #059669);
}


.modal-body {
    padding: 1.75rem;
    background-color: #ffffff;
}

.modal-body .form-label {
    font-weight: 500;
    font-size: 0.85rem;
    color: #495057;
}

.modal-body .form-control,
.modal-body .form-select {
    border-radius: 10px;
    border: 1px solid #dee2e6;
    padding: 0.55rem 0.75rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.modal-body .form-control:focus,
.modal-body .form-select:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.15);
}



.modal-footer {
    border-top: 1px solid #f1f1f1;
    padding: 1.25rem 1.75rem;
    background-color: #fafafa;
}

.modal-footer .btn {
    border-radius: 10px;
    padding: 0.5rem 1.25rem;
    font-weight: 500;
}




.btn-modal-primary {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    color: #fff;
}

.btn-modal-primary:hover {
    opacity: 0.9;
}

.btn-modal-success {
    background: linear-gradient(135deg, #198754, #20c997);
    border: none;
    color: #fff;
}

.btn-modal-danger {
    background: linear-gradient(135deg, #dc3545, #ff6b6b);
    border: none;
    color: #fff;
}



.modal-section {
    margin-bottom: 1.5rem;
}

.modal-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #6c757d;
    margin-bottom: 0.75rem;
    border-left: 3px solid #198754;
    padding-left: 0.5rem;
}


.modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}



.modal-badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.6rem;
    border-radius: 50px;
    background-color: #e9f2ff;
    color: #198754;
    font-weight: 500;
}



.modal-xl-custom {
    max-width: 1200px;
}

@media (max-width: 768px) {
    .modal-body {
        padding: 1.25rem;
    }
}

/* ===================================================
   MODAL SISTEMA GLOBAL
=================================================== */

.modal-sistema .modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    animation: modalFadeIn .25s ease;
}

/* Backdrop */
.modal-backdrop.show {
    opacity: 0.45;
    backdrop-filter: blur(4px);
}

/* Animación */
@keyframes modalFadeIn {
    from {
        transform: translateY(-12px) scale(.98);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* ===================================================
   HEADER
=================================================== */

.modal-sistema .modal-header {
    border: none;
    padding: 1.6rem 1.8rem;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
}

.modal-sistema .modal-title {
    font-weight: 600;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: .3px;
}

.modal-sistema .modal-header .btn-close {
    filter: invert(1);
    opacity: .9;
}

/* ===================================================
   BODY
=================================================== */

.modal-sistema .modal-body {
    padding: 1.8rem;
    background-color: #ffffff;
}

.modal-sistema .form-label {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #6b7280;
}

/* Inputs */
.modal-sistema .form-control,
.modal-sistema .form-select {
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 0.6rem 0.85rem;
    font-size: 0.9rem;
    transition: all .2s ease;
}

.modal-sistema .form-control:focus,
.modal-sistema .form-select:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 0.18rem rgba(16,185,129,.18);
}

/* ===================================================
   SECCIONES INTERNAS
=================================================== */

.modal-sistema .modal-section {
    margin-bottom: 2rem;
}

.modal-sistema .modal-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #065f46;
    margin-bottom: 1rem;
    padding-left: .6rem;
    border-left: 4px solid #10b981;
}

.modal-sistema .modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.2rem;
}

/* ===================================================
   FOOTER
=================================================== */

.modal-sistema .modal-footer {
    border-top: 1px solid #f3f4f6;
    padding: 1.4rem 1.8rem;
    background-color: #fafafa;
}

.modal-sistema .modal-footer .btn {
    border-radius: 12px;
    padding: 0.55rem 1.4rem;
    font-weight: 600;
}

/* Botones institucionales */
.btn-modal-success {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    color: #fff;
}

.btn-modal-success:hover {
    opacity: .9;
}
.modal-sistema .modal-section {
    background: #f9fafb;
    padding: 1.2rem;
    border-radius: 14px;
    border: 1px solid #f3f4f6;
}
/* Sección como panel interno */
.modal-sistema .modal-section {
    background: #f9fafb;
    padding: 1.2rem;
    border-radius: 14px;
    border: 1px solid #f3f4f6;
}
.modal-sistema .modal-section {
    background: #f9fafb;
    padding: 1.4rem;
    border-radius: 16px;
    border: 1px solid #f3f4f6;
    margin-bottom: 1.8rem;
}
.modal-sistema .form-check {
    background: #ffffff;
    padding: .6rem .8rem;
    border-radius: 10px;
    border: 1px solid #f1f5f9;
    transition: all .2s ease;
}

.modal-sistema .form-check:hover {
    background: #ecfdf5;
    border-color: #10b981;
}

.modal-sistema .form-check-input:checked {
    background-color: #10b981;
    border-color: #10b981;
}
/* Altura máxima del modal */
#modalConfigApp .modal-dialog {
    max-width: 1200px;
}

/* Contenedor general */
#modalConfigApp .modal-content {
    border-radius: 18px;
    border: none;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

/* Header fijo */
/* Aqui esta  */
#modalConfigApp .modal-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: linear-gradient(135deg, #10b981, #059669);
    border-bottom: 1px solid #eee;
    padding: 1rem 1.5rem;
}

/* Footer fijo */
#modalConfigApp .modal-footer {
    position: sticky;
    bottom: 0;
    z-index: 10;
    background: #ffffff;
    border-top: 1px solid #eee;
    padding: 1rem 1.5rem;
}

/*  SCROLL REAL */
#modalConfigApp .modal-body {
    max-height: 75vh;
    overflow-y: auto;
    padding: 1.5rem;
}

/* Scroll más moderno */
#modalConfigApp .modal-body::-webkit-scrollbar {
    width: 8px;
}

#modalConfigApp .modal-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

#modalConfigApp .modal-body::-webkit-scrollbar-thumb:hover {
    background: #999;
}
.config-section {
    background: #f8f9fa;
    border-radius: 14px;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.config-section:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.config-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 8px;
}
#modalConfigApp .form-check {
    padding: 6px 8px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

#modalConfigApp .form-check:hover {
    background: rgba(0,0,0,0.04);
}

#modalConfigApp .form-check-input:checked {
    background-color: #198754;
    border-color: #198754;
}
.form-input {
    border-radius: 10px;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
}

.form-input:focus {
    border-color: #198754;
    box-shadow: 0 0 0 3px rgba(13,110,253,0.15);
}