/* =========================================================================
   VALIDAÇÃO DE LOJAS — MERCADO CENTRAL
   Design system: dark-first com ouro da marca + tema claro "papel".
   Mobile-first, offline, zero dependências.
   ========================================================================= */

/* ---------- 1. Tokens de tema ---------- */
:root {
  /* superfícies (dark padrão) */
  --bg:            #0C0D10;
  --bg-grad:       radial-gradient(1200px 600px at 50% -10%, #16181F 0%, #0C0D10 60%);
  --surface:       #15171C;
  --surface-2:     #1B1E25;
  --surface-3:     #23262E;
  --border:        rgba(255,255,255,.08);
  --border-strong: rgba(255,255,255,.15);

  /* texto */
  --text:    #F2F3F5;
  --muted:   #9AA0AC;
  --faint:   #6B7280;

  /* marca */
  --gold:        #E3B23C;
  --gold-bright: #F6CE63;
  --gold-deep:   #C8902B;
  --gold-grad:   linear-gradient(135deg, #F6CE63 0%, #C8902B 100%);
  --gold-tint:   rgba(227,178,60,.12);
  --on-gold:     #1A1408;

  /* estados (semáforo da loja) */
  --green:  #35C759;  --green-tint:  rgba(53,199,89,.14);
  --red:    #FF5A52;  --red-tint:    rgba(255,90,82,.14);
  --amber:  #E3B23C;  --amber-tint:  rgba(227,178,60,.14);
  --blue:   #5B9DEF;  --blue-tint:   rgba(91,157,239,.14);

  /* forma */
  --r-sm: 10px;  --r:   14px;  --r-lg: 20px;  --r-xl: 26px;
  --shadow:    0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.28);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.45);

  /* tipografia */
  --font-ui:   system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "Segoe UI Mono", Consolas, monospace;

  --ease: cubic-bezier(.22,.61,.36,1);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

[data-theme="light"] {
  --bg:            #F1EFE9;
  --bg-grad:       radial-gradient(1200px 600px at 50% -10%, #FBFAF6 0%, #F1EFE9 60%);
  --surface:       #FFFFFF;
  --surface-2:     #F6F4EE;
  --surface-3:     #ECE9E0;
  --border:        rgba(20,18,12,.10);
  --border-strong: rgba(20,18,12,.20);
  --text:    #1A1B1E;
  --muted:   #65686F;
  --faint:   #8A8D95;
  --gold:        #B5832A;
  --gold-bright: #D7A93B;
  --gold-deep:   #9C6F16;
  --gold-tint:   rgba(181,131,42,.12);
  --on-gold:     #FFFFFF;
  --green-tint:  rgba(40,160,70,.14);
  --red-tint:    rgba(220,60,52,.12);
  --amber-tint:  rgba(181,131,42,.14);
  --blue-tint:   rgba(60,120,210,.12);
  --shadow:    0 1px 2px rgba(60,50,30,.08), 0 10px 24px rgba(60,50,30,.10);
  --shadow-lg: 0 16px 40px rgba(60,50,30,.16);
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-ui);
  background: var(--bg);
  background-image: var(--bg-grad);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  overflow-x: hidden;
  transition: background-color .35s var(--ease), color .35s var(--ease);
}
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
/* Sem isto, qualquer regra de autor com `display` (ex.: .suggest{display:flex})
   vence o [hidden] da folha do navegador e o elemento aparece mesmo escondido. */
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--gold-tint); }

/* ---------- 3. App bar ---------- */
.appbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; padding-top: calc(14px + env(safe-area-inset-top, 0px));
  background: var(--bg); /* fallback */
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand__mark {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  border-radius: 11px;
  background: var(--gold-tint);
  color: var(--gold);
  box-shadow: inset 0 0 0 1px var(--border);
}
.brand__mark svg { width: 26px; height: 26px; }
.logo-mask {
  width: 26px; height: 26px; display: block; background: var(--gold);
  -webkit-mask: url("../assets/logo-mc.svg") center / contain no-repeat;
          mask: url("../assets/logo-mc.svg") center / contain no-repeat;
}
.brand__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.1; }
.brand__title {
  font-size: 15px; font-weight: 700; letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand__sub {
  font-size: 11px; color: var(--muted); font-weight: 500;
  letter-spacing: .03em; text-transform: uppercase;
}
.appbar__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.iconbtn {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  border-radius: 11px; color: var(--muted);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border);
  transition: transform .18s var(--ease), color .2s, background .2s;
}
.iconbtn:hover { color: var(--text); }
.iconbtn:active { transform: scale(.92); }
.iconbtn svg { width: 20px; height: 20px; }

/* indicador offline/online */
.netdot {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 600; color: var(--muted);
  padding: 7px 11px; border-radius: 999px;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border);
  white-space: nowrap;
}
.netdot::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 0 0 var(--green-tint);
}
.netdot[data-state="offline"] { color: var(--amber); }
.netdot[data-state="offline"]::before { background: var(--amber); animation: pulse 2s var(--ease) infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 var(--amber-tint);} 70%{box-shadow:0 0 0 7px transparent;} 100%{box-shadow:0 0 0 0 transparent;} }

/* ---------- 4. Layout ---------- */
.app { max-width: 720px; margin: 0 auto; padding: 0 16px 132px; }
.view { display: none; animation: viewIn .4s var(--ease) both; }
.view.is-active { display: block; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- 5. Hero / cabeçalho do formulário ---------- */
.hero { padding: 26px 4px 18px; }
.hero__eyebrow {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--gold); font-weight: 600;
}
.hero__title {
  font-size: clamp(26px, 7vw, 34px); font-weight: 800; letter-spacing: -.025em;
  margin-top: 8px; line-height: 1.05;
}
.hero__title em { font-style: normal; color: var(--gold); }
.hero__desc { color: var(--muted); margin-top: 10px; font-size: 14.5px; max-width: 46ch; }

/* mini-guia 1·2·3 — some após a 1ª vistoria salva (via .hidden no JS) */
.steps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; list-style: none; padding: 0; }
.steps__item {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 9px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 12.5px; font-weight: 600; color: var(--muted);
}
.steps__n {
  width: 20px; height: 20px; flex: none; border-radius: 50%;
  display: grid; place-items: center; font-size: 11px; font-weight: 800;
  font-family: var(--font-mono); background: var(--gold-grad); color: var(--on-gold);
}

/* ---------- 6. Cartão de seção ---------- */
.section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  margin-top: 16px; overflow: hidden;
}
.section__head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px;
}
.section__head[data-toggle] { cursor: pointer; user-select: none; } /* só as colapsáveis */
.section__num {
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  color: var(--gold); width: 26px; height: 26px; flex: none;
  display: grid; place-items: center; border-radius: 8px;
  background: var(--gold-tint);
}
.section__titles { display: flex; flex-direction: column; min-width: 0; }
.section__title { font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; }
.section__hint { font-size: 12px; color: var(--muted); }
.section__chev {
  margin-left: auto; color: var(--muted); transition: transform .3s var(--ease); flex: none;
}
.section.is-collapsed .section__chev { transform: rotate(-90deg); }
.section__body {
  padding: 4px 18px 20px;
  display: grid; gap: 14px;
}
.section.is-collapsed .section__body { display: none; }

/* ---------- 7. Campos ---------- */
.field { display: grid; gap: 7px; }
.field__label {
  font-size: 12.5px; font-weight: 600; color: var(--muted);
  letter-spacing: .01em; display: flex; align-items: center; gap: 6px;
}
.field__label .req { color: var(--gold); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 420px) { .grid-2 { grid-template-columns: 1fr; } }

.input, .textarea, .select {
  width: 100%; padding: 13px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text); font-size: 15px;
  transition: border-color .18s, background .18s, box-shadow .18s;
}
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:hover, .textarea:hover, .select:hover { border-color: var(--border-strong); }
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--gold);
  background: var(--surface);
  box-shadow: 0 0 0 4px var(--gold-tint);
}
.textarea { min-height: 78px; resize: vertical; line-height: 1.5; }
.input--mono { font-family: var(--font-mono); letter-spacing: .02em; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239AA0AC' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px;
}

/* ---------- 8. Toggle Sim/Não & segmentos ---------- */
.segment {
  display: inline-grid; grid-auto-flow: column; gap: 4px;
  padding: 4px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 999px;
}
.segment__opt {
  padding: 9px 18px; border-radius: 999px; font-size: 14px; font-weight: 700;
  color: var(--muted); transition: color .18s, background .25s var(--ease);
  white-space: nowrap;
}
.segment__opt[aria-pressed="true"] { color: var(--on-gold); background: var(--gold-grad); box-shadow: var(--shadow); }
.segment__opt[data-val="sim"][aria-pressed="true"] { background: var(--green); color: #04240E; }
.segment__opt[data-val="nao"][aria-pressed="true"] { background: var(--red); color: #2A0605; }

/* ---------- 9. Chips de checkbox (indícios / providências) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  position: relative; display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 15px 11px 13px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 14px; font-weight: 600; color: var(--text);
  transition: border-color .18s, background .2s, transform .12s var(--ease);
}
.chip:active { transform: scale(.97); }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip__box {
  width: 19px; height: 19px; flex: none; border-radius: 6px;
  border: 2px solid var(--border-strong); display: grid; place-items: center;
  transition: border-color .18s, background .18s;
}
.chip__box svg { width: 13px; height: 13px; color: var(--on-gold); opacity: 0; transform: scale(.5); transition: .18s var(--ease); }
.chip:has(input:checked) { border-color: var(--gold); background: var(--gold-tint); }
.chip:has(input:checked) .chip__box { background: var(--gold-grad); border-color: transparent; }
.chip:has(input:checked) .chip__box svg { opacity: 1; transform: scale(1); }

/* ---------- 9b. Sugestão automática de status ---------- */
.suggest {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 13px; border-radius: var(--r);
  background: var(--gold-tint); border: 1px solid var(--gold);
  font-size: 13px; animation: viewIn .3s var(--ease) both;
}
.suggest__icon { width: 18px; height: 18px; color: var(--gold); flex: none; }
.suggest__txt { flex: 1; color: var(--text); }
.suggest__txt b { color: var(--gold); font-weight: 700; }
.suggest__apply {
  flex: none; padding: 7px 15px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: var(--gold-grad); color: var(--on-gold); box-shadow: var(--shadow);
  transition: transform .12s var(--ease), filter .2s;
}
.suggest__apply:hover { filter: brightness(1.06); }
.suggest__apply:active { transform: scale(.95); }

/* ---------- 10. Opções de status (validação final) ---------- */
.options { display: grid; gap: 10px; }
.option {
  display: flex; align-items: flex-start; gap: 13px;
  padding: 15px 16px; border-radius: var(--r);
  background: var(--surface-2); border: 1px solid var(--border);
  transition: border-color .18s, background .2s;
}
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option__dot {
  width: 20px; height: 20px; flex: none; margin-top: 1px; border-radius: 50%;
  border: 2px solid var(--border-strong); position: relative; transition: border-color .18s;
}
.option__dot::after {
  content: ""; position: absolute; inset: 3px; border-radius: 50%;
  background: var(--c, var(--gold)); transform: scale(0); transition: transform .2s var(--ease);
}
.option__txt { display: flex; flex-direction: column; gap: 2px; }
.option__title { font-size: 14.5px; font-weight: 700; }
.option__sub { font-size: 12.5px; color: var(--muted); }
.option:has(input:checked) { border-color: var(--c, var(--gold)); background: var(--surface-3); background: color-mix(in srgb, var(--c, var(--gold)) 9%, var(--surface-2)); }
.option:has(input:checked) .option__dot { border-color: var(--c, var(--gold)); }
.option:has(input:checked) .option__dot::after { transform: scale(1); }

/* ---------- 11. ASSINATURA: registro de verificações (pulso da loja) ---------- */
.pulse {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  padding: 12px 14px; border-radius: var(--r);
  background: var(--surface-2); border: 1px solid var(--border);
}
.pulse__label { font-size: 12px; color: var(--muted); font-weight: 600; margin-right: 2px; }
.pulse__track { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pulse__dot {
  width: 13px; height: 13px; border-radius: 50%; flex: none;
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--c) 55%, transparent);
  background: var(--c); position: relative;
  animation: dotIn .35s var(--ease) both;
}
.pulse__dot[data-open="sim"] { --c: var(--green); }
.pulse__dot[data-open="nao"] { --c: var(--red); }
@keyframes dotIn { from { transform: scale(0); } to { transform: scale(1); } }
.pulse__empty { font-size: 12.5px; color: var(--faint); }
.pulse__count { margin-left: auto; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

.verif-list { display: grid; gap: 11px; }
.verif-empty { font-size: 13px; color: var(--muted); line-height: 1.5; text-align: center; padding: 2px 6px; }
.verif-empty b { color: var(--gold); font-weight: 700; }
.verif {
  position: relative; padding: 14px 15px 14px 18px;
  border-radius: var(--r); background: var(--surface-2);
  border: 1px solid var(--border);
  animation: viewIn .3s var(--ease) both;
}
.verif::before {
  content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px;
  border-radius: 0 4px 4px 0; background: var(--vc, var(--faint));
}
.verif[data-open="sim"] { --vc: var(--green); }
.verif[data-open="nao"] { --vc: var(--red); }
.verif__top { display: flex; align-items: center; gap: 10px; }
.verif__when { font-family: var(--font-mono); font-size: 13px; font-weight: 700; }
.verif__badge {
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .04em;
}
.verif__badge[data-open="sim"] { color: var(--green); background: var(--green-tint); }
.verif__badge[data-open="nao"] { color: var(--red); background: var(--red-tint); }
.verif__del { margin-left: auto; color: var(--faint); width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; transition: color .2s, background .2s; }
.verif__del:hover { color: var(--red); background: var(--red-tint); }
.verif__del svg { width: 17px; height: 17px; }
.verif__meta { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* ---- Autoria da visita: avatar por pessoa + selo da assinatura por PIN ---- */
.verif__autor { display: flex; align-items: center; gap: 8px; margin-top: 8px; min-width: 0; }
.avatar-autor {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  display: inline-grid; place-items: center;
  font-size: 10px; font-weight: 800; letter-spacing: .02em; color: #fff;
}
/* versão "ponto": só a cor, sem iniciais (histórico e nota de autores) */
.avatar-autor--pt { width: 10px; height: 10px; }
.verif__quem { font-size: 13px; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selo-pin {
  flex: none; font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
  color: var(--green); background: var(--green-tint); white-space: nowrap;
}
.selo-pin--nao { color: var(--muted); background: var(--surface-3); }

/* Mais de uma pessoa na mesma ficha: o gerente vê antes de abrir cada visita */
.autores-nota {
  font-size: 12.5px; color: var(--text); line-height: 1.5;
  padding: 10px 12px; margin-bottom: 12px; border-radius: var(--r);
  background: var(--amber-tint); box-shadow: inset 0 0 0 1px var(--border);
}
.autores-nota__item { display: inline-flex; align-items: center; gap: 5px; margin-right: 8px; white-space: nowrap; }

.verif__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.tag {
  font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  background: var(--surface-3); color: var(--muted); white-space: nowrap;
}
.verif__obs { font-size: 13px; color: var(--text); margin-top: 9px; line-height: 1.45; }

.btn-add {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; padding: 14px; border-radius: var(--r);
  border: 1.5px dashed var(--border-strong); color: var(--gold);
  font-weight: 700; font-size: 14.5px; background: transparent;
  transition: background .2s, border-color .2s, transform .12s var(--ease);
}
.btn-add:hover { background: var(--gold-tint); border-color: var(--gold); }
.btn-add:active { transform: scale(.99); }
.btn-add svg { width: 19px; height: 19px; }

/* ---------- 11b. Evidência (foto / GPS) ---------- */
.evidence { display: flex; gap: 9px; }
.evidence__btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px; border-radius: var(--r); font-size: 14px; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  transition: border-color .18s, background .2s, transform .12s var(--ease);
}
.evidence__btn svg { width: 18px; height: 18px; color: var(--gold); }
.evidence__btn:hover { border-color: var(--gold); background: var(--gold-tint); }
.evidence__btn:active { transform: scale(.97); }
.evidence__btn[disabled] { opacity: .55; pointer-events: none; }
.evidence__preview { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 11px; }

.evi-item { position: relative; line-height: 0; }
.evi-thumb {
  width: 66px; height: 66px; object-fit: cover; border-radius: 10px;
  border: 1px solid var(--border); display: block; background: var(--surface-3);
}
.evi-remove {
  position: absolute; top: -7px; right: -7px; width: 22px; height: 22px;
  border-radius: 50%; display: grid; place-items: center;
  background: var(--red); color: #fff; box-shadow: var(--shadow);
}
.evi-remove svg { width: 13px; height: 13px; }
.gps-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-radius: 999px; font-family: var(--font-mono); font-size: 12.5px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
}
.gps-chip svg { width: 15px; height: 15px; color: var(--gold); flex: none; }
.gps-chip .evi-remove { position: static; width: 18px; height: 18px; margin-left: 2px; }

/* miniaturas dentro do cartão de verificação */
.verif__evi { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 10px; }
.verif__evi .evi-thumb { width: 58px; height: 58px; }
.verif__gps {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono);
  font-size: 12px; color: var(--muted); text-decoration: none;
}
.verif__gps svg { width: 14px; height: 14px; color: var(--gold); }

/* ---------- 12. Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 20px; border-radius: var(--r); font-weight: 700; font-size: 15px;
  transition: transform .12s var(--ease), filter .2s, background .2s, color .2s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; }
.btn--gold { background: var(--gold-grad); color: var(--on-gold); box-shadow: var(--shadow); }
.btn--gold:hover { filter: brightness(1.06); }
.btn--ghost { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
.btn--ghost:hover { background: var(--surface-3); }
.btn--danger { background: var(--red-tint); color: var(--red); }
.btn--danger:focus-visible { outline-color: var(--red); }
.btn--block { width: 100%; }

/* ---------- 13. Barra de ação fixa ---------- */
.actionbar {
  position: fixed; left: 0; right: 0; bottom: var(--navh, 64px); z-index: 30;
  padding: 12px 16px calc(12px + var(--safe-bottom));
  display: flex; gap: 10px;
  max-width: 720px; margin: 0 auto;
  background: linear-gradient(to top, var(--bg) 60%, transparent);
  pointer-events: none;
}
.actionbar > * { pointer-events: auto; }
.actionbar .btn--gold { flex: 1; }

/* ---------- 14. Navegação inferior ---------- */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--bg); /* fallback */
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-top: 1px solid var(--border);
  padding-bottom: var(--safe-bottom);
}
.navbtn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 10px 6px 11px; color: var(--faint); font-size: 11px; font-weight: 600;
  transition: color .2s; position: relative;
}
.navbtn svg { width: 23px; height: 23px; }
.navbtn.is-active { color: var(--gold); }
.navbtn.is-active::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 26px; height: 3px; border-radius: 0 0 3px 3px; background: var(--gold-grad);
}

/* ---------- 15. Histórico ---------- */
.toolbar { display: flex; gap: 10px; margin: 4px 0 16px; }
.search { position: relative; flex: 1; }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--faint); pointer-events: none; }
.search input { padding-left: 42px; }

.card-loja {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow);
  padding: 16px; margin-bottom: 12px; cursor: pointer;
  transition: transform .14s var(--ease), border-color .2s;
  position: relative; overflow: hidden;
}
.card-loja::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--sc, var(--faint));
}
.card-loja:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.card-loja:active { transform: translateY(0); }
.card-loja__top { display: flex; align-items: center; gap: 10px; }
.card-loja__num { font-family: var(--font-mono); font-weight: 700; font-size: 15px; color: var(--gold); }
.card-loja__title { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.card-loja__sub { font-size: 13px; color: var(--muted); margin-top: 3px; }
.status-badge {
  margin-left: auto; font-size: 11px; font-weight: 700; padding: 5px 11px; border-radius: 999px;
  white-space: nowrap; color: var(--sc); background: var(--surface-3); background: color-mix(in srgb, var(--sc) 15%, transparent);
}
.card-loja__foot {
  display: flex; align-items: center; gap: 14px; margin-top: 13px;
  padding-top: 12px; border-top: 1px solid var(--border);
  font-size: 12.5px; color: var(--muted);
}
.card-loja__foot .meta { display: inline-flex; align-items: center; gap: 6px; }
/* rondas de mais de uma pessoa: pede conferência antes de validar */
.card-loja__foot .meta--multi { color: var(--amber); font-weight: 700; gap: 3px; }
.card-loja__foot svg { width: 15px; height: 15px; color: var(--faint); }
.card-loja__foot .pulse__track { margin-left: auto; }
.card-loja__foot .pulse__dot { width: 10px; height: 10px; }

/* Atalho da ronda: leva direto para registrar uma visita nesta loja.
   Alvo de toque cheio (>=44px) e dourado, para o vigia achar num relance. */
.card-loja__visita {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; margin-top: 12px; padding: 12px; min-height: 44px;
  border-radius: var(--r); font-size: 14px; font-weight: 700;
  color: var(--gold); background: var(--gold-tint, rgba(227,178,60,.12));
  box-shadow: inset 0 0 0 1px var(--border-strong);
  transition: background .18s var(--ease), transform .1s var(--ease);
}
.card-loja__visita svg { width: 17px; height: 17px; }
.card-loja__visita:hover { background: rgba(227,178,60,.2); }
.card-loja__visita:active { transform: scale(.985); }
.card-loja__visita:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* status → cores (via JS define --sc) */

/* ---------- 16. Estado vazio ---------- */
.empty { text-align: center; padding: 64px 24px; color: var(--muted); }
.empty__icon {
  width: 76px; height: 76px; margin: 0 auto 18px; border-radius: 22px;
  display: grid; place-items: center; color: var(--gold);
  background: var(--gold-tint); box-shadow: inset 0 0 0 1px var(--border);
}
.empty__icon svg { width: 38px; height: 38px; }
.empty h3 { font-size: 18px; font-weight: 700; color: var(--text); }
.empty p { margin-top: 8px; font-size: 14px; max-width: 34ch; margin-inline: auto; }

/* ---------- 17. Toast ---------- */
.toast-wrap {
  position: fixed; left: 50%; bottom: calc(var(--navh, 64px) + 84px); transform: translateX(-50%);
  z-index: 60; display: flex; flex-direction: column; gap: 8px; width: max-content; max-width: 90vw;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 14px; font-size: 14px; font-weight: 600;
  background: var(--surface-3); color: var(--text);
  box-shadow: var(--shadow-lg); border: 1px solid var(--border);
  animation: toastIn .35s var(--ease) both;
}
.toast svg { width: 18px; height: 18px; flex: none; }
.toast--ok { color: var(--green); } .toast--ok svg { color: var(--green); }
.toast--err { color: var(--red); }  .toast--err svg { color: var(--red); }
.toast.out { animation: toastOut .3s var(--ease) forwards; }
@keyframes toastIn  { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px) scale(.97); } }

/* ---------- 17b. Câmera (preview enquadrado, estilo leitor) ---------- */
.camera-backdrop { z-index: 80; } /* acima do modal de verificação */
.camera-frame {
  position: relative; width: 100%; aspect-ratio: 4 / 3; min-height: 220px;
  border-radius: var(--r); overflow: hidden; background: #000;
  border: 1px solid var(--border); margin-bottom: 4px;
}
.camera-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }
.camera-frame__g { position: absolute; width: 30px; height: 30px; border: 3px solid var(--gold); pointer-events: none; }
.camera-frame__g--tl { top: 12px; left: 12px;  border-right: 0; border-bottom: 0; border-radius: 8px 0 0 0; }
.camera-frame__g--tr { top: 12px; right: 12px; border-left: 0;  border-bottom: 0; border-radius: 0 8px 0 0; }
.camera-frame__g--bl { bottom: 12px; left: 12px;  border-right: 0; border-top: 0; border-radius: 0 0 0 8px; }
.camera-frame__g--br { bottom: 12px; right: 12px; border-left: 0;  border-top: 0; border-radius: 0 0 8px 0; }
.camera-frame__flip {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; background: rgba(0,0,0,.45);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.camera-frame__flip svg { width: 19px; height: 19px; }
.camera-frame__flip:active { transform: translateX(-50%) scale(.9); }

/* ---------- 18. Modal (nova verificação) ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.55);
  display: none; align-items: flex-end; justify-content: center;
  backdrop-filter: blur(3px); animation: fadeIn .25s var(--ease);
}
.sheet-backdrop.is-open { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 8px 20px calc(24px + var(--safe-bottom));
  box-shadow: var(--shadow-lg); animation: sheetIn .38s var(--ease);
}
@media (min-width: 560px) { .sheet-backdrop { align-items: center; } .sheet { border-radius: var(--r-xl); margin: 16px; } }
@keyframes sheetIn { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet__grip { width: 38px; height: 4px; border-radius: 999px; background: var(--border-strong); margin: 8px auto 14px; }
.sheet__title { font-size: 18px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 4px; }
.sheet__desc { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.sheet__body { display: grid; gap: 16px; }
.sheet__actions { display: flex; gap: 10px; margin-top: 22px; }
.sheet__actions .btn { flex: 1; }

/* ---------- 19. Detalhe (resumo de loja salva) ---------- */
.detail-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 4px 8px; }
.detail-head .btn-back { color: var(--muted); }
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.summary-cell { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r); padding: 12px 14px; }
.summary-cell dt { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.summary-cell dd { font-size: 14.5px; font-weight: 600; margin-top: 4px; word-break: break-word; }
.summary-cell--full { grid-column: 1 / -1; }

/* ---------- 19b. Configurações ---------- */
.config-stat { display: flex; align-items: baseline; gap: 11px; padding: 4px 2px 8px; }
.config-stat__num { font-family: var(--font-mono); font-size: 34px; font-weight: 800; color: var(--gold); line-height: 1; }
.config-stat__label { font-size: 13px; color: var(--muted); max-width: 22ch; }
.note {
  font-size: 12.5px; color: var(--muted); line-height: 1.5;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r); padding: 11px 13px;
}
.note b { color: var(--text); font-weight: 600; }
.section--danger { border-color: var(--red-tint); }
.section--danger .section__num { color: var(--red); background: var(--red-tint); }

/* ---------- 19c. Assinatura (canvas) ---------- */
.sigpad {
  position: relative; border: 1px solid var(--border); border-radius: var(--r);
  overflow: hidden; background: #fbfaf6; /* "papel" nos dois temas */
  touch-action: none;
}
.sigpad canvas { display: block; width: 100%; height: auto; touch-action: none; cursor: crosshair; }
.sigpad__hint {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: #b9b2a1; font-size: 14px; pointer-events: none; letter-spacing: .01em;
}
.sigpad.has-ink .sigpad__hint { display: none; }
.sigpad__clear {
  position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 11px; border-radius: 999px; font-size: 12px; font-weight: 600;
  color: var(--red); background: rgba(255,90,82,.12);
}
.sigpad__clear svg { width: 13px; height: 13px; }
/* assinatura exibida no detalhe (fundo claro para o traço escuro aparecer) */
.sig-show { background: #fbfaf6; border: 1px solid var(--border); border-radius: var(--r); padding: 6px; }
.sig-show img { display: block; width: 100%; max-width: 320px; height: auto; }

/* =========================================================================
   19d. Perfis, login e encerramento de processo
   ========================================================================= */

/* ---- Chip do usuário na app bar ---- */
.userchip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 10px 5px 5px; border-radius: 999px;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border);
  transition: background .2s var(--ease);
}
.userchip:hover { background: var(--surface-3); }
.userchip__av {
  width: 28px; height: 28px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 800;
  background: var(--surface-3); color: var(--muted);
}
.userchip[data-perfil="gerente"] .userchip__av { background: var(--gold-tint); color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.userchip[data-perfil="admin"] .userchip__av { background: var(--gold-grad); color: var(--on-gold); }
.userchip__txt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.userchip__nome { font-size: 12.5px; font-weight: 700; }
.userchip__perfil { font-size: 10.5px; color: var(--muted); letter-spacing: .02em; }
@media (max-width: 420px) { .userchip__txt { display: none; } .userchip { padding: 5px; } }

/* ---- Selos de perfil mínimo exigido pela seção ---- */
.badge-gerente, .badge-admin {
  margin-left: auto; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px; white-space: nowrap;
  color: var(--gold); background: var(--gold-tint); box-shadow: inset 0 0 0 1px var(--gold);
}
.badge-admin { color: var(--red); background: var(--red-tint); box-shadow: inset 0 0 0 1px var(--red); }
.section__head .badge-gerente + .section__chev,
.section__head .badge-admin + .section__chev { margin-left: 10px; }

/* ---- Aviso/estado em bloco (bloqueado, encerrado, atenção) ---- */
.locked {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 15px 16px; margin-bottom: 14px;
  border-radius: var(--r-lg);
  background: var(--surface); border: 1px dashed var(--border-strong);
  color: var(--muted); font-size: 13px;
}
.locked svg { width: 22px; height: 22px; flex: none; color: var(--faint); margin-top: 1px; }
.locked b { display: block; color: var(--text); font-size: 14px; margin-bottom: 3px; }
.locked p { margin: 0; }
.locked__motivo {
  margin-top: 8px !important; padding: 9px 11px; border-radius: var(--r-sm);
  background: var(--surface-2); color: var(--text); font-style: italic;
}
.locked--ok { border-style: solid; border-color: var(--green); background: var(--green-tint); }
.locked--ok svg { color: var(--green); }
.locked--warn { border-style: solid; border-color: var(--amber); background: var(--amber-tint); }
.locked--warn svg { color: var(--amber); }

/* ---- Progresso das 3 visitas mínimas ---- */
.progresso { display: flex; align-items: center; gap: 11px; margin: 2px 0 14px; }
.progresso__bar { flex: 1; height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progresso__fill {
  display: block; height: 100%; width: 0; border-radius: 999px;
  background: var(--gold-grad); transition: width .35s var(--ease);
}
.progresso[data-completo="true"] .progresso__fill { background: var(--green); }
.progresso__txt { font-size: 12px; color: var(--muted); white-space: nowrap; }
.progresso[data-completo="true"] .progresso__txt { color: var(--green); font-weight: 600; }

/* ---- Carimbo automático (data/hora/autor da visita) ---- */
.stamp {
  display: grid; gap: 7px; padding: 12px 14px; margin-bottom: 16px;
  border-radius: var(--r); background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border);
}
.stamp__row { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text); }
.stamp__row svg { width: 16px; height: 16px; flex: none; color: var(--gold); }
/* "Não é você?" — troca de conta a partir da folha de visita */
.stamp__trocar {
  margin-left: auto; flex: none; font-size: 12px; font-weight: 700;
  color: var(--gold); padding: 4px 9px; border-radius: 8px;
  text-decoration: underline; text-underline-offset: 3px;
}
.stamp__trocar:hover { background: var(--surface-3); }

/* ---- Abas do histórico ---- */
.tabs {
  display: flex; gap: 4px; padding: 4px; margin-bottom: 14px;
  background: var(--surface-2); border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--border);
}
.tabs__btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--muted);
  transition: background .2s var(--ease), color .2s var(--ease);
}
.tabs__btn.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.tabs__n {
  min-width: 20px; padding: 1px 6px; border-radius: 999px;
  font-size: 11px; font-weight: 800;
  background: var(--surface-3); color: var(--muted);
}
.tabs__btn.is-active .tabs__n { background: var(--gold-tint); color: var(--gold); }

.status-badge--warn {
  margin-left: 0; color: var(--amber);
  background: var(--amber-tint); box-shadow: inset 0 0 0 1px var(--amber);
}

/* ---- Ações do detalhe ---- */
.detail-actions { display: grid; gap: 10px; margin-top: 18px; }
.btn--ok { background: var(--green-tint); color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.btn--ok:focus-visible { outline-color: var(--green); }

/* ---- Lista de usuários (Ajustes › gerente) ---- */
.userlist { display: grid; gap: 8px; margin-bottom: 12px; }
.userrow {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: var(--r);
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border);
}
.userrow__av {
  width: 32px; height: 32px; flex: none; border-radius: 50%;
  display: grid; place-items: center; font-size: 14px; font-weight: 800;
  background: var(--surface-3); color: var(--muted);
}
.userrow__av[data-perfil="gerente"] { background: var(--gold-tint); color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.userrow__av[data-perfil="admin"] { background: var(--gold-grad); color: var(--on-gold); }
.userrow__txt { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.userrow__txt b { font-size: 14px; font-weight: 700; }
.userrow__txt span { font-size: 12px; color: var(--muted); }
.userrow__eu { font-size: 10px; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: .05em; }
.userrow__perfil {
  font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  padding: 4px 8px; border-radius: 999px; white-space: nowrap;
  background: var(--surface-3); color: var(--muted);
}
.userrow__perfil[data-perfil="gerente"] { background: var(--gold-tint); color: var(--gold); }
.userrow__perfil[data-perfil="admin"] { background: var(--gold-grad); color: var(--on-gold); }
.userrow__del, .userrow__key {
  width: 30px; height: 30px; flex: none; border-radius: 50%;
  display: grid; place-items: center; color: var(--faint);
  transition: background .2s, color .2s;
}
.userrow__del svg, .userrow__key svg { width: 15px; height: 15px; }
.userrow__del:hover { background: var(--red-tint); color: var(--red); }
.userrow__key:hover { background: var(--gold-tint); color: var(--gold); }

/* ---- Variantes de nota ---- */
.note--warn { border-left: 3px solid var(--amber); padding-left: 11px; }
.note--req { color: var(--amber); }
.note--legado { color: var(--blue); }

/* ---- Biometria (passkey) ---- */
.btn--bio { display: flex; align-items: center; justify-content: center; gap: 9px; }
.btn--bio svg { width: 19px; height: 19px; flex: none; }
.bio-sep {
  display: flex; align-items: center; gap: 10px; margin: 18px 0 12px;
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
}
.bio-sep::before, .bio-sep::after { content: ""; height: 1px; flex: 1; background: var(--border); }
.bio-lista { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.bio-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: var(--r); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border);
}
.bio-item__nome { font-size: 13.5px; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bio-item__rm {
  flex: none; font-size: 12.5px; font-weight: 700; color: var(--red);
  padding: 5px 10px; border-radius: 8px; transition: background .18s var(--ease);
}
.bio-item__rm:hover { background: var(--red-tint); }

/* ---- Tela de login / primeiro acesso ---- */
body.is-locked { overflow: hidden; }
.login {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; padding: 24px;
  background: var(--bg); background-image: var(--bg-grad);
  overflow-y: auto;
}
.login__card {
  width: 100%; max-width: 380px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
  padding: 32px 24px 24px; text-align: center;
  animation: viewIn .35s var(--ease) both;
}
.login__mark { margin: 0 auto 16px; width: 52px; height: 52px; border-radius: 15px; }
.login__mark .logo-mask { width: 34px; height: 34px; }
.login__title { font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.login__sub { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .14em; margin-bottom: 24px; }
.login__msg { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.login__msg b { color: var(--gold); }
.login .field { text-align: left; }
.login .btn { margin-top: 8px; }
.login__erro {
  margin-top: 14px; padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--red-tint); color: var(--red); font-size: 13px; font-weight: 600;
}
.login__nota { margin-top: 20px; font-size: 11.5px; color: var(--faint); }

/* =========================================================================
   19e. Fluxo da ronda: loja salva, próxima loja, espaço do aparelho
   ========================================================================= */

/* ---- Banner "loja salva → próxima loja" ---- */
.salvo {
  display: grid; gap: 12px;
  padding: 16px; margin-bottom: 18px;
  border-radius: var(--r-lg);
  background: var(--green-tint);
  border: 1px solid var(--green);
  animation: viewIn .3s var(--ease) both;
}
.salvo__topo { display: flex; align-items: flex-start; gap: 11px; }
.salvo__ico {
  width: 22px; height: 22px; flex: none; color: var(--green); margin-top: 1px;
}
.salvo__txt { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.salvo__txt b { font-size: 15px; font-weight: 700; color: var(--text); }
.salvo__txt span { font-size: 13px; color: var(--muted); }
.salvo .btn { margin: 0; }

/* ---- Barra de espaço usado (Ajustes) ---- */
.uso { margin: 14px 0 4px; }
.uso__topo { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 7px; }
.uso__label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.uso__valor { font-family: var(--font-mono); font-size: 12.5px; color: var(--text); }
.uso__bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.uso__fill {
  display: block; height: 100%; width: 0; border-radius: 999px;
  background: var(--green);
  transition: width .4s var(--ease), background-color .3s;
}
.uso[data-nivel="alerta"] .uso__fill { background: var(--amber); }
.uso[data-nivel="cheio"]  .uso__fill { background: var(--red); }
.uso[data-nivel="cheio"]  .uso__valor { color: var(--red); font-weight: 700; }

/* ---- Ações do modal empilhadas (quando há 3 caminhos) ---- */
.sheet__actions--empilhado { display: grid; grid-template-columns: 1fr; gap: 9px; }
.sheet__actions--empilhado .btn { width: 100%; }

/* Ação com consequência real (ex.: criar ficha duplicada). Não pode ter a
   mesma cara do "Cancelar": em campo, de luva e no escuro, o toque erra. */
.btn--warn {
  background: var(--amber-tint); color: var(--amber);
  box-shadow: inset 0 0 0 1px var(--amber);
}
.btn--warn:focus-visible { outline-color: var(--amber); }

/* ---------- 20. Util ---------- */
.hidden { display: none !important; }
.spacer { height: 6px; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); }

/* ---------- 21. Movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* =========================================================================
   22. IMPRESSÃO → PDF (window.print). Recria o documento oficial em A4.
   ========================================================================= */
.print-only { display: none; }
@media print {
  @page { size: A4; margin: 16mm 14mm; }
  body { background: #fff !important; color: #000 !important; font-size: 11pt; }
  .appbar, .bottomnav, .actionbar, .toast-wrap, .sheet-backdrop, .btn-add,
  .verif__del, .toolbar, .iconbtn, .navbtn, .hero__desc,
  .login, .tabs, .userchip, .progresso, .locked, .detail-actions,
  .badge-gerente, .badge-admin, .stamp, .salvo, .uso { display: none !important; }
  .app { max-width: none; padding: 0; }
  .view { display: none !important; }
  .print-only { display: block !important; color: #000; }
  .doc__title { text-align: center; font-size: 16pt; font-weight: 800; margin-bottom: 4px; }
  .doc__subtitle { text-align: center; font-size: 10pt; color: #444; margin-bottom: 18px; }
  .doc__section { margin-top: 16px; break-inside: avoid; }
  .doc__h { font-size: 11pt; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1.5pt solid #000; padding-bottom: 4px; margin-bottom: 8px; }
  .doc__row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 24px; }
  .doc__f { font-size: 10.5pt; padding: 2px 0; }
  .doc__f b { display: inline-block; min-width: 130px; }
  table.doc__table { width: 100%; border-collapse: collapse; font-size: 9pt; }
  table.doc__table th, table.doc__table td { border: 0.75pt solid #000; padding: 5px 6px; text-align: left; vertical-align: top; }
  table.doc__table th { background: #eee; font-weight: 700; }
  .doc__check { font-size: 10.5pt; padding: 3px 0; }
  .doc__sign { margin-top: 40px; }
  .doc__sign .line { border-top: 1pt solid #000; width: 60%; margin-top: 34px; padding-top: 4px; font-size: 9pt; }
  .doc__evi { margin: 8px 0; break-inside: avoid; }
  .doc__photo { display: block; max-width: 75mm; max-height: 60mm; margin-top: 4px; border: 0.75pt solid #000; }
  .doc__sign img { display: block; max-width: 70mm; max-height: 28mm; margin-top: 6px; }
}
