/* ==========================================================================
   AlphaVISTO — aplicativo do vistoriador (PWA)
   Tema verde escuro: header arredondado, cartões suaves, botões pill.
   ========================================================================== */

:root {
  --m-brand: #003f40;      /* verde escuro — 15% */
  --m-brand-2: #005d59;    /* verde médio  — 15% */
  --m-brand-3: #00312f;
  --m-accent: #005d59;
  --m-accent-2: #004b48;
  --m-accent-soft: #e3efed;
  --m-amber: #f59e0b;      /* âmbar — 10% (pendências, avisos) */
  --m-amber-ink: #4a2c00;
  --m-amber-soft: #fef3c7;
  --m-bg: #f2f4f4;
  --m-card: #ffffff;
  --m-ink: #0e1b18;
  --m-muted: #6b7b77;
  --m-line: #e4eae8;
  --m-danger: #dc2626;
  --m-purple: #6d28d9;
  --m-purple-soft: #ede9fe;
  --m-ok: #005d59;
  --m-ok-soft: #d9f2e6;
  --m-r-card: 14px;
  --m-r-btn: 10px;
  --m-shadow: 0 1px 2px rgba(14, 27, 24, 0.04), 0 6px 18px rgba(14, 27, 24, 0.05);
}

body:has(.m-app) {
  background: var(--m-bg);
}

.m-app {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100dvh;
  max-width: 520px;
  margin: 0 auto;
  background: var(--m-bg);
  position: relative;
  padding-bottom: 84px;
}

/* ── Header ──────────────────────────────────────────────────────────── */
.m-header.is-tall { padding-top: 34px; padding-bottom: 70px; }
/* mesma altura do header da home, mas sem os cartões sobrepostos */
.m-header.is-tall.is-tabs { padding-bottom: 21px; }

.m-header {
  min-height: 149px;
  box-sizing: border-box;
  background-color: var(--m-brand);
  background-image:
    linear-gradient(180deg, rgba(0, 63, 64, 0.52), rgba(0, 63, 64, 0.42) 55%, rgba(0, 55, 56, 0.62)),
    url('/img/campo/header-bg.webp');
  background-size: cover, cover;
  background-position: center, center 32%;
  background-repeat: no-repeat, no-repeat;
  color: #fff;
  padding: 18px 16px 0;
  border-radius: 0 0 20px 20px;
  box-shadow: 0 8px 24px rgba(11, 61, 52, 0.18);
}
@media (min-resolution: 2dppx) {
  .m-header {
    background-image:
      linear-gradient(180deg, rgba(0, 63, 64, 0.52), rgba(0, 63, 64, 0.42) 55%, rgba(0, 55, 56, 0.62)),
      url('/img/campo/header-bg@2x.webp');
  }
}
.m-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
}
.m-header-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.m-header-left .m-header-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-header-row.is-center {
  position: relative;
  justify-content: center;
  text-align: center;
}
.m-header-row.is-center > div { flex: 1; }
.m-header-row.is-center .m-header-action {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}
.m-header-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.m-header-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
  margin-top: 2px;
}
.m-header-action {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 0;
  text-decoration: none;
  flex-shrink: 0;
}
.m-header-action:hover { background: rgba(255, 255, 255, 0.2); }
.m-header-back {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  flex-shrink: 0;
  margin-left: -6px;
}
.m-header-back:hover { background: rgba(255, 255, 255, 0.12); }

/* avatar + saudação */
.m-header-user {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.m-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
  color: var(--m-brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  overflow: hidden;
}
.m-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* abas dentro do header */
.m-tabs {
  display: flex;
  gap: 22px;
  margin-top: 14px;
  align-items: flex-end;
}
.m-tabs.is-split { justify-content: space-between; }
.m-tabs.is-split .m-tab { padding-bottom: 12px; }
.m-tab {
  position: relative;
  padding: 8px 0 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--m-muted);
  text-decoration: none;
  border: 0;
  background: none;
}
.m-tab.is-active { color: #fff; }
.m-tab.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 3px;
  border-radius: 3px;
  background: #fff;
}
.m-tab .m-tab-count {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 11px;
  font-weight: 700;
}

/* ── Corpo ───────────────────────────────────────────────────────────── */
.m-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.m-body.is-overlap > .m-btn-block { margin-top: 20px; }
.m-body.is-overlap > .m-sect-head { margin-top: 20px; }
.m-body.is-overlap {
  position: relative;
  z-index: 6;
  margin-top: -40px;
  padding-top: 0;
}
.m-body.tight { padding: 12px 16px; gap: 10px; }
.m-sect-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 6px 2px 2px;
}
.m-sect-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--m-muted);
  margin: 8px 2px 2px;
}
.m-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--m-accent);
  text-decoration: none;
  background: none;
  border: 0;
  cursor: pointer;
}

.m-sect-h {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--m-ink);
  letter-spacing: 0;
  text-transform: none;
  margin: 0;
}

/* ── KPIs ────────────────────────────────────────────────────────────── */
.m-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.m-kpi {
  background: var(--m-card);
  border-radius: 32px;
  padding: 16px 10px 14px;
  min-height: 112px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-align: center;
  box-shadow: var(--m-shadow);
}
.m-kpi-num { font-size: 30px; font-weight: 800; line-height: 1.1; color: var(--m-ink); margin-top: 2px; }
.m-kpi.is-hoje .m-kpi-num { color: var(--m-brand-2); }
.m-kpi.is-pendente .m-kpi-num { color: var(--m-amber); }
.m-kpi.is-concluida .m-kpi-num { color: var(--m-accent); }
.m-header-action.is-plain { background: transparent; }
.m-header-action.is-plain:hover { background: rgba(255, 255, 255, 0.14); }
.m-kpi-lbl { font-size: 11.5px; color: var(--m-muted); font-weight: 600; }

/* faixa de pendências (âmbar) */
.m-alerta-pend {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--m-amber);
  color: #3d2400;
  border-radius: 14px;
  padding: 26px 14px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 18px rgba(245, 158, 11, 0.25);
  text-decoration: none;
}
.m-alerta-pend .ico { width: 18px; height: 18px; flex-shrink: 0; }
.m-alerta-pend b { font-weight: 800; }
.m-alerta-pend .m-alerta-pend-seta { margin-left: auto; font-weight: 800; }

/* selo de status âmbar nos cartões */
.m-chip.is-pend { background: var(--m-amber); color: #3d2400; }


/* ── Cartões ─────────────────────────────────────────────────────────── */
.m-card {
  background: var(--m-card);
  border-radius: var(--m-r-card);
  padding: 15px;
  box-shadow: var(--m-shadow);
  display: flex;
  align-items: center;
  gap: 12px;
}
.m-card.is-stack { flex-direction: column; align-items: stretch; gap: 10px; }
.m-card-ico {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--m-accent-soft);
  color: var(--m-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.m-card-ico .ico { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.m-card-main { flex: 1; min-width: 0; }
.m-card-name { font-size: 15px; font-weight: 700; color: var(--m-ink); line-height: 1.25; }
.m-card-when { font-size: 12.5px; color: var(--m-muted); margin-top: 3px; }
.m-card-code {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--m-muted);
  margin-top: 4px;
  background: #f4f7f6;
  border-radius: 999px;
  padding: 2px 8px;
}
.m-card-code .ico { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; }
.m-card-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; min-width: 96px; }
.m-card-actions .m-btn { padding: 0 14px; height: 32px; font-size: 12px; border-radius: 8px; }

/* ── Botões ──────────────────────────────────────────────────────────── */
.m-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 40px;
  padding: 0 18px;
  border-radius: var(--m-r-btn);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.m-btn .ico { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.9; }
.m-btn-primary { background: var(--m-accent); color: #fff; }
.m-btn-primary:hover { background: var(--m-accent-2); }
.m-btn-soft { background: var(--m-accent-soft); color: var(--m-accent-2); }
.m-btn-soft:hover { background: #d7ebe3; }
.m-btn-outline { background: #fff; color: var(--m-accent-2); border-color: #cfe3dc; }
.m-btn-outline:hover { background: #f4faf8; }
.m-btn-ghost { background: #f1f4f3; color: var(--m-ink); }
.m-btn-danger { background: #fff; color: var(--m-danger); border-color: #f3c9c9; }
.m-btn-block { width: 100%; }
.m-btn:disabled { opacity: 0.55; cursor: default; }

/* FAB circular */
.m-fab {
  position: fixed;
  right: calc(50% - 244px);
  bottom: 104px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 0;
  background: var(--m-accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 22px rgba(15, 122, 99, 0.35);
  cursor: pointer;
  z-index: 30;
}
@media (max-width: 560px) { .m-fab { right: 18px; } }
.m-fab:disabled { opacity: 0.5; }

.m-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 62px;
  padding: 12px 16px;
  background: linear-gradient(to top, rgba(242, 244, 244, 0.98) 60%, rgba(242, 244, 244, 0));
  z-index: 25;
}
.m-footer .m-btn { width: 100%; height: 46px; font-size: 14.5px; }
@media (min-width: 561px) {
  .m-footer { left: 50%; right: auto; width: 520px; transform: translateX(-50%); }
}

/* ── Chips / badges ──────────────────────────────────────────────────── */
.m-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.m-chip.is-ok { background: var(--m-ok-soft); color: var(--m-accent-2); }
.m-chip.is-info { background: var(--m-purple-soft); color: var(--m-purple); }
.m-chip.is-warn { background: #fef3c7; color: #92400e; }
.m-chip.is-muted { background: #eef1f0; color: var(--m-muted); }

/* ── Lista de opções (acessórios, serviços) ──────────────────────────── */
.m-list, .m-list-row, .m-btn, .m-fab, .m-key, .m-photo, .m-chip-opt, .m-icobtn, .m-check-round { box-sizing: border-box; }
.m-list { background: var(--m-card); border-radius: var(--m-r-card); box-shadow: var(--m-shadow); overflow: hidden; }
.m-list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--m-line);
  background: var(--m-card);
  text-decoration: none;
  color: var(--m-ink);
}
.m-list-row:last-child { border-bottom: 0; }
.m-list-row .m-row-ico {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--m-accent-soft);
  color: var(--m-accent-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.m-list-row .m-row-ico .ico { width: 16px; height: 16px; }
.m-list-row .m-row-main { flex: 1; min-width: 0; }
.m-list-row .m-row-title { font-size: 13.5px; font-weight: 600; }
.m-list-row .m-row-sub { font-size: 11.5px; color: var(--m-muted); margin-top: 1px; }
.m-list-row .m-row-value { font-size: 13px; color: var(--m-muted); text-align: right; }

/* checkbox de acessório */
.m-check-round {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1.6px solid #cfd8d5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #fff;
  transition: all 0.12s;
}
.m-check-round.on { background: var(--m-accent); border-color: var(--m-accent); color: #fff; }
.m-check-round .ico { width: 14px; height: 14px; }

/* ── Barra offline / download ────────────────────────────────────────── */
.m-download-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: var(--m-card);
  border-radius: var(--m-r-card);
  box-shadow: var(--m-shadow);
  font-size: 12px;
  color: var(--m-muted);
}
.m-download-bar > span { display: inline-flex; align-items: center; gap: 6px; }
.m-sync {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px;
  font-size: 11.5px;
}
.m-sync.is-offline { background: #7f1d1d; color: #fee2e2; }
.m-sync.is-online { background: #fef3c7; color: #78350f; }
.m-sync-txt { display: inline-flex; align-items: center; gap: 6px; }
.m-sync-btn {
  background: var(--m-brand);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}
.m-sync-btn:disabled { opacity: 0.6; }
.m-offline-note {
  margin: 10px 16px 0;
  padding: 9px 12px;
  border-radius: 10px;
  background: #fef3c7;
  color: #78350f;
  font-size: 12px;
}
.m-offline-card { display: flex; flex-direction: column; }
.m-card-offline { display: flex; justify-content: flex-end; padding: 0 14px 12px; margin-top: -4px; }
.m-offline-wrap { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.m-offline-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 12px;
  background: #fff;
  color: var(--m-accent-2);
  border: 1px solid #cfe3dc;
  border-radius: var(--m-r-btn);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
.m-offline-btn.is-done { background: var(--m-ok-soft); border-color: #b8e3cf; color: var(--m-accent-2); }
.m-offline-msg { font-size: 10px; color: var(--m-muted); max-width: 190px; text-align: right; }

/* ── Propriedades / detalhes ─────────────────────────────────────────── */
.m-prop {
  background: var(--m-card);
  border-radius: var(--m-r-card);
  padding: 14px;
  box-shadow: var(--m-shadow);
}
.m-prop + .m-prop { margin-top: 12px; }
.m-prop-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--m-muted); }
.m-prop-name { font-size: 17px; font-weight: 700; margin-top: 2px; }
.m-prop-sub { font-size: 12px; color: var(--m-muted); margin-top: 3px; }
.m-rows { background: var(--m-card); border-radius: var(--m-r-card); box-shadow: var(--m-shadow); overflow: hidden; }
.m-rows .m-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--m-line);
  font-size: 13px;
}
.m-rows .m-row:last-child { border-bottom: 0; }
.m-rows .m-row .rot { color: var(--m-muted); }
.m-rows .m-row .val { font-weight: 600; color: var(--m-ink); text-align: right; }

.m-alert {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--m-r-card);
  background: var(--m-accent-soft);
  color: #0b4a3e;
  font-size: 12px;
  line-height: 1.45;
}
.m-alert .ico { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }

/* ── Fotos / câmera ──────────────────────────────────────────────────── */
.m-photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.m-photo-wrap { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.m-photo {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  border: 1.5px dashed #cfd8d5;
  background: #f7f9f8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  text-align: center;
  overflow: hidden;
  cursor: pointer;
  color: var(--m-muted);
  font-size: 10.5px;
  line-height: 1.25;
  font-weight: 600;
}
.m-photo.has-photo { border-style: solid; border-color: transparent; padding: 0; }
.m-photo img { width: 100%; height: 100%; object-fit: cover; }
.m-photo .ico { width: 20px; height: 20px; }
.m-photo .ok {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #16a34a;
  color: #fff;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.m-photo-meta { display: flex; align-items: center; justify-content: space-between; gap: 4px; font-size: 9.5px; min-height: 12px; }
.m-tag {
  background: #eef1f0;
  color: var(--m-muted);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}
.m-link-sm { color: var(--m-accent); text-decoration: underline; font-weight: 600; font-size: 9.5px; }

/* conferência */
.m-check-list { display: flex; flex-direction: column; gap: 8px; }
.m-check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.35;
  background: var(--m-card);
  border-radius: var(--m-r-card);
  padding: 12px 14px;
  box-shadow: var(--m-shadow);
}
.m-check-item input { margin-top: 2px; width: 18px; height: 18px; accent-color: var(--m-accent); flex-shrink: 0; }

/* ── Vídeo ───────────────────────────────────────────────────────────── */
.m-video { position: relative; border-radius: var(--m-r-card); overflow: hidden; background: #0b1f1b; }
.m-video-player { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: #0b1f1b; }
.m-video-bar {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(3, 20, 17, 0.62);
  color: #fff;
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 11px;
}
.m-video-rec {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(3, 20, 17, 0.72);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}
.m-rec-dot { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; animation: m-rec 1s infinite; }
@keyframes m-rec { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

/* ── Avarias ─────────────────────────────────────────────────────────── */
.m-car-diagram {
  background: var(--m-card);
  border-radius: var(--m-r-card);
  padding: 10px;
  box-shadow: var(--m-shadow);
}
.m-car-diagram svg { display: block; width: 100%; height: auto; }
.m-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 0; }
.m-chip-opt {
  flex: 0 0 auto;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid #dfe7e4;
  background: #fff;
  color: var(--m-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.m-chip-opt.is-active { background: var(--m-accent); border-color: var(--m-accent); color: #fff; }
.m-avaria-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--m-line);
}
.m-avaria-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fde8e8;
  color: #b91c1c;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.m-avaria-main { flex: 1; min-width: 0; }
.m-avaria-title { font-size: 13px; font-weight: 700; }
.m-avaria-sub { font-size: 11.5px; color: var(--m-muted); }
.m-avaria-acoes { display: flex; gap: 6px; }
.m-icobtn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--m-line);
  background: #fff;
  color: var(--m-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.m-icobtn .ico { width: 14px; height: 14px; }

/* ── Assinatura ──────────────────────────────────────────────────────── */
.m-sign {
  background: var(--m-card);
  border-radius: var(--m-r-card);
  padding: 12px;
  box-shadow: var(--m-shadow);
}
.m-sign canvas {
  width: 100%;
  height: 168px;
  border-radius: 10px;
  border: 1.5px dashed #cfd8d5;
  background: #fff;
  touch-action: none;
  display: block;
}
.m-sign-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--m-muted); }
.m-textarea {
  width: 100%;
  min-height: 88px;
  border-radius: var(--m-r-card);
  border: 1px solid var(--m-line);
  background: var(--m-card);
  padding: 12px 14px;
  font-size: 13px;
  color: var(--m-ink);
  font-family: inherit;
  resize: vertical;
}
.m-textarea:focus { outline: 2px solid var(--m-accent-soft); border-color: var(--m-accent); }

/* ── Conclusão ───────────────────────────────────────────────────────── */
.m-done-wrap {
  position: relative;
  margin: -6px -16px 0;
  padding: 30px 24px 110px;
  border-radius: 22px 22px 0 0;
  background: #fff;
  min-height: calc(100dvh - 120px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow: hidden;
}
.m-done-wrap::after {
  content: '';
  position: absolute;
  left: -25%;
  right: -25%;
  bottom: 0;
  height: 46%;
  background: radial-gradient(58% 70% at 50% 100%, #cdecdd 0%, rgba(205, 236, 221, 0) 72%);
  pointer-events: none;
}
.m-done-wrap > * { position: relative; z-index: 1; }
.m-done-ico {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #16a34a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(22, 163, 74, 0.28);
  margin-top: 8px;
}
.m-done-ico .ico { width: 30px; height: 30px; stroke-width: 3; }
.m-done-title { font-size: 19px; font-weight: 800; margin-top: 14px; letter-spacing: -0.01em; }
.m-done-sub {
  font-size: 12.5px;
  color: var(--m-muted);
  line-height: 1.5;
  max-width: 260px;
  margin-top: 6px;
}
.m-done-img {
  width: 100%;
  max-width: 320px;
  height: auto;
  margin: 18px 0 6px;
  mix-blend-mode: multiply;
}
.m-done-btn { max-width: 300px; height: 46px; margin-top: auto; }

/* ── Navegação inferior ──────────────────────────────────────────────── */
.m-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 520px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: #fff;
  border-top: 1px solid var(--m-line);
  padding: 6px 4px 18px;
  z-index: 40;
}
.m-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  font-size: 10px;
  font-weight: 600;
  color: var(--m-muted);
  text-decoration: none;
  padding: 4px 0;
}
.m-nav-item .ico { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.9; }
.m-nav-item.is-active { color: var(--m-accent); }

/* barra de sair (acesso por código) */
.m-sair-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: var(--m-brand);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  display: flex;
  justify-content: center;
}
.m-sair-bar button {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #e6f4ef;
  border-radius: 999px;
  padding: 7px 18px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.m-app:has(.m-sair-bar) { padding-bottom: 58px; }

/* ── Código ──────────────────────────────────────────────────────────── */
/* abas em formato de pílula (tela de código) */
.m-tabs.is-pill { align-items: center; padding-bottom: 12px; }
.m-tabs.is-pill .m-tab {
  padding: 7px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 12.5px;
}
.m-tabs.is-pill .m-tab.is-active {
  background: #fff;
  color: var(--m-brand-2);
  font-weight: 700;
}
.m-tabs.is-pill .m-tab.is-active::after { display: none; }

.m-code-card {
  position: relative;
  margin: -4px 0 0;
  background: #fff;
  border-radius: 22px 22px 0 0;
  padding: 28px 20px 26px;
  min-height: calc(100dvh - 149px - 67px - 10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  overflow: hidden;
}
.m-code-card::after {
  content: '';
  position: absolute;
  left: -30%;
  right: -30%;
  bottom: 0;
  height: 34%;
  background: radial-gradient(55% 70% at 50% 100%, #e2f2eb 0%, rgba(226, 242, 235, 0) 72%);
  pointer-events: none;
}
.m-code-card > * { position: relative; z-index: 1; }
.m-code-body {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
.m-code-img { width: 168px; max-width: 60%; height: auto; mix-blend-mode: multiply; }
.m-code-go {
  width: 100%;
  height: 48px;
  margin-top: auto;
  font-size: 15px;
  justify-content: space-between;
  padding: 0 18px;
}
.m-code-go .ico { width: 18px; height: 18px; }

.m-code-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 20px 0 8px;
  text-align: center;
}
.m-code-card .m-code-boxes { width: 100%; justify-content: space-between; gap: 6px; }
.m-code-card .m-code-box { width: 100%; height: 48px; font-size: 20px; box-shadow: none; border-radius: 12px; }
.m-code-title { font-size: 15px; font-weight: 700; }
.m-code-sub { font-size: 12px; color: var(--m-muted); }
.m-code-boxes { display: flex; gap: 10px; justify-content: center; }
.m-code-box {
  width: 44px;
  height: 52px;
  border-radius: 12px;
  border: 1.6px solid #dfe7e4;
  background: #fff;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  color: var(--m-ink);
  box-shadow: var(--m-shadow);
}
.m-code-box:focus { outline: 2px solid var(--m-accent-soft); border-color: var(--m-accent); }
.m-keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.m-key {
  height: 52px;
  border-radius: 12px;
  border: 0;
  background: #fff;
  box-shadow: var(--m-shadow);
  font-size: 20px;
  font-weight: 700;
  color: var(--m-ink);
  cursor: pointer;
}
.m-key:active { background: #eef3f1; }

/* ── Acesso por código + PIN ─────────────────────────────────────────── */
.m-entrar { min-height: 100dvh; background: var(--m-bg); padding-bottom: 0; }
.m-entrar-head {
  background-color: var(--m-brand);
  background-image:
    linear-gradient(180deg, rgba(4, 32, 28, 0.45), rgba(4, 32, 28, 0.55)),
    url('/img/campo/header-bg.webp');
  background-size: cover, cover;
  background-position: center, center 40%;
  padding: 26px 20px;
  border-radius: 0 0 24px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.m-entrar-body { padding: 22px 18px 40px; max-width: 460px; margin: 0 auto; }
.m-entrar-title { font-size: 20px; font-weight: 800; margin: 0 0 6px; }
.m-entrar-sub { font-size: 12.5px; color: var(--m-muted); margin: 0 0 18px; line-height: 1.5; }
.m-entrar-foot { text-align: center; font-size: 12px; margin-top: 22px; }
.m-entrar-foot a { color: var(--m-accent); text-decoration: none; font-weight: 600; }

.m-field { margin-bottom: 14px; }
.m-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--m-ink);
  margin-bottom: 6px;
}
.m-input {
  width: 100%;
  height: 46px;
  border-radius: var(--m-r-btn);
  border: 1px solid var(--m-line);
  background: #fff;
  padding: 0 14px;
  font-size: 14px;
  color: var(--m-ink);
}
.m-input:focus { outline: 2px solid var(--m-accent-soft); border-color: var(--m-accent); }
.m-hint { font-size: 11px; color: var(--m-muted); margin-top: 5px; }
.m-form-card { background: var(--m-card); border-radius: var(--m-r-card); padding: 16px; box-shadow: var(--m-shadow); }

/* toasts / avisos de formulário */
.m-auto-aviso { font-size: 12px; margin-top: 10px; color: var(--m-danger); font-weight: 600; }

/* .m-app precisa posicionar o header acima do conteúdo */
.m-app { overflow-x: hidden; scrollbar-width: none; }
.m-app::-webkit-scrollbar { width: 0; height: 0; }
.m-header { position: relative; z-index: 5; }
.m-download-bar .m-btn { height: 32px; padding: 0 12px; font-size: 12px; }

/* botão desabilitado: preenchido claro (não some) */
.m-btn-primary:disabled { opacity: 1; background: #7fb8a7; color: #f3fbf8; }

/* ── Acessórios da execução: grade compacta com busca (lista de 100+ itens ficava enorme) ── */
.m-acess-conta { font-size: 12px; font-weight: 600; color: var(--m-accent); white-space: nowrap; }
.m-acess-filtros { display: flex; gap: 8px; align-items: center; }
.m-acess-busca { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px;
  background: var(--m-card); border-radius: 12px; box-shadow: var(--m-shadow); color: var(--m-muted); }
.m-acess-busca .ico { width: 16px; height: 16px; flex: none; }
.m-acess-busca input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit;
  font-size: 16px; color: var(--m-ink); }
.m-acess-so { flex: none; height: 42px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--m-line);
  background: var(--m-card); font: inherit; font-size: 13px; font-weight: 600; color: var(--m-ink); cursor: pointer; }
.m-acess-so.on { background: var(--m-accent); border-color: var(--m-accent); color: #fff; }
.m-acess-grade { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.m-acess { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 10px; box-sizing: border-box;
  border: 1px solid var(--m-line); border-radius: 12px; background: var(--m-card); color: var(--m-ink);
  font: inherit; font-size: 13px; font-weight: 600; line-height: 1.25; text-align: left; cursor: pointer;
  -webkit-tap-highlight-color: transparent; }
.m-acess.on { border-color: var(--m-accent); background: #e7f4f0; }
.m-acess-check { flex: none; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid #c9d3d0;
  display: inline-flex; align-items: center; justify-content: center; background: #fff; box-sizing: border-box; }
.m-acess.on .m-acess-check { background: var(--m-accent); border-color: var(--m-accent); color: #fff; }
.m-acess-check .ico { width: 13px; height: 13px; stroke-width: 3; }
.m-acess-nome { min-width: 0; overflow-wrap: anywhere; }
