/* static/home/css/dashboard.css */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

:root {
    /* Paleta de Colores Profesional */
    --primary-color: #4e73df;       /* Azul corporativo */
    --primary-light: #eef2ff;       /* Azul muy suave para fondos */
    --secondary-text: #858796;      /* Gris para textos secundarios */
    --dark-text: #2c3e50;           /* Gris oscuro para títulos */
    --success-color: #1cc88a;
    --bg-body: #f8f9fc;             /* Fondo general gris muy claro */
    --card-bg: #ffffff;

    /* Efectos */
    --card-radius: 1rem;            /* Bordes más redondeados (16px) */
    --card-shadow: 0 .15rem 1.75rem 0 rgba(58, 59, 69, 0.15); /* Sombra suave */
    --transition-speed: 0.3s;
}

body {
    background-color: var(--bg-body);
    font-family: 'Inter', sans-serif;
    color: #5a5c69;
}

/* --- TARJETAS KPI (Key Performance Indicators) --- */
.kpi-card {
    background: var(--card-bg);
    border: none;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    transition: transform var(--transition-speed) ease;
    height: 100%;
    position: relative;
    overflow: hidden;
    border-left: 4px solid var(--primary-color); /* Detalle de color lateral */
}

.kpi-card:hover {
    transform: translateY(-5px);
}

.kpi-icon-wrapper {
    background-color: var(--primary-light);
    color: var(--primary-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin: 0 auto 10px auto;
}

.kpi-value {
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--dark-text);
    line-height: 1.2;
}

.kpi-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--secondary-text);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- CONTENEDORES DE GRÁFICOS Y TABLAS --- */
.content-card {
    background: var(--card-bg);
    border: none;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
}

.content-card-header {
    background-color: transparent;
    border-bottom: 1px solid #e3e6f0;
    padding: 1rem 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- TABLA --- */
.custom-table thead th {
    background-color: var(--primary-light);
    color: var(--primary-color);
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.custom-table tbody td {
    border-top: 1px solid #e3e6f0;
    vertical-align: middle;
    font-size: 0.85rem;
}

.custom-table tbody tr:hover {
    background-color: #fafafa;
}

/* --- GRÁFICOS --- */
.chart-canvas {
    width: 100%;
    height: 350px;
    min-height: 350px;
}

/* --- SIDEBAR DE FILTROS --- */
.filter-sidebar {
    background: var(--card-bg);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    padding: 1.5rem;
    position: sticky;
    top: 6rem;
}

.filter-title {
    color: var(--dark-text);
    font-weight: 700;
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.filter-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--secondary-text);
    margin-bottom: 0.25rem;
}

.form-control, .form-select {
    border-radius: 0.5rem;
    border: 1px solid #d1d3e2;
    font-size: 0.9rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

.btn-primary-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-primary-custom:hover {
    background-color: #2e59d9;
    transform: scale(1.02);
}

/* --- PAGINACIÓN --- */
.page-link-custom {
    color: var(--primary-color);
    border: 1px solid #dddfeb;
    margin: 0 2px;
    border-radius: 5px;
}

.page-link-custom:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}