/* Racingstyle - Estilos principales */
.racingstyle-form-ingreso,
.racingstyle-panel-analisis {
    max-width: 1000px;
    margin: 20px auto;
    padding: 30px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.racingstyle-form-ingreso h2,
.racingstyle-panel-analisis h2 {
    color: #2c3e50;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
    margin-bottom: 30px;
}

/* Formularios */
.rs-form-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 4px solid #3498db;
}

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

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

.rs-form-group input,
.rs-form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
}

.rs-form-group input:focus,
.rs-form-group select:focus {
    outline: none;
    border-color: #3498db;
}

.rs-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Botones */
.rs-btn-primary,
.rs-btn-secondary,
.rs-btn-outline,
.rs-btn-small,
.rs-btn-danger {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.rs-btn-primary {
    background: #3498db;
    color: white;
}

.rs-btn-primary:hover {
    background: #2980b9;
}

.rs-btn-secondary {
    background: #95a5a6;
    color: white;
}

.rs-btn-secondary:hover {
    background: #7f8c8d;
}

.rs-btn-outline {
    background: transparent;
    border: 2px solid #bdc3c7;
    color: #7f8c8d;
}

.rs-btn-small {
    padding: 8px 16px;
    font-size: 12px;
}

.rs-btn-danger {
    background: #e74c3c;
    color: white;
}

.rs-form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* Mensajes */
.rs-mensaje {
    padding: 15px;
    border-radius: 6px;
    margin-top: 20px;
    font-weight: 600;
}

.rs-mensaje.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.rs-mensaje.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Panel de Análisis */
.rs-filtros-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.rs-filtros-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.rs-filtros-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

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

.rs-estadistica-item {
    background: white;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-top: 4px solid #3498db;
}

.rs-estadistica-item.rs-estadistica-oferta {
    border-top-color: #e74c3c;
}

.rs-estadistica-valor {
    font-size: 2em;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.rs-estadistica-label {
    color: #7f8c8d;
    font-size: 14px;
    font-weight: 600;
}

/* Tabla de resultados */
.rs-tabla-resultados {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.rs-tabla-resultados th {
    background: #34495e;
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.rs-tabla-resultados td {
    padding: 15px;
    border-bottom: 1px solid #ecf0f1;
}

.rs-tabla-resultados tr:hover {
    background: #f8f9fa;
}

.rs-tabla-resultados tr.rs-fila-oferta {
    background: #fff3cd;
}

/* Progress bar */
.rs-progress-bar {
    background: #ecf0f1;
    border-radius: 10px;
    height: 20px;
    position: relative;
    overflow: hidden;
}

.rs-progress-fill {
    background: #2ecc71;
    height: 100%;
    border-radius: 10px;
}

.rs-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    font-weight: 600;
}

/* Badges */
.rs-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}

.rs-badge-normal {
    background: #d5edf7;
    color: #2c3e50;
}

.rs-badge-oferta {
    background: #f8d7da;
    color: #721c24;
}

/* Estados */
.rs-loading {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
}

.rs-sin-resultados {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .racingstyle-form-ingreso,
    .racingstyle-panel-analisis {
        padding: 20px;
        margin: 10px;
    }
    
    .rs-form-row {
        grid-template-columns: 1fr;
    }
    
    .rs-filtros-row {
        grid-template-columns: 1fr;
    }
    
    .rs-form-actions,
    .rs-filtros-actions {
        flex-direction: column;
    }
    
    .rs-estadisticas-grid {
        grid-template-columns: 1fr;
    }
}