
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #3f8edd;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    color: #333;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}


header {
    background: var(--primary-color);
    color: var(--light-color);
    padding: 20px 0;
    margin-bottom: 30px;
    border-radius: 5px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-logos {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    height: 60px;
    width: auto;
    object-fit: contain;
}

header h1 {
    margin: 0;
    font-size: 1.8em;
    flex-grow: 1;
    padding: 0 20px;
}

header h2 {
    margin: 10px 0 0;
    font-size: 1.2em;
    font-weight: 300;
    color: var(--light-color);
}


.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.stat-icon {
    font-size: 2.5em;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.stat-card h3 {
    color: var(--primary-color);
    margin: 0 0 10px;
    font-size: 1.2em;
}

.stat-value {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--primary-color);
    margin: 10px 0;
}

.stat-card p {
    color: #7f8c8d;
    margin: 5px 0 0;
    font-size: 0.9em;
}


.chart-section {
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}


.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
    margin: 0 auto;
    max-width: 800px; 
}

.chart-section h2 {
    text-align: center;
}

.search {
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.search h2 {
    color: var(--primary-color);
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-top: 0;
}

form {
    display: flex;
    flex-direction: column;
    max-width: 400px;
    margin: 20px auto;
}

label {
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--primary-color);
}

input[type="date"] {
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
}

button {
    padding: 12px 20px;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition:background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

button:hover {
    background: #2980b9;
}

.result {
    margin-top: 20px;
    padding: 15px;
    background: #e8f4fc;
    border-left: 4px solid var(--secondary-color);
    border-radius: 4px;
}

/* Tabla de historial */
.history {
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table, th, td {
    border: 1px solid #ddd;
}

th, td {
    padding: 12px 15px;
    text-align: left;
}

th {
    background-color: var(--primary-color);
    color: white;
}

tr:nth-child(even) {
    background-color: #f8f9fa;
}

tr:hover {
    background-color: #f1f1f1;
}

.trend-cell {
    text-align: center;
}

.trend-up {
    color: var(--success-color);
}

.trend-down {
    color: var(--danger-color);
}

.trend-equal {
    color: var(--warning-color);
}


footer {
    background: var(--primary-color);
    color: white;
    padding: 25px 0;
    margin-top: 50px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.footer-info {
    flex: 1;
    min-width: 250px;
}

footer p {
    margin: 8px 0;
    color: var(--light-color);
}

.footer-logos {
    display: flex;
    gap: 20px;
    align-items: center;
}

.footer-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
}


@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 10px;
    }
    
    .header-logos {
        flex-direction: column;
        gap: 15px;
    }
    
    .logo {
        height: 50px;
    }
    
    header h1 {
        font-size: 1.5em;
        padding: 10px 0;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-value {
        font-size: 2em;
    }
    
    .chart-container {
        height: 250px;
    }
    
    th, td {
        padding: 8px 10px;
        font-size: 0.9em;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .footer-logos {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 1.3em;
    }
    
    header h2 {
        font-size: 1em;
    }
    
    form {
        width: 100%;
    }
    
}


.search-form {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.search-form h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5em;
    text-align: center;
}

.filtros-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: space-between;
    margin-top: 1rem;
}


.filtro-group {
    flex: 1 1 250px;
    min-width: 250px;
    background-color: #f9f9f9;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.filtro-group h3 {
    margin-top: 0;
    font-size: 1.25rem;
    color: #2c3e50;
}

.filtro-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.filtro-group input,
.filtro-group select {
    width: 100%;
    padding: 0.5rem;
    font-size: 1rem;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.filtro-group input:focus,
.filtro-group select:focus {
    border-color: var(--secondary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.form-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
}

.btn-buscar,
.btn-reset {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.btn-buscar {
    background-color: #3498db;
    color: white;
}
.btn-buscar:hover {
    background-color: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-reset {
    background-color: #2980b9;
    color: white;
}

.btn-reset:hover {
    background-color: #e67e22;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.resultado-filtro {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    margin-bottom: 40px;
    margin-top: 20px;
}

.resultado-filtro h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5em;
}

@media (max-width: 768px) {
    .filtros-container {
        flex-direction: column;
    }

    .form-actions {
        flex-direction: column;
        gap: 10px;
    }

    .btn-buscar, .btn-reset {
        width: 100%;
    }
}