PROBLEMA: - custom-style.css tenía código DUPLICADO de tablas APU (137 líneas) - tables-apu.css tenía 5 diferencias críticas vs template - Usuario reportó que tablas en staging NO coinciden con template SOLUCIÓN ARQUITECTURAL: ✅ Eliminar TODO código .analisis de custom-style.css (líneas 160-282 + responsive 914-924) - Principio: cada componente debe tener su PROPIO archivo CSS - custom-style.css NO debe tener estilos de componentes específicos CORRECCIONES EN TABLES-APU.CSS: 1. ✅ box-shadow: 0 2px 8px → 0 4px 16px (línea 25) - Template usa blur radius 16px, no 8px 2. ✅ Section header: ELIMINAR text-transform: uppercase (línea 163) - Template usa textTransform: "none" 3. ✅ Section header: ELIMINAR letter-spacing: 0.5px (línea 165) - Template usa letterSpacing: "normal" 4. ✅ Section header: ELIMINAR font-size: 0.95em (línea 164) - Template no reduce el tamaño de fuente 5. ✅ Columnas numéricas: AGREGAR color: #1e3a5f (línea 139) - Template computed muestra rgb(30, 58, 95) explícito VERIFICACIÓN: - ✅ style.css: NO tiene reglas .analisis - ✅ responsive.css: Solo regla genérica table (max-width: 575.98px) - ✅ utilities.css: Solo clases d-table de Bootstrap - ✅ animations.css: NO tiene reglas table - ✅ Orden de carga: custom-style (p11) → tables-apu (p15) ✓ COMPARACIÓN CON TEMPLATE: Extraído computed styles del template index.html usando Playwright: - table: boxShadow "0px 4px 16px", borderRadius "8px" ✓ - header: gradient #1e3a5f→#2c5282, padding 16px ✓ - col1-2: Poppins, left align ✓ - col3: center, color #6c757d ✓ - col4-6: Courier New monospace, right, color #1e3a5f ✓ - section-header: color #1e3a5f, fontWeight 600, textTransform "none" ✓ - subtotal: bg rgba(255,133,0,0.1), color #FF8600 ✓ - total: gradient, color white, fontSize 1.1rem/1.25rem ✓ RESULTADO: - 137 líneas eliminadas (código duplicado en custom-style.css) - 5 correcciones críticas en tables-apu.css - Arquitectura CSS correcta: cada componente en su archivo 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
422 lines
10 KiB
CSS
422 lines
10 KiB
CSS
/**
|
|
* Tablas APU - Análisis de Precios Unitarios
|
|
* Estilos específicos para tablas de construcción
|
|
*
|
|
* @package Apus_Theme
|
|
* @since 1.0.0
|
|
*/
|
|
|
|
/* ========================================
|
|
CONTENEDOR PRINCIPAL DE TABLA APU
|
|
======================================== */
|
|
.analisis {
|
|
margin: 2rem 0;
|
|
overflow-x: auto;
|
|
-webkit-overflow-scrolling: touch;
|
|
}
|
|
|
|
/* ========================================
|
|
TABLA BASE
|
|
======================================== */
|
|
.analisis table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
background: #ffffff;
|
|
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
|
|
border-radius: 8px;
|
|
border: none;
|
|
border-spacing: 0;
|
|
}
|
|
|
|
/* Eliminar todos los bordes */
|
|
.analisis table td,
|
|
.analisis table tbody,
|
|
.analisis table tr {
|
|
border: none;
|
|
}
|
|
|
|
/* ========================================
|
|
ANCHOS DE COLUMNAS
|
|
======================================== */
|
|
.analisis table td:nth-child(1),
|
|
.analisis table th:nth-child(1) {
|
|
width: 150px;
|
|
min-width: 100px;
|
|
}
|
|
|
|
.analisis table td:nth-child(2),
|
|
.analisis table th:nth-child(2) {
|
|
width: auto;
|
|
min-width: 300px;
|
|
}
|
|
|
|
.analisis table td:nth-child(3),
|
|
.analisis table th:nth-child(3) {
|
|
width: 80px;
|
|
min-width: 60px;
|
|
}
|
|
|
|
.analisis table td:nth-child(4),
|
|
.analisis table th:nth-child(4) {
|
|
width: 110px;
|
|
min-width: 90px;
|
|
}
|
|
|
|
.analisis table td:nth-child(5),
|
|
.analisis table th:nth-child(5) {
|
|
width: 120px;
|
|
min-width: 100px;
|
|
}
|
|
|
|
.analisis table td:nth-child(6),
|
|
.analisis table th:nth-child(6) {
|
|
width: 120px;
|
|
min-width: 100px;
|
|
}
|
|
|
|
/* ========================================
|
|
ENCABEZADOS DE TABLA (THEAD)
|
|
======================================== */
|
|
.analisis table thead tr th {
|
|
background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
|
|
color: #ffffff;
|
|
font-weight: 600;
|
|
text-align: center !important;
|
|
padding: 1rem;
|
|
border: none;
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 10;
|
|
}
|
|
|
|
/* ========================================
|
|
FILAS NORMALES
|
|
======================================== */
|
|
.analisis table tbody td {
|
|
padding: 0.75rem 1rem;
|
|
border: none;
|
|
}
|
|
|
|
/* ========================================
|
|
ZEBRA STRIPING - Filas alternadas
|
|
======================================== */
|
|
.analisis table tbody tr:nth-child(even):not(.section-header):not(.subtotal-row):not(.total-row) {
|
|
background-color: #f8f9fa;
|
|
}
|
|
|
|
.analisis table tbody tr:nth-child(odd):not(.section-header):not(.subtotal-row):not(.total-row) {
|
|
background-color: #ffffff;
|
|
}
|
|
|
|
/* ========================================
|
|
ALINEACIÓN DE COLUMNAS
|
|
======================================== */
|
|
|
|
/* Columnas 1 y 2: Clave y Descripción - izquierda */
|
|
.analisis table td:nth-child(1),
|
|
.analisis table td:nth-child(2) {
|
|
text-align: left;
|
|
}
|
|
|
|
/* Columna 3: Unidad - centrada */
|
|
.analisis table td:nth-child(3),
|
|
.analisis table td.c3 {
|
|
text-align: center !important;
|
|
color: #6c757d;
|
|
font-size: 0.9em;
|
|
}
|
|
|
|
/* Columnas 4, 5, 6: Cantidad, Costo, Importe - derecha con fuente monospace */
|
|
.analisis table td:nth-child(4),
|
|
.analisis table td.c4,
|
|
.analisis table td:nth-child(5),
|
|
.analisis table td.c5,
|
|
.analisis table td:nth-child(6),
|
|
.analisis table td.c6 {
|
|
text-align: right !important;
|
|
font-family: 'Courier New', Courier, monospace;
|
|
font-weight: 500;
|
|
color: #1e3a5f;
|
|
}
|
|
|
|
/* ========================================
|
|
HOVER EN FILAS DE DATOS
|
|
======================================== */
|
|
.analisis table tbody tr:not(.section-header):not(.subtotal-row):not(.total-row):hover {
|
|
background-color: #fff3cd !important;
|
|
transition: background-color 0.2s ease;
|
|
cursor: pointer;
|
|
}
|
|
|
|
/* ========================================
|
|
ENCABEZADOS DE SECCIÓN
|
|
(Material, Mano de Obra, Herramienta, Equipo)
|
|
======================================== */
|
|
.analisis table tr.section-header {
|
|
background-color: #e9ecef !important;
|
|
}
|
|
|
|
.analisis table tr.section-header td {
|
|
font-weight: 600;
|
|
color: #1e3a5f;
|
|
padding: 0.75rem 1rem;
|
|
border: none !important;
|
|
}
|
|
|
|
/* ========================================
|
|
FILAS DE SUBTOTALES
|
|
(Suma de Material, Suma de Mano de Obra, etc)
|
|
======================================== */
|
|
.analisis table tr.subtotal-row {
|
|
background-color: rgba(255, 133, 0, 0.1) !important;
|
|
}
|
|
|
|
.analisis table tr.subtotal-row td {
|
|
font-weight: 700;
|
|
color: var(--color-orange-primary);
|
|
padding: 0.875rem 1rem;
|
|
border: none !important;
|
|
}
|
|
|
|
.analisis table tr.subtotal-row td:nth-child(2) {
|
|
font-style: italic;
|
|
}
|
|
|
|
.analisis table tr.subtotal-row td.c6,
|
|
.analisis table tr.subtotal-row td:nth-child(6) {
|
|
font-size: 1.05rem;
|
|
color: var(--color-orange-primary);
|
|
}
|
|
|
|
/* ========================================
|
|
FILA DE TOTAL FINAL
|
|
(Costo Directo)
|
|
======================================== */
|
|
.analisis table tr.total-row {
|
|
background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%) !important;
|
|
}
|
|
|
|
.analisis table tr.total-row td {
|
|
color: #ffffff !important;
|
|
font-weight: 700;
|
|
font-size: 1.1rem;
|
|
padding: 1.125rem 1rem !important;
|
|
border: none !important;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.analisis table tr.total-row td.c6,
|
|
.analisis table tr.total-row td:nth-child(6) {
|
|
font-size: 1.25rem;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
/* ========================================
|
|
ESTILOS PARA IMPRESIÓN
|
|
======================================== */
|
|
@media print {
|
|
.analisis {
|
|
margin: 1rem 0;
|
|
overflow: visible;
|
|
box-shadow: none;
|
|
}
|
|
|
|
.analisis table {
|
|
box-shadow: none;
|
|
border: 1px solid #dee2e6;
|
|
}
|
|
|
|
.analisis table thead tr th {
|
|
background: #1e3a5f !important;
|
|
color: #ffffff !important;
|
|
-webkit-print-color-adjust: exact;
|
|
print-color-adjust: exact;
|
|
position: static;
|
|
}
|
|
|
|
.analisis table tr.section-header {
|
|
background-color: #e9ecef !important;
|
|
-webkit-print-color-adjust: exact;
|
|
print-color-adjust: exact;
|
|
}
|
|
|
|
.analisis table tr.subtotal-row {
|
|
background-color: rgba(255, 133, 0, 0.1) !important;
|
|
-webkit-print-color-adjust: exact;
|
|
print-color-adjust: exact;
|
|
}
|
|
|
|
.analisis table tr.total-row {
|
|
background: #1e3a5f !important;
|
|
-webkit-print-color-adjust: exact;
|
|
print-color-adjust: exact;
|
|
}
|
|
|
|
.analisis table tbody tr:nth-child(even):not(.section-header):not(.subtotal-row):not(.total-row) {
|
|
background-color: #f8f9fa !important;
|
|
-webkit-print-color-adjust: exact;
|
|
print-color-adjust: exact;
|
|
}
|
|
|
|
/* Evitar saltos de página dentro de las tablas */
|
|
.analisis table {
|
|
page-break-inside: avoid;
|
|
}
|
|
|
|
.analisis table tr {
|
|
page-break-inside: avoid;
|
|
page-break-after: auto;
|
|
}
|
|
|
|
/* No mostrar hover en impresión */
|
|
.analisis table tbody tr:hover {
|
|
background-color: inherit !important;
|
|
}
|
|
}
|
|
|
|
/* ========================================
|
|
RESPONSIVE - TABLETS (768px - 991px)
|
|
======================================== */
|
|
@media (max-width: 991px) {
|
|
.analisis {
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.analisis table td {
|
|
padding: 0.6rem 0.8rem !important;
|
|
}
|
|
|
|
.analisis table thead tr th {
|
|
padding: 0.8rem 0.6rem;
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.analisis table tr.total-row td {
|
|
font-size: 1rem !important;
|
|
padding: 1rem 0.8rem !important;
|
|
}
|
|
|
|
.analisis table tr.total-row td.c6,
|
|
.analisis table tr.total-row td:nth-child(6) {
|
|
font-size: 1.15rem !important;
|
|
}
|
|
|
|
/* Ajustar anchos mínimos en tablets */
|
|
.analisis table td:nth-child(1),
|
|
.analisis table th:nth-child(1) {
|
|
min-width: 80px;
|
|
}
|
|
|
|
.analisis table td:nth-child(2),
|
|
.analisis table th:nth-child(2) {
|
|
min-width: 200px;
|
|
}
|
|
}
|
|
|
|
/* ========================================
|
|
RESPONSIVE - MÓVILES (max 767px)
|
|
======================================== */
|
|
@media (max-width: 767px) {
|
|
.analisis {
|
|
font-size: 0.85rem;
|
|
margin: 1.5rem 0;
|
|
}
|
|
|
|
.analisis table td {
|
|
padding: 0.5rem !important;
|
|
}
|
|
|
|
.analisis table thead tr th {
|
|
padding: 0.7rem 0.5rem;
|
|
font-size: 0.85rem;
|
|
}
|
|
|
|
.analisis table tr.section-header td {
|
|
font-size: 0.85em;
|
|
padding: 0.6rem 0.5rem;
|
|
}
|
|
|
|
.analisis table tr.subtotal-row td {
|
|
padding: 0.7rem 0.5rem;
|
|
}
|
|
|
|
.analisis table tr.subtotal-row td.c6,
|
|
.analisis table tr.subtotal-row td:nth-child(6) {
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.analisis table tr.total-row td {
|
|
font-size: 0.95rem !important;
|
|
padding: 0.875rem 0.5rem !important;
|
|
}
|
|
|
|
.analisis table tr.total-row td.c6,
|
|
.analisis table tr.total-row td:nth-child(6) {
|
|
font-size: 1.1rem !important;
|
|
}
|
|
|
|
/* Ajustar anchos mínimos en móviles */
|
|
.analisis table td:nth-child(1),
|
|
.analisis table th:nth-child(1) {
|
|
width: 80px;
|
|
min-width: 60px;
|
|
}
|
|
|
|
.analisis table td:nth-child(2),
|
|
.analisis table th:nth-child(2) {
|
|
min-width: 150px;
|
|
}
|
|
|
|
.analisis table td:nth-child(3),
|
|
.analisis table th:nth-child(3),
|
|
.analisis table td:nth-child(4),
|
|
.analisis table th:nth-child(4),
|
|
.analisis table td:nth-child(5),
|
|
.analisis table th:nth-child(5),
|
|
.analisis table td:nth-child(6),
|
|
.analisis table th:nth-child(6) {
|
|
min-width: 70px;
|
|
}
|
|
}
|
|
|
|
/* ========================================
|
|
ACCESIBILIDAD
|
|
======================================== */
|
|
|
|
/* Mejorar contraste para lectores de pantalla */
|
|
.analisis table thead tr th {
|
|
outline: none;
|
|
}
|
|
|
|
/* Focus visible para navegación por teclado */
|
|
.analisis table tbody tr:focus-within {
|
|
outline: 2px solid #0d6efd;
|
|
outline-offset: -2px;
|
|
}
|
|
|
|
/* ========================================
|
|
COMPATIBILIDAD CON BOOTSTRAP
|
|
======================================== */
|
|
|
|
/* Anular estilos de Bootstrap que puedan interferir */
|
|
.analisis table.table {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.analisis table.table > :not(caption) > * > * {
|
|
padding: inherit;
|
|
background-color: inherit;
|
|
border-bottom-width: 0;
|
|
box-shadow: none;
|
|
}
|
|
|
|
/* Mantener compatibilidad con clases de Bootstrap si se usan */
|
|
.analisis table.table-striped > tbody > tr:nth-of-type(odd) > *:not(.section-header):not(.subtotal-row):not(.total-row) {
|
|
background-color: #ffffff;
|
|
}
|
|
|
|
.analisis table.table-striped > tbody > tr:nth-of-type(even) > *:not(.section-header):not(.subtotal-row):not(.total-row) {
|
|
background-color: #f8f9fa;
|
|
}
|