/* ===== DASHBOARD STYLES ===== */

/* === HEADER DEL DASHBOARD === */
.dashboard-header {
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    padding: 2rem;
    border-radius: 15px;
    color: white;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.3);
}

.dashboard-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
}

.dashboard-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
}

.dashboard-actions {
    display: flex;
    align-items: center;
}

/* === ESTADÍSTICAS === */
.stats-row {
    margin-top: 2rem;
}

.stats-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.stats-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.5rem;
    color: white;
}

.card-eventos .stats-icon {
    background: linear-gradient(135deg, #0ea5e9, #06b6d4);
}

.card-pruebas .stats-icon {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.card-categorias .stats-icon {
    background: linear-gradient(135deg, #10b981, #059669);
}

.card-etapas .stats-icon {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.stats-number {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    color: #2c3e50;
}

.stats-label {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin: 0;
    font-weight: 500;
}

/* === ACCIONES RÁPIDAS === */
.quick-actions-horizontal {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.quick-action-horizontal {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    background: white;
}

.quick-action-horizontal:hover {
    background: #f9fafb;
    border-color: #0ea5e9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
    text-decoration: none;
    color: inherit;
}

.quick-action-horizontal .quick-action-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #0ea5e9, #06b6d4);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.quick-action-horizontal .quick-action-content h6 {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 2px 0;
    color: #374151;
}

.quick-action-horizontal .quick-action-content p {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.3;
}

/* === TARJETAS DEL DASHBOARD === */
.dashboard-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border: none;
    overflow: hidden;
}

.card-header-modern {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-bottom: 1px solid #dee2e6;
    padding: 1.25rem 1.5rem;
    border-radius: 12px 12px 0 0;
}

.card-title-modern {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    display: flex;
    align-items: center;
}

.card-body-modern {
    padding: 1.5rem;
}

.calendar-period {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

/* === PANELES LATERALES === */
.card-title-small {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    display: flex;
    align-items: center;
}

.card-body-compact {
    padding: 0.75rem;
}

.filter-label-small {
    font-size: 0.75rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.25rem;
    display: block;
}

.filter-buttons-small {
    display: flex;
    gap: 2px;
}

.filter-btn-small {
    flex: 1;
    padding: 4px 8px;
    border: 1px solid #dee2e6;
    background: white;
    color: #495057;
    border-radius: 4px;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn-small:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

.filter-btn-small.active {
    background: linear-gradient(135deg, #0ea5e9, #06b6d4);
    color: white;
    border-color: transparent;
}

.upcoming-events {
    max-height: 300px;
    overflow-y: auto;
}

.upcoming-event {
    padding: 0.5rem;
    border-bottom: 1px solid #eee;
    transition: all 0.2s ease;
}

.upcoming-event:hover {
    background: #f8f9fa;
}

.upcoming-event:last-child {
    border-bottom: none;
}

.event-date {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 2px;
}

.event-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.8rem;
    margin-bottom: 2px;
    line-height: 1.2;
}

.event-location {
    font-size: 0.7rem;
    color: #7f8c8d;
}

.days-badge {
    background: linear-gradient(135deg, #0ea5e9, #06b6d4);
    color: white;
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 600;
}

/* === CALENDARIO === */
.calendar-controls {
    display: flex;
    align-items: center;
}

.calendar-table {
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.calendar-table th {
    background: #f8f9fa;
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    color: #495057;
    border: 1px solid #dee2e6;
    font-size: 0.85rem;
}

.calendar-table td {
    min-height: 140px;
    width: 11.11%;
    border: 1px solid #dee2e6;
    padding: 6px;
    vertical-align: top;
    background: white;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.calendar-table td:hover {
    background: #f8f9fa;
}

.calendar-table td.otro-mes {
    background: #f8f9fa;
    color: #adb5bd;
}

.calendar-table td.hoy {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 2px solid #ffc107;
    font-weight: bold;
}

.calendar-table td.seleccionado {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border: 2px solid #2196f3;
}

.dia-numero {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 4px;
    color: #495057;
}

.eventos-dia {
    min-height: 110px;
    overflow: visible;
}

.evento-item {
    font-size: 0.85rem;
    padding: 4px 8px;
    margin: 3px 0;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.3;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    font-weight: 500;
    min-height: 22px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.evento-nombre {
    font-weight: 600;
    font-size: 0.8rem;
    line-height: 1.2;
    margin-bottom: 2px;
}

.evento-info {
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.9;
    line-height: 1.2;
}

.evento-division {
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0.8;
    margin-top: 1px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.evento-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
    filter: brightness(1.1);
}

/* === EVENTOS DETALLADOS EN VISTA SEMESTRAL === */
.evento-item-detallado {
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.evento-item-detallado:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
    filter: brightness(1.1);
}

.evento-nombre-detallado {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
    margin-bottom: 4px;
}

.evento-info-detallado {
    font-size: 0.9rem;
    font-weight: 400;
    opacity: 0.9;
    line-height: 1.2;
    margin-bottom: 3px;
}

.evento-division-detallado {
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 3px;
}

.evento-fecha-detallado {
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0.85;
    text-align: right;
    margin-top: 3px;
}

/* === EVENTOS COMPACTOS EN VISTA ANUAL === */
.evento-item-compacto {
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.evento-item-compacto:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
    filter: brightness(1.1);
}

.evento-nombre-compacto {
    font-weight: 600;
    font-size: 0.85rem;
    line-height: 1.2;
    margin-bottom: 2px;
}

.evento-info-compacto {
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0.9;
    line-height: 1.2;
    margin-bottom: 2px;
}

.evento-division-compacto {
    font-size: 0.7rem;
    font-weight: 500;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    margin-bottom: 2px;
}

.evento-fecha-compacto {
    font-size: 0.65rem;
    font-weight: 600;
    opacity: 0.85;
    text-align: right;
}



/* === MINI CALENDARIOS === */
.mini-calendario {
    cursor: pointer;
    transition: all 0.2s ease;
}

.mini-calendario:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mini-calendario .card-header {
    background: linear-gradient(135deg, #0ea5e9, #06b6d4);
    color: white;
    border: none;
}

/* === DETALLES DE EVENTOS === */
.event-detail-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.2s ease;
}

.event-detail-card:hover {
    background: #e9ecef;
    border-color: #0ea5e9;
}

/* === EFECTOS Y ANIMACIONES === */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.dashboard-card {
    animation: fadeIn 0.6s ease-out;
}

.stats-card {
    animation: fadeIn 0.6s ease-out;
}

/* === SCROLLBARS === */
.upcoming-events::-webkit-scrollbar,
.eventos-dia::-webkit-scrollbar {
    width: 4px;
}

.upcoming-events::-webkit-scrollbar-track,
.eventos-dia::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.upcoming-events::-webkit-scrollbar-thumb,
.eventos-dia::-webkit-scrollbar-thumb {
    background: #0ea5e9;
    border-radius: 2px;
}

.upcoming-events::-webkit-scrollbar-thumb:hover,
.eventos-dia::-webkit-scrollbar-thumb:hover {
    background: #0284c7;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .dashboard-title {
        font-size: 2rem;
    }

    .stats-card {
        flex-direction: column;
        text-align: center;
    }

    .stats-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }

    .calendar-table td {
        height: 80px;
        font-size: 0.8rem;
    }

    .filter-buttons-small {
        flex-direction: column;
    }

    .quick-actions-horizontal {
        grid-template-columns: 1fr;
    }
}

/* === FERIADOS (Fechas Patrias) === */
.calendar-table td.feriado {
    background: linear-gradient(135deg, #fee2e2, #fecaca) !important;
    border-color: #f87171;
}

.calendar-table td.feriado:hover {
    background: linear-gradient(135deg, #fecaca, #fca5a5) !important;
}

.calendar-table td.feriado.hoy {
    background: linear-gradient(135deg, #fde68a, #fecaca) !important;
    border-color: #f87171;
}

.calendar-table td.feriado .dia-numero {
    color: #dc2626;
    display: flex;
    align-items: center;
}

.feriado-nombre {
    font-size: 0.7rem;
    color: white;
    font-weight: 600;
    padding: 2px 6px;
    background: #dc2626;
    border-radius: 4px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}