/* ==========================================================================
   CONTRATOEC — MÓDULO DE ELABORACIÓN DE PRESUPUESTO (PDF A EXCEL)
   Diseño Minimalista Apple: Sin barras redundantes, proporción ligera y limpia
   ========================================================================== */

:root {
  color-scheme: dark;
  --in-oklab: ;
}

@supports (background: linear-gradient(in oklab, white, black)) {
  :root {
    --in-oklab: in oklab;
  }
}

/* ─── ELIMINAR FLECHAS, SPINNERS Y SCROLL EN INPUTS NUMÉRICOS ─── */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
  display: none !important;
}

input[type="number"] {
  -moz-appearance: textfield !important;
  appearance: textfield !important;
  overflow: hidden;
}

/* ─── SCROLLBARS GLOBALES INTEGRADAS Y DISCRETAS (SIN BARRA TOSCA DE WINDOWS) ─── */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 980px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

.pres-main-container {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto 16px auto;
  padding: 0 24px;
  box-sizing: border-box;
  flex: 1;
}

/* ─── ENCABEZADO EDITORIAL APPLE ─── */
.pres-hero {
  padding: 28px 0 20px;
  text-align: center;
}

.pres-hero-title {
  font-family: var(--font-display);
  font-size: var(--text-page-title);
  font-weight: 750;
  letter-spacing: -0.025em;
  color: var(--text-1, #f8fafc);
  line-height: 1.22;
  margin: 0 0 6px 0;
}

.pres-hero-title .hero-accent {
  color: var(--accent, #f97316);
}

.pres-hero-sub {
  font-size: var(--text-page-sub);
  color: #94a3b8;
  font-weight: 450;
  letter-spacing: -0.01em;
  max-width: 64ch;
  margin: 0 auto;
  line-height: 1.48;
}

.pres-hero-sub code {
  font-family: var(--font-mono, monospace);
  font-size: 0.85em;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 6px;
  border-radius: 4px;
}

.pres-workspace {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ─── BOTONES COMPACTOS ESTILO APPLE ─── */
.apple-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 15px;
  border-radius: 980px;
  font-size: 0.79rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  white-space: nowrap;
}

.apple-pill-primary {
  background: #ea580c;
  color: #ffffff;
  border: none;
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  transition: all 0.16s ease;
}

.apple-pill-primary:hover {
  background: #d94e08;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
  transform: translateY(-1px);
}

.apple-pill-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.apple-link-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 0.79rem;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}

.apple-link-btn:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.05);
}

/* ─── ESTADO / NOTIFICACIONES ─── */
.pres-status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #f1f5f9;
  font-size: 0.83rem;
  font-weight: 500;
  flex-wrap: wrap;
}

.pres-status-banner.is-error {
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.pres-status-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pres-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  flex-shrink: 0;
}

.pres-status-banner.is-error .pres-status-dot {
  background: #ef4444;
}

/* ─── ZONA DE CARGA DRAG & DROP MINIMALISTA ─── */
.pres-upload-surface {
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 20px;
}

.pres-dropzone {
  border: 1px dashed rgba(255, 255, 255, 0.16);
  background: rgba(15, 23, 42, 0.4);
  border-radius: 12px;
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.pres-dropzone:hover,
.pres-dropzone.is-dragover {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.02);
}

.pres-dropzone-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.pres-dropzone-title {
  font-size: 0.94rem;
  font-weight: 600;
  color: #f8fafc;
  letter-spacing: -0.01em;
}

.pres-dropzone-sub {
  font-size: 0.8rem;
  color: #64748b;
  max-width: 480px;
}

/* ─── BARRA DE ARCHIVO SELECCIONADO ─── */
.pres-file-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  flex-wrap: wrap;
}

.pres-file-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pres-file-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #f8fafc;
}

.pres-file-meta {
  font-size: 0.75rem;
  color: #64748b;
}

.pres-file-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ─── CENTRO DE CONTROL: BASE DE RECURSOS Y RENDIMIENTOS ─── */

/* ─── SUPERFICIE DE TABLA DE INSUMOS (ESTILO APPLE DARK) ─── */
.insumos-table-surface {
  background: #0b1120;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
}

.pres-control-surface {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ─── TARJETA SUPERIOR DE INFORMACIÓN Y COSTOS INDIRECTOS ─── */
.pres-project-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 20px;
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  flex-wrap: wrap;
}

.pres-project-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 260px;
}

.pres-tag-project {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent, #f97316);
  text-transform: uppercase;
}

.pres-project-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0;
  line-height: 1.3;
}

.pres-project-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pres-meta-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: 0.75rem;
  font-weight: 500;
}

.pres-meta-chip.is-highlight {
  background: rgba(249, 115, 22, 0.12);
  border-color: rgba(249, 115, 22, 0.3);
  color: #fb923c;
  font-weight: 600;
}

/* ─── PANEL DE INDIRECTOS GENERAL ─── */
.pres-indirects-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 14px;
  border-radius: 10px;
}

.pres-indirects-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pres-indirects-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #e2e8f0;
}

.pres-indirects-tag {
  font-size: 0.7rem;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.04);
  padding: 1px 6px;
  border-radius: 4px;
}

.pres-indirects-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pres-input-suffix-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.pres-indirects-input {
  width: 82px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  color: #f8fafc;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 5px 22px 5px 8px;
  text-align: right;
  outline: none;
  transition: border-color 0.15s ease;
}

.pres-indirects-input:focus {
  border-color: var(--accent, #f97316);
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.18);
}

.pres-input-suffix {
  position: absolute;
  right: 8px;
  color: #94a3b8;
  font-size: 0.78rem;
  pointer-events: none;
  font-weight: 600;
}

/* ─── PESTAÑAS DE CATEGORÍAS Y BUSCADOR ─── */
.pres-tabs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 16px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.pres-tabs-group {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.pres-cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.16s ease;
}

.pres-cat-tab:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.16);
}

.pres-cat-tab.is-active {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.45);
  color: #38bdf8;
  font-weight: 600;
}

.pres-tab-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}

.pres-cat-tab.is-active .pres-tab-badge {
  background: rgba(56, 189, 248, 0.25);
  color: #38bdf8;
}

.pres-search-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.pres-search-icon {
  position: absolute;
  left: 9px;
  color: #64748b;
  pointer-events: none;
}

.pres-search-input {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #f8fafc;
  font-family: inherit;
  font-size: 0.78rem;
  padding: 6px 10px 6px 28px;
  width: 220px;
  outline: none;
  transition: border-color 0.15s ease, width 0.2s ease;
}

.pres-search-input:focus {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
  width: 260px;
}

.pres-tab-notice {
  font-size: 0.78rem;
  color: #94a3b8;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ─── TABLA DE DATOS INTERACTIVA (PRECIOS Y RENDIMIENTOS) ─── */
.insumos-table-scroll {
  width: 100%;
  max-height: calc(100vh - 295px);
  overflow-y: auto;
  overflow-x: auto;
  background: transparent;
  border: none;
  border-radius: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) rgba(15, 23, 42, 0.2);
}

.pres-table-container {
  width: 100%;
  max-height: calc(100vh - 250px);
  overflow-y: auto;
  overflow-x: auto;
  background: transparent;
  border: none;
  border-radius: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) rgba(15, 23, 42, 0.2);
}

.insumos-table-scroll::-webkit-scrollbar,
.pres-table-container::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.insumos-table-scroll::-webkit-scrollbar-track,
.pres-table-container::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.2);
}
.insumos-table-scroll::-webkit-scrollbar-thumb,
.pres-table-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 9999px;
}
.insumos-table-scroll::-webkit-scrollbar-thumb:hover,
.pres-table-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.45);
}

.pres-data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.78rem;
  color: #e2e8f0;
}

.pres-data-table th,
.pres-data-table td {
  padding: 7px 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: middle;
}

.pres-data-table th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #111827;
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pres-data-table tbody tr {
  transition: background 0.12s ease;
}

.pres-data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.pres-data-table td.is-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pres-data-table td.is-center {
  text-align: center;
  white-space: nowrap;
}

/* ─── INPUTS NUMÉRICOS DE PRECIO Y RENDIMIENTO ─── */
.pres-cell-input {
  width: 90px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  color: #f8fafc;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 7px;
  text-align: right;
  outline: none;
  transition: all 0.15s ease;
}

.pres-cell-input:focus {
  border-color: var(--accent, #f97316);
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.2);
  background: #0f172a;
}

.pres-cell-input.is-modified {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  color: #38bdf8;
  font-weight: 700;
}

/* ─── BADGES Y ETIQUETAS DE VARIACIÓN ─── */
.pres-badge-locked {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  font-size: 0.7rem;
  font-weight: 500;
}

.pres-badge-var {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.71rem;
  font-weight: 600;
}

.pres-badge-var.is-neutral {
  color: #64748b;
}

.pres-badge-var.is-up {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
}

.pres-badge-var.is-down {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
}

.pres-count-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  font-size: 0.71rem;
}

/* ─── SECCIÓN DE COMPARACIÓN: ORIGINAL VS MODIFICADO ─── */
.pres-comparison-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 10px;
  padding: 20px;
  background: #0b1120;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.pres-comparison-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.pres-comparison-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 4px 0;
}

.pres-comparison-sub {
  font-size: 0.79rem;
  color: #94a3b8;
  margin: 0;
}

.pres-btn-download-main {
  height: 38px;
  padding: 0 20px;
  font-size: 0.84rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

/* ─── KPIS COMPARATIVOS ─── */
.pres-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.pres-kpi-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
}

.pres-kpi-card.is-highlight {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

.pres-kpi-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
}

.pres-kpi-card.is-highlight .pres-kpi-label {
  color: #e2e8f0;
}

.pres-kpi-values {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.pres-kpi-orig {
  font-size: 0.8rem;
  color: #64748b;
  text-decoration: line-through;
}

.pres-kpi-arrow {
  font-size: 0.75rem;
  color: #64748b;
}

.pres-kpi-mod {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
}

.pres-kpi-mod.is-bold {
  font-size: 1.22rem;
  color: #ffffff;
}

.pres-kpi-diff {
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
}

.pres-kpi-diff.is-bold {
  font-size: 0.78rem;
  color: #fdba74;
}

/* ─── TABLA COMPARATIVA DE RUBROS ─── */
.pres-comp-table-wrap {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.4);
}

.pres-comp-table-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  background: rgba(30, 41, 59, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pres-comp-bar-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: #e2e8f0;
}

.pres-comp-filter-label {
  font-size: 0.74rem;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.pres-comp-scroll {
  max-height: 320px;
  overflow-y: auto;
  overflow-x: auto;
}

.pres-table-compact th,
.pres-table-compact td {
  padding: 5px 9px;
  font-size: 0.75rem;
}

/* ─── ÁREA FINAL DE DESCARGA ─── */
.pres-download-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 20px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(249, 115, 22, 0.25);
  border-radius: 12px;
  flex-wrap: wrap;
}

.pres-download-footer-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pres-download-footer-title {
  font-size: 0.94rem;
  font-weight: 700;
  color: #f8fafc;
}

.pres-download-footer-sub {
  font-size: 0.76rem;
  color: #94a3b8;
  max-width: 580px;
  line-height: 1.4;
}

/* ==========================================================================
   CONTRATOEC — SWITCHER DE MODO Y STEPPER SOBRIO (SIN PÍLDORAS)
   ========================================================================== */
.pres-mode-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px;
  border-radius: 980px;
  margin-top: 20px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.pres-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 7px 18px;
  border-radius: 980px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: -0.01em;
}

.pres-mode-btn:hover {
  color: #f8fafc;
}

.pres-mode-btn.is-active {
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.pres-mode-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border-radius: 980px;
}

.pres-mode-btn.is-active .pres-mode-badge {
  background: rgba(255, 255, 255, 0.18);
  color: #f8fafc;
}

/* ─── PANTALLA DE ENTRADA APPLE (DOS TARJETAS DE IGUAL PESO) ─── */
.pres-entry-surface {
  padding: 10px 0 50px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.pres-entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 1280px;
  margin: 22px auto 24px auto;
  box-sizing: border-box;
}

.eett-paste-zone:hover, .eett-paste-zone:focus {
  border-color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.08) !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.2);
  outline: none;
}

.eett-pdf-zone:hover, .eett-pdf-zone:focus {
  border-color: rgba(255, 255, 255, 0.35) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.1);
  outline: none;
}

@media (max-width: 768px) {
  .pres-entry-grid {
    grid-template-columns: 1fr;
    max-width: 440px;
  }
}

.pres-entry-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: rgba(30, 41, 59, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  padding: 24px 22px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
  position: relative;
  overflow: hidden;
  user-select: none;
}

.pres-entry-card:hover {
  background: rgba(30, 41, 59, 0.68);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.38);
}

.pres-entry-card:focus-visible {
  outline: 2px solid var(--accent, #f97316);
  outline-offset: 2px;
}

.pres-entry-card-badge {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #94a3b8;
  margin-bottom: 16px;
}

.pres-entry-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f8fafc;
  margin-bottom: 18px;
  transition: all 0.2s ease;
}

.pres-entry-card:hover .pres-entry-card-icon {
  background: rgba(249, 115, 22, 0.12);
  border-color: rgba(249, 115, 22, 0.35);
  color: var(--accent, #f97316);
}

.pres-entry-card-title {
  font-size: 1.12rem;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.02em;
  margin: 0 0 8px 0;
}

.pres-entry-card-desc {
  font-size: 0.86rem;
  color: #94a3b8;
  line-height: 1.55;
  margin: 0 0 18px 0;
  flex: 1;
}

.pres-entry-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #f1f5f9;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  transition: color 0.18s ease;
}

.pres-entry-card:hover .pres-entry-card-cta {
  color: var(--accent, #f97316);
}

/* ─── LÍNEA DISCRETA: CONTINUAR PROYECTO RECIENTE ─── */
.pres-recent-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
  font-size: 0.82rem;
  color: #94a3b8;
  flex-wrap: wrap;
}

.pres-recent-line-lbl {
  color: #64748b;
  font-size: 0.80rem;
}

.pres-recent-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 980px;
  padding: 5px 14px;
  color: #f1f5f9;
  font-size: 0.80rem;
  cursor: pointer;
  transition: all 0.18s ease;
}

.pres-recent-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.pres-recent-title {
  font-weight: 600;
  color: #f8fafc;
}

.pres-recent-meta {
  color: #94a3b8;
  font-size: 0.78rem;
}

.pres-recent-arrow {
  color: var(--accent, #f97316);
  font-weight: 700;
  font-size: 0.85rem;
}

/* ─── ENCABEZADO COMPACTO DE FLUJO CON MIGAS DE PAN ─── */
.pres-workflow-header {
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pres-workflow-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pres-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pres-breadcrumb-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  text-decoration: none;
  color: #94a3b8;
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.pres-breadcrumb-link:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.05);
}

.pres-breadcrumb-sep {
  color: #64748b;
  font-size: 0.80rem;
  user-select: none;
}

.pres-breadcrumb-project-wrap {
  display: flex;
  align-items: center;
}

.pres-breadcrumb-title-input {
  background: transparent;
  border: 1px solid transparent;
  color: #f8fafc;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  padding: 3px 8px;
  border-radius: 6px;
  max-width: 380px;
  min-width: 180px;
  transition: all 0.15s ease;
  font-family: inherit;
}

.pres-breadcrumb-title-input:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.pres-breadcrumb-title-input:focus {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(15, 23, 42, 0.6);
  outline: none;
}

/* ─── STEPPER SOBRIO (APPLE SEGMENTED PILL BAR) ─── */
.pres-step-nav {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 3px;
  border-radius: 11px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  width: fit-content;
}

.pres-step-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.81rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
  user-select: none;
}

.pres-step-btn:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.05);
}

.pres-step-btn.is-active {
  background: rgba(255, 255, 255, 0.11);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  font-weight: 600;
}

.pres-step-title {
  letter-spacing: -0.01em;
}

.pres-step-meta {
  font-size: 0.70rem;
  font-weight: 500;
  color: #94a3b8;
  letter-spacing: normal;
  padding: 1px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  transition: all 0.16s ease;
}

.pres-step-btn:hover .pres-step-meta {
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.08);
}

.pres-step-btn.is-active .pres-step-meta {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.15);
  font-weight: 600;
}

/* ==========================================================================
   CATÁLOGO DE RUBROS & APU STUDIO WORKSPACE (PROFORMA DESIGN SYSTEM)
   ========================================================================== */
.cat-workspace {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ENCABEZADO SUPERIOR EDITORIAL (PROFORMA SURFACE) */
.cat-top-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  flex-wrap: wrap;
}

.cat-top-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cat-top-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.025em;
  margin: 0;
}

.cat-top-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}

/* ─── LAYOUT DE 2 COLUMNAS (SIDEBAR BUSCADOR + CANVAS DE SECCIONES) ─── */
.cat-split-layout {
  display: grid;
  grid-template-columns: 430px 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 1024px) {
  .cat-split-layout {
    grid-template-columns: 1fr;
  }
  .cat-sidebar {
    height: auto;
    max-height: 580px;
    position: static;
  }
  .cat-canvas-header-card {
    position: static;
  }
}

/* ─── SIDEBAR: BUSCADOR & BIBLIOTECA DE RUBROS (ESTILO PROFORMA) ─── */
.cat-sidebar {
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: calc(100vh - 78px);
  max-height: calc(100vh - 78px);
  position: sticky;
  top: 64px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 10;
}

.cat-search-hero-box {
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.35);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

/* BUSCADOR PROFORMA CON PILL BORDER-RADIUS Y ENFOQUE CÁLIDO */
.cat-search-bar-prominent {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-input, #0f172a);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 980px;
  padding: 2px 14px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.cat-search-bar-prominent:focus-within {
  background: #0f172a;
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.cat-search-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  margin-right: 8px;
  flex-shrink: 0;
}

.cat-search-input-field {
  flex: 1;
  background: transparent;
  border: none;
  color: #f8fafc;
  font-size: 0.84rem;
  font-weight: 400;
  outline: none;
  font-family: inherit;
  padding: 7px 0;
}

.cat-search-input-field::placeholder {
  color: #64748b;
  font-size: 0.81rem;
}

.cat-search-clear-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #94a3b8;
  border-radius: 980px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-left: 6px;
}

.cat-search-clear-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

/* SUB-BARRA LATERAL (TABS SEGMENTADOS + SELECTOR CATEGORÍA) */
.cat-sidebar-subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cat-sidebar-tabs {
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.6);
  padding: 3px;
  border-radius: 980px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  flex: 1;
}

.cat-tab-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  padding: 5px 10px;
  border-radius: 980px;
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.cat-tab-btn:hover {
  color: #f8fafc;
}

.cat-tab-btn.is-active {
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.22);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.cat-tab-badge {
  font-size: 0.72rem;
  padding: 1px 6px;
  border-radius: 980px;
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  font-weight: 500;
}

.cat-tab-btn.is-active .cat-tab-badge {
  background: rgba(255, 255, 255, 0.18);
  color: #f8fafc;
}

/* FILTRO DE CATEGORÍAS ACOMODADO */
.cat-category-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cat-category-select-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-input, #0f172a);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 980px;
  padding: 0 12px;
  transition: all 0.15s ease;
}

.cat-category-select-wrap:focus-within {
  border-color: rgba(255, 255, 255, 0.28);
  background: #0f172a;
}

.cat-category-icon {
  color: #64748b;
  margin-right: 8px;
  flex-shrink: 0;
}

.cat-select-categoria-sidebar {
  flex: 1;
  background: transparent;
  border: none;
  color: #cbd5e1;
  padding: 6px 0;
  border-radius: 980px;
  font-size: 0.74rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  width: 100%;
}

.cat-select-categoria-sidebar option {
  background: #0f172a;
  color: #f8fafc;
}

/* CHIPS RÁPIDOS MINIMALISTAS */
.cat-quick-chips-row {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 0;
  scrollbar-width: none;
}
.cat-quick-chips-row::-webkit-scrollbar {
  display: none;
}

.cat-quick-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  font-size: 0.71rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 980px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cat-quick-chip:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.08);
}

.cat-quick-chip.is-active {
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.22);
  font-weight: 600;
}

/* CONTENEDOR DE RESULTADOS Y LISTA DE TARJETAS */
.cat-results-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: transparent;
}

.cat-results-header {
  display: none !important;
}

.cat-cards-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px 12px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) rgba(15, 23, 42, 0.2);
}

.cat-cards-list::-webkit-scrollbar {
  width: 6px;
}

.cat-cards-list::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.2);
  margin: 4px 0;
  border-radius: 9999px;
}

.cat-cards-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 9999px;
  transition: background 0.15s ease;
}

.cat-cards-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.45);
}

.cat-loading-state {
  text-align: center;
  padding: 36px 16px;
  color: #94a3b8;
  font-size: 0.78rem;
}

/* TARJETA INDIVIDUAL DE RUBRO EN LA SIDEBAR (PROFORMA CLEAN CARD) */
.cat-rubro-card {
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.cat-rubro-card:hover {
  background: rgba(30, 41, 59, 0.5);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.cat-card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.cat-card-code-badge {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
}

.cat-card-unit-badge {
  font-size: 0.72rem;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 6px;
  border-radius: 4px;
}

.cat-card-cat-badge {
  font-size: 0.72rem;
  font-weight: 500;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1px 7px;
  border-radius: 4px;
  white-space: nowrap;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-badge-cpc {
  display: inline-block;
  padding: 0;
  background: transparent;
  border-radius: 0;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  white-space: nowrap;
}

.cat-card-desc {
  font-size: 0.81rem;
  font-weight: 500;
  color: #f1f5f9;
  line-height: 1.4;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cat-card-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.cat-card-price-wrap {
  display: flex;
  flex-direction: column;
}

.cat-card-price-lbl {
  font-size: 0.72rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.cat-card-price-val {
  font-family: var(--font-mono, monospace);
  font-size: 0.88rem;
  font-weight: 700;
  color: #f8fafc;
}

.cat-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cat-btn-add-to-section {
  background: var(--accent, #f97316);
  border: 1px solid transparent;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 980px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.cat-btn-add-to-section:hover {
  background: var(--accent-hover, #ea580c);
  transform: scale(1.02);
}

.cat-sidebar-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.35);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

/* ─── PIE FIJO DE LA BASE DE DATOS DE RUBROS ─── */
.cat-sidebar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 14px;
  background: rgba(15, 23, 42, 0.65);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
}

.cat-sidebar-footer-left {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--accent, #f97316);
}

.cat-sidebar-footer-brand {
  font-size: 0.74rem;
  font-weight: 600;
  color: #e2e8f0;
  letter-spacing: -0.01em;
}

.cat-sidebar-footer-badge {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 450;
}

.cat-page-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  padding: 4px 12px;
  border-radius: 980px;
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cat-page-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #f8fafc;
}

.cat-page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.cat-page-text {
  font-size: 0.72rem;
  color: #94a3b8;
}

/* ─── CANVAS PRINCIPAL (DERECHA): EL PRESUPUESTO POR SECCIONES ─── */
.cat-canvas {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  width: 100%;
}

.cat-canvas-header-card {
  padding: 10px 16px;
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: 64px;
  z-index: 8;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.cat-canvas-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cat-canvas-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.cat-canvas-title-input {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #f8fafc;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  padding: 2px 6px;
  outline: none;
  font-family: inherit;
  transition: all 0.15s ease;
}

.cat-canvas-title-input:hover,
.cat-canvas-title-input:focus {
  background: rgba(15, 23, 42, 0.5);
  border-color: rgba(255, 255, 255, 0.12);
}

.cat-canvas-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* BARRA DE KPIS FINANCIEROS DEL CANVAS (COMPACT TECH SPECS) */
.cat-canvas-kpis-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  overflow: hidden;
}

@media (max-width: 900px) {
  .cat-canvas-kpis-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.vae-kpis-grid {
  grid-template-columns: repeat(4, 1fr) !important;
  position: sticky;
  top: 64px;
  z-index: 15;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

@media (max-width: 900px) {
  .vae-kpis-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

.crono-kpis-grid {
  grid-template-columns: repeat(5, 1fr) !important;
  position: sticky;
  top: 64px;
  z-index: 15;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

@media (max-width: 900px) {
  .crono-kpis-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ─── RESUMEN INTEGRADO DE INSUMOS & COMPARATIVA FINANCIERA (STICKY SUPERIOR) ─── */
.insumos-summary-panel {
  display: flex;
  flex-direction: column;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  position: sticky;
  top: 64px;
  z-index: 15;
  margin-bottom: 12px;
}

.insumos-summary-panel .insumos-kpis-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr) !important;
  position: static !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  border: none !important;
}

.insumos-summary-panel .insumos-kpis-row1 {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.55);
}

.insumos-summary-panel .insumos-kpis-row1 .cat-canvas-kpi {
  padding: 6px 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.insumos-summary-panel .insumos-kpis-row1 .cat-canvas-kpi:last-child {
  border-right: none;
}

.insumos-summary-panel .insumos-kpis-row2 {
  background: rgba(2, 6, 23, 0.35);
}

.insumos-summary-panel .insumos-kpis-row2 .pres-kpi-card {
  padding: 5px 12px;
  background: transparent;
  border: none;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.insumos-summary-panel .insumos-kpis-row2 .pres-kpi-card:last-child {
  border-right: none;
}

.insumos-summary-panel .insumos-kpis-row2 .pres-kpi-card.is-highlight {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

.insumos-summary-panel .pres-kpi-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  margin: 0;
  line-height: 1.2;
}

.insumos-summary-panel .pres-kpi-values {
  display: flex;
  align-items: baseline;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.insumos-summary-panel .pres-kpi-orig {
  font-size: 0.72rem;
  color: #64748b;
  text-decoration: line-through;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.insumos-summary-panel .pres-kpi-arrow {
  font-size: 0.72rem;
  color: #475569;
}

.insumos-summary-panel .pres-kpi-mod {
  font-size: 0.84rem;
  font-weight: 700;
  color: #f8fafc;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.insumos-summary-panel .pres-kpi-diff {
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  margin-top: 1px;
}

.insumos-summary-panel .pres-kpi-card.is-highlight .pres-kpi-label {
  color: #e2e8f0;
  font-weight: 600;
}

.insumos-summary-panel .pres-kpi-card.is-highlight .pres-kpi-mod {
  color: #ffffff;
  font-weight: 700;
  font-size: 0.90rem;
}

@media (max-width: 900px) {
  .insumos-summary-panel .insumos-kpis-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

.cat-canvas-kpi {
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.cat-canvas-kpi:last-child {
  border-right: none;
}

.cat-canvas-kpi.is-total {
  background: rgba(255, 255, 255, 0.035);
}
.cat-canvas-kpi.is-total .cat-kpi-lbl {
  color: #e2e8f0;
  font-weight: 600;
}
.cat-canvas-kpi.is-total .cat-kpi-val {
  color: #ffffff;
  font-weight: 700;
}

/* ─── SUBTOTAL PROFORMA DESTACADO (PRECIO SIN IVA DEL CONTRATISTA) ─── */
.cat-canvas-kpi.is-subtotal-proforma,
.insumos-summary-panel .insumos-kpis-row2 .pres-kpi-card.is-subtotal-proforma {
  position: relative;
  background: linear-gradient(
    135deg var(--in-oklab),
    rgba(251, 191, 36, 0.20) 0%,
    rgba(249, 115, 22, 0.14) 55%,
    rgba(251, 191, 36, 0.08) 100%
  );
  border-left: 1px solid rgba(251, 191, 36, 0.45);
  border-right: 1px solid rgba(251, 191, 36, 0.45);
  box-shadow:
    inset 0 0 18px rgba(251, 191, 36, 0.16),
    inset 0 1px 0 rgba(253, 230, 138, 0.35),
    inset 0 -1px 0 rgba(249, 115, 22, 0.28);
}

.cat-canvas-kpi.is-subtotal-proforma::before,
.insumos-summary-panel .insumos-kpis-row2 .pres-kpi-card.is-subtotal-proforma::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg var(--in-oklab), #f97316, #fbbf24, #f97316);
  pointer-events: none;
}

.cat-canvas-kpi.is-subtotal-proforma .cat-kpi-lbl,
.insumos-summary-panel .insumos-kpis-row2 .pres-kpi-card.is-subtotal-proforma .pres-kpi-label {
  color: #fde68a;
  font-weight: 700;
}

.cat-canvas-kpi.is-subtotal-proforma .cat-kpi-val {
  color: #fef08a;
  font-size: 1.04rem;
  font-weight: 800;
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.55), 0 0 2px rgba(249, 115, 22, 0.45);
}

.insumos-summary-panel .insumos-kpis-row2 .pres-kpi-card.is-subtotal-proforma .pres-kpi-mod {
  color: #fef08a;
  font-size: 0.96rem;
  font-weight: 800;
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.55), 0 0 2px rgba(249, 115, 22, 0.45);
}

.cat-kpi-proforma-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(251, 191, 36, 0.22);
  color: #fef3c7;
  border: 1px solid rgba(251, 191, 36, 0.55);
  line-height: 1.2;
}

@keyframes subtotalProformaGlow {
  0%, 100% {
    box-shadow:
      inset 0 0 16px rgba(251, 191, 36, 0.14),
      inset 0 1px 0 rgba(253, 230, 138, 0.30),
      inset 0 -1px 0 rgba(249, 115, 22, 0.25);
  }
  50% {
    box-shadow:
      inset 0 0 24px rgba(251, 191, 36, 0.28),
      inset 0 1px 0 rgba(254, 240, 138, 0.50),
      inset 0 -1px 0 rgba(249, 115, 22, 0.45);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .cat-canvas-kpi.is-subtotal-proforma,
  .insumos-summary-panel .insumos-kpis-row2 .pres-kpi-card.is-subtotal-proforma {
    animation: subtotalProformaGlow 3.2s ease-in-out infinite;
  }
}

@media (forced-colors: active) {
  .cat-canvas-kpi.is-subtotal-proforma,
  .insumos-summary-panel .insumos-kpis-row2 .pres-kpi-card.is-subtotal-proforma {
    animation: none;
    outline: 2px solid Highlight;
    outline-offset: -2px;
    border-color: Highlight;
  }
  .cat-canvas-kpi.is-subtotal-proforma .cat-kpi-val,
  .insumos-summary-panel .insumos-kpis-row2 .pres-kpi-card.is-subtotal-proforma .pres-kpi-mod {
    text-shadow: none;
  }
  .cat-kpi-proforma-tag {
    border-color: Highlight;
    color: HighlightText;
  }
  .pres-sort-peso-btn[aria-pressed="true"] {
    outline: 2px solid Highlight;
    border-color: Highlight;
    background: Highlight;
    color: HighlightText;
  }
  .pres-peso-pct.is-top {
    border-color: Highlight;
    color: HighlightText;
  }
}

.cat-kpi-lbl {
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.cat-kpi-inline-input {
  width: 38px;
  background: var(--bg-input, #0f172a);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  font-weight: 600;
  font-size: 0.72rem;
  border-radius: 4px;
  padding: 0 2px;
  text-align: center;
  outline: none;
}

.cat-kpi-inline-input:focus {
  border-color: var(--accent, #f97316);
}

.cat-kpi-val {
  font-family: var(--font-mono, monospace);
  font-size: 0.88rem;
  font-weight: 600;
  color: #f8fafc;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.cat-canvas-kpi.is-total .cat-kpi-lbl {
  color: #e2e8f0;
  font-weight: 600;
}

.cat-canvas-kpi.is-total .cat-kpi-val {
  color: #ffffff;
  font-size: 0.98rem;
  font-weight: 700;
}

/* CONTENEDOR DE SECCIONES DE OBRA */
.cat-sections-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  padding-bottom: 80px;
}

/* TARJETA DE SECCIÓN DE OBRA (PROFORMA CARD SURFACE) */
.cat-canvas-section-card {
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.cat-canvas-section-card.is-active-target {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 8px 24px rgba(0, 0, 0, 0.3);
}

.cat-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  background: rgba(15, 23, 42, 0.35);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
}

.cat-section-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 250px;
}

.cat-section-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.cat-section-title-input {
  flex: 1;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #f8fafc;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 3px 6px;
  outline: none;
  font-family: inherit;
  transition: all 0.15s ease;
}

.cat-section-title-input:hover,
.cat-section-title-input:focus {
  background: rgba(15, 23, 42, 0.5);
  border-color: rgba(255, 255, 255, 0.14);
}

.cat-section-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cat-section-count-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 980px;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
  white-space: nowrap;
}

.cat-btn-target-section {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 980px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cat-btn-target-section:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.09);
}

.cat-btn-target-section.is-active {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  color: #f8fafc;
  font-weight: 600;
}

.cat-table-wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
}

.cat-section-rubro-table {
  width: 100%;
  border-collapse: collapse;
}

.cat-section-rubro-table th {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 8px 12px;
  font-size: 0.70rem;
  font-weight: 700;
  color: #94a3b8;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 5;
}

.cat-section-rubro-table td {
  padding: 8px 12px;
  font-size: 0.82rem;
  color: #f1f5f9;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.cat-section-rubro-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.cat-section-empty-hint {
  padding: 32px 16px;
  text-align: center;
  color: #64748b;
  font-size: 0.78rem;
}

.cat-section-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 11px 20px;
  background: rgba(15, 23, 42, 0.45);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.cat-subtotal-lbl {
  font-size: 0.74rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.cat-subtotal-val {
  font-family: var(--font-mono, monospace);
  font-size: 1.02rem;
  font-weight: 700;
  color: #f8fafc;
}

.cat-action-btns {
  display: flex;
  align-items: center;
  gap: 5px;
  justify-content: center;
}

.cat-btn-clonar {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 980px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.cat-btn-clonar:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #f8fafc;
}

.cat-btn-sm {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 980px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.cat-btn-sm:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.cat-btn-sm.is-danger {
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.25);
}

.cat-btn-sm.is-danger:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
}

/* ==========================================================================
   MODAL: APU STUDIO (PROFORMA DESIGN SYSTEM)
   ========================================================================== */
.apu-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.apu-modal-dialog {
  background: #0b1120;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  width: 95%;
  max-width: 1140px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  animation: apuModalIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes apuModalIn {
  from {
    opacity: 0;
    transform: scale(0.97) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.apu-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(15, 23, 42, 0.6);
}

.apu-modal-header-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.apu-modal-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.apu-brand-interpro {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: 980px;
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-transform: uppercase;
}

.apu-status-badge,
#apu-status-badge,
#apu-mem-badge,
#apu-cpc-badge,
#pres-backup-indicator {
  display: none !important;
}

.apu-header-title-input {
  width: 100%;
  background: var(--bg-input, #0f172a);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  color: #f8fafc;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  padding: 8px 12px;
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.apu-header-title-input:focus {
  border-color: var(--accent, #f97316);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.22);
}

/* ─── METADATOS TÉCNICOS EN LÍNEA (PROFORMA SPECS) ─── */
.apu-inline-specs-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.76rem;
  color: #94a3b8;
  margin-top: 2px;
}

.apu-spec-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.apu-spec-lbl {
  color: #64748b;
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.apu-spec-sep {
  color: rgba(255, 255, 255, 0.15);
  margin: 0 2px;
}

.apu-spec-unit {
  color: #64748b;
  font-size: 0.72rem;
}

.apu-inline-input {
  background: var(--bg-input, #0f172a);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #f8fafc;
  font-size: 0.76rem;
  font-family: inherit;
  padding: 3px 8px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}

.apu-inline-input:hover,
.apu-inline-input:focus {
  border-color: var(--accent, #f97316);
  background: #0f172a;
}

#apu-input-cod {
  min-width: 85px;
  max-width: 140px;
}

#apu-input-und {
  width: 44px;
  text-align: center;
}

#apu-input-cat {
  min-width: 130px;
  max-width: 260px;
}

#apu-input-ren {
  width: 72px;
  text-align: right;
  font-family: var(--font-mono, monospace);
}

#apu-input-ind {
  width: 60px;
  text-align: right;
  font-family: var(--font-mono, monospace);
}

.apu-inline-input.is-sm {
  width: 44px;
}

.apu-inline-input.is-num {
  text-align: right;
  font-family: var(--font-mono, monospace);
}

.apu-inline-input.is-center {
  text-align: center;
}

.apu-modal-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: #94a3b8;
  width: 30px;
  height: 30px;
  border-radius: 980px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.apu-modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.apu-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

/* ─── FILTRO SEGMENTADO (PROFORMA PILLS - SIN SCROLLER, WRAP LIMPIO) ─── */
.apu-tabs-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  background: transparent;
  padding: 0;
  border: none;
  overflow: visible;
}

.apu-filter-pill {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-size: 0.76rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 980px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  user-select: none;
  box-sizing: border-box;
}

.apu-filter-pill:hover {
  color: #f8fafc;
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(255, 255, 255, 0.16);
}

.apu-filter-pill.is-active {
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.22);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.apu-filter-count {
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-mono, monospace);
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  padding: 1px 6px;
  border-radius: 980px;
  line-height: 1.2;
}

.apu-filter-pill.is-active .apu-filter-count {
  background: rgba(255, 255, 255, 0.18);
  color: #f8fafc;
}

/* ─── SECCIONES DE INSUMOS (ESTILO PROFORMA SURFACES) ─── */
.apu-sections-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.apu-sec-box {
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  overflow: hidden;
  transition: opacity 0.2s ease;
}

.apu-sec-box.is-hidden {
  display: none !important;
}

.apu-sec-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(15, 23, 42, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
  gap: 8px;
}

.apu-sec-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #f8fafc;
}

.apu-sec-dot {
  width: 7px;
  height: 7px;
  border-radius: 980px;
}

.apu-sec-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ─── BUSCADOR INTEGRADO POR COMPONENTE ─── */
.apu-comp-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-input, #0f172a);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 980px;
  padding: 2px 12px;
  flex: 1;
  max-width: 360px;
  min-width: 200px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.apu-comp-search-wrap:focus-within {
  background: #0f172a;
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.apu-comp-search-icon {
  color: #64748b;
  margin-right: 6px;
  flex-shrink: 0;
}

.apu-comp-search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #f8fafc;
  font-size: 0.76rem;
  font-family: inherit;
  outline: none;
  padding: 4px 0;
  min-width: 0;
}

.apu-comp-search-input::placeholder {
  color: #64748b;
  font-size: 0.74rem;
}

.apu-comp-search-clear {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #94a3b8;
  border-radius: 980px;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  cursor: pointer;
  margin-left: 4px;
}

.apu-comp-search-clear:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

/* DROPDOWN DE RESULTADOS DE INSUMOS */
.apu-comp-dropdown {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  width: 440px;
  max-width: 90vw;
  max-height: 280px;
  overflow-y: auto;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.75);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  padding: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.apu-comp-dropdown-item {
  padding: 8px 11px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: all 0.12s ease;
}

.apu-comp-dropdown-item:hover,
.apu-comp-dropdown-item.is-selected {
  background: rgba(249, 115, 22, 0.12);
}

.apu-cdd-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.apu-cdd-desc {
  font-size: 0.77rem;
  font-weight: 500;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.apu-cdd-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: #94a3b8;
}

.apu-cdd-code {
  font-family: var(--font-mono, monospace);
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 4px;
  border-radius: 3px;
}

.apu-cdd-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.apu-cdd-und {
  font-size: 0.72rem;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.04);
  padding: 1px 5px;
  border-radius: 3px;
}

.apu-cdd-price {
  font-family: var(--font-mono, monospace);
  font-size: 0.82rem;
  font-weight: 600;
  color: #fb923c;
}

.apu-cdd-cpc {
  font-size: 0.72rem;
  font-family: var(--font-mono, monospace);
  color: #64748b;
}

.apu-comp-dropdown-empty {
  padding: 12px;
  text-align: center;
  font-size: 0.74rem;
  color: #64748b;
}

.apu-comp-dropdown-add-custom {
  padding: 8px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 2px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #f8fafc;
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.12s ease;
}

.apu-comp-dropdown-add-custom:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ─── TABLA DE INSUMOS APU (PROFORMA TABLE DESIGN) ─── */
.apu-table-responsive {
  width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.apu-table-responsive::-webkit-scrollbar {
  height: 4px;
}

.apu-table-responsive::-webkit-scrollbar-track {
  background: transparent;
}

.apu-table-responsive::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}

.apu-table-responsive table {
  width: 100%;
  border-collapse: collapse;
}

.apu-table-responsive th {
  background: rgba(15, 23, 42, 0.6);
  padding: 10px 12px;
  font-size: 0.71rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.apu-table-responsive td {
  padding: 8px 10px;
  font-size: 0.81rem;
  color: #f1f5f9;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.apu-table-responsive tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.apu-table-responsive .pres-cell-input {
  width: 100%;
  max-width: 80px;
  min-width: 50px;
  box-sizing: border-box;
  background: var(--bg-input, #0f172a);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 0.78rem;
  color: #f8fafc;
  font-family: var(--font-mono, monospace);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.apu-table-responsive .pres-cell-input:focus {
  border-color: var(--accent, #f97316);
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.22);
}

.apu-table-responsive tfoot tr {
  background: rgba(15, 23, 42, 0.35);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.apu-btn-del-row {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 0.75rem;
  transition: all 0.15s ease;
}

.apu-btn-del-row:hover {
  color: #f87171;
  background: rgba(248, 113, 113, 0.12);
}

/* ─── RESUMEN SENCILLO Y PROFESIONAL DEL APU (PROFORMA TOTALS STYLE) ─── */
.apu-simple-summary {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.apu-summary-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 320px;
  max-width: 440px;
  width: 100%;
}

.apu-sum-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.84rem;
  color: #94a3b8;
}

.apu-sum-lbl {
  font-weight: 500;
}

.apu-sum-val {
  font-family: var(--font-mono, monospace);
  font-weight: 600;
  color: #f1f5f9;
  text-align: right;
  font-size: 0.9rem;
}

.apu-sum-row.is-total {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 10px;
  margin-top: 6px;
}

.apu-sum-row.is-total .apu-sum-lbl {
  font-size: 0.96rem;
  font-weight: 700;
  color: #f8fafc;
}

.apu-sum-val.is-total-val {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent, #f97316);
}

.apu-texto-letras {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  font-size: 0.74rem;
  font-style: italic;
  color: #94a3b8;
  letter-spacing: 0.01em;
}

.apu-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: rgba(15, 23, 42, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
  gap: 10px;
}

.apu-modal-footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Píldora de acción en la tabla de rubros */
.apu-row-pill {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 980px;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 3px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.apu-row-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   MODAL: AÑADIR COMPONENTE CON ASISTENTE CPC
   ========================================================================== */
.comp-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.comp-modal-dialog {
  background: #0b1120;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

.comp-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: rgba(15, 23, 42, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.comp-modal-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #f8fafc;
}

.comp-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.comp-type-selector {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.3);
  padding: 3px;
  border-radius: 980px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.comp-type-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 6px 10px;
  border-radius: 980px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.comp-type-btn:hover {
  color: #f8fafc;
}

.comp-type-btn.is-active {
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.comp-search-box-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.comp-field-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
}

/* Buscador de recursos integrado en la página / modal */
.pres-search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-input, #0f172a);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 980px;
  padding: 3px 12px;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.pres-search-box:focus-within {
  background: #0f172a;
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.pres-search-box svg {
  color: #64748b;
  flex-shrink: 0;
}

.pres-search-box input,
#comp-catalog-search {
  flex: 1;
  background: transparent !important;
  border: none !important;
  color: #f8fafc !important;
  font-size: 0.82rem;
  font-family: inherit;
  outline: none !important;
  padding: 5px 0;
  width: 100%;
}

.pres-search-box input::placeholder,
#comp-catalog-search::placeholder {
  color: #64748b;
  font-size: 0.8rem;
}

.comp-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 10;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  margin-top: 4px;
}

.comp-dropdown-item {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.77rem;
  transition: background 0.12s ease;
}

.comp-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.07);
}

.comp-fields-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.comp-field-col.is-full {
  grid-column: span 4;
}

.comp-field-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.comp-field-col input {
  width: 100%;
  box-sizing: border-box;
}

.comp-field-col .pres-cell-input {
  width: 100%;
  background: var(--bg-input, #0f172a);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 7px 10px;
  color: #f8fafc;
  font-size: 0.82rem;
  text-align: left;
}

.comp-field-col .pres-cell-input:focus {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
  background: #0f172a;
}

.comp-field-col .pres-cell-input.is-center {
  text-align: center;
}

.comp-field-col .pres-cell-input.is-num {
  text-align: right;
}

/* ─── BOTÓN FERRETERIAS EN APU STUDIO ─── */
.apu-btn-ferr-modal {
  background: rgba(56, 189, 248, 0.12) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
  font-weight: 600 !important;
  transition: all 0.15s ease !important;
}
.apu-btn-ferr-modal:hover {
  background: rgba(56, 189, 248, 0.22) !important;
  color: #7dd3fc !important;
  border-color: rgba(56, 189, 248, 0.5) !important;
}

/* ─── CAJA ASISTENTE FERRETERIAS (SIN MARCA Y PRECIOS REALES) ─── */
.comp-ferr-assistant-box {
  background: rgba(14, 165, 233, 0.05);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comp-ferr-asst-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.comp-ferr-asst-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #38bdf8;
}

.comp-ferr-badge-count {
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.2);
  color: #7dd3fc;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  font-family: var(--font-mono, monospace);
}

.comp-ferr-asst-sub {
  font-size: 0.7rem;
  color: #94a3b8;
}

.comp-ferr-proposals-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}

.comp-ferr-empty {
  font-size: 0.74rem;
  color: #64748b;
  font-style: italic;
  padding: 6px 0;
}

.comp-ferr-prop-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.comp-ferr-prop-card:hover {
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(56, 189, 248, 0.1);
  transform: translateY(-1px);
}

.comp-ferr-prop-card.is-selected {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.18);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.3);
}

.comp-ferr-prop-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.comp-ferr-desc-line {
  font-size: 0.78rem;
  font-weight: 600;
  color: #f1f5f9;
  white-space: normal;
  line-height: 1.3;
}

.comp-ferr-meta-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.70rem;
  color: #94a3b8;
  flex-wrap: wrap;
}

.comp-ferr-type-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
}
.comp-ferr-type-badge.is-equipo {
  background: rgba(251, 146, 60, 0.2);
  color: #fb923c;
  border: 1px solid rgba(251, 146, 60, 0.3);
}
.comp-ferr-type-badge.is-material {
  background: rgba(52, 211, 153, 0.2);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.comp-ferr-cpc-code {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  color: #cbd5e1;
}

.comp-ferr-prop-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.comp-ferr-price {
  font-size: 0.85rem;
  font-weight: 700;
  color: #4ade80;
  font-family: var(--font-mono, monospace);
}

.comp-ferr-btn-use {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.70rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.comp-ferr-btn-use:hover {
  background: #38bdf8;
  color: #0f172a;
}

/* ─── CAJA ASISTENTE CPC (PROFORMA STYLING) ─── */
.comp-cpc-assistant-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comp-cpc-asst-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.comp-cpc-asst-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #e2e8f0;
}

.comp-cpc-asst-sub {
  font-size: 0.7rem;
  color: #94a3b8;
}

.comp-cpc-proposals-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.comp-cpc-empty {
  font-size: 0.74rem;
  color: #64748b;
  font-style: italic;
  padding: 6px 0;
}

.comp-cpc-prop-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.comp-cpc-prop-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
}

.comp-cpc-prop-card.is-selected {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.12);
}

.comp-cpc-prop-left {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.comp-cpc-code-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono, monospace);
  font-size: 0.74rem;
  font-weight: 700;
  color: #e2e8f0;
}

.comp-cpc-desc-line {
  font-size: 0.72rem;
  color: #94a3b8;
}

.comp-cpc-confidence {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.comp-cpc-confidence.is-alta {
  background: rgba(52, 211, 153, 0.2);
  color: #34d399;
}

.comp-cpc-confidence.is-media {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
}

.comp-cpc-confidence.is-sugerida {
  background: rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
}

.comp-cpc-manual-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.comp-cpc-manual-lbl {
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  white-space: nowrap;
}

.comp-cpc-manual-input {
  width: 130px;
  background: var(--bg-input, #0f172a);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  padding: 5px 8px;
  border-radius: 6px;
  font-family: var(--font-mono, monospace);
  font-size: 0.74rem;
  outline: none;
}

.comp-cpc-manual-input:focus {
  border-color: var(--accent, #f97316);
}

.comp-cpc-manual-desc {
  flex: 1;
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 0.72rem;
  outline: none;
}

.comp-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 20px;
  background: rgba(15, 23, 42, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ─── BARRA DE PLANTILLA (CREAR RUBRO A PARTIR DE EXISTENTE) ─── */
.apu-template-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 8px 0;
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 9px;
  flex-wrap: wrap;
}

.apu-template-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
  white-space: nowrap;
}

.apu-template-search-wrap {
  position: relative;
  flex: 1;
  min-width: 240px;
  display: flex;
  align-items: center;
}

.apu-template-search-input {
  width: 100%;
  padding: 6px 26px 6px 28px;
  font-size: 0.78rem;
  color: #f8fafc;
  background: var(--bg-input, #0f172a);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.apu-template-search-input:focus {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.apu-template-dropdown {
  left: 0;
  right: 0;
  width: 100%;
  max-height: 260px;
  z-index: 1200;
}

/* ─── BADGE DE RESPALDO TEMPORAL ─── */
.cat-backup-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 999px;
  white-space: nowrap;
}

/* ─── REORDENAMIENTO DE RUBROS EN SECCIONES (DRAG & DROP) ─── */
.cat-drag-handle,
.cat-order-btns {
  display: none !important;
}

tr.cat-rubro-row {
  cursor: grab;
  transition: background 0.15s ease;
}

tr.cat-rubro-row:active {
  cursor: grabbing;
}

tr.cat-rubro-row input {
  cursor: text;
}

tr.cat-rubro-row.is-dragging {
  opacity: 0.45;
  background: rgba(255, 255, 255, 0.05);
}

tr.cat-rubro-row.is-drag-over {
  border-top: 2px solid var(--accent, #f97316) !important;
  background: rgba(249, 115, 22, 0.06);
}

/* ==========================================================================
   VISTA 3: DESAGREGACIÓN TECNOLÓGICA Y VAE (FORMATO OFICIAL SERCOP)
   ========================================================================== */
.vae-top-subtitle {
  font-size: 0.8rem;
  color: #94a3b8;
  margin: 4px 0 0 0;
  line-height: 1.4;
}

.vae-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 980px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.vae-status-badge.is-cumple {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.vae-status-badge.is-alerta {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.vae-table-surface {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.vae-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(15, 23, 42, 0.7);
  flex-shrink: 0;
}

.vae-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 5px 12px;
  border-radius: 8px;
  min-width: 280px;
  color: #94a3b8;
}

.vae-search-input {
  background: transparent;
  border: none;
  color: #f8fafc;
  font-size: 0.78rem;
  width: 100%;
  outline: none;
}

.vae-counter-tag {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 500;
}

.vae-table-scroll {
  overflow-x: auto;
  overflow-y: auto;
  max-width: 100%;
  max-height: calc(100vh - 215px);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) rgba(15, 23, 42, 0.2);
}

.vae-table-scroll::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.vae-table-scroll::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.2);
}
.vae-table-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 9999px;
}
.vae-table-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.45);
}

.vae-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  color: #f8fafc;
}

.vae-table th {
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 8px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 10;
}

.vae-table-totals-header-row td {
  background: rgba(22, 29, 47, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid rgba(255, 255, 255, 0.12);
  padding: 7px 8px;
  position: sticky;
  top: 31px;
  z-index: 9;
}

.vae-table td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
  font-size: 0.77rem;
}

.vae-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.vae-cpc-tag {
  font-family: var(--font-mono, monospace);
  font-size: 0.76rem;
  font-weight: 600;
  background: transparent;
  border: none;
  padding: 0;
  border-radius: 0;
  color: #cbd5e1;
}

.vae-pct-pill {
  font-family: var(--font-mono, monospace);
  font-weight: 600;
  font-size: 0.76rem;
  padding: 2px 6px;
  border-radius: 4px;
}

.vae-pct-pill.is-high {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.vae-pct-pill.is-mid {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.vae-pct-pill.is-low {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.vae-btn-view-apu {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.vae-btn-view-apu:hover {
  background: var(--accent, #f97316);
  border-color: var(--accent, #f97316);
  color: #fff;
}

.vae-empty-state {
  padding: 48px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.vae-empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
}

.vae-empty-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
}

.vae-empty-sub {
  font-size: 0.82rem;
  color: #94a3b8;
  max-width: 460px;
  line-height: 1.5;
}

/* ==========================================================================
   CRONOGRAMA VALORADO DE TRABAJO (SERCOP / APPLE MINIMALISTA)
   ========================================================================== */
.crono-period-stepper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 3px 6px;
}

.crono-step-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  width: 24px;
  height: 24px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.crono-step-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.crono-period-input {
  width: 40px;
  text-align: center;
  background: transparent;
  border: none;
  color: #38bdf8;
  font-weight: 700;
  font-size: 0.95rem;
  font-family: var(--font-mono, monospace);
  outline: none;
}

.crono-unit-select {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.78rem;
  outline: none;
  cursor: pointer;
}

.crono-batch-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 10px;
  margin-bottom: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: all 0.2s ease;
}

.crono-batch-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.crono-batch-pill {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 3px 9px;
  border-radius: 999px;
}

.crono-batch-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.crono-btn-sm {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.crono-btn-sm:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.crono-btn-sm.is-primary {
  background: var(--accent, #f97316);
  border-color: var(--accent, #f97316);
  color: #fff;
}

.crono-btn-sm.is-primary:hover {
  filter: brightness(1.1);
}

.crono-table-surface {
  background: #0b1120;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.crono-table-scroll {
  overflow-x: auto;
  overflow-y: auto;
  max-width: 100%;
  max-height: calc(100vh - 250px);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) rgba(15, 23, 42, 0.2);
}

.crono-table-scroll::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.crono-table-scroll::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.2);
}
.crono-table-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 9999px;
}
.crono-table-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.45);
}

.crono-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.81rem;
}

.crono-table thead th {
  background: #111827;
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}

.crono-table thead tr:first-child th {
  position: sticky;
  top: 0;
  z-index: 11;
  height: 32px;
  box-sizing: border-box;
}

.crono-table thead tr:first-child th[rowspan] {
  z-index: 12;
  height: 58px;
}

.crono-table thead tr:nth-child(2) th {
  position: sticky;
  top: 32px;
  z-index: 10;
  height: 26px;
  box-sizing: border-box;
  font-size: 0.72rem;
  padding: 4px 8px;
  background: #111827;
}

.crono-table tbody td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  vertical-align: middle;
}

.crono-table tr:hover td {
  background: rgba(255, 255, 255, 0.025);
}

.crono-table tr.is-selected td {
  background: rgba(56, 189, 248, 0.07);
}

.crono-check {
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: var(--accent, #f97316);
}

.crono-cell-period {
  min-width: 105px;
  text-align: center;
  padding: 4px 6px !important;
}

.crono-slot-empty {
  width: 100%;
  min-height: 42px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.15s ease;
  user-select: none;
}

.crono-slot-empty:hover {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.08);
  color: #38bdf8;
}

.crono-slot-active {
  width: 100%;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.4), rgba(15, 23, 42, 0.8));
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 4px 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
  transition: all 0.15s ease;
}

.crono-slot-active:hover {
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.crono-slot-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.crono-pct-input-wrap {
  display: inline-flex;
  align-items: center;
}

.crono-pct-input {
  width: 44px;
  text-align: right;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  color: #38bdf8;
  font-weight: 700;
  font-size: 0.76rem;
  font-family: var(--font-mono, monospace);
  padding: 1px 3px;
  outline: none;
}

.crono-pct-input:focus {
  border-color: #38bdf8;
  background: #000;
}

.crono-pct-suffix {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-left: 2px;
}

.crono-slot-del-btn,
.crono-slot-del {
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 1px 4px;
  font-size: 0.82rem;
  line-height: 1;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.crono-slot-del-btn:hover,
.crono-slot-del:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
}

.crono-single-100 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono, monospace);
  font-weight: 800;
  font-size: 0.78rem;
  color: #38bdf8;
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 4px;
  padding: 2px 7px;
  letter-spacing: -0.01em;
}

.crono-slot-active.is-single {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.20), rgba(15, 23, 42, 0.75));
  border-color: rgba(56, 189, 248, 0.45);
}

.crono-btn-add-period {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 10px;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.crono-btn-add-period:hover {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.10);
}

.crono-slot-money {
  font-size: 0.70rem;
  font-family: var(--font-mono, monospace);
  color: #f1f5f9;
  text-align: right;
  font-weight: 500;
}

.crono-pct-badge {
  font-family: var(--font-mono, monospace);
  font-weight: 700;
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.crono-pct-badge.is-ok {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.crono-pct-badge.is-pending {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.crono-pct-badge.is-over {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.crono-summary-row td {
  background: #0f172a !important;
  font-weight: 700;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 10px;
}

.crono-summary-row.is-parcial td {
  color: #e2e8f0;
}

.crono-summary-row.is-acumulado td {
  background: #090e1a !important;
  color: var(--apple-green, #10b981);
}

/* Modal de Asignación Rápida de Períodos */
.crono-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.crono-modal-box {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  width: 90%;
  max-width: 480px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  padding: 24px;
}

.crono-modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 6px 0;
}

.crono-modal-desc {
  font-size: 0.82rem;
  color: #94a3b8;
  margin: 0 0 16px 0;
  line-height: 1.4;
}

.crono-period-chips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  margin-bottom: 18px;
  max-height: 220px;
  overflow-y: auto;
}

.crono-period-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 0.80rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.crono-period-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.crono-period-chip.is-selected {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
}

.crono-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

/* ─── PINCEL DE ASIGNACIÓN RÁPIDA POR ARRASTRE ─── */
.crono-brush-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  padding: 8px 16px;
  margin-bottom: 0;
  flex-shrink: 0;
}

.crono-brush-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.crono-brush-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: -0.01em;
}

.crono-brush-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.crono-brush-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.16s ease;
  user-select: none;
}

.crono-brush-chip:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.crono-brush-chip.is-active {
  background: rgba(14, 165, 233, 0.22);
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.crono-brush-chip.is-eraser.is-active {
  background: rgba(239, 68, 68, 0.20);
  border-color: #f87171;
  color: #f87171;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.25);
}

.crono-brush-hint {
  font-size: 0.74rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

/* ─── ESTILOS DE ARRASTRE ACTIVO (DRAG PAINTING) ─── */
body.is-crono-dragging,
body.is-crono-dragging * {
  user-select: none !important;
  -webkit-user-select: none !important;
}

body.is-crono-dragging .crono-table {
  cursor: cell !important;
}

.crono-table tbody tr.is-paint-hover {
  background: rgba(56, 189, 248, 0.12) !important;
  transition: background 0.1s ease;
}

.crono-table tbody tr.is-eraser-hover {
  background: rgba(239, 68, 68, 0.12) !important;
  transition: background 0.1s ease;
}

/* ─── BOTÓN DISTRIBUIR % EN FILA ─── */
.crono-btn-dist-row {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.crono-btn-dist-row:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  transform: translateY(-1px);
}

/* ─── MODAL DISTRIBUCIÓN AVANZADA DE PORCENTAJES ─── */
.crono-modal-dist-box {
  max-width: 580px;
  width: 95%;
}

.crono-dist-presets {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
}

.crono-btn-chip-preset {
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.15s ease;
}

.crono-btn-chip-preset:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
}

.crono-dist-rows-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  margin-bottom: 14px;
  padding-right: 4px;
}

.crono-dist-period-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  transition: all 0.15s ease;
}

.crono-dist-period-row.is-active {
  background: rgba(56, 189, 248, 0.06);
  border-color: rgba(56, 189, 248, 0.25);
}

.crono-dist-period-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #f8fafc;
  min-width: 110px;
}

.crono-dist-period-middle {
  display: flex;
  align-items: center;
  gap: 6px;
}

.crono-dist-pct-input {
  width: 65px;
  padding: 5px 8px;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--font-mono, monospace);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: #38bdf8;
  text-align: right;
}

.crono-dist-pct-input:focus {
  border-color: #38bdf8;
  outline: none;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.25);
}

.crono-dist-period-right {
  font-size: 0.80rem;
  font-family: var(--font-mono, monospace);
  color: #cbd5e1;
  min-width: 90px;
  text-align: right;
  font-weight: 600;
}

.crono-dist-balance-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 8px;
  margin-bottom: 12px;
}

/* ==========================================================================
   BARRA DE ASIGNACIÓN AUTOMÁTICA DE CÓDIGOS CPC & BADGES EN TRES COLORES
   ========================================================================== */
.pres-cpc-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 16px;
  margin-bottom: 0;
  background: rgba(15, 23, 42, 0.7);
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  flex-wrap: wrap;
  flex-shrink: 0;
}

.pres-cpc-action-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.pres-cpc-status-tag {
  font-size: 0.78rem;
  font-weight: 500;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  padding: 4px 10px;
  border-radius: 980px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  animation: fadeIn 0.25s ease-out;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.pres-sort-peso-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 980px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.28);
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
  user-select: none;
}

.pres-sort-peso-btn:hover {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.45);
  color: #fef3c7;
}

.pres-sort-peso-btn:focus-visible {
  outline: 2px solid #f59e0b;
  outline-offset: 2px;
}

.pres-sort-peso-btn[aria-pressed="true"],
.pres-sort-peso-btn.is-active {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.72);
  color: #fde68a;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.25), 0 4px 14px rgba(245, 158, 11, 0.16);
}

.pres-sort-peso-icon {
  font-size: 0.9rem;
  line-height: 1;
}

.pres-peso-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pres-peso-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.pres-peso-pct {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 980px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.pres-peso-pct.is-top {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.45);
}

.pres-peso-pct.is-mo-fixed {
  color: #d8b4fe;
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.3);
}

.pres-peso-monto {
  font-size: 0.70rem;
  color: #94a3b8;
  font-weight: 500;
}

#pres-active-table.is-vt-reordering tbody tr {
  view-transition-name: match-element;
}

@media (prefers-reduced-motion: reduce) {
  #pres-active-table.is-vt-reordering tbody tr,
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
    transition: none !important;
  }
}

.pres-cpc-action-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.pres-cpc-legend-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pres-cpc-legend-items {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cpc-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 980px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  transition: all 0.15s ease;
  user-select: none;
}

.cpc-legend-item.is-alta {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.08);
  color: #6ee7b7;
}

.cpc-legend-item.is-media {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.08);
  color: #fcd34d;
}

.cpc-legend-item.is-baja {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.08);
  color: #fca5a5;
}

.cpc-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.cpc-dot.is-alta {
  background: #10b981;
  box-shadow: 0 0 7px rgba(16, 185, 129, 0.7);
}

.cpc-dot.is-media {
  background: #f59e0b;
  box-shadow: 0 0 7px rgba(245, 158, 11, 0.7);
}

.cpc-dot.is-baja {
  background: #ef4444;
  box-shadow: 0 0 7px rgba(239, 68, 68, 0.7);
}

.cpc-dot.is-vacio {
  background: #64748b;
}

.cpc-count-tag {
  font-family: var(--font-mono, monospace);
  font-size: 0.70rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 980px;
  background: rgba(255, 255, 255, 0.1);
}

/* ─── CÓDIGO CPC EN TABLA (SOLO NÚMERO, SIN CUADRO, COLOR SEGÚN COINCIDENCIA) ─── */
.cpc-badge-btn {
  display: inline-block;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--font-mono, monospace);
  color: #cbd5e1;
  cursor: pointer;
  transition: opacity 0.15s ease, color 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: none !important;
  outline: none;
}

.cpc-badge-btn:hover {
  opacity: 0.85;
  text-decoration: underline;
  transform: none !important;
  filter: none !important;
  box-shadow: none !important;
}

.cpc-badge-btn:active {
  transform: none !important;
}

/* Color 1: Verde (Alta coincidencia SERCOP) */
.cpc-badge-btn.is-cpc-alta {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #34d399 !important;
}
.cpc-badge-btn.is-cpc-alta:hover {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #10b981 !important;
}

/* Color 2: Amarillo / Ámbar (Media coincidencia) */
.cpc-badge-btn.is-cpc-media {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #fbbf24 !important;
}
.cpc-badge-btn.is-cpc-media:hover {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #f59e0b !important;
}

/* Color 3: Rojo (Baja coincidencia / Sugerida) */
.cpc-badge-btn.is-cpc-baja {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #f87171 !important;
}
.cpc-badge-btn.is-cpc-baja:hover {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #ef4444 !important;
}

/* Sin asignar / Vacío */
.cpc-badge-btn.is-cpc-vacio {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #64748b !important;
}
.cpc-badge-btn.is-cpc-vacio:hover {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #94a3b8 !important;
}

.cpc-edit-icon {
  display: none !important;
}

/* ─── CELDA EDITABLE % VAE EN INSUMOS ─── */
.pres-vae-cell-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  padding: 2px 6px;
  transition: all 0.15s ease;
}

.pres-vae-cell-wrap:focus-within {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
  background: #0f172a;
}

.pres-vae-input {
  width: 58px;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  color: #f1f5f9;
  font-family: var(--font-mono, monospace);
  font-size: 0.76rem;
  font-weight: 600;
  text-align: right;
  padding: 2px 0;
}

.pres-vae-symbol {
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 600;
  user-select: none;
}

.pres-vae-cell-wrap.is-modified {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.14);
}

.pres-vae-cell-wrap.is-modified .pres-vae-input {
  color: #38bdf8;
  font-weight: 700;
}

.pres-vae-cell-wrap.is-modified .pres-vae-symbol {
  color: #38bdf8;
}

.pres-meta-chip.is-vae-chip {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ─── MODAL CPC CHANGER PICKER (COMPACTO & OPTIMIZADO) ─── */
.cpc-modal-dialog {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  width: 94%;
  max-width: 780px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
  animation: modalScaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.cpc-modal-header {
  padding: 10px 18px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.8);
}

.cpc-modal-header-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.cpc-modal-eyebrow-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.70rem;
}

.cpc-modal-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  color: #38bdf8;
  font-size: 0.72rem;
}

.cpc-modal-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cpc-modal-insumo-meta {
  font-size: 0.70rem;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 7px;
  border-radius: 4px;
  font-weight: 500;
}

.cpc-modal-body {
  padding: 10px 18px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* AI INSIGHT COMPACTO */
.cpc-ai-insight-box {
  margin: 0;
  padding: 6px 10px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08) 0%, rgba(139, 92, 246, 0.09) 100%);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
}

.cpc-ai-compact-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.cpc-ai-compact-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.cpc-ai-badge-score {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono, monospace);
  flex-shrink: 0;
}

.cpc-ai-badge-score.is-alta {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #34d399;
}

.cpc-ai-badge-score.is-media {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fbbf24;
}

.cpc-ai-badge-score.is-baja {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #f87171;
}

.cpc-ai-insight-reason {
  font-size: 0.74rem;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.cpc-ai-compact-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.cpc-ai-alt-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
  font-size: 0.70rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  height: 24px;
}

.cpc-ai-alt-pill:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
}

.cpc-btn-reanalyze {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.70rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  height: 24px;
}

.cpc-btn-reanalyze:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
}

/* BUSCADOR COMPACTO */
.cpc-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: #94a3b8;
  transition: all 0.2s ease;
}

.cpc-search-box:focus-within {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
  color: #38bdf8;
}

.cpc-search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: #f8fafc;
  font-size: 0.80rem;
  width: 100%;
}

.cpc-clear-btn {
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  font-size: 0.78rem;
  padding: 0 4px;
}
.cpc-clear-btn:hover {
  color: #f8fafc;
}

/* SECCIÓN HEADER */
.cpc-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 1px 0;
}

.cpc-section-title {
  font-size: 0.70rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.cpc-section-badge {
  font-size: 0.72rem;
  font-family: var(--font-mono, monospace);
  color: #64748b;
}

/* LISTA DE CARDS COMPACTAS */
.cpc-list-container {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 290px;
  overflow-y: auto;
  padding-right: 2px;
}

.cpc-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cpc-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(56, 189, 248, 0.4);
}

.cpc-card.is-selected {
  background: rgba(56, 189, 248, 0.12);
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.cpc-card-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.cpc-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cpc-card-code {
  font-family: var(--font-mono, monospace);
  font-size: 0.80rem;
  font-weight: 700;
  color: #f8fafc;
}

.cpc-card-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cpc-card-badge.is-alta {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.cpc-card-badge.is-media {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.cpc-card-badge.is-baja {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.cpc-card-vae {
  font-size: 0.72rem;
  font-family: var(--font-mono, monospace);
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 5px;
  border-radius: 4px;
}

.cpc-card-desc {
  font-size: 0.72rem;
  color: #cbd5e1;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.cpc-card-select-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  font-size: 0.70rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  flex-shrink: 0;
  height: 24px;
}

.cpc-card:hover .cpc-card-select-btn {
  background: #38bdf8;
  border-color: #38bdf8;
  color: #0f172a;
}

.cpc-card.is-selected .cpc-card-select-btn {
  background: #10b981;
  border-color: #10b981;
  color: #ffffff;
}

/* CAJA MANUAL COMPACTA */
.cpc-manual-box {
  margin-top: 2px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.cpc-manual-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.cpc-manual-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.cpc-manual-code-input {
  width: 110px;
  height: 26px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-family: var(--font-mono, monospace);
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  color: #f8fafc;
}

.cpc-manual-desc-input {
  flex: 1;
  min-width: 160px;
  height: 26px;
  padding: 2px 8px;
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  color: #f8fafc;
}

.cpc-manual-code-input:focus,
.cpc-manual-desc-input:focus {
  border-color: #38bdf8;
  outline: none;
}

#cpc-manual-vae {
  height: 26px;
  font-size: 0.74rem;
  padding: 2px 4px;
  width: 58px;
}

#btn-apply-cpc-manual {
  height: 26px;
  padding: 0 10px;
  font-size: 0.70rem;
  border-radius: 5px;
}

/* FOOTER COMPACTO */
.cpc-modal-footer {
  padding: 8px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.85);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cpc-selected-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.cpc-selected-label {
  font-size: 0.72rem;
  color: #94a3b8;
  flex-shrink: 0;
}

.cpc-selected-badge {
  font-family: var(--font-mono, monospace);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 5px;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
  max-width: 500px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  vertical-align: middle;
}

.cpc-selected-badge.is-empty {
  background: rgba(255, 255, 255, 0.05);
  color: #64748b;
  border-color: rgba(255, 255, 255, 0.1);
}

.cpc-modal-footer-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

#btn-cancel-cpc-modal {
  height: 26px;
  padding: 0 14px;
  font-size: 0.72rem;
  border-radius: 5px;
}

.cpc-btn-confirm-mini {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.6);
  color: #fbbf24;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  margin-left: 6px;
  transition: all 0.15s ease;
}

.cpc-btn-confirm-mini:hover {
  background: #f59e0b;
  color: #0f172a;
}


/* ─── OCULTAR FOOTER PUBLICITARIO DE LA SIDEBAR DE RUBROS ─── */
.cat-sidebar-footer {
  display: none !important;
}


/* ==========================================================================
   GESTOR DE PRESUPUESTOS EN MEMORIA (LOCALSTORAGE) Y PRINT STYLES
   ========================================================================== */
.storage-modal-dialog {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  width: 94%;
  max-width: 720px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
  animation: modalScaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.storage-modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.storage-modal-eyebrow-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.storage-modal-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #38bdf8;
}

.storage-modal-badge {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  text-transform: uppercase;
}

.storage-modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #f8fafc;
}

.storage-modal-sub {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.4;
}

.storage-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.storage-form-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
}

.storage-form-title {
  margin: 0 0 12px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #f8fafc;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.storage-form-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
}

.storage-field-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.storage-field-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
}

.storage-input,
.storage-textarea {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 8px 12px;
  color: #f8fafc;
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease;
}

.storage-input:focus,
.storage-textarea:focus {
  border-color: #38bdf8;
}

.storage-textarea {
  resize: vertical;
}

.storage-form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.storage-history-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.storage-history-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.storage-history-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #f8fafc;
}

.storage-history-hint {
  font-size: 0.75rem;
  color: #64748b;
}

.pres-storage-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pres-storage-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: all 0.15s ease;
}

.pres-storage-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.pres-storage-item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.pres-storage-item-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pres-storage-item-title {
  font-size: 0.92rem;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pres-storage-item-date {
  font-size: 0.72rem;
  color: #64748b;
  font-family: var(--font-mono, monospace);
}

.pres-storage-item-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
}

.pres-storage-item-total {
  color: #34d399;
  font-weight: 700;
  font-family: var(--font-mono, monospace);
}

.pres-storage-item-details {
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pres-storage-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.pres-storage-btn-delete {
  background: transparent;
  border: none;
  color: #94a3b8;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.15s ease;
}

.pres-storage-btn-delete:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.pres-storage-empty {
  padding: 24px;
  text-align: center;
  color: #64748b;
  font-size: 0.82rem;
  font-style: italic;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

.storage-modal-footer {
  padding: 14px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.storage-footer-note {
  font-size: 0.72rem;
  color: #64748b;
}

/* Card en Entry Screen */
.pres-saved-storage-card {
  margin-top: 24px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px 22px;
}

.pres-saved-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.pres-saved-card-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #38bdf8;
}

.pres-saved-card-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #f8fafc;
}

.pres-saved-badge {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}

/* ==========================================================================
   ESTILOS DE IMPRESIÓN Y PDF (WINDOW.PRINT)
   ========================================================================== */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .nav,
  .cat-sidebar,
  .pres-step-nav,
  .pres-workflow-topbar,
  .cat-canvas-actions,
  .apu-modal-overlay,
  .pres-entry-surface,
  .apple-pill-btn,
  .apple-link-btn,
  .cpc-badge-link,
  .cat-sec-actions,
  .cat-rubro-row-actions {
    display: none !important;
  }
  .pres-workspace,
  .cat-canvas,
  #pres-view-catalogo {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .cat-canvas-header-card {
    border: none !important;
    background: transparent !important;
    padding: 0 0 16px 0 !important;
  }
  .cat-canvas-title-input {
    color: #000000 !important;
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    border: none !important;
    padding: 0 !important;
  }
  .cat-canvas-kpis-grid {
    border: 1px solid #cbd5e1 !important;
    background: #f8fafc !important;
  }
  .cat-kpi-lbl {
    color: #475569 !important;
  }
  .cat-kpi-val {
    color: #000000 !important;
  }
  .cat-canvas-kpi.is-subtotal-proforma,
  .insumos-summary-panel .insumos-kpis-row2 .pres-kpi-card.is-subtotal-proforma {
    animation: none !important;
    background: #fffbeb !important;
    border: 1px solid #b45309 !important;
    box-shadow: none !important;
  }
  .cat-canvas-kpi.is-subtotal-proforma::before,
  .insumos-summary-panel .insumos-kpis-row2 .pres-kpi-card.is-subtotal-proforma::before {
    display: none !important;
  }
  .cat-canvas-kpi.is-subtotal-proforma .cat-kpi-lbl,
  .cat-canvas-kpi.is-subtotal-proforma .cat-kpi-val,
  .insumos-summary-panel .insumos-kpis-row2 .pres-kpi-card.is-subtotal-proforma .pres-kpi-label,
  .insumos-summary-panel .insumos-kpis-row2 .pres-kpi-card.is-subtotal-proforma .pres-kpi-mod {
    color: #000000 !important;
    text-shadow: none !important;
  }
  .cat-kpi-proforma-tag {
    background: transparent !important;
    color: #000000 !important;
    border: 1px solid #b45309 !important;
  }
  .cat-section-card {
    border: 1px solid #cbd5e1 !important;
    background: #ffffff !important;
    page-break-inside: avoid;
    margin-bottom: 20px !important;
  }
  .cat-sec-header {
    background: #f1f5f9 !important;
    border-bottom: 1px solid #cbd5e1 !important;
  }
  .cat-sec-title-input {
    color: #000000 !important;
    font-weight: 700 !important;
  }
  .pres-data-table {
    width: 100% !important;
    border-collapse: collapse !important;
  }
  .pres-data-table th,
  .pres-data-table td {
    color: #000000 !important;
    border: 1px solid #cbd5e1 !important;
    padding: 6px 8px !important;
    font-size: 0.78rem !important;
  }
  .pres-cell-input {
    color: #000000 !important;
    border: none !important;
  }
}


.pres-saved-card-sub {
  margin: 0 0 16px 0;
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.4;
}

.btn-storage-load {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  cursor: pointer;
  background: var(--accent, #38bdf8) !important;
  color: #0f172a !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.25);
}

.btn-storage-load:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}


/* Acciones en la barra superior del flujo (Presupuestos / Presupuesto de Obra / Cambiar proyecto) */
.pres-workflow-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

#btn-top-guardados {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  padding: 6px 12px;
}

#btn-top-guardar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  padding: 6px 14px;
}

/* ─── SELECTOR COMPACTO DE FORMATO (APPLE SEGMENTED PILL) ─── */
.format-selector-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.55);
  padding: 2px 4px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  height: 28px;
  box-sizing: border-box;
}

.format-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: -0.01em;
  padding-left: 4px;
  white-space: nowrap;
  user-select: none;
}

.segmented-control {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 1.5px;
  gap: 1.5px;
  height: 22px;
  box-sizing: border-box;
}

.segment-btn {
  background: transparent;
  border: none;
  outline: none;
  color: #94a3b8;
  padding: 2px 8px;
  border-radius: 4.5px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  height: 19px;
  line-height: 1;
}

.segment-btn:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.06);
}

.segment-btn.active {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.palette-dots {
  display: inline-flex;
  align-items: center;
  gap: 2.5px;
  margin-left: 2px;
}

.palette-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-sizing: border-box;
}

.dot-major {
  background-color: var(--brand-major, #1e293b);
}

.dot-medium {
  background-color: var(--brand-medium, #334155);
}

.dot-minor {
  background-color: var(--brand-minor, #64748b);
}


/* ==========================================================================
   VISTA PREVIA DE FOTO EN PANTALLA AL MANTENER PRESIONADO (PEEK IMAGE)
   ========================================================================== */

.apu-desc-row-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.apu-desc-text {
  flex: 1;
  min-width: 0;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
}

.apu-btn-peek-img {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.32);
  color: #38bdf8;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.apu-btn-peek-img:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: rgba(56, 189, 248, 0.6);
  color: #7dd3fc;
  transform: scale(1.12);
}

.apu-btn-peek-img:active,
.apu-btn-peek-img.is-pressing {
  background: #0284c7 !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  transform: scale(0.92);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.6);
}

.apu-img-peek-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999999;
  background: rgba(10, 15, 29, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  cursor: pointer;
  pointer-events: auto;
  opacity: 0;
  transition: opacity 0.15s ease-out;
}

.apu-img-peek-overlay.is-active {
  opacity: 1;
}

.apu-img-peek-card {
  position: relative;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.85), 0 0 35px rgba(56, 189, 248, 0.25);
  width: auto;
  max-width: 90vw;
  max-height: 85vh;
  overflow: hidden;
  transform: scale(0.85);
  opacity: 0;
  transition: transform 0.16s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.16s ease-out;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.apu-img-peek-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #e2e8f0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  backdrop-filter: blur(4px);
  transition: all 0.15s;
}
.apu-img-peek-close:hover {
  background: rgba(239, 68, 68, 0.85);
  border-color: #ef4444;
  color: #ffffff;
  transform: scale(1.1);
}

.apu-img-peek-overlay.is-active .apu-img-peek-card {
  transform: scale(1);
  opacity: 1;
}

.apu-img-peek-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(30, 41, 59, 0.4);
}

.apu-img-peek-badge-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.apu-img-peek-tipo {
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.apu-img-peek-cpc {
  background: rgba(249, 115, 22, 0.16);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.35);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 0.68rem;
  font-weight: 600;
}

.apu-img-peek-hold-hint {
  background: rgba(34, 197, 94, 0.14);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 0.68rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  animation: apuPulseHint 1.4s infinite ease-in-out;
}

@keyframes apuPulseHint {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); }
}

.apu-img-peek-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: all 0.15s;
}

.apu-img-peek-close:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.5);
  color: #f87171;
}

.apu-img-peek-body {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #1e293b 0%, #0b1120 100%);
  min-height: 270px;
}

.apu-img-peek-img-wrap {
  width: 100%;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

#apu-img-peek-img {
  max-width: 100%;
  max-height: 250px;
  object-fit: contain;
  border-radius: 10px;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.55));
  transition: transform 0.2s;
}

.apu-img-peek-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: #94a3b8;
  font-size: 0.78rem;
}

.apu-img-peek-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  color: #64748b;
  font-size: 0.8rem;
  padding: 20px;
}

.apu-img-peek-footer {
  padding: 14px 18px 16px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.85);
}

.apu-img-peek-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 8px 0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.apu-img-peek-meta-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 8px;
}

.apu-img-peek-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: #38bdf8;
  font-family: var(--font-mono, monospace);
}

.apu-img-peek-und {
  font-size: 0.82rem;
  color: #94a3b8;
  font-weight: 500;
}

.apu-img-peek-brand {
  font-size: 0.70rem;
  color: #64748b;
  margin-left: auto;
}

.apu-img-peek-instruction {
  font-size: 0.72rem;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 5px 10px;
  text-align: center;
  font-weight: 500;
}


.comp-ferr-prop-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.comp-ferr-price-box {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.comp-ferr-actions-col {
  display: flex;
  align-items: center;
  gap: 6px;
}

.comp-ferr-btn-photo {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.70rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  -webkit-user-select: none;
}
.comp-ferr-btn-photo:hover {
  background: rgba(56, 189, 248, 0.28);
  border-color: #38bdf8;
  color: #ffffff;
  transform: translateY(-1px);
}
.comp-ferr-btn-photo:active,
.comp-ferr-btn-photo.is-pressing {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #38bdf8 !important;
  transform: scale(0.95);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}
