/**
 * Hugo Cotizador Pro - Versión 2.4.0
 * Diseño: Light Premium (Bordes redondeados, sin tonos rosados, alta legibilidad)
 */

:root {
--hc-bg: #f3f4f6;
--hc-surface: #ffffff;
--hc-primary: #e11d48; /* Rojo Hugo Repuestos */
--hc-primary-hover: #be123c;
--hc-text-main: #1e293b;
--hc-text-muted: #64748b;
--hc-text-light: #94a3b8;
--hc-border: #e2e8f0;
--hc-input-bg: #f8fafc;
--hc-success: #10b981;
--hc-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
--hc-radius: 18px;
--hc-radius-sm: 10px;
}

#hugo-cotizador {
background-color: var(--hc-bg);
color: var(--hc-text-main);
font-family: 'Inter', system-ui, -apple-system, sans-serif;
padding: 20px;
max-width: 1400px;
margin: 0 auto;
min-height: 100vh;
}

/* Header */
.hc-main-header {
display: flex;
justify-content: space-between;
align-items: center;
background: var(--hc-surface);
padding: 15px 25px;
border-radius: var(--hc-radius);
margin-bottom: 25px;
box-shadow: var(--hc-shadow);
}

.hc-brand-area {
display: flex;
align-items: center;
gap: 15px;
}

.hc-logo-box {
width: 42px;
height: 42px;
background: var(--hc-primary);
color: white;
display: flex;
align-items: center;
justify-content: center;
font-weight: 900;
font-size: 20px;
border-radius: 12px;
}

.hc-title-group h1 {
margin: 0;
font-size: 18px;
font-weight: 800;
}

.hc-title-group p {
margin: 0;
font-size: 12px;
color: var(--hc-text-muted);
}

/* Layout Grid */
.hc-layout-grid {
display: grid;
grid-template-columns: 320px 1fr;
gap: 25px;
}

/* Cards */
.hc-card {
background: var(--hc-surface);
border-radius: var(--hc-radius);
padding: 20px;
box-shadow: var(--hc-shadow);
margin-bottom: 20px;
border: 1px solid rgba(255,255,255,0.8);
}

.hc-card h3 {
margin: 0 0 15px 0;
font-size: 13px;
font-weight: 700;
color: var(--hc-text-light);
text-transform: uppercase;
letter-spacing: 0.025em;
}

/* Tabs */
.hc-tabs-header {
display: flex;
background: #f1f5f9;
padding: 4px;
border-radius: 12px;
}

.hc-tab {
flex: 1;
border: none;
background: transparent;
padding: 10px;
font-size: 13px;
font-weight: 600;
color: var(--hc-text-muted);
cursor: pointer;
border-radius: 9px;
transition: 0.2s;
}

.hc-tab.active {
background: white;
color: var(--hc-primary);
box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Forms & Inputs */
.hc-stack {
display: flex;
flex-direction: column;
gap: 12px;
}

.hc-field {
display: flex;
flex-direction: column;
gap: 5px;
position: relative;
}

.hc-field label {
font-size: 11px;
font-weight: 700;
color: var(--hc-text-muted);
padding-left: 2px;
}

.hc-field input, .hc-field select, .hc-field textarea {
background: var(--hc-input-bg);
border: 2px solid var(--hc-border);
border-radius: var(--hc-radius-sm);
padding: 10px 12px;
font-size: 14px;
transition: 0.2s;
}

.hc-field input:focus {
border-color: var(--hc-primary);
background: white;
outline: none;
}

/* Icono de Validación (Check) */
.hc-status-icon {
position: absolute;
right: 12px;
bottom: 11px;
width: 18px;
height: 18px;
opacity: 0;
transform: scale(0.5);
transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
pointer-events: none;
}

.hc-status-icon::after {
content: "✓";
color: var(--hc-success);
font-weight: bold;
font-size: 14px;
}

.hc-field.is-valid .hc-status-icon {
opacity: 1;
transform: scale(1);
}

/* Área de Carga de Productos */
.hc-product-entry-area {
background: #ffffff;
border: 2px solid #f1f5f9;
}

.hc-entry-row {
display: grid;
grid-template-columns: 2fr 1.2fr 130px 85px 110px;
gap: 15px;
align-items: flex-end;
}

.hc-entry-row label {
display: block;
font-size: 11px;
font-weight: 700;
color: var(--hc-text-muted);
margin-bottom: 5px;
}

/* Tabla de Items */
.hc-table-container {
background: white;
border-radius: var(--hc-radius);
overflow: hidden;
margin-top: 25px;
box-shadow: var(--hc-shadow);
}

.hc-main-table {
width: 100%;
border-collapse: collapse;
}

.hc-main-table th {
background: #f8fafc;
text-align: left;
padding: 15px 20px;
font-size: 12px;
font-weight: 700;
color: var(--hc-text-light);
text-transform: uppercase;
border-bottom: 2px solid var(--hc-border);
}

.hc-main-table td {
padding: 15px 20px;
border-bottom: 1px solid #f1f5f9;
font-size: 14px;
}

.hc-main-table tr:hover td {
background: #fcfcfc;
}

/* Panel de Totales */
.hc-bottom-summary {
display: grid;
grid-template-columns: 1fr 380px;
gap: 30px;
margin-top: 30px;
}

.hc-totals-panel {
background: #1e293b; /* Azul pizarra muy oscuro, profesional */
color: white;
border-radius: var(--hc-radius);
padding: 25px;
display: flex;
flex-direction: column;
gap: 15px;
box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.hc-total-line {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 15px;
}

.hc-final-total {
margin-top: 10px;
padding-top: 15px;
border-top: 1px solid #334155;
font-size: 24px;
}

.hc-final-total strong {
color: #fb7185; /* Rojo coral suave para el total */
}

/* Botones */
.hc-btn-add {
background: var(--hc-primary);
color: white;
border: none;
width: 100%;
padding: 12px;
border-radius: var(--hc-radius-sm);
font-weight: 700;
cursor: pointer;
box-shadow: 0 4px 10px rgba(225, 29, 72, 0.2);
}

.hc-btn-pdf {
background: white;
color: #1e293b;
border: none;
padding: 14px;
border-radius: var(--hc-radius-sm);
font-weight: 700;
cursor: pointer;
}

.hc-btn-wa {
background: #22c55e;
color: white;
border: none;
padding: 14px;
border-radius: var(--hc-radius-sm);
font-weight: 700;
cursor: pointer;
}

/* Opciones de IVA (Reemplaza el antiguo Switch) */
.hc-iva-options {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
}

.hc-iva-options label {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hc-iva-options select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #334155;
    background: #0f172a;
    color: white;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s;
    appearance: auto;
}

.hc-iva-options select:focus {
    outline: none;
    border-color: var(--hc-primary);
}

/* Utilidades */
.hc-hidden { display: none; }
.hc-center { text-align: center; }
.hc-right { text-align: right; }
.hc-neg { color: #f87171; }

@media (max-width: 1100px) {
.hc-layout-grid { grid-template-columns: 1fr; }
.hc-entry-row { grid-template-columns: 1fr 1fr; }
}