/* Estilos para el dashboard del admin */

/* Cards principales */
.dashboard-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Cards de estadísticas */
.stats-card {
    background: #6c757d;
    color: white;
    position: relative;
    overflow: hidden;
    min-height: 120px;
}

.stats-card.consolidated {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
}

.stats-card.success {
    background: linear-gradient(135deg, #52a968 0%, #28a745 100%);
}

.stats-card.warning {
    background: linear-gradient(135deg, #e6a85c 0%, #ffc107 100%);
}

.stats-card.danger {
    background: linear-gradient(135deg, #d9746a 0%, #dc3545 100%);
}

.stats-card.info {
    background: linear-gradient(135deg, #6db4c4 0%, #17a2b8 100%);
}

.stats-card.primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(30px, -30px);
}

.stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stats-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0;
    font-weight: 500;
}

.stats-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    opacity: 0.3;
}

.stats-extra {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 0.5rem;
}

/* Encabezado del dashboard */
.dashboard-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.dashboard-title {
    color: #495057;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.dashboard-subtitle {
    color: #6c757d;
    margin-bottom: 0;
}

.dashboard-date {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Títulos de sección */
.section-title {
    color: #495057;
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
    padding-left: 20px;
    font-size: 1.25rem;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: #007bff;
    border-radius: 2px;
}

/* Tablas */
.dashboard-table {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dashboard-table thead th {
    background: #f8f9fa;
    border: none;
    font-weight: 600;
    color: #495057;
    padding: 1rem 0.75rem;
    white-space: nowrap;
}

.dashboard-table tbody td {
    padding: 0.75rem;
    border-color: #e9ecef;
    vertical-align: middle;
}

.dashboard-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Badges de estado */
.badge-status {
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.badge-pendiente {
    background-color: #ffc107;
    color: #212529;
}

.badge-en-proceso {
    background-color: #17a2b8;
    color: white;
}

.badge-completada {
    background-color: #28a745;
    color: white;
}

.badge-cerrada {
    background-color: #6c757d;
    color: white;
}

.badge-urgente {
    background-color: #dc3545;
    color: white;
}

/* Items urgentes */
.urgente-item {
    border-left: 4px solid #dc3545;
    background: rgba(220, 53, 69, 0.1);
    padding: 1rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 0.75rem;
}

.urgente-item:hover {
    background: rgba(220, 53, 69, 0.15);
}

/* Ranking de gestores */
.gestor-ranking {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background: #f8f9fa;
    transition: all 0.2s ease;
    border: 1px solid #e9ecef;
}

.gestor-ranking:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.ranking-number {
    background: #007bff;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: 1rem;
    font-size: 0.9rem;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.ranking-number.first {
    background: #ffc107;
    color: #212529;
}

.ranking-number.second {
    background: #6c757d;
    color: white;
}

.ranking-number.third {
    background: #dc3545;
    color: white;
}

.gestor-info {
    flex: 1;
}

.gestor-name {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.25rem;
}

.gestor-stats {
    color: #6c757d;
    font-size: 0.875rem;
}

/* Gráficos */
.chart-container {
    position: relative;
    height: 300px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Enlaces de acción rápida */
.quick-action {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.quick-action:hover {
    background: #0056b3;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

.quick-action i {
    margin-right: 0.5rem;
}

/* Responsividad */
@media (max-width: 768px) {
    .stats-number {
        font-size: 2rem;
    }
    
    .stats-icon {
        font-size: 1.5rem;
        top: 15px;
        right: 15px;
    }
    
    .section-title {
        font-size: 1.1rem;
        padding-left: 15px;
    }
    
    .section-title::before {
        height: 20px;
        width: 3px;
    }
    
    .dashboard-table {
        font-size: 0.875rem;
    }
    
    .gestor-ranking {
        padding: 0.75rem;
    }
    
    .ranking-number {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    
    .chart-container {
        height: 250px;
        padding: 15px;
    }
}

@media (max-width: 576px) {
    .stats-card {
        min-height: 100px;
    }
    
    .stats-number {
        font-size: 1.8rem;
    }
    
    .dashboard-header {
        text-align: center;
    }
    
    .dashboard-table thead th:nth-child(n+4),
    .dashboard-table tbody td:nth-child(n+4) {
        display: none;
    }
}
