/* ============================================================================
   Centauro · Solicitud de cotización
   ----------------------------------------------------------------------------
   Estética tomada de la referencia "Contrast": lienzo blanco, un solo color de
   acento haciendo todo el trabajo, radios generosos (píldora en lo que se toca),
   una única sombra muy tenue y ritmo de 8 px con 80 px entre secciones.

   Lo que NO se toma de la referencia, por pedido de Mateo:
     · la paleta cromática → va la de Centauro (verde oliva del sitio)
     · la tipografía → va Montserrat, la del sitio
   ========================================================================= */

:root {
  /* ── Paleta de Centauro, en los roles de la referencia ──────────────────
     El verde y el casi negro salen de medir el sitio en vivo. */
  --acento: #96a07d;          /* Signal Coral → verde oliva del sitio */
  --acento-hondo: #7c8663;    /* Ember / Persimmon → su versión profunda */
  --acento-wash: #edf0e7;     /* Coral Mist → el lavado del acento */
  --tinta: #252728;           /* Carbon Ink → el casi negro del sitio */
  --blanco: #ffffff;          /* Pure White */
  --niebla: #f5f7f9;          /* Fog → la superficie clara del sitio */
  --pizarra: #6b6860;         /* Slate → texto secundario */
  --linea: #e4e6e3;           /* divisores y bordes suaves */
  --linea-fuerte: #c9ccc6;
  --alerta: #8f4531;

  /* ── Tipografía: Montserrat, la única del sitio ──────────────────────── */
  --fuente: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --t-caption: 14px;      --lh-caption: 1.43;
  --t-body-sm: 16px;      --lh-body-sm: 1.5;
  --t-body: 18px;         --lh-body: 1.56;
  --t-sub: 20px;          --lh-sub: 1.6;
  --t-heading-sm: 24px;   --lh-heading-sm: 1.33;
  --t-heading: 48px;      --lh-heading: 1.11;
  --t-display: 56px;      --lh-display: 0.9;

  /* ── Espaciado: base 8 px ────────────────────────────────────────────── */
  --s8: 8px;   --s16: 16px; --s24: 24px; --s32: 32px; --s40: 40px;
  --s48: 48px; --s56: 56px; --s64: 64px; --s72: 72px; --s80: 80px;

  /* ── Radios ──────────────────────────────────────────────────────────── */
  --r-sm: 16px;      /* tarjetas chicas */
  --r-md: 24px;      /* tarjetas */
  --r-lg: 40px;      /* tarjetas grandes */
  --r-pill: 100px;   /* botones, chips, insignias, imágenes chicas */

  /* ── Layout ──────────────────────────────────────────────────────────── */
  --ancho: 1200px;
  --gap-seccion: 80px;
  --pad-card: 24px;
  --gap: 16px;

  /* ── Elevación: una sola sombra, muy tenue ───────────────────────────── */
  --sombra: rgba(38, 42, 62, .06) 0 5px 25px 0;
}

* { box-sizing: border-box; }
/* Sin `scroll-behavior: smooth` global: los saltos de la app lo piden explícito,
   y el del primer error tiene que ser instantáneo. */
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--blanco);
  color: var(--tinta);
  font-family: var(--fuente);
  font-size: var(--t-body-sm);
  font-weight: 500;
  line-height: var(--lh-body-sm);
}

h1, h2, h3, p, ul, ol { margin: 0; }
button { font: inherit; color: inherit; }
img { display: block; }

:focus-visible { outline: 2px solid var(--acento); outline-offset: 2px; }

.solo-lectores {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Etiquetas chicas: 14 px, sin versalitas ni tracking (la referencia no ajusta
   el espaciado de letras en ningún tamaño). */
.rot { font-size: var(--t-caption); font-weight: 600; color: var(--pizarra); }

/* ── Barra superior fija: marca a la izquierda, documento a la derecha ──── */

.membrete {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--blanco);
  border-bottom: 1px solid var(--linea);
}

.membrete__fila {
  max-width: var(--ancho);
  margin: 0 auto;
  padding: var(--s16) var(--s24);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s16);
}

.membrete__logo { display: inline-flex; align-items: center; }
.membrete__logo img { height: 40px; width: auto; display: block; }

/* Menú: enlaces simples, sin píldora (la referencia usa enlaces, no botones). */
.menu { display: flex; align-items: center; gap: var(--s8); }
.menu__link {
  padding: var(--s8);
  border-radius: var(--r-pill);
  font-size: var(--t-body-sm);
  font-weight: 500;
  color: var(--tinta);
  text-decoration: none;
}

.menu__link:hover { color: var(--acento-hondo); text-decoration: underline; text-underline-offset: 4px; }

.menu__grupo { position: relative; }

.menu__link--boton {
  border: 0;
  background: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.menu__link--boton:hover { text-decoration: none; }
.menu__caret { transition: transform .15s ease; }
.menu__link--boton[aria-expanded="true"] { color: var(--acento-hondo); }
.menu__link--boton[aria-expanded="true"] .menu__caret { transform: rotate(180deg); }

/* El desplegable: tarjeta blanca con la única sombra del sistema. */
.desplegable {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 40;
  width: 288px;
  max-width: calc(100vw - 32px);
  /* En pantallas bajas, 11 filas no entran: se limita y scrollea. */
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding: var(--s8);
  background: var(--blanco);
  border: 1px solid var(--linea);
  border-radius: var(--r-sm);
  box-shadow: var(--sombra);
}

.desplegable[hidden] { display: none; }

.desplegable__fila {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s16);
  padding: 11px var(--s16);
  border-radius: var(--r-sm);
  font-size: var(--t-body-sm);
  font-weight: 500;
  color: var(--tinta);
  text-decoration: none;
}

.desplegable__fila:hover { background: var(--niebla); color: var(--acento-hondo); text-decoration: none; }
.desplegable__fila--todo { font-weight: 600; }
.desplegable__cuenta { font-size: var(--t-caption); font-weight: 500; color: var(--pizarra); font-variant-numeric: tabular-nums; }
.desplegable__fila:hover .desplegable__cuenta { color: var(--acento-hondo); }
.desplegable__sep { height: 1px; background: var(--linea); margin: var(--s8) var(--s16); }

/* El hero: una tarjeta grande con la foto, separada del resto por el blanco.
   Antes iba de borde a borde y se pegaba al contenido: era un corte seco. */
.encabezado {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: min(var(--ancho), calc(100% - var(--s48)));
  margin: var(--s32) auto 0;
  /* Más alta, así entra la pieza entera; el texto va arriba, sobre los árboles. */
  min-height: 580px;
  padding: var(--s56) var(--s40) var(--s120);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #2b2f28 url("img/hero.jpg") center 58% / cover no-repeat;
  color: var(--blanco);
  text-align: center;
}

/* El velo. Sin esto, el blanco sobre la foto del atardecer no se lee. */
.encabezado::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg,
    rgba(20, 26, 18, .44) 0%,
    rgba(20, 26, 18, .56) 45%,
    rgba(20, 26, 18, .62) 100%);
}

/* Ancho en px, no en ch: `ch` depende del font-size del contenedor y acá
   dejaba el bloque en 470 px dentro de una tarjeta de 1200 (texto apilado). */
.encabezado__cuerpo { max-width: 760px; }

.encabezado__h1 {
  font-size: var(--t-display);
  font-weight: 700;
  line-height: var(--lh-display);
  letter-spacing: normal;
  /* Deja el titular en una línea; envuelve sólo en pantallas chicas. */
  max-width: 24ch;
  margin: 0 auto;
}

.encabezado__bajada {
  max-width: 62ch;
  margin: var(--s16) auto 0;
  font-size: var(--t-body);
  font-weight: 500;
  color: rgba(255, 255, 255, .9);
}

/* Sin cápsula ni borde translúcido: el texto va pelado sobre la foto. El velo
   ya garantiza la lectura, y el fondo semiopaco sólo la empeoraba. */
.encabezado__plazo {
  display: inline-flex;
  align-items: baseline;
  gap: var(--s8);
  margin-top: var(--s24);
  color: var(--blanco);
}

.encabezado__plazo b { font-size: var(--t-body-sm); font-weight: 700; }
.encabezado__plazo span { font-size: var(--t-caption); font-weight: 600; color: var(--blanco); }

/* ── Condición comercial: nota compacta, al lado de la decisión ─────────── */

.condicion {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: var(--s16);
  align-items: center;
  max-width: 62ch;
  margin-bottom: var(--s32);
  padding: var(--s16) var(--s24);
  background: var(--niebla);
  border-radius: var(--r-sm);
}

.condicion p { font-size: var(--t-caption); line-height: var(--lh-caption); font-weight: 500; color: var(--pizarra); }
.condicion p strong { color: var(--tinta); font-weight: 700; }
.condicion a { color: var(--acento-hondo); font-weight: 600; }

.condicion__icono {
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: var(--r-pill);
  background: var(--acento-wash);
  color: var(--acento-hondo);
}

/* ── Estructura ─────────────────────────────────────────────────────────── */

.hoja {
  max-width: var(--ancho);
  margin: 0 auto;
  padding: var(--s48) var(--s24) var(--s80);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 0 var(--s40);
}

.cuerpo { min-width: 0; }
.lado { align-self: stretch; }

/* ── Partes: pestañas con forma de píldora ──────────────────────────────── */

.partes {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s8);
  padding: var(--s8) 0 var(--s32);
}

.parte-link {
  display: inline-flex;
  align-items: baseline;
  gap: var(--s8);
  border: 1px solid var(--linea);
  border-radius: var(--r-pill);
  background: var(--blanco);
  padding: 10px var(--s24);
  cursor: pointer;
  font-size: var(--t-caption);
  font-weight: 600;
  color: var(--pizarra);
}

.parte-link:hover { border-color: var(--acento); color: var(--tinta); }
.parte-link[aria-current="step"] { background: var(--tinta); border-color: var(--tinta); color: var(--blanco); }
.parte-link[data-hecho="si"] { color: var(--acento-hondo); }
.parte-link[data-hecho="si"] .parte-link__num::after { content: " ✓"; }
.parte-link[disabled]:not([aria-current="step"]) { cursor: default; opacity: .6; }
.parte-link[disabled]:hover { border-color: var(--linea); color: var(--pizarra); }
.parte-link[aria-current="step"]:hover { background: var(--tinta); border-color: var(--tinta); color: var(--blanco); }

/* ── Partes ─────────────────────────────────────────────────────────────── */

.parte { display: none; }
.parte[data-activo="si"] { display: block; }

.parte__marca {
  display: inline-flex;
  align-items: center;
  gap: var(--s8);
  padding: 6px var(--s16);
  border-radius: var(--r-pill);
  background: var(--acento-wash);
  color: var(--acento-hondo);
  font-size: var(--t-caption);
  font-weight: 600;
  margin-bottom: var(--s24);
}

.parte__marca b { font-weight: 700; }

.parte__titulo {
  font-size: var(--t-heading-sm);
  font-weight: 700;
  line-height: var(--lh-heading-sm);
  margin-bottom: var(--s8);
}

.parte__ayuda {
  font-size: var(--t-body-sm);
  font-weight: 500;
  color: var(--pizarra);
  max-width: 62ch;
  margin-bottom: var(--s32);
}

.parte__ayuda b { color: var(--tinta); font-weight: 600; }

/* ── Borrador recuperado ────────────────────────────────────────────────── */

.borrador {
  display: flex;
  align-items: center;
  gap: var(--s16);
  flex-wrap: wrap;
  padding: var(--s16) var(--s24);
  margin-bottom: var(--s24);
  background: var(--niebla);
  border-radius: var(--r-md);
  font-size: var(--t-caption);
}

.borrador[hidden] { display: none; }
/* Ojo con el alcance: la regla del texto no debe tocar el span del icono, que
   si no hereda flex: 1 y se estira a lo ancho. */
.borrador__texto { flex: 1; min-width: 220px; color: var(--pizarra); font-weight: 500; }

.borrador__icono {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px; height: 34px;
  border-radius: var(--r-pill);
  background: var(--acento-wash);
  color: var(--acento-hondo);
}

/* ── Campos ─────────────────────────────────────────────────────────────── */

.rejilla { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s24); }
.campo { display: flex; flex-direction: column; gap: var(--s8); }
.campo--ancho { grid-column: 1 / -1; }

.campo__rot { font-size: var(--t-caption); font-weight: 600; color: var(--tinta); }
.campo__rot i { font-style: normal; color: var(--acento); font-weight: 700; }

.campo__ctl {
  width: 100%;
  padding: 14px var(--s16);
  border: 1px solid var(--linea-fuerte);
  border-radius: var(--r-sm);
  background: var(--blanco);
  color: var(--tinta);
  font-family: var(--fuente);
  font-size: var(--t-body-sm);
  font-weight: 500;
  line-height: 1.4;
}

select.campo__ctl,
select.color-fila {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B6860' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
  cursor: pointer;
}

select.campo__ctl { min-height: calc(1.4em + 30px); }

.campo__ctl:hover { border-color: var(--pizarra); }
.campo__ctl:focus { outline: none; border-color: var(--acento); box-shadow: 0 0 0 3px var(--acento-wash); }
.campo__ctl[aria-invalid="true"] { border-color: var(--alerta); }
.campo__ctl[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px #f6e6e1; }

textarea.campo__ctl { resize: vertical; }

.campo__err { font-size: var(--t-caption); font-weight: 600; color: var(--alerta); }
.campo__pista { font-size: var(--t-caption); font-weight: 500; color: var(--pizarra); }

.campo__privacidad > summary { cursor: pointer; width: fit-content; min-height: 24px; line-height: 24px; }
.campo__privacidad > summary:focus-visible { outline: 2px solid var(--acento-hondo); outline-offset: 3px; }
.campo__privacidad > p { margin-top: var(--s8); }

/* Particular: no se cotiza */
.bloqueo {
  margin-top: var(--s24);
  padding: var(--s24);
  border-radius: var(--r-md);
  background: #fdf3f0;
}

.bloqueo h3 { font-size: var(--t-body-sm); font-weight: 700; color: var(--alerta); margin-bottom: var(--s8); }
.bloqueo p { font-size: var(--t-body-sm); font-weight: 500; }
.bloqueo a { color: var(--alerta); font-weight: 600; overflow-wrap: anywhere; }

/* ── Buscador, filtros, conteo ──────────────────────────────────────────── */

.buscador {
  display: flex;
  align-items: center;
  gap: var(--s16);
  border: 1px solid var(--linea-fuerte);
  border-radius: var(--r-pill);
  background: var(--blanco);
  padding: 0 var(--s24);
}

.buscador svg { flex: none; color: var(--pizarra); }

.buscador input {
  flex: 1;
  border: 0;
  background: none;
  padding: 15px 0;
  font-family: var(--fuente);
  font-size: var(--t-body-sm);
  font-weight: 500;
  color: var(--tinta);
}

.buscador input:focus { outline: none; }
.buscador:focus-within { border-color: var(--acento); box-shadow: 0 0 0 3px var(--acento-wash); }

.filtros { display: flex; flex-wrap: wrap; gap: var(--s8); margin: var(--s16) 0 var(--s8); }

.filtro {
  border: 1px solid var(--linea);
  border-radius: var(--r-pill);
  background: var(--blanco);
  padding: 9px var(--s16);
  font-size: var(--t-caption);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.filtro:hover { border-color: var(--acento); }
.filtro[aria-pressed="true"] { background: var(--acento); border-color: var(--acento); color: var(--blanco); }

.conteo { font-size: var(--t-caption); font-weight: 600; color: var(--pizarra); margin: var(--s16) 0; }

/* ── Listados: una tarjeta con renglones adentro ────────────────────────── */

/* La tarjeta es SÓLO #computo. El índice va adentro: antes tenía su propia
   tarjeta y quedaba una tarjeta dentro de otra (doble sombra y doble radio). */
.computo {
  background: var(--blanco);
  border-radius: var(--r-md);
  box-shadow: var(--sombra);
  overflow: hidden;
}

.indice__fila,
.fila {
  width: 100%;
  display: grid;
  align-items: center;
  gap: var(--s16);
  border: 0;
  border-bottom: 1px solid var(--linea);
  background: none;
  text-align: left;
}

.indice__fila:last-child,
.fila:last-child { border-bottom: 0; }

.indice__fila {
  grid-template-columns: 48px minmax(0, 1fr) auto 24px;
  padding: var(--s16) var(--s24);
  cursor: pointer;
  font-size: var(--t-body-sm);
  font-weight: 600;
}

.indice__fila:hover { background: var(--niebla); }
.indice__num { font-size: var(--t-caption); font-weight: 600; color: var(--pizarra); }
.indice__nom {
  font-weight: 600;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s8);
  min-width: 0;
}

/* Categorías que ya tienen modelos en el pedido. Con el pedido a medio armar y
   el índice en pantalla es el único indicador de por dónde venías, así que la
   fila entera se tiñe: un chip solo se pierde entre diez renglones iguales. */
.indice__fila--con-pedido,
.indice__fila--con-pedido:hover { background: var(--acento-wash); }

.indice__pedido {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  /* 16 + 2 de padding + 2 de borde = 20 px, por debajo de los 24 px que mide la
     línea de la fila: así la categoría marcada no queda más alta que el resto. */
  padding: 1px var(--s8);
  border: 1px solid var(--acento);
  border-radius: var(--r-pill);
  background: var(--blanco);
  color: var(--acento-hondo);
  font-size: var(--t-caption);
  line-height: 16px;
  font-weight: 600;
  white-space: nowrap;
}
.indice__cuenta { font-size: var(--t-caption); font-weight: 500; color: var(--pizarra); white-space: nowrap; }
.indice__flecha { color: var(--acento); font-size: var(--t-body-sm); }

.indice__pie {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s16);
  flex-wrap: wrap;
  padding: var(--s24);
  border-top: 1px solid var(--linea);
  font-size: var(--t-caption);
  font-weight: 500;
  color: var(--pizarra);
}

/* El conteo lleva el enlace para volver a las categorías. */
.conteo .enlace { margin-left: var(--s8); }

/* ── Renglón del cómputo ────────────────────────────────────────────────── */

.fila {
  grid-template-columns: 64px minmax(0, 1fr) auto;
  padding: var(--s16) var(--s24);
}

.fila:hover { background: var(--niebla); }
.fila[data-elegida="si"] { background: var(--acento-wash); }

.fila__foto {
  width: 64px; height: 64px;
  object-fit: cover;
  border-radius: var(--r-sm);
  background: var(--niebla);
}

.fila__txt { min-width: 0; }

/* Resumen de una línea + flecha sutil para ampliar. */
.fila__resumen { display: flex; align-items: flex-start; gap: 6px; margin-top: 2px; }

.fila__mas {
  flex: none;
  border: 0;
  background: none;
  padding: 0 2px;
  margin-top: 1px;
  cursor: pointer;
  color: var(--pizarra);
  line-height: 0;
  border-radius: var(--r-pill);
}

.fila__mas:hover { color: var(--acento-hondo); }
.fila__mas svg { transition: transform .15s ease; }
.fila__mas[aria-expanded="true"] svg { transform: rotate(180deg); }
.fila__nom { display: block; font-size: var(--t-body-sm); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fila__desc {
  flex: 1;
  min-width: 0;
  display: block;
  font-size: var(--t-caption);
  font-weight: 500;
  color: var(--pizarra);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Desplegado: el texto completo, en varias líneas. */
.fila[data-expandido="si"] .fila__desc {
  white-space: normal;
  overflow: visible;
  line-height: 1.5;
}

.fila__acc { display: flex; align-items: center; gap: var(--s8); }

.btn-agregar {
  border: 1px solid var(--acento);
  border-radius: var(--r-pill);
  background: var(--blanco);
  color: var(--acento-hondo);
  padding: 10px var(--s24);
  font-size: var(--t-caption);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.btn-agregar:hover { background: var(--acento); color: var(--blanco); }

.color-fila {
  appearance: none;
  border: 1px solid var(--linea-fuerte);
  border-radius: var(--r-pill);
  background: var(--blanco);
  padding: 10px var(--s16);
  font-family: var(--fuente);
  font-size: var(--t-caption);
  font-weight: 600;
  color: var(--tinta);
  cursor: pointer;
}

/* ── Cantidad: un control en píldora ────────────────────────────────────── */

.cant {
  touch-action: manipulation;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--linea-fuerte);
  border-radius: var(--r-pill);
  background: var(--blanco);
  overflow: hidden;
}

.cant button {
  width: 40px; height: 40px;
  border: 0;
  background: none;
  cursor: pointer;
  font-size: var(--t-body-sm);
  font-weight: 600;
  line-height: 1;
  color: var(--tinta);
}

.cant button:hover { background: var(--acento-wash); color: var(--acento-hondo); }

.cant input {
  width: 48px;
  border: 0;
  background: none;
  text-align: center;
  font-family: var(--fuente);
  font-size: var(--t-body-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--tinta);
  padding: var(--s8) 0;
  -moz-appearance: textfield;
  appearance: textfield;
}

.cant input::-webkit-inner-spin-button,
.cant input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cant input:focus { outline: none; }

/* ── Planilla ───────────────────────────────────────────────────────────── */

.planilla {
  position: sticky;
  top: var(--s80);
  background: var(--blanco);
  border-radius: var(--r-md);
  box-shadow: var(--sombra);
  overflow: hidden;
}

.pl__cab {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s16);
  padding: var(--s24);
  border-bottom: 1px solid var(--linea);
}

.pl__cab h2 { font-size: var(--t-body-sm); font-weight: 700; }
.pl__cab span { font-size: var(--t-caption); font-weight: 600; color: var(--pizarra); }

.pl__cuerpo { max-height: 44vh; overflow-y: auto; }

.pl__vacia { padding: var(--s24); font-size: var(--t-caption); font-weight: 500; color: var(--pizarra); }
.pl__vacia b { display: block; color: var(--tinta); font-weight: 700; margin-bottom: var(--s8); }

/* Colocación EXPLÍCITA: con auto-placement, el contador caía en la columna de la
   foto (48 px) y, alineado a la derecha, se desbordaba fuera de la tarjeta. */
.pl__fila {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: var(--s8) var(--s16);
  align-items: center;
  padding: var(--s16) var(--s24);
  border-bottom: 1px solid var(--linea);
}

.pl__fila:last-child { border-bottom: 0; }

.pl__foto {
  grid-column: 1;
  grid-row: 1;
  width: 48px; height: 48px;
  object-fit: cover;
  border-radius: var(--r-sm);
  background: var(--niebla);
}

.pl__linea { grid-column: 2; display: flex; align-items: center; gap: var(--s8); min-width: 0; }
.pl__linea--accion { justify-content: flex-end; }

.pl__nom { font-size: var(--t-caption); font-weight: 600; min-width: 0; }
.pl__color-txt { font-weight: 500; color: var(--pizarra); }
.pl__cant { font-size: var(--t-body-sm); font-weight: 700; margin-left: auto; font-variant-numeric: tabular-nums; }

.pl__accion { display: flex; align-items: center; gap: var(--s8); }

.pl__x {
  border: 0;
  background: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
  color: var(--pizarra);
  line-height: 0;
  border-radius: var(--r-pill);
  flex: none;
}

.pl__x:hover { color: var(--alerta); background: var(--niebla); }

.pl__color { margin-top: var(--s8); font-size: var(--t-caption); font-weight: 500; color: var(--pizarra); }

/* El pie se pega abajo del contenedor que scrollea: con muchos renglones, el
   CTA y el "Volver atrás" tienen que seguir a la vista sin scrollear. */
.pl__pie {
  position: sticky;
  bottom: 0;
  z-index: 1;
  background: var(--blanco);
  border-top: 1px solid var(--linea);
  padding: var(--s24);
  display: flex;
  flex-direction: column;
  gap: var(--s16);
}

/* Enlace sutil: sin fondo, en gris, y recién se subraya al pasar el mouse. */
.pl__volver {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: none;
  padding: 4px 8px;
  border-radius: var(--r-pill);
  cursor: pointer;
  font-size: var(--t-caption);
  font-weight: 500;
  color: var(--pizarra);
}

.pl__volver:hover { color: var(--acento-hondo); text-decoration: underline; text-underline-offset: 3px; }

.pl__tot { display: flex; justify-content: space-between; align-items: baseline; }
.pl__tot span { font-size: var(--t-caption); font-weight: 600; color: var(--pizarra); }
.pl__tot b { font-size: var(--t-body); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ── Botones: píldora ───────────────────────────────────────────────────── */

.boton {
  border: 1px solid var(--tinta);
  border-radius: var(--r-pill);
  background: var(--blanco);
  color: var(--tinta);
  padding: 12px var(--s24);
  font-size: var(--t-body-sm);
  font-weight: 600;
  cursor: pointer;
}

.boton:hover { background: var(--tinta); color: var(--blanco); }

.boton--pri { background: var(--acento); border-color: var(--acento); color: var(--blanco); }
.boton--pri:hover { background: var(--acento-hondo); border-color: var(--acento-hondo); }
.boton--pri[disabled] { background: var(--niebla); border-color: var(--niebla); color: var(--pizarra); cursor: default; }
.boton--pri[disabled]:hover { background: var(--niebla); border-color: var(--niebla); color: var(--pizarra); }
.boton--ancho { width: 100%; }

.pie-parte {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s16);
  margin-top: var(--s40);
}

@media (min-width: 961px) { #a-paso-3 { display: none; } }

/* ── Bloque opcional (obra y plazo) ─────────────────────────────────────── */

.opcional {
  margin-top: var(--s24);
  border: 1px solid var(--linea);
  border-radius: var(--r-md);
  padding: var(--s24);
}

.opcional summary { cursor: pointer; font-size: var(--t-body-sm); font-weight: 600; }
.opcional summary .rot { font-weight: 500; }
.opcional__cuerpo { margin-top: var(--s24); }
.opcional .campo__pista { margin-top: var(--s16); }

/* ── Resumen ────────────────────────────────────────────────────────────── */

.resumen {
  background: var(--blanco);
  border-radius: var(--r-md);
  box-shadow: var(--sombra);
  padding: var(--s24);
  margin-bottom: var(--s16);
}

.resumen__cab {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s16);
  padding-bottom: var(--s16);
  margin-bottom: var(--s16);
  border-bottom: 1px solid var(--linea);
}

.resumen__cab h3 { font-size: var(--t-body-sm); font-weight: 700; }

.enlace {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  font-size: var(--t-caption);
  font-weight: 600;
  color: var(--acento-hondo);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.datos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s16) var(--s24); }
.dato { min-width: 0; }
.dato__rot { display: block; font-size: var(--t-caption); font-weight: 500; color: var(--pizarra); }
.dato__val { font-size: var(--t-body-sm); font-weight: 600; overflow-wrap: anywhere; }

.tabla-final { width: 100%; border-collapse: collapse; }
.tabla-final td { padding: var(--s16) 0; border-bottom: 1px solid var(--linea); font-size: var(--t-body-sm); font-weight: 500; vertical-align: baseline; }
.tabla-final tr:last-child td { border-bottom: 0; }
.tabla-final td:first-child { font-weight: 700; width: 64px; }
.tabla-final td:last-child { text-align: right; white-space: nowrap; font-weight: 600; }
.tabla-final .variante { display: block; font-size: var(--t-caption); font-weight: 500; color: var(--pizarra); }

/* ── Confirmación ───────────────────────────────────────────────────────── */

.confirmacion { max-width: 680px; }

.confirmacion__nota {
  max-width: 56ch;
  margin: var(--s24) 0 var(--s32);
  padding: var(--s16) var(--s24);
  background: var(--niebla);
  border-radius: var(--r-md);
  font-size: var(--t-caption);
  font-weight: 500;
  color: var(--pizarra);
}

.tecnico { background: var(--niebla); border-radius: var(--r-md); padding: var(--s24); }
.tecnico summary { cursor: pointer; font-size: var(--t-caption); font-weight: 600; color: var(--pizarra); }
.tecnico pre { margin: var(--s16) 0 0; font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; line-height: 1.5; overflow-x: auto; }

/* ── Vacío ──────────────────────────────────────────────────────────────── */

.vacio { padding: var(--s48) var(--s24); text-align: center; color: var(--pizarra); font-size: var(--t-body-sm); font-weight: 500; }
.vacio b { display: block; color: var(--tinta); font-weight: 700; margin-bottom: var(--s8); }

/* ── Barra y hoja del celular ───────────────────────────────────────────── */

.barra {
  display: none;
  position: fixed;
  left: var(--s16); right: var(--s16); bottom: var(--s16);
  z-index: 40;
  background: var(--tinta);
  color: var(--blanco);
  border-radius: var(--r-md);
  box-shadow: var(--sombra);
  padding: var(--s16) var(--s16) calc(var(--s16) + env(safe-area-inset-bottom));
  align-items: center;
  gap: var(--s16);
}

.barra[hidden] { display: none !important; }
.barra__info { display: flex; flex-direction: column; line-height: 1.3; }
.barra__info b { font-size: var(--t-body-sm); font-weight: 700; }
.barra__info span { font-size: var(--t-caption); font-weight: 500; color: #b9bcae; }
.barra .boton { margin-left: auto; background: var(--acento); border-color: var(--acento); color: var(--blanco); }
.barra .boton:hover { background: var(--acento-hondo); border-color: var(--acento-hondo); }

.hoja-movil { position: fixed; inset: 0; z-index: 50; display: none; }
.hoja-movil[data-abierta="si"] { display: block; }
.hoja-movil__velo { position: absolute; inset: 0; background: rgba(37, 39, 40, .45); border: 0; padding: 0; cursor: pointer; }

.hoja-movil__panel {
  position: absolute;
  left: var(--s8); right: var(--s8); bottom: var(--s8);
  max-height: 84vh;
  overflow-y: auto;
  background: var(--blanco);
  border-radius: var(--r-md);
  box-shadow: var(--sombra);
}

.hoja-movil__panel .planilla { position: static; box-shadow: none; border-radius: 0; overflow: visible; }
.hoja-movil__panel .pl__cuerpo { max-height: 48vh; }

/* ── Mientras se envía ──────────────────────────────────────────────────── */

/* El envío real tarda varios segundos y no es culpa nuestra: el ERP crea la
   cotización en milisegundos, pero el correo lo acepta el servidor de
   Hostinger, y eso son segundos por mail. Sin esto el visitante mira un botón
   que dice "Enviando…" y no sabe si se colgó o está trabajando. */
.envio {
  position: fixed;
  inset: 0;
  z-index: 80;                              /* arriba del toast (60) */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s24);
  background: rgba(245, 247, 249, .6);      /* la niebla del sistema, translúcida */
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.envio[hidden] { display: none; }

.envio__caja {
  background: var(--blanco);
  border: 1px solid var(--linea);
  border-radius: var(--r-md);
  box-shadow: var(--sombra);
  padding: var(--s32) var(--s40);
  text-align: center;
  max-width: 380px;
}

.envio__rueda {
  display: block;
  width: 28px; height: 28px;
  margin: 0 auto var(--s16);
  border: 3px solid var(--acento-wash);
  border-top-color: var(--acento);
  border-radius: 50%;
  animation: girar .8s linear infinite;
}

@keyframes girar { to { transform: rotate(360deg); } }

/* Terminó bien: la rueda se convierte en un check. */
.envio__rueda[data-ok="si"] {
  border: 0;
  animation: none;
  width: auto; height: auto;
  margin-bottom: var(--s8);
  font-size: 34px;
  line-height: 1;
  color: var(--acento);
}

.envio__rueda[data-ok="si"]::before { content: "✓"; }

.envio__titulo {
  margin: 0;
  font-size: var(--t-body);
  font-weight: 600;
  color: var(--tinta);
}

/* Los pasos reales del envío. El ERP audita cada uno y la landing los pinta a
   medida que pasan: los cuatro primeros vuelan y la espera se la llevan los dos
   mails, así que ver dónde está es la diferencia entre "está trabajando" y
   "se colgó". */
.envio__pasos {
  list-style: none;
  margin: var(--s24) 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
  text-align: left;
}

/* El `hidden` del HTML **no alcanza** cuando la regla de arriba le pone
   `display: grid`: el del autor le gana al del navegador y la lista se queda a
   la vista. Pasó el 08/10/2026: en "Enviado correctamente" seguían los pasos. */
.envio__pasos[hidden] { display: none; }

.envio__paso {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--t-body-sm);
  line-height: 1.4;
  color: var(--pizarra);
  transition: color .2s;
}

/* El punto de cada paso: vacío, lleno (hecho) o girando (en curso). */
.envio__paso::before {
  content: "";
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 16px; height: 16px;
  box-sizing: border-box;
  border: 2px solid var(--linea-fuerte);
  border-radius: 50%;
  background: var(--blanco);
}

/* Hecho: un **check**, no un punto lleno. Lo pidió Mateo el 08/10/2026. */
.envio__paso[data-estado="hecho"] { color: var(--tinta); }
.envio__paso[data-estado="hecho"]::before {
  content: "✓";
  border-color: transparent;
  background: transparent;
  color: var(--acento);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

/* En curso: el círculo gira y el texto lleva un brillo que lo cruza — el mismo
   recurso que usa una línea de "pensando" para que se lea como algo vivo. */
.envio__paso[data-estado="activo"] { color: var(--tinta); font-weight: 600; }
.envio__paso[data-estado="activo"]::before {
  border-color: var(--acento);
  border-top-color: transparent;
  animation: girar .8s linear infinite;
}

.envio__paso[data-estado="activo"] .envio__paso-texto {
  background: linear-gradient(100deg, rgba(37, 39, 40, .38) 30%, var(--tinta) 50%, rgba(37, 39, 40, .38) 70%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: envio-brillo 1.8s linear infinite;
}

@keyframes envio-brillo { to { background-position: -125% 0; } }

.envio__nota {
  margin: 8px 0 0;
  font-size: var(--t-body-sm);
  line-height: var(--lh-body-sm);
  color: var(--pizarra);
}

/* Quien pidió no ver movimiento, no ve nada girando ni brillando. */
@media (prefers-reduced-motion: reduce) {
  .envio__rueda { animation: none; border-top-color: var(--acento-wash); }
  .envio__paso[data-estado="activo"]::before {
    animation: none;
    border-color: var(--acento);
    background: var(--acento-wash);
  }
  .envio__paso[data-estado="activo"] .envio__paso-texto {
    background: none;
    color: var(--tinta);
    animation: none;
  }
}

/* ── Fallo del envío ────────────────────────────────────────────────────── */

/* Va en su lugar y no sólo en el toast: el toast se va a los 3 segundos y un
   error del sistema tiene que quedar a la vista mientras el pedido sigue
   cargado. Mismo rojo que el ERP usa para los avisos de error. */
.envio-error {
  margin: var(--s16) 0 0;
  padding: 14px var(--s16);
  border: 1px solid #F5C2C0;
  border-left: 3px solid #B42318;
  border-radius: var(--r-sm);
  background: #FDECEC;
  color: #B42318;
  font-size: var(--t-body-sm);
  line-height: 1.5;
}

.envio-error[hidden] { display: none; }

/* ── Aviso flotante ─────────────────────────────────────────────────────── */

.toast {
  position: fixed;
  left: 50%; bottom: var(--s24);
  transform: translate(-50%, 8px);
  z-index: 60;
  background: var(--tinta);
  color: var(--blanco);
  /* Rectángulo redondeado, no píldora: el aviso puede ocupar varias líneas. */
  border-radius: var(--r-sm);
  box-shadow: var(--sombra);
  font-size: var(--t-body-sm);
  font-weight: 600;
  padding: 14px var(--s24);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  max-width: calc(100vw - 32px);
  text-align: center;
}

.toast[data-visible="si"] { opacity: 1; transform: translate(-50%, 0); }

/* ── Aviso de WhatsApp ──────────────────────────────────────────────────── */

/* No es un modal: es una tarjeta al pie que no bloquea nada y se retira sola a
   los 10 segundos. En escritorio va abajo a la izquierda (la planilla ocupa la
   derecha); en el celular, como barra al pie. */
.aviso-wa {
  position: fixed;
  left: var(--s24);
  bottom: var(--s24);
  z-index: 45;                    /* debajo de la hoja de la planilla (50) */
  width: 336px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  grid-template-areas:
    "icono titulo"
    "texto texto"
    "cta   cta";
  gap: var(--s8) 12px;
  padding: var(--s16);
  background: var(--blanco);
  border: 1px solid var(--linea);
  border-radius: var(--r-md);
  box-shadow: var(--sombra);
  opacity: 0;
  visibility: hidden;
  transition: opacity .32s ease, visibility 0s linear .32s, bottom .25s ease;
}

.aviso-wa[data-visible="si"] {
  opacity: 1;
  visibility: visible;
  transition: opacity .32s ease, visibility 0s, bottom .25s ease;
}

.aviso-wa__icono {
  grid-area: icono;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--acento);
  color: var(--blanco);
}

.aviso-wa__titulo {
  grid-area: titulo;
  align-self: center;
  padding-right: 24px;            /* deja libre la X */
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.aviso-wa__texto {
  grid-area: texto;
  font-size: var(--t-caption);
  line-height: 1.45;
  font-weight: 500;
  color: var(--pizarra);
}

.aviso-wa__cta {
  grid-area: cta;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 var(--s16);
  border-radius: var(--r-pill);
  background: var(--tinta);
  color: var(--blanco);
  font-size: var(--t-caption);
  font-weight: 700;
  text-decoration: none;
}

.aviso-wa__cta:hover { background: #3a3d3f; }

.aviso-wa__cerrar {
  position: absolute;
  top: 6px;
  right: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--pizarra);
  cursor: pointer;
}

.aviso-wa__cerrar:hover { background: var(--niebla); color: var(--tinta); }

/* ── Pantallas chicas ───────────────────────────────────────────────────── */

@media (max-width: 960px) {
  .membrete__logo img { height: 32px; }
  .menu__link { font-size: var(--t-caption); padding: 6px; }

  .encabezado {
    width: min(var(--ancho), calc(100% - var(--s32)));
    margin-top: var(--s16);
    min-height: 440px;
    padding: var(--s40) var(--s24) var(--s80);
    border-radius: var(--r-md);
    background-position: center 55%;
  }

  /* 18 px en 310 px de ancho deja la bajada en 4 líneas: en celular va el otro
     tamaño de cuerpo del sistema (16 px) y entra en 3. */
  .encabezado__bajada { font-size: var(--t-body-sm); }
  .encabezado__h1 { font-size: 36px; line-height: 1.05; }

  .condicion { grid-template-columns: minmax(0, 1fr); gap: var(--s8); margin-bottom: var(--s32); }

  .hoja { grid-template-columns: minmax(0, 1fr); padding-bottom: 140px; }
  .lado { display: none; }
  .barra { display: flex; }

  .partes { flex-wrap: nowrap; overflow-x: auto; padding-bottom: var(--s24); scrollbar-width: none; }
  .partes::-webkit-scrollbar { display: none; }

  /* Los filtros también en una fila: envueltos ocupan cinco renglones. */
  .filtros { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--s24) * -1); padding-inline: var(--s24); }
  .filtros::-webkit-scrollbar { display: none; }
  .parte-link__txt { display: none; }
  .parte-link[aria-current="step"] .parte-link__txt { display: inline; }

  .rejilla { grid-template-columns: minmax(0, 1fr); gap: var(--s16); }
  .datos { grid-template-columns: minmax(0, 1fr); }

  .pie-parte { flex-direction: column-reverse; align-items: stretch; gap: var(--s8); }
  .pie-parte .boton { width: 100%; }

  .toast { bottom: 110px; }

  /* El aviso de WhatsApp también va al pie. La barra de la planilla vive ahí:
     cuando está visible, el aviso sube para no taparla ni taparse. */
  .aviso-wa {
    left: var(--s16);
    right: var(--s16);
    bottom: calc(var(--s16) + env(safe-area-inset-bottom));
    width: auto;
    padding: 14px;
  }
  body.con-barra .aviso-wa { bottom: calc(104px + env(safe-area-inset-bottom)); }
}

@media (max-width: 560px) {
  .encabezado__h1 { font-size: 32px; }

  .fila {
    grid-template-columns: 56px minmax(0, 1fr);
    grid-template-areas: "foto txt" "acc acc";
    gap: var(--s8) var(--s16);
    padding: var(--s16);
  }

  .fila__foto { grid-area: foto; width: 56px; height: 56px; align-self: start; }
  .fila__txt { grid-area: txt; }
  .fila__acc { grid-area: acc; justify-content: flex-end; }
  .fila[data-elegida="si"] .fila__acc { justify-content: space-between; }

  .indice__fila { grid-template-columns: 32px minmax(0, 1fr) auto; padding: var(--s16); }
  /* En pantalla chica el chip se queda sólo con el ✓: con el texto, la fila se
     parte en dos líneas y queda más alta que todas sus vecinas. El texto no se
     pierde — pasa a ser sólo para lectores de pantalla. */
  .indice__pedido-largo {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
  .indice__flecha { display: none; }
  .indice__pie { flex-direction: column; align-items: flex-start; }
}

/* ── Pie de página ──────────────────────────────────────────────────────── */
/* Misma estructura que el pie del sitio: contacto, marca y menú en tres
   columnas, y la banda legal abajo. Acá usa la superficie clara del sistema. */

.pie {
  background: var(--niebla);
  padding: var(--s64) var(--s24) var(--s40);
  margin-top: var(--s80);
}

.pie__cuerpo {
  max-width: var(--ancho);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: var(--s48);
  align-items: start;
}

.pie__titulo {
  font-size: var(--t-body-sm);
  font-weight: 700;
  padding-bottom: var(--s16);
  margin-bottom: var(--s16);
  border-bottom: 1px solid var(--linea-fuerte);
  max-width: 240px;
}

.pie__mail { font-size: var(--t-caption); font-weight: 700; margin-bottom: var(--s8); }
.pie__mail a { color: var(--tinta); text-decoration: none; overflow-wrap: anywhere; }
.pie__mail a:hover { color: var(--acento-hondo); text-decoration: underline; text-underline-offset: 3px; }
.pie__dato { font-size: var(--t-caption); font-weight: 500; color: var(--pizarra); }
.pie__dato a { color: inherit; text-decoration: none; }
.pie__dato a:hover { color: var(--acento-hondo); text-decoration: underline; text-underline-offset: 3px; }

.pie__marca { display: grid; place-items: center; }
.pie__marca img { height: 72px; width: auto; }

.pie__menu { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

.pie__link {
  display: inline-flex;
  align-items: center;
  gap: var(--s8);
  padding: 5px 0;
  font-size: var(--t-body-sm);
  font-weight: 500;
  color: var(--tinta);
  text-decoration: none;
}

.pie__link:hover { color: var(--acento-hondo); }
.pie__flecha { display: inline-flex; color: var(--acento); }
.pie__link:hover .pie__flecha { color: var(--acento-hondo); }

.pie__legal {
  max-width: var(--ancho);
  margin: var(--s48) auto 0;
  padding-top: var(--s24);
  border-top: 1px solid var(--linea-fuerte);
}

.pie__legal p { font-size: 12.5px; line-height: 1.6; font-weight: 500; color: var(--pizarra); }
.pie__copyright { margin-top: var(--s8); }

@media (max-width: 960px) {
  .pie { padding: var(--s40) var(--s24) var(--s32); margin-top: var(--s56); }

  .pie__cuerpo {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s32);
    text-align: center;
  }

  .pie__titulo { margin-inline: auto; }
  .pie__menu { align-items: center; }

  /* El pie se centra, pero el texto legal no: un párrafo de cuatro líneas
     centrado se lee mal. */
  .pie__legal { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
