/* 
 * usr.css - Estilos exclusivos para el módulo de usuarios
 * No afecta a otros módulos
 */

/* Badges personalizados */
.badge.badge-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}
.badge.badge-success {
    background: linear-gradient(135deg, #28a745, #218838);
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}
.badge.badge-info {
    background: linear-gradient(135deg, #17a2b8, #138496);
    box-shadow: 0 2px 4px rgba(23, 162, 184, 0.3);
}
.badge.badge-secondary {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.3);
}

/* Efecto hover en filas de tabla */
#tblUsuarios tbody tr {
    transition: all 0.2s ease;
}
#tblUsuarios tbody tr:hover {
    transform: scale(1.01);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: rgba(64, 140, 188, 0.05) !important;
}

/* Animación para el FAB */
.fab-container .btn {
    transition:
        transform 0.2s,
        box-shadow 0.2s;
}
.fab-container .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2) !important;
}

/* Estilo para el dropdown de acciones */
.dropdown-menu {
    border: none;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
}
.dropdown-item {
    padding: 8px 16px;
    font-size: 14px;
    transition: background 0.2s;
}
.dropdown-item i {
    width: 20px;
    text-align: center;
}

/* Overlay de carga en modales */
.modal .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    border-radius: 0.3rem;
}

/* ============================================
FILAS INACTIVAS (usr_swt = '0')
============================================ */
#tblUsuarios tbody tr.row-inactive {
    background-color: rgba(220, 53, 69, 0.12) !important;
    border-left: 4px solid #dc3545;
}
#tblUsuarios tbody tr.row-inactive:hover {
    background-color: rgba(220, 53, 69, 0.22) !important;
}
#tblUsuarios tbody tr.row-inactive td {
    color: #721c24;
    opacity: 0.85;
}

/* ============================================
MODAL UNIFICADO USR (Estilo Fieldsets Elegantes)
============================================ */
#mdlUsr .modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}
#mdlUsr .modal-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    padding: 1.2rem 1.5rem;
    border-bottom: none;
}
#mdlUsr .modal-header .close {
    opacity: 0.85;
    margin-top: -8px;
    text-shadow: none;
}
#mdlUsr .modal-header .close:hover {
    opacity: 1;
}

/* Fieldsets */
.usr-fieldset {
    border: 2px solid #e9ecef;
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 24px;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.03),
        inset 0 2px 4px rgba(255, 255, 255, 0.9);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}
.usr-fieldset::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007bff, #66b0ff, #007bff);
    opacity: 0.85;
}
.usr-fieldset:hover {
    border-color: #007bff;
    box-shadow:
        0 15px 35px rgba(0, 123, 255, 0.12),
        inset 0 2px 4px rgba(255, 255, 255, 1);
    transform: translateY(-2px);
}
.usr-legend {
    width: auto;
    padding: 0 16px;
    margin-left: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #007bff;
    background: #fff;
    border-radius: 30px;
    border: 1px solid #e0e5ec;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.04);
    letter-spacing: 0.4px;
    text-transform: uppercase;
    transition: all 0.3s ease;
}
.usr-legend i {
    margin-right: 8px;
    color: #0056b3;
}
.usr-fieldset:hover .usr-legend {
    border-color: #007bff;
    color: #007bff;
    box-shadow: 0 5px 12px rgba(0, 123, 255, 0.12);
}

/* Inputs & Controles */
#mdlUsr .form-control,
#mdlUsr .select2-container .select2-selection--single {
    border-radius: 10px;
    border: 1px solid #dee2e6;
    padding: 0.65rem 0.8rem;
    font-size: 0.95rem;
    transition:
        border-color 0.2s,
        box-shadow 0.2s;
    background-color: #fcfcfd;
}
#mdlUsr .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
    background-color: #fff;
}
#mdlUsr .btn {
    border-radius: 10px;
    font-weight: 500;
    padding: 0.55rem 1.1rem;
    transition:
        transform 0.15s,
        box-shadow 0.2s;
}
#mdlUsr .btn:active {
    transform: scale(0.97);
}
