/**
 * Estilos para páginas de contenido (estadísticas, informes, datos, consultas)
 * Siguiendo el manual de estilo FMC
 */

/* === PÁGINAS DE CONTENIDO === */
.estadisticas,
.informes,
.datos-trimestrales,
.consultas {
    background: var(--fmc-bg-secondary);
    min-height: calc(100vh - 200px);
    padding: var(--fmc-spacing-md);
}

/* === HEADER DE PÁGINA === */
.page-header {
    background: var(--fmc-bg-primary);
    padding: var(--fmc-spacing-md);
    margin-bottom: var(--fmc-spacing-lg);
    border-bottom: 1px solid var(--fmc-border-color);
    text-align: left;
}

.page-header h1 {
    color: var(--fmc-primary);
    margin: 0;
    font-weight: 600;
    font-size: var(--fmc-font-size-xl);
    display: flex;
    align-items: center;
    gap: var(--fmc-spacing-sm);
}

.page-header h1::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.8em;
}

.estadisticas .page-header h1::before {
    content: '\f080';
    color: var(--fmc-info);
}

.informes .page-header h1::before {
    content: '\f15c';
    color: var(--fmc-success);
}

.datos-trimestrales .page-header h1::before {
    content: '\f1c0';
    color: var(--fmc-warning);
}

.consultas .page-header h1::before {
    content: '\f002';
    color: var(--fmc-secondary);
}

/* === TARJETA DE CONTENIDO === */
.content-card {
    background: var(--fmc-bg-primary);
    border-radius: var(--fmc-radius-md);
    box-shadow: var(--fmc-shadow);
    padding: var(--fmc-spacing-2xl);
    margin-bottom: var(--fmc-spacing-xl);
    position: relative;
    overflow: hidden;
}

.content-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(30, 58, 138, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

/* === ALERTAS MEJORADAS === */
.alert {
    border-radius: var(--fmc-radius);
    border: none;
    margin-bottom: var(--fmc-spacing-xl);
    padding: var(--fmc-spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--fmc-spacing-md);
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: currentColor;
}

.alert-info {
    background-color: #e0f2fe;
    color: #0c4a6e;
    border-left: 4px solid var(--fmc-info);
}

.alert-info i {
    color: var(--fmc-info);
    font-size: var(--fmc-font-size-xl);
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border-left: 4px solid var(--fmc-warning);
}

.alert-warning i {
    color: var(--fmc-warning);
    font-size: var(--fmc-font-size-xl);
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--fmc-success);
}

.alert-success i {
    color: var(--fmc-success);
    font-size: var(--fmc-font-size-xl);
}

/* === GRID DE TARJETAS === */
.row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--fmc-spacing-lg);
    margin-bottom: var(--fmc-spacing-xl);
}

.row.mt-4 {
    margin-top: var(--fmc-spacing-xl);
}

.col-md-6 {
    /* Grid item - no necesita estilos específicos */
}

/* === TARJETAS DE FUNCIONALIDAD === */
.card {
    background: var(--fmc-bg-primary);
    border: 1px solid var(--fmc-border-color);
    border-radius: var(--fmc-radius-md);
    box-shadow: var(--fmc-shadow);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(30, 58, 138, 0.03), transparent);
    transition: left 0.5s ease;
}

.card:hover::before {
    left: 100%;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--fmc-shadow-lg);
    border-color: var(--fmc-primary);
}

.card-header {
    background: var(--fmc-bg-secondary);
    border-bottom: 1px solid var(--fmc-border-color);
    padding: var(--fmc-spacing-lg);
    position: relative;
    z-index: 2;
}

.card-header h5 {
    margin: 0;
    color: var(--fmc-text-light);
    font-weight: 600;
    font-size: var(--fmc-font-size-lg);
    display: flex;
    align-items: center;
    gap: var(--fmc-spacing-sm);
}

.card-header h5 i {
    color: var(--fmc-primary);
    font-size: var(--fmc-font-size-xl);
}

.card-body {
    padding: var(--fmc-spacing-xl);
    position: relative;
    z-index: 2;
}

.card-body p {
    color: var(--fmc-text-secondary);
    margin-bottom: var(--fmc-spacing-lg);
    line-height: 1.6;
}

/* === BOTONES EN TARJETAS === */
.card-body .fmc-btn {
    width: 100%;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.card-body .fmc-btn:disabled {
    background-color: var(--fmc-text-muted);
    border-color: var(--fmc-text-muted);
    color: var(--fmc-text-light);
    cursor: not-allowed;
    opacity: 0.7;
}

.card-body .fmc-btn:disabled::after {
    content: '';
    position: absolute;
    top: 50%;
    right: var(--fmc-spacing-md);
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>') no-repeat center;
    background-size: contain;
    opacity: 0.7;
}

/* === COLORES ESPECÍFICOS POR TIPO === */
.estadisticas .card:nth-child(1) .card-header h5 i {
    color: var(--fmc-info);
}

.estadisticas .card:nth-child(2) .card-header h5 i {
    color: var(--fmc-success);
}

.estadisticas .card:nth-child(3) .card-header h5 i {
    color: var(--fmc-warning);
}

.estadisticas .card:nth-child(4) .card-header h5 i {
    color: var(--fmc-danger);
}

.informes .card:nth-child(1) .card-header h5 i {
    color: var(--fmc-primary);
}

.informes .card:nth-child(2) .card-header h5 i {
    color: var(--fmc-secondary);
}

.informes .card:nth-child(3) .card-header h5 i {
    color: var(--fmc-info);
}

.informes .card:nth-child(4) .card-header h5 i {
    color: var(--fmc-success);
}

/* === ESTADOS DE DESARROLLO === */
.development-notice {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid var(--fmc-warning);
    border-radius: var(--fmc-radius);
    padding: var(--fmc-spacing-lg);
    margin-bottom: var(--fmc-spacing-xl);
    display: flex;
    align-items: center;
    gap: var(--fmc-spacing-md);
    color: #92400e;
}

.development-notice i {
    font-size: var(--fmc-font-size-xl);
    color: var(--fmc-warning);
}

/* === RESPONSIVE === */
@media (max-width: 1200px) {
    .row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 991.98px) {

    .estadisticas,
    .informes,
    .datos-trimestrales,
    .consultas {
        padding: var(--fmc-spacing-lg);
    }

    .page-header {
        padding: var(--fmc-spacing-xl);
    }

    .page-header h1 {
        font-size: var(--fmc-font-size-2xl);
    }

    .content-card {
        padding: var(--fmc-spacing-xl);
    }
}

@media (max-width: 767.98px) {
    .row {
        grid-template-columns: 1fr;
    }

    .page-header {
        padding: var(--fmc-spacing-lg);
    }

    .page-header h1 {
        font-size: var(--fmc-font-size-xl);
        flex-direction: column;
        gap: var(--fmc-spacing-sm);
    }

    .content-card {
        padding: var(--fmc-spacing-lg);
    }

    .alert {
        flex-direction: column;
        text-align: center;
        gap: var(--fmc-spacing-sm);
    }
}

@media (max-width: 575.98px) {

    .estadisticas,
    .informes,
    .datos-trimestrales,
    .consultas {
        padding: var(--fmc-spacing-md);
    }

    .page-header {
        padding: var(--fmc-spacing-md);
    }

    .content-card {
        padding: var(--fmc-spacing-md);
    }

    .card-header {
        padding: var(--fmc-spacing-md);
    }

    .card-body {
        padding: var(--fmc-spacing-lg);
    }
}

/* === ANIMACIONES === */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: slideInUp 0.6s ease-out;
}

.card:nth-child(1) {
    animation-delay: 0.1s;
}

.card:nth-child(2) {
    animation-delay: 0.2s;
}

.card:nth-child(3) {
    animation-delay: 0.3s;
}

.card:nth-child(4) {
    animation-delay: 0.4s;
}

.content-card {
    animation: slideInUp 0.6s ease-out;
}

.page-header {
    animation: slideInUp 0.6s ease-out;
}

/* === ACCESIBILIDAD === */
@media (prefers-reduced-motion: reduce) {

    .card,
    .content-card,
    .page-header {
        animation: none;
    }

    .card:hover {
        transform: none;
    }

    .card::before {
        display: none;
    }
}

/* === MODO OSCURO (PREPARADO PARA FUTURO) === */
@media (prefers-color-scheme: dark) {
    /* Los estilos se mantendrán con las variables CSS FMC */
}