/* Revisor SOILTERRA — paleta tomada del logo (negro) y del paisaje del calendario
   (nieve, arena, piedra, verde pizarra). */
:root {
  --bg: #f4f1ea; --panel: #ffffff; --panel-2: #faf8f3; --text: #1b1d1b; --muted: #676d67;
  --line: #e3ddd0; --line-2: #d3cbbb; --ink: #000;
  --tierra: #4d5650; --arena: #dcc3a0; --piedra: #a9a493; --nieve: #e6e2d4;
  --accent: #4d5650; --accent-text: #fff; --hover: #f1ede4; --focus: color-mix(in srgb, #4d5650 35%, transparent);
  --err: #b3412e; --err-bg: #f7e4dd; --adv: #9a6a12; --adv-bg: #f6ebd0; --info: #56645e; --info-bg: #e8ece8;
  --ok: #3f7a4f; --ok-bg: #e0eee2; --claude: #b0603c; --claude-bg: #f6e6dc;
  --shadow-sm: 0 1px 2px rgba(40,35,20,.05), 0 1px 3px rgba(40,35,20,.07);
  --shadow-md: 0 6px 16px -4px rgba(40,35,20,.12), 0 18px 40px -10px rgba(40,35,20,.16);
  --radius: 14px; --ease: cubic-bezier(.2,.8,.2,1);
  --marca: "Cinzel", "Trajan Pro", Georgia, "Times New Roman", serif;
  --texto: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101311; --panel: #181c19; --panel-2: #1d221e; --text: #eceee9; --muted: #a2a99f;
    --line: #2a312c; --line-2: #39413b; --ink: #f2f3ef;
    --tierra: #a9b8ad; --arena: #c9ad86; --piedra: #7f7b6d; --nieve: #2a2e2a;
    --accent: #cfd8cf; --accent-text: #101311; --hover: #222823; --focus: color-mix(in srgb, #cfd8cf 35%, transparent);
    --err: #ff8c74; --err-bg: #3a201a; --adv: #e8b552; --adv-bg: #352a14; --info: #b3c0b8; --info-bg: #232a26;
    --ok: #7cc58f; --ok-bg: #1b2e20; --claude: #f0a07a; --claude-bg: #3a251b;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow-md: 0 14px 40px -10px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #101311; --panel: #181c19; --panel-2: #1d221e; --text: #eceee9; --muted: #a2a99f;
  --line: #2a312c; --line-2: #39413b; --ink: #f2f3ef;
  --tierra: #a9b8ad; --arena: #c9ad86; --piedra: #7f7b6d; --nieve: #2a2e2a;
  --accent: #cfd8cf; --accent-text: #101311; --hover: #222823; --focus: color-mix(in srgb, #cfd8cf 35%, transparent);
  --err: #ff8c74; --err-bg: #3a201a; --adv: #e8b552; --adv-bg: #352a14; --info: #b3c0b8; --info-bg: #232a26;
  --ok: #7cc58f; --ok-bg: #1b2e20; --claude: #f0a07a; --claude-bg: #3a251b;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow-md: 0 14px 40px -10px rgba(0,0,0,.7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--texto); background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 12.5px; }

/* ---------- estructura ---------- */
.app { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.lateral { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px;
  padding: 22px 16px; border-right: 1px solid var(--line); background: var(--panel-2); }
.marca { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; color: var(--ink);
  text-decoration: none; padding: 0 6px 16px; border-bottom: 1px solid var(--line); }
.marca svg { width: 86px; height: auto; }
.marca .nombre { font-family: var(--marca); font-size: 25px; font-weight: 600; letter-spacing: .08em; line-height: 1; }
.marca .sub { font-size: 10.5px; letter-spacing: .32em; font-weight: 600; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav button { display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 11px; border: 0; border-radius: 10px;
  background: none; text-align: left; cursor: pointer; color: var(--muted); font-weight: 500; transition: background .15s, color .15s; }
.nav button svg { width: 18px; height: 18px; flex: none; }
.nav button:hover { background: var(--hover); color: var(--text); }
.nav button[aria-current="page"] { background: var(--panel); color: var(--text); box-shadow: var(--shadow-sm);
  border: 1px solid var(--line); padding: 8px 10px; }
.recientes { display: flex; flex-direction: column; gap: 4px; min-height: 0; overflow-y: auto; border-top: 1px solid var(--line); padding-top: 12px; }
.recientes .tit { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 2px;
  font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.recientes .tit .btn { text-transform: none; letter-spacing: 0; }
.recientes ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.recientes li button { display: block; width: 100%; padding: 6px 10px; border: 0; border-radius: 8px; background: none; text-align: left;
  cursor: pointer; color: var(--text); font-size: 12.5px; line-height: 1.3; }
.recientes li button:hover { background: var(--hover); }
.recientes li button[aria-current="true"] { background: var(--panel); box-shadow: var(--shadow-sm); }
.recientes li .n { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recientes li .d { display: block; font-size: 11px; color: var(--muted); }
.recientes .nada { padding: 2px 10px; font-size: 12px; color: var(--muted); }
.lateral .pie { margin-top: auto; display: flex; flex-direction: column; gap: 10px; font-size: 12px; }
.estado-claude { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel); cursor: pointer; text-align: left; width: 100%; }
.estado-claude .punto { width: 8px; height: 8px; border-radius: 50%; background: var(--piedra); flex: none; }
.estado-claude.ok .punto { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
.tema { display: flex; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.tema button { flex: 1; border: 0; background: none; padding: 5px 0; border-radius: 7px; cursor: pointer; color: var(--muted); font-size: 12px; }
.tema button[aria-pressed="true"] { background: var(--hover); color: var(--text); font-weight: 600; }

.principal { min-width: 0; display: flex; flex-direction: column; }
.encabezado { position: relative; padding: 26px 36px 22px; border-bottom: 1px solid var(--line); background: var(--panel-2); overflow: hidden; }
.encabezado h1 { font-size: 23px; }
.encabezado p { margin: 4px 0 0; color: var(--muted); max-width: 70ch; }
.horizonte { position: absolute; right: 0; bottom: -1px; width: min(520px, 55%); height: 70px; pointer-events: none; opacity: .9; }
.horizonte path { fill: none; stroke-linejoin: round; }
.vista { padding: 26px 36px 60px; display: flex; flex-direction: column; gap: 20px; max-width: 1280px; width: 100%; }

/* ---------- componentes ---------- */
.tarjeta { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.tarjeta > .cab { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tarjeta > .cuerpo { padding: 16px 18px; }
.tarjeta h2 { font-size: 15.5px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 14px; min-height: 36px;
  border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); cursor: pointer; font-weight: 550;
  white-space: nowrap; transition: background .15s, border-color .15s, transform .1s; text-decoration: none; }
.btn:hover { background: var(--hover); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.primario { background: var(--ink); border-color: var(--ink); color: var(--panel); }
.btn.primario:hover { background: color-mix(in srgb, var(--ink) 85%, var(--panel)); }
.btn.claude { border-color: color-mix(in srgb, var(--claude) 45%, var(--line)); color: var(--claude); }
.btn.claude:hover { background: var(--claude-bg); }
.btn.chico { padding: 5px 10px; min-height: 30px; font-size: 13px; }
.btn.fantasma { border-color: transparent; background: none; }
.btn .cuenta { background: var(--err); color: #fff; border-radius: 999px; padding: 0 7px; font-size: 11.5px; line-height: 18px; }
.barra { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.barra .sep { width: 1px; height: 26px; background: var(--line); margin: 0 4px; }
.etq { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--info-bg); color: var(--info); white-space: nowrap; }
.etq.ERROR { background: var(--err-bg); color: var(--err); }
.etq.ADVERTENCIA { background: var(--adv-bg); color: var(--adv); }
.etq.ok { background: var(--ok-bg); color: var(--ok); }
.etq.claude { background: var(--claude-bg); color: var(--claude); }
.etq.suelo { background: var(--nieve); color: var(--text); font-family: var(--mono); font-weight: 600; }

input[type=text], input[type=search], input[type=date], input[type=number], select, textarea {
  width: 100%; padding: 8px 11px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--panel); }
textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
.indicaciones textarea { min-height: 52px; font-weight: 400; color: var(--text); }
.indicaciones .fila-indic { display: flex; align-items: center; gap: 10px; }
.indicaciones .entendido { font-weight: 400; flex: 1; }
.indicaciones .entendido b { color: var(--text); }
label.campo { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.grilla-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }

/* ---------- carga ---------- */
.zona-carga { position: relative; display: grid; place-items: center; text-align: center; gap: 14px; padding: 54px 24px 46px;
  border: 1.5px dashed var(--line-2); border-radius: 18px; background: var(--panel); transition: border-color .2s, background .2s; overflow: hidden; }
.zona-carga.arrastrando { border-color: var(--tierra); background: var(--hover); }
.zona-carga svg.montes { width: 150px; color: var(--ink); }
.zona-carga h2 { font-size: 19px; }
.zona-carga p { margin: 0; color: var(--muted); max-width: 52ch; }

/* ---------- resumen ---------- */
.cifras { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cifra { text-align: left; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel);
  cursor: pointer; box-shadow: var(--shadow-sm); transition: border-color .15s, transform .15s; }
.cifra:hover { border-color: var(--line-2); transform: translateY(-1px); }
.cifra[aria-pressed="true"] { border-color: var(--text); }
.cifra .n { display: block; font-size: 30px; font-weight: 650; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cifra .t { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.cifra.e .n { color: var(--err); } .cifra.a .n { color: var(--adv); } .cifra.i .n { color: var(--info); }
.meta-informe { display: flex; gap: 22px; flex-wrap: wrap; font-size: 13px; }
.meta-informe b { display: block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.aviso { display: block; padding: 11px 14px; border-radius: 11px; background: var(--adv-bg);
  color: var(--text); font-size: 13px; border: 1px solid color-mix(in srgb, var(--adv) 25%, transparent); }
.aviso.ok { background: var(--ok-bg); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }

/* ---------- filtros ---------- */
.filtros { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filtros input[type=search] { max-width: 300px; }
.filtros select { width: auto; }
.chip { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel); cursor: pointer; font-size: 13px; font-weight: 550; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--panel); }

/* ---------- muestras ---------- */
.muestra .cab h2 { font-size: 16px; }
.muestra .cab .prof { color: var(--muted); font-size: 13px; }
.pestanas { display: flex; gap: 2px; margin-left: auto; padding: 3px; background: var(--hover); border-radius: 10px; }
.pestanas button { border: 0; background: none; padding: 5px 11px; border-radius: 8px; cursor: pointer; font-size: 13px; color: var(--muted); font-weight: 550; }
.pestanas button[aria-selected="true"] { background: var(--panel); color: var(--text); box-shadow: var(--shadow-sm); }
.hallazgos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.hallazgos li { display: grid; grid-template-columns: 112px 150px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: start; }
.hallazgos li:last-child { border-bottom: 0; }
.hallazgos .ens { font-weight: 600; font-size: 13px; }
.hallazgos .ref { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.hallazgos .msg { font-size: 13.5px; }
.vacio { color: var(--muted); padding: 10px 0; display: flex; gap: 8px; align-items: center; }
.valores { width: 100%; border-collapse: collapse; font-size: 13px; }
.valores th, .valores td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); }
.valores th { font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.valores td.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); }
.graficos { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.grafico { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 8px; }
.grafico svg { width: 100%; height: auto; display: block; }

/* ---------- paneles laterales ---------- */
.velo { position: fixed; inset: 0; background: rgba(15,18,16,.35); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .2s; }
.velo.abierto { opacity: 1; pointer-events: auto; }
.cajon { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--panel); z-index: 41;
  box-shadow: var(--shadow-md); transform: translateX(105%); transition: transform .28s var(--ease); display: flex; flex-direction: column; }
.cajon.abierto { transform: none; }
.cajon > .cab { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.cajon > .cab h2 { font-size: 17px; }
.cajon > .cab .btn { margin-left: auto; }
.cajon > .cuerpo { flex: 1; overflow: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.cajon > .pie { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.correccion { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.correccion input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--tierra); }
.correccion .donde { font-weight: 600; font-size: 13.5px; }
.correccion .cambio { font-family: var(--mono); font-size: 13px; margin: 4px 0; }
.correccion .cambio del { color: var(--err); } .correccion .cambio ins { color: var(--ok); text-decoration: none; font-weight: 700; }
.correccion .por { color: var(--muted); font-size: 12.5px; }
.obs { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 5px; }
.obs .t { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-weight: 600; }
.obs dl { margin: 0; display: grid; grid-template-columns: 110px 1fr; gap: 3px 10px; font-size: 13px; }
.obs dt { color: var(--muted); }
.obs dd { margin: 0; }
.prio-alta { border-left: 4px solid var(--err); } .prio-media { border-left: 4px solid var(--adv); } .prio-baja { border-left: 4px solid var(--piedra); }

.cargando { display: flex; gap: 12px; align-items: center; color: var(--muted); padding: 18px 0; }
.giro { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--line-2); border-top-color: var(--tierra); animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
.aviso-envio { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: flex-start; }

.tostada { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); background: var(--ink); color: var(--panel);
  padding: 10px 14px 10px 16px; border-radius: 12px; display: flex; gap: 14px; align-items: center; z-index: 60;
  box-shadow: var(--shadow-md); opacity: 0; pointer-events: none; transition: opacity .2s, transform .25s var(--ease); max-width: calc(100vw - 32px); }
.tostada.visible { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.tostada button { background: none; border: 0; color: var(--arena); font-weight: 700; cursor: pointer; padding: 2px 4px; }

/* ---------- lista de informes ---------- */
#listaInformes { margin-top: 20px; }
#listaInformes .cab { flex-wrap: wrap; }
#buscarInforme { margin-left: auto; width: min(320px, 100%); }
.tabla-scroll { overflow-x: auto; }
table.informes td { vertical-align: middle; }
table.informes tbody tr { cursor: pointer; }
table.informes tbody tr:hover, table.informes tr.actual { background: var(--hover); }
table.informes .muted { font-size: 12.5px; }
table.informes .acciones { white-space: nowrap; text-align: right; }
table.informes .etq { margin: 2px 4px 2px 0; }

/* ---------- croquis ---------- */
.croquis-app { display: grid; grid-template-columns: 1fr 280px; gap: 16px; align-items: start; }
.barra-foto { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.barra-foto .muted { font-size: 12.5px; }
.barra-foto #btnQuitarFoto { margin-left: auto; }
.herramientas { display: flex; gap: 4px; flex-wrap: wrap; padding: 8px; border-bottom: 1px solid var(--line); }
.herramientas button { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; width: 66px; padding: 6px 2px; border: 1px solid transparent;
  border-radius: 9px; background: none; cursor: pointer; font-size: 11px; color: var(--muted); font-weight: 550; }
.herramientas button svg { width: 22px; height: 22px; }
.herramientas button:hover { background: var(--hover); color: var(--text); }
.herramientas button[aria-pressed="true"] { background: var(--hover); border-color: var(--line-2); color: var(--text); }
.lienzo-wrap { position: relative; background: repeating-linear-gradient(0deg, transparent 0 23px, rgba(77,86,80,.06) 23px 24px),
  repeating-linear-gradient(90deg, transparent 0 23px, rgba(77,86,80,.06) 23px 24px), #fffdf8; border-radius: 0 0 var(--radius) var(--radius); overflow: hidden; }
#lienzo { display: block; width: 100%; height: auto; touch-action: none; cursor: crosshair; user-select: none; }
#lienzo.modo-mover { cursor: default; }
.ayuda-herr { position: absolute; left: 10px; top: 10px; background: rgba(255,255,255,.92); color: #333; border: 1px solid #ddd;
  padding: 5px 10px; border-radius: 8px; font-size: 12px; pointer-events: none; }
.panel-croquis { display: flex; flex-direction: column; gap: 14px; }
.panel-croquis .tarjeta .cuerpo { display: flex; flex-direction: column; gap: 10px; }
.dudas { margin: 0; padding-left: 18px; font-size: 13px; color: var(--adv); }
input[type=range] { width: 100%; accent-color: var(--tierra); }

/* ---------- informe comitente ---------- */
.dos-col { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; align-items: start; }
.vista-previa { padding: 22px; background: #fff; color: #1b1d1b; border-radius: 10px; border: 1px solid var(--line); font-size: 12.5px; }
.vista-previa .vp-marca { display: flex; align-items: center; gap: 12px; padding-bottom: 10px; border-bottom: 1.5px solid #000; }
.vista-previa .vp-marca svg { width: 64px; }
.vista-previa .vp-marca .n { font-family: var(--marca); font-size: 20px; letter-spacing: .08em; }
.vista-previa h3 { font-family: Georgia, serif; font-weight: 400; font-size: 18px; margin: 14px 0 8px; }
.vista-previa .vp-estado { margin: 10px 0; padding: 8px 10px; background: #f4f1ea; border: 1px solid #4d5650; border-radius: 4px; }
.vista-previa .vp-estado.mal { background: #f7e4dd; border-color: #b3412e; }
.checks { display: flex; flex-direction: column; gap: 8px; }
.checks label { display: flex; gap: 9px; align-items: center; font-size: 13.5px; cursor: pointer; }
.checks input { width: 16px; height: 16px; accent-color: var(--tierra); }

.ayuda h3 { font-size: 14.5px; margin: 6px 0 6px; }
.ayuda p, .ayuda li { color: var(--text); max-width: 80ch; }
.ayuda code, .codigo { font-family: var(--mono); background: var(--hover); padding: 1px 6px; border-radius: 5px; font-size: 12.5px; }
pre.codigo { padding: 10px 12px; overflow: auto; }

@media (max-width: 1240px) { .croquis-app { grid-template-columns: 1fr; } .panel-croquis { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }

/* ---------- celulares y tablets ---------- */
@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .lateral { position: sticky; z-index: 30; height: auto; flex-direction: row; align-items: center; padding: 10px 16px; gap: 12px; overflow-x: auto; }
  .marca { flex-direction: row; align-items: center; border: 0; padding: 0; gap: 8px; }
  .marca svg { width: 40px; } .marca .nombre { font-size: 18px; } .marca .sub { display: none; }
  .nav { flex-direction: row; } .nav button span { display: none; } .nav button { width: auto; }
  .recientes { display: none; }
  .lateral .pie { margin: 0 0 0 auto; flex-direction: row; } .estado-claude span.txt { display: none; } .tema { display: none; }
  .encabezado, .vista { padding-left: 16px; padding-right: 16px; }
  .croquis-app, .dos-col { grid-template-columns: 1fr; }
  .cifras { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hallazgos li { grid-template-columns: 1fr; gap: 4px; }
  .horizonte { display: none; }
  .sesion span { display: none; }
}

/* ---------- ingreso y sesión ---------- */
.ingreso { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: var(--bg); }
.ingreso[hidden] { display: none; }
.ingreso-caja { width: min(380px, 100%); padding: 28px 24px; display: flex; flex-direction: column; gap: 10px; text-align: center; }
.ingreso-caja svg { width: 96px; margin: 0 auto 4px; color: var(--ink); }
.ingreso-caja h2 { font-family: var(--marca); font-size: 22px; margin: 0; }
.ingreso-caja p { margin: 0; }
.ingreso-caja input { font: inherit; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); color: var(--text); }
.ingreso-caja .btn { min-height: 44px; margin-top: 4px; }
.ingreso-error { color: var(--err); min-height: 1.2em; font-size: 13.5px; }
.sesion { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.sesion span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px; }
/* Con la clave de solo lectura se ve todo, pero no se carga ni se cambia nada */
body.solo-lectura .solo-oficina, body.solo-lectura #zonaCarga, body.solo-lectura #btnAuto,
body.solo-lectura .btn.claude, body.solo-lectura #btnDeshacer { display: none; }

/* ---------- impresión (PDF de revisión y del comitente) ---------- */
#impresion { display: none; }
@media print {
  @page { size: A4; margin: 16mm 16mm 18mm; }
  /* El papel siempre en colores claros, aunque la pantalla esté en modo oscuro */
  :root, :root[data-theme="dark"] {
    --bg: #fff; --panel: #fff; --panel-2: #faf8f3; --text: #1b1d1b; --muted: #676d67; --line: #e3ddd0; --line-2: #d3cbbb; --ink: #000;
    --tierra: #4d5650; --arena: #dcc3a0; --piedra: #a9a493; --nieve: #e6e2d4; --accent: #4d5650;
    --err: #b3412e; --adv: #9a6a12; --info: #56645e; --ok: #3f7a4f; --claude: #b0603c;
  }
  body.imprimiendo { background: #fff; }
  body.imprimiendo > :not(#impresion):not(svg) { display: none !important; }
  body.imprimiendo #impresion { display: block; }
}
.imp-hoja { color: #111; font: 10pt/1.45 var(--texto); }
.imp-hoja h1 { font: 600 17pt/1.2 var(--marca); margin: 6pt 0 8pt; }
.imp-hoja h2 { font-size: 12pt; color: #4d5650; margin: 14pt 0 6pt; break-after: avoid; }
.imp-hoja h3 { font-size: 11pt; margin: 8pt 0 4pt; }
.imp-hoja p { margin: 0 0 5pt; }
.imp-chico { font-size: 8pt; color: #555; }
.imp-tabla { width: 100%; border-collapse: collapse; font-size: 8pt; margin: 4pt 0 8pt; }
.imp-tabla th { background: #4d5650; color: #fff; text-align: left; padding: 3pt 5pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.imp-tabla td { border-bottom: .5pt solid #d8d2c4; padding: 3pt 5pt; vertical-align: top; }
.imp-tabla tr { break-inside: avoid; }
.imp-tabla .muted { color: #666; }
.imp-tabla .sev-ERROR { background: #f4c7c3; } .imp-tabla .sev-ADVERTENCIA { background: #fce8b2; } .imp-tabla .sev-INFO { background: #e8eaed; }
.imp-tabla td[class^="sev-"] { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.imp-muestra { break-inside: avoid-page; }
.imp-cab { display: flex; align-items: center; gap: 14pt; border-bottom: 1.2pt solid #000; padding-bottom: 8pt; margin-bottom: 10pt; }
.imp-cab svg { width: 110pt; color: #000; }
.imp-marca { font: 600 24pt/1 var(--marca); }
.imp-sub { font-size: 9pt; color: #444; letter-spacing: .08em; }
.imp-datos { border-collapse: collapse; width: 100%; margin-bottom: 10pt; }
.imp-datos th { text-align: left; color: #4d5650; width: 32%; padding: 3pt 0; border-bottom: .4pt solid #d8d2c4; }
.imp-datos td { padding: 3pt 0; border-bottom: .4pt solid #d8d2c4; }
.imp-estado { background: #f4f1ea; border: .6pt solid #4d5650; padding: 8pt 10pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.imp-estado.mal { background: #f6e3dc; border-color: #b3412e; }
.imp-estado code { font-family: var(--mono); }
.imp-salto { break-before: page; }
.imp-croquis svg, .imp-grafico svg { width: 100%; height: auto; max-height: 230mm; }
.imp-grafico { break-inside: avoid; margin: 0 0 10pt; }
.imp-grafico svg { max-height: 95mm; }
.imp-grafico figcaption { font-size: 9.5pt; margin-bottom: 3pt; }
.imp-firma { margin: 30pt 0 10pt auto; width: 60mm; text-align: center; }
