/* Campo Mapiia — para usar de pie, al sol, con una mano. Botones grandes, texto
   grande, contraste alto. Una decisión por pantalla. */

:root { --tap: 58px; }

#app { min-height: 100dvh; }
.screen { display: flex; flex-direction: column; min-height: 100dvh; }

/* --- cabecera --- */
.cabecera {
  align-items: center; background: var(--ink); color: #fffdf8; display: flex;
  gap: 10px; justify-content: space-between; padding: 12px 16px calc(12px + env(safe-area-inset-top));
  flex-shrink: 0;
}
.cabecera .titulo { font-family: var(--display); font-size: 19px; }
.cabecera .volver { background: rgba(255,255,255,.16); border: 0; border-radius: 10px; color: #fff; font-size: 18px; height: 40px; width: 40px; }
.sync-pill { background: var(--gold); border-radius: 999px; color: #4a3208; font-size: 12px; font-weight: 800; padding: 5px 10px; }
.sync-pill.ok { background: #cfe6d7; color: #2f5b41; }

/* --- contenido con scroll --- */
.contenido { flex: 1; overflow-y: auto; padding: 18px 16px 28px; }
.contenido h1 { font-family: var(--display); font-size: 27px; font-weight: 400; letter-spacing: -.03em; margin: 4px 0 6px; }
.contenido .sub { color: var(--ink-soft); font-size: 14px; line-height: 1.5; margin: 0 0 18px; }

.boton-grande {
  align-items: center; background: var(--ink); border: 0; border-radius: 16px; color: #fffdf8;
  display: flex; font-size: 17px; font-weight: 800; gap: 10px; justify-content: center;
  min-height: var(--tap); padding: 16px; width: 100%;
}
.boton-grande.claro { background: var(--card); border: 2px solid var(--ink); color: var(--ink); }
.boton-grande.verde { background: #3f7655; }
.boton-grande:disabled { opacity: .5; }
.boton-grande + .boton-grande { margin-top: 12px; }

/* --- tarjeta de predio --- */
.predio-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; margin-bottom: 12px; padding: 16px;
}
.predio-card h3 { font-size: 17px; margin: 0 0 4px; }
.predio-card .datos { color: var(--ink-soft); font-size: 13px; }
.predio-card .estado { border-radius: 999px; display: inline-block; font-size: 11px; font-weight: 800; margin-top: 8px; padding: 4px 9px; text-transform: uppercase; }
.estado.draft { background: #eee; color: #666; }
.estado.submitted { background: #fbedc8; color: #87601b; }
.estado.approved { background: #dfeee3; color: #3f7655; }
.estado.returned { background: #fae0d8; color: #9e3f36; }

/* --- descarga --- */
.progreso { background: var(--paper); border-radius: 999px; height: 14px; margin: 14px 0 6px; overflow: hidden; }
.progreso i { background: #3f7655; border-radius: inherit; display: block; height: 100%; transition: width .2s; }
.listo-campo { align-items: center; background: #dfeee3; border-radius: 14px; color: #2f5b41; display: flex; font-weight: 800; gap: 10px; margin: 14px 0; padding: 14px 16px; }

/* --- pantalla de captura: mapa + panel inferior --- */
.captura { display: flex; flex-direction: column; height: 100dvh; }
.captura .mapa-wrap { flex: 1; position: relative; }
#map { inset: 0; position: absolute; }
.captura .hud-top {
  background: rgba(16,42,45,.92); border-radius: 12px; color: #fffdf8; left: 12px; padding: 8px 12px;
  position: absolute; right: 12px; top: 12px; z-index: 10; display: flex; justify-content: space-between; font-size: 13px;
}
.captura .hud-top b { font-size: 16px; }
.gps-chip { align-items: center; display: flex; font-weight: 800; gap: 6px; }
.gps-dot { border-radius: 50%; height: 10px; width: 10px; }
.gps-dot.bien { background: #6ee7a0; } .gps-dot.regular { background: #f5c451; } .gps-dot.malo { background: #f08a7a; }

.panel-captura { background: var(--card); border-top: 1px solid var(--line); flex-shrink: 0; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); }
.modo-toggle { display: flex; gap: 0; margin-bottom: 12px; }
.modo-toggle button { background: var(--paper); border: 1px solid var(--line); color: var(--ink-soft); flex: 1; font-size: 14px; font-weight: 800; padding: 12px; }
.modo-toggle button:first-child { border-radius: 12px 0 0 12px; }
.modo-toggle button:last-child { border-radius: 0 12px 12px 0; border-left: 0; }
.modo-toggle button[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: #fffdf8; }

.medidas { display: flex; gap: 12px; margin-bottom: 12px; }
.medida { background: var(--paper); border-radius: 12px; flex: 1; padding: 10px 12px; text-align: center; }
.medida span { color: var(--ink-soft); display: block; font-size: 11px; }
.medida b { font-family: var(--display); font-size: 21px; font-weight: 400; }

.acciones-captura { display: flex; gap: 10px; }
.acciones-captura button { border-radius: 12px; flex: 1; font-size: 15px; font-weight: 800; min-height: 52px; padding: 12px; }
.btn-marcar { background: #3f7655; border: 0; color: #fff; flex: 2 !important; }
.btn-deshacer { background: var(--paper); border: 1px solid var(--line); color: var(--ink); }
.btn-cerrar { background: var(--ink); border: 0; color: #fff; }

.aviso { background: #fbedc8; border-radius: 10px; color: #6d4d10; font-size: 13px; margin-top: 10px; padding: 10px 12px; }

/* marcador de vértice */
.vertice { background: var(--gold); border: 2px solid #fff; border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,.4); height: 16px; width: 16px; }
.vertice.activo { background: var(--coral); }

/* --- ficha PDF (vista previa) --- */
.pdf-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.tabla { border-collapse: collapse; font-size: 12px; margin-top: 10px; width: 100%; }
.tabla th, .tabla td { border-bottom: 1px solid var(--line); padding: 7px 6px; text-align: right; }
.tabla th:first-child, .tabla td:first-child { text-align: left; }
