* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #af2d2d 0%, #e85858 100%);
    min-height: 100vh;
    padding: 20px;
}


.container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.header h1 {
    font-size: 1.5rem;
    color: #333;
}

.btn-login {
    background: #667eea;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.btn-login:hover {
    background: #5a67d8;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-group input[type="file"] {
    padding: 10px;
    background: #f7fafc;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #718096;
    font-size: 12px;
}

.btn-submit {
    width: 100%;
    padding: 15px;
    background: #48bb78;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-submit:hover {
    background: #38a169;
}

/* Login styles */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.btn-back {
    display: block;
    text-align: center;
    margin-top: 15px;
    color: #667eea;
    text-decoration: none;
}

/* Dashboard styles */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 20px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.user-info {
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn-logout {
    background: #e53e3e;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 8px;
}

.filters {
    background: #f7fafc;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.filter-form {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 150px;
}

.filter-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
}

.btn-filter, .btn-clear {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-filter {
    background: #667eea;
    color: white;
}

.btn-clear {
    background: #cbd5e0;
    color: #333;
}

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

th {
    background: #f7fafc;
    font-weight: 600;
}

tr:hover {
    background: #f7fafc;
}

.alert {
    padding: 15px;
    background: #c6f6d5;
    color: #22543d;
    border-radius: 10px;
    margin-bottom: 20px;
}
/* Agregar estos estilos a los existentes */

.btn-stats {
    background: #ed8936;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.3s;
}

.btn-stats:hover {
    background: #dd6b20;
}

.btn-back-dash {
    background: #4299e1;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.3s;
}

.btn-back-dash:hover {
    background: #3182ce;
}

.btn-view {
    background: #667eea;
    color: white;
    padding: 5px 10px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 12px;
    display: inline-block;
}

.btn-view:hover {
    background: #5a67d8;
}

/* Estadísticas */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

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

.stat-icon {
    font-size: 48px;
}

.stat-info h3 {
    font-size: 32px;
    margin: 0;
    font-weight: bold;
}

.stat-info p {
    margin: 5px 0 0;
    opacity: 0.9;
    font-size: 14px;
}

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

.chart-card {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

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

.chart-card h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.2rem;
    text-align: center;
}

.chart-card canvas {
    max-height: 400px;
    width: 100% !important;
}

.full-width {
    grid-column: 1 / -1;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.data-table th {
    background: #f7fafc;
    font-weight: 600;
    color: #333;
}

.data-table tr:hover {
    background: #f7fafc;
}

/* Responsive */
@media (max-width: 768px) {
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .chart-card {
        padding: 15px;
    }
    
    .chart-card canvas {
        max-height: 300px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-icon {
        font-size: 36px;
    }
    
    .stat-info h3 {
        font-size: 24px;
    }
    
    .btn-view {
        font-size: 10px;
        padding: 3px 8px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .dashboard-header {
        flex-direction: column;
        text-align: center;
    }
    
    .user-info {
        flex-direction: column;
        width: 100%;
    }
    
    .user-info a {
        width: 100%;
        text-align: center;
    }
    
    .filter-form {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .btn-filter,
    .btn-clear {
        width: 100%;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container, .dashboard-container {
        padding: 15px;
    }
    
    .header {
        flex-direction: column;
        text-align: center;
    }
    
    .filter-form {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    th, td {
        padding: 8px;
        font-size: 14px;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 15px;
    }
}