/* Ferracon · app de obra. Móvil primero: una columna, botones grandes, colores de la marca. */
:root {
  --bg: #f2f4f7; --azul-noche: #0f2347; --panel: #ffffff; --ink: #1c2634; --muted: #687282; --line: #dfe3e9; --chip: #eef1f5;
  --azul: #1d4e9b; --azul-suave: #e6eef9; --rojo: #c43424; --rojo-suave: #fbebe8; --verde: #287850; --verde-suave: #e7f3ec; --ambar: #b7791f; --ambar-suave: #fbf1df;
  --morado: #6b46c1; --morado-suave: #efeafb; --teal: #0f766e; --teal-suave: #e2f3f1; --gris: #8a93a3;
  --panel-lat: #e9eef7; --sombra: 0 1px 2px rgba(15,35,71,.05), 0 4px 14px rgba(15,35,71,.06);
  --f: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--ink); font: 16px/1.45 var(--f); -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
.cargando { padding: 40px 20px; text-align: center; color: var(--muted); }

.top { position: sticky; top: 0; z-index: 10; background: var(--panel); border-bottom: 3px solid var(--rojo); box-shadow: 0 1px 0 var(--line);
  padding: calc(8px + env(safe-area-inset-top, 0px)) max(14px, env(safe-area-inset-right, 0px)) 8px max(14px, env(safe-area-inset-left, 0px)); }
.top-in { display: flex; align-items: center; gap: 10px; max-width: 1440px; margin: 0 auto; }
.top .marca { display: flex; } .top .marca img { height: 32px; display: block; }
/* Botón volver: pastilla con flecha y texto, fácil de tocar */
.atras { display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 12px 0 8px; border: 1px solid var(--line); background: var(--panel);
  border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--ink); text-decoration: none; box-shadow: 0 1px 2px rgba(15,35,71,.06); transition: background .15s, border-color .15s; }
.atras svg { width: 20px; height: 20px; fill: none; stroke: var(--azul); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.atras:hover { background: var(--azul-suave); border-color: #c9d8ef; }
@media (max-width: 420px) { .atras span { display: none; } .atras { padding: 0 9px; } }
.quien { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.ava { width: 34px; height: 34px; border-radius: 50%; background: var(--azul-noche); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: none; letter-spacing: .02em; }
.ava.s { width: 24px; height: 24px; font-size: 10px; }
.qn { display: grid; line-height: 1.15; text-align: right; } .qn b { font-size: 14px; } .qn .rol { justify-self: end; margin-top: 2px; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--azul-suave); color: var(--azul); }
.salir { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.salir:hover { color: var(--rojo); border-color: #efc9c3; }
@media (max-width: 600px) { .qn { display: none; } .top .marca img { height: 28px; } }

main { max-width: 760px; margin: 0 auto; padding: 16px max(16px, env(safe-area-inset-right, 0px)) calc(110px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); display: grid; gap: 14px; }
h1 { font-size: 24px; line-height: 1.15; margin: 4px 0 0; text-wrap: balance; }
h2 { font-size: 18px; margin: 8px 0 0; }
.sub { color: var(--muted); font-size: 14px; margin: 0; }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--muted); margin: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--chip);
  border-radius: 12px; padding: 12px 16px; font-weight: 700; cursor: pointer; text-decoration: none; color: var(--ink); min-height: 48px; }
.btn.prim { background: var(--azul); border-color: transparent; color: #fff; }
.btn.peligro { color: var(--rojo); }
.btn.ancho { width: 100%; }
.btn:disabled { opacity: .5; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: grid; gap: 8px; }
a.card { color: inherit; text-decoration: none; }
.fila { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fila .der { margin-left: auto; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--chip); color: var(--muted); white-space: nowrap; }
.chip.visita { background: var(--azul-suave); color: var(--azul); }
.chip.orden_trabajo { background: var(--ambar-suave); color: var(--ambar); }
.chip.estudios { background: var(--verde-suave); color: var(--verde); }
.chip.presupuesto, .chip.aceptada, .chip.en_obra, .chip.terminada { background: var(--chip); color: var(--ink); }

form.f { display: grid; gap: 12px; }
label.c { display: grid; gap: 5px; font-size: 13px; font-weight: 700; color: var(--muted); }
label.c input, label.c select, label.c textarea { border: 1px solid var(--line); background: var(--panel); border-radius: 12px; padding: 12px; font-size: 16px; font-weight: 500; color: var(--ink); width: 100%; }
label.c textarea { min-height: 110px; resize: vertical; }
.dos { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.err { background: var(--rojo-suave); color: var(--rojo); border-radius: 12px; padding: 10px 12px; font-size: 14px; font-weight: 600; margin: 0; }
.ok { background: var(--verde-suave); color: var(--verde); border-radius: 12px; padding: 10px 12px; font-size: 14px; font-weight: 600; margin: 0; }
.vacio { text-align: center; color: var(--muted); padding: 24px 12px; border: 1px dashed var(--line); border-radius: 16px; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 24px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px)); }
.login .card { width: min(420px, 100%); padding: 22px; gap: 14px; }
.login img { height: 54px; justify-self: center; }

.fab { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9; background: linear-gradient(transparent, var(--bg) 35%);
  padding: 18px max(16px, env(safe-area-inset-right, 0px)) calc(14px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.fab > div { max-width: 760px; margin: 0 auto; display: flex; gap: 10px; }
.fab .btn { flex: 1; }
.vivo { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.vivo i { width: 8px; height: 8px; border-radius: 50%; background: var(--verde); }

/* Cabecera de cada pantalla: título a la izquierda, acción principal a la derecha (en ordenador) */
.cab { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.cab .acc { margin-left: auto; }
.cab .acc .btn { display: none; }

/* Fases de la obra: de un vistazo, cuántas hay en cada paso */
.fases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fase { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; display: grid; gap: 2px; }
.fase b { font-size: 20px; line-height: 1; font-variant-numeric: tabular-nums; }
.fase span { font-size: 12px; color: var(--muted); font-weight: 600; }
.fase.visita b { color: var(--azul); } .fase.orden_trabajo b { color: var(--ambar); } .fase.estudios b { color: var(--verde); }

.lista-obras { display: grid; gap: 10px; }
.obra-card { border-left: 4px solid var(--azul); }
.obra-card.orden_trabajo { border-left-color: var(--ambar); } .obra-card.estudios { border-left-color: var(--verde); }
.vacio .ico { display: block; width: 46px; height: 46px; margin: 0 auto 8px; color: var(--azul); }
.vacio b { color: var(--ink); }
.vacio ol { text-align: left; display: inline-grid; gap: 4px; margin: 10px 0 0; padding-left: 20px; color: var(--ink); font-size: 14px; }

/* Ordenador: más ancho, tarjetas en rejilla y el botón principal arriba */
@media (min-width: 900px) {
  main { max-width: 1180px; padding-top: 28px; padding-bottom: 48px; gap: 18px; }
  h1 { font-size: 30px; }
  .cab .acc .btn { display: inline-flex; }
  .fab { display: none; }
  .fases { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .lista-obras { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
  .card { padding: 18px; }
  .top { padding-top: 12px; padding-bottom: 12px; }
}

/* Obra y partida: en móvil una columna; en ordenador, contenido a la izquierda y panel a la derecha */
.obra-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.col-princ, .col-lat { display: grid; gap: 14px; align-content: start; min-width: 0; }
@media (min-width: 900px) { .obra-grid { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; } .col-lat { position: sticky; top: 90px; } }
.estancia h2 { display: flex; align-items: baseline; gap: 8px; margin: 4px 0 8px; }
.estancia h2 small { font-size: 12px; color: var(--muted); font-weight: 600; }
.lista-part { display: grid; gap: 8px; }
@media (min-width: 900px) { .lista-part { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); } }
.part { display: flex; gap: 12px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px; color: inherit; text-decoration: none; min-width: 0; }
.part .mini { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--chip); flex: none; display: grid; place-items: center; }
.part .mini img { width: 100%; height: 100%; object-fit: cover; }
.part .mini i { font-style: normal; font-weight: 700; color: var(--muted); font-size: 18px; }
.part .txt { display: grid; gap: 2px; min-width: 0; flex: 1; }
.part .txt b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; }
.part .txt small { color: var(--muted); font-size: 13px; }
.part .txt em { color: var(--rojo); font-style: normal; font-weight: 700; }
.estado-p { font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 999px; background: var(--ambar-suave); color: var(--ambar); flex: none; }
.estado-p.ok { background: var(--verde-suave); color: var(--verde); font-size: 14px; }

.fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.foto { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--chip); padding: 0; cursor: pointer; display: block; }
.foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto span { position: absolute; left: 6px; bottom: 6px; font-size: 11px; font-weight: 700; background: var(--rojo); color: #fff; padding: 2px 7px; border-radius: 999px; }
.foto span.sin { background: rgba(20,24,32,.7); }
.foto.nueva { display: grid; place-content: center; text-align: center; gap: 2px; color: var(--azul); font-size: 12px; font-weight: 700; border: 2px dashed var(--azul); background: var(--azul-suave); }
.foto.nueva b { font-size: 30px; line-height: 1; }
.nota { border-left: 3px solid var(--azul); padding: 2px 0 2px 10px; }
.nota p { margin: 0; white-space: pre-wrap; }
.nota small { color: var(--muted); font-size: 12px; }
.nota small button { border: 0; background: none; color: var(--rojo); font-size: 12px; cursor: pointer; padding: 0 0 0 6px; }
.nota small button.ed { color: var(--azul); padding-left: 10px; }
.nota-ed { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; resize: vertical; }
.toggle { display: flex; gap: 10px; align-items: center; font-size: 14px; font-weight: 600; }
.toggle input { width: 22px; height: 22px; }
.fila-plano { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; border: 1px solid var(--line); background: var(--chip); border-radius: 12px; padding: 12px; cursor: pointer; font-weight: 700; text-align: left; }
.fila-plano small { color: var(--muted); font-weight: 500; }

.hoja-fondo { position: fixed; inset: 0; z-index: 40; background: rgba(15,35,71,.35); display: grid; align-items: end; }
@media (min-width: 900px) { .hoja-fondo { align-items: center; justify-items: center; } }
.hoja { background: var(--panel); border-radius: 18px 18px 0 0; max-height: 90vh; overflow: auto; width: 100%;
  padding: 18px max(16px, env(safe-area-inset-right, 0px)) calc(18px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
@media (min-width: 900px) { .hoja { width: 560px; border-radius: 18px; } }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -4px; }
.chip-b { border: 1px solid var(--line); background: var(--chip); border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.chip-b[aria-pressed="true"] { background: var(--azul-suave); border-color: var(--azul); color: var(--azul); }
.marco { position: fixed; inset: 0; z-index: 50; background: var(--bg); }
.marco iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Banda de fases de la obra */
.banda { gap: 12px; }
.pasos { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.pasos li { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--chip); }
.pasos li i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; background: var(--panel); border: 1px solid var(--line); }
.pasos li.hecho { color: var(--verde); } .pasos li.hecho i { background: var(--verde); color: #fff; border-color: transparent; }
.pasos li.ahora { color: var(--azul); background: var(--azul-suave); } .pasos li.ahora i { background: var(--azul); color: #fff; border-color: transparent; }

/* Preguntas de Estudios */
.preg { border-left: 3px solid var(--ambar); padding: 2px 0 2px 10px; display: grid; gap: 6px; }
.preg.resp { border-left-color: var(--verde); }
.preg p { margin: 0; } .preg small { color: var(--muted); font-size: 12px; }
.preg .r { color: var(--verde); }
.preg textarea { border: 1px solid var(--line); border-radius: 10px; padding: 8px; min-height: 60px; font-size: 15px; }
.pend-t { font-size: 12px; font-weight: 700; color: var(--ambar); }

/* Documento: orden de trabajo (pantalla = hojas A4 sobre gris; impresión/PDF = A4 limpias, fondo blanco para ahorrar tinta) */
.doc-barra { position: sticky; top: 60px; z-index: 8; background: var(--panel); border-bottom: 1px solid var(--line);
  padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); }
.doc-barra-in { max-width: 900px; margin: 0 auto; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.doc-barra-in b { font-size: 15px; }
.doc-main { max-width: 900px; padding-top: 18px; }
.doc { display: grid; gap: 18px; color: #1c2634; }
.hoja { background: #fff; border-radius: 6px; box-shadow: 0 2px 14px rgba(15,35,71,.10); padding: 28px 30px 30px; display: grid; gap: 12px; align-content: start; }
.d-cab { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 2px solid #c43424; padding-bottom: 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; color: #6e737d; }
.d-cab img { height: 22px; }
.d-tit { font-size: 22px; line-height: 1.2; margin: 6px 0 0; letter-spacing: -.01em; text-wrap: balance; }
.d-sub { margin: -6px 0 0; color: #6e737d; font-size: 14px; }
.d-aviso { margin: 0; background: #fbebe8; color: #c43424; border-radius: 8px; padding: 8px 10px; font-size: 13px; font-weight: 600; }
.d-fotos { display: grid; gap: 8px; } .d-fotos.n2, .d-fotos.n3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.d-fotos figure, .d-croq { margin: 0; } .d-fotos img, .d-croq img { width: 100%; display: block; border-radius: 4px; }
.d-fotos figcaption { font-size: 11px; color: #6e737d; margin-top: 3px; }
.d-croq { border: 1px solid #e3e0d8; border-radius: 6px; overflow: hidden; }
.d-dos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.d-dos h3, .d-h, .d-consejo h3, .d-notas h3 { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin: 4px 0 4px; color: #1c2634; }
.d-dos p, .hoja > p { margin: 0; font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; }
.d-lista { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.d-lista li { position: relative; padding-left: 20px; font-size: 14.5px; line-height: 1.45; }
.d-lista li::before { content: ""; position: absolute; left: 4px; top: .5em; width: 8px; height: 8px; border-radius: 50%; background: #c43424; }
.d-lista.verde li::before { background: #287850; }
.d-estr { margin: 0; border-left: 3px solid #c43424; padding: 4px 10px; font-size: 13.5px; font-weight: 700; color: #c43424; }
.d-consejo { border: 2px solid #287850; background: #eef6f0; border-radius: 10px; padding: 10px 14px 12px; }
.d-consejo h3 { color: #287850; }
.d-notas { border-top: 1px solid #e3e0d8; padding-top: 8px; } .d-notas p { margin: 0 0 4px; font-size: 13px; color: #39424f; } .d-notas small { color: #8a8f99; }
.d-indice { width: 100%; border-collapse: collapse; font-size: 14px; }
.d-indice td { padding: 7px 0; border-bottom: 1px solid #e3e0d8; } .d-indice td.n { width: 44px; font-weight: 800; color: #c43424; } .d-indice td.e { text-align: right; color: #6e737d; font-size: 13px; }
.d-indice em { font-style: normal; color: #c43424; font-size: 12px; font-weight: 700; }
.d-nota { font-size: 12.5px !important; color: #6e737d; border-left: 3px solid #c43424; padding-left: 10px; }
.portada { min-height: 900px; grid-template-rows: auto 1fr auto; text-align: center; }
.p-logo img { height: 110px; margin-top: 30px; }
.p-main { align-self: center; border-top: 2px solid #c43424; padding-top: 26px; max-width: 560px; justify-self: center; width: 100%; }
.p-kick { color: #c43424; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; font-size: 13px; margin: 0; }
.portada h1 { font-size: 40px; line-height: 1.08; margin: 12px 0; letter-spacing: -.02em; }
.p-lugar { color: #6e737d; font-size: 16px; margin: 0; }
.p-pie { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; text-align: left; border-top: 1px solid #e3e0d8; padding-top: 18px; }
.p-pie span { display: block; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: #8a8f99; margin-bottom: 2px; }
.p-pie b { font-size: 15px; font-weight: 600; }
@media (max-width: 600px) { .hoja { padding: 18px 16px 20px; } .portada { min-height: 640px; } .portada h1 { font-size: 30px; } .p-logo img { height: 80px; } .d-fotos.n2, .d-fotos.n3 { grid-template-columns: 1fr; } }

@page { size: A4; margin: 12mm 12mm 14mm; }
@media print {
  body { background: #fff; }
  .top, .no-print, .fab { display: none !important; }
  .doc-main { padding: 0; max-width: none; }
  .doc { gap: 0; }
  .hoja { box-shadow: none; border-radius: 0; padding: 0; break-after: page; }
  .hoja:last-child { break-after: auto; }
  .portada { min-height: 260mm; }
  .d-fotos figure, .d-croq, .d-consejo, .d-lista li, .d-estr { break-inside: avoid; }
  .d-fotos img { max-height: 105mm; object-fit: contain; }
  .d-croq img { max-height: 150mm; object-fit: contain; }
}

/* ===== Tablero de obras (pipeline) ===== */
main.ancho { max-width: 1440px; }
.herr { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.buscar { flex: 1 1 260px; display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; min-height: 44px; }
.buscar svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; flex: none; }
.buscar input { border: 0; outline: 0; background: none; width: 100%; font-size: 15px; min-height: 42px; }
.filtro { border: 1px solid var(--line); background: var(--panel); border-radius: 12px; min-height: 44px; padding: 0 12px; font-weight: 700; font-size: 14px; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.filtro b { background: var(--chip); border-radius: 999px; padding: 1px 8px; font-size: 12px; }
.filtro[aria-pressed="true"] { background: var(--azul); color: #fff; border-color: transparent; } .filtro[aria-pressed="true"] b { background: rgba(255,255,255,.2); }
.seg { display: inline-flex; background: var(--chip); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.seg button { border: 0; background: none; border-radius: 10px; padding: 0 14px; min-height: 36px; font-weight: 700; font-size: 14px; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px rgba(15,35,71,.12); }
/* colores de fase */
.visita { --c: var(--azul); --cs: var(--azul-suave); } .orden_trabajo { --c: var(--ambar); --cs: var(--ambar-suave); } .estudios { --c: var(--verde); --cs: var(--verde-suave); }
.presupuesto { --c: var(--morado); --cs: var(--morado-suave); } .en_obra, .aceptada { --c: var(--teal); --cs: var(--teal-suave); } .terminada { --c: var(--gris); --cs: var(--chip); }
.chip.presupuesto, .chip.aceptada, .chip.en_obra, .chip.terminada { background: var(--cs); color: var(--c); }
.fases-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.fases-nav::-webkit-scrollbar { display: none; }
.fases-nav button { flex: none; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; cursor: pointer; }
.fases-nav button i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.fases-nav button b { color: var(--c); }
.tablero { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px; margin: 0 -16px; padding: 2px 16px 10px; overscroll-behavior-x: contain; scrollbar-width: none; }
@media (max-width: 899px) { .tablero::-webkit-scrollbar { display: none; } }
.col { scroll-snap-align: center; scroll-snap-stop: always; background: #e9edf3; border-radius: 16px; padding: 10px; display: grid; gap: 10px; align-content: start; min-height: 160px; border-top: 4px solid var(--c); }
.col header { display: flex; align-items: center; gap: 8px; padding: 2px 4px; }
.col header i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.col header h2 { margin: 0; font-size: 15px; }
.col header b { margin-left: auto; background: var(--panel); color: var(--c); border-radius: 999px; padding: 1px 9px; font-size: 13px; }
.col-in { display: grid; gap: 10px; }
.col-vacia { margin: 0; padding: 18px 8px; text-align: center; color: var(--gris); font-size: 13px; border: 1.5px dashed #cfd6e1; border-radius: 12px; }
.ob { display: grid; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px; color: inherit; text-decoration: none; box-shadow: var(--sombra); transition: transform .12s, box-shadow .12s; }
.ob:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(15,35,71,.06), 0 10px 24px rgba(15,35,71,.10); }
.ob.mia { border-color: #b9cdee; box-shadow: inset 3px 0 0 var(--azul), var(--sombra); }
.ob.parada { border-color: #f0c4bd; }
.ob-t { display: flex; align-items: flex-start; gap: 8px; } .ob-t b { font-size: 15px; line-height: 1.25; }
.rot { margin-left: auto; flex: none; font-size: 11px; font-weight: 700; color: var(--rojo); background: var(--rojo-suave); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.ob-s { margin: -4px 0 0; font-size: 13px; color: var(--muted); }
.ob-av { display: flex; align-items: center; gap: 8px; } .ob-av small { font-size: 12px; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.barra { flex: 1; height: 6px; border-radius: 999px; background: var(--chip); overflow: hidden; display: block; min-width: 50px; }
.barra i { display: block; height: 100%; background: var(--verde); border-radius: inherit; }
.ob-n { margin: 0; display: flex; gap: 6px; align-items: flex-start; font-size: 13px; font-weight: 600; color: var(--ink); background: var(--bg); border-radius: 10px; padding: 7px 9px; }
.ob-n svg { width: 15px; height: 15px; flex: none; margin-top: 2px; fill: none; stroke: var(--azul); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ob-n.urg { background: var(--ambar-suave); color: #8a5a12; } .ob-n.urg svg { stroke: var(--ambar); }
.ob-p { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); } .ob-p b { color: var(--ink); } .ob-p .der { margin-left: auto; }
.tabla { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.tr { display: grid; gap: 4px 12px; padding: 12px 14px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; align-items: center; font-size: 14px; }
.tr small { display: block; color: var(--muted); font-size: 13px; } .tr .barra { display: inline-block; width: 70px; vertical-align: middle; margin-right: 6px; } .tr .barra + small { display: inline; }
.tr.th { display: none; } .tr:hover:not(.th) { background: #f7f9fc; } .tr .urg { color: #8a5a12; font-weight: 700; } .tr em { font-style: normal; }
.tr.parada { box-shadow: inset 3px 0 0 var(--rojo); }
@media (min-width: 900px) {
  .fases-nav { display: none; }
  .tablero { grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 12px; margin: 0; padding: 0 0 10px; scroll-snap-type: none; scrollbar-width: thin; }
  .tr { grid-template-columns: 2.2fr 1.1fr 2.4fr 1.2fr 1.1fr 1fr; }
  .tr.th { display: grid; border-top: 0; background: var(--bg); font-size: 13px; font-weight: 600; color: var(--muted); padding: 10px 14px; }
}

/* ===== Obra: partidas por estancia + panel de herramientas ===== */
.cab .eyebrow .chip { vertical-align: 1px; }
.sec-t { display: flex; align-items: baseline; gap: 8px; } .sec-t h2 { margin: 0; font-size: 20px; } .sec-t small { color: var(--muted); font-size: 13px; font-weight: 600; }
.est { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--sombra); }
.est header { display: flex; align-items: center; gap: 10px; padding: 11px 14px; background: linear-gradient(#fafbfd, #f3f6fa); border-bottom: 1px solid var(--line); box-shadow: inset 4px 0 0 var(--azul); }
.est header h3 { margin: 0; font-size: 15px; letter-spacing: .01em; }
.est-c { font-size: 12px; font-weight: 700; color: var(--muted); margin-left: auto; white-space: nowrap; }
.est header .barra { flex: 0 0 80px; }
.est .lista-part { padding: 10px; }
.part { background: #fbfcfe; border-color: #e6eaf0; transition: border-color .15s, background .15s; }
.part:hover { border-color: #b9cdee; background: #fff; }
.part .mini { background: var(--azul-suave); } .part .mini i { color: var(--azul); }
.part .txt b { display: block; line-height: 1.3; }
.part .num { display: inline-block; min-width: 26px; margin-right: 6px; padding: 0 6px; border-radius: 6px; background: var(--azul-noche); color: #fff; font-size: 12px; text-align: center; vertical-align: 1px; }
.part .cnt { display: flex; gap: 10px; align-items: center; }
.part .cnt span { display: inline-flex; align-items: center; gap: 3px; }
.part .cnt .i { width: 14px; height: 14px; }
.part .txt em { font-size: 11px; background: var(--rojo-suave); padding: 1px 7px; border-radius: 999px; }
.estado-p { align-self: flex-start; white-space: nowrap; }
.estado-p.ok { font-size: 11px; }
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.col-lat { background: var(--panel-lat); border: 1px solid #d6dfec; border-radius: 18px; padding: 12px; }
.lat-t { margin: 2px 4px 0; font-size: 13px; font-weight: 600; color: #4a5a78; }
.herr-c { box-shadow: var(--sombra); border-color: #dbe2ec; }
.herr-c h2 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 16px; }
.herr-c h2 .i { color: var(--azul); width: 20px; height: 20px; padding: 6px; box-sizing: content-box; background: var(--azul-suave); border-radius: 10px; }
.datos { margin: 2px 0 0; display: grid; gap: 0; }
.datos div { display: grid; grid-template-columns: 92px 1fr; gap: 8px; padding: 7px 0; border-top: 1px solid #eef1f5; font-size: 14px; }
.datos div:first-child { border-top: 0; }
.datos dt { color: var(--muted); font-size: 13px; font-weight: 600; } .datos dd { margin: 0; font-weight: 600; } .datos a { color: var(--azul); }
.area { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 15px; line-height: 1.45; min-height: 120px; max-height: 260px; resize: vertical; width: 100%; background: #fbfcfe; }
.btn.peq { min-height: 38px; padding: 7px 12px; font-size: 14px; border-radius: 10px; }
.col-lat .btn.peq:not(.prim) { background: var(--panel); }
main { grid-template-columns: minmax(0, 1fr); }

.ob-p .der { white-space: nowrap; } .ob-p > span:nth-child(2) { min-width: 0; }
.ob-t b { overflow-wrap: anywhere; }
.aviso-c { margin: 0; background: var(--ambar-suave); color: #7a4d0e; border-radius: 10px; padding: 9px 12px; font-size: 14px; }
.h-f { margin: 6px 0 -4px; font-size: 13px; color: var(--muted); }
.part .txt em.nueva { background: var(--ambar-suave); color: var(--ambar); }
.cat-busca { display: flex; gap: 6px; }
.cat-busca input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 15px; text-transform: uppercase; letter-spacing: .03em; }
.datos dd.rc { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; letter-spacing: .02em; overflow-wrap: anywhere; }
.datos b.big { font-size: 16px; color: var(--azul-noche); }
.cat-det { border: 1px solid #eef1f5; border-radius: 10px; padding: 6px 10px; }
.cat-det summary { cursor: pointer; font-weight: 700; font-size: 14px; }
.cat-t { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 4px; }
.cat-t td { padding: 5px 0; border-top: 1px solid #eef1f5; vertical-align: top; } .cat-t td:last-child { text-align: right; white-space: nowrap; font-weight: 700; }
.cat-t small { display: block; color: var(--muted); font-size: 12px; }
.cat-links { display: flex; gap: 6px; flex-wrap: wrap; }
.cat-f { margin: 0; font-size: 12px; color: var(--muted); }
.cat-lista { display: grid; gap: 6px; max-height: 280px; overflow: auto; }
.cat-lista .fila-plano { padding: 9px 10px; font-size: 14px; } .cat-lista small { font-weight: 500; }
.cat-dir { display: grid; gap: 8px; margin-top: 8px; } .cat-dir label.c input { padding: 9px 10px; font-size: 15px; }

.ubic { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ubic a { display: grid; gap: 4px; text-decoration: none; color: var(--muted); font-size: 12px; line-height: 1.3; }
.ubic a:first-child:last-of-type { grid-column: 1 / -1; }
.ubic img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; background: var(--chip); }
.ubic .btn, .ubic p { grid-column: 1 / -1; }
.d-cat td:first-child { color: #6e737d; width: 190px; font-size: 13px; }

/* Hojas del Plan de Obra entregado (solo consulta) */
.refs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.refs a { display: grid; gap: 4px; text-decoration: none; color: var(--muted); font-size: 12px; }
.refs img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; border-radius: 8px; border: 1px solid var(--line); }
/* Ficha técnica */
.tec { border-color: #cfe3d6; }
.tec-d { margin: 0; font-size: 15px; }
.tec-s { border-top: 1px solid #eef1f5; padding-top: 6px; }
.tec-s summary { cursor: pointer; font-weight: 700; font-size: 14px; padding: 4px 0; }
.tec-s ul, .tec-s ol { margin: 4px 0 6px; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; }
.tec-o { margin: 0; background: var(--verde-suave); border-radius: 10px; padding: 9px 12px; font-size: 14px; color: #1e5a3c; }
.t-med { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.t-med th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border-bottom: 1.5px solid #1c2634; padding: 5px 4px; }
.t-med td { border-bottom: 1px solid #e3e6ea; padding: 6px 4px; vertical-align: top; }
.t-med td:nth-child(n+2):not(:nth-child(2)) { white-space: nowrap; }
.t-med td.n { font-weight: 800; color: #c43424; width: 46px; }
.d-tec { display: grid; gap: 6px; border-top: 2px solid #e3e0d8; padding-top: 10px; }
.d-tec p { margin: 0; font-size: 14px; line-height: 1.5; }
.d-lista.num { list-style: decimal; padding-left: 22px; } .d-lista.num li { padding-left: 4px; } .d-lista.num li::before { display: none; }
.d-hall { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.d-hall li { display: grid; grid-template-columns: 70px 1fr; gap: 10px; font-size: 14px; line-height: 1.45; border-left: 3px solid #c43424; padding: 4px 10px; }
.d-hall b { color: #c43424; }
@media print { .t-med tr, .d-hall li { break-inside: avoid; } }
.doc .hoja { max-height: none; overflow: visible; width: auto; }
@media print { .d-tec .d-dos, .d-tec .d-consejo, .t-med { break-inside: avoid; } } .d-tec .d-consejo { margin-top: 6px; }

.reparto { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; max-height: 52vh; overflow: auto; }
.rep { display: grid; gap: 6px; } .rep img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.rep select { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 6px; font-size: 13px; background: var(--panel); }

/* ===== Dossier técnico (visual, para leer rápido; fondos blancos para ahorrar tinta) ===== */
.dossier .hoja { gap: 10px; }
.d-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.d-fecha { font-size: 12px; color: #6e737d; white-space: nowrap; }
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 6px 0; }
.kpis .k { border: 1px solid #dfe3e9; border-radius: 10px; padding: 10px 10px 8px; display: grid; gap: 2px; }
.kpis .k b { font-size: 24px; line-height: 1; color: #0f2347; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kpis .k span { font-size: 11px; color: #6e737d; font-weight: 600; }
.kpis .k.rojo b { color: #c43424; } .kpis .k.ambar b { color: #b7791f; }
.g-dos { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.g-c .d-h small { font-weight: 500; text-transform: none; letter-spacing: 0; color: #8a8f99; }
.g-barras { display: grid; gap: 6px; }
.g-f { display: grid; grid-template-columns: 96px 1fr 52px; gap: 8px; align-items: center; font-size: 13px; }
.g-l { color: #39424f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-b { position: relative; height: 12px; background: #f1f3f6; border-radius: 6px; }
.g-b i { position: absolute; left: 0; top: 0; bottom: 0; background: #1d4e9b; border-radius: 6px; }
.g-b i.r { background: #a9c1e6; border-radius: 0 6px 6px 0; }
.g-barras.azul .g-b i { background: #7d9fd1; }
.g-f b { font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.g-stack { display: flex; height: 26px; border-radius: 8px; overflow: hidden; gap: 2px; margin-top: 4px; }
.g-stack i { display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 12px; color: #fff; }
.g-stack i.alto, .g-ley i.alto { background: #c43424; } .g-stack i.medio, .g-ley i.medio { background: #d99a2b; } .g-stack i.bajo, .g-ley i.bajo { background: #3f8f63; }
.g-ley { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: #39424f; margin-top: 6px; }
.g-ley i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: 0; }
.h-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.h-c { border: 1px solid #ecd2cd; border-left: 4px solid #c43424; border-radius: 8px; padding: 8px 10px; display: grid; gap: 4px; break-inside: avoid; }
.h-c p { margin: 0; font-size: 12.8px; line-height: 1.45; }
.h-n { font-size: 11px; font-weight: 700; color: #c43424; letter-spacing: .04em; }
.t-maestra { width: 100%; border-collapse: collapse; font-size: 12.3px; }
.t-maestra th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: #6e737d; border-bottom: 1.5px solid #1c2634; padding: 5px 4px; }
.t-maestra td { border-bottom: 1px solid #e6e9ee; padding: 6px 4px; vertical-align: top; }
.t-maestra td small { display: block; color: #6e737d; font-size: 11px; } .t-maestra em { color: #c43424; font-style: normal; }
.t-maestra td.n { font-weight: 800; color: #c43424; width: 38px; } .t-maestra td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.t-maestra tr.tot td { font-weight: 800; border-top: 1.5px solid #1c2634; border-bottom: 0; }
.t-maestra tr { break-inside: avoid; }
.of { display: inline-block; font-size: 10.5px; border: 1px solid #d5dbe4; border-radius: 999px; padding: 0 6px; margin: 0 3px 3px 0; white-space: nowrap; }
.sem { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.sem::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.sem.alto { color: #c43424; } .sem.medio { color: #b7791f; } .sem.bajo { color: #3f8f63; }
.q-grid { columns: 2; column-gap: 18px; }
.q-c { break-inside: avoid; display: grid; gap: 3px; margin-bottom: 10px; font-size: 12px; }
.q-c b { font-size: 12px; color: #0f2347; }
.fc-h { display: flex; align-items: center; gap: 10px; border-bottom: 2px solid #e6e9ee; padding-bottom: 8px; }
.fc-h h2 { margin: 0; font-size: 17px; } .fc-h small { color: #6e737d; font-size: 12px; }
.fc-n { font-size: 20px; font-weight: 800; color: #c43424; min-width: 44px; }
.fc-h .sem { margin-left: auto; } .fc-j { font-size: 12px; font-weight: 700; border: 1px solid #d5dbe4; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.fc-d { margin: 0; font-size: 13px; line-height: 1.45; }
.fc-g { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 16px; }
.fc-g ol, .fc-3 ul, .fc-ojo ul { margin: 0; padding-left: 18px; display: grid; gap: 3px; font-size: 12.2px; line-height: 1.4; }
.fc-img { width: 100%; max-height: 170px; object-fit: cover; border-radius: 6px; margin-bottom: 6px; }
.fc-ojo { border: 1.5px solid #e8c37a; border-radius: 8px; padding: 6px 10px; margin-top: 8px; } .fc-ojo b { color: #9a6413; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.fc-m { margin: 6px 0 0; font-size: 11.8px; color: #39424f; line-height: 1.4; }
.fc-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; border-top: 1px solid #e6e9ee; padding-top: 6px; }
.fc-pie { margin: 0; font-size: 10.8px; color: #6e737d; }
.fc-o { margin: 0; font-size: 12px; font-style: italic; color: #287850; }
.dossier .t-med { font-size: 11.8px; }
@media (max-width: 700px) { .kpis { grid-template-columns: repeat(3, 1fr); } .g-dos, .h-grid, .fc-g, .fc-3 { grid-template-columns: 1fr; } .q-grid { columns: 1; } }
@media print { .h-c, .q-c, .fc-3 > div { break-inside: avoid; } .dossier .fc { break-after: page; } }

.dossier .fc-d { font-size: 13px; } .dossier .fc-pie { font-size: 10.8px; color: #6e737d; } .dossier .fc-o { font-size: 12px; } .dossier .fc-m { font-size: 11.8px; }
.dossier .d-nota { font-size: 11.5px !important; } .dossier .h-c p { font-size: 12.3px; }
.kpis .k.largo b { font-size: 18px; }
.h-c { align-content: start; }

/* Comprobación de la visita (capa 1) */
.comp.pend { border-color: #efd29a; box-shadow: inset 4px 0 0 var(--ambar); }
.comp.ok { border-color: #bfe0cc; box-shadow: inset 4px 0 0 var(--verde); }
.tipo-sel { font-size: 13px; color: var(--muted); font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.tipo-sel select { border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; font-size: 13px; background: var(--panel); }
.cq { display: grid; gap: 6px; padding: 8px 0; border-top: 1px solid #f0f2f5; } .cq b { font-size: 15px; }
.cq-f { display: flex; gap: 6px; } .cq-f input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 16px; }
.ok-t { margin: 0; color: var(--verde); font-weight: 700; font-size: 14px; }
.chips-ok { display: flex; flex-wrap: wrap; gap: 6px; } .chips-ok span { font-size: 12px; background: var(--verde-suave); color: var(--verde); border-radius: 999px; padding: 3px 9px; font-weight: 600; }
.sig-bar { display: flex; gap: 10px; justify-content: space-between; } .sig-bar .btn { flex: 1; }
.pend-l { display: grid; gap: 6px; max-height: 50vh; overflow: auto; }
.pend-i { display: grid; gap: 2px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; text-decoration: none; color: inherit; } .pend-i small { color: var(--ambar); font-size: 13px; }
.pend-q { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 15px; }
.cq-f .btn { min-height: 40px; padding: 6px 10px; flex: none; }
.hoja .fila > .btn { flex: 1; }
.hoja > div.f { display: grid; gap: 12px; } .pend-q li { line-height: 1.35; }

.ia-q { border-top: 1px solid #eef1f5; padding-top: 6px; } .ia-t { margin: 0; font-weight: 700; font-size: 13px; color: #6b46c1; }
.ia-q .cq small { margin-top: -3px; }
.ia-b { justify-self: start; color: #6b46c1; border-color: #ddd3f5; background: #f7f4fe; }

/* agenda: próximas visitas */
.prox { margin: 4px 0 6px; }
.prox-l { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.prox-i { flex: 0 0 auto; min-width: 200px; max-width: 260px; display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-left: 4px solid var(--azul); border-radius: 12px; background: var(--panel); color: inherit; text-decoration: none; }
.prox-i.hoy { border-left-color: var(--rojo); }
.prox-i b { font-size: 14px; color: var(--azul); }
.prox-i.hoy b { color: var(--rojo); }
.prox-i span { font-weight: 600; font-size: 14px; }
.prox-i small { color: var(--muted); font-size: 12px; }
.ob-vis { margin: 2px 0 0; font-size: 12px; font-weight: 600; color: var(--azul); }
.datos .btn.peq { margin-top: 6px; display: inline-block; }

.peligro { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); display: grid; gap: 6px; justify-items: start; }
.peligro .sub { margin: 0; }
.btn.rojo { color: var(--rojo); border-color: var(--rojo); background: var(--panel); }
.btn.rojo:not(:disabled):hover { background: var(--rojo-suave); }

.fila-plano-w { display: flex; gap: 6px; align-items: stretch; }
.fila-plano-w .fila-plano { flex: 1; min-width: 0; }
.btn-borra { flex: 0 0 44px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--panel); border-radius: 12px; color: var(--rojo); cursor: pointer; }
.btn-borra svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-borra:disabled { opacity: .5; }

.gasto-ag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: #5b3fb5; background: #f1edfb; border-radius: 999px; padding: 3px 10px; margin-left: 8px; vertical-align: middle; letter-spacing: 0; text-transform: none; }
.gasto-ag i { width: 7px; height: 7px; border-radius: 50%; background: #7a5cd6; animation: latido 2s infinite; }
@keyframes latido { 50% { opacity: .3; } }
.ob-g { font-size: 12px; font-weight: 700; color: #5b3fb5; margin: 2px 0 0; }

/* medición de Estudios */
.med { border-left: 4px solid var(--verde); }
.med.hecha { background: var(--verde-suave); }
.med-lista { display: grid; gap: 10px; margin: 8px 0; }
.med-l { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.med-l input, .med-l select { font: inherit; font-size: 16px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); min-width: 0; }
.med-c { width: 100%; box-sizing: border-box; }
.med-l input, .med-l select { width: 100%; box-sizing: border-box; }
.med-n { display: grid; grid-template-columns: minmax(0, 1fr) 84px 44px; gap: 6px; }
.med-n input.mal { border-color: var(--rojo); background: var(--rojo-suave); }
.med-r { color: var(--verde); font-weight: 700; min-height: 0; }
.med-r:empty { display: none; }
.med-l.ver { grid-template-columns: 1fr auto; align-items: baseline; }
.med-acc { flex-wrap: wrap; gap: 8px; }
.pill-ok { background: var(--verde); color: #fff; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 10px; }
@media (min-width: 700px) { .med-l { grid-template-columns: minmax(0, 1fr) 300px; align-items: center; } .med-l .med-r { grid-column: 2; } }
.med-acc .btn { white-space: normal; text-align: left; }
.ia-b { white-space: normal; text-align: left; max-width: 100%; }
.cq { grid-template-columns: minmax(0, 1fr); } .cq-f input { width: 0; }
.med-l textarea { font: inherit; font-size: 16px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); width: 100%; box-sizing: border-box; resize: vertical; line-height: 1.35; }
.part .txt em.medida { background: var(--verde-suave); color: var(--verde); }

/* ===== Mesa de Estudios (presupuesto) ===== */
.mesa { padding-bottom: 96px; }
.mesa-cab { align-items: flex-end; }
.mesa-cab .acc { flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.mesa-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
@media (min-width: 1100px) { .mesa-grid { grid-template-columns: 250px minmax(0, 1fr) 340px; } .mesa-caps, .mesa-lat { position: sticky; top: 84px; max-height: calc(100vh - 190px); overflow: auto; } }
.mesa-caps { display: grid; gap: 4px; align-content: start; }
@media (max-width: 1099px) { .mesa-caps { display: flex; overflow-x: auto; gap: 6px; padding-bottom: 4px; } .mesa-caps .lat-t { display: none; } .mesa-caps .mc { flex: 0 0 220px; } }
.mc { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 8px; align-items: center; text-align: left; border: 1px solid transparent; background: none; border-radius: 10px; padding: 8px 9px; cursor: pointer; font: inherit; font-size: 14px; color: var(--ink); }
.mc:hover { background: var(--chip); } .mc.act { background: var(--panel); border-color: var(--line); box-shadow: 0 1px 2px rgba(15,35,71,.06); }
.mc span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .mc small { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; }
.mc i { width: 9px; height: 9px; border-radius: 50%; background: #c9d0db; } .mc i.medio { background: var(--ambar); } .mc i.ok { background: var(--verde); }
.aviso-a { background: var(--ambar-suave); border: 1px solid #f0d9a8; color: #6b4a10; border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.aviso-e { background: var(--rojo-suave); color: var(--rojo); border-radius: 10px; padding: 6px 10px; font-size: 13px; font-weight: 600; }
.cap-imp { font-size: 20px; font-variant-numeric: tabular-nums; }
.pt { margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.pt-h, .pl { display: grid; grid-template-columns: 62px minmax(0, 1fr) 42px 74px 92px 100px 76px; gap: 8px; padding: 9px 10px; align-items: baseline; font-size: 13px; }
.pt-h { background: var(--chip); font-size: 13px; font-weight: 600; color: var(--muted); }
.pt-h span:nth-child(n+4) { text-align: right; }
.pl { border-top: 1px solid var(--line); cursor: pointer; background: var(--panel); }
.pl:hover { background: #f7f9fc; } .pl.abierta { background: var(--azul-suave); }
.pl .n { text-align: right; font-variant-numeric: tabular-nums; } .pl .c1 { color: var(--muted); font-size: 12px; }
.pl.sinp em { color: var(--ambar); font-style: normal; font-weight: 700; font-size: 12px; }
@media (max-width: 700px) { .pt-h { display: none; } .pl { grid-template-columns: minmax(0, 1fr) auto; } .pl .c1, .pl > span:nth-child(3), .pl > span:nth-child(4), .pl > span:nth-child(5) { display: none; } .pl { grid-template-columns: minmax(0, 1fr) auto auto; } }
.pl-ed { border-top: 1px solid var(--line); background: #fbfcfe; padding: 12px; display: grid; gap: 10px; }
.pl-ed textarea, .pl-ed input, .pl-ed select { font: inherit; font-size: 15px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); width: 100%; box-sizing: border-box; min-width: 0; }
.pe-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.pe { display: grid; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.pe .in, .im .in { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); overflow: hidden; }
.pe .in input, .im .in input { border: 0; border-radius: 0; flex: 1; width: 0; }
.pe .in b, .im .in b { padding: 0 9px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.pe input.mal { background: var(--rojo-suave); }
.pe-t { margin: 2px 0 -4px; font-weight: 700; font-size: 13px; } .pe-t small { font-weight: 500; color: var(--muted); }
.pe-r { margin: 0; font-size: 13px; color: var(--ink); } .pe-r b { font-variant-numeric: tabular-nums; }
.pe-acc { flex-wrap: wrap; gap: 8px; } .pe-base { max-width: 320px; }
.impl { display: grid; gap: 6px; margin-top: 8px; }
.im { display: grid; grid-template-columns: minmax(0, 1fr) 80px 70px 120px 100px 40px; gap: 6px; align-items: center; }
.im > input { font: inherit; font-size: 14px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.im .n { text-align: right; font-variant-numeric: tabular-nums; font-size: 14px; }
@media (max-width: 700px) { .im { grid-template-columns: 1fr 1fr 1fr; } .im > input[data-k="concepto"] { grid-column: 1 / -1; } }
.mesa-com p { margin: 0 0 6px; font-size: 14px; } .mesa-com ul { margin: 0 0 6px; padding-left: 18px; font-size: 14px; }
.m-h { font-size: 13px !important; font-weight: 600; color: var(--muted); margin: 12px 0 4px !important; }
.m-fotos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; } .m-fotos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.m-crit li { color: #8a3a1c; }
.mesa-com textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 14px; border: 1px solid var(--line); border-radius: 10px; padding: 8px; min-height: 60px; margin: 6px 0; }
.pre { white-space: pre-wrap; }
.mesa-tot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--azul-noche); color: #fff; display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; justify-content: flex-end; padding: 10px max(16px, calc((100vw - 1400px) / 2)); }
.mesa-tot span { display: grid; text-align: right; } .mesa-tot small { font-size: 11px; opacity: .7; } .mesa-tot b { font-variant-numeric: tabular-nums; font-size: 15px; }
.mesa-tot .mt-t b { font-size: 20px; } .mesa-tot .mt-p { margin-right: auto; text-align: left; font-size: 13px; opacity: .85; display: block; }
@media (max-width: 700px) { .mesa-tot { gap: 4px 14px; } .mesa-tot span:nth-child(3), .mesa-tot span:nth-child(4) { display: none; } }
@media print { .mesa-tot { display: none; } }

/* ===== Cuaderno de estudio (imprimible, fondos blancos) ===== */
.cu { gap: 10px; }
.cu-cab { display: flex; justify-content: space-between; font-size: 10.5px; color: #6e737d; border-bottom: 1px solid #dfe3e9; padding-bottom: 4px; letter-spacing: .04em; text-transform: uppercase; }
.cu-t { margin: 18px 0 2px; font-size: 30px; } .cu-s { margin: 0 0 8px; color: #4b5563; }
.cu-como { border: 1px solid #dfe3e9; border-radius: 10px; padding: 10px 12px; font-size: 13px; } .cu-como ol { margin: 6px 0 0; padding-left: 18px; }
.cu-h { font-size: 15px; margin: 12px 0 4px; }
.cu-tab { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.cu-tab th, .cu-tab td { border: 1px solid #bfc6d1; padding: 6px 7px; text-align: left; vertical-align: top; }
.cu-tab th { font-size: 11px; background: #fff; color: #374151; } .cu-tab th small { font-weight: 500; color: #6b7280; }
.cu-tab td { height: 22px; } .cu-tab .w-n { width: 68px; } .cu-tab .w-u { width: 44px; } .cu-tab .w-q { width: 92px; }
.cu-aj th { width: 24%; } .cu-aj td { width: 26%; }
.cu-med tr.vac td { height: 26px; }
.cu-ph { display: flex; gap: 10px; align-items: center; } .cu-ph h2 { margin: 0; font-size: 18px; } .cu-ph small { color: #6b7280; }
.cu-dos { display: grid; grid-template-columns: 38% 1fr; gap: 12px; } .cu-dos.sin { grid-template-columns: 1fr; }
.cu-dos img { width: 100%; max-height: 62mm; object-fit: cover; border-radius: 6px; border: 1px solid #dfe3e9; }
.cu-txt p { margin: 0 0 5px; font-size: 12.5px; line-height: 1.4; }
.cu-notas { display: grid; gap: 14px; font-size: 12px; margin-top: 4px; } .cu-notas span { border-bottom: 1px solid #bfc6d1; height: 14px; }
@media print { .cu-tab tr, .cu-dos { break-inside: avoid; } }
.mesa-caps .mc > i { display: block; width: 9px; height: 9px; min-width: 0; min-height: 0; padding: 0; margin: 0; border-radius: 50%; align-self: center; box-shadow: none; }
.cu { grid-template-columns: minmax(0, 1fr); } .cu-tab { table-layout: fixed; } .cu-tab td { overflow-wrap: anywhere; }
.mesa-cab .acc .btn { display: inline-flex; } @media (max-width: 700px) { .mesa-cab { flex-wrap: wrap; } .mesa-cab .acc { margin-left: 0; justify-content: flex-start; } .mesa-cab .acc .btn { font-size: 13px; padding: 7px 10px; min-height: 0; } }

/* ===== Equipo ===== */
.btn-eq { font-size: 13px; font-weight: 700; color: var(--azul); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; margin-right: 4px; background: var(--panel); }
@media (max-width: 520px) { .btn-eq { padding: 5px 9px; font-size: 12px; } }
.eq-f { display: grid; grid-template-columns: minmax(0, 1fr) 220px 100px; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.eq-f.off { opacity: .55; }
.eq-q { display: flex; gap: 10px; align-items: center; min-width: 0; } .eq-q > div { display: grid; gap: 2px; min-width: 0; flex: 1; }
.eq-q input { font: inherit; font-weight: 700; font-size: 15px; border: 1px solid transparent; border-radius: 8px; padding: 4px 6px; margin-left: -6px; background: transparent; min-width: 0; }
.eq-q input:hover, .eq-q input:focus { border-color: var(--line); background: var(--panel); }
.eq-q small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eq-f select { font: inherit; font-size: 14px; border: 1px solid var(--line); border-radius: 10px; padding: 7px 8px; background: var(--panel); }
.eq-st { grid-column: 1 / -1; color: var(--muted); font-size: 12px; } .eq-st:empty { display: none; }
.eq-nuevos { border-left: 4px solid var(--ambar); }
.eq-pasos { margin: 6px 0 0; padding-left: 20px; font-size: 14px; display: grid; gap: 6px; }
@media (max-width: 600px) { .eq-f { grid-template-columns: 1fr auto; } .eq-q { grid-column: 1 / -1; } }

/* ===== Orden de trabajo compacta al imprimir (menos páginas para mandar por PDF) ===== */
@media print {
  @page { size: A4; margin: 12mm 12mm 14mm; }
  .doc .hoja.ficha { break-after: auto; break-inside: avoid; padding: 0 0 5mm; margin: 0 0 5mm; border-bottom: 1px solid #dfe3e9; gap: 6px; }
  .doc .hoja.ficha .d-tit { font-size: 15pt; margin: 0; }
  .ficha .d-fotos { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 5px; }
  .ficha .d-fotos img { height: 46mm; max-height: 46mm; object-fit: cover; }
  .ficha .d-fotos figcaption { font-size: 8pt; }
  .ficha .d-croq img { max-height: 75mm; object-fit: contain; }
  .ficha p, .ficha li { font-size: 9.5pt; line-height: 1.35; }
  .ficha h3 { font-size: 10pt; margin: 4px 0 2px; }
  .ficha .d-dos { gap: 10px; }
  .ficha .d-notas p { font-size: 8.5pt; }
}
@media print { .doc .hoja.ficha .d-cab { display: none; } .doc .hoja.ficha:first-of-type .d-cab { display: flex; } }
@media print { .doc .hoja.indice { break-after: auto; padding-bottom: 5mm; margin-bottom: 5mm; border-bottom: 1px solid #dfe3e9; } }

/* ===== Pestañas por áreas y paneles ===== */
.areas { display: flex; gap: 4px; overflow-x: auto; padding: 8px max(16px, calc((100vw - 1400px) / 2)) 0; background: var(--panel); border-bottom: 1px solid var(--line); scrollbar-width: none; }
.areas::-webkit-scrollbar { display: none; }
.areas a { flex: none; text-decoration: none; color: var(--muted); font-weight: 700; font-size: 14px; padding: 9px 14px 11px; border-bottom: 3px solid transparent; }
.areas a:hover { color: var(--ink); } .areas a[aria-current] { color: var(--azul); border-bottom-color: var(--azul); }
.ar-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 14px; }
.ar-k { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 2px; text-decoration: none; color: inherit; }
.ar-k b { font-size: 30px; line-height: 1; color: var(--azul-noche); font-variant-numeric: tabular-nums; } .ar-k span { color: var(--muted); font-size: 13px; font-weight: 600; }
.ar-k.aviso { border-color: #f0c9c2; background: var(--rojo-suave); } .ar-k.aviso b { color: var(--rojo); }
.ar-g { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); margin-top: 14px; }
@media (min-width: 1000px) { .ar-g { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } }
.ar-g h2, .ar-tab + h2 { font-size: 16px; margin: 0 0 8px; }
.ar-tab { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ar-tr { display: grid; grid-template-columns: minmax(0, 2fr) 1.2fr 1fr 1fr 1fr 110px; gap: 10px; padding: 10px 12px; align-items: center; border-top: 1px solid var(--line); font-size: 14px; }
.ar-tr.th { border-top: 0; background: var(--chip); font-size: 13px; font-weight: 600; color: var(--muted); }
.ar-tr > span { display: grid; gap: 3px; min-width: 0; } .ar-tr small { color: var(--muted); } .ar-tr .n { text-align: right; }
.ar-pq { color: var(--rojo); font-style: normal; font-weight: 700; font-size: 13px; }
@media (max-width: 800px) { .ar-tr { grid-template-columns: 1fr 1fr; } .ar-tr.th { display: none; } .ar-tr > span:first-child { grid-column: 1 / -1; } }
.ar-os { display: grid; gap: 8px; } .ar-o { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: inherit; background: var(--panel); }
.ar-o .chip { justify-self: start; font-style: normal; } .ar-o small { color: var(--muted); }
.ar-q { display: grid; gap: 2px; padding: 9px 0; border-top: 1px solid var(--line); text-decoration: none; color: inherit; } .ar-q small { color: var(--muted); font-size: 12px; }
.ar-aviso { border-left: 4px solid var(--rojo); }
.ar-act { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; } .ar-act span { color: var(--muted); margin-right: 8px; font-size: 12px; }
.ar-tr.th span:nth-child(5) { text-align: right; }

/* Ficha del Plan de Obra: esquema dibujado por la app */
.esq-prev { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fff; margin: 10px 0; overflow: hidden; }
.esq-prev svg, .d-esq svg { display: block; width: 100%; height: auto; }
.a-medir { background: var(--ambar-suave); color: var(--ambar); border-radius: 8px; padding: 8px 12px; font-size: 14px; margin: 8px 0; }
.esq-campos { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; } .esq-campos .toggle { align-self: end; margin-bottom: 14px; }
@media (max-width: 520px) { .esq-campos { grid-template-columns: 1fr; } }
.hoja .prop .d-lista { margin: 6px 0 10px; padding-left: 20px; } .hoja .prop .d-h { margin: 14px 0 0; font-size: 15px; }
.d-esq { margin: 10px 0; border-top: 1px solid #e3e0d8; padding-top: 10px; break-inside: avoid; }

/* ============ Imagen «azul noche» (nov. 2026): cabecera oscura con el logo en blanco, navegación abajo en el móvil y entrada con plano de obra ============ */
:root { --bg: #f1f3f6; --sombra: 0 1px 2px rgba(15,35,71,.06), 0 6px 18px rgba(15,35,71,.07); }
/* Cabecera: blanca con franja roja y logo a color, como los documentos que ve el cliente (decisión de Alberto, 16/11) */
.areas a { display: inline-flex; align-items: center; gap: 7px; }
.areas a svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
h1 { letter-spacing: -.015em; }
.card { box-shadow: var(--sombra); }
.btn.prim { box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 2px 6px rgba(29,78,155,.28); }
/* Móvil: las áreas pasan a una barra abajo, al alcance del pulgar (ya no se corta «Equipo») */
@media (max-width: 700px) {
  .areas { position: fixed; left: 0; right: 0; bottom: 0; z-index: 12; padding: 4px max(6px, env(safe-area-inset-right, 0px)) calc(4px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px));
    gap: 0; justify-content: space-around; border-bottom: 0; border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(15,35,71,.08); overflow: visible; }
  .areas a { flex: 1 1 0; min-width: 0; flex-direction: column; gap: 2px; padding: 6px 2px 4px; font-size: 11px; border-bottom: 0; border-radius: 10px; }
  .areas a svg { width: 23px; height: 23px; }
  .areas a[aria-current] { color: var(--azul); background: var(--azul-suave); border-bottom-color: transparent; }
  body:has(nav.areas) main { padding-bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
  body:has(nav.areas) .fab { bottom: calc(58px + env(safe-area-inset-bottom, 0px)); background: none; }
}
/* Entrada: azul noche con cuadrícula de plano, logo en blanco y una frase */
.login.entrada { background-color: var(--azul-noche); background-image: linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px), linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px), radial-gradient(120% 80% at 50% 0%, #1b3a73 0%, #0f2347 60%);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px, 100% 100%; }
.entrada-in { width: min(420px, 100%); display: grid; gap: 18px; justify-items: center; }
.login .entrada-logo { height: 60px; } .entrada-in .card { width: 100%; border-top: 4px solid var(--rojo); box-shadow: 0 18px 50px rgba(0,0,0,.35); }
.entrada-lema { margin: 0; color: rgba(255,255,255,.78); text-align: center; font-size: 16px; line-height: 1.4; } .entrada-lema b { color: #fff; }
.entrada-pie { margin: 0; color: rgba(255,255,255,.45); font-size: 12px; letter-spacing: .04em; }
@media print { .areas { display: none !important; } }

/* Entrada centrada de verdad en el móvil: 100vh en el iPhone mide la pantalla sin las barras del navegador y dejaba el formulario abajo */
.login { min-height: 100vh; min-height: 100dvh; padding-top: max(20px, env(safe-area-inset-top, 0px)); padding-bottom: max(20px, env(safe-area-inset-bottom, 0px)); align-content: center; }
.entrada-in { gap: 16px; }
@media (max-height: 700px) { .login .entrada-logo { height: 48px; } .entrada-in { gap: 12px; } .entrada-lema { font-size: 15px; } }
/* iPhone: si una casilla tiene letra de menos de 16 px, el teléfono amplía la pantalla al escribir y se queda descolocada */
@media (max-width: 700px) { input, select, textarea { font-size: 16px !important; } }

/* Visor de imágenes dentro de la app */
.visor { position: fixed; inset: 0; z-index: 60; background: #0b1424; color: #fff; touch-action: none; user-select: none; -webkit-user-select: none; }
.visor-zona { position: absolute; inset: 56px 0 64px; display: grid; place-items: center; overflow: hidden; cursor: grab; }
.visor-zona:active { cursor: grabbing; }
.visor-zona img { width: auto; height: auto; max-width: calc(100vw - 132px); max-height: calc(100vh - 136px); max-height: calc(100dvh - 136px); object-fit: contain; transform-origin: center; will-change: transform; box-shadow: 0 10px 40px rgba(0,0,0,.5); background: #fff; }
.visor-arriba { position: absolute; top: 0; left: 0; right: 0; height: 56px; display: flex; align-items: center; gap: 10px; padding: env(safe-area-inset-top, 0px) 12px 0; }
.visor-n { font-weight: 700; font-size: 14px; flex: none; } .visor-pie { flex: 1; min-width: 0; font-size: 14px; color: rgba(255,255,255,.8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.visor-b { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.08); color: #fff; font: inherit; font-size: 20px; font-weight: 700; text-decoration: none; cursor: pointer; }
.visor-b:hover { background: rgba(255,255,255,.18); } .visor-aj { font-size: 14px; }
.visor-ant, .visor-sig { position: absolute; top: 50%; transform: translateY(-50%); font-size: 30px; height: 64px; z-index: 1; } .visor-ant { left: 10px; } .visor-sig { right: 10px; }
.visor-abajo { position: absolute; left: 0; right: 0; bottom: 0; height: 64px; display: flex; align-items: center; justify-content: center; gap: 10px; padding-bottom: env(safe-area-inset-bottom, 0px); }
.visor-z { min-width: 64px; text-align: center; font-variant-numeric: tabular-nums; font-size: 14px; color: rgba(255,255,255,.8); }
@media (max-width: 600px) { .visor-ant, .visor-sig { display: none; } }

/* Líneas de la mesa: editar y borrar siempre a la vista; barra arriba del editor */
.pl { align-items: center; }
.pl-acc { display: flex; gap: 4px; justify-content: flex-end; }
.pl-b { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; cursor: pointer; color: var(--azul); font-size: 15px; padding: 0; }
.pl-b:hover { background: var(--azul-suave); } .pl-b.rojo { color: var(--rojo); } .pl-b.rojo:hover { background: var(--rojo-suave); }
.pl-b svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pe-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.pe-top b { font-size: 13px; color: var(--azul); }

/* Precio único (partida a precio cerrado) */
.pu { border: 1px dashed var(--line); border-radius: 12px; padding: 10px 12px; margin: 10px 0; display: grid; gap: 10px; background: #fbfcfe; }
.pu.on { border: 1px solid #c9d8ef; background: var(--azul-suave); }
.pu-g { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 10px; } @media (max-width: 700px) { .pu-g { grid-template-columns: 1fr; } }
.pu-r { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pu-r span { display: grid; gap: 2px; font-size: 12px; color: var(--muted); font-weight: 600; background: var(--panel); border-radius: 10px; padding: 8px 10px; }
.pu-r b { font-size: 16px; color: var(--ink); font-variant-numeric: tabular-nums; } .pu-r .mal b { color: var(--rojo); }
.pt.cerrado { opacity: .72; }
.pu input, .pu select { font: inherit; font-size: 15px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); width: 100%; box-sizing: border-box; min-width: 0; }
.pu .in { display: flex; align-items: center; gap: 6px; } .pu .pe { display: grid; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
@media (max-width: 600px) { .visor-zona img { max-width: calc(100vw - 16px); } }

/* ============ Proveedores y peticiones de precio ============ */
.pv-l, .pp-l, .of-l, .bz-l { display: grid; gap: 10px; }
.pv-l { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); margin-top: 6px; }
.pv { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 6px; box-shadow: var(--sombra); }
.pv-t { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .pv-t b { font-size: 16px; }
.pv-g { margin: 0; display: flex; gap: 4px; flex-wrap: wrap; } .pv-a { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pv-conf { font-size: 11px; font-weight: 700; color: var(--ambar); background: var(--ambar-suave); border-radius: 999px; padding: 2px 8px; }
.pv-est { color: #d49a00; font-size: 13px; letter-spacing: 1px; }
.pp-prep { margin: 14px 0; } .pp-l { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.pp-c { display: grid; gap: 2px; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--azul); border-radius: 14px; padding: 12px 14px; text-decoration: none; color: inherit; box-shadow: var(--sombra); }
.pp-c:hover { border-color: #c9d8ef; } .pp-n { margin: 0; font-size: 14px; }
.pt-g { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; margin: 14px 0; align-items: start; }
@media (max-width: 900px) { .pt-g { grid-template-columns: minmax(0, 1fr); } }
.pe-l { display: grid; margin: 10px 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.pe-f { display: grid; grid-template-columns: 54px minmax(0, 1fr) 150px auto; gap: 10px; align-items: center; padding: 10px; border-top: 1px solid var(--line); background: var(--panel); }
.pe-f:first-child { border-top: 0; } .pe-r b { display: inline-block; background: var(--azul-suave); color: var(--azul); border-radius: 8px; padding: 3px 7px; font-size: 13px; }
.pe-esq svg { width: 100%; height: auto; display: block; } .pe-b { display: flex; gap: 4px; }
@media (max-width: 600px) { .pe-f { grid-template-columns: 48px minmax(0, 1fr) auto; } .pe-esq { grid-column: 2 / 3; } }
.of { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fbfcfe; }
.cmp-w { overflow-x: auto; margin: 10px 0; border: 1px solid var(--line); border-radius: 12px; }
.cmp { border-collapse: collapse; width: 100%; font-size: 14px; min-width: 520px; }
.cmp th, .cmp td { padding: 8px 10px; border-top: 1px solid var(--line); text-align: right; vertical-align: top; }
.cmp th:first-child, .cmp td:first-child { text-align: left; position: sticky; left: 0; background: var(--panel); max-width: 260px; }
.cmp thead th { background: #f6f8fb; border-top: 0; font-size: 13px; } .cmp th small, .cmp td small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }
.cmp td.mejor { background: var(--verde-suave); color: var(--verde); font-weight: 700; } .cmp td.falta { color: var(--ambar); font-style: italic; }
.cmp .tot td { font-size: 15px; background: #f6f8fb; } .cmp .tot td.mejor { background: var(--verde-suave); } .cmp .sub-t td { color: var(--muted); } .cmp .nt { font-style: italic; }
.falta-t { color: var(--ambar) !important; }
.inv { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); } .inv input { width: 20px; height: 20px; margin-top: 2px; }
.bz { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); }
.mr-ag { background: var(--morado-suave); border-radius: 12px; padding: 10px 12px; display: grid; gap: 8px; } .mr-ag textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font: inherit; }
.mr-l { display: grid; gap: 8px; } .mr-f { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; display: grid; gap: 6px; }
.mr-in { display: grid; grid-template-columns: 170px auto minmax(0, 1fr); gap: 8px; align-items: end; } @media (max-width: 600px) { .mr-in { grid-template-columns: 1fr; } }
.mr-in input, .pub-in input:not([type=checkbox]) { font: inherit; font-size: 16px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; width: 100%; box-sizing: border-box; background: var(--panel); }
.mr-in .in, .pub-in .in { display: flex; align-items: center; gap: 6px; } .mr-in .pe, .pub-in .pe { display: grid; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.ag-p { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; } .ag-p ul { margin: 6px 0 0; padding-left: 18px; font-size: 14px; }
/* Página del proveedor (sin cuenta) */
.top.pub .top-in { justify-content: space-between; } .pub-logo { height: 30px; } .pub-t { font-weight: 800; color: var(--azul); font-size: 14px; letter-spacing: .02em; }
.pub-m { max-width: 860px; display: grid; gap: 12px; padding-top: 16px; }
.pub-cab p { margin: 6px 0; } .pub-nota { background: #f6f8fb; border-radius: 10px; padding: 8px 10px; }
.pub-e { display: grid; gap: 10px; } .pub-eh { display: flex; gap: 12px; align-items: flex-start; } .pub-eh h2 { font-size: 17px; }
.pub-ref { background: var(--azul); color: #fff; border-radius: 10px; padding: 6px 10px; font-size: 14px; flex: none; }
.pub-vis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; } .pub-vis img { width: 100%; max-height: 360px; object-fit: contain; border-radius: 10px; background: #f6f8fb; display: block; }
.pub-esq { border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: #fff; } .pub-esq svg { width: 100%; height: auto; display: block; }
.pub-in { display: grid; grid-template-columns: 200px minmax(0, 1fr) auto; gap: 10px; align-items: end; background: var(--azul-suave); border-radius: 12px; padding: 10px; }
@media (max-width: 600px) { .pub-in { grid-template-columns: 1fr; } }
.pub-tot { font-size: 18px; margin: 6px 0; } .ok-c { border: 2px solid var(--verde); background: var(--verde-suave); }
@media print { .pub-in input { border: 0; border-bottom: 1px solid #999; border-radius: 0; } .top.pub { display: flex !important; position: static; } #penv, #pimp { display: none; } .pub-e { break-inside: avoid; } }
.pub-aviso { display: grid; gap: 4px; margin-top: 10px; background: var(--ambar-suave); color: #6b4a0f; border-radius: 12px; padding: 10px 12px; font-size: 14.5px; line-height: 1.4; }
.of > .fila b { font-size: 15.5px; }
.card:has(.cmp-w) { grid-template-columns: minmax(0, 1fr); min-width: 0; } .cmp-w { max-width: 100%; }
.of .fila, .pt-g .card > .fila { flex-wrap: wrap; row-gap: 6px; } .of, .of-l, .pt-g > .card { min-width: 0; }
main.ancho { min-width: 0; } main.ancho > section, main.ancho > div { min-width: 0; max-width: 100%; } .cmp-w { width: 100%; }
.of .sub { white-space: normal; overflow-wrap: anywhere; }

/* ===== Solicitud de presupuesto para proveedores (imprimir o PDF; fondo blanco, sin bloques oscuros) ===== */
.sp .hoja { gap: 10px; }
.sp-cab { display: flex; gap: 18px; align-items: center; border-bottom: 2px solid #c43424; padding-bottom: 12px; }
.sp-cab img { height: 62px; flex: none; }
.sp-k { margin: 0; color: #c43424; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; font-size: 11.5px; }
.sp-cab h1 { margin: 2px 0 4px; font-size: 25px; line-height: 1.15; letter-spacing: -.01em; }
.sp-s { margin: 0; color: #6e737d; font-size: 13px; }
.sp-cab2 { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #c43424; padding-bottom: 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; color: #6e737d; text-transform: uppercase; }
.sp-cab2 img { height: 22px; }
.sp-para { margin: 0; font-size: 14px; }
.sp-aviso { border: 1.5px solid #c43424; border-radius: 8px; padding: 9px 12px; font-size: 13px; line-height: 1.45; color: #1c2634; }
.sp-aviso b { color: #c43424; }
.sp-h { font-size: 17px; margin: 8px 0 0; }
.sp-nota { margin: 0; font-size: 12.5px; color: #39424f; line-height: 1.45; }
.sp-t { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.sp-t th { text-align: left; font-size: 11px; color: #1c2634; border-bottom: 1.5px solid #1c2634; padding: 5px 6px; vertical-align: bottom; }
.sp-t td { border-bottom: 1px solid #dfe3e9; padding: 6px; vertical-align: top; line-height: 1.35; }
.sp-t td small { display: block; color: #6e737d; font-size: 11px; }
.sp-t .sp-n { text-align: center; white-space: nowrap; }
.sp-t .sp-pr { width: 64px; text-align: center; } .sp-t td.sp-pr { border-left: 1px solid #dfe3e9; }
.sp-t tr.sp-g td { color: #c43424; font-weight: 800; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding-top: 10px; border-bottom: 1px solid #c43424; }
.sp-ref { color: #0f2347; font-weight: 800; white-space: nowrap; }
.sp-opc { font-style: normal; font-size: 10.5px; font-weight: 700; color: #b26a00; letter-spacing: .03em; text-transform: uppercase; }
.sp-crit { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.sp-crit > div { border: 1px solid #dfe3e9; border-radius: 8px; padding: 8px 10px; }
.sp-crit h3, .sp-inc h3 { margin: 0 0 3px; font-size: 12px; color: #0f2347; }
.sp-crit p { margin: 0; font-size: 11.5px; line-height: 1.4; color: #39424f; }
.sp-incs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; }
.sp-inc { border: 1px solid #dfe3e9; border-radius: 8px; padding: 8px 10px; }
.sp-inc.si { border-left: 3px solid #287850; } .sp-inc.no { border-left: 3px solid #c43424; }
.sp-inc ul { margin: 0; padding-left: 16px; font-size: 11.5px; line-height: 1.45; color: #39424f; }
.sp-fs { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.sp-f { border: 1px solid #dfe3e9; border-radius: 8px; padding: 8px 10px 10px; display: grid; gap: 3px; align-content: start; break-inside: avoid; }
.sp-f.sp-op { border-style: dashed; }
.sp-fcq { display: flex; justify-content: center; } .sp-cq { width: 100%; max-width: 170px; height: auto; display: block; }
.sp-foto { width: 100%; max-height: 120px; object-fit: cover; border-radius: 4px; display: block; }
.sp-fh { display: flex; justify-content: space-between; align-items: center; margin-top: 2px; }
.sp-ud { font-size: 11px; font-weight: 700; border: 1px solid #1c2634; border-radius: 4px; padding: 0 5px; }
.sp-f h3 { margin: 0; font-size: 13.5px; line-height: 1.25; }
.sp-ub { margin: 0; font-size: 11px; color: #6e737d; }
.sp-f dl { margin: 4px 0 0; display: grid; gap: 1px; }
.sp-f dt, .pub-dl dt { font-size: 9.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #c43424; margin-top: 4px; }
.sp-f dd { margin: 0; font-size: 11.5px; line-height: 1.35; color: #1c2634; }
.pub-dl { margin: 6px 0 0; } .pub-dl dd { margin: 0; font-size: 14px; line-height: 1.4; }
.sp-resp { display: flex; gap: 16px; align-items: flex-start; border: 1px solid #dfe3e9; border-radius: 8px; padding: 10px 12px; break-inside: avoid; }
.sp-resp > div:first-child { flex: 1; min-width: 0; } .sp-resp ol { margin: 6px 0; padding-left: 18px; font-size: 12.5px; line-height: 1.45; } .sp-resp p { margin: 6px 0 0; font-size: 12.5px; }
.sp-link a { color: #c43424; font-weight: 800; } .sp-link small { color: #6e737d; font-size: 10px; word-break: break-all; }
.sp-qr { width: 108px; flex: none; text-align: center; } .sp-qr svg { width: 100%; height: auto; display: block; } .sp-qr small { display: block; font-size: 9.5px; color: #6e737d; margin-top: 3px; line-height: 1.25; }
.sp-cond th { width: 18%; font-size: 11px; border-bottom: 1px solid #dfe3e9; } .sp-cond td { height: 26px; }
.sp-pie { margin: 4px 0 0; text-align: center; font-size: 11px; color: #6e737d; }
@media (max-width: 600px) { .sp-cab { flex-direction: column; align-items: flex-start; } .sp-cab img { height: 44px; } .sp-t { font-size: 11px; } .sp-t .sp-pr { display: none; } .sp-resp { flex-direction: column; } }
@media print {
  .sp .hoja { gap: 7px; }
  /* al imprimir, bloques en línea (no rejilla): Chrome monta unas cajas sobre otras al partir una rejilla entre páginas */
  .sp .hoja { display: block; } .sp .hoja > * { margin-top: 0; margin-bottom: 7px; }
  .sp .hoja.sp-h1 { break-after: auto; margin-bottom: 8mm; }
  .sp-crit, .sp-incs, .sp-fs { display: block; font-size: 0; margin-right: -6px; }
  .sp-crit > div, .sp-inc, .sp-f { display: inline-block; vertical-align: top; box-sizing: border-box; margin: 0 6px 6px 0; font-size: 12px; }
  .sp-crit > div { width: calc(33.33% - 6px); } .sp-inc { width: calc(50% - 6px); } .sp-f { width: calc(25% - 6px); }
  .sp-f > * + * { margin-top: 3px; } .sp-resp { display: flex; }
  .sp-t tr, .sp-crit > div, .sp-inc, .sp-f, .sp-resp { break-inside: avoid; }
  .sp-f { page-break-inside: avoid; } .sp-h2 .sp-h { break-after: auto; }
  .sp-fs { display: flex; flex-wrap: wrap; gap: 6px; margin-right: 0; } .sp-fs > .sp-f { margin: 0; width: calc(25% - 4.5px); }
  .sp-cab img { height: 54px; } .sp-cab h1 { font-size: 22pt; }
}
.pv-q { margin-top: 12px; } .pv-q summary { cursor: pointer; } .pv-q .fila { padding: 8px 0; border-top: 1px solid var(--line); }
.sp-refb { margin-left: auto; border: 1.5px solid #0f2347; border-radius: 8px; padding: 6px 12px; text-align: center; flex: none; }
.sp-refb span { display: block; font-size: 9.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #6e737d; }
.sp-refb b { display: block; font-size: 18px; color: #0f2347; } .sp-refb small { font-size: 10.5px; color: #39424f; }
.sp-dat { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; font-size: 12px; line-height: 1.4; color: #39424f; }
.sp-dat span { display: block; font-size: 9.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #c43424; } .sp-dat b { color: #1c2634; }
@media print { .sp-dat { display: flex; gap: 24px; } .sp-dat > div { flex: 1; } }
.mr-av { border: 1.5px solid #b26a00; background: var(--ambar-suave); border-radius: 10px; padding: 8px 12px; font-size: 14px; } .mr-av ul { margin: 4px 0 0; padding-left: 18px; }
.mr-av-c { margin: 0 0 6px; font-size: 13px; color: #b26a00; font-weight: 600; }

/* ===== Presupuestos de proveedores de la obra ===== */
.pv-g { display: grid; gap: 6px; margin-top: 10px; }
.pv-r { border-top: 1px solid var(--line); padding: 8px 0 4px; display: grid; gap: 4px; }
.pv-r1 { font-size: 15px; line-height: 1.35; } .pv-r2 { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 14px; }
.pv-pr { font-weight: 700; } .pv-eu { margin-left: auto; white-space: nowrap; }
.pv-est { font-style: normal; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 9px; background: #eef1f5; color: #39424f; white-space: nowrap; }
.pv-est.def { background: var(--verde-suave); color: var(--verde); } .pv-est.est { background: var(--azul-suave); color: var(--azul); } .pv-est.desc { background: #f3f3f3; color: #8a8f99; text-decoration: line-through; }
.pv-r.desc { opacity: .6; } .pv-ok { color: var(--verde); font-weight: 700; font-size: 14px; }
.qp-l { margin-top: 8px; }
@media (max-width: 600px) { .pv-eu { margin-left: 0; } }
.bz-km { font-size: 13px; font-weight: 700; color: var(--azul); background: var(--azul-suave); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }

/* ===== Coste de preparar el presupuesto ===== */
.go-tot { font-size: 18px; color: var(--azul); }
.go-l { display: grid; margin-top: 6px; }
.go-f { display: flex; gap: 8px; align-items: center; border-top: 1px solid var(--line); padding: 7px 0; font-size: 14px; }
.go-f > div { flex: 1; min-width: 0; } .go-f small { display: inline; } .go-f small.sub { display: block; }
.go-f.pend { background: var(--ambar-suave); border-radius: 8px; padding: 7px 8px; } .go-pt { color: #b26a00; font-weight: 700; }
.go-e { white-space: nowrap; }
.go-big { margin: 4px 0; font-size: 15px; } .go-big b { font-size: 24px; color: #b26a00; }
.go-pa { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); color: inherit; text-decoration: none; font-size: 15px; }
.go-rep { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.go-km { gap: 8px; } .go-km small { flex: 1; min-width: 160px; }
.pe-f.sinmed { background: #fdf3e2; } .pe-sm { margin: 2px 0 0; font-size: 13px; color: #b26a00; font-weight: 700; }
.pe-avm { margin: 6px 0; padding: 8px 10px; border-radius: 10px; background: var(--ambar-suave); color: #8a5a00; font-weight: 600; font-size: 14px; }
.mv-p { justify-content: flex-start; text-align: left; margin-top: 4px; } .pe-b { display: flex; gap: 4px; }
.go-quien { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.rp-l { margin: 8px 0 0; padding-left: 0; list-style: none; display: grid; gap: 4px; font-size: 14px; } .rp-l li.g { color: var(--rojo, #c43424); font-weight: 600; }
.rp.rp-mal { border-left: 4px solid #c43424; } .rp.rp-aviso { border-left: 4px solid #b26a00; } .rp.rp-ok { border-left: 4px solid var(--verde); }
.rp-ia { margin-top: 10px; background: #f5f1fd; border-radius: 10px; padding: 8px 12px; font-size: 14px; } .rp-ia ul { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 3px; }
.ag-dud { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 8px; } .ag-dud .fila { margin-top: 4px; gap: 6px; }
.rp-acc { margin: 4px 0 2px; gap: 6px; } .rp-ia li { margin-bottom: 4px; }

/* Cambio de material (cambios.js) */
.cambio-m { border-color: #f0d9a8; background: #fffbf3; }
.cambio-m .chip { background: var(--ambar-suave); color: #7a4d0e; }
.cm-ab { margin: 6px 0 2px; font-size: 16px; } .cm-ab s { color: var(--muted, #6b7280); }
.cm-lista { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 8px; }
.cm-lista > li { display: grid; grid-template-columns: 24px 1fr; gap: 8px; align-items: start; font-size: 14px; border-top: 1px solid #f1e6cf; padding-top: 8px; }
.cm-ok, .cm-no { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.cm-ok { background: var(--verde-suave); color: var(--verde); } .cm-no { background: var(--ambar-suave); color: #7a4d0e; }
.cm-b { margin-top: 6px; gap: 6px; flex-wrap: wrap; }
.cm-pq { margin: 4px 0; padding-left: 18px; display: grid; gap: 6px; }
.rojo-t { color: var(--rojo); }
.lnk { background: none; border: 0; padding: 0; color: var(--azul, #1d4ed8); text-decoration: underline; cursor: pointer; font: inherit; }
.part .txt em.cambio { background: var(--ambar-suave); color: #7a4d0e; }
.tec .fila .btn.peq { margin-left: 8px; }
.tec-ed textarea { font-size: 16px; }
.tec-ed-b { position: sticky; bottom: -1px; background: var(--panel); padding: 10px 0 4px; box-shadow: 0 -8px 12px -8px rgba(0,0,0,.12); }

/* Visitas de grupo en el coste de preparar el presupuesto */
.go-g { border-top: 1px solid var(--line); }
.go-g > summary { list-style: none; cursor: pointer; border-top: 0; }
.go-g > summary::-webkit-details-marker { display: none; }
.go-fl { color: var(--azul); font-size: 13px; transition: transform .15s; }
.go-g[open] .go-fl { transform: rotate(90deg); }
.go-g.pend > summary { background: var(--ambar-suave); border-radius: 8px; padding: 7px 8px; }
.go-sub { margin: 0 0 6px 18px; padding-left: 10px; border-left: 3px solid var(--azul-suave); }
.go-sub .go-f { font-size: 14px; }

/* Condiciones de la obra (condiciones.js) */
.cond-c { border-color: #c9d8ef; }
.cond-l { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.cond-l li { display: flex; gap: 8px; align-items: flex-start; border-top: 1px solid var(--line); padding-top: 6px; font-size: 14px; }
.cond-l li > div { flex: 1; min-width: 0; } .cond-b { display: flex; gap: 4px; align-items: center; }
.cond-banner { margin: 8px 0 0; background: var(--azul-suave); color: #183e7a; border-radius: 10px; padding: 7px 10px; font-size: 14px; }
.cond-q { background: var(--azul-suave); border-radius: 10px; padding: 8px 12px; margin: 6px 0; font-size: 14px; }
.cond-g { border-top: 1px solid var(--line); padding-top: 6px; margin-top: 6px; }
.cond-gt { margin: 0 0 4px; font-weight: 700; font-size: 14px; }
.cond-i { display: grid; grid-template-columns: 22px 1fr; gap: 6px; align-items: start; padding: 5px 0; font-size: 14px; cursor: pointer; }
.cond-i input { width: 18px; height: 18px; margin-top: 2px; } .cond-i small { display: block; color: var(--muted); font-size: 12px; }
.btn.ancho { width: 100%; margin: 4px 0; }
.tec-acc { margin: 6px 0 2px; gap: 8px; align-items: center; }

/* ===================== Panel del oficial (obra.js): robusto, grande, con aire de juego ===================== */
.tajo { max-width: 760px; margin: 0 auto; padding: 12px 12px 90px; }
.tajo .card { margin-bottom: 12px; }
.tajo h2 { font-size: 18px; margin: 0 0 6px; }
.t-hero { display: flex; gap: 14px; align-items: center; background: var(--azul-noche); color: #fff; border-radius: 18px; padding: 16px; margin-bottom: 10px; position: relative; overflow: hidden; }
.t-hero::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 22px 22px; pointer-events: none; }
.t-ob { flex: 1; min-width: 0; z-index: 1; } .t-ob small { opacity: .75; } .t-ob h1 { margin: 2px 0; font-size: 22px; color: #fff; } .t-ob p { margin: 0; opacity: .85; font-size: 14px; }
.t-ring, .cl-ring { --p: 0; width: 92px; height: 92px; border-radius: 50%; flex: none; display: grid; place-items: center; align-content: center; z-index: 1;
  background: radial-gradient(closest-side, var(--azul-noche) 78%, transparent 79% 100%), conic-gradient(#F2B705 calc(var(--p) * 1%), rgba(255,255,255,.18) 0); }
.t-ring b { font-size: 24px; line-height: 1; } .t-ring small { font-size: 11px; opacity: .8; }
.t-nivel { display: flex; gap: 10px; align-items: stretch; margin-bottom: 10px; }
.t-nivel > div:first-child { flex: 1; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; }
.t-niv-ico { grid-row: span 3; font-size: 30px; } .t-nivel b { font-size: 16px; } .t-nivel small { color: var(--muted); font-size: 12.5px; }
.t-barra { display: block; height: 8px; border-radius: 6px; background: var(--chip); overflow: hidden; margin-top: 6px; } .t-barra em { display: block; height: 100%; background: linear-gradient(90deg, #F2B705, #E52B25); border-radius: 6px; transition: width .4s; }
.t-racha { width: 96px; background: #fff; border: 1px solid var(--line); border-radius: 14px; display: grid; place-items: center; align-content: center; text-align: center; padding: 6px; }
.t-racha b { font-size: 22px; } .t-racha small { font-size: 11.5px; color: var(--muted); } .t-racha.on { background: #fff6e0; border-color: #f2d27a; }
.t-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; position: sticky; top: 0; z-index: 5; background: var(--bg); scrollbar-width: none; }
@media (min-width: 700px) { .t-tabs { flex-wrap: wrap; overflow: visible; } } /* en el ordenador caben todas: sin pestañas cortadas */
.t-tabs button { flex: none; min-height: 46px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font: inherit; font-weight: 700; font-size: 15px; color: var(--ink); }
.t-tabs button[aria-pressed="true"] { background: var(--azul-noche); color: #fff; border-color: var(--azul-noche); }
.t-tabs em { font-style: normal; background: var(--rojo); color: #fff; border-radius: 999px; padding: 0 7px; margin-left: 4px; font-size: 12px; }
.t-mision ul { list-style: none; padding: 0; margin: 4px 0; display: grid; gap: 6px; }
.t-mision li { display: flex; gap: 10px; align-items: center; font-size: 16px; font-weight: 600; padding: 8px 10px; border-radius: 12px; background: var(--chip); }
.t-mision li span { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #c3c9d2; display: grid; place-items: center; font-weight: 800; flex: none; }
.t-mision li.ok { background: var(--verde-suave); color: #1e5a3c; } .t-mision li.ok span { background: var(--verde); border-color: var(--verde); color: #fff; }
.t-mision.ok { border-color: #9fd3b4; } .t-pts { color: #b26a00; } .t-bravo { font-weight: 800; color: var(--verde); margin: 6px 0 0; }
.t-huecos { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 8px 0; }
.t-hueco { border: 2px dashed #c3c9d2; border-radius: 14px; min-height: 92px; display: grid; place-items: center; align-content: center; text-align: center; cursor: pointer; background: #fff; padding: 4px; }
.t-hueco b { font-size: 26px; line-height: 1.1; } .t-hueco span { font-weight: 800; font-size: 15px; } .t-hueco small { font-size: 11px; color: var(--muted); }
.t-hueco.ob { border-color: #f0c45a; } .t-hueco.ya { border-style: solid; border-color: var(--rojo); background: #fff3f1; animation: latir 1.4s infinite; }
.t-hueco.ok { border-style: solid; border-color: var(--verde); background: var(--verde-suave); } .t-hueco.ok b { color: var(--verde); }
@keyframes latir { 50% { transform: scale(1.04); } }
.t-otra { min-height: 52px; font-size: 16px; } .btn.rojo-b { background: var(--rojo); color: #fff; border-color: var(--rojo); min-height: 52px; font-size: 16px; }
.t-galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; margin-top: 8px; }
.t-galeria a { position: relative; display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--chip); }
.t-galeria img { width: 100%; height: 100%; object-fit: cover; } .t-galeria span { position: absolute; left: 4px; bottom: 4px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; padding: 1px 5px; border-radius: 6px; }
.t-galeria.mini { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
.t-tarea { border-top: 1px solid var(--line); padding: 10px 0; } .t-tarea b { font-size: 16px; }
.t-num { display: inline-block; background: var(--azul-noche); color: #fff; border-radius: 8px; padding: 0 7px; margin-right: 6px; font-size: 13px; }
.t-av { display: flex; gap: 5px; margin-top: 8px; flex-wrap: wrap; }
.t-av button { min-height: 44px; min-width: 52px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font: inherit; font-weight: 700; }
.t-av button[aria-pressed="true"] { background: var(--azul-suave); border-color: var(--azul); color: var(--azul); }
.t-av .t-fin { flex: 1; background: var(--verde); color: #fff; border-color: var(--verde); min-width: 120px; }
.t-gt { margin-top: 8px !important; } .t-hoja img { width: 100%; border: 1px solid var(--line); border-radius: 10px; margin-top: 4px; }
.t-esq { margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: #fff; } .t-esq svg { width: 100%; height: auto; }
.t-pasos { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.t-pasos li { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: start; padding: 10px; border-radius: 12px; background: var(--chip); cursor: pointer; }
.t-pasos li span { width: 36px; height: 36px; border-radius: 10px; background: var(--azul-noche); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 17px; }
.t-pasos li p { margin: 6px 0 0; font-size: 15.5px; } .t-pasos li.ok { background: var(--verde-suave); } .t-pasos li.ok span { background: var(--verde); }
.t-pasos li.ok p { text-decoration: line-through; color: #4b6b58; }
.t-ojo { border-color: #f0c9c2; background: #fffaf9; }
.t-hora { display: flex; gap: 8px; align-items: center; border-top: 1px solid var(--line); padding: 8px 0; } .t-hora > div:first-child { flex: 1; } .t-hora b { display: block; font-size: 16px; } .t-hora small { color: var(--muted); }
.t-step { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.t-step button { width: 44px; height: 46px; border: 0; background: var(--chip); font-size: 22px; font-weight: 800; }
.t-step input { width: 54px; height: 46px; border: 0; text-align: center; font-size: 19px; font-weight: 800; }
.t-ptarea { width: 100%; margin-top: 8px; min-height: 44px; } .t-acc { gap: 6px; margin-top: 8px; }
.t-cuad { overflow-x: auto; } .t-cuad table { width: 100%; border-collapse: collapse; font-size: 14px; text-align: center; } .t-cuad th { font-size: 12px; color: var(--muted); font-weight: 600; padding: 4px; text-transform: capitalize; }
.t-cuad td { border-top: 1px solid var(--line); padding: 6px 4px; } .t-cuad td:first-child { text-align: left; font-weight: 600; }
.t-gran { display: grid; place-items: center; min-height: 130px; border: 2px dashed var(--azul); border-radius: 16px; background: var(--azul-suave); cursor: pointer; margin: 6px 0 10px; text-align: center; }
.t-gran b { font-size: 40px; } .t-gran span { font-weight: 700; color: var(--azul); }
.t-gl { display: grid; } .t-g { display: flex; gap: 10px; align-items: center; border-top: 1px solid var(--line); padding: 8px 0; } .t-g > span { font-size: 22px; } .t-g > div { flex: 1; min-width: 0; } .t-g small { display: block; color: var(--muted); }
.t-ms { max-height: 52vh; overflow-y: auto; display: grid; gap: 8px; padding: 4px 0; }
.t-m { max-width: 85%; padding: 8px 11px; border-radius: 14px; background: var(--chip); } .t-m p { margin: 0; font-size: 15px; } .t-m small { color: var(--muted); font-size: 11.5px; }
.t-m.yo { justify-self: end; background: var(--azul-suave); } .t-m.el { justify-self: start; background: #fff; border: 1px solid var(--line); } .t-m.incidencia { background: #fff3f1; border: 1px solid #f0c9c2; }
.t-m img { max-width: 180px; border-radius: 10px; display: block; margin-bottom: 4px; }
.t-env { display: flex; gap: 6px; margin-top: 8px; } .t-env textarea, .t-env input { flex: 1; font-size: 16px; }
.t-dia { border-top: 1px solid var(--line); padding: 8px 0; }  .t-dia.hoy > b { color: var(--rojo); }
.t-pl { display: grid; grid-template-columns: 44px 1fr; column-gap: 6px; font-size: 14.5px; padding: 3px 0; } .t-pl span { font-weight: 800; color: var(--azul); } .t-pl small { grid-column: 2; color: var(--muted); }
.t-pl.ok span { color: var(--verde); }
.fiesta { position: fixed; inset: 0; z-index: 99; pointer-events: none; display: grid; place-items: center; }
.fiesta > div { background: var(--azul-noche); color: #fff; border-radius: 18px; padding: 16px 22px; text-align: center; box-shadow: 0 12px 30px rgba(0,0,0,.25); animation: pop .35s ease-out; }
.fiesta > div b { display: block; font-size: 20px; } .fiesta > div span { color: #F2B705; font-weight: 800; font-size: 18px; }
.fiesta i { position: absolute; top: -10px; width: 9px; height: 14px; border-radius: 2px; animation: caer 1.8s ease-in forwards; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } } @keyframes caer { to { transform: translateY(105vh) rotate(540deg); } }
@media (max-width: 420px) { .t-huecos { grid-template-columns: repeat(3, 1fr); } .t-ring { width: 78px; height: 78px; } }
/* tarjeta del jefe */
.ob-c { border-color: #f0d9a8; } .ob-acc { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; } .ob-msj { background: #fffaf0; border-radius: 12px; padding: 8px; margin-top: 6px; display: grid; gap: 6px; }
.ob-cos { margin-top: 8px; }
.plan-ed .plan-l { display: grid; gap: 6px; max-height: 60vh; overflow: auto; }
.plan-f { display: grid; grid-template-columns: 1fr 130px 54px 110px 40px 32px; gap: 4px; align-items: center; font-size: 13px; } .plan-f input { min-height: 36px; font-size: 13px; padding: 4px 6px; }
@media (max-width: 640px) { .plan-f { grid-template-columns: 1fr 1fr; } }
.rg { display: grid; grid-template-columns: 110px 1fr; gap: 10px; border-top: 1px solid var(--line); padding: 8px 0; } .rg img { width: 110px; border-radius: 8px; } .rg-sin { width: 110px; height: 80px; border-radius: 8px; background: var(--chip); display: grid; place-items: center; color: var(--muted); }

/* ===================== Panel del cliente (cliente.js): sobrio y profesional ===================== */
.cl { max-width: 880px; margin: 0 auto; padding: 0 16px 40px; color: var(--ink); }
.cl-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 2px solid #E52B25; margin-bottom: 16px; } .cl-top img { height: 30px; } .cl-top span { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.cl-hero { display: flex; gap: 18px; align-items: center; } .cl-hero > div:first-child { flex: 1; min-width: 0; }
.cl-eye { margin: 0; font-weight: 600; color: var(--azul); } .cl-hero h1 { margin: 2px 0; font-size: 28px; letter-spacing: -.01em; } .cl-sub { color: var(--muted); margin: 0 0 6px; } .cl-fechas { margin: 6px 0; }
.cl-ring { --bgc: var(--bg); width: 120px; height: 120px; background: radial-gradient(closest-side, #fff 80%, transparent 81% 100%), conic-gradient(var(--azul) calc(var(--p) * 1%), var(--chip) 0); }
.cl-ring b { font-size: 30px; line-height: 1; color: var(--azul-noche); } .cl-ring small { color: var(--muted); }
.cl-kpis { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; } .cl-kpis > div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; } .cl-kpis b { display: block; font-size: 20px; } .cl-kpis small { color: var(--muted); font-size: 12px; }
.vivo-c { border-color: #9fd3b4 !important; background: var(--verde-suave) !important; }
.cl-cond { background: var(--azul-suave); border-radius: 12px; padding: 8px 12px; color: #183e7a; font-size: 14px; margin: 14px 0 0; }
.cl-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-top: 14px; } .cl-card h2 { margin: 0 0 8px; font-size: 19px; }
.cl-fil { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; } .cl-fil button { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; }
.cl-fil button[aria-pressed="true"] { background: var(--azul-noche); color: #fff; border-color: var(--azul-noche); }
.cl-dia { border-top: 1px solid var(--line); padding: 10px 0; } .cl-dia h3 { margin: 0 0 6px; font-size: 15px; } .cl-dia h3::first-letter, .t-dia > b::first-letter { text-transform: uppercase; }
.cl-hito { margin: 2px 0; font-size: 14.5px; } .cl-hito.hito { color: var(--verde); font-weight: 600; }
.cl-fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; } .cl-fotos a { position: relative; display: block; aspect-ratio: 4/3; border-radius: 10px; overflow: hidden; background: var(--chip); }
.cl-fotos img { width: 100%; height: 100%; object-fit: cover; } .cl-fotos span { position: absolute; left: 6px; bottom: 6px; background: rgba(0,0,0,.55); color: #fff; font-size: 11.5px; padding: 1px 6px; border-radius: 6px; }
.cl-p { display: grid; grid-template-columns: 1fr 140px 44px; gap: 10px; align-items: center; border-top: 1px solid var(--line); padding: 8px 0; font-size: 14.5px; } .cl-p small { display: block; color: var(--muted); font-size: 12px; } .cl-p em { font-style: normal; font-weight: 700; text-align: right; }
.cl-bar { height: 8px; background: var(--chip); border-radius: 6px; overflow: hidden; } .cl-bar i { display: block; height: 100%; background: var(--azul); }
.cl-gantt { position: relative; } .cl-gs { position: relative; height: 22px; border-bottom: 1px solid var(--line); margin-left: 38%; } .cl-gs span { position: absolute; font-size: 11px; color: var(--muted); }
.cl-hoy { position: absolute; top: 0; height: 9999px; max-height: 2000px; border-left: 2px solid #E52B25; z-index: 1; }
.cl-gantt { overflow: hidden; } .cl-gf { display: grid; grid-template-columns: 38% 62%; align-items: center; border-bottom: 1px solid #f0f2f5; min-height: 22px; }
.cl-gf small { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 6px; } .cl-gf span { position: relative; height: 22px; }
.cl-gf i { position: absolute; top: 6px; height: 10px; border-radius: 4px; background: #c9d8ef; overflow: hidden; } .cl-gf i em { display: block; height: 100%; background: var(--azul); } .cl-gf i.ok em { background: var(--verde); }
.cl textarea { width: 100%; font-size: 16px; } .cl-btn { margin-top: 8px; background: var(--azul-noche); color: #fff; border: 0; border-radius: 12px; min-height: 46px; padding: 0 18px; font: inherit; font-weight: 700; }
.cl-pie { text-align: center; color: var(--muted); font-size: 12px; margin-top: 24px; }
.cl-err { text-align: center; padding: 60px 10px; } .cl-err img { height: 36px; }
@media (max-width: 600px) { .cl-hero { flex-direction: column-reverse; align-items: flex-start; } .cl-hero h1 { font-size: 23px; } .cl-p { grid-template-columns: 1fr 80px 40px; } .cl-gs, .cl-gf span { } .cl-gf { grid-template-columns: 42% 58%; } .cl-gs { margin-left: 42%; } }

/* Presupuesto al cliente (oferta.js) */
.ofer { max-width: 980px; margin: 0 auto; padding: 12px; } .ofer .card { margin-bottom: 12px; }
.of-tot { text-align: right; } .of-tot small { display: block; color: var(--muted); } .of-tot b { font-size: 24px; color: var(--azul-noche); }
.of-g { display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr .8fr; gap: 8px; margin-top: 10px; } @media (max-width: 760px) { .of-g { grid-template-columns: 1fr 1fr; } }
.of-suma { font-weight: 800; } .of-suma.ok { color: var(--verde); } .of-suma.mal { color: var(--rojo); }
.of-l { display: grid; } .of-p { border-top: 1px solid var(--line); } .of-p summary { display: grid; grid-template-columns: 44px 1fr 130px; gap: 8px; align-items: center; padding: 8px 0; cursor: pointer; list-style: none; }
.of-p summary::-webkit-details-marker { display: none; } .of-n { font-weight: 800; color: var(--azul); } .of-t { font-weight: 600; } .of-imp { text-align: right; }
.of-pct { display: flex; align-items: center; gap: 2px; } .of-pct input { width: 74px; text-align: right; min-height: 38px; } .of-p[open] { background: #fafbfd; padding: 0 8px 8px; border-radius: 10px; }
@media (max-width: 600px) { .of-p summary { grid-template-columns: 36px 1fr 100px; } }
.of-acc { gap: 8px; flex-wrap: wrap; }
.of-imp-w { position: fixed; inset: 0; z-index: 60; background: #e9ecf1; overflow: auto; padding: 12px; }
.of-barra { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; max-width: 210mm; margin: 0 auto 10px; }
.of-doc { background: #fff; color: #1C2634; max-width: 210mm; margin: 0 auto; padding: 14mm; font-size: 10pt; line-height: 1.4; box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.of-doc header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #E52B25; padding-bottom: 6px; margin-bottom: 12px; } .of-doc header img { height: 28px; } .of-doc header span { font-size: 8pt; font-weight: 600; color: #6E737D; letter-spacing: .04em; }
.of-doc h1 { font-size: 21pt; margin: 2px 0; } .of-s { color: #6E737D; margin: 0 0 10px; }
.of-cajas { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; } .of-cajas div { border: 1px solid #d9dde3; border-radius: 6px; padding: 7px 10px; } .of-cajas small { display: block; color: #6E737D; font-size: 7.5pt; text-transform: uppercase; letter-spacing: .04em; }
.of-t, .of-tot { width: 100%; border-collapse: collapse; } .of-t th { text-align: left; font-size: 7.5pt; text-transform: uppercase; color: #6E737D; border-bottom: 1.2px solid #1C2634; padding: 4px; }
.of-t td { border-bottom: 1px solid #e3e6ea; padding: 5px 4px; vertical-align: top; } .of-t small { color: #555e6b; } .of-t .n, .of-tot .n { text-align: right; white-space: nowrap; } .of-t .nn { font-weight: 700; width: 12mm; }
.of-t tr.z td { font-weight: 700; color: #1D4E9B; border-bottom: 1.2px solid #1D4E9B; padding-top: 10px; }
.of-tot { width: 80mm; margin: 10px 0 0 auto; } .of-tot td { padding: 4px; } .of-tot tr.g td { font-weight: 800; font-size: 12.5pt; border-top: 1.6px solid #1C2634; }
.of-cond { break-before: page; } .of-cond h2 { color: #1D4E9B; font-size: 12pt; border-bottom: 1px solid #d9dde3; } .of-cond h3 { font-size: 10pt; margin: 8px 0 2px; } .of-cond p, .of-cond li { font-size: 9pt; }
.of-firmas { display: grid; grid-template-columns: 1fr 1fr; gap: 16mm; margin-top: 34mm; } .of-firmas div { border-top: 1px solid #1C2634; padding-top: 3px; font-size: 8.5pt; color: #6E737D; }
@media print { body.of-imprimiendo > *:not(.of-imp-w) { display: none !important; } body.of-imprimiendo { background: #fff; } .of-imp-w { position: static; padding: 0; background: #fff; } .of-doc { box-shadow: none; padding: 0; max-width: none; } .no-print { display: none !important; } @page { size: A4; margin: 0; } /* sin márgenes de página = el navegador no imprime fecha, título ni dirección */
  .of-doc { padding: 12mm 13mm; -webkit-box-decoration-break: clone; box-decoration-break: clone; } }
.of-t tr, .of-cajas, .of-firmas { break-inside: avoid; } .of-tot { break-inside: avoid; break-before: avoid; }
.of-g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .of-intro { font-size: 9.5pt; margin: 0 0 10px; }

/* Documentos de la obra (docs.js · SQL 22): jefe, oficial y cliente */
.dc-l { display: grid; gap: 6px; margin-top: 8px; }
.dc-i { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid #e3e6ea; border-radius: 10px; background: #fff; color: inherit; text-decoration: none; }
a.dc-i:hover { border-color: var(--azul, #1D4E9B); }
.dc-ico { font-size: 22px; line-height: 1; }
.dc-t { flex: 1; min-width: 0; } .dc-t small { display: block; color: var(--muted, #6E737D); margin-top: 2px; } .dc-t small.dc-quien { display: inline; }
.dc-abrir { align-self: center; font-weight: 700; color: var(--azul, #1D4E9B); }
.dc-acc { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.dc-nuevo { font-style: normal; font-size: 11px; font-weight: 700; color: #fff; background: #E52B25; border-radius: 999px; padding: 1px 7px; }
.dc-hist { margin-top: 4px; font-size: 13px; } .dc-hist summary { cursor: pointer; color: var(--muted, #6E737D); } .dc-hist a { display: block; padding: 2px 0; }
@media (max-width: 560px) { .dc-i { flex-wrap: wrap; } .dc-acc { width: 100%; justify-content: flex-start; } }
#docsc .dc-i { flex-wrap: wrap; } #docsc .dc-t { flex-basis: calc(100% - 40px); } #docsc .dc-acc { width: 100%; justify-content: flex-start; padding-left: 32px; }
.of-mesa { margin: 8px 0; padding: 10px 12px; border-radius: 10px; background: #EEF3FA; color: var(--ink); font-size: 14px; }
.eq-f input.mal { border-color: var(--rojo); background: var(--rojo-suave); }

/* Extras (extras.js · SQL 26) */
.ex-l { display: grid; gap: 8px; margin-top: 8px; }
.ex-i { display: flex; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.ex-i img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.ex-t { flex: 1; min-width: 0; } .ex-t p { margin: 4px 0; } .ex-t .fila { gap: 6px; flex-wrap: wrap; }
.ex-est { margin-left: auto; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 9px; background: #EEF3FA; color: var(--azul, #1D4E9B); white-space: nowrap; }
.ex-est.pend { background: #FDF3DC; color: #8a5a00; } .ex-est.ok { background: #E3F2E9; color: #1f6b3f; } .ex-est.no { background: #FBE5E3; color: #9b2a20; }
.ex-acc, .ex-val { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-end; margin-top: 6px; } .ex-val label.c { flex: 1 1 110px; } .ex-val .ex-nota { flex-basis: 100%; }
.ex-stop { font-weight: 700; color: #9b2a20; } .ex-go { font-weight: 700; color: #1f6b3f; }
.cl-ex { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid #e3e6ea; } .cl-ex img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; }
.cl-ex h3 { margin: 0 0 4px; } .cl-ex p { margin: 4px 0; } .cl-ex-p { font-size: 18px; font-weight: 800; }
.cl-ex-b { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; } .cl-btn.no { background: #fff; color: var(--ink, #1C2634); border: 1px solid #c9ced6; }
.cl-ex-pend { border: 2px solid #F2B705; }
/* Administración (pantallaAdmin) */
.adm-g { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 12px; }
.adm-l { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.adm-l span { flex: 1; min-width: 0; } .adm-l small { display: block; color: var(--muted); } .adm-l em { font-style: normal; font-weight: 700; color: var(--azul, #1D4E9B); white-space: nowrap; }
.adm-n { background: var(--rojo); color: #fff; border-radius: 999px; padding: 0 9px; } .adm-vacio { color: #1f6b3f; }

/* Panel de obras (pantallaPanelObras): todas las obras en marcha de un vistazo */
.pob-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.pob-kpi > div { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; } .pob-kpi b { display: block; font-size: 28px; color: var(--azul-noche); } .pob-kpi small { color: var(--muted); }
.pob-kpi .mal b { color: var(--rojo); }
.pob-fil { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; } .pob-fil input { flex: 1 1 260px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; }
.pob-fil button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 14px; font: inherit; font-weight: 700; } .pob-fil button[aria-pressed="true"] { background: var(--azul-noche); color: #fff; border-color: var(--azul-noche); }
.pob-fil em { font-style: normal; opacity: .7; margin-left: 4px; }
.pob-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.pob-c { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: grid; gap: 10px; } .pob-c.aviso { border-left: 4px solid var(--rojo); }
.pob-c h2 { margin: 0; font-size: 18px; } .pob-c .sub { margin: 2px 0 0; } .pob-c > .fila { align-items: flex-start; gap: 8px; }
.pob-est { margin-left: auto; white-space: nowrap; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 10px; background: #EEF3FA; color: var(--azul, #1D4E9B); }
.pob-est.ok { background: #E3F2E9; color: #1f6b3f; } .pob-est.mal { background: #FBE5E3; color: #9b2a20; } .pob-est.gris { background: #EEF0F3; color: #555e6b; }
.pob-av { display: grid; gap: 4px; } .pob-av span { font-size: 13px; color: var(--muted); } .pob-av span b { color: var(--ink); font-size: 15px; }
.pob-bar { position: relative; height: 10px; background: #EEF0F3; border-radius: 999px; } .pob-bar i { position: absolute; inset: 0 auto 0 0; background: var(--azul, #1D4E9B); border-radius: 999px; }
.pob-bar b { position: absolute; top: -4px; width: 3px; height: 18px; background: var(--ink); border-radius: 2px; transform: translateX(-1px); }
.pob-sem { margin: 0; font-size: 14px; } .pob-hoy { display: flex; flex-wrap: wrap; gap: 6px; } .pob-hoy span { font-size: 13px; font-weight: 700; border-radius: 999px; padding: 3px 9px; background: #EEF3FA; }
.pob-hoy .si { background: #E3F2E9; color: #1f6b3f; } .pob-hoy .no { background: #FBE5E3; color: #9b2a20; }
.pob-jefe { font-size: 14px; } .pob-jefe select { font: inherit; border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; margin-left: 4px; }
.pob-acc { display: flex; flex-wrap: wrap; gap: 6px; }

/* Fotos generales de la obra (tarjeta de la ficha de obra) */
.fgen .fgen-i { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--chip); }
.fgen .fgen-i a { display: block; width: 100%; height: 100%; border-radius: 0; }
.fgen .fgen-i .btn-borra { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; border-radius: 10px; background: rgba(255,255,255,.92); }
.fgen .fgen-i .btn-borra svg { width: 16px; height: 16px; }

/* Ayuda de la cámara (camara.js): aviso corto si se vuelve sin foto */
.aviso-cam { position: relative; margin: 8px 0 0; padding: 10px 36px 10px 12px; border: 1px solid #f0d9a8; background: #fffaf0; border-radius: 12px; font-size: 14px; line-height: 1.4; grid-column: 1 / -1; }
.aviso-cam p { margin: 0; } .aviso-cam summary { margin-top: 6px; color: var(--azul, #1d4e9e); font-weight: 600; cursor: pointer; }
.aviso-cam ul { margin: 6px 0 0; padding-left: 18px; } .aviso-cam li { margin: 4px 0; }
.aviso-cam > button { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border: 0; background: none; font-size: 16px; color: #6e737d; cursor: pointer; }

/* ---- Auditoría visual, tanda 1 (20/11): lo que se salía de la pantalla o se pulsaba mal ---- */
/* 1) Barra de abajo: en el móvil, rótulos cortos que no se pisan */
.areas .n-c { display: none; }
@media (max-width: 700px) {
  .areas a { flex: 1 1 auto; min-height: 48px; justify-content: center; font-size: 11px; letter-spacing: 0; }
  .areas .n-l { display: none; } .areas .n-c { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
/* 2) Equipo: nada más ancho que la pantalla */
.eq-f > * { min-width: 0; }
@media (max-width: 600px) { .eq-f { grid-template-columns: minmax(0, 1fr) auto; } .eq-f select { width: 100%; } }
/* 4) Paquete: botones de cada elemento al tamaño del dedo; borrar, abajo y discreto */
@media (max-width: 600px) { .pe-b { grid-column: 1 / -1; justify-content: flex-end; gap: 8px; } .pe-b .pl-b { width: 44px; height: 44px; font-size: 18px; flex: none; } }
.borrar-pie { grid-column: 1 / -1; margin: 8px 0 0; text-align: right; }
.enl-rojo { background: none; border: 0; padding: 12px 4px; color: var(--rojo); font: inherit; font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
/* 5) Mesa: los importes no se parten y la etiqueta del precio único se lee entera */
.pu-r b { white-space: nowrap; } .pu .toggle span { min-width: 0; } .pu .toggle input { width: 22px; flex: none; }
@media (max-width: 420px) { .pu-r { grid-template-columns: 1fr; } .pu-r span { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; } }
@media (max-width: 1099px) { .mesa-caps .mc { flex: 0 0 240px; } .mesa-caps .mc span { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; } .mc small { white-space: nowrap; } }
/* 6) Ficha de obra: las tarjetas de herramientas no se salen */
.col-princ, .col-lat { grid-template-columns: minmax(0, 1fr); } .col-lat > * { min-width: 0; }

/* ---- Auditoría visual, tanda 2: iconos de línea en lugar de emojis (se usan como <i class=ic-nombre></i>) ---- */
i[class^="ic-"] { display: inline-grid; place-items: center; width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; margin-right: .35em; font-style: normal; }
i[class^="ic-"]::before { content: ""; width: 100%; height: 100%; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.herr-c h2 > i[class^="ic-"], .card h2 > i[class^="ic-"] { width: 20px; height: 20px; padding: 6px; box-sizing: content-box; background: var(--azul-suave); border-radius: 10px; color: var(--azul); margin-right: 0; }
.btn i[class^="ic-"] { width: 18px; height: 18px; margin-right: 0; } .btn:has(> i[class^="ic-"]) { display: inline-flex; align-items: center; gap: 8px; }
.ic-doc { --m: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M14%203H6v18h12V7zM14%203v4h4M9%2013h6M9%2017h6%22/%3E%3C/svg%3E"); }
.ic-carpeta { --m: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%206h6l2%202h10v11H3z%22/%3E%3C/svg%3E"); }
.ic-enviar { --m: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M22%202L11%2013M22%202l-7%2020-4-9-9-4z%22/%3E%3C/svg%3E"); }
.ic-agenda { --m: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M16%2021v-2a4%204%200%2000-4-4H6a4%204%200%2000-4%204v2M9%2011a4%204%200%20100-8%204%204%200%20000%208zM22%2021v-2a4%204%200%2000-3-3.9M16%203.1a4%204%200%20010%207.8%22/%3E%3C/svg%3E"); }
.ic-ajustes { --m: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%2021v-7M4%2010V3M12%2021v-9M12%208V3M20%2021v-5M20%2012V3M1%2014h6M9%208h6M17%2016h6%22/%3E%3C/svg%3E"); }
.ic-imprimir { --m: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M6%209V2h12v7M6%2018H4a2%202%200%2001-2-2v-5a2%202%200%20012-2h16a2%202%200%20012%202v5a2%202%200%2001-2%202h-2M6%2014h12v8H6z%22/%3E%3C/svg%3E"); }
.ic-euro { --m: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M18%207a6%206%200%20100%2010M4%2010h9M4%2014h9%22/%3E%3C/svg%3E"); }
.ic-cambio { --m: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M21%2012a9%209%200%2001-15.5%206.3L3%2016M3%2012a9%209%200%200115.5-6.3L21%208M21%203v5h-5M3%2021v-5h5%22/%3E%3C/svg%3E"); }
.ic-agente { --m: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M21%2012a8%208%200%2001-11.6%207.1L4%2020l1-4.4A8%208%200%201121%2012zM8.5%2012h.01M12%2012h.01M15.5%2012h.01%22/%3E%3C/svg%3E"); }
.ic-pin { --m: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%2017v5M9%203h6l-1%206%203%203v2H7v-2l3-3z%22/%3E%3C/svg%3E"); }
.ic-mas { --m: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%205v14M5%2012h14%22/%3E%3C/svg%3E"); }
.ic-obra { --m: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%2016a8%208%200%200116%200M2%2016h20v3H2zM12%208v4M9%209l1%203M15%209l-1%203%22/%3E%3C/svg%3E"); }
.ic-movil { --m: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M7%202h10v20H7zM11%2018h2%22/%3E%3C/svg%3E"); }
.ic-calendario { --m: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%205h18v16H3zM3%2010h18M8%203v4M16%203v4%22/%3E%3C/svg%3E"); }
.ic-usuario { --m: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M20%2021a8%208%200%2000-16%200M12%2013a5%205%200%20100-10%205%205%200%20000%2010z%22/%3E%3C/svg%3E"); }
.ic-regla { --m: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%2017L17%203l4%204L7%2021zM7%2013l2%202M10%2010l2%202M13%207l2%202%22/%3E%3C/svg%3E"); }
.ic-plano { --m: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%204h16v16H4zM4%2012h8v8M12%204v5h8%22/%3E%3C/svg%3E"); }
.ic-camara { --m: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%208h3l2-3h6l2%203h3v11H4zM12%2016.5a3.5%203.5%200%20100-7%203.5%203.5%200%20000%207z%22/%3E%3C/svg%3E"); }
.ic-ubicacion { --m: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%2021s-7-6.2-7-11a7%207%200%200114%200c0%204.8-7%2011-7%2011zM12%2012.5a2.5%202.5%200%20100-5%202.5%202.5%200%20000%205z%22/%3E%3C/svg%3E"); }
.ic-buscar { --m: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M11%2018a7%207%200%20100-14%207%207%200%20000%2014zM21%2021l-5-5%22/%3E%3C/svg%3E"); }
.ic-telefono { --m: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M5%203h4l2%205-2.5%201.5a11%2011%200%20006%206L16%2013l5%202v4a2%202%200%2001-2%202A16%2016%200%20013%205a2%202%200%20012-2z%22/%3E%3C/svg%3E"); }
.ic-coche { --m: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M5%2017h14v-5l-2-5H7l-2%205zM5%2012h14M7%2017v2M17%2017v2%22/%3E%3C/svg%3E"); }
.ic-ok { --m: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M22%2011.1V12a10%2010%200%2011-5.9-9.1M22%204L12%2014l-3-3%22/%3E%3C/svg%3E"); }
.ic-premio { --m: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%2015a6%206%200%20100-12%206%206%200%20000%2012zM8.2%2013.9L7%2022l5-3%205%203-1.2-8.1%22/%3E%3C/svg%3E"); }
.ic-reloj { --m: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%2022a10%2010%200%20100-20%2010%2010%200%20000%2020zM12%206v6l4%202%22/%3E%3C/svg%3E"); }
.ic-recibo { --m: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%202v20l3-2%203%202%203-2%203%202%203-2V2l-3%202-3-2-3%202-3-2-3%202zM8%208h8M8%2012h8M8%2016h5%22/%3E%3C/svg%3E"); }
.ic-ojo { --m: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M2%2012s4-7%2010-7%2010%207%2010%207-4%207-10%207S2%2012%202%2012zM12%2015a3%203%200%20100-6%203%203%200%20000%206z%22/%3E%3C/svg%3E"); }
.ic-candado { --m: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M5%2011h14v10H5zM8%2011V7a4%204%200%20018%200v4%22/%3E%3C/svg%3E"); }
.ic-mensaje { --m: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M21%2015a2%202%200%2001-2%202H7l-4%204V5a2%202%200%20012-2h14a2%202%200%20012%202z%22/%3E%3C/svg%3E"); }
.ic-bajar { --m: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%203v12M7%2010l5%205%205-5M5%2021h14%22/%3E%3C/svg%3E"); }
.ic-prohibido { --m: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%2022a10%2010%200%20100-20%2010%2010%200%20000%2020zM5%205l14%2014%22/%3E%3C/svg%3E"); }

/* Agente especializado: sin morado ni latido; botón secundario normal con su icono */
.ia-t { color: var(--azul); font-weight: 600; } .ia-t i[class^="ic-"] { color: var(--azul); }
.ia-b { color: var(--azul); border-color: var(--line); background: var(--panel); }
.ia-b:not(:disabled):hover { background: var(--azul-suave); }
.gasto-ag { color: var(--muted); background: none; padding: 0; font-weight: 500; text-transform: none; letter-spacing: 0; }
.gasto-ag i { display: none; animation: none; }
.mr-ag { background: var(--azul-suave); }
/* 15) «Cambio» en la lista de partidas: texto ámbar, sin partir */
.part .txt em { white-space: nowrap; }

/* ---- Auditoría visual, tanda 4 (20/11) ---- */
/* 12) Mesa: el paso principal primero; lo que se usa poco, en «Más» */
.mas-m { position: relative; } .mas-m > summary { list-style: none; cursor: pointer; } .mas-m > summary::-webkit-details-marker { display: none; }
.mas-m > summary::after { content: "▾"; margin-left: 6px; font-size: 12px; }
.mas-l { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; display: grid; gap: 6px; min-width: 240px; padding: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sombra); }
.mas-l .btn { justify-content: flex-start; width: 100%; }
@media (max-width: 700px) { .mas-l { right: auto; left: 0; } }
/* 14) Presupuestos de proveedores: dos grupos de botones con su rótulo */
.filtros-g { gap: 16px; flex-wrap: wrap; } .chips-t { align-self: center; font-size: 13px; font-weight: 600; color: var(--muted); margin-right: 2px; }
@media (max-width: 700px) { .filtros-g .chips.der { margin-left: 0; } }

/* 17) Panel de obras: jefe de obra con el rótulo arriba y el desplegable a todo el ancho */
.pob-jefe { display: grid; gap: 6px; } .pob-jefe select { width: 100%; margin-left: 0; font-size: 15px; padding: 10px 12px; } .pob-jefe small { font-size: 13px; }
/* 16) Dossier en el móvil: la hoja a todo el ancho; la tabla maestra se desliza dentro de su hoja */
@media screen and (max-width: 700px) { .dossier { grid-template-columns: minmax(0, 1fr); } .dossier .hoja { min-width: 0; } .dossier .t-maestra { display: block; overflow-x: auto; } }
/* 24) Vista previa de la Solicitud en el móvil: nada más ancho que la pantalla (impresa no cambia) */
@media screen and (max-width: 700px) { .doc.sp { grid-template-columns: minmax(0, 1fr); } .doc.sp .hoja { min-width: 0; } .doc.sp table { display: block; overflow-x: auto; } }

.ic-hoy { --m: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%2022a10%2010%200%20100-20%2010%2010%200%20000%2020zM12%2016a4%204%200%20100-8%204%204%200%20000%208zM12%2012h.01%22/%3E%3C/svg%3E"); }
.ic-grafico { --m: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%203v18h18M7%2015l4-4%203%203%206-6%22/%3E%3C/svg%3E"); }
/* ---- Panel del jefe de obra (20/11) ---- */
/* 2) Pestañas: rejilla de 4 × 2, todas a la vista, icono encima del texto */
.t-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; overflow: visible; flex-wrap: nowrap; }
.t-tabs button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 60px; padding: 6px 4px; border-radius: 14px; font-size: 13px; font-weight: 600; line-height: 1.15; text-align: center; position: relative; }
.t-tabs button i[class^="ic-"] { width: 22px; height: 22px; margin: 0; }
.t-tabs em { position: absolute; top: 4px; right: 6px; margin: 0; }
@media (min-width: 700px) { .t-tabs { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
/* 3) Cabecera corta fuera de «Hoy» */
.t-mini { display: grid; gap: 2px; background: var(--azul-noche); color: #fff; border-radius: 14px; padding: 10px 14px; margin-bottom: 10px; }
.t-mini b { font-size: 16px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .t-mini span { font-size: 14px; white-space: nowrap; opacity: .9; }
/* 4) Antes de empezar */
.t-antes h2 i[class^="ic-"] { color: var(--azul); }
/* 5) Plan: todas las tareas, plegadas */
.t-todas > summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; cursor: pointer; list-style: none; min-height: 44px; }
.t-todas > summary::-webkit-details-marker { display: none; } .t-todas > summary h2 { margin: 0; } .t-todas > summary h2::after { content: " ▸"; color: var(--muted); } .t-todas[open] > summary h2::after { content: " ▾"; }
/* 6) Horas: la casilla de lo hecho, a todo el ancho */
.t-ptarea-l { width: 100%; margin-top: 8px; } .t-ptarea-l textarea { width: 100%; box-sizing: border-box; min-height: 64px; resize: vertical; }
/* Misión e iconos del panel */
.t-mision li i[class^="ic-"] { color: var(--muted); } .t-hueco b i[class^="ic-"] { width: 26px; height: 26px; margin: 0; }


/* ===================== Panel del jefe de obra · toque de obra (20/11) =====================
   Sello: azul noche Ferracon + amarillo casco #F2B705 (el del anillo de avance). Cinta de balizamiento bajo la cabecera,
   barras de avance rayadas como una cinta métrica e iconos en placa azul noche. Solo estilo: nada de funcionamiento. */
.tajo { --casco: #F2B705; --casco-osc: #c99500; --casco-suave: #fff6dc; }
/* Cabecera = cartel de obra: plano de fondo (ya estaba), filo fino y cinta de balizamiento abajo */
.tajo .t-hero { padding: 18px 18px 26px; border-radius: 20px; box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 6px 18px rgba(15,35,71,.18); }
.tajo .t-hero::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 8px; z-index: 1;
  background: repeating-linear-gradient(-45deg, var(--casco) 0 10px, #0f2347 10px 20px); }
.tajo .t-ob small { opacity: .8; font-size: 13px; letter-spacing: 0; }
.tajo .t-ob h1 { font-size: 24px; font-weight: 700; line-height: 1.15; margin: 4px 0 8px; }
.tajo .t-ob p { display: inline-block; font-size: 14px; opacity: 1; color: #fff; background: rgba(255,255,255,.08); border-left: 3px solid var(--casco); border-radius: 4px 8px 8px 4px; padding: 4px 10px; }
.tajo .t-ring b { font-variant-numeric: tabular-nums; }
.tajo .t-mini { position: relative; overflow: hidden; padding: 12px 14px 18px; border-radius: 16px; }
.tajo .t-mini::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: repeating-linear-gradient(-45deg, var(--casco) 0 8px, #0f2347 8px 16px); }
/* Barras de avance: amarillo casco con raya de cinta métrica (sin degradado de colores) */
.t-barra em { background: repeating-linear-gradient(-45deg, var(--casco, #F2B705) 0 8px, #e2a900 8px 16px); }
/* Nivel y racha: tarjetas a juego */
.tajo .t-nivel > div:first-child, .tajo .t-racha { border-radius: 16px; box-shadow: var(--sombra); }
.tajo .t-racha.on { background: var(--casco-suave); border-color: #f0d27a; }
/* Pestañas: la activa en azul noche con su raya amarilla; las otras, placas blancas */
.tajo .t-tabs button { border-radius: 14px; background: #fff; border-color: var(--line); color: var(--ink); box-shadow: 0 1px 2px rgba(15,35,71,.05); }
.tajo .t-tabs button i[class^="ic-"] { color: var(--azul-noche); }
.tajo .t-tabs button[aria-pressed="true"] { background: var(--azul-noche); color: #fff; border-color: var(--azul-noche); box-shadow: inset 0 -4px 0 var(--casco); }
.tajo .t-tabs button[aria-pressed="true"] i[class^="ic-"] { color: var(--casco); }
/* Títulos de las tarjetas: icono en placa azul noche con trazo amarillo */
.tajo .card { border-radius: 18px; }
.tajo .card h2 { display: flex; align-items: center; gap: 10px; }
.tajo .card h2 > i[class^="ic-"] { width: 18px; height: 18px; padding: 7px; box-sizing: content-box; background: var(--azul-noche); color: var(--casco); border-radius: 10px; margin: 0; flex: none; }
/* Misión: los puntos de hoy en placa amarilla */
.tajo .t-pts { background: var(--casco-suave); color: #8a6200; border-radius: 999px; padding: 3px 10px; font-size: 14px; }
.tajo .t-mision li { background: #f6f7f9; border: 1px solid #eceff3; }
.tajo .t-mision li i[class^="ic-"] { color: var(--azul-noche); }
/* Pasos de «Cómo se hace»: número en placa azul noche con cifra amarilla */
.tajo .t-pasos li span { color: var(--casco); }
.tajo .t-pasos li.ok span { color: #fff; }
/* Huecos de foto de la misión: borde amarillo casco */
.tajo .t-hueco.ob { border-color: var(--casco); }
@media (prefers-reduced-motion: reduce) { .t-hueco.ya { animation: none; } }
.tajo .cond-banner i[class^="ic-"], .tajo p i.ic-pin { color: var(--azul); }

/* Documentos: papelera pequeña y aparte (no se pulsa sin querer) */
.dc-acc .dc-borra { flex: 0 0 36px; height: 36px; margin-left: auto; border-radius: 10px; }
.dc-acc .dc-borra svg { width: 16px; height: 16px; }
/* Entrada: ojo para ver la contraseña */
.pw-w { position: relative; display: block; } .pw-w input { width: 100%; padding-right: 52px; }
.pw-ojo { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 10px; }
.pw-ojo svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.pw-ojo .pw-tacha { display: none; } .pw-ojo[aria-pressed="true"] .pw-tacha { display: inline; } .pw-ojo[aria-pressed="true"] { color: var(--azul); }
/* Documentos: aviso de archivo repetido */
.dc-dup { border: 1px solid #f0d9a8; background: #fffaf0; border-radius: 12px; padding: 10px 12px; display: grid; gap: 4px; font-size: 14px; line-height: 1.4; }
.dc-dup b { color: #8a5a00; } .dc-dup span { color: var(--ink); }
/* Panel de obra (20/11): dos fotos de misión (10:30 y fin de jornada), vídeos, borrar horas */
.tajo .t-huecos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tajo .t-hueco { min-height: 104px; } .tajo .t-hueco span { font-size: 18px; } .tajo .t-hueco small { font-size: 13px; }
.t-vid, .cl-vid { position: relative; border-radius: 10px; overflow: hidden; background: #000; aspect-ratio: 1; }
.t-vid video, .cl-vid video { width: 100%; height: 100%; object-fit: cover; display: block; }
.t-vid span { position: absolute; left: 4px; top: 4px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; padding: 1px 5px; border-radius: 6px; }
.t-hora .t-hborra { flex: 0 0 36px; height: 36px; border-radius: 10px; margin-left: 4px; } .t-hora .t-hborra svg { width: 16px; height: 16px; }
.t-pre { display: flex; gap: 8px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); } .t-pre b { flex: 1; font-size: 15px; }
.aviso-cam-alt { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; }
/* Cuadrante de horas (horas.js): semana o mes, se toca un día para corregirlo */
.hc-w { overflow-x: auto; margin: 6px -4px 0; padding: 0 4px; }
.hc { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
.hc th, .hc td { text-align: center; padding: 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.hc th { font-size: 12px; font-weight: 600; color: var(--muted); padding: 4px 2px; } .hc th.hoy { color: var(--azul); }
.hc .hc-n { text-align: left; position: sticky; left: 0; background: var(--panel); font-weight: 600; padding: 8px 8px 8px 0; min-width: 84px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; z-index: 1; }
.hc .hc-t { padding: 8px 4px 8px 8px; }
.hc button { border: 0; background: none; font: inherit; color: inherit; width: 100%; min-width: 36px; min-height: 40px; padding: 4px 2px; cursor: pointer; border-radius: 8px; }
.hc button:hover { background: var(--azul-suave); } .hc .marca { background: var(--azul-suave); } .hc th.marca button { color: var(--azul); font-weight: 700; }
.hc tr.hc-sum td { font-weight: 700; background: #f6f7f9; padding: 8px 2px; } .hc tr.hc-obra td { text-align: left; color: var(--rojo); font-weight: 700; padding: 10px 0 4px; }
.t-otrodia { display: flex; gap: 10px; align-items: center; justify-content: space-between; background: var(--azul-suave); border-radius: 12px; padding: 8px 10px; margin: 6px 0; font-size: 14px; }
.t-desc { gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--chip); border-radius: 10px; padding: 3px; gap: 2px; } .seg button { border: 0; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgba(15,35,71,.1); }
.adm-horas { margin-top: 14px; } .adm-hnav { gap: 8px; margin-top: 6px; } .adm-hnav b { font-size: 16px; }
/* Hoy toca flexible (20/11): plan + empezadas + elegidas; en espera aparte */
.t-tags { margin: 4px 0 0; display: flex; gap: 6px; flex-wrap: wrap; } .t-tag { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--chip); border-radius: 999px; padding: 2px 8px; }
.t-tag.esp { color: #8a5a00; background: #fff6dc; } .t-tarea.espera { opacity: .9; }
.t-esp { display: block; margin: 8px 0 0 auto; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; padding: 6px 0; cursor: pointer; }
.t-otra-p { margin-top: 10px; min-height: 48px; } .t-esperan { margin-top: 10px; } .t-esperan > summary { cursor: pointer; font-weight: 600; color: #8a5a00; min-height: 40px; display: flex; align-items: center; }
.t-motivos { display: grid; gap: 8px; } .t-elige { display: grid; gap: 8px; max-height: 60vh; overflow: auto; }
.t-el { display: flex; gap: 10px; align-items: center; text-align: left; border: 1px solid var(--line); background: var(--panel); border-radius: 14px; padding: 12px; font: inherit; cursor: pointer; min-height: 56px; }
.t-el b { display: block; font-size: 15px; } .t-el small { color: var(--muted); font-size: 13px; }
.t-pasosd > summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; cursor: pointer; list-style: none; min-height: 44px; }
.t-pasosd > summary::-webkit-details-marker { display: none; } .t-pasosd > summary h2::after { content: " ▸"; color: var(--muted); } .t-pasosd[open] > summary h2::after { content: " ▾"; }
.t-pasos-l { margin: 8px 0 0; padding-left: 22px; display: grid; gap: 8px; font-size: 15px; line-height: 1.45; }
/* Equipo: pestañas que ve cada persona (SQL 30) */
.eq-perm { grid-column: 1 / -1; display: grid; gap: 6px; padding: 4px 0 2px; } .eq-pt { font-size: 13px; font-weight: 600; color: var(--muted); }
.eq-pers { font-style: normal; font-size: 12px; color: #8a5a00; background: #fff6dc; border-radius: 999px; padding: 1px 8px; margin-left: 6px; }
.eq-cas { display: flex; flex-wrap: wrap; gap: 6px; }
.eq-ca { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; font-size: 14px; background: var(--panel); cursor: pointer; min-height: 40px; }
.eq-ca:has(input:checked) { border-color: #b9cdee; background: var(--azul-suave); color: var(--azul); font-weight: 600; } .eq-ca input { width: 18px; height: 18px; margin: 0; }
.enl { background: none; border: 0; color: var(--azul); font: inherit; font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; padding: 6px 0; cursor: pointer; justify-self: start; }
/* Pestaña Cliente */
.cli-l { display: grid; gap: 12px; } .cli-acc { margin: 8px 0; } .cli-conv { display: grid; gap: 6px; margin: 6px 0; }
.cli-m { max-width: 86%; border-radius: 14px; padding: 8px 12px; background: var(--chip); } .cli-m p { margin: 0; font-size: 15px; white-space: pre-wrap; } .cli-m small { color: var(--muted); font-size: 12px; }
.cli-m.yo { justify-self: end; background: var(--azul-suave); } .cli-m.el { justify-self: start; background: #fff6dc; }
/* Jefe de obra con varias obras */
.eob-c { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 14px; margin-bottom: 10px; font: inherit; cursor: pointer; box-shadow: var(--sombra); }
.eob-c.ult { border: 2px solid var(--azul-noche); box-shadow: inset 0 -4px 0 #F2B705; } .eob-c > span { flex: 1; display: grid; gap: 2px; } .eob-c b { font-size: 17px; } .eob-c small { color: var(--muted); font-size: 13px; } .eob-c em { font-style: normal; font-size: 13.5px; font-weight: 600; color: #8a5a00; }
.eob-pc { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 14px; background: radial-gradient(closest-side, #fff 74%, transparent 75% 100%), conic-gradient(#F2B705 calc(var(--p) * 1%), #e6e9ee 0); flex: none; }
.tajo .t-hero.con { padding-top: 54px; } .t-cambia { position: absolute; top: 12px; right: 12px; z-index: 2; background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; font: inherit; font-size: 13px; font-weight: 600; padding: 6px 10px; cursor: pointer; display: flex; gap: 6px; align-items: center; }
.t-cambia em { font-style: normal; background: #F2B705; color: #0f2347; border-radius: 999px; padding: 0 6px; font-weight: 800; font-size: 12px; } .t-el.act { border: 2px solid var(--azul-noche); }

/* 21/11 · «En espera» visible para el gerente (ficha de la obra y Panel de obras) */
.pob-esp { display: grid; gap: 4px; } .pob-esp span { font-size: 13px; background: #FFF6DC; border: 1px solid #F2DE9A; color: #5b4500; border-radius: 10px; padding: 4px 9px; min-width: 0; overflow-wrap: anywhere; }
.ob-esp { margin: 8px 0 4px; background: #FFF9E8; border: 1px solid #F2DE9A; border-radius: 12px; padding: 8px 10px; }
.ob-esp .eyebrow { margin: 0 0 4px; } .ob-esp p:not(.eyebrow) { margin: 2px 0; display: flex; flex-wrap: wrap; gap: 0 8px; font-size: 14px; } .ob-esp span { color: #5b4500; }
.ob-elegida { margin: 6px 0 0; }

/* 21/11 · Panel del promotor: conversación con Ferracon estilo chat */
.cl-chat { display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow-y: auto; background: #F4F1EA; border-radius: 12px; padding: 10px; margin: 6px 0 10px; }
.cl-m { max-width: 82%; border-radius: 14px; padding: 7px 11px; box-shadow: 0 1px 1px rgba(15, 35, 71, .08); min-width: 0; overflow-wrap: anywhere; }
.cl-m p { margin: 0; font-size: 16px; white-space: pre-wrap; } .cl-m small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.cl-m.yo { align-self: flex-end; background: #DCF3D9; border-bottom-right-radius: 4px; } .cl-m.fc { align-self: flex-start; background: #fff; border-bottom-left-radius: 4px; }
.cl-escr { display: flex; gap: 8px; align-items: stretch; } .cl-escr textarea { flex: 1 1 auto; min-width: 0; margin: 0; } .cl-escr .cl-btn { margin: 0; flex: none; }

/* 21/11 · Panel del promotor: globo de mensajes, ventana de chat y avance plegable */
.cl { padding-bottom: 96px; }
.cl-globo { position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 60px; height: 60px; border-radius: 50%; border: 0; background: var(--azul-noche); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(15, 35, 71, .28); cursor: pointer; }
.cl-globo i { font-size: 27px; } .cl-globo[hidden] { display: none; }
.cl-globo b { position: absolute; top: -3px; right: -3px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #D93025; color: #fff; font-size: 13px; line-height: 22px; text-align: center; border: 2px solid #fff; }
.cl-globo b[hidden] { display: none; }
.cl-dudas { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; } .cl-dudas > div { flex: 1 1 260px; min-width: 0; } .cl-dudas .cl-btn { margin: 0; }
.cl-chatw { position: fixed; z-index: 50; inset: 0; background: #fff; display: flex; flex-direction: column; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); }
.cl-chatw[hidden] { display: none; }
.cl-chatc { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 8px; border-bottom: 2px solid #E52B25; } .cl-chatc h2 { margin: 0; font-size: 19px; }
.cl-x { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 18px; cursor: pointer; flex: none; }
.cl-chatw .cl-chat { flex: 1 1 auto; max-height: none; min-height: 0; margin: 10px 0; }
.cl-chatw .cl-sub { margin: 4px 0 0; min-height: 0; }
html.cl-chat-abierto { overflow: hidden; }
@media (min-width: 700px) {
  .cl-chatw { inset: auto 24px 24px auto; width: 400px; height: min(620px, calc(100vh - 48px)); border-radius: 18px; border: 1px solid var(--line); box-shadow: 0 16px 40px rgba(15, 35, 71, .25); }
  html.cl-chat-abierto { overflow: auto; }
}
.cl-res { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 8px; } .cl-res span { font-size: 13px; font-weight: 700; border-radius: 999px; padding: 3px 10px; background: var(--chip); }
.cl-res .ok { background: #E3F2E9; color: #1f6b3f; } .cl-res .cur { background: var(--azul-suave); color: #183e7a; }
.cl-gr { margin: 6px 0 0; font-size: 13px; font-weight: 700; color: var(--muted); }
.cl-pl { border-top: 1px solid var(--line); margin-top: 6px; } .cl-pl > summary { cursor: pointer; padding: 10px 0; font-weight: 700; color: var(--azul); list-style-position: inside; min-height: 44px; display: list-item; }
.cl-globo i { margin: 0; }
.cl-gs span { white-space: nowrap; }

/* 21/11 · Hoja abierta: la página de detrás no se mueve (ni rueda ni dedo); la lista de la hoja se desliza sola */
html.hoja-abierta body { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; }
.hoja-fondo { overscroll-behavior: contain; touch-action: none; }
.hoja-fondo .hoja { overscroll-behavior: contain; touch-action: auto; -webkit-overflow-scrolling: touch; max-height: min(90vh, 90dvh); }

.ic-galeria { --m: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%224%22%20width%3D%2218%22%20height%3D%2216%22%20rx%3D%222%22/%3E%3Ccircle%20cx%3D%228.5%22%20cy%3D%229.5%22%20r%3D%221.6%22/%3E%3Cpath%20d%3D%22M21%2016l-5-5-9%209%22/%3E%3C/svg%3E"); }

/* ===== 21/11 · Desplegables iguales en toda la app del cliente y del jefe de obra: tarjeta con icono, título, número y flecha en círculo ===== */
.acor-l { display: grid; gap: 8px; margin-top: 8px; }
.acor { border: 1px solid var(--line); border-radius: 14px; background: #F7F9FC; }
.acor > summary, .acor-card > summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; min-height: 56px; -webkit-tap-highlight-color: transparent; }
.acor > summary { padding: 8px 12px; }
.acor > summary::-webkit-details-marker, .acor-card > summary::-webkit-details-marker { display: none; }
.acor > summary::after, .acor-card > summary::after { content: ""; flex: none; margin-left: 2px; width: 32px; height: 32px; border-radius: 50%; background: #fff url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%231D4E9B%22%20stroke-width%3D%222.4%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M6%209l6%206%206-6%22/%3E%3C/svg%3E") center / 18px no-repeat; border: 1px solid var(--line); transition: transform .2s ease; }
.acor[open] > summary::after, .acor-card[open] > summary::after { transform: rotate(180deg); }
.acor[open] { background: #fff; box-shadow: 0 2px 10px rgba(15, 35, 71, .06); } .acor[open] > summary { border-bottom: 1px solid var(--line); }
.acor > :not(summary) { margin-left: 12px; margin-right: 12px; } .acor > :last-child:not(summary) { margin-bottom: 10px; }
.acor-i { flex: none; width: 38px; height: 38px; border-radius: 12px; background: var(--azul-suave); display: grid; place-items: center; font-size: 19px; color: var(--azul); }
.acor-tx { flex: 1 1 auto; min-width: 0; display: grid; } .acor-t { font-size: 16px; } .acor-s { color: var(--muted); font-size: 13px; }
.acor-n { flex: none; margin-left: auto; font-style: normal; font-weight: 800; font-size: 13px; background: var(--azul-noche); color: #fff; border-radius: 999px; padding: 3px 10px; }
.acor .dc-l { margin-top: 8px; } .acor .cl-p:first-child { border-top: 0; } .acor .cl-gantt { margin-top: 8px; }
.acor-card > summary h2::after { content: none !important; }
.t-esperan.acor { margin-top: 10px; background: #FFF9E8; border-color: #F2DE9A; } .t-esperan.acor > summary { color: #5b4500; font-weight: 700; } .t-esperan.acor .acor-n { background: #8a5a00; }
.t-esperan.acor > summary .acor-t { flex: 1 1 auto; } .acor-card > summary > .sub { margin-left: auto; }

/* ===== 21/11 · Fotos por partida en «Hoy» (antes / proceso / final), Fotos generales, Quitar de hoy ===== */
.t-tarea > .fila { gap: 8px; flex-wrap: nowrap; align-items: flex-start; } .t-tarea > .fila > b { flex: 1 1 auto; min-width: 0; } .t-tarea > .fila > .btn, .t-tarea > .fila > .t-x { flex: none; }
.t-x { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 15px; font-weight: 700; cursor: pointer; display: grid; place-items: center; }
.t-x:hover { color: var(--rojo); border-color: var(--rojo); }
.t-fot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.t-fot .t-bf { min-height: 40px; display: inline-flex; align-items: center; } .t-fot .t-bf i { margin-right: .3em; }
.t-fase { font-size: 12px; font-weight: 800; letter-spacing: .02em; border-radius: 999px; padding: 3px 9px; background: var(--chip); color: #39424f; margin-right: 2px; }
.t-fase.antes { background: #EEF3FA; color: #183e7a; } .t-fase.proceso { background: #FFF6DC; color: #6b5200; } .t-fase.final { background: #E3F2E9; color: #1f6b3f; }
.t-fn { font-style: normal; font-size: 13px; color: var(--muted); margin-left: auto; }
.t-fmini { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; margin-top: 8px; }
.t-fmini a, .t-fmini .t-vid { position: relative; display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--chip); }
.t-fmini img, .t-fmini video { width: 100%; height: 100%; object-fit: cover; } .t-fmini span { position: absolute; left: 3px; bottom: 3px; background: rgba(0,0,0,.6); color: #fff; font-size: 10px; padding: 1px 4px; border-radius: 5px; }
.t-fmas { display: grid; place-items: center; aspect-ratio: 1; border-radius: 10px; background: var(--chip); font-weight: 800; color: var(--muted); }
.t-termh { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; } .t-th { padding: 8px 0; border-bottom: 1px solid #f0f2f5; } .t-th > span { display: flex; gap: 6px; align-items: center; }
.t-ok { color: var(--verde); font-weight: 700; }
.t-fot.gen { margin-top: 6px; } .t-fot.grande .t-bf { flex: 1 1 140px; justify-content: center; min-height: 52px; font-size: 16px; }
button.t-hueco { font: inherit; color: inherit; width: 100%; }
.t-hq-l { display: grid; gap: 8px; margin: 8px 0 12px; } .t-hq { border: 1px solid var(--line); border-radius: 12px; padding: 10px; } .t-hq > span { display: flex; gap: 6px; align-items: center; } .t-hq .t-fot { margin-top: 8px; }
.t-subiendo { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 60; background: var(--azul-noche); color: #fff; font-weight: 700; border-radius: 999px; padding: 10px 18px; box-shadow: 0 6px 18px rgba(15, 35, 71, .3); }
.t-pre + .t-fot { margin: 4px 0 10px; }

/* Panel del cliente: fase de la foto y «Antes / Ahora» de cada partida */
.cl-fotos a { position: relative; } .cl-fase { position: absolute; top: 5px; left: 5px; font-style: normal; font-size: 11px; font-weight: 800; border-radius: 999px; padding: 2px 8px; background: #fff; color: #183e7a; }
.cl-fase.final { background: #287850; color: #fff; }
.cl-aa { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 12px; }
.cl-aa a { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--chip); }
.cl-aa img { width: 100%; height: 100%; object-fit: cover; } .cl-aa span { position: absolute; left: 8px; top: 8px; background: rgba(15, 35, 71, .85); color: #fff; font-weight: 800; font-size: 13px; border-radius: 999px; padding: 3px 10px; }

/* ===== 21/11 · Ficha de la obra: tarjetas de «Herramientas» plegables (flecha en círculo como los desplegables) ===== */
.col-lat .lat-cab { cursor: pointer; position: relative; padding-right: 44px; -webkit-tap-highlight-color: transparent; }
.col-lat .lat-cab::after { content: ""; position: absolute; right: 0; top: 50%; margin-top: -16px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: #fff url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%231D4E9B%22%20stroke-width%3D%222.4%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M6%2015l6-6%206%206%22/%3E%3C/svg%3E") center / 18px no-repeat; transition: transform .2s ease; }
.col-lat .herr-c.plegada .lat-cab::after { transform: rotate(180deg); }
.col-lat .herr-c.plegada > :not(.lat-cab):not(.lat-res) { display: none !important; }
.col-lat .herr-c.plegada { padding-top: 12px; padding-bottom: 12px; } .col-lat .herr-c.plegada .lat-cab h2, .col-lat .herr-c.plegada > h2.lat-cab { margin: 0; }
.lat-res { margin: 4px 0 0; color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Panel del cliente: fotos por trabajo, «Hoy» y documentos en un solo desplegable */
.cl-eye2 { margin: 4px 0 6px; font-size: 13px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: var(--azul); }
.cl-hg { margin-top: 10px; } .cl-hg h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 6px; font-size: 16px; } .cl-hg h3 small { font-weight: 600; color: var(--muted); font-size: 13px; }
.cl-num { display: inline-grid; place-items: center; min-width: 28px; height: 24px; padding: 0 6px; border-radius: 8px; background: var(--azul-noche); color: #fff; font-size: 13px; font-weight: 800; }
.cl-num-i { font-size: 15px; font-weight: 800; color: var(--azul-noche); }
.acor .cl-fotos { margin-top: 8px; } .acor .cl-aa { margin-top: 10px; } .acor .cl-dia { margin-top: 8px; }
.cl-docs > summary { margin: -4px 0; } .cl-docs[open] > summary { margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
/* 21/11 · Herramientas plegadas: solo título, flecha y resumen (los botones salen al abrirla). «Obra en marcha» ya no se sale por la derecha */
.col-lat .herr-c.plegada .lat-cab .btn { display: none; }
.col-lat .herr-c, .ob-msj { min-width: 0; } .ob-msj .t-env { display: flex; gap: 6px; } .ob-msj .t-env input { flex: 1 1 0; min-width: 0; width: 0 !important; } .ob-msj .t-env .btn { flex: none; } .ob-msj { overflow: hidden; }
/* 21/11 · Aviso discreto (sin serpentina) y mensajes del cliente en la ficha de la obra */
.t-nota { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 60; background: #1C2634; color: #fff; font-weight: 600; border-radius: 999px; padding: 9px 16px; box-shadow: 0 6px 18px rgba(15, 35, 71, .25); animation: notaIn .18s ease-out; }
@keyframes notaIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.ob-msj.cli { background: #F2F7EE; border: 1px solid #D5E8CC; margin-top: 8px; }
.t-vale { margin: 10px 0 -4px; font-size: 13px; font-weight: 700; color: #6b5200; background: #FFF6DC; border: 1px dashed #F2B705; border-radius: 10px; padding: 5px 9px; display: inline-block; }

/* 21/11 · Campo «Foto»: Hacer foto (cámara del móvil o cámara web del ordenador) o Galería/archivo, con miniatura */
.fc-campo > span { display: block; font-size: 13px; font-weight: 700; color: var(--muted); } .fc-bots { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; } .fc-bots .btn { flex: 1 1 150px; justify-content: center; min-height: 48px; display: inline-flex; align-items: center; }
.fc-bots .btn i { margin-right: .35em; }
.fc-prev { position: relative; margin-top: 8px; width: 140px; } .fc-prev img { width: 140px; height: 105px; object-fit: cover; border-radius: 10px; display: block; border: 1px solid var(--line); }
.fc-x { position: absolute; top: -8px; right: -8px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-weight: 700; cursor: pointer; }
.fc-web { position: fixed; inset: 0; z-index: 80; background: rgba(15, 35, 71, .7); display: grid; place-items: center; padding: 16px; }
.fc-web-c { background: #fff; border-radius: 16px; padding: 12px; width: min(640px, 100%); display: grid; gap: 10px; } .fc-web-c video { width: 100%; border-radius: 10px; background: #000; }

/* 22/11 · Papelera en cada foto de «Hoy» */
.t-fw { position: relative; } .t-fw > a, .t-fw > .t-vid { display: block; }
.t-borra-f { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: #b3261e; display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); cursor: pointer; z-index: 2; }
.t-borra-f svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* Extras en «¿Con qué partida sigues?» */
.t-el-ex { margin: 14px 0 6px; color: #1f6b3f; } .t-el.ex .t-num { background: #287850; }
/* Datos de la empresa: botón arriba en Documentos y vista grande para enseñarla */
.t-emp { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; border: 2px solid var(--azul-noche); margin-bottom: 10px; }
.t-emp b { font-size: 18px; display: block; } .t-emp small { color: var(--muted); font-size: 14px; } .t-emp-i { font-size: 30px; flex: none; width: 52px; height: 52px; border-radius: 14px; background: var(--azul-suave); display: grid; place-items: center; }
.t-emp-full { position: fixed; inset: 0; z-index: 70; background: #fff; overflow: auto; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); }
.t-emp-c { max-width: 640px; margin: 0 auto; display: grid; gap: 12px; } .t-emp-cab { margin: 0 0 4px; font-weight: 800; color: var(--azul); font-size: 15px; letter-spacing: .04em; text-transform: uppercase; border-bottom: 3px solid #E52B25; padding-bottom: 8px; }
.t-emp-f { border-bottom: 1px solid var(--line); padding-bottom: 10px; } .t-emp-f small { display: block; color: var(--muted); font-size: 15px; font-weight: 700; } .t-emp-f b { font-size: clamp(20px, 6.2vw, 28px); line-height: 1.2; overflow-wrap: break-word; word-break: normal; }
.t-emp-bots { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; } .t-emp-bots .btn { flex: 1 1 120px; min-height: 52px; font-size: 17px; }
.t-gal { margin-top: 8px; font-size: 14px; }

/* ===== 22/11 · Panel del cliente: ficha de partida en vivo ===== */
.cl-pb { width: 100%; background: none; border: 0; border-top: 1px solid var(--line); text-align: left; font: inherit; color: inherit; cursor: pointer; grid-template-columns: 1fr 140px 44px 18px; border-radius: 0; }
.cl-pb:hover { background: #F7F9FC; } .cl-chev { font-size: 22px; color: var(--azul); font-weight: 700; line-height: 1; }
.cl-pausa { color: #8a5a00; font-weight: 600; }
@media (max-width: 600px) { .cl-pb { grid-template-columns: 1fr 70px 38px 14px; } }
.cl-pf { position: fixed; inset: 0; z-index: 45; background: var(--bg, #F2F4F7); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.cl-pf-in { max-width: 880px; margin: 0 auto; padding: 12px 16px calc(40px + env(safe-area-inset-bottom)); }
.cl-pf-v { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 9px 16px; font: inherit; font-weight: 700; color: var(--azul); cursor: pointer; min-height: 44px; position: sticky; top: 8px; z-index: 2; box-shadow: 0 2px 8px rgba(15, 35, 71, .08); }
.cl-pf-cab { display: flex; gap: 12px; align-items: flex-start; margin: 14px 0 4px; } .cl-pf-cab .cl-num { font-size: 17px; height: 34px; min-width: 42px; margin-top: 4px; }
.cl-pf-cab h1 { margin: 0; font-size: 26px; line-height: 1.2; letter-spacing: -.01em; } .cl-pf-cab .cl-sub { margin: 4px 0 0; }
.cl-vivo { border: 2px solid var(--azul-noche); } .cl-vivo .fila { gap: 8px; flex-wrap: wrap; }
.cl-est { font-size: 13px; font-weight: 800; border-radius: 999px; padding: 4px 11px; background: var(--chip); }
.cl-est.ok { background: #E3F2E9; color: #1f6b3f; } .cl-est.cur { background: var(--azul-suave); color: #183e7a; } .cl-est.pausa { background: #FFF6DC; color: #6b5200; }
.cl-dir { margin-left: auto; font-size: 12px; font-weight: 700; color: #1f6b3f; display: inline-flex; align-items: center; gap: 6px; } .cl-dir i { width: 8px; height: 8px; border-radius: 50%; background: #2e9e5b; box-shadow: 0 0 0 3px rgba(46, 158, 91, .2); }
.cl-vivo-av { display: flex; align-items: center; gap: 12px; margin: 12px 0 4px; } .cl-vivo-av .cl-bar { flex: 1; height: 12px; } .cl-vivo-av b { font-size: 24px; color: var(--azul-noche); }
.cl-pausa-g { margin: 8px 0; background: #FFF6DC; border: 1px solid #F2DE9A; color: #5b4500; border-radius: 10px; padding: 8px 12px; font-weight: 600; }
.cl-fechas-p { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 10px 0 0; } .cl-fechas-p dt { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; } .cl-fechas-p dd { margin: 0; font-weight: 600; }
.cl-tl { display: grid; gap: 6px; margin-top: 12px; } .cl-tl > div { display: grid; grid-template-columns: 1fr 90px 40px; gap: 8px; align-items: center; font-size: 14px; } .cl-tl em { font-style: normal; font-weight: 700; text-align: right; }
.cl-hojas { display: grid; gap: 10px; } .cl-hojas a { display: block; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; } .cl-hojas img { width: 100%; display: block; }
.cl-hito small { color: var(--muted); font-weight: 500; margin-left: 4px; }
/* 22/11 · «En obra» de la partida en «Cómo se hace» */
.t-vivo { border: 2px solid var(--azul-noche); border-radius: 14px; padding: 12px; margin: 10px 0 12px; background: #fff; }
.t-vivo .fila { flex-wrap: nowrap; gap: 8px; } .t-vivo-t { font-size: 17px; } .t-vivo-p { font-size: 20px; color: var(--azul-noche); }
.t-tag.ok { background: #E3F2E9; color: #1f6b3f; }
.t-aa { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; } .t-aa a { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; }
.t-aa img { width: 100%; height: 100%; object-fit: cover; } .t-aa span { position: absolute; left: 6px; top: 6px; background: rgba(15, 35, 71, .85); color: #fff; font-size: 12px; font-weight: 800; border-radius: 999px; padding: 2px 9px; }
.t-vivo-n { margin: 8px 0 0; font-size: 13px; }

/* ===== 22/11 · Panel del cliente, opción C: en el móvil una sola columna ordenada; en el ordenador, dos columnas ===== */
.cl-cols { display: flex; flex-direction: column; } .cl-main, .cl-side { display: contents; }
.cl-o1 { order: 1; } .cl-o2 { order: 2; } .cl-o3 { order: 3; } .cl-o4 { order: 4; } .cl-o5 { order: 5; } .cl-o6 { order: 6; }
@media (min-width: 980px) {
  .cl.cl-c { max-width: 1200px; }
  .cl-cols { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 0 20px; align-items: start; }
  .cl-main, .cl-side { display: block; } .cl-side { position: sticky; top: 12px; }
}
.cl-hoyc { border: 2px solid var(--azul-noche); } .cl-hoyc .fila { gap: 8px; }
.cl-hoy-k { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; } .cl-hoy-k span { font-size: 13px; font-weight: 700; border-radius: 999px; padding: 4px 10px; background: var(--chip); }
.cl-hoy-t { display: grid; gap: 6px; margin-top: 8px; }
.cl-ht { display: grid; grid-template-columns: 52px 1fr 16px; gap: 10px; align-items: center; width: 100%; text-align: left; font: inherit; color: inherit; background: #F7F9FC; border: 1px solid var(--line); border-radius: 12px; padding: 6px 10px 6px 6px; cursor: pointer; min-height: 56px; }
.cl-ht img, .cl-ht .cl-num { width: 52px; height: 44px; border-radius: 8px; object-fit: cover; } .cl-ht b { display: block; font-size: 14.5px; } .cl-ht small { color: var(--muted); font-size: 13px; }
.cl-hoy-fs { grid-template-columns: repeat(3, 1fr); margin-top: 10px; } .cl-hoy-fs a { aspect-ratio: 1; }
.cl-pt { display: flex; gap: 10px; align-items: center; min-width: 0; } .cl-pt > span { min-width: 0; display: block; }
.cl-pmini { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; flex: none; }
.cl-exh .cl-ex { margin-top: 10px; }
@media (max-width: 600px) { .cl-pb { grid-template-columns: 1fr auto 14px; row-gap: 6px; } .cl-pb .cl-bar { grid-column: 1 / -1; grid-row: 2; } .cl-pb > div { grid-column: 1; grid-row: 1; } .cl-pb em { grid-column: 2; grid-row: 1; } .cl-pb .cl-chev { grid-column: 3; grid-row: 1; } }

/* 24/11 · ★ para el informe en cada foto */
.t-estr { position: absolute; top: 4px; left: 4px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: #8a6d00; font-size: 19px; line-height: 1; display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); cursor: pointer; z-index: 2; }
.t-estr.on { background: #F2B705; color: #0f2347; }
.inf-falta { margin: 6px 0; padding-left: 0; list-style: none; display: grid; gap: 3px; font-size: 14px; } .inf-falta li { color: #8a5a00; }

/* ===== 24/11 · Informe final / semanal: hojas A4, fondo blanco (ahorro de tinta), solo las fotos a color ===== */
.inf-m { max-width: 900px; margin: 0 auto; padding: 12px 16px 40px; }
.inf-bar-sup { display: grid; gap: 10px; margin-bottom: 16px; }
.inf-hojas { display: grid; gap: 18px; justify-items: center; }
.inf-h { width: 210mm; min-height: 297mm; background: #fff; color: #1C2634; box-shadow: 0 2px 14px rgba(15, 35, 71, .12); padding: 14mm 15mm 18mm; position: relative; display: flex; flex-direction: column; gap: 5mm; box-sizing: border-box; font-family: Inter, system-ui, sans-serif; }
.inf-cab { display: flex; justify-content: space-between; align-items: center; border-bottom: 1.5px solid #E52B25; padding-bottom: 3mm; font-size: 9.5pt; color: #687282; font-weight: 600; } .inf-cab img { height: 9mm; }
.inf-pie { position: absolute; left: 15mm; right: 15mm; bottom: 8mm; display: flex; justify-content: space-between; font-size: 8.5pt; color: #8a93a0; border-top: 1px solid #e3e6ea; padding-top: 2mm; }
.inf-port { justify-content: flex-start; } .inf-logo { height: 18mm; align-self: flex-start; }
.inf-port h1, .inf-port-s h1 { font-size: 26pt; margin: 0; line-height: 1.1; letter-spacing: -.01em; } .inf-eye { margin: 0; font-size: 9.5pt; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #1D4E9B; }
.inf-sub { margin: 0; color: #4b5563; font-size: 11pt; } .inf-fechas, .inf-sem { font-size: 13pt; font-weight: 700; margin: 0; }
.inf-g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4mm; } .inf-g3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3mm; } .inf-g4 { display: grid; grid-template-columns: 1fr 1fr; gap: 4mm; }
.inf-f { margin: 0; } .inf-f img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 2mm; display: block; } .inf-f figcaption { font-size: 9pt; color: #4b5563; margin-top: 1.2mm; font-weight: 600; }
.inf-port-f .inf-f img { aspect-ratio: 3 / 4; } .inf-grande img { aspect-ratio: 16 / 10; }
.inf-vacio { border: 1.5px dashed #c3c9d2; border-radius: 2mm; color: #8a93a0; display: grid; place-items: center; min-height: 40mm; font-size: 10pt; text-align: center; padding: 4mm; }
.inf-kpi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3mm; } .inf-kpi div { border: 1px solid #dfe3e9; border-radius: 2mm; padding: 3mm; } .inf-kpi b { font-size: 16pt; display: block; } .inf-kpi small { color: #687282; font-size: 8.5pt; }
.inf-h2 { font-size: 13pt; margin: 2mm 0 0; } .inf-cond { font-size: 10pt; border-left: 3px solid #1D4E9B; padding-left: 3mm; margin: 0; color: #183e7a; }
.inf-t { width: 100%; border-collapse: collapse; font-size: 10pt; } .inf-t td { border-bottom: 1px solid #e8ebef; padding: 2mm 1.5mm; vertical-align: top; } .inf-t td small { display: block; color: #8a93a0; font-size: 8.5pt; }
.inf-t .inf-bar { width: 32mm; } .inf-t .inf-bar i { display: block; height: 2.2mm; background: #1D4E9B; border-radius: 1mm; margin-top: 1.4mm; }
.inf-tit { display: flex; align-items: center; gap: 3mm; font-size: 17pt; margin: 0; } .inf-num { border: 1.5px solid #0f2347; color: #0f2347; border-radius: 2mm; padding: 0.5mm 2.5mm; font-size: 12pt; }
.inf-acord { display: grid; grid-template-columns: 45mm 1fr; gap: 4mm; border: 1px solid #dfe3e9; border-radius: 2mm; padding: 3mm; font-size: 9.5pt; } .inf-acord img { width: 100%; border: 1px solid #eee; } .inf-acord ul { margin: 1.5mm 0 0; padding-left: 4mm; }
.inf-acord:not(:has(img)) { grid-template-columns: 1fr; }
.inf-hitos { font-size: 9.5pt; color: #1f6b3f; margin: 0; } .inf-l { font-size: 10.5pt; margin: 0; padding-left: 5mm; } .inf-l small { color: #8a93a0; }
.inf-borrador { background: #FFF6DC; border: 1px dashed #F2B705; padding: 2mm 3mm; font-weight: 700; font-size: 9.5pt; margin: 0; }
.inf-check { font-size: 11pt; margin: 2mm 0 0; } .inf-lineas { height: 28mm; background: repeating-linear-gradient(#fff 0 8mm, #c3c9d2 8mm 8.3mm); }
.inf-firmas { display: grid; grid-template-columns: 1fr 1fr; gap: 12mm; margin-top: 18mm; font-size: 10pt; text-align: center; } .inf-firmas span { display: block; border-bottom: 1px solid #1C2634; height: 22mm; margin-bottom: 2mm; }
.inf-port-s { display: grid; gap: 2mm; margin-top: 4mm; }
@media (max-width: 900px) { .inf-hojas { zoom: .46; } }
@page { size: A4; margin: 0; }
@media print {
  body { background: #fff !important; } header.cab-app, nav, .no-print, .pestanas, .barra-areas, #fabo, .fab, .cl-globo { display: none !important; }
  .inf-m { padding: 0; max-width: none; } .inf-hojas { display: block; zoom: 1 !important; } .inf-h { box-shadow: none; margin: 0; page-break-after: always; break-after: page; height: 297mm; overflow: hidden; }
  .solo-pantalla { display: none !important; } body > *:not(#app) { display: none !important; } #app > *:not(main) { display: none !important; }
}
.inf-t-c td { padding: 1.3mm 1.5mm; } .inf-t-c td small { display: inline; margin-left: 1.5mm; }
/* la foto final ocupa el hueco que queda en la hoja (nunca se sale ni tapa el pie) */
.inf-h { height: 297mm; min-height: 0; overflow: hidden; }
.inf-grande { flex: 1 1 auto; min-height: 30mm; display: flex; flex-direction: column; } .inf-grande img { flex: 1 1 auto; min-height: 0; height: 0; aspect-ratio: auto; }
.inf-h > .inf-vacio { flex: 1 1 auto; max-height: 90mm; }
.inf-hitos { flex: none; }
/* 24/11 · Gastos: tocar para corregir o borrar */
.t-gb { width: 100%; text-align: left; font: inherit; color: inherit; background: none; border: 0; border-top: 1px solid var(--line); cursor: pointer; padding: 8px 0; display: flex; gap: 10px; align-items: center; }
.t-gb > div { flex: 1 1 auto; min-width: 0; } .t-g-ed { flex: none; width: 30px; text-align: center; color: var(--azul); }

/* ===== 24/11 · Medidores de avance comunes (avance.js): mosaico «Así va la obra» y barras ===== */
.mz { margin: 4px 0 2px; } .mz-cab { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; } .mz-cab b { font-size: 15px; } .mz-cab span { font-size: 13px; color: var(--muted); font-weight: 600; }
.mz-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 6px; }
.mz-t { position: relative; height: 46px; border-radius: 10px; border: 1px solid #dfe3e9; background: #F4F6F9; overflow: hidden; cursor: pointer; padding: 0; font: inherit; display: grid; place-items: center; -webkit-tap-highlight-color: transparent; transition: transform .12s ease, box-shadow .12s ease; }
.mz-t:hover { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(15, 35, 71, .12); }
.mz-t i { position: absolute; left: 0; right: 0; bottom: 0; background: #9DB8E3; transition: height .4s ease; } .mz-t span { position: relative; font-size: 12.5px; font-weight: 800; color: #1C2634; }
.mz-t.cur { border-color: #BFD0EC; } .mz-t.cur i { background: linear-gradient(180deg, #A9C2EA, #7FA2DA); }
.mz-t.ok { border-color: #B7DCC4; background: #E3F2E9; } .mz-t.ok i { background: linear-gradient(180deg, #9ED3B1, #6FBF8E); } .mz-t.ok span { color: #134d2c; }
.mz-t.pausa { border-color: #F2DE9A; } .mz-t.pausa i { background: repeating-linear-gradient(-45deg, #F7D774 0 6px, #F2C94C 6px 12px); }
.mz-t.pen span { color: #8a93a0; }
.mz-ley { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: 12px; font-weight: 600; color: #4b5563; }
.mz-ley span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; background: #E4E7EC; border: 1px solid #cfd5dd; }
.mz-ley span { background: none !important; padding: 0 !important; border: 0 !important; color: #4b5563 !important; font-size: 12px !important; } .mz-ley .mzl-ok::before { background: #6FBF8E; border-color: #6FBF8E; } .mz-ley .mzl-cur::before { background: #7FA2DA; border-color: #7FA2DA; } .mz-ley .mzl-pausa::before { background: #F2C94C; border-color: #F2C94C; }
.av-b { display: block; height: 6px; border-radius: 4px; background: #EBEEF2; overflow: hidden; margin-top: 5px; } .av-b i { display: block; height: 100%; background: #7FA2DA; border-radius: 4px; }
.av-b.ok i { background: #6FBF8E; } .av-b.pausa i { background: #F2C94C; } .av-b.pen i { width: 0 !important; }
.t-el-tx { display: grid; min-width: 0; flex: 1 1 auto; text-align: left; }

/* ===== 24/11 · «Hoy toca»: cada partida en su tarjeta, con un acento de color suave según de dónde viene ===== */
.t-toca .t-tarea.t-card { --acc: #1D4E9B; background: #fff; border: 1px solid #E3E7ED; border-left: 4px solid var(--acc); border-radius: 14px; padding: 12px 12px 10px; margin-top: 12px; box-shadow: 0 1px 3px rgba(15, 35, 71, .05); border-top: 1px solid #E3E7ED; }
.t-toca .t-tarea.t-card.plan { --acc: #6E8FC8; } .t-toca .t-tarea.t-card.emp { --acc: #E3B12A; background: linear-gradient(90deg, #FFFCF3, #fff 40%); } .t-toca .t-tarea.t-card.eleg { --acc: #4E9E6E; background: linear-gradient(90deg, #F5FBF7, #fff 40%); }
.t-toca .t-tarea.t-card .t-tag { background: color-mix(in srgb, var(--acc) 14%, #fff); color: color-mix(in srgb, var(--acc) 70%, #1C2634); }
.t-pct { font-style: normal; font-size: 12.5px; font-weight: 800; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: #EEF1F5; color: #4b5563; white-space: nowrap; vertical-align: 2px; }
.t-pct.cur { background: #E6EEF9; color: #183e7a; } .t-pct.ok { background: #E3F2E9; color: #1f6b3f; }
/* «Cómo se hace»: la partida elegida con su avance y «Cambiar» */
.g-sel { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; font: inherit; color: inherit; background: #F7F9FC; border: 1px solid #DCE2EA; border-radius: 14px; padding: 10px 12px; cursor: pointer; min-height: 60px; }
.g-sel-tx { flex: 1 1 auto; min-width: 0; display: grid; } .g-sel-tx b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .g-sel em { font-style: normal; font-weight: 800; color: var(--azul-noche); }
.g-sel-c { flex: none; font-size: 13px; font-weight: 700; color: var(--azul); border-left: 1px solid #DCE2EA; padding-left: 10px; }
.g-gr { margin: 12px 0 4px; } .t-el.act { border-color: var(--azul); box-shadow: 0 0 0 2px var(--azul-suave); }
/* Horas: confirmar el parte */
.t-confh { margin-top: 10px; min-height: 52px; font-size: 16px; } .t-confh.ok { background: #E3F2E9; color: #1f6b3f; border: 1px solid #B7DCC4; }
/* Informe: elegir fotos con ★ (oficina) */
.inf-est-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; margin-top: 8px; }
.inf-est { position: relative; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: var(--chip); cursor: pointer; aspect-ratio: 1; font: inherit; }
.inf-est img { width: 100%; height: 100%; object-fit: cover; display: block; } .inf-est span { position: absolute; left: 4px; bottom: 4px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 10.5px; padding: 1px 5px; border-radius: 5px; }
.inf-est b { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; background: rgba(255, 255, 255, .92); display: grid; place-items: center; color: #8a6d00; font-size: 17px; }
.inf-est.on { border-color: #F2B705; } .inf-est.on b { background: #F2B705; color: #0f2347; }
.t-toca .t-tarea.t-card.cur { background: linear-gradient(90deg, #F3F7FD, #fff 45%); }
.t-toca .t-tarea.t-card.cur .t-barra em { background: linear-gradient(90deg, #7FA2DA, #1D4E9B); }

/* ===== Hojas de medidas de fabricación (SQL 46, 24/11): esquema + líneas de cota que se tocan; fondo blanco para imprimir ===== */
.md-aviso h2 { margin: 0 0 8px; font-size: 17px; }
.md-fila { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: var(--ambar-suave); border: 1px solid #ecd9b0; border-radius: 12px; padding: 12px 14px; margin-top: 8px; cursor: pointer; }
.md-fila span { flex: 1; min-width: 0; } .md-fila b { display: block; } .md-fila small { color: var(--muted); }
.md-fila i { font-style: normal; font-size: 22px; color: var(--muted); } .md-fila.hecha { background: var(--verde-suave); border-color: #cfe5d8; }
.md-hoja .md-l { margin-top: 6px; }
.md-como { background: var(--chip); border-radius: 10px; padding: 8px 12px; margin: 6px 0; font-size: 14px; } .md-como summary { cursor: pointer; font-weight: 600; } .md-como ol { margin: 8px 0 2px; padding-left: 20px; } .md-como li { margin: 3px 0; }
.md-p { display: flex; align-items: center; gap: 10px; } .md-p small { color: var(--muted); white-space: nowrap; }
.md-prog { flex: 1; height: 8px; background: var(--chip); border-radius: 6px; overflow: hidden; } .md-prog i { display: block; height: 100%; background: var(--azul); } .md-prog.ok i { background: var(--verde); }
.md-l { display: grid; gap: 12px; }
.md-e { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; min-width: 0; }
.md-e header { display: flex; gap: 8px; align-items: baseline; } .md-e header b { background: var(--azul-noche); color: #fff; border-radius: 6px; padding: 1px 7px; font-size: 13px; white-space: nowrap; }
.md-e header span { font-weight: 700; } .md-d { margin: 4px 0 6px; color: var(--muted); font-size: 13px; }
.md-dib { display: flex; justify-content: center; } .md-svg { width: 100%; max-width: 360px; height: auto; max-height: 260px; }
.md-cota, .md-linea { cursor: pointer; } .md-cota:focus { outline: none; } .md-cota:focus rect { stroke-width: 3; }
.md-in { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-top: 6px; }
.md-in label { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 6px; } .md-in label span { grid-column: 1 / -1; font-size: 13px; font-weight: 600; color: var(--muted); }
.md-in input { width: 100%; min-width: 0; font-size: 18px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.md-in input[data-k="nota"] { font-size: 15px; } .md-in em { font-style: normal; color: var(--muted); font-size: 13px; }
.md-in .md-nota { grid-column: 1 / -1; grid-template-columns: 1fr; }
.md-av { margin: 4px 0 0; font-size: 13px; min-height: 0; } .md-av.aviso { color: var(--ambar); font-weight: 600; }
.md-env { margin-top: 18px; border-top: 1px solid var(--line); padding: 14px 0 4px; }
.md-borra { color: var(--rojo); }
.md-t { border-top: 1px solid var(--line); padding: 10px 0; display: grid; gap: 8px; } .md-t-c b { display: block; } .md-st { color: var(--muted); }
.md-st.pedida { color: var(--ambar); } .md-st.enviada { color: var(--verde); font-weight: 600; }
.md-m { max-width: 1000px; margin: 0 auto; padding: 16px; }
.md-barra { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 12px; } .md-barra small { display: block; color: var(--muted); }
.md-doc { background: #fff; border-radius: 8px; box-shadow: var(--sombra); padding: 22px; }
.md-dcab { display: flex; justify-content: space-between; gap: 14px; border-bottom: 3px solid var(--rojo); padding-bottom: 10px; }
.md-dcab h1 { margin: 2px 0 4px; font-size: 22px; } .md-dcab p { margin: 0; color: var(--muted); font-size: 14px; } .md-dcab img { height: 46px; }
.md-nota-g { font-size: 12.5px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin: 12px 0; }
.md-doc .md-l { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.md-pv { margin: 6px 0 0; font-size: 14px; text-align: center; }
.md-dpie { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); margin-top: 14px; padding-top: 6px; font-size: 11px; color: var(--muted); }
@media (max-width: 600px) { .md-doc { padding: 14px; } .md-dcab img { height: 34px; } .md-dcab h1 { font-size: 18px; } }
@media print {
  .md-m { padding: 0; max-width: none; } .md-doc { box-shadow: none; padding: 0; border-radius: 0; }
  .md-doc .md-l { grid-template-columns: 1fr 1fr; gap: 8px; } .md-e { break-inside: avoid; padding: 8px; }
  .md-svg { max-height: 62mm; } .md-dcab img { height: 14mm; }
}
/* 24/11 · Móvil del jefe de obra: los botones de arriba se esconden al bajar y vuelven al subir; globo de mensajes del gerente */
.t-tabs { transition: transform .22s ease, box-shadow .22s; }
.t-tabs.oculta { transform: translateY(calc(-100% - 12px)); box-shadow: none; }
.t-globo, .g-globo { position: fixed; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 40; width: 58px; height: 58px; border-radius: 50%; border: 0; background: var(--azul-noche); color: #fff; box-shadow: 0 6px 18px rgba(15,35,71,.3); display: grid; place-items: center; cursor: pointer; }
.t-globo i[class^="ic-"], .g-globo i[class^="ic-"] { width: 26px; height: 26px; margin: 0; }
.t-globo b, .g-globo b { position: absolute; top: -3px; right: -3px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--rojo); color: #fff; font-size: 12.5px; display: grid; place-items: center; border: 2px solid #fff; }
.t-globo { animation: t-gl 1.6s ease 2; } @keyframes t-gl { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.12); } 30% { transform: scale(1); } }
.areas a { position: relative; } .areas .n-b { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--rojo); color: #fff; font-size: 11px; font-weight: 700; font-style: normal; display: grid; place-items: center; line-height: 1; }
.g-lista a { display: block; text-decoration: none; color: inherit; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-top: 8px; }
.g-lista a b { display: block; } .g-lista a small { color: var(--muted); } .g-lista a p { margin: 4px 0 0; }
/* 24/11 · Adjuntos en el chat con el cliente */
.adj-b { flex: none; font-size: 18px; padding: 0 10px; cursor: pointer; } .adj-sel { margin: 4px 0 0; font-size: 13px; color: var(--muted); } .adj-sel:empty { display: none; }
.adj-q { border: 0; background: none; color: var(--rojo); font-size: 14px; cursor: pointer; }
.adj-img { display: block; margin-top: 6px; } .adj-img img { display: block; max-width: 220px; max-height: 220px; border-radius: 10px; object-fit: cover; }
.adj-doc { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.75); border: 1px solid var(--line); text-decoration: none; color: var(--ink); max-width: 280px; }
.adj-doc .adj-ic { font-size: 22px; } .adj-doc .adj-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; } .adj-doc em { font-style: normal; font-weight: 700; color: var(--azul); font-size: 13px; }
.t-vic { margin-right: .3em; font-size: 15px; line-height: 1; }
