/* ==========================================================================
   Verify Console — v37 (redesenho completo)
   Topo fixo com navegação (no celular vira barra inferior, estilo app),
   lista com cabeçalho próprio, fichas com capa, cards suaves.
   ========================================================================== */
:root {
  --bg: #f3f7f5; --panel: #ffffff; --ink: #0b1f17; --ink-2: #23382f; --muted: #627369; --faint: #93a39b;
  --line: #e3ebe6; --line-2: #eef3f0;
  --accent: #0e9f6e; --accent-hover: #0b8a5f; --accent-soft: #e8f8f0; --accent-tint: #c8f1dc;
  --warn: #b54708; --warn-soft: #fff5e8; --bad: #c0362c; --bad-soft: #fff0ee; --info: #1d6fd8; --info-soft: #eef5ff;
  --brand-grad: linear-gradient(120deg, #0a2e22 0%, #0c7c55 52%, #34d399 100%);
  --radius: 18px; --radius-sm: 12px;
  --shadow-card: 0 1px 2px rgba(11,31,23,.04), 0 12px 32px -22px rgba(11,31,23,.22);
  --shadow-pop: 0 16px 40px -16px rgba(11,31,23,.28);
  --top-h: 64px; --nav-h: 64px;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink);
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; -webkit-tap-highlight-color: transparent; }
h2, h3 { letter-spacing: -.015em; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.row { display: flex; justify-content: space-between; gap: 8px; align-items: center; min-width: 0; }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------------------------------------------------------------- botões e campos */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); background: var(--panel);
  color: var(--ink); border-radius: 12px; padding: 8px 15px; min-height: 40px; font: inherit; font-weight: 650; cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .06s; text-decoration: none; }
.btn:hover { border-color: #cfdcd5; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 8px 20px -10px rgba(14,159,110,.7); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.primary.lg { min-height: 48px; padding: 12px 22px; font-size: 15px; border-radius: 14px; }
.btn.danger { color: var(--bad); border-color: #f1c9c4; }
.btn.danger.solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.sm { min-height: 32px; padding: 5px 11px; font-size: 12.5px; border-radius: 10px; }
.btn.sm .ico { width: 16px; height: 16px; }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--accent-soft); border-color: var(--accent-tint); color: var(--accent-hover); }
.btn[disabled], .btn.disabled { opacity: .45; cursor: not-allowed; }
.btn.disabled { pointer-events: none; }
a.btn { text-decoration: none; }
.link { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; padding: 0; }
.link:hover { color: var(--ink); }
input, textarea, select { font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; }
input, textarea { width: 100%; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(14,159,110,.13); }
.err { color: var(--bad); margin: 0; min-height: 1em; }

/* ---------------------------------------------------------------- login */
.login { display: grid; place-items: center; min-height: 100%; padding: 16px;
  background: radial-gradient(900px 420px at 50% -120px, #d2f3e2 0%, rgba(210,243,226,0) 70%),
              radial-gradient(600px 300px at 100% 100%, #e3f7ee 0%, rgba(227,247,238,0) 70%), var(--bg); }
.login-card { background: var(--panel); border: 1px solid #e6eee9; border-radius: 22px; padding: 32px 28px; width: 100%; max-width: 380px; display: grid; gap: 14px;
  box-shadow: 0 1px 2px rgba(11,31,23,.04), 0 24px 60px -24px rgba(11,31,23,.25); }
.login-card h1 { margin: 0 0 6px; }
.login-card label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 600; }
.login-card input { min-height: 46px; }
.login-card .btn.primary { min-height: 48px; font-size: 15px; }
.login-card .remember { display: flex; flex-direction: row; align-items: center; gap: 10px; font-size: 14px; color: var(--ink); font-weight: 500; cursor: pointer; user-select: none; }
.login-card .remember input { width: 18px; height: 18px; min-height: 0; margin: 0; padding: 0; flex: none; accent-color: var(--accent); }
.qr { display: flex; justify-content: center; background: #fff; padding: 10px; border-radius: 12px; margin: 8px 0; }

/* marca */
.vlogo { width: 32px; height: 32px; display: block; flex: 0 0 auto; filter: drop-shadow(0 4px 10px rgba(12,124,85,.25)); }
.vbrand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.03em; font-size: 19px; color: var(--ink); }
.vbrand small { font-weight: 600; color: var(--muted); font-size: 12px; letter-spacing: 0; }
.login-card h1.vbrand { justify-content: center; font-size: 26px; }
.login-card h1.vbrand .vlogo { width: 44px; height: 44px; }

/* ---------------------------------------------------------------- estrutura */
.app { display: flex; flex-direction: column; height: 100%; }
.topbar { position: sticky; top: 0; z-index: 20; height: var(--top-h); flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 16px; padding: 0 22px; background: rgba(255,255,255,.82); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line); }
.modes { display: flex; gap: 4px; padding: 4px; background: var(--line-2); border-radius: 999px; }
.modes button { position: relative; display: inline-flex; align-items: center; gap: 7px; border: 0; background: transparent; color: var(--muted);
  padding: 8px 16px; border-radius: 999px; font: inherit; font-size: 13.5px; font-weight: 650; cursor: pointer; white-space: nowrap;
  transition: background .15s, color .15s, box-shadow .15s; }
.modes button .ico { width: 18px; height: 18px; }
.modes button:hover { color: var(--ink); }
.modes button.on { background: var(--ink); color: #fff; box-shadow: 0 6px 16px -8px rgba(11,31,23,.55); }
.modes button:focus { outline: none; }
.modes button:focus-visible { box-shadow: 0 0 0 3px rgba(14,159,110,.35); }
.nbadge { font-style: normal; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: #f59e0b; color: #fff;
  font-size: 11px; font-weight: 800; display: inline-grid; place-items: center; line-height: 1; font-variant-numeric: tabular-nums; }
.modes button.on .nbadge { background: #fbbf24; color: var(--ink); }
.me-box { justify-self: end; display: flex; align-items: center; gap: 10px; min-width: 0; }
.me-av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff;
  background: var(--brand-grad); box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--accent-tint); flex: none; }
.me-txt { display: grid; line-height: 1.15; min-width: 0; }
.me-txt b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
.me-txt small { color: var(--muted); font-size: 11.5px; }
.me-box .link { font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 10px; }
.me-box .link:hover { background: var(--line-2); }

.work { flex: 1; min-height: 0; display: grid; grid-template-columns: 380px minmax(0, 1fr); }
.side { display: flex; flex-direction: column; min-height: 0; background: #fbfdfc; border-right: 1px solid var(--line); }
.main { overflow: auto; min-width: 0; padding: 28px 32px 48px; }
#detail { max-width: 1120px; margin: 0 auto; }
.m-back { display: none; }

/* ---------------------------------------------------------------- coluna da lista */
.list-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 20px 20px 10px; }
.lh-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.lh-title h2 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.03em; }
.lh-count { color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; }
.tabs { display: flex; gap: 2px; margin: 4px 20px 10px; padding: 3px; background: var(--line-2); border-radius: 12px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 1 0 auto; border: 0; background: transparent; color: var(--muted); border-radius: 9px; padding: 7px 10px; font: inherit;
  font-size: 12.5px; font-weight: 650; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s, box-shadow .15s; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(11,31,23,.08), 0 4px 10px -6px rgba(11,31,23,.25); }
.filters { display: flex; gap: 8px; padding: 0 20px 12px; border-bottom: 1px solid var(--line); }
.search-box { position: relative; flex: 1; min-width: 0; display: block; }
.search-box .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--faint); pointer-events: none; }
.search-box input { padding-left: 37px; min-height: 40px; background: #fff; }
.search-box input::-webkit-search-cancel-button { cursor: pointer; }
.country-sel { flex: 0 0 auto; max-width: 150px; min-height: 40px; padding: 8px 28px 8px 10px; font-size: 13px; font-weight: 600; cursor: pointer; }

.list { list-style: none; margin: 0; padding: 8px 10px 24px; overflow: auto; flex: 1; }
.list li { position: relative; border-radius: 14px; padding: 12px; cursor: pointer; transition: background .12s, box-shadow .12s; }
.list li + li { margin-top: 2px; }
.list li:hover { background: #fff; box-shadow: 0 0 0 1px var(--line); }
.list li.on { background: #fff; box-shadow: 0 0 0 1.5px var(--accent), 0 10px 24px -16px rgba(14,159,110,.55); }
.list li.pli { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: start; }
.pli-body { display: grid; gap: 3px; min-width: 0; }
.pli-name { font-size: 15px; font-weight: 700; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pli-ago { font-size: 12px; color: var(--faint); flex-shrink: 0; font-weight: 500; }
.pli-sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pli-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 3px; }
.pli-x { font-size: 12px; color: var(--muted); font-weight: 600; }
.pli-x.hot { color: var(--bad); }
.list-empty { color: var(--muted); padding: 40px 18px !important; text-align: center; cursor: default !important; background: none !important; box-shadow: none !important; }
.list li .chips:empty { display: none; }

/* lista de seções (Ajustes) — mesmas linhas, sem avatar */
.list li[data-sec] { display: grid; gap: 2px; padding: 14px 14px; }
.list li[data-sec] b { font-size: 15px; }
.list li[data-sec] .muted { font-size: 12.5px; }

/* número e status */
.no { display: inline-flex; align-items: center; font-size: 11px; font-weight: 750; color: var(--muted); background: var(--line-2);
  border-radius: 7px; padding: 1px 7px; font-variant-numeric: tabular-nums; line-height: 17px; white-space: nowrap; flex: none; }
.no.big { font-size: 12px; color: var(--ink); background: #fff; border: 1px solid var(--line); padding: 2px 9px; margin-right: 2px; }
.sdot { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.sdot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent); }
.sdot.st-verified { color: var(--accent); }
.sdot.st-in_review { color: #d97706; }
.sdot.st-requires_input, .sdot.st-rejected { color: var(--bad); }
.sdot.st-processing { color: var(--info); }
.sdot.st-canceled { color: var(--faint); }
.pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; flex-shrink: 0; }
.st-verified { background: var(--accent-soft); color: var(--accent-hover); }
.st-in_review { background: var(--warn-soft); color: var(--warn); }
.st-requires_input, .st-rejected { background: var(--bad-soft); color: var(--bad); }
.st-processing, .st-canceled { background: var(--info-soft); color: var(--info); }
.sdot.st-verified, .sdot.st-in_review, .sdot.st-requires_input, .sdot.st-rejected, .sdot.st-processing, .sdot.st-canceled { background: none; }

/* avatar colorido (gradiente por pessoa) + bandeira */
.av { --h: 150; position: relative; flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center;
  background: linear-gradient(140deg, hsl(var(--h) 75% 92%), hsl(calc(var(--h) + 35) 70% 80%)); color: hsl(var(--h) 55% 26%);
  font-weight: 800; font-size: 15px; letter-spacing: .01em; }
.av.lg { width: 92px; height: 92px; font-size: 32px; }
.av-flag { position: absolute; right: -3px; bottom: -2px; font-size: 14px; line-height: 1; background: #fff; border-radius: 50%; padding: 2px;
  box-shadow: 0 1px 4px rgba(11,31,23,.2); }
.av.lg .av-flag { font-size: 22px; right: 0; bottom: 0; padding: 3px; }
.fl { display: inline-block; margin-right: 7px; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--line-2); border: 1px solid transparent; border-radius: 8px; padding: 2px 8px;
  font-size: 11.5px; font-weight: 600; color: var(--muted); }
.chip.hot { background: var(--bad-soft); color: var(--bad); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.rec { font-size: 12px; padding: 3px 10px; }
.chip.rec-approve { background: var(--accent-soft); color: var(--accent-hover); }
.chip.rec-review { background: var(--warn-soft); color: var(--warn); }
.chip.rec-reject { background: var(--bad-soft); color: var(--bad); }
.chip.retry { background: var(--info-soft); color: var(--info); font-size: 12px; padding: 3px 10px; }
.big-chips .chip { font-size: 12.5px; padding: 5px 11px; }

/* ---------------------------------------------------------------- estado vazio */
.empty-state { max-width: 460px; margin: 10vh auto 0; text-align: center; display: grid; justify-items: center; gap: 10px; }
.es-orb { width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 6px;
  background: radial-gradient(circle at 30% 30%, #ffffff 0%, #dff7ea 55%, #c3efd8 100%); box-shadow: 0 20px 50px -24px rgba(14,159,110,.7), inset 0 0 0 1px #d4f2e2; }
.es-ico { width: 64px; height: 64px; border-radius: 50%; background: var(--brand-grad); color: #fff; display: grid; place-items: center;
  box-shadow: 0 10px 24px -10px rgba(10,46,34,.7); }
.es-ico svg { width: 30px; height: 30px; }
.empty-state h3 { margin: 4px 0 0; font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.empty-state p { margin: 0; font-size: 14.5px; }
.empty-state .btn { margin-top: 8px; }
.es-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; margin-top: 22px; }
.es-stat { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 10px; display: grid; gap: 2px; box-shadow: var(--shadow-card); }
.es-stat b { font-size: 24px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.es-stat span { font-size: 12px; color: var(--muted); font-weight: 600; }
.es-stat.ok b { color: var(--accent); }
.es-stat.mid b { color: #d97706; }

/* ---------------------------------------------------------------- cards / grade */
.card { background: var(--panel); border: 1px solid #e7efea; border-radius: var(--radius); padding: 18px 20px; min-width: 0; box-shadow: var(--shadow-card); }
.card h3 { margin: 0 0 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 750; }
.card.wide { grid-column: 1 / -1; }
.card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.card-top h3 { margin: 0; }
.card-top .muted { font-size: 12px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.section { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 750; margin: 24px 0 10px; }
.alert { background: var(--bad-soft); color: var(--bad); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; font-weight: 600; }
.alert.warn { background: var(--warn-soft); color: var(--warn); font-weight: 500; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.hint { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.warn-t { color: #b45309; font-weight: 700; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; word-break: break-word; font-weight: 600; }
pre { white-space: pre-wrap; word-break: break-word; font-size: 11px; margin: 0; max-height: 260px; overflow: auto; background: var(--bg); border-radius: 10px; padding: 10px; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
td { padding: 6px 4px; border-top: 1px solid var(--line); vertical-align: top; }
td.r { white-space: nowrap; }
td:nth-child(1) { width: 52px; } td:nth-child(2) { width: 34%; } td:nth-child(3) { width: 22%; }
td:last-child { word-break: break-all; }
.res-pass { color: var(--accent); font-weight: 600; } .res-fail { color: var(--bad); font-weight: 600; } .res-warn { color: var(--warn); font-weight: 600; }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.back { margin-bottom: 12px; padding: 6px 0; font-weight: 650; color: var(--accent-hover); }
.lightbox { position: fixed; inset: 0; background: rgba(4,14,10,.9); display: grid; place-items: center; z-index: 70; cursor: zoom-out; }
.lightbox img { max-width: 94vw; max-height: 94vh; border-radius: 12px; }

/* ---------------------------------------------------------------- capa (pessoa / caso) */
.hero { position: relative; display: flex; align-items: flex-start; gap: 20px; background: var(--panel); border: 1px solid #e7efea;
  border-radius: 22px; box-shadow: var(--shadow-card); padding: 44px 24px 22px; margin-bottom: 16px; overflow: hidden; }
.hero::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 84px; background: var(--brand-grad); }
.hero::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 84px; pointer-events: none;
  background: radial-gradient(260px 120px at 85% -20%, rgba(255,255,255,.35), transparent 70%),
              repeating-linear-gradient(0deg, rgba(255,255,255,.06) 0 2px, transparent 2px 7px); }
.hero > * { position: relative; z-index: 1; }
.hero .av.lg { box-shadow: 0 0 0 5px #fff, 0 14px 30px -14px rgba(11,31,23,.45); }
.hero-main { flex: 1; min-width: 0; display: grid; gap: 7px; padding-top: 50px; }
.hero-main h2 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.035em; line-height: 1.15; overflow-wrap: anywhere; }
.hero-meta { color: var(--muted); font-size: 13.5px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hero-id { color: var(--faint); font-size: 11px; }
.hero-dl { margin: 2px 0; }
.hero.loading h2 { opacity: .7; }
.case-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.score { font-size: 30px; font-weight: 700; line-height: 1; }

/* medidor de risco — cor segue o nível */
.gauge { flex: 0 0 auto; min-width: 140px; text-align: right; display: grid; gap: 2px; padding: 50px 0 0; }
.gauge.rk-min, .gauge.rk-low, .gauge.rk-mid, .gauge.rk-high { background: none; border-radius: 0; }
.g-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.g-value { font-size: 44px; font-weight: 850; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.g-level { font-size: 12.5px; font-weight: 750; }
.g-bar { height: 7px; border-radius: 999px; background: var(--line-2); overflow: hidden; margin-top: 6px; }
.g-bar span { display: block; height: 100%; border-radius: 999px; }
.gauge.rk-min .g-value, .gauge.rk-min .g-level, .gauge.rk-low .g-value, .gauge.rk-low .g-level { color: var(--accent); }
.gauge.rk-mid .g-value, .gauge.rk-mid .g-level { color: var(--warn); }
.gauge.rk-high .g-value, .gauge.rk-high .g-level { color: var(--bad); }
.gauge.rk-min .g-bar span, .gauge.rk-low .g-bar span { background: var(--accent); }
.gauge.rk-mid .g-bar span { background: var(--warn); }
.gauge.rk-high .g-bar span { background: var(--bad); }
.rk { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; border-radius: 7px; padding: 1px 8px; }
.rk::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.rk-min, .rk-low { color: var(--accent-hover); background: var(--accent-soft); }
.rk-mid { color: var(--warn); background: var(--warn-soft); }
.rk-high { color: var(--bad); background: var(--bad-soft); }
.lv-ok { color: var(--accent-hover); } .lv-mid { color: var(--warn); } .lv-bad { color: var(--bad); }

/* decisão em destaque */
.decide { margin-bottom: 16px; display: grid; gap: 12px; }
.decide.urgent { border-color: #f6dcb8; background: linear-gradient(180deg, #fff8ee, #fff 70%); }
.decide-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.decide-top h3 { margin: 0; color: var(--ink); text-transform: none; letter-spacing: -.01em; font-size: 17px; font-weight: 800; }
.decide .actions { margin-top: 0; }
.decide .btn { min-height: 46px; padding: 10px 20px; border-radius: 14px; }

/* números (KPIs) */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi { background: var(--panel); border: 1px solid #e7efea; border-radius: var(--radius); box-shadow: var(--shadow-card);
  padding: 16px 18px; text-align: left; font: inherit; color: var(--ink); min-width: 0; }
.kpi-label { font-size: 11.5px; font-weight: 750; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.kpi-value { font-size: 32px; font-weight: 850; letter-spacing: -.04em; line-height: 1.1; margin-top: 8px; font-variant-numeric: tabular-nums; }
.kpi-value .lv-ok, .kpi-value .lv-mid, .kpi-value .lv-bad { font-size: 22px; }
.kpi-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.kpi.act { cursor: pointer; transition: transform .1s, box-shadow .15s, border-color .15s; }
.kpi.act:hover { border-color: var(--accent-tint); box-shadow: var(--shadow-pop); }
.kpi.act:active { transform: translateY(1px); }
.kpi.hot { background: linear-gradient(160deg, #fff7ea, #ffefd6); border-color: #f6dcb8; }
.kpi.hot .kpi-value, .kpi.hot .kpi-sub { color: var(--warn); }
.kpi.hot .kpi-sub { font-weight: 700; }

/* tentativas (ficha da pessoa) */
.attempt { margin-bottom: 12px; display: grid; gap: 12px; }
.attempt-body { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; }
.att-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.att-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.facts { display: grid; align-content: start; }
.fact { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.fact:last-child { border-bottom: 0; }
.fact span { color: var(--muted); }
.fact b { text-align: right; }

/* mídia */
.imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.imgs figure { margin: 0; }
.imgs img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); cursor: zoom-in; background: var(--bg);
  transition: transform .15s, box-shadow .15s; }
.imgs img:hover { transform: translateY(-1px); box-shadow: var(--shadow-pop); }
.imgs figcaption { font-size: 11.5px; color: var(--muted); margin-top: 4px; font-weight: 600; }
.imgs figure.vid { grid-column: 1 / -1; max-width: 420px; }
.imgs video { width: 100%; border-radius: 14px; border: 1px solid var(--line); background: #000; box-shadow: var(--shadow-card); }
.imgs.docs { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.imgs.docs img { aspect-ratio: 1.58; }
.imgs.frames { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); margin-top: 10px; gap: 8px; }
.imgs.frames img { aspect-ratio: 3/4; }
.imgs figure.best img { outline: 2.5px solid var(--accent); outline-offset: 1px; }
.card > figure.vid { margin: 0 0 6px; max-width: 360px; }
.card > figure.vid video { width: 100%; border-radius: 16px; background: #000; box-shadow: var(--shadow-card); }
.card > figure.vid figcaption { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

/* selfie remontada */
.flip { max-width: 360px; border-radius: 18px; overflow: hidden; background: #0b1f17; box-shadow: var(--shadow-pop); margin: 6px 0 12px; }
.flip-img { display: block; width: 100%; aspect-ratio: 3/4; object-fit: cover; background: #0b1f17; cursor: pointer; }
.flip-bar { display: flex; align-items: center; gap: 8px; padding: 9px 10px; background: #0f2a20; }
.flip-bar .btn { background: #1d3d31; border-color: #1d3d31; color: #fff; min-width: 40px; }
.flip-range { flex: 1; accent-color: #6ee7b7; min-width: 0; padding: 0; border: 0; background: transparent; }
.flip-time { color: #b8c7c0; font-size: 12px; min-width: 44px; text-align: right; }

/* checagens */
.cklist { list-style: none; margin: 0; padding: 0; }
.ck { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line-2); font-size: 13.5px; }
.cklist .ck:first-child { border-top: 0; }
.ck-ico { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.ck-pass .ck-ico { background: var(--accent-soft); color: var(--accent-hover); }
.ck-warn .ck-ico { background: var(--warn-soft); color: var(--warn); }
.ck-fail .ck-ico { background: var(--bad-soft); color: var(--bad); }
.ck-fail .ck-name { color: var(--bad); font-weight: 650; }
.ck-warn .ck-name { color: var(--warn); font-weight: 650; }
.ck-det { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.ckok { margin-top: 8px; }
.ckok summary, .sum-h { cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 650; }
.hit-row { padding: 4px 0; }

/* zona de perigo */
.danger-zone { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 20px;
  border: 1px dashed #efc2bc; border-radius: var(--radius); padding: 16px 18px; background: #fffafa; }
.danger-zone .muted { font-size: 12.5px; }

/* ---------------------------------------------------------------- Painel (dashboard) */
#app.dash-mode .work { grid-template-columns: minmax(0, 1fr); }
#app.dash-mode .side { display: none; }
#app.dash-mode .main { padding: 30px 32px 64px; }
#app.dash-mode #detail { max-width: 1200px; }
.dash { display: grid; gap: 18px; }
.dash-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dash-head h2 { margin: 0; font-size: 30px; font-weight: 850; letter-spacing: -.04em; }
.dash-head .muted { font-size: 12px; }
.dash .kpis { margin-bottom: 0; }
.k-top .kpi:last-child { background: var(--brand-grad); border-color: transparent; color: #fff; box-shadow: 0 18px 40px -20px rgba(10,46,34,.8); }
.k-top .kpi:last-child .kpi-label, .k-top .kpi:last-child .kpi-sub { color: rgba(255,255,255,.78); }
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.dash-grid .card.wide { grid-column: 1 / -1; }

.chart-wrap { position: relative; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: #e9f0ec; stroke-width: 1; }
.chart .ax { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .bar { fill: var(--accent); }
.chart .hit { fill: transparent; cursor: pointer; }
.chart .hit.on { fill: rgba(14,159,110,.07); }
.chart-tip { position: absolute; top: -6px; pointer-events: none; background: var(--ink); color: #fff; border-radius: 12px;
  padding: 8px 11px; font-size: 12px; line-height: 1.35; box-shadow: var(--shadow-pop); white-space: nowrap; z-index: 2; }
.chart-tip .muted { color: #b8c7c0; }
details.tbl { margin-top: 8px; }
details.tbl summary { cursor: pointer; color: var(--muted); font-size: 12px; }
details.tbl table { margin-top: 6px; font-size: 12px; }

.srow { padding: 9px 0; }
.srow + .srow { border-top: 1px solid var(--line-2); }
.srow-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.srow-top b { font-variant-numeric: tabular-nums; }
.meter { height: 7px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 999px; }
.cname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* tabela de países */
.ctable { width: 100%; border-collapse: collapse; table-layout: auto; font-size: 14px; font-variant-numeric: tabular-nums; }
.ctable th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 750; text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.ctable td { padding: 11px 10px; border-top: 0; border-bottom: 1px solid var(--line-2); vertical-align: middle; width: auto !important; word-break: normal; }
.ctable tr:last-child td { border-bottom: 0; }
.ctable .r { text-align: right; white-space: nowrap; }
.ctable tr.act { cursor: pointer; }
.ctable tr.act:hover td { background: var(--accent-soft); }
.ctable tr.act td:first-child { border-radius: 10px 0 0 10px; } .ctable tr.act td:last-child { border-radius: 0 10px 10px 0; }
.ctable .cname { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.ctable .cbar { display: block; height: 5px; border-radius: 3px; background: var(--line-2); margin-top: 7px; max-width: 240px; overflow: hidden; }
.ctable .cbar span { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #0c7c55, #34d399); }

/* fila de revisão no painel */
.plist { list-style: none; margin: 0; padding: 0; }
.plist li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 8px; cursor: pointer;
  border-top: 1px solid var(--line-2); border-radius: 10px; transition: background .12s; }
.plist li:first-child { border-top: 0; }
.plist li:hover { background: var(--accent-soft); }
.plist li > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plist li .muted { font-size: 12px; flex-shrink: 0; }

/* funil */
.fn-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.fn-sel { padding: 6px 10px; font-size: 12.5px; min-height: 34px; border-radius: 10px; }
.fn { display: grid; gap: 2px; margin-top: 6px; }
.fn-row { display: grid; grid-template-columns: minmax(0, 220px) 1fr 90px 130px; align-items: center; gap: 12px; padding: 7px 10px; border-radius: 10px; }
.fn-row.worst { background: var(--bad-soft); }
.fn-label { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fn-bar { height: 10px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.fn-bar span { display: block; height: 100%; background: linear-gradient(90deg, #0c7c55, #34d399); border-radius: 999px; }
.fn-row.worst .fn-bar span { background: var(--bad); }
.fn-n { text-align: right; font-variant-numeric: tabular-nums; }
.fn-n .muted { font-size: 12px; }
.fn-drop { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.fn-row.worst .fn-drop { color: var(--bad); font-weight: 700; }
.fn-extra { margin-top: 12px; }
.fn-docs { margin-top: 10px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 13px; }

/* ---------------------------------------------------------------- Ajustes (configurações) */
.wizard { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; max-width: 860px; }
.wizard h3 { display: flex; align-items: center; gap: 10px; text-transform: none; letter-spacing: -.01em; font-size: 16px; font-weight: 800; color: var(--ink); }
.wizard h3 .muted { font-size: 12px; font-weight: 500; }
.step-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 800; flex-shrink: 0; }
.step-n.ok { background: var(--accent); border-color: var(--accent); color: #fff; }
.secret-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.secret-row code { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; word-break: break-all; flex: 1; min-width: 0; }
.secret { margin: 10px 0; }
.secret .muted { font-size: 12px; margin-bottom: 4px; }
.chips.big { gap: 6px; margin: 10px 0; }
.chips.big .chip { font-size: 12px; padding: 4px 4px 4px 10px; color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.chip .x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 4px; }
.chip .x:hover { color: var(--bad); }
.chips.suggest { margin-bottom: 10px; }
.chip.add { cursor: pointer; font: inherit; font-size: 12px; padding: 3px 9px; border: 1px dashed var(--accent-tint); color: var(--accent); background: var(--panel); }
form.inline { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
form.inline input { flex: 1; min-width: 200px; width: auto; }
.hook { padding: 12px 0; border-bottom: 1px solid var(--line-2); display: grid; gap: 4px; }
.hook .muted { font-size: 12px; }
.result { border-radius: 12px; padding: 11px 13px; margin-top: 10px; font-weight: 500; }
.result.ok { background: var(--accent-soft); color: var(--accent-hover); }
.result.bad { background: var(--bad-soft); color: var(--bad); }
.result.bad span { color: var(--ink); font-weight: 400; }
.howto { margin: 12px 0; padding-left: 20px; display: grid; gap: 6px; }
table.plain { table-layout: auto; }
table.plain td { width: auto !important; padding: 9px 6px; vertical-align: middle; word-break: normal; }
table.plain td.r { text-align: right; white-space: nowrap; }
table.plain code { word-break: break-all; }
.field { display: grid; gap: 6px; color: var(--muted); margin-bottom: 12px; font-weight: 600; font-size: 13px; }
.field .src, .switch .src, .src { font-size: 11px; }
.color-row { display: flex; gap: 8px; }
.color-row input[type=color] { width: 48px; height: 42px; padding: 2px; flex-shrink: 0; cursor: pointer; }
.preview { --brand: #0B6E4F; border: 1px dashed var(--line); border-radius: 14px; padding: 16px; display: grid; gap: 10px; justify-items: start; }
.preview-name { font-weight: 800; color: var(--brand); }
.preview-btn { background: var(--brand); color: #fff; border-radius: 10px; padding: 8px 14px; font-weight: 700; }
.switch, .radio { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; cursor: pointer; }
.switch input, .radio input[type=radio] { width: auto; margin-top: 3px; flex-shrink: 0; accent-color: var(--accent); }
input.iso { width: 56px; text-transform: uppercase; padding: 5px 8px; display: inline-block; }
.role-owner { background: var(--accent-soft); color: var(--accent-hover); }
.role-reviewer { background: var(--info-soft); color: var(--info); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.toggle-row > div { min-width: 0; }
.callout { background: var(--accent-soft); border: 1px solid var(--accent-tint); border-radius: 14px; padding: 14px 16px; }
.callout b { color: var(--accent-hover); }
.callout p { margin: 6px 0 0; color: var(--ink); }

/* ---------------------------------------------------------------- modais, confirmação, avisos */
.modal { position: fixed; inset: 0; background: rgba(6,20,14,.5); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 60; padding: 16px; }
.modal-card { background: var(--panel); border-radius: 20px; padding: 24px; width: 100%; max-width: 560px; max-height: 90vh; overflow: auto; box-shadow: 0 30px 70px -25px rgba(0,0,0,.5); }
.modal-card h2 { margin: 0 0 12px; font-size: 19px; }
.cf-wrap { position: fixed; inset: 0; z-index: 60; background: rgba(6,20,14,.5); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 16px; animation: cfIn .14s ease-out; }
.cf-card { background: var(--panel); border-radius: 22px; box-shadow: 0 30px 70px -25px rgba(0,0,0,.5); width: 100%; max-width: 420px;
  padding: 24px 24px 20px; display: grid; gap: 8px; animation: popIn .18s cubic-bezier(.2,.9,.3,1.2); }
.cf-card h3 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.cf-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.cf-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.cf-actions .btn { min-height: 44px; padding: 9px 18px; }
@keyframes cfIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
#toasts { position: fixed; z-index: 80; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: grid; gap: 8px; width: min(440px, calc(100% - 32px)); pointer-events: none; }
.toast { background: var(--ink); color: #fff; border-radius: 14px; padding: 13px 16px; font-weight: 650; font-size: 14px;
  box-shadow: 0 14px 34px -12px rgba(0,0,0,.45); animation: tIn .18s ease-out; transition: opacity .3s, transform .3s; }
.toast.ok { background: #0b6b4a; }
.toast.bad { background: var(--bad); }
.toast.out { opacity: 0; transform: translateY(6px); }
@keyframes tIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* exportar (ZIP) */
.ex-card { max-width: 480px; gap: 12px; }
.ex-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn { border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 999px; padding: 7px 13px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.chip-btn.on, .chip-btn:hover { border-color: var(--accent); color: var(--accent-hover); background: var(--accent-soft); }
.ex-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ex-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); font-weight: 700; }
.ex-grid input, .ex-grid select { font-size: 14px; min-height: 42px; }
.ex-wide { grid-column: 1 / -1; }
.ex-grid label.ex-check { flex-direction: row; align-items: center; gap: 10px; font-size: 14px; color: var(--ink); font-weight: 600;
  padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.ex-grid label.ex-check input { width: 18px; height: 18px; min-height: 0; padding: 0; accent-color: var(--accent); }
.ex-count { font-size: 14px; color: var(--muted); padding: 11px 13px; border-radius: 12px; background: var(--accent-soft); }
.ex-count b { color: var(--ink); }

/* carregando */
.ld-spin { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--accent-soft); border-top-color: var(--accent);
  border-radius: 50%; vertical-align: -2px; margin-right: 4px; animation: ldspin .7s linear infinite; }
@keyframes ldspin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- telas médias */
@media (max-width: 1180px) { .work { grid-template-columns: 340px minmax(0, 1fr); } .me-txt { display: none; } }
@media (max-width: 1000px) {
  .attempt-body { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modes button { padding: 8px 12px; }
}

/* ---------------------------------------------------------------- CELULAR (app) */
@media (max-width: 820px) {
  :root { --top-h: 56px; }
  .app { display: block; min-height: 100%; height: auto; padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
  /* sem backdrop-filter aqui: ele faria a barra inferior (position: fixed) grudar no topo */
  .topbar { grid-template-columns: 1fr auto; height: auto; min-height: var(--top-h); padding: env(safe-area-inset-top) 16px 0;
    backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(251,253,252,.97); }
  .topbar .vbrand { font-size: 20px; }
  .me-txt { display: none; }
  .me-av { width: 32px; height: 32px; }

  /* navegação vira barra inferior com ícones (estilo app) */
  .modes { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    gap: 0; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); border-radius: 0; background: rgba(255,255,255,.9);
    backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px); border-top: 1px solid var(--line); }
  .modes button { flex-direction: column; gap: 3px; padding: 6px 2px; border-radius: 12px; font-size: 11px; font-weight: 650; color: var(--faint); }
  .modes button .ico { width: 24px; height: 24px; }
  .modes button.on { background: transparent; color: var(--accent); box-shadow: none; }
  .modes button.on .ico { stroke-width: 2.2; }
  .nbadge { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; font-size: 10.5px; box-shadow: 0 0 0 2px #fff; }
  .modes button.on .nbadge { background: #f59e0b; color: #fff; }

  .work { display: block; }
  .side { border: 0; background: var(--bg); min-height: calc(100vh - var(--top-h) - var(--nav-h)); }
  .list-head { padding: 18px 16px 8px; }
  .lh-title h2 { font-size: 28px; }
  .tabs { margin: 4px 16px 10px; }
  .tabs button { font-size: 13px; padding: 8px 10px; }
  .filters { padding: 0 16px 12px; border-bottom: 0; }
  .search-box input, .country-sel { min-height: 44px; font-size: 16px; }   /* 16px evita zoom no iOS */
  .country-sel { max-width: 120px; font-size: 15px; }
  .list { padding: 0 12px 20px; overflow: visible; }
  .list li { background: #fff; box-shadow: 0 0 0 1px #e9f0ec; padding: 14px; }
  .list li + li { margin-top: 8px; }
  .list li.on { box-shadow: 0 0 0 1px #e9f0ec; }
  .pli-name { font-size: 16px; }

  /* ficha / caso: tela cheia por cima, desliza da direita */
  .main { position: fixed; inset: 0; z-index: 40; background: var(--bg); transform: translateX(100%); transition: transform .26s cubic-bezier(.2,.8,.2,1);
    overflow: auto; padding: 0 14px calc(28px + env(safe-area-inset-bottom)); overscroll-behavior: contain; }
  #app.detail-open .main { transform: translateX(0); }
  .m-back { display: block; position: sticky; top: 0; z-index: 5; width: calc(100% + 28px); margin: 0 -14px 12px;
    padding: calc(14px + env(safe-area-inset-top)) 16px 12px; text-align: left; font-weight: 700; font-size: 16px;
    background: rgba(243,247,245,.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 0; border-bottom: 1px solid var(--line);
    color: var(--accent-hover); cursor: pointer; }

  #app.dash-mode .main { position: static; transform: none; overflow: visible; padding: 18px 14px 28px; }
  #app.dash-mode .m-back { display: none !important; }
  .dash-head h2 { font-size: 28px; }
  .dash-grid { grid-template-columns: 1fr; }
  .kpi { padding: 14px; }
  .kpi-value { font-size: 26px; }

  .hero { flex-wrap: wrap; padding: 40px 16px 18px; border-radius: 20px; gap: 14px; }
  .hero::before, .hero::after { height: 76px; }
  .hero .av.lg { width: 80px; height: 80px; font-size: 28px; }
  .hero-main { padding-top: 0; flex-basis: 100%; }
  .hero-main h2 { font-size: 24px; }
  .gauge { width: 100%; text-align: left; display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 12px; padding: 0; }
  .gauge .g-label, .gauge .g-bar { grid-column: 1 / -1; }
  .g-value { font-size: 34px; }
  .kpis-3 { grid-template-columns: 1fr 1fr; }
  .grid { grid-template-columns: 1fr; gap: 12px; }
  .card { padding: 16px; border-radius: 18px; }
  .imgs { grid-template-columns: 1fr 1fr; }
  .imgs figure.vid { grid-column: 1 / -1; max-width: 100%; }
  .imgs.docs { grid-template-columns: 1fr; }
  .imgs.frames { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  dl.kv { grid-template-columns: 1fr; gap: 2px 0; }
  dl.kv dt { margin-top: 8px; font-size: 12px; }
  .card .actions { gap: 10px; }
  .card .actions .btn { flex: 1 1 100%; min-height: 52px; font-size: 15px; }
  .card .actions .btn.primary { order: -1; }
  .decide .actions .btn { flex: 1 1 100%; }
  .empty-state { margin-top: 4vh; }
  .flip { max-width: 100%; }
  .fn-row { grid-template-columns: 1fr auto; row-gap: 4px; }
  .fn-bar { grid-column: 1 / -1; grid-row: 2; }
  .fn-drop { grid-column: 1 / -1; }
  .fn-sel { flex: 1 1 100%; }
  .modal-card { max-height: 88vh; }
  table, pre { font-size: 12px; }
}
@media (max-width: 640px) { .ctable .hide-s { display: none; } }
@media (max-width: 520px) {
  .cf-actions { flex-direction: column-reverse; } .cf-actions .btn { width: 100%; }
  .ex-grid { grid-template-columns: 1fr; }
}
@media (max-width: 380px) { .imgs { grid-template-columns: 1fr; } .modes button { font-size: 10.5px; } }
