/* Campo — luvas, sol, offline. Touch ≥56px. */
:root {
  --c-ink: #0e1210;
  --c-muted: #6b756f;
  --c-bg: #121614;
  --c-card: #1c221f;
  --c-line: #2e3833;
  --c-ok: #2ecc71;
  --c-accent: #3dd68c;
  --c-warn: #e6b84d;
  --c-fab: #f5f7f5;
  --c-fab-ink: #0e1210;
  --c-font: system-ui, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body.campo {
  font-family: var(--c-font);
  background: var(--c-bg);
  color: #eef2ef;
  min-height: 100%;
  min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  touch-action: manipulation;
}
.campo a { color: var(--c-accent); }
.campo-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  background: var(--c-card);
  border-bottom: 1px solid var(--c-line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.campo-brand {
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: #fff;
  font-size: 1.25rem;
  min-height: 52px;
  min-width: 120px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.75rem;
}
.campo-timer {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 1.15rem;
  min-width: 4.5rem;
  text-align: right;
}
.campo-timer.is-run { color: var(--c-warn); }
.campo-timer.is-ok { color: var(--c-ok); }
.campo-timer.is-fail { color: #e74c3c; }
.campo-chips {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0.55rem 0.75rem;
  -webkit-overflow-scrolling: touch;
}
.campo-chip {
  flex: 0 0 auto;
  min-height: 52px;
  min-width: 72px;
  padding: 0.55rem 0.9rem;
  border-radius: 12px;
  border: 2px solid var(--c-line);
  background: var(--c-card);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
}
.campo-chip.is-on {
  border-color: var(--c-accent);
  background: #1a3d2e;
}
.campo-stage {
  position: relative;
  margin: 0 0.5rem;
  border: 2px solid var(--c-line);
  border-radius: 12px;
  overflow: hidden;
  background: #0a0c0b;
  height: min(62vh, 520px);
  touch-action: none;
}
.campo-stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.campo-pins {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.campo-pin {
  position: absolute;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: var(--c-accent);
  box-shadow: 0 0 0 2px rgba(0,0,0,0.45);
  pointer-events: auto;
  padding: 0;
  cursor: pointer;
}
.campo-stage.is-placing .campo-pin {
  pointer-events: none;
}
.campo-hint {
  text-align: center;
  padding: 0.65rem 1rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: #d7ddd9;
  min-height: 2.6rem;
}
.campo-hint.is-place {
  color: var(--c-warn);
  animation: pulse 1.1s ease-in-out infinite;
}
@keyframes pulse {
  50% { opacity: 0.55; }
}
.campo-bar {
  display: grid;
  grid-template-columns: 1fr 1.35fr 1fr;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem 1.1rem;
  position: sticky;
  bottom: 0;
  background: linear-gradient(transparent, var(--c-bg) 28%);
}
.campo-btn {
  min-height: 64px;
  border: none;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}
.campo-btn:disabled { opacity: 0.35; }
.campo-btn-cam {
  background: var(--c-fab);
  color: var(--c-fab-ink);
  grid-column: 2;
}
.campo-btn-sec {
  background: var(--c-card);
  color: #fff;
  border: 2px solid var(--c-line);
}
.campo-btn-ok {
  background: var(--c-ok);
  color: #062014;
}
.campo-flash {
  position: fixed;
  inset: 0;
  background: rgba(12, 18, 14, 0.88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  z-index: 50;
  padding: 1.5rem;
  text-align: center;
}
.campo-flash[hidden] { display: none !important; }
.campo-flash strong { font-size: 2rem; color: var(--c-ok); }
.campo-flash .secs { font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.campo-legal {
  margin: 0;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  line-height: 1.4;
  font-weight: 700;
  color: #ffffff;
  background: #050807;
  border-bottom: 3px solid var(--c-accent);
  text-align: center;
}
.campo-persist {
  margin: 0;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffe9a8;
  background: #3d3210;
  text-align: center;
}
.campo-obra {
  margin: 0;
  padding: 0.45rem 0.85rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--c-accent);
  background: #152019;
  border-bottom: 1px solid var(--c-line);
}
.campo-top-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.campo-top-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: #c5cec9;
}
.campo-sync {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.45rem;
  border-radius: 8px;
  background: #2a322e;
  color: #c5cec9;
}
.campo-sync.is-pending { background: #5a4a12; color: #ffe9a8; }
.campo-sync.is-ok { background: #1a3d2e; color: #9fecc0; }
.campo-nav-planta {
  min-height: 56px !important;
  min-width: 96px;
  padding: 0 1rem !important;
  line-height: 56px !important;
  text-decoration: none;
  font-size: 1rem !important;
  display: inline-block;
  text-align: center;
}
.campo-detail {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  max-height: 70vh;
  overflow: auto;
  background: var(--c-card);
  border-top: 3px solid var(--c-accent);
  border-radius: 16px 16px 0 0;
  padding: 0.75rem 1rem 1.5rem;
}
.campo-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}
.campo-detail-head .campo-btn {
  min-height: 48px;
  padding: 0 1rem;
}
.campo-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--c-line);
  font-size: 0.95rem;
}
.campo-detail-row strong { color: #9aa59e; font-weight: 600; }
.campo-detail-photo {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  margin-top: 0.75rem;
  border-radius: 12px;
  background: #000;
}
.obra-label {
  display: block;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #9aa59e;
  font-weight: 600;
}
.obra-label input {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  min-height: 52px;
  border-radius: 12px;
  border: 2px solid #2e3833;
  background: #1c221f;
  color: #fff;
  font-size: 1.05rem;
  padding: 0 0.75rem;
}
.obra-status { font-weight: 700; }
.campo-empty {
  padding: 2rem 1.25rem;
  text-align: center;
}
.campo-empty .campo-btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0 1.25rem;
  line-height: 64px;
  text-decoration: none;
}
.obra-wrap {
  max-width: 520px;
  margin: 0 auto;
  padding: 1rem 1rem 3rem;
}
.obra-wrap h1 {
  font-size: 1.45rem;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}
.obra-wrap p { color: #b6c0ba; font-size: 0.95rem; }
.obra-drop {
  margin: 1rem 0;
  padding: 1.5rem 1rem;
  border: 3px dashed var(--c-line);
  border-radius: 16px;
  text-align: center;
  background: var(--c-card);
}
.obra-drop input[type="file"] {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  font-size: 1rem;
}
.obra-list {
  list-style: none;
  margin: 1rem 0;
  padding: 0;
}
.obra-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem;
  background: var(--c-card);
  border: 1px solid var(--c-line);
  border-radius: 12px;
  margin-bottom: 0.5rem;
}
.obra-list img {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
  background: #000;
}
.obra-list input {
  flex: 1;
  min-height: 48px;
  font-size: 1rem;
  border-radius: 10px;
  border: 2px solid var(--c-line);
  background: #0a0c0b;
  color: #fff;
  padding: 0 0.65rem;
}
.obra-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 1.25rem;
}
.obra-actions .campo-btn { width: 100%; }
.campo-who {
  display: flex;
  gap: 0.45rem;
  padding: 0 0.75rem 0.35rem;
}
.campo-who input {
  flex: 1;
  min-height: 48px;
  border-radius: 10px;
  border: 2px solid var(--c-line);
  background: var(--c-card);
  color: #fff;
  font-size: 1rem;
  padding: 0 0.75rem;
}
.preview-thumb {
  position: absolute;
  left: 0.5rem;
  bottom: 0.5rem;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  border: 3px solid #fff;
  object-fit: cover;
  z-index: 5;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}
