/* Colores propios de Comercial sin token oficial: valor claro (el de siempre) y su par para
   el modo oscuro. Todo lo demás del módulo usa los tokens de tokens.css. */
:root, body {
  --com-tenue: #94a3b8;          /* textos muy apagados (subtítulos, "cotización", lista del histórico) */
  --com-aviso-linea: #fde68a;    /* borde del botón de aviso */
  --com-peligro-linea: #fecaca;  /* borde del botón de anular/eliminar */
}
:root[data-scheme="oscuro"],
:root[data-scheme="oscuro"] body {
  --com-tenue: #8796b0;
  --com-aviso-linea: #5e4b1c;
  --com-peligro-linea: #5c2a31;
}


/* ============================================================
   Maestros de Comercial: Clientes (.cli-), Códigos (.cod-) y Contratos (.ctr-)
   (comercial/clientes_list.html, codigos_list.html + _codigo_detalle.html, contratos.html + _contrato_detalle.html,
   form.html). Códigos y Contratos usan los dos paneles de Pozos (.pzw-) y la ficha .pzf-; aquí solo lo propio.
   ============================================================ */
/* Ventanas: tres campos por fila, compactos; uno en celular. Fechas y números miden lo que su texto. */
.form-grid:is(.cli-tres, .cod-tres, .ctr-tres) { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem .8rem; }
.form-grid:is(.cli-tres, .cod-tres, .ctr-tres) :is(input[type="date"], input[type="number"]) { max-width: 10.5rem; }
/* Casillas a la altura de los campos de su fila (debajo de donde va la etiqueta) y su ayuda debajo */
.form-grid:is(.cli-tres, .cod-tres, .ctr-tres) .checkbox-field { flex-direction: column; align-items: stretch; justify-content: flex-start; padding-top: 1.45rem; }
.cmx-intro { margin: 0 0 .6rem; font-size: var(--text-sm); }
/* Ventana de Contratos (tamaño lg): campos y casillas compactos; los textos largos a lo ancho con 2 líneas */
.form-grid.ctr-tres { gap: .5rem .7rem; }
.form-grid.ctr-tres .form-field > label { font-size: var(--text-xs); }
.form-grid.ctr-tres .form-field :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select) { min-height: 2rem; font-size: var(--text-sm); }
.form-grid.ctr-tres .form-field textarea { min-height: 3.4rem; padding: 5px 9px; font-size: var(--text-sm); }
.form-grid.ctr-tres .form-field small { margin-top: 2px; }
/* Casilla a la altura de los campos de su fila: arriba, con un hueco del alto de una etiqueta */
.form-grid.ctr-tres .checkbox-field { display: block; padding-top: 0; align-self: start; }
.form-grid.ctr-tres .checkbox-field::before { content: '\00a0'; display: block; margin-bottom: 6px; font-size: var(--text-xs); font-weight: 600; }
.form-grid.ctr-tres .checkbox-label { min-height: 2rem; padding: 4px 9px; }
/* La fila que es solo de casillas (renovación, en renovación, activo) no necesita el hueco de la etiqueta */
.form-grid.ctr-tres :is([data-field="renovacion_automatica"], [data-field="en_renovacion"], [data-field="activo"])::before { display: none; }
@media (max-width: 760px) {
  .form-grid:is(.cli-tres, .cod-tres, .ctr-tres) { grid-template-columns: 1fr; }
  .form-grid:is(.cli-tres, .cod-tres, .ctr-tres) :is(input[type="date"], input[type="number"]) { max-width: none; }
}

/* Clientes: tabla compacta de anchos fijos (sin ordenar por columna); la fila abre la ventana del cliente */
.cli-2p { --dp-lista: 560px; }
/* Filtros, buscador y botones en una sola fila: las listas se encogen (al abrirlas se ven completas). */
.filter-bar.cli-barra { flex-wrap: nowrap; }
.filter-bar.cli-barra .fb-search { flex: 1 1 200px; min-width: 140px; }
.filter-bar.cli-barra select { flex: 0 1 9.5rem; min-width: 5.5rem; }
.filter-bar.cli-barra .btn { flex: none; }
/* La ficha tiene el mismo alto que la lista y su propio scroll. */
.cli-2p .pzw-detalle { max-height: calc(100vh - 210px); overflow-y: auto; }
.cli-total { font-weight: 700; color: var(--text-2); }
.cli-ordenes { display: flex; flex-wrap: wrap; gap: .3rem; }
.cli-resumen { display: flex; flex-wrap: wrap; gap: .35rem; }
.cli-res { padding: .15rem .55rem; border: 1px solid var(--line); border-radius: var(--radius-pill); color: var(--text-2); font-size: var(--text-xs); text-decoration: none; }
.cli-res b { color: var(--navy); font-variant-numeric: tabular-nums; }
a.cli-res:hover { background: var(--row-hover); text-decoration: none; }
.cli-res-cero { opacity: .55; }
/* Órdenes de la ficha por estado: arriba el estado con su total; debajo una orden por fila (número y valor). */
.cli-grupo { display: grid; gap: .3rem; padding: .45rem 0; border-bottom: 1px solid var(--row-line); }
.cli-grupo:last-child { border-bottom: 0; }
.cli-grupo-nom { display: flex; align-items: center; gap: .35rem; font-size: var(--text-xs); font-weight: 700; color: var(--text-2); }
.cli-grupo-total { margin-left: auto; color: var(--navy); font-variant-numeric: tabular-nums; }
.cli-ordenes-filas { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .25rem .6rem; }
.cli-ordenes-filas .cli-orden { justify-content: space-between; border-radius: var(--radius-sm); }
.cli-orden-valor { color: var(--muted); font-size: var(--text-2xs); }
.cli-pozos { max-height: 9rem; overflow-y: auto; }
.cli-lista .cli-valor { margin-left: auto; color: var(--navy); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cli-grupo .cli-ordenes { max-height: 9rem; overflow-y: auto; }
.cli-orden { display: inline-flex; align-items: center; gap: .25rem; padding: .1rem .5rem; border: 1px solid var(--line); border-radius: var(--radius-pill); color: var(--text); font-size: var(--text-xs); font-weight: 400; text-decoration: none; font-variant-numeric: tabular-nums; }
.cli-orden:hover { background: var(--row-hover); text-decoration: none; }
.cli-orden .sem-dot { margin: 0; }
.cli-orden-tipo { color: var(--muted); font-size: var(--text-2xs); }
.cli-fila { display: grid; grid-template-columns: 3.2rem minmax(0, 1.4fr) 5.6rem minmax(0, 1fr) 2.6rem 8px; gap: .45rem; align-items: center; padding: .22rem .6rem; font-size: var(--text-xs); line-height: 1.25; color: inherit; text-decoration: none; border-bottom: 1px solid var(--row-line); cursor: pointer; }
.cli-fila:hover { background: var(--row-hover); text-decoration: none; }
.cli-fila.sel { background: var(--table-head); box-shadow: inset 3px 0 0 var(--navy); }
.cli-fila .sem-dot { margin: 0; }
.cli-fila > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cli-sig { font-weight: 700; color: var(--navy); font-size: var(--text-2xs); }
.cli-nom { font-weight: 700; color: var(--text); }
.cli-ctr { color: var(--text-2); font-size: var(--text-2xs); font-variant-numeric: tabular-nums; }
.cli-donde { color: var(--muted); font-size: var(--text-2xs); }
.cli-ind { text-align: right; color: var(--muted); font-size: var(--text-2xs); font-variant-numeric: tabular-nums; }
.cli-ley { margin-left: auto; color: var(--muted); }
.cli-ordenar { gap: .4rem; }
.cli-ordenar a { color: var(--text-2); text-decoration: none; padding: 0 .3rem; border-radius: var(--radius-sm); }
.cli-ordenar a:hover { background: var(--row-hover); }
.cli-ordenar a.on { color: var(--navy); font-weight: 700; background: var(--soft-blue); }
.cli-lista { margin: 0; padding: 0; list-style: none; font-size: var(--text-sm); }
.cli-lista li { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; padding: .25rem 0; border-bottom: 1px solid var(--row-line); }
.cli-lista li:last-child { border-bottom: 0; }
.cli-lista a { color: var(--navy); }
.cli-desc { color: var(--text-2); font-size: var(--text-xs); }
.cli-total { align-self: center; margin-right: .6rem; font-size: var(--text-xs); color: var(--muted); white-space: nowrap; }

/* Códigos: una línea por código (código, descripción, cliente, valor en su moneda y punto del estado) */
.cod-2p { --dp-lista: 330px; }
.cod-fila { display: grid; grid-template-columns: minmax(0, 1fr) 3.4rem 6.6rem 8px; gap: .45rem; align-items: center; padding: .22rem .6rem; font-size: var(--text-xs); line-height: 1.25; color: inherit; text-decoration: none; border-bottom: 1px solid var(--row-line); cursor: pointer; }
.cod-fila:hover { background: var(--row-hover); text-decoration: none; }
.cod-fila.sel { background: var(--table-head); box-shadow: inset 3px 0 0 var(--navy); }
.cod-fila .sem-dot { margin: 0; }
.cod-cod { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; color: var(--navy); }
.cod-cli { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); font-size: var(--text-2xs); }
.cod-valor { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--text); }
.cod-valor-actual { font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.cod-historial .cod-actual td { background: var(--soft-blue); }
.cod-historial .cod-carga { color: var(--text-2); }
.cod-historial .cod-nota { color: var(--text-2); max-width: 18rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Contratos: una línea por contrato (número, cliente, tipo, hasta cuándo y punto del estado) y su ficha */
.ctr-2p { --dp-lista: 440px; }
.ctr-fila { display: grid; grid-template-columns: 6.2rem 3.4rem minmax(0, 1fr) auto 8px; gap: .45rem; align-items: center; padding: .3rem .6rem; font-size: var(--text-xs); line-height: 1.25; color: inherit; text-decoration: none; border-bottom: 1px solid var(--row-line); cursor: pointer; }
.ctr-fila:hover { background: var(--row-hover); text-decoration: none; }
.ctr-fila.sel { background: var(--table-head); box-shadow: inset 3px 0 0 var(--navy); }
.ctr-fila .sem-dot { margin: 0; }
.ctr-num { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.ctr-cli { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ctr-tipo { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: var(--text-2xs); }
.ctr-hasta { white-space: nowrap; color: var(--text-2); font-size: var(--text-2xs); font-variant-numeric: tabular-nums; }
.ctr-nota { color: var(--muted); font-size: var(--text-2xs); }
.ctr-pre { white-space: pre-line; }
.ctr-otrosies td a, .ctr-cuelga a { color: var(--navy); font-weight: 600; }
.ctr-cuelga { display: flex; flex-wrap: wrap; gap: .35rem; }
.ctr-cuenta { display: inline-flex; align-items: baseline; gap: .3rem; padding: .2rem .55rem; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-2); font-size: var(--text-xs); color: var(--text-2); text-decoration: none; }
.ctr-cuenta strong { font-size: var(--text-sm); color: var(--navy); font-variant-numeric: tabular-nums; }
.ctr-cuelga-card { padding-top: .4rem; padding-bottom: .4rem; }
.ctr-cuelga-card .pzf-tit { margin-bottom: .3rem; }
.ctr-cuelga-card .pzf-tit h2 { font-size: var(--text-sm); }
a.ctr-cuenta:hover { border-color: var(--primary); text-decoration: none; }

.comercial-module-grid {
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  align-items: stretch;
  overflow-x: auto;
  padding-bottom: 8px;
}

.comercial-module-grid .module-card {
  min-height: 230px;
}

.comercial-form {
  display: grid;
  gap: 18px;
}

/* Tarjetas resumen (panel-summary) dentro de las listas: aire antes de la tabla. */
.comercial-kpis {
  margin: 4px 0 14px;
}

.branch-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.branch-total {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--card);
  color: var(--primary);
  font-size: var(--text-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  box-shadow: var(--shadow-sm);
}

.quote-service-description,
.quote-service-location {
  color: var(--text-2);
  line-height: 1.25;
}

.quote-actions-cell {
  padding-left: 4px !important;
  padding-right: 4px !important;
}

.quote-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
}

.quote-actions form {
  display: inline-flex;
  margin: 0;
}

.quote-action-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--primary);
  font-size: var(--text-2xs);
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.quote-action-chip:hover {
  background: var(--soft-blue);
  color: var(--primary);
}

.quote-action-warn {
  border-color: var(--com-aviso-linea);
  background: var(--warning-bg);
  color: var(--warning);
}

.quote-action-danger {
  border-color: var(--com-peligro-linea);
  background: var(--danger-bg);
  color: var(--danger);
}

.quote-action-icon {
  width: 28px;
  min-width: 28px;
  padding: 0;
}

.quote-action-icon svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quote-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.quote-form-footer {
  margin: 20px 0 16px;
}

.quote-calc-row,
.quote-item-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) minmax(90px, .45fr) minmax(120px, .55fr) minmax(130px, .6fr) minmax(80px, auto);
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.quote-calc-head {
  font-weight: 700;
  color: var(--primary);
}

.quote-calc-row select,
.quote-calc-row input,
.quote-item-row select,
.quote-item-row input,
.quote-item-row textarea {
  width: 100%;
}

.quote-iva {
  margin-top: 12px;
}

.quote-calc-totals {
  display: grid;
  grid-template-columns: auto minmax(140px, auto);
  justify-content: end;
  gap: 6px 16px;
  margin: 12px 0;
  font-variant-numeric: tabular-nums;
}

.quote-form-totals {
  margin: 0;
}

.quote-client-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 14px;
  margin: 16px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  font-size: var(--text-xs);
}

.form-grid.quote-main-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 12px;
  align-items: end;
}

.quote-main-grid .form-field {
  margin: 0;
}

.quote-grid-span {
  grid-column: span 2;
}

.section-title-small {
  margin: 16px 0 8px;
  font-size: var(--text-xl);
}

.quote-item-row {
  grid-template-columns: minmax(210px, 1.1fr) minmax(80px, .35fr) minmax(280px, 1.5fr) minmax(120px, .55fr) minmax(120px, .55fr) minmax(70px, auto);
  align-items: end;
}

.quote-excel-card {
  max-height: 520px;
}

.quote-excel-table {
  width: 100%;
  min-width: 0 !important;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.quote-excel-table .quote-item-row {
  display: table-row;
  padding: 0;
  border-bottom: 0;
}

.quote-excel-table input,
.quote-excel-table textarea {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  font-size: var(--text-2xs);
}

.quote-excel-table th:nth-child(1),
.quote-excel-table td:nth-child(1) { width: 9%; }
.quote-excel-table th:nth-child(2),
.quote-excel-table td:nth-child(2) { width: 7%; }
.quote-excel-table th:nth-child(3),
.quote-excel-table td:nth-child(3) { width: 8%; }
.quote-excel-table th:nth-child(4),
.quote-excel-table td:nth-child(4) { width: 43%; }
.quote-excel-table th:nth-child(5),
.quote-excel-table td:nth-child(5) { width: 13%; }
.quote-excel-table th:nth-child(6),
.quote-excel-table td:nth-child(6) { width: 14%; }
.quote-excel-table th:nth-child(7),
.quote-excel-table td:nth-child(7) { width: 6%; }

.quote-excel-table textarea {
  min-height: 36px;
  resize: none;
}

.quote-excel-table textarea[readonly],
.quote-excel-table input[readonly] {
  background: var(--surface-2);
  color: var(--text-2);
}

.quote-code-helper {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(260px, 1fr);
  gap: 8px 12px;
  align-items: center;
  margin: 4px 0 10px;
}

.quote-code-helper label {
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 700;
}

.quote-code-helper input {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
}

.quote-code-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 352px;
  right: 0;
  z-index: 5;
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  box-shadow: var(--shadow-lg);
}

.quote-code-results button {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 150px;
  gap: 8px;
  width: 100%;
  padding: 7px 9px;
  border: 0;
  border-bottom: 1px solid var(--row-line);
  background: var(--card);
  text-align: left;
  cursor: pointer;
  color: var(--text);
}

.quote-code-results strong {
  color: var(--text);
  font-weight: 700;
}

.quote-code-results button:hover {
  background: var(--surface-2);
}

.quote-code-results span {
  overflow: hidden;
  color: var(--muted);
  font-size: var(--text-2xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-code-results small {
  overflow: hidden;
  color: var(--text-2);
  font-size: var(--text-2xs);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-excel-table input[name$="-valor_unitario"] {
  display: none;
}

.quote-money-display {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.quote-hidden-code {
  display: none;
}

.quote-selected-card {
  max-height: 190px;
  overflow: auto;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--card);
}

.quote-selected-card.quote-excel-card {
  max-height: 360px;
  min-height: 285px;
}

.quote-folders {
  display: grid;
  gap: 10px;
  margin: 12px 0 16px;
}

.quote-folders details {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}

.quote-folders summary {
  cursor: pointer;
  padding: 10px 12px;
  color: var(--primary);
  font-weight: 700;
}

.quote-folders .form-field {
  padding: 0 12px 12px;
  margin: 0;
}

.quote-line-total span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 700;
}

.quote-delete {
  align-self: center;
}

.quote-row-action {
  text-align: center;
  vertical-align: middle !important;
}

.quote-row-action input[type="checkbox"] {
  display: none;
}

.quote-remove-row {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--danger);
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.quote-remove-row svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quote-remove-row:hover {
  background: var(--sem-rojo-bg);
  color: var(--danger);
}

@media (max-width: 900px) {
  

  .portal-grid.comercial-module-grid {
    grid-template-columns: repeat(4, minmax(220px, 1fr));
  }

  .form-grid.quote-main-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .comercial-totals-grid,
  .form-grid.quote-main-grid {
    grid-template-columns: 1fr;
  }
}


/* =====================================================
   Pozos — lista a la izquierda, detalle a la derecha (comercial/pozos.html; misma forma que OIT).
   La forma de los dos paneles la comparten Servicios (.svw-) y ODS (.odw-).
   ============================================================ */
.pzw-2p, .svw-2p, .odw-2p { position: relative; display: grid; grid-template-columns: var(--dp-lista, 340px) minmax(0, 1fr); gap: .8rem; align-items: start; }
/* Paginador estándar (shared/_paginador.html) como pie de las listas de la izquierda, igual que en la lista de OIT. */
:is(.pzw-lista, .svw-lista, .odw-lista) > .pager-box > .pager {
  margin: 0; padding: .4rem .6rem; border-top: 1px solid var(--row-line); background: var(--surface-2); font-size: var(--text-xs);
}
:is(.pzw-lista, .svw-lista, .odw-lista) > .pager-box > .pager select { height: 26px; font-size: var(--text-xs); }
.pzw-lista, .svw-lista, .odw-lista { display: flex; flex-direction: column; max-height: calc(100vh - 210px); overflow: hidden; background: var(--card); border: 1px solid var(--line-2); border-radius: 12px; }
.pzw-cuerpo, .svw-cuerpo, .odw-cuerpo { flex: 1 1 auto; overflow: auto; }
.pzw-leyenda { display: flex; gap: .7rem; padding: .3rem .6rem; font-size: var(--text-2xs); color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--row-line); }
.pzw-leyenda span { display: inline-flex; align-items: center; }
.pzw-fila { display: grid; grid-template-columns: minmax(0, 1fr) auto 8px; gap: .45rem; align-items: center; padding: .22rem .6rem; font-size: var(--text-xs); line-height: 1.25; color: inherit; text-decoration: none; border-bottom: 1px solid var(--row-line); cursor: pointer; }
.pzw-fila:hover { background: var(--row-hover); }
.pzw-fila.sel { background: var(--table-head); box-shadow: inset 3px 0 0 var(--navy); }
.pzw-fila .sem-dot { margin: 0; }
.pzw-txt { display: flex; align-items: baseline; gap: .4rem; min-width: 0; white-space: nowrap; }
.pzw-nom { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 700; color: var(--navy); }
.pzw-donde { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: var(--text-2xs); }
.pzw-ods { color: var(--text-2); font-size: var(--text-2xs); font-variant-numeric: tabular-nums; }
.pzw-vacio, .svw-vacio, .odw-vacio { padding: 1rem; text-align: center; color: var(--muted); font-size: var(--text-md); }
.pzw-detalle, .svw-detalle, .odw-detalle { min-width: 0; transition: opacity .15s; }
.pzw-detalle.pzw-esperando, .svw-detalle.pzw-esperando, .odw-detalle.pzw-esperando { opacity: .4; pointer-events: none; }
.pzw-placeholder, .svw-placeholder, .odw-placeholder { padding: 3rem 1rem; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: 12px; }
@media (max-width: 900px) {
  .pzw-2p, .svw-2p, .odw-2p { grid-template-columns: 1fr; }
  .pzw-lista, .svw-lista, .odw-lista { max-height: 60vh; }
}

/* Ventanas del pozo */
.pz-form .pz-aparte { margin: var(--space-3) 0 0; font-size: var(--text-xs); color: var(--muted); }

/* Barras de Comercial (buscador, listas "Todos los …", año, mes, Limpiar y el botón de crear): en una sola fila; las
   listas se encogen parejo para caber. En pantallas angostas vuelven a bajar de línea. */
.filter-bar.pz-barra { flex-wrap: nowrap; }
.filter-bar.pz-barra .fb-search { flex: 1 1 300px; min-width: 160px; }
.filter-bar.pz-barra .selb-wrap { flex: 1 1 190px; min-width: 110px; }
.filter-bar.pz-barra > :is(.btn, .fb-actions) { flex: none; white-space: nowrap; }
@media (max-width: 900px) { .filter-bar.pz-barra { flex-wrap: wrap; } }

:is(.svw-franja, .svw-2p, .odw-2p) .sem-dot.sem-azul { background: var(--primary); }


/* ============================================================
   Servicios — dos paneles: franja de etapas, ST por etapa (izquierda) y expediente (derecha)
   (comercial/servicios.html, _servicios_filas.html, _servicio_fila.html, _servicio_expediente.html, servicio_bloque.html)
   Sin tablas: una línea por ST; el expediente va en secciones. La forma de los dos paneles es la de Pozos (.pzw-).
   ============================================================ */
/* Barra: la de OIT (listas "Todos los …", Buscar, Limpiar); con todos sus filtros cabe en una fila a 1400 px */
/* Barra de Servicios en una sola fila (la misma regla que las demás barras de Comercial: .pz-barra). */
.filter-bar.sv-barra .sv-ods { flex: 0 1 90px; min-width: 70px; width: auto; }
.filter-bar.sv-barra .sv-vista { flex: 0 1 150px; min-width: 110px; }
/* Franja: una sola fila compacta; clic filtra por etapa */
.svw-franja { display: flex; gap: .35rem; margin-bottom: .6rem; overflow-x: auto; }
.svw-etapa { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: .4rem; padding: .28rem .55rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md); font-size: var(--text-xs); color: var(--text-2); text-decoration: none; white-space: nowrap; }
.svw-etapa:hover { text-decoration: none; border-color: var(--line-2); }
.svw-etapa.es-activa { background: var(--soft-blue); border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.svw-etapa.es-tarde { border-color: var(--danger); }
.svw-etapa.es-vacia { opacity: .6; }
.svw-etapa-nombre { display: flex; align-items: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.svw-etapa-n { margin-left: auto; font-size: var(--text-md); font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.svw-etapa-tarde { font-size: var(--text-2xs); font-weight: 700; color: var(--danger); }

/* Lista de la izquierda: ST agrupados por etapa, una línea cada uno (la forma de dos paneles es la de Pozos) */
.svw-2p { --dp-lista: 400px; }
.svw-lista { position: sticky; top: calc(var(--sv-top, 0px) + .5rem); max-height: calc(100vh - var(--sv-top, 0px) - 1.5rem); }
.svw-cab { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .2rem .6rem; font-size: var(--text-2xs); color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--row-line); }
.svw-plegar { display: flex; gap: .2rem; }
.svw-gcab, .odw-gcab { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: .5rem; padding: .28rem .6rem; list-style: none; cursor: pointer; background: var(--surface-3); border-bottom: 1px solid var(--line); font-size: var(--text-xs); }
.svw-gcab::-webkit-details-marker, .odw-gcab::-webkit-details-marker { display: none; }
.svw-gcab input[type="checkbox"] { flex: none; width: 14px; height: 14px; margin: 0; }
.svw-gnom { display: flex; align-items: center; font-weight: 700; color: var(--navy); }
.svw-gn { color: var(--text-2); font-variant-numeric: tabular-nums; }
.svw-gtarde { padding: 0 .4rem; border-radius: var(--radius-pill); background: var(--sem-rojo-bg); color: var(--danger); font-size: var(--text-2xs); font-weight: 700; }
.svw-gflecha { flex: none; width: 7px; height: 7px; margin: 0 .2rem 0 auto; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s ease; }
.svw-grupo:not([open]) .svw-gflecha, .odw-grupo:not([open]) .svw-gflecha, .odw-solic:not([open]) .svw-gflecha { transform: rotate(-45deg); }
.svw-fila { position: relative; display: flex; align-items: center; border-bottom: 1px solid var(--row-line); }
.svw-fila:hover { background: var(--row-hover); }
.svw-fila.es-marcada { background: var(--soft-blue); }
.svw-fila.sel { background: var(--table-head); box-shadow: inset 3px 0 0 var(--navy); }
.svw-fila.es-anulado .svw-cod { color: var(--muted); text-decoration: line-through; }
.svw-chk { flex: none; display: grid; place-items: center; align-self: stretch; width: 26px; margin: 0 0 0 .3rem; cursor: pointer; }
.svw-chk input { width: 14px; height: 14px; margin: 0; }
.svw-ln { flex: 1 1 auto; min-width: 0; display: grid; grid-template-columns: 4.4rem minmax(0, 1fr) auto 3.3rem; gap: .45rem; align-items: center; padding: .22rem .6rem .22rem .4rem; font-size: var(--text-xs); line-height: 1.25; color: inherit; text-decoration: none; cursor: pointer; }
.svw-fila:not(:has(.svw-chk)) .svw-ln { padding-left: .6rem; }
.svw-cod { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.svw-pozo { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.svw-ods { color: var(--text-2); font-size: var(--text-2xs); white-space: nowrap; font-variant-numeric: tabular-nums; }
.svw-dias { display: flex; align-items: center; justify-content: flex-end; font-size: var(--text-2xs); color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.svw-dias .sem-dot { margin: 0 .25rem 0 0; }
.svw-dias.es-anulado { color: var(--danger); font-weight: 700; }
/* «Siguiente paso» de la fila: sobre los días, visible al pasar el mouse y en la fila elegida (en táctil, siempre) */
.svw-sig { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); z-index: 1; opacity: 0; transition: opacity .12s; white-space: nowrap; box-shadow: 0 0 0 4px var(--row-hover); }
.svw-sig-nota { padding: 0 .4rem; border-radius: var(--radius-sm); background: var(--row-hover); color: var(--muted); font-size: var(--text-2xs); box-shadow: 0 0 0 4px var(--row-hover); }
.svw-fila:hover .svw-sig, .svw-fila:focus-within .svw-sig, .svw-fila.sel .svw-sig { opacity: 1; }
.svw-fila:is(:hover, :focus-within, .sel):has(.svw-sig) .svw-ods { visibility: hidden; }
.svw-fila.sel .svw-sig { box-shadow: 0 0 0 4px var(--table-head); }
.svw-fila.sel .svw-sig-nota { background: var(--table-head); box-shadow: 0 0 0 4px var(--table-head); }
@media (hover: none) { .svw-sig { opacity: 1; } }
.sv-vacio-mini { margin: 0; padding: var(--space-2) 0; font-size: var(--text-sm); color: var(--muted); list-style: none; }
.sv-aviso { margin: 0; font-size: var(--text-sm); color: var(--success); }

/* Barra de acciones: aparece al marcar */
.sv-acciones {
  position: fixed; left: 50%; bottom: var(--space-4); transform: translateX(-50%); z-index: 60;
  display: flex; align-items: center; gap: var(--space-2); max-width: calc(100vw - 32px);
  padding: var(--space-2) var(--space-3); background: var(--card); border: 1px solid var(--primary);
  border-radius: var(--radius-pill); box-shadow: var(--shadow-xl);
}
.sv-acciones[hidden] { display: none; }
.sv-acciones-n { padding: 0 var(--space-2); font-size: var(--text-sm); color: var(--text-2); white-space: nowrap; }
.sv-acciones-n b { color: var(--navy); font-size: var(--text-md); }

/* Ventanas de Servicios: siguiente paso y acciones del expediente */
.sv-ventana { display: grid; gap: var(--space-3); }
.sv-ventana-texto { margin: 0; font-size: var(--text-sm); color: var(--text-2); }
.sv-ventana-texto.full { grid-column: 1 / -1; }
.sv-numero { display: flex; align-items: center; gap: var(--space-1); }
.sv-numero-prefijo { font-weight: 600; color: var(--navy); white-space: nowrap; }
.sv-marcados { display: flex; flex-wrap: wrap; gap: var(--space-1); max-height: 120px; overflow-y: auto; }
.sv-marcado { padding: 2px var(--space-2); border-radius: var(--radius-pill); background: var(--surface-3); font-size: var(--text-xs); color: var(--text-2); }
.sv-marcado b { color: var(--navy); }
.sv-marcado i { font-style: normal; color: var(--muted); }

/* Expediente */
.sv-exp { display: grid; gap: var(--space-3); container: sv-exp / inline-size; }
.sv-exp-cab { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); }
.sv-exp > .sv-exp-cab { position: sticky; top: var(--sv-top, 0px); z-index: 4; padding: var(--space-2) var(--space-3); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.sv-exp-titulo { margin: 0; font-size: var(--text-lg); color: var(--navy); }
.sv-exp-titulo small { font-size: var(--text-md); font-weight: 400; color: var(--text-2); }
.sv-exp-cab .volver { font-size: var(--text-xs); color: var(--navy); text-decoration: none; }
.sv-exp-estado { display: flex; align-items: center; margin: 2px 0 0; font-size: var(--text-sm); color: var(--text-2); font-variant-numeric: tabular-nums; }
.sv-exp-estado b { margin-right: 2px; color: var(--text); }
.sv-exp-acc { display: flex; align-items: center; gap: var(--space-2); }
.sv-exp-nota { font-size: var(--text-xs); color: var(--muted); }
.sv-card { min-width: 0; padding: var(--space-3) var(--space-4); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.sv-card h3 { margin: 0 0 var(--space-2); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .05em; color: var(--navy); }
.sv-card h3 small { font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--muted); }
.sv-exp-2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3); align-items: start; }

/* Línea de vida: nueve pasos */
.sv-anulado-motivo { margin: 0 0 var(--space-2); font-size: var(--text-sm); color: var(--danger); }
.sv-pasos { display: grid; grid-template-columns: 1fr; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.sv-paso { position: relative; display: grid; grid-template-columns: auto 1fr auto; justify-items: start; align-items: center; column-gap: var(--space-2); text-align: left; }
.sv-paso-detalle { grid-column: 2 / -1; }
.sv-paso-punto { position: relative; z-index: 1; width: 14px; height: 14px; border-radius: 50%; background: var(--card); border: 2px solid var(--line-2); }
.sv-paso.es-hecho .sv-paso-punto { background: var(--success); border-color: var(--success); }
.sv-paso.es-actual .sv-paso-punto { background: var(--warning); border-color: var(--warning); box-shadow: 0 0 0 4px var(--warning-bg); }
.sv-paso.es-tarde .sv-paso-punto { background: var(--danger); border-color: var(--danger); box-shadow: 0 0 0 4px var(--sem-rojo-bg); }
.sv-paso-nombre { font-size: var(--text-xs); font-weight: 600; line-height: 1.2; color: var(--text); }
.sv-paso.es-pendiente .sv-paso-nombre { color: var(--muted); font-weight: 400; }
.sv-paso-fecha { font-size: var(--text-xs); color: var(--text-2); font-variant-numeric: tabular-nums; }
.sv-paso-detalle { font-size: var(--text-2xs); color: var(--warning); line-height: 1.2; }
.sv-paso.es-tarde .sv-paso-detalle { color: var(--danger); font-weight: 700; }
.sv-pasos.es-anulado { opacity: .55; }
@container sv-exp (min-width: 640px) {
  .sv-pasos { grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 0; }
  .sv-paso { justify-items: center; align-content: start; align-items: normal; gap: 2px; padding: 0 2px; grid-template-columns: none; text-align: center; }
  .sv-paso::before { content: ""; position: absolute; top: 6px; left: -50%; width: 100%; height: 2px; background: var(--line); }
  .sv-paso:first-child::before { display: none; }
  .sv-paso.es-hecho::before, .sv-paso.es-actual::before, .sv-paso.es-tarde::before { background: var(--success); }
  .sv-paso-detalle { grid-column: auto; }
}
@container sv-exp (min-width: 720px) {
  .sv-exp-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
.sv-nota { margin: var(--space-2) 0 0; font-size: var(--text-xs); font-style: italic; color: var(--muted); }

/* Datos clave-valor (no es una tabla: una lista de pares) */
.sv-dl { display: grid; margin: 0; }
.sv-dl > div { display: flex; justify-content: space-between; gap: var(--space-3); padding: 5px 0; border-bottom: 1px solid var(--row-line); font-size: var(--text-sm); }
.sv-dl > div:last-child { border-bottom: 0; }
/* Título del dato negro, mayúscula y negrita; el dato negro y normal (como las demás fichas de Comercial). */
.sv-dl dt { margin: 0; color: var(--text); font-size: var(--text-2xs); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; align-self: center; }
.sv-dl dd { margin: 0; text-align: right; color: var(--text); font-size: var(--text-xs); font-weight: 400; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.sv-valores .es-total dt, .sv-valores .es-total dd { font-weight: 700; color: var(--navy); }
.sv-valores .es-total { border-bottom-color: var(--line-2); }

.sv-dl .sv-largo { display: block; }
.sv-dl .sv-largo dd { margin-top: 2px; text-align: left; white-space: pre-line; }
.sv-dl .sem-dot { margin: 0 .3rem 0 0; }

/* Tarjeta Valorización: estado, quién valorizó y aprobó, renglones (lista, no tabla) y totales */
.sv-valorizacion { display: grid; gap: var(--space-2); margin-bottom: var(--space-3); }
.sv-val-cab { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--space-2); }
.sv-val-cab h3 { margin: 0; }
.sv-val-acc { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.sv-val-estado { margin: 2px 0 0; font-size: var(--text-sm); font-weight: 600; color: var(--muted); }
.sv-val-estado.es-valorizada { color: var(--warning); }
.sv-val-estado.es-aprobada { color: var(--success); }
.sv-val-quien { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); margin: 0; padding: 0; list-style: none; font-size: var(--text-xs); color: var(--text-2); }
.sv-val-fecha { margin: 0; font-size: var(--text-xs); color: var(--muted); }
.sv-val-aviso { margin: 0; font-size: var(--text-sm); color: var(--warning); }
.sv-reng { display: grid; margin: 0; padding: 0; list-style: none; }
.sv-reng li { display: grid; grid-template-columns: minmax(0, 1fr) 5.5rem 7.5rem 8rem; gap: var(--space-2); align-items: baseline; padding: 4px 0; border-bottom: 1px solid var(--row-line); font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.sv-reng li > span:not(:first-child) { text-align: right; }
.sv-reng-cab { font-size: var(--text-xs); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.sv-reng-codigo small, .sv-reng small { color: var(--muted); font-size: var(--text-xs); }
.sv-reng-fila.es-sin-tarifa { color: var(--danger); }
@media (max-width: 640px) {
  .sv-reng li { grid-template-columns: minmax(0, 1fr) 4rem 6rem 6.5rem; }
}

/* Pestañas del expediente */
.sv-tabs { display: flex; gap: var(--space-1); border-bottom: 1px solid var(--line); overflow-x: auto; }
.sv-cuerpo > .sv-tabs { margin: calc(-1 * var(--space-2)) 0 var(--space-3); }
.sv-tab { flex: none; padding: var(--space-2) var(--space-3); border: 0; border-bottom: 2px solid transparent; background: none; color: var(--text-2); font: inherit; font-size: var(--text-sm); font-weight: 600; cursor: pointer; }
.sv-tab:hover { color: var(--navy); }
.sv-tab.es-activa { border-bottom-color: var(--primary); color: var(--navy); }
.sv-pane[hidden] { display: none; }
.sv-pane-barra { margin: 0 0 var(--space-2); }
.sv-enlace { margin: var(--space-3) 0 0; font-size: var(--text-sm); }

/* Menú «Más acciones» y el de cada HES */
.sv-menu { position: relative; }
.sv-menu summary { list-style: none; cursor: pointer; }
.sv-menu summary::-webkit-details-marker { display: none; }
.sv-menu-cuerpo { position: absolute; right: 0; top: 100%; z-index: 20; display: grid; min-width: 210px; margin-top: 2px; padding: 4px 0; background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius-md); box-shadow: var(--shadow-xl); }
.sv-menu-cuerpo a { display: block; padding: 6px 12px; color: var(--text); font-size: var(--text-sm); text-decoration: none; }
.sv-menu-cuerpo a:hover { background: var(--row-hover); }
.sv-menu-cuerpo .es-peligro { color: var(--danger); }

/* HES */
.sv-hes { display: grid; gap: var(--space-1); margin: 0 0 var(--space-2); padding: 0; list-style: none; }
.sv-hes li { display: flex; align-items: center; gap: var(--space-3); padding: 5px var(--space-3); background: var(--surface-2); border: 1px solid var(--row-line); border-radius: var(--radius-sm); font-size: var(--text-sm); }
.sv-hes-num { font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.sv-hes-fecha { color: var(--muted); font-size: var(--text-xs); margin-right: auto; }

/* Bitácora */
.sv-bit { list-style: none; margin: 0; padding: 0 0 0 8px; max-height: 260px; overflow-y: auto; }
.sv-ev { position: relative; display: block; margin-left: 5px; padding: 0 0 var(--space-3) var(--space-4); border-left: 2px solid var(--line); }
.sv-ev:last-child { border-left-color: transparent; }
.sv-ev-punto { position: absolute; left: -7px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--line-2); }
.sv-ev.es-etapa .sv-ev-punto { background: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.sv-ev.es-devolucion .sv-ev-punto, .sv-ev.es-anulacion .sv-ev-punto { background: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.sv-ev.es-version .sv-ev-punto { background: var(--warning); box-shadow: 0 0 0 1px var(--warning); }
.sv-ev-texto { margin: 0; font-size: var(--text-sm); color: var(--text); overflow-wrap: anywhere; }
.sv-ev-meta { margin: 0; font-size: var(--text-xs); color: var(--muted); }


/* ============================================================
   ODS — dos paneles: ODS por estado, la más reciente primero (izquierda) y detalle (derecha)
   (comercial/ods.html, _ods_detalle.html, _ods_pozos.html, ods_form.html). La forma de los paneles es la de
   Pozos; el detalle usa el bloque .pzf- del detalle del pozo. Sin dinero en pantalla.
   ============================================================ */
/* Solicitudes de ODS pendientes: una franja que se despliega */
.odw-solic { margin-bottom: .6rem; background: var(--card); border: 1px solid var(--sem-naranja); border-radius: var(--radius-md); font-size: var(--text-xs); }
.odw-solic summary { display: flex; align-items: center; gap: .4rem; padding: .3rem .6rem; list-style: none; cursor: pointer; color: var(--text); }
.odw-solic summary::-webkit-details-marker { display: none; }
.odw-solic summary .sem-dot { margin: 0; }
.odw-solic summary .svw-gflecha { margin-left: auto; }
.odw-solic-sub { color: var(--text-2); }
.odw-solic ul { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--row-line); }
.odw-solic-fila { display: grid; grid-template-columns: 9rem minmax(0, 1fr) auto auto; gap: .6rem; align-items: center; padding: .25rem .6rem; border-bottom: 1px solid var(--row-line); }
.odw-solic-fila:last-child { border-bottom: 0; }
.odw-solic-num { font-weight: 700; color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.odw-solic-desc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.odw-solic-quien { color: var(--text-2); font-size: var(--text-2xs); white-space: nowrap; }
.odw-solic-acc { display: flex; gap: .3rem; }
/* Lista: una línea por ODS (número, regional, pozos ejecutados / asignados y punto del estado) */
.odw-2p { --dp-lista: 360px; }
.odw-fila { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr) auto 8px; gap: .45rem; align-items: center; padding: .22rem .6rem; font-size: var(--text-xs); line-height: 1.25; color: inherit; text-decoration: none; border-bottom: 1px solid var(--row-line); cursor: pointer; }
.odw-fila:hover { background: var(--row-hover); text-decoration: none; }
.odw-fila.sel { background: var(--table-head); box-shadow: inset 3px 0 0 var(--navy); }
.odw-fila .sem-dot { margin: 0; }
.odw-num { font-weight: 700; color: var(--navy); white-space: nowrap; font-variant-numeric: tabular-nums; }
.odw-reg { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: var(--text-2xs); }
.odw-pozos { color: var(--text-2); font-size: var(--text-2xs); white-space: nowrap; font-variant-numeric: tabular-nums; }


/* ============================================================
   Detalle del pozo y de la ODS (comercial/_pozo_detalle.html: panel de Pozos, página y ventana;
   comercial/_ods_detalle.html y _ods_pozos.html: panel de ODS). Misma forma que la ficha de OIT
   (operaciones/_oit_detail_panel.html): cabecera con nombre, estado y acciones; tarjetas con título apiladas;
   datos en cuadrícula etiqueta/valor; tablas compactas dentro de las tarjetas. Reglas propias (.pzf-): las de la
   OIT viven en su plantilla.
   ============================================================ */
/* Trabajos y Nombres van a lo ancho, una debajo de la otra, como Cuadrilla y Service Tickets en la OIT: lado a
   lado (probado a 1400 px) las dos tablas quedan apretadas y parten nombres y notas en varias líneas. */
.pzf { display: grid; gap: .6rem; min-width: 0; }
.pzf-ok { margin: 0; font-size: var(--text-sm); color: var(--success); }
.pzf-head { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; }
.pzf-id { min-width: 0; }
.pzf-head h2 { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0; color: var(--navy); font-size: var(--text-lg); }
.pzf-nom { overflow-wrap: anywhere; }
.pzf-head .sem-chip { font-size: var(--text-2xs); }
.pzf-meta { margin: .1rem 0 0; color: var(--text-2); font-size: var(--text-sm); }
.pzf-volver { font-size: var(--text-xs); color: var(--navy); text-decoration: none; }
.pzf-inactivo { display: inline-block; margin: .3rem 0 0; padding: 2px 8px; border-radius: var(--radius-sm); background: var(--sem-gris-bg); color: var(--text-2); font-size: var(--text-xs); }
.pzf-acc { gap: .4rem; }
.pzf .pzf-card { padding: .6rem .8rem; margin: 0; min-width: 0; }
.pzf .card.pzf-card::after { content: none; }  /* sin el círculo decorativo de las tarjetas: tapa celdas y botones */
.pzf-tit { display: flex; align-items: center; gap: .6rem; margin-bottom: .45rem; }
.pzf-tit h2 { margin: 0; color: var(--navy); font-size: var(--text-md); }
/* Sección que se pliega (comercial-dos-paneles.js): clic en el título; contraída solo queda la barra del título. */
.pzf-card[data-plegable] > .pzf-tit h2 { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; user-select: none; }
.pzf-card[data-plegable] > .pzf-tit h2::before { content: ""; width: .45em; height: .45em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); transition: transform .15s; }
.pzf-card.pzf-plegada > .pzf-tit h2::before { transform: rotate(-45deg); }
.pzf-card.pzf-plegada > :not(.pzf-tit) { display: none !important; }
.pzf-card.pzf-plegada > .pzf-tit { margin-bottom: 0; }
.pzf-tit .muted { font-size: var(--text-xs); }
.pzf-tit-acc { margin-left: auto; }
.pzf-kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .35rem .9rem; }
/* Título del dato: negro, mayúscula y negrita; el dato: negro, normal y del mismo tamaño (nunca más grande que su
   título ni en gris). Lo usan todas las fichas e informes de Comercial (pzf-k/pzf-v, ofi-*, cot-orden). */
.pzf-k { font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: .04em; color: var(--text); font-weight: 700; }
.pzf-v { font-size: var(--text-xs); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pzf-v .pzf-como { color: var(--text); }
.pzf-v a, .pzf-tabla a { color: var(--navy); font-weight: 600; }
.pzf-fila { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; margin-top: .5rem; padding-top: .4rem; border-top: 1px solid var(--row-line); }
.pzf-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.pzf-nada { color: var(--muted); font-size: var(--text-xs); }
.pzf-tabla { max-height: 340px; }
.pzf-tabla .sem-chip { font-size: var(--text-2xs); }
.pzf-como { color: var(--muted); }
.pzf-a-mano { margin-left: .25rem; font-size: var(--text-2xs); color: var(--muted); font-style: italic; cursor: help; }
.pzf-c-acc { width: 1%; }
.pzf-botones { display: flex; justify-content: flex-end; gap: .25rem; }
.pzf-botones form { margin: 0; }
.pzf-texto { font-size: var(--text-sm); color: var(--text-2); overflow-wrap: anywhere; }
/* Buscador de una tarjeta, en la fila del título (como el de Cuadrilla en la OIT) */
.pzf-buscar { margin-left: auto; }
.pzf-buscar input { width: 230px; height: 28px; padding: 0 .55rem; border: 1px solid var(--line-2); border-radius: 8px; font: inherit; font-size: var(--text-xs); }
/* Pozos de la ODS: una página de 50; la tabla llega hasta el pie de la pantalla y el paginador queda a la vista */
.pzf-tabla-larga { max-height: max(300px, calc(100vh - 530px)); }
.pzf-pozos td:first-child { white-space: nowrap; }
.pzf-pozos .pzf-botones { justify-content: flex-start; }  /* Editar siempre en el mismo sitio aunque cambien los demás */
.pzf-pie { display: flex; align-items: center; justify-content: flex-end; gap: .4rem; margin-top: .45rem; font-size: var(--text-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.pzf-pie > span:first-child { margin-right: auto; }
.pzf-pie-cur { color: var(--text); }
.dp-cargando { opacity: .45; pointer-events: none; transition: opacity .15s; }
@media (max-width: 900px) {
  .pzf-tit { flex-wrap: wrap; }
  .pzf-buscar input { width: 100%; }
}

/* Ventanas de ODS (Nueva / Editar, tamaño lg): siempre tres campos por fila, compactos; uno en celular.
   Fechas y números no se estiran a todo el ancho: miden lo que su texto. */
.form-grid.odw-tres { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem .8rem; }
.form-grid.odw-tres :is(input[type="date"], input[type="number"]) { max-width: 10.5rem; }
@media (max-width: 760px) {
  .form-grid.odw-tres { grid-template-columns: 1fr; }
  .form-grid.odw-tres :is(input[type="date"], input[type="number"]) { max-width: none; }
}

/* ============================================================
   Cotizaciones (comercial/cotizaciones.html): la forma de dos paneles de ODS (.odw-) con dos líneas por cotización
   (código, cliente y valor sin IVA; descripción y estado); la ficha es la del bloque .pzf-.
   Actas (comercial/actas.html) usa las mismas reglas con el prefijo .acw- (número, siglas, valor; PO y estado).
   ============================================================ */
.ctw-2p, .acw-2p { --dp-lista: 440px; }
.ctw-fila, .acw-fila { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: .5rem; row-gap: .1rem; align-items: center; padding: .3rem .6rem; font-size: var(--text-xs); line-height: 1.25; color: inherit; text-decoration: none; border-bottom: 1px solid var(--row-line); cursor: pointer; }
.ctw-fila:hover, .acw-fila:hover { background: var(--row-hover); text-decoration: none; }
.ctw-fila.sel, .acw-fila.sel { background: var(--table-head); box-shadow: inset 3px 0 0 var(--navy); }
.ctw-num, .acw-num { font-weight: 700; color: var(--navy); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ctw-cli, .acw-cli { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); font-weight: 600; }
.ctw-valor, .acw-valor { white-space: nowrap; font-variant-numeric: tabular-nums; text-align: right; }
.ctw-desc, .acw-desc { grid-column: 1 / 3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: var(--text-2xs); }
.ctw-fila .sem-chip, .acw-fila .sem-chip { justify-self: end; font-size: var(--text-2xs); white-space: nowrap; }
.ctw-cuelga, .acw-cuelga { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; }
.ctw-historial, .acw-historial { margin: 0; padding: 0; list-style: none; display: grid; gap: .25rem; font-size: var(--text-sm); }
.ctw-h-fecha, .acw-h-fecha { color: var(--muted); font-variant-numeric: tabular-nums; }
.ctw-h-quien, .acw-h-quien { color: var(--text-2); }
/* «Más acciones»: menú que se abre bajo el botón */
.ctw-mas, .acw-mas { position: relative; }
.ctw-mas > summary, .acw-mas > summary { list-style: none; cursor: pointer; }
.ctw-mas > summary::-webkit-details-marker, .acw-mas > summary::-webkit-details-marker { display: none; }
.ctw-mas-menu, .acw-mas-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 5; display: grid; min-width: 11rem; padding: .25rem; background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius-sm); box-shadow: var(--shadow-md); }
.ctw-mas-menu form, .acw-mas-menu form { margin: 0; }
.ctw-mas-menu .btn, .acw-mas-menu .btn { width: 100%; justify-content: flex-start; }

/* ============================================================
   Órdenes de cliente (comercial/ordenes.html): la forma de dos paneles de ODS (.odw-) con una línea por orden
   (ODS o PO); la ficha es la del bloque .pzf-. Ventana «Nueva orden» (comercial/orden_nueva.html).
   ============================================================ */
.orw-2p { --dp-lista: 400px; }
.filter-bar.pz-barra .selb-input { height: var(--control-h); padding: 0 24px 0 8px; font-size: var(--text-xs); }
.filter-bar.pz-barra :is(select, .fb-search input) { font-size: var(--text-xs); }
.orw-fila { display: grid; grid-template-columns: 2.4rem auto minmax(0, 1fr) auto 8px; gap: .45rem; align-items: center; padding: .22rem .6rem; font-size: var(--text-xs); line-height: 1.25; color: inherit; text-decoration: none; border-bottom: 1px solid var(--row-line); cursor: pointer; }
.orw-fila:hover { background: var(--row-hover); text-decoration: none; }
.orw-fila.sel { background: var(--table-head); box-shadow: inset 3px 0 0 var(--navy); }
.orw-fila .sem-dot { margin: 0; }
.orw-tipo { display: inline-block; padding: 0 .3rem; border-radius: var(--radius-sm); background: var(--soft-blue); color: var(--navy); font-size: var(--text-2xs); font-weight: 700; text-align: center; letter-spacing: .02em; }
.orw-tipo.es-po { background: var(--sem-verde-bg); color: var(--success); }
.orw-tipo.es-cot { background: var(--sem-amarillo-bg); color: var(--text-2); }
.orw-num { max-width: 8.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.orw-donde { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: var(--text-2xs); }
.orw-avance { color: var(--text-2); font-size: var(--text-2xs); white-space: nowrap; font-variant-numeric: tabular-nums; }
.orw-negativo { color: var(--danger); font-weight: 700; }
/* Franja de pendientes: una línea cerrada (conteos por clase + Ver); abierta, ~6 filas y su propio scroll */
.orw-pend { margin-bottom: .4rem; }
.orw-pend summary { padding: .2rem .6rem; white-space: nowrap; overflow: hidden; }
.orw-pend .odw-solic-sub { display: flex; align-items: center; gap: .3rem; min-width: 0; overflow: hidden; color: var(--text-2); }
.orw-pend-n { padding: 0 .45rem; border-radius: var(--radius-pill); background: var(--sem-amarillo-bg); color: var(--text); font-size: var(--text-2xs); font-weight: 600; white-space: nowrap; }
.orw-pend-ver { margin-left: auto; color: var(--navy); font-weight: 700; font-size: var(--text-2xs); }
.orw-pend .orw-ver-cerrar, .orw-pend[open] .orw-ver-abrir { display: none; }
.orw-pend[open] .orw-ver-cerrar { display: inline; }
.orw-pend summary .svw-gflecha { margin-left: .4rem; }
.orw-pend ul { max-height: 12.5rem; overflow-y: auto; overscroll-behavior: contain; }
.orw-pend .odw-solic-num { display: flex; align-items: center; gap: .35rem; }
.orw-pend .odw-solic-fila { grid-template-columns: 11rem minmax(0, 1fr) auto auto; }
.orw-pend .odw-solic-fila.orw-pend-mas { display: block; text-align: center; }
/* Ventana Nueva orden: paso Cliente / Contrato arriba, el formulario debajo */
.orw-paso { margin-bottom: .6rem; padding-bottom: .6rem; border-bottom: 1px solid var(--row-line); }
.orw-tipo-orden { display: flex; align-items: center; min-height: var(--control-h); font-weight: 700; color: var(--navy); }
.orw-codigos { margin: .7rem 0 .4rem; }
.orw-sub { margin-bottom: .35rem; font-size: var(--text-sm); }
.orw-sub .muted { font-size: var(--text-xs); }
.orw-pozos { display: block; margin: .7rem 0 .4rem; }
.odm-sub { margin-top: .6rem; }
.odp { margin: .7rem 0 .4rem; }
.odp-todas { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; margin-bottom: .4rem; font-size: var(--text-xs); }
.odp-todas .selb-wrap, .orw-orden .odp-todas select { width: auto; flex: 0 1 12rem; }
.odp-filas { display: grid; gap: .3rem; margin-bottom: .35rem; max-height: 22rem; overflow-y: auto; }
.odp-fila, .odp-cab { display: grid; grid-template-columns: 1.6rem minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 3.6rem; gap: .4rem; align-items: center; }
.odp-cab { padding-right: .4rem; font-size: var(--text-2xs); color: var(--muted); font-weight: 700; }
.odp-nombre { font-size: var(--text-sm); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.odp :is(.odp-fila, .odp-todas) :is(select, input[type="text"], .selb-input) { height: 32px; min-height: 32px; padding-top: 0; padding-bottom: 0; font-size: var(--text-xs); }
.odp .odp-fila :is(select, .selb-input) { padding-left: 8px; }
.odp-n { color: var(--muted); font-size: var(--text-2xs); text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .odp-fila { grid-template-columns: 1.6rem 1fr 1fr; } }
.odm-renombres { margin: .6rem 0 .4rem; }
.odh-lista { margin: 0; padding: 0; list-style: none; }
.odh-item { padding: .45rem 0; border-bottom: 1px solid var(--row-line); font-size: var(--text-sm); }
.odh-item:last-child { border-bottom: 0; }
.odh-ajuste { color: var(--text-2); font-size: var(--text-xs); }
.odh-motivo { margin: .15rem 0; white-space: pre-line; color: var(--text-2); }
.odh-cambios { margin: .15rem 0 0; padding-left: 1rem; font-size: var(--text-xs); }
.odh-cambios .pzf-k { margin-right: .3rem; }
.orw-cuenta { margin-left: .3rem; font-size: var(--text-xs); font-weight: 700; color: var(--text-2); }
.orw-cuenta.orw-cuenta-pasada { color: var(--danger); }
.orw-renglones { display: grid; gap: .35rem; margin-bottom: .35rem; }
.orw-renglon.cot-renglon { grid-template-columns: minmax(0, 1fr) 7.5rem 12.5rem auto; padding-bottom: .35rem; border-bottom: 1px dashed var(--row-line); }
.cot-renglon .cot-desc { grid-column: 1 / 3; }
.cot-renglon .cot-impresa { display: none; }
.cot-renglon.es-total .cot-impresa { display: block; }
.cot-renglon.es-total .cot-desc { grid-column: 1 / 2; }
.orw-orden textarea { min-height: 0; height: 3.4rem; }
.orw-renglon { display: grid; grid-template-columns: minmax(0, 1fr) 8rem auto; gap: .5rem; align-items: center; }
/* Casillas de varias opciones (alcance de la ODS, cotizaciones que cubre la PO): tres por fila */
.odw-marcas > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .25rem .8rem; }
.odw-marcas > div label { display: flex; align-items: center; gap: .35rem; margin: 0; font-weight: 400; font-size: var(--text-xs); color: var(--text); }
.odw-marcas > div input[type="checkbox"] { width: 14px; height: 14px; min-height: 0; margin: 0; }
@media (max-width: 760px) {
  .odw-marcas > div { grid-template-columns: 1fr; }
  .orw-renglon { grid-template-columns: 1fr 6rem auto; }
}

/* ==========================================================================
   Dashboard de Comercial (comercial/dashboards.html): solo lo propio; todo lo demás son los componentes del
   sistema (panel-*, sem-chip, dashboard-controls) y colores de tokens.css.
   ========================================================================== */
.cdash-filtros { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.cdash-filtros .dashboard-controls-actions { align-self: end; }
.cdash-notas { margin: -.2rem 0 .7rem; padding: 0; list-style: none; color: var(--muted); font-size: var(--text-xs); }
.cdash-notas li + li { margin-top: .1rem; }
.cdash-indicadores { margin-bottom: .9rem; }
.cdash-indicadores .panel-metric strong a { color: inherit; text-decoration: none; }
.cdash-indicadores .panel-metric strong a:hover { text-decoration: underline; }
.cdash-pie { margin: 0; color: var(--muted); font-size: var(--text-xs); }
.cdash-sub { margin: .6rem 0 .35rem; font-size: var(--text-sm); color: var(--text); font-weight: 700; }
.cdash-sub .muted { font-weight: 400; font-size: var(--text-xs); }
.cdash-vacio { margin: .2rem 0 .6rem; font-size: var(--text-sm); }
.cdash-chart { width: 100%; height: 260px; }
.cdash-otros td { color: var(--muted); }
.cdash-total td { font-weight: 700; background: var(--surface-3); }
.cdash-cifras { margin-top: .3rem; font-size: var(--text-xs); color: var(--text-2); }
.cdash-cifras summary { cursor: pointer; color: var(--muted); }
.cdash-cifras ul { margin: .25rem 0 0; padding: 0; list-style: none; }
.cdash-cifras li { display: flex; justify-content: space-between; gap: 1rem; padding: .15rem 0; border-bottom: 1px solid var(--row-line); }
.cdash-cifras li span { font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Panel de Comercial */
/* Panel (comercial/dashboard.html): tarjetas como las del Panel de Compras. */
.cpan-tarjetas { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .6rem; }
.cpan-tarjetas .panel-card { display: flex; flex-direction: column; padding: .75rem .85rem; }
.cpan-tarjetas .panel-card h2 { font-size: var(--text-md); margin-bottom: .1rem; }
.cpan-tarjetas .panel-row { padding: .22rem 0; font-size: var(--text-sm); }
.cpan-tarjetas .panel-row a { color: var(--text); text-decoration: none; }
.cpan-tarjetas .panel-row a:hover { color: var(--navy); text-decoration: underline; }
.cpan-link { margin-top: auto; padding-top: .55rem; font-weight: 800; font-size: var(--text-xs); }
.cpan-seccion { margin-top: 1rem; }
/* Dashboard: gráficos parejos (dos por fila, mismo alto) y el «Ejecutado frente a facturado» a lo ancho. */
.dashboard-charts.cdash-graficos { align-items: stretch; }
.cdash-graficos .dashboard-chart-card { display: flex; flex-direction: column; }
.cdash-graficos .dashboard-chart-card[data-bloque="agrupado"] { grid-column: 1 / -1; }
.cpan-aviso { margin-top: .9rem; }
/* Filtros del Dashboard que una lista aplica sin campo propio (comercial/_filtros_tablero.html) */
.lst-filtro { display: inline-flex; align-items: center; gap: .3rem; max-width: 100%; padding: .1rem .2rem .1rem .55rem; border-radius: var(--radius-pill); background: var(--sem-azul-bg); color: var(--sem-azul); font-size: var(--text-xs); font-weight: 600; }
.lst-filtro a { display: inline-grid; place-items: center; width: 1.2rem; height: 1.2rem; border-radius: var(--radius-pill); color: inherit; text-decoration: none; font-weight: 700; }
.lst-filtro a:hover { background: var(--sem-azul); color: var(--card); }
.lst-aviso { margin: 0 0 .5rem; color: var(--muted); font-size: var(--text-sm); }

/* Informe de la orden (comercial/_orden_informe.html, ficha de la ODS y de la PO): franja de cifras y tarjetas cortas. */
.ofi-cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .5rem; margin-bottom: .7rem; }
.ofi-cifras > div { display: flex; flex-direction: column; padding: .45rem .65rem; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--soft-blue); }
.ofi-cifras b { order: 2; color: var(--text); font-size: var(--text-xs); font-weight: 400; line-height: 1.3; }
.ofi-cifras span { order: 1; color: var(--text); font-size: var(--text-2xs); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.ofi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .6rem; }
.ofi-bloque { padding: .55rem .7rem; border: 1px solid var(--line); border-radius: var(--radius-md); min-width: 0; }
.ofi-bloque h3 { margin: 0 0 .35rem; color: var(--navy); font-size: var(--text-sm); }
.ofi-bloque h3 .muted { font-weight: 400; font-size: var(--text-xs); }
.ofi-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; }
.ofi-lista li { display: flex; gap: .45rem; font-size: var(--text-xs); min-width: 0; }
.ofi-lista li > a, .ofi-lista li > b { color: var(--navy); font-weight: 600; white-space: nowrap; }
.ofi-lista li > span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ofi-mas { display: inline-block; margin-top: .3rem; font-size: var(--text-xs); color: var(--navy); }
.ofi-aviso { margin: .35rem 0 0; font-size: var(--text-2xs); color: var(--sem-naranja-tx, var(--warning)); }
/* Secciones del informe (informes liberados, personas, actas, facturas, ubicación): cada una su tarjeta. */
.ofi-tabla { max-height: 22rem; overflow-y: auto; }
.ofi-tabla td.ofi-largo { max-width: 22rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ofi-valores-fila { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .3rem 1.2rem; margin-bottom: .5rem; }
.ofi-valores-fila > div { justify-content: flex-start; }
.ofi-etapas { margin-bottom: .35rem; }
.ofi-valores { margin: 0; display: grid; gap: .25rem; }
.ofi-valores > div { display: flex; justify-content: space-between; gap: .6rem; font-size: var(--text-xs); }
.ofi-valores dt { font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: .04em; color: var(--text); font-weight: 700; }
.ofi-valores dd { margin: 0; color: var(--text); text-align: right; overflow-wrap: anywhere; }

/* Ventana «Registrar orden» de la cotización (comercial/cotizacion_orden.html): códigos de la PO elegida, sin scroll
   de lado (la descripción se corta con «…» y se ve entera al pasar el mouse). */
.cot-orden-pos { margin: .4rem 0; }
.cot-orden-po { margin: .5rem 0; min-width: 0; }
.cot-orden-po h3 { margin: 0 0 .3rem; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .04em; color: var(--text); }
.cot-orden-po h3 span { font-weight: 400; text-transform: none; letter-spacing: 0; }
.cot-orden-tabla { table-layout: fixed; }
.cot-orden-tabla th, .cot-orden-tabla td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cot-orden-tabla th:first-child, .cot-orden-tabla td:first-child { width: 6.5rem; }
.cot-orden-tabla .num { width: 6rem; text-align: right; }
/* Pago anticipado en la ventana de la cotización. */
.cot-anticipo-acta { margin: 0; min-height: var(--control-h); display: flex; align-items: center; font-size: var(--text-sm); }
.cot-anticipo-nota { margin: -.2rem 0 .6rem; font-size: var(--text-xs); }
/* «Cantidades | Valor» en una tarjeta (.pzf-modo): botones de vista del sistema (.chart-reset, .on como .antig-vistas). */
.pzf-vistas { display: inline-flex; gap: .3rem; margin-left: auto; }
.pzf-vistas .chart-reset.on { border-color: var(--primary); background: var(--primary); color: var(--card); }
.pzf-modo[data-modo="cant"] [data-en="valor"], .pzf-modo[data-modo="valor"] [data-en="cant"] { display: none; }

/* Interruptor «Pozos | Taladros» (comercial/_pozos_vista.html): la misma pantalla, dos listas cerradas. */
.pz-vista { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--surface-3); }
.pz-vista a { padding: .25rem .85rem; border-radius: var(--radius-pill); color: var(--text-2); font-size: var(--text-sm); font-weight: 700; text-decoration: none; }
.pz-vista a.on { background: var(--card); color: var(--navy); box-shadow: var(--shadow-sm); }
.pzw-fila .pzw-uso { color: var(--muted); font-size: var(--text-2xs); font-variant-numeric: tabular-nums; white-space: nowrap; }
