th, td {
    text-align: center;
}

.form-control {
    margin-bottom: unset;
    justify-content: center;
}

.checkmark {
    margin-right: unset;
}

/* Celda de Color de Coche */
.car-color-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: bold;
    white-space: normal; /* Permitir wrap si el nombre es largo */
    padding: 5px; /* Padding interno ajustado */
}

.color-swatch {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    vertical-align: middle;
    flex-shrink: 0;
}

/* Select de Subasta Específico */
td select.subasta-input {
    padding: 6px; /* Padding específico */
    margin: 0 auto; /* Centrado */
    text-align: center; /* Centrar texto */
    text-align-last: center; /* Centrar texto (Firefox) */
    -moz-text-align-last: center;
    display: block;
}

/* Select de Resultados Específico */
.results-table select {
    width: auto; /* Ajustar al contenido */
    margin: 0 auto; /* Centrado */
    padding: 6px 8px; /* Padding específico */
}
.results-table select option:disabled {
     color: var(--text-muted-color);
}

/* Sección de Resumen */
.summary {
    padding: var(--base-padding); /* Padding estándar */
    border-radius: var(--border-radius-lg); /* Radio estándar */
    margin-top: 1.5rem; /* Margen superior */
    /* Simula una sección anidada */
}

.summary p {
    margin: 8px 0;
    font-size: 1.1em; /* Tamaño específico */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-color); /* Borde punteado */
    color: var(--text-color); /* Heredado */
}
.summary p:last-child {
    border-bottom: none; /* Quitar borde del último */
}

.summary span {
    font-weight: bold;
    margin-left: 10px;
    /* Transiciones aplicadas directamente en JS */
}

/* Estilos para el párrafo y span de Ganancia Neta */
.summary p.ganancias-totales {
    font-weight: bold;
    border-top: 2px solid var(--info-color); /* Borde superior usa accent (info global) */
    padding-top: 15px;
    margin-top: 15px;
    font-size: 1.2em; /* Tamaño específico */
    transition: border-color var(--transition-speed, 0.2s) ease; /* Transición para color de borde */
}
.ganancias-totales span {
    font-size: 1.4em; /* Tamaño específico */
    color: var(--info-color); /* Color por defecto (info global) */
    padding: 5px 10px;
    border-radius: var(--border-radius-sm); /* Usa variable global */
    background-color: rgba(0, 153, 255, 0.15); /* Fondo accent por defecto (cambia con JS) */
    transition: color var(--transition-speed, 0.2s) ease,
                background-color var(--transition-speed, 0.2s) ease; /* Transiciones */
}

/* --- Animaciones --- */

@keyframes popInButton { /* Animación específica, mantener */
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* --- Responsividad --- */

@media (max-width: 768px) {
     main { max-width: 95%; }
     table { min-width: 420px; }
     table.info-table { min-width: 300px; }
     .summary { padding: 0.8rem 1.2rem; } /* Ajuste padding summary */
}

@media (max-width: 600px) {
     main { padding: 0.8rem; max-width: 100%; }
     h2 { font-size: 1.3em; margin-bottom: 0.8rem; padding-bottom: 0.4rem;} /* Ajustes h2 */
     main section:first-of-type > h2 { margin-top: 0rem;} /* Ajuste primer h2 */

     th, td { padding: 6px 5px; } /* Ajuste padding/font celdas */
     .info-table th, .info-table td { font-size: 0.8em; } /* Ajuste info-table */

     .car-color-cell { flex-direction: column; gap: 3px; font-size: 0.85em;} /* Ajuste celda color */
     .color-swatch { width: 16px; height: 16px; } /* Ajuste swatch */
     td input[type="checkbox"] { transform: scale(1.3); margin: 0 3px;} /* Ajuste checkbox */
     td select.subasta-input { width: 60px; font-size: 0.85em; padding: 5px;} /* Ajuste select subasta */
     .results-table select { font-size: 0.9em; min-width: 100px; padding: 5px;} /* Ajuste select resultados */
     .summary p { font-size: 1em; padding: 6px 0; } /* Ajuste texto summary */
     .summary h2 { font-size: 1.4em; } /* Ajuste h2 summary */
     .ganancias-totales span { font-size: 1.3em; } /* Ajuste span total */
     .summary p.ganancias-totales { font-size: 1.1em; } /* Ajuste p total */
     table { min-width: 380px; } /* Ajuste min-width tabla */
     table.info-table { min-width: 280px; } /* Ajuste min-width info-table */
     .footer-controls { padding: 0 0.5rem; } /* Ajuste padding footer */
     select { padding: 8px; } /* Ajuste padding general select */
}

@media (max-width: 450px) {
     h2 { font-size: 1.2em; } /* Ajuste h2 */
     th, td { padding: 5px 4px;} /* Ajuste celdas */
     .info-table th, .info-table td { font-size: 0.75em; } /* Ajuste info-table */
     .car-color-cell { font-size: 0.8em; } /* Ajuste celda color */
     .color-swatch { width: 14px; height: 14px; } /* Ajuste swatch */
     td select.subasta-input { width: 55px; font-size: 0.8em; padding: 4px;} /* Ajuste select subasta */
     .results-table select { font-size: 0.8em; min-width: 90px; padding: 4px;} /* Ajuste select resultados */
     .summary p { font-size: 0.95em; } /* Ajuste texto summary */
     .ganancias-totales span { font-size: 1.2em; } /* Ajuste span total */
     .summary p.ganancias-totales { font-size: 1em; } /* Ajuste p total */
     table { min-width: 320px; } /* Ajuste min-width tabla */
     table.info-table { min-width: 260px; } /* Ajuste min-width info-table */
     select { padding: 6px; } /* Ajuste padding general select */
}