/* ==========================================================================
   Dashboard CSS - Visor360, Stats Cards, Charts
   ========================================================================== */

/* KPI Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.kpi-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--color-primary);
}

.kpi-card h3 {
    font-size: 14px;
    color: var(--color-gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.kpi-card .value {
    font-size: 36px;
    font-weight: bold;
    color: var(--color-gray-800);
    margin-bottom: 5px;
}

.kpi-card .subvalue {
    font-size: 14px;
    color: var(--color-gray-500);
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.chart-container {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

.chart-container h3 {
    font-size: 18px;
    color: var(--color-gray-800);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.chart-wrapper {
    position: relative;
    height: 300px;
}

/* Ranking Table */
.ranking-table {
    width: 100%;
    margin-top: 10px;
}

.ranking-table th,
.ranking-table td {
    padding: 12px;
    text-align: left;
}

.ranking-table tr:nth-child(1) td:first-child {
    color: #FFD700;
    font-weight: bold;
}

.ranking-table tr:nth-child(2) td:first-child {
    color: #C0C0C0;
    font-weight: bold;
}

.ranking-table tr:nth-child(3) td:first-child {
    color: #CD7F32;
    font-weight: bold;
}

/* Data Table */
.data-table tfoot td {
    border-top: 2px solid var(--color-gray-400);
    background: var(--color-gray-100);
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 5px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s;
}

/* Badge Vigor/Ganado/Perdido */
.badge-vigor {
    background: #e3f2fd;
    color: #1976d2;
}

.badge-ganado {
    background: #e8f5e9;
    color: #388e3c;
}

.badge-perdido {
    background: #ffebee;
    color: #d32f2f;
}

/* Botones Periodo (Ayer/Hoy) */
.btn-periodo-group {
    display: flex;
    gap: 10px;
}

.btn-periodo {
    padding: 8px 20px;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s, transform 0.1s;
}

.btn-periodo:hover {
    opacity: 0.8;
    transform: scale(1.03);
}

.btn-periodo.active {
    opacity: 1;
}

.btn-periodo-ayer {
    background: #e67e22;
}

.btn-periodo-hoy {
    background: #27ae60;
}
