/* operario.css — web del operario (móvil-first). Targets grandes (dedo),
   máx 2 botones por fila, alto contraste. Misma identidad que la firma. */

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --azul: #0a2540;
  --azul2: #14457a;
  --verde: #1f9d57;
  --naranja: #d98326;
  --gris: #e6e9ef;
  --gris-borde: #c4ccd8;
  --texto: #16202e;
  --rojo: #c0392b;
  --bg: #f5f7fa;
}

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--texto);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: none;
}

.pantalla {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 14px 14px calc(18px + env(safe-area-inset-bottom));
  gap: 12px;
}

.cabecera { text-align: center; }
.cabecera h1 { font-size: 20px; margin: 0 0 2px; color: var(--azul); }
.cabecera .sub { font-size: 13px; opacity: .7; margin: 0; }

.contexto {
  background: #fff;
  border: 1px solid var(--gris-borde);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.45;
}
.contexto .cli { font-weight: 700; font-size: 16px; color: var(--azul); }
.contexto .et { opacity: .6; font-size: 12px; }
.contexto .danos { margin-top: 6px; }
.pill {
  display: inline-block; font-size: 12px; font-weight: 700;
  background: var(--gris); color: var(--azul2);
  border-radius: 999px; padding: 3px 10px; margin-top: 6px;
}

.estado {
  text-align: center; font-size: 14px; min-height: 18px; font-weight: 600;
}
.estado.ok { color: var(--verde); }
.estado.err { color: var(--rojo); }

.scr { display: flex; flex-direction: column; gap: 12px; }

.acciones { display: flex; flex-direction: column; gap: 10px; }
.fila { display: flex; gap: 10px; }
.fila > button { flex: 1; }

button {
  font: inherit; font-size: 16px; font-weight: 600;
  border: none; border-radius: 12px; padding: 15px 12px;
  min-height: 52px; cursor: pointer;
  transition: opacity .12s, transform .05s;
}
button:active { transform: scale(.985); }
button:disabled { opacity: .4; cursor: not-allowed; }

.btn-conf { background: var(--verde); color: #fff; font-size: 18px; }
.btn-no   { background: var(--rojo);  color: #fff; font-size: 18px; }
.btn-sec  { background: var(--gris);  color: var(--texto); }
.btn-sec.rojo { color: var(--rojo); }
.big { min-height: 66px; }

/* bloques de la rama SÍ */
.bloque {
  background: #fff; border: 1px solid var(--gris-borde);
  border-radius: 12px; padding: 12px;
}
.bloque-tit { font-size: 14px; font-weight: 700; color: var(--azul); margin-bottom: 8px; }
.badge { font-size: 12px; font-weight: 700; color: var(--verde); margin-left: 6px; }

textarea {
  width: 100%; font: inherit; font-size: 16px; border: 1px solid var(--gris-borde);
  border-radius: 10px; padding: 10px; resize: vertical; min-height: 64px;
  background: #fff; color: var(--texto);
}

.foto-btn::before { content: "📷 "; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.thumbs:empty { display: none; }
.thumb {
  position: relative; width: 72px; height: 72px; border-radius: 10px;
  overflow: hidden; border: 1px solid var(--gris-borde); background: #fff;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.subiendo { display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--azul2); }

/* rama NO: lista de opciones togglables */
.opciones { display: flex; flex-direction: column; gap: 8px; }
.opt {
  background: #fff; border: 1.5px solid var(--gris-borde); border-radius: 12px;
  overflow: hidden;
}
.opt.on { border-color: var(--verde); box-shadow: 0 0 0 1px var(--verde) inset; }
.opt-head {
  width: 100%; text-align: left; background: transparent; color: var(--texto);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-radius: 0; min-height: 54px;
}
.opt .check {
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--gris-borde);
  flex: 0 0 auto; display: inline-block;
}
.opt.on .check { background: var(--verde); border-color: var(--verde);
  position: relative; }
.opt.on .check::after {
  content: "✓"; color: #fff; position: absolute; inset: 0; text-align: center;
  line-height: 20px; font-size: 15px; font-weight: 800;
}
.opt-sub { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 8px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--gris); color: var(--azul2); border-radius: 999px;
  padding: 9px 14px; min-height: 0; font-size: 15px; font-weight: 700;
}
.chip.sel { background: var(--azul2); color: #fff; }

select {
  font: inherit; font-size: 16px; border: 1px solid var(--gris-borde);
  border-radius: 10px; padding: 11px; background: #fff; color: var(--texto);
}

/* zona de firma (reutiliza el pad) */
.zona-firma {
  position: relative; height: 46vh; min-height: 220px; background: #fff;
  border: 2px dashed var(--gris-borde); border-radius: 14px; overflow: hidden;
}
#lienzo { position: absolute; inset: 0; width: 100%; height: 100%;
  touch-action: none; cursor: crosshair; }
.guia { position: absolute; left: 16px; right: 16px; bottom: 26%;
  border-top: 1px solid var(--gris-borde); pointer-events: none; }
.guia::after { content: "Firme aquí con el dedo"; position: absolute;
  left: 0; top: 8px; font-size: 13px; color: var(--gris-borde); }
.firmando .guia { display: none; }

.done-card {
  background: #fff; border: 1px solid var(--gris-borde); border-radius: 14px;
  padding: 26px 18px; text-align: center; font-size: 17px; line-height: 1.5;
}
.done-card .big-emoji { font-size: 46px; display: block; margin-bottom: 8px; }

.oculto { display: none !important; }
