

/* ===== MODAL OVERLAY ===== */

.iu-modal {
    position: fixed;
    inset: 0;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    background: rgba(0,0,0,0.45);
}
/* estado temporal mientras aparece el alert */
.iu-modal.z-low{
  z-index: 999 !important;
}
.iu-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}


/* ===== CAJA MODAL ===== */
.iu-modal-box {
     width: 1100px;
    max-width: 95%;
    max-height: 90vh;
    background: #fff;
    border-radius: 14px;
    overflow-y: auto;
    
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(0,0,0,0.3);
    animation: fadeIn .2s ease;
}

/* Animación */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
/* ===== TABS ===== */
.iu-tabs {
    display: flex;
    background: #f3f4f6;
    border-bottom: 1px solid #e5e7eb;
}

.iu-tab {
    flex: 1;
    padding: 14px;
    border: none;
    background: none;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
}

.iu-tab:hover {
    background: #e5e7eb;
}

.iu-tab.active {
    background: #fff;
    border-bottom: 3px solid #2563eb;
    color: #2563eb;
}

/* ===== CONTENIDO ===== */
.iu-tab-content {
    display: none;
    padding: 20px;
    overflow-y: auto;
}

.iu-tab-content.active {
    display: block;
}

/* ===== GRID RESPONSIVE ===== */
.iu-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

/* Inputs */
.iu-modal label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

#txtuser {
    display: block;
    padding: 12px 18px;
    margin-bottom: 15px;

    background-color:#164189;
    color: #ffffff;

    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;

    border-radius: 10px 10px 0 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);

    transition: all 0.2s ease-in-out;
}

/* efecto cuando se actualiza visualmente */
#txtuser.updated {
    transform: scale(1.01);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}
.iu-modal input,
.iu-modal select,
.iu-modal textarea {
    width: 100%;
    height: 36px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0 10px;
    font-size: 14px;
    transition: border .2s, box-shadow .2s;
}

.iu-modal textarea {
    height: 70px;
    padding: 8px;
}

/* Focus bonito */
.iu-modal input:focus,
.iu-modal select:focus,
.iu-modal textarea:focus {
    border-color: #2563eb;
    outline: none;
    box-shadow: 0 0 0 2px rgba(37,99,235,0.2);
}

/* ===== FULL WIDTH ===== */
.iu-full {
    margin-top: 16px;
}

/* ===== TABLA ===== */
.iu-table-wrap {
    margin-top: 16px;
    overflow-x: auto;
}

.iu-table-wrap table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.iu-table-wrap th,
.iu-table-wrap td {
    padding: 8px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

/* ===== BOTONES ===== */
.iu-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.iu-actions button {
    height: 36px;
    padding: 0 16px;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
}

/* ===== Botones modal alineados a la paleta ===== */

#btn_save {
    background: #164189;
    border: 1px solid #164189;
    color: #fff;
}

#btn_save:hover {
    background: #12366f;
    border-color: #12366f;
}

#btn_addnew {
    background: #0069a7;
    border: 1px solid #0069a7;
    color: #fff;
}

#btn_addnew:hover {
    background: #005a8f;
    border-color: #005a8f;
}

#btn_close {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    color: #374151;
}

#btn_close:hover {
    background: #e5e7eb;
}
#btn_close2 {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    color: #374151;
}

#btn_close2:hover {
    background: #e5e7eb;
}


div.dataTables_wrapper div.dataTables_processing{
    background: linear-gradient(
        135deg,
        #1b4ea3 0%,
        #164189 40%,
        #0e2f66 100%
    ) !important;

    color: #fff !important;
    border-radius: 12px !important;

    box-shadow:
        0 25px 80px rgba(0,0,0,.45),
        0 10px 25px rgba(0,0,0,.25) !important;
}


/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {

    .iu-modal.show {
        align-items: flex-end; /* tipo drawer (mejor UX mobile) */
    }

    .iu-modal-box {
        width: 100%;
        height: 95vh;
        max-height: 95vh;
        border-radius: 16px 16px 0 0;
    }

    .iu-tab {
        font-size: 13px;
        padding: 10px;
    }

    .iu-actions {
        flex-direction: column;
        gap: 8px;
    }

    .iu-actions button {
        width: 100%;
    }
}


