/* Mejoras para tablas y contenido principal */

/* Contenedor principal mejorado */
.main-content {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    transition: margin-left 0.3s ease;
}

.main-content.sidebar-collapsed {
    margin-left: 70px;
    margin-right: auto;
}

/* Mejoras para tablas */
.table-responsive {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    margin: 1rem 0;
}

.table {
    margin-bottom: 0;
    font-size: 1rem;
}

.table thead th {
    background: linear-gradient(135deg, #d83141 0%, #b02a37 100%);
    color: white;
    font-weight: 600;
    font-size: 1.05rem;
    padding: 1rem 1.5rem;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody td {
    padding: 1rem 1.5rem;
    vertical-align: middle;
    border-bottom: 1px solid #e9ecef;
    font-size: 1rem;
}

.table tbody tr:hover {
    background-color: rgba(216, 49, 65, 0.1);
    transform: translateY(-1px);
    transition: all 0.3s ease;
}

/* Cards mejoradas */
.card {
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: none;
    margin-bottom: 2rem;
}

.card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.card-body {
    padding: 1.5rem;
}

/* Botones mejorados */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Contenedores de página */
.container-fluid {
    padding: 0 2rem;
    transition: margin-left 0.3s ease;
}

.container-fluid.sidebar-collapsed {
    margin-left: 70px;
    margin-right: auto;
}

/* Títulos de página */
h1, h2, h3, h4, h5, h6 {
    color: #2c3e50;
    font-weight: 600;
}

/* Formularios mejorados */
.form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Paginación mejorada */
.pagination {
    justify-content: center;
    margin-top: 2rem;
}

.page-link {
    border-radius: 8px;
    margin: 0 0.25rem;
    border: 2px solid #e9ecef;
    color: #667eea;
    font-weight: 500;
    transition: all 0.3s ease;
}

.page-link:hover {
    background-color: #667eea;
    border-color: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* Alertas mejoradas */
.alert {
    border-radius: 12px;
    border: none;
    padding: 1rem 1.5rem;
    font-weight: 500;
}

/* Responsive mejorado */
@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
        margin-left: 0 !important;
        margin-right: auto !important;
    }
    
    .container-fluid {
        padding: 0 1rem;
        margin-left: 0 !important;
        margin-right: auto !important;
    }
    
    .table thead th,
    .table tbody td {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .card-header,
    .card-body {
        padding: 1rem;
    }
}

/* Animaciones suaves */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mejoras específicas para tablas de datos */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table th {
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Estados de las filas - MANTENER COLORES ROJOS */
.table-success {
    background-color: #d4edda !important;
}

.table-warning {
    background-color: #fff3cd !important;
}

.table-danger {
    background-color: #f8d7da !important;
    color: #721c24 !important;
}

.table-info {
    background-color: #d1ecf1 !important;
}

/* Colores rojos específicos para Avantilo */
.btn-danger {
    background: linear-gradient(135deg, #ff4757 0%, #ff3838 100%) !important;
    border-color: #ff4757 !important;
    color: white !important;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #ff3838 0%, #ff4757 100%) !important;
    border-color: #ff3838 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%) !important;
    border-color: #ff4757 !important;
    color: #721c24 !important;
}

.badge-danger {
    background: linear-gradient(135deg, #ff4757 0%, #ff3838 100%) !important;
    color: white !important;
}

.text-danger {
    color: #ff4757 !important;
}

.border-danger {
    border-color: #ff4757 !important;
}

/* Centrado mejorado para contenido principal */
.main-content,
.container-fluid {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

.main-content > *,
.container-fluid > * {
    width: 100%;
    max-width: 1400px;
}
