/* El documento de una cotización: claro y para leer, como la propuesta económica de Ramsal. Lo usan la vista
 * previa del editor (dentro de Studio) y cotizacion-doc.html (lo que imprime el PDF). Todo va bajo .cot-doc
 * para no tocar el resto de Studio. Colores fijos a propósito: es un papel, no sigue el tema de la app. */
.cot-doc { --cot-tinta: #111318; --cot-texto: #3a3f4b; --cot-tenue: #6b7280; --cot-linea: #e5e7eb; --cot-fondo: #f5f6fa; --cot-marca: #696fff;
  font-family: 'DM Sans', system-ui, sans-serif; color: var(--cot-texto); font-size: 15px; line-height: 1.6; background: #fff; }
.cot-doc .cot-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding-bottom: 18px; border-bottom: 2px solid var(--cot-tinta); margin-bottom: 32px; }
.cot-doc .cot-marca { font-family: 'Syncopate', sans-serif; font-weight: 700; font-size: 13px; letter-spacing: .14em; color: var(--cot-tinta); }
.cot-doc .cot-marca span { color: var(--cot-marca); }
.cot-doc .cot-fecha { text-align: right; font-size: 13px; color: var(--cot-tenue); line-height: 1.5; }
.cot-doc .cot-chip { display: inline-block; border: 1px solid var(--cot-marca); color: var(--cot-marca); border-radius: 4px; padding: 4px 10px; font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.cot-doc h1 { font-family: 'Syncopate', sans-serif; font-weight: 700; font-size: 25px; line-height: 1.25; letter-spacing: .02em; text-transform: uppercase; color: var(--cot-tinta); margin: 18px 0 8px; }
.cot-doc .cot-sub { font-size: 17px; color: var(--cot-tenue); margin: 0 0 12px; }
.cot-doc section { margin-top: 34px; }
.cot-doc h2 { display: flex; gap: 12px; align-items: baseline; font-size: 19px; font-weight: 600; color: var(--cot-tinta); margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--cot-linea); break-after: avoid; }
.cot-doc h2 span { color: var(--cot-marca); font-weight: 500; }
.cot-doc h3 { font-size: 15.5px; font-weight: 600; color: var(--cot-tinta); margin: 20px 0 6px; break-after: avoid; }
.cot-doc p { margin: 0 0 10px; }
.cot-doc strong { color: var(--cot-tinta); font-weight: 600; }
.cot-doc ul, .cot-doc ol { margin: 0 0 10px; padding-left: 22px; }
.cot-doc li { margin: 4px 0; }
.cot-doc a { color: var(--cot-marca); }
.cot-doc hr { border: 0; border-top: 1px solid var(--cot-linea); margin: 22px 0; }
.cot-doc blockquote { margin: 14px 0; padding: 14px 20px; background: var(--cot-fondo); border-left: 3px solid var(--cot-marca); color: var(--cot-tinta); font-weight: 600; }
.cot-doc table { width: 100%; border-collapse: collapse; margin: 10px 0 14px; font-size: 14.5px; }
.cot-doc th { text-align: left; font-weight: 600; color: var(--cot-tinta); background: var(--cot-fondo); padding: 12px 14px; }
.cot-doc td { padding: 12px 14px; border-bottom: 1px solid var(--cot-linea); vertical-align: top; }
.cot-doc tr { break-inside: avoid; }
.cot-doc .num { text-align: right; white-space: nowrap; }
.cot-doc table.sin-cab td:first-child { font-weight: 600; color: var(--cot-tinta); width: 32%; }
.cot-doc tr.total td { font-weight: 700; color: var(--cot-tinta); background: var(--cot-fondo); border-top: 2px solid var(--cot-tinta); border-bottom: 0; }
.cot-doc code { font-size: .92em; background: var(--cot-fondo); padding: 1px 5px; border-radius: 3px; }
.cot-doc .cot-pie { margin-top: 44px; padding-top: 14px; border-top: 1px solid var(--cot-linea); font-size: 12.5px; color: var(--cot-tenue); }
/* ```mapa: el mapa de sitio como árbol. Raíz arriba, una columna por sección del menú y sus páginas debajo,
 * todo unido con líneas de 1 px. Las líneas son bordes de ::before/::after para que el PDF las imprima nítidas. */
.cot-doc .cot-mapa { --mapa-linea: #b9bdcc; margin: 16px 0 18px; font-size: 11px; line-height: 1.35; break-inside: avoid; }
.cot-doc .cot-mapa ul { list-style: none; margin: 0; padding: 0; }
.cot-doc .cot-mapa li { margin: 0; }
.cot-doc .mapa-raiz { position: relative; text-align: center; padding-bottom: 16px; }
.cot-doc .mapa-raiz span { display: inline-block; background: var(--cot-tinta); color: #fff; font-weight: 600; font-size: 12px; padding: 6px 22px; border-radius: 4px; }
.cot-doc .mapa-raiz::after { content: ''; position: absolute; left: 50%; bottom: 0; height: 16px; border-left: 1px solid var(--mapa-linea); }
.cot-doc .mapa-grupos { display: flex; }
.cot-doc .mapa-grupos > li { position: relative; flex: 1 1 0; min-width: 0; padding: 16px 4px 0; }
.cot-doc .mapa-grupos > li::before { content: ''; position: absolute; top: 0; left: 0; right: 0; border-top: 1px solid var(--mapa-linea); }
.cot-doc .mapa-grupos > li:first-child::before { left: 50%; }
.cot-doc .mapa-grupos > li:last-child::before { right: 50%; }
.cot-doc .mapa-grupos > li::after { content: ''; position: absolute; top: 0; left: 50%; height: 16px; border-left: 1px solid var(--mapa-linea); }
.cot-doc .mapa-grupos > li:only-child::before,
.cot-doc .cot-mapa.sin-raiz .mapa-grupos > li::before,
.cot-doc .cot-mapa.sin-raiz .mapa-grupos > li::after { display: none; }
.cot-doc .cot-mapa.sin-raiz .mapa-grupos > li { padding-top: 0; }
.cot-doc .mapa-grupo { border: 1px solid var(--cot-marca); border-radius: 4px; background: #fff; color: var(--cot-tinta); font-weight: 600; text-align: center; padding: 5px 4px; }
.cot-doc .mapa-hojas { margin-left: 10px; }
.cot-doc .mapa-hojas li { position: relative; padding: 3px 0 3px 11px; }
.cot-doc .mapa-hojas li::before { content: ''; position: absolute; left: 0; top: 0; width: 7px; height: 10px; border-left: 1px solid var(--mapa-linea); border-bottom: 1px solid var(--mapa-linea); }
.cot-doc .mapa-hojas li::after { content: ''; position: absolute; left: 0; top: 10px; bottom: 0; border-left: 1px solid var(--mapa-linea); }
.cot-doc .mapa-hojas li:last-child::after { display: none; }
/* una redirección («Vieja → Nueva»): la vieja en una caja punteada y, debajo, a qué página manda */
.cot-doc .mapa-hojas li.mapa-redir > span:first-child { display: inline-block; margin-left: -3px; padding: 0 4px; border: 1px dashed var(--cot-marca); border-radius: 3px; color: var(--cot-tenue); }
.cot-doc .mapa-redir-a { display: block; margin-top: 2px; color: var(--cot-marca); font-weight: 600; }
.cot-doc .mapa-leyenda { display: flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 10.5px; color: var(--cot-tenue); }
.cot-doc .mapa-leyenda i { width: 14px; height: 9px; border: 1px dashed var(--cot-marca); border-radius: 2px; }
/* ## Firmas: una tabla de dos columnas (Por Disennio | Por el cliente) se vuelve el bloque para firmar: espacio
 * en blanco, la raya, y debajo quién firma y su cargo */
.cot-doc .cot-sec-firmas { break-inside: avoid; }
.cot-doc .cot-sec-firmas table { table-layout: fixed; border-collapse: separate; border-spacing: 40px 0; margin: 64px -40px 0; width: calc(100% + 80px); }
.cot-doc .cot-sec-firmas th { background: none; padding: 10px 0 2px; border-top: 1px solid var(--cot-tinta); font-size: 13px; }
.cot-doc .cot-sec-firmas td { padding: 2px 0; border: 0; font-size: 13.5px; color: var(--cot-texto); }
/* con firma: la primera fila de la tabla (la cabecera) es el espacio para firmar y la raya pasa abajo de ella */
.cot-doc .cot-sec-firmas th { height: 70px; vertical-align: bottom; padding: 0; border-top: 0; }
.cot-doc .cot-sec-firmas th .cot-img { display: block; height: 78px; width: auto; margin: 0 0 -14px -6px; }
.cot-doc .cot-sec-firmas tbody tr:first-child td { border-top: 1px solid var(--cot-tinta); padding-top: 10px; font-weight: 600; color: var(--cot-tinta); }
.cot-doc .cot-sec-firmas table { margin-top: 24px; }
/* la sección del mapa no se parte: si el mapa no cabe, su título y su texto se van con él a la hoja siguiente */
.cot-doc section:has(.cot-mapa) { break-inside: avoid; }
.cot-doc .cot-sec-firmas th .cot-img { height: 96px; margin: 0 0 -10px 2px; }
