/* Gomo · app de fichaje del operario. Alto contraste, botones enormes, pensada para sol y guantes. */
:root {
  --bg: #ffffff; --fg: #0a0a0a; --muted: #3f3f46; --line: #0a0a0a;
  --brand: #b4068f; --brand-soft: #fbe6f5; --green: #15803d; --red: #b91c1c; --warn: #b45309; --soft: #f4f4f5;
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body { font: 600 18px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; min-height: 100dvh; display: flex; flex-direction: column; }
button { font: inherit; cursor: pointer; touch-action: manipulation; }
.hidden { display: none !important; }

.bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 12px 6px 4px; padding-top: max(6px, env(safe-area-inset-top)); background: #fff; border-bottom: 6px solid var(--brand); }
.brand { display: flex; align-items: center; min-width: 0; }
.brand .logo { height: 46px; width: auto; display: block; margin-left: 8px; }
.net { font-size: 14px; font-weight: 800; padding: 6px 10px; border: 2px solid var(--line); border-radius: 999px; background: #fff; white-space: nowrap; }
.net.off { background: var(--fg); color: #fff; }

main { flex: 1; display: flex; flex-direction: column; width: 100%; max-width: 560px; margin: 0 auto; padding: 16px; padding-bottom: max(16px, env(safe-area-inset-bottom)); }
.screen { display: none; flex-direction: column; gap: 16px; flex: 1; }
.screen.on { display: flex; }
h1 { font-size: 28px; line-height: 1.15; margin: 4px 0 0; font-weight: 900; }

.big, .giant, .mid { border: 3px solid var(--line); border-radius: 16px; background: #fff; color: var(--fg); font-weight: 900; letter-spacing: .02em; }
.big { min-height: 72px; font-size: 22px; width: 100%; }
.mid { min-height: 64px; font-size: 20px; flex: 1; }
.giant { min-height: 38vh; font-size: clamp(30px, 9vw, 44px); width: 100%; box-shadow: 0 8px 0 var(--line); line-height: 1.1; padding: 16px; }
.giant:active, .big:active, .mid:active { transform: translateY(4px); box-shadow: none; }
.giant.entrada, .ok { background: var(--green); color: #fff; }
.giant.salida { background: var(--red); color: #fff; }
.giant.pausa { background: #c2410c; color: #fff; }      /* comida: naranja oscuro */
.giant.reanudar { background: #1d4ed8; color: #fff; }   /* vuelta: azul */
#s-elegir .giant { min-height: 26vh; }
.big.secundario { min-height: 76px; font-size: 22px; background: #fff; border-width: 4px; }
.big.secundario.pausa { border-color: #c2410c; color: #c2410c; }
.big.secundario.salida { border-color: var(--red); color: var(--red); }
.giant:disabled, .big:disabled { opacity: .45; }
#btn-confirmar { min-height: 96px; background: var(--green); color: #fff; }
#btn-confirmar.salida { background: var(--red); }
#btn-confirmar.pausa { background: #c2410c; } #btn-confirmar.reanudar { background: #1d4ed8; }
.cancel { background: none; border: 0; font-size: 18px; text-decoration: underline; padding: 14px; color: var(--muted); margin-top: auto; }
.row { display: flex; gap: 12px; }

.saludo { font-size: 24px; margin: 0; font-weight: 900; }
.tiempo { border: 3px solid var(--line); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; background: var(--soft); }
.tiempo .lbl { font-size: 16px; color: var(--muted); }
.tiempo .t { font-size: 44px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1.1; }
.tiempo .sub { font-size: 16px; color: var(--muted); }
.alerta { border: 3px solid var(--red); background: #fee2e2; border-radius: 12px; padding: 12px; font-size: 17px; }
.pend { border: 3px dashed var(--warn); border-radius: 12px; padding: 12px; margin: 0; font-size: 17px; background: #fffbeb; }

.pasos { display: flex; gap: 8px; }
.pasos > * { flex: 1; text-align: center; padding: 6px 0; border: 2px solid var(--line); border-radius: 8px; font-style: normal; font-size: 16px; }
.pasos b { background: var(--brand); border-color: var(--brand); color: #fff; }

.dots { display: flex; justify-content: center; gap: 14px; min-height: 30px; }
.dots span { width: 24px; height: 24px; border-radius: 50%; border: 3px solid var(--line); }
.dots span.f { background: var(--fg); }
.err { color: var(--red); min-height: 1.4em; margin: 0; text-align: center; font-size: 19px; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.keypad button { min-height: 76px; font-size: 34px; font-weight: 900; border: 3px solid var(--line); border-radius: 14px; background: #fff; color: var(--fg); }
.keypad button:active { background: var(--brand-soft); }
.keypad .k-ok { background: var(--green); color: #fff; font-size: 28px; }
.keypad .k-alt { background: var(--soft); }

.lista { display: flex; flex-direction: column; gap: 12px; }
.lista button { text-align: left; padding: 16px; border: 3px solid var(--line); border-radius: 14px; background: #fff; color: var(--fg); min-height: 80px; }
.lista button b { display: block; font-size: 22px; }
.lista button small { display: block; font-size: 16px; color: var(--muted); font-weight: 600; }
.lista button.sug { background: var(--brand-soft); border-color: var(--brand); }
.lista button.sug::after { content: "Obra de tu entrada"; display: inline-block; margin-top: 6px; font-size: 14px; background: var(--brand); color: #fff; padding: 2px 8px; border-radius: 6px; }
.saludo { color: var(--brand); }

.estado { border: 3px solid var(--line); border-radius: 14px; padding: 18px; font-size: 20px; background: var(--soft); }
.estado .grande { font-size: 26px; font-weight: 900; display: block; margin-bottom: 4px; }
.estado.bien { background: #dcfce7; } .estado.mal { background: #fee2e2; border-color: var(--red); } .estado.aviso { background: #fef3c7; border-color: var(--warn); }
.ayuda { border: 3px solid var(--line); border-radius: 14px; padding: 14px 16px; font-size: 17px; font-weight: 600; background: #fff; }
.ayuda ol { margin: 6px 0 0; padding-left: 22px; } .ayuda li { margin: 4px 0; }
.ayuda p { margin: 8px 0; }
.ayuda-tit { font-size: 19px; font-weight: 900; }
.ayuda-sub { font-weight: 900; color: var(--brand); margin-top: 14px !important; font-size: 18px; }
.ayuda ol.pasos-ayuda { list-style: none; padding: 0; margin: 4px 0 8px; display: flex; flex-direction: column; gap: 10px; }
.pasos-ayuda li { display: flex; gap: 10px; align-items: flex-start; margin: 0; font-size: 17px; line-height: 1.35; }
.pasos-ayuda .n { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.ayuda code { background: var(--soft); border: 1px solid #d4d4d8; border-radius: 6px; padding: 1px 6px; font-size: 16px; overflow-wrap: anywhere; user-select: all; }
.detalle { font-size: 13px; color: var(--muted); font-weight: 500; }

/* Mi zona */
.zona-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-color: var(--brand); color: var(--brand); }
.zona-btn small { font-size: 15px; font-weight: 700; color: var(--muted); letter-spacing: 0; }
.menu-zona { display: flex; flex-direction: column; gap: 12px; }
.opcion { display: grid; grid-template-columns: 52px 1fr; grid-template-rows: auto auto; align-items: center; text-align: left; gap: 0 12px; padding: 14px; min-height: 86px; border: 3px solid var(--line); border-radius: 16px; background: #fff; color: var(--fg); position: relative; }
.opcion:active { background: var(--brand-soft); }
.opcion .ico { grid-row: 1 / 3; font-size: 36px; text-align: center; }
.opcion b { font-size: 21px; } .opcion small { font-size: 15px; color: var(--muted); font-weight: 600; }
.opcion i { position: absolute; top: -12px; right: 12px; border: 2px solid #fff; font-style: normal; font-size: 13px; font-weight: 800; background: var(--brand); color: #fff; border-radius: 999px; padding: 2px 9px; }
.opcion i:empty { display: none; }
.form-op { display: flex; flex-direction: column; gap: 12px; border: 3px solid var(--line); border-radius: 16px; padding: 14px; }
.form-op label { display: flex; flex-direction: column; gap: 4px; font-size: 17px; }
.form-op input, .form-op select, .form-op textarea, #ropa-talla-libre { font: inherit; font-size: 19px; padding: 12px; border: 2px solid var(--line); border-radius: 10px; background: #fff; color: var(--fg); min-height: 54px; width: 100%; }
.form-op textarea { min-height: 70px; resize: vertical; }
.lbl { margin: 0; font-size: 17px; } .opc { color: var(--muted); font-weight: 500; }
.fila2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.fila2 label, .fila2 input, .fila2 select { min-width: 0; }
.form-op input[type=date], .form-op input[type=time] { padding: 10px 8px; font-size: 17px; }
.check-sm { flex-direction: row !important; align-items: center; gap: 10px !important; }
.check-sm input { width: 28px; height: 28px; min-height: 0; accent-color: var(--brand); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { font: inherit; font-size: 17px; font-weight: 800; padding: 12px 14px; min-height: 54px; border: 2px solid var(--line); border-radius: 12px; background: #fff; color: var(--fg); }
.chips button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.chips.tallas button { min-width: 64px; }
h2.sub { font-size: 20px; margin: 8px 0 0; }
.lista-est { display: flex; flex-direction: column; gap: 10px; }
.item { border: 2px solid #d4d4d8; border-radius: 12px; padding: 12px; font-size: 16px; font-weight: 600; display: flex; flex-direction: column; gap: 4px; }
.item-h { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; font-size: 17px; }
.item .muted { color: var(--muted); font-weight: 500; }
.item .resp { background: var(--brand-soft); border-radius: 8px; padding: 6px 8px; }
.item.doc .mid { margin-top: 6px; min-height: 56px; }
.mini { align-self: flex-start; margin-top: 4px; border: 2px solid var(--line); border-radius: 10px; background: #fff; padding: 8px 12px; font-weight: 800; }
.ok-txt { color: var(--green); }
.obra-docs { gap: 8px; }
.doc-fila { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid #e4e4e7; padding-top: 8px; }
.doc-fila .mid { min-height: 56px; }
.spin { display: inline-block; width: 22px; height: 22px; border: 4px solid var(--line); border-right-color: transparent; border-radius: 50%; animation: s 1s linear infinite; vertical-align: -4px; margin-right: 8px; }
@keyframes s { to { transform: rotate(360deg); } }

.camara { position: relative; border: 3px solid var(--line); border-radius: 16px; overflow: hidden; aspect-ratio: 1; background: #000; }
.camara video, .camara img { width: 100%; height: 100%; object-fit: cover; display: block; }
.camara video { transform: scaleX(-1); }

.resumen { display: flex; gap: 14px; align-items: flex-start; }
.resumen img { width: 108px; height: 108px; object-fit: cover; border: 3px solid var(--line); border-radius: 12px; flex: none; }
.resumen dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; font-size: 17px; min-width: 0; }
.resumen dt { color: var(--muted); font-weight: 600; } .resumen dd { margin: 0; font-weight: 800; overflow-wrap: anywhere; }
.mapa { height: 190px; border: 3px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--soft); display: flex; align-items: center; justify-content: center; text-align: center; font-size: 16px; padding: 0; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 15px; font-weight: 800; border: 2px solid var(--line); }
.tag.mal { background: #fee2e2; } .tag.bien { background: #dcfce7; } .tag.aviso { background: #fef3c7; }

.hecho { width: 140px; height: 140px; margin: 24px auto 0; border-radius: 50%; background: var(--green); color: #fff; font-size: 90px; display: flex; align-items: center; justify-content: center; border: 4px solid var(--line); }
.hecho.cola { background: var(--warn); font-size: 70px; }
#s-hecho h1 { text-align: center; }
.hecho-txt { text-align: center; font-size: 20px; margin: 0; }

.legal { border: 3px solid var(--line); border-radius: 14px; padding: 4px 16px; font-weight: 500; font-size: 16px; background: var(--soft); }
.legal ul { padding-left: 20px; }
.check { display: flex; gap: 12px; align-items: center; font-size: 20px; padding: 12px; border: 3px solid var(--line); border-radius: 14px; }
.check input { width: 32px; height: 32px; accent-color: var(--green); }

.totales { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.totales div { border: 3px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.totales small { display: block; color: var(--muted); font-size: 15px; } .totales b { font-size: 26px; }
.dia { border-bottom: 2px solid #d4d4d8; padding: 12px 0; }
.dia h3 { margin: 0 0 6px; font-size: 18px; display: flex; justify-content: space-between; }
.tramo { font-size: 16px; font-weight: 600; color: var(--fg); margin: 2px 0; }
