/* ─────────────────────────────────────────────────────────────
   Customer Portal · mobile companion
   Linguagem herdada de pages/mobile-handoff.html.
   Contraste alvo: WCAG AAA (texto ≥ 7:1, texto grande ≥ 4.5:1),
   alvos de toque ≥ 44px — critérios do PRODUCT.md do portal.
   ───────────────────────────────────────────────────────────── */

:root {
  --ground: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f7f8f9;
  --line: #dcdfe1;
  --line-strong: #939596;   /* elementos gráficos que carregam estado */
  --line-soft: #f0f1f2;

  --ink: #1a1d1f;      /* 16.4:1 sobre surface */
  --ink-2: #4e5356;    /* 8.0:1  sobre surface */
  --ink-3: #6b7073;    /* 5.2:1  — só para texto grande / rótulos ≥ 18px */

  --brand: #007167;        /* marca: superfícies, ícones, traços */
  --brand-deep: #00564e;   /* fundo de barra: branco em cima = 8.4:1 */
  --brand-ink: #00554d;    /* verde para texto pequeno: 8.6:1 sobre surface */
  --brand-wash: #e6f0ef;

  --warn-ink: #7d431c;
  --warn-wash: #fdf3ea;
  --ok-ink: #1f6b3f;
  --ok-wash: #eaf4ee;

  --radius: 14px;
  --radius-sm: 9px;

  /* Assinatura do portal desktop: borda quase invisível + sombra suave "Apple",
     em vez da linha cinza chapada. Espelha --nz-shadow de assets/tables.css. */
  --card-border: rgba(0, 0, 0, 0.06);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(0, 0, 0, 0.02);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--ground);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

:focus-visible { outline: 2px solid var(--brand-ink); outline-offset: 2px; border-radius: 4px; }

/* ── barra superior ── */
.topbar {
  background: var(--brand-deep);
  padding: calc(11px + env(safe-area-inset-top)) 14px 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.topbar-brand img { width: 20px; height: 20px; display: block; flex-shrink: 0; }
.topbar-divider { width: 1px; height: 15px; background: rgba(255, 255, 255, 0.34); flex-shrink: 0; }
.topbar-label {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-back {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin: -6px 0 -6px -8px;
  border-radius: 8px;
  color: #fff;
  text-decoration: none;
  flex-shrink: 0;
}
.topbar-back svg { width: 19px; height: 19px; }
.topbar-back::after { content: ""; position: absolute; inset: -5px; }
.topbar-back:active { background: rgba(255, 255, 255, 0.16); }
.topbar-tag {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #ffffff;
}

/* ── navegação: hamburger + drawer (espelha o mobile do portal desktop) ── */
.hamburger-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  padding: 8px 7px;
  margin: -6px -6px -6px auto;
  background: none;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}
.hamburger-btn:active { background: rgba(255, 255, 255, 0.16); }
.hamburger-line { display: block; width: 18px; height: 2px; background: #fff; border-radius: 1px; transition: transform 0.2s, opacity 0.2s; }
.hamburger-btn[aria-expanded="true"] .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn[aria-expanded="true"] .hamburger-line:nth-child(2) { opacity: 0; }
.hamburger-btn[aria-expanded="true"] .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(82vw, 300px);
  background: var(--surface);
  z-index: 151;
  padding: calc(14px + env(safe-area-inset-top)) 0 calc(16px + env(safe-area-inset-bottom));
  transform: translateX(100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
  box-shadow: -2px 0 16px rgba(0, 0, 0, 0.14);
  display: flex;
  flex-direction: column;
}
.mobile-nav.open .mobile-nav-overlay { opacity: 1; pointer-events: auto; }
.mobile-nav.open .mobile-nav-drawer { transform: translateX(0); }

.mobile-nav-head { display: flex; align-items: center; padding: 2px 12px 12px 20px; }
.mobile-nav-brand { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); }

/* Perfil no topo do drawer (movido da home). Avatar = trocar foto. */
.mobile-nav-profile { display: flex; align-items: center; gap: 12px; padding: 2px 20px 16px; margin-bottom: 8px; border-bottom: 1px solid var(--line-soft); }
.mnp-avatar { position: relative; flex-shrink: 0; width: 46px; height: 46px; display: block; }
.mnp-avatar img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; display: block; box-shadow: 0 0 0 1px var(--card-border), 0 0 0 3px var(--brand-wash); }
.mnp-cam { position: absolute; right: -2px; bottom: -2px; width: 20px; height: 20px; border-radius: 50%; background: var(--brand-deep); color: #fff; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--surface); }
.mnp-cam svg { width: 11px; height: 11px; }
.mnp-info { min-width: 0; }
.mnp-name { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; color: var(--ink); }
.mnp-role { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.mobile-nav-close {
  margin-left: auto;
  width: 40px;
  height: 40px;
  border: 0;
  background: none;
  color: var(--ink-2);
  cursor: pointer;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.mobile-nav-close svg { width: 18px; height: 18px; }
.mobile-nav-close:active { background: var(--surface-2); }

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 20px;
  min-height: 48px;
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.mobile-nav-link svg { width: 20px; height: 20px; color: var(--ink-2); flex-shrink: 0; }
.mobile-nav-link:active { background: var(--surface-2); }
.mobile-nav-link.active { color: var(--brand-ink); font-weight: 700; background: var(--brand-wash); }
.mobile-nav-link.active svg { color: var(--brand-ink); }
.mobile-nav-count {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  background: var(--brand);
  border-radius: 999px;
  padding: 1px 8px;
  font-variant-numeric: tabular-nums;
}
.mobile-nav-foot { margin-top: auto; padding: 15px 20px 2px; border-top: 1px solid var(--line-soft); }
.mobile-nav-user { font-size: 13px; font-weight: 600; color: var(--ink); }
.mobile-nav-note { font-size: 12px; color: var(--ink-2); margin-top: 3px; }

/* ── layout ── */
main {
  flex: 1;
  padding: 16px 14px 8px;
  max-width: 620px;
  width: 100%;
  margin: 0 auto;
}

h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.18;
}
h2 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-2);
  margin: 26px 2px 9px;
}

/* Header de perfil da home (moderno): avatar à esquerda, nome em destaque. */
.greet {
  display: flex;
  align-items: center;
  gap: 15px;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 15px 18px;
  box-shadow: var(--shadow);
}
.greet-avatar { position: relative; flex-shrink: 0; width: 56px; height: 56px; display: block; }
.greet-avatar img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; display: block; box-shadow: 0 0 0 1px var(--card-border), 0 0 0 4px var(--brand-wash); }
.greet-cam {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand-deep);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px var(--surface);
}
.greet-cam svg { width: 12px; height: 12px; }
.greet-body { min-width: 0; }
.greet-hi { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.greet-role { font-size: 13.5px; color: var(--ink-2); margin-top: 3px; }

/* ── faixa de handoff: algo chegou do desktop (moldura da marca) ── */
.handoff { margin-top: 14px; border: 1px solid var(--brand); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.handoff-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--brand-wash);
  color: var(--brand-ink);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.handoff-head svg { width: 16px; height: 16px; flex-shrink: 0; }
.handoff-count { margin-left: auto; font-size: 11px; font-weight: 700; letter-spacing: 0.02em; text-transform: none; }
.handoff-body { background: var(--surface); }
.handoff-body .row:first-child { border-top: 0; }

/* ── cabeçalho de grupo (lista agrupada por linha) ── */
.list-group-head { display: flex; align-items: baseline; gap: 8px; margin: 22px 2px 9px; }
.list-group-name { font-size: 13px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.list-group-count { font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* ── título de página (iOS large title), no lugar do ctxCard em listas ── */
.page-head { margin: 6px 2px 0; }
.page-head h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
/* Header com ação à direita (título/sub à esquerda, botão compacto à direita),
   como o page-header do desktop. O texto encolhe/quebra; o botão nunca. */
.page-head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.page-head-row .page-head-text { flex: 1; min-width: 0; }
.page-head-row .btn { flex-shrink: 0; }
/* Botão só-ícone (ex.: "+" para novo): círculo de 44px, alvo de toque cheio. */
.btn-icon { width: 44px; padding: 0; }
.btn-icon svg { width: 18px; height: 18px; }
.page-head-sub { font-size: 13.5px; color: var(--ink-2); margin-top: 5px; }
.page-head-badge { margin-top: 11px; display: flex; flex-wrap: wrap; gap: 6px; }
.page-head + .card { margin-top: 16px; }

/* ── gatilho de filtro (abre o bottom sheet) — escala p/ qualquer nº de linhas ── */
.filter-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.filter-trigger:active { background: var(--surface-2); }
.filter-trigger.is-active { border-color: var(--brand); background: var(--brand-wash); }
.ft-funnel { width: 16px; height: 16px; color: var(--ink-2); flex-shrink: 0; }
.ft-label { color: var(--ink-2); font-weight: 500; }
.ft-value { color: var(--brand-ink); }
.filter-trigger.is-active .ft-funnel { color: var(--brand-ink); }
.ft-chev { width: 11px; height: 11px; color: var(--ink-2); }

/* ── bottom sheet (seleção de linha) ── */
.sheet { position: fixed; inset: 0; z-index: 160; pointer-events: none; }
.sheet.open { pointer-events: auto; }
.sheet-overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.4); opacity: 0; transition: opacity 0.2s; }
.sheet.open .sheet-overlay { opacity: 1; }
.sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--surface);
  border-radius: 18px 18px 0 0;
  max-height: 72vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.26s ease;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.16);
}
.sheet.open .sheet-panel { transform: translateY(0); }
.sheet-grip { width: 36px; height: 4px; border-radius: 2px; background: var(--line); margin: 8px auto 0; flex-shrink: 0; }
.sheet-head { display: flex; align-items: center; padding: 10px 12px 12px 20px; border-bottom: 1px solid var(--line-soft); }
.sheet-title { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.sheet-close {
  margin-left: auto;
  width: 36px;
  height: 36px;
  border: 0;
  background: none;
  color: var(--ink-2);
  cursor: pointer;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sheet-close svg { width: 16px; height: 16px; }
.sheet-close:active { background: var(--surface-2); }
.sheet-search { padding: 12px 16px 4px; }
.sheet-search input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 0 13px;
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
}
.sheet-list { overflow-y: auto; padding: 6px 0 10px; }
.sheet-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 20px;
  min-height: 50px;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.sheet-item:active { background: var(--surface-2); }
.sheet-item.is-active { color: var(--brand-ink); font-weight: 700; }
.sheet-check { width: 18px; height: 18px; color: var(--brand-ink); opacity: 0; flex-shrink: 0; }
.sheet-item.is-active .sheet-check { opacity: 1; }
.sheet-item-label { flex: 1; min-width: 0; }
.sheet-item-count { font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* ── listas em cartão ── */
.card {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 16px;
  border-top: 1px solid var(--line-soft);
  min-height: 56px;
  text-decoration: none;
  color: inherit;
}
.row:first-child { border-top: 0; }
a.row:active { background: var(--brand-wash); }
.row-body { flex: 1; min-width: 0; }
.row-title { display: block; font-size: 15.5px; font-weight: 600; letter-spacing: -0.012em; line-height: 1.3; }
.row-sub { display: block; font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.row-chevron { flex-shrink: 0; width: 8px; height: 13px; color: var(--ink-2); }
.row-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--brand-wash);
  color: var(--brand-ink);
  display: flex;
  align-items: center;
  justify-content: center;
}
.row-icon svg { width: 19px; height: 19px; }
/* thumbnail com a foto da máquina (no lugar do ícone genérico) */
.row-thumb {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  object-fit: contain;
  padding: 3px;
}

/* Cabeçalho de seção com link "All N ›" + máquinas em evidência na home */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin: 6px 2px 9px; }
.sec-head h2 { margin: 0; }
.sec-link { font-size: 12.5px; font-weight: 600; color: var(--brand-ink); text-decoration: none; white-space: nowrap; }
.mlist { display: flex; flex-direction: column; gap: 10px; }
.mrow-end { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.mstatus { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.mstatus::before { content: ''; width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.mstatus.running { color: #0f7a4d; }
.mstatus.running::before { background: #16a34a; }
.mstatus.idle { color: var(--ink-2); }
.mstatus.idle::before { background: #9ca3af; }
.mstatus.attention { color: #b4530a; }
.mstatus.attention::before { background: #e0820f; }

/* ── pares rótulo/valor (ficha técnica) ── */
.spec { display: flex; gap: 14px; padding: 11px 16px; border-top: 1px solid var(--line-soft); }
.spec:first-child { border-top: 0; }
.spec dt { flex: 1; font-size: 13.5px; color: var(--ink-2); min-width: 0; }
.spec dd {
  font-size: 13.5px;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.008em;
}

/* ── peças ── */
.part { display: flex; align-items: center; gap: 13px; padding: 13px 16px; border-top: 1px solid var(--line-soft); }
.part:first-child { border-top: 0; }
/* variante em 2 linhas (lista de peças com quantidade) */
.part.is-stacked { flex-direction: column; align-items: stretch; gap: 12px; }
.part-top { display: flex; align-items: center; gap: 13px; }
.part-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.part-add { min-width: 96px; }
.part-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--brand-wash);
  color: var(--brand-ink);
  display: flex;
  align-items: center;
  justify-content: center;
}
.part-icon svg { width: 19px; height: 19px; }
.part-body { flex: 1; min-width: 0; }
.part-name { font-size: 15px; font-weight: 600; letter-spacing: -0.012em; line-height: 1.3; }
.part-meta { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; font-variant-numeric: tabular-nums; }
/* usados por cart.html e quote.html (linhas de peça/quantidade) */
.part-pos { flex-shrink: 0; font-size: 11.5px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; width: 26px; }
.part-code { font-size: 13px; color: var(--ink-2); margin-top: 2px; font-variant-numeric: tabular-nums; }
.part-right { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.part-price { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.part-price.quote { color: var(--ink-2); font-weight: 500; font-size: 12.5px; }

/* ── botões ── */
.btn {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  min-height: 44px;
  padding: 0 14px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-decoration: none;
}
.btn:active { background: var(--brand-wash); border-color: var(--brand); color: var(--brand-ink); }
.btn.is-done { color: var(--brand-ink); border-color: var(--brand); }
.btn-full { width: 100%; }
.btn-primary { background: var(--brand-deep); border-color: var(--brand-deep); color: #fff; box-shadow: 0 2px 8px rgba(0, 113, 103, 0.22); }
.btn-primary:active { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-secondary { background: var(--surface-2); border-color: transparent; color: var(--ink-2); }
.btn-secondary:active { background: var(--brand-wash); border-color: var(--brand); color: var(--brand-ink); }

/* pop no contador da Send list quando um item entra (feedback sem overlay) */
@keyframes send-bump {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.35); }
  100% { transform: scale(1); }
}
.topbar-send-count.is-bump { animation: send-bump .35s ease; }
@media (prefers-reduced-motion: reduce) { .topbar-send-count.is-bump { animation: none; } }
.copy { position: relative; min-height: 34px; padding: 0 12px; font-size: 11.5px; border-radius: 999px; }
.copy::after { content: ""; position: absolute; inset: -5px -6px; }

/* ── timeline de rastreio ── */
.track { padding: 4px 16px 14px; }
.track-step { display: flex; gap: 13px; padding-top: 14px; }
.track-mark { flex-shrink: 0; width: 22px; display: flex; flex-direction: column; align-items: center; align-self: stretch; }
.track-dot {
  display: block;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: var(--surface);
  margin-top: 3px;
  flex-shrink: 0;
}
.track-step.is-done .track-dot { background: var(--brand); border-color: var(--brand); }
.track-line { display: block; flex: 1; width: 2px; background: var(--line); margin: 4px 0 -14px; }
.track-step:last-child .track-line { display: none; }
.track-body { flex: 1; min-width: 0; padding-bottom: 2px; }
.track-title { display: block; font-size: 15px; font-weight: 600; letter-spacing: -0.012em; }
.track-note { display: block; font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.track-state {
  align-self: flex-start;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 5px;
  display: inline-block;
  padding: 2px 8px;
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--ink-2);
}
.track-step.is-done .track-state { background: var(--brand-wash); color: var(--brand-ink); }

/* ── status hero da order (topo do detalhe) ── */
.page-head + .order-hero { margin-top: 16px; }
.order-hero {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 17px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.order-hero-ic {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--chip-bg, var(--surface-2));
  color: var(--chip-ink, var(--ink-2));
}
.order-hero-ic svg { width: 23px; height: 23px; }
.order-hero-body { flex: 1; min-width: 0; padding-top: 2px; }
.order-hero-status { display: block; font-size: 17px; font-weight: 700; letter-spacing: -0.014em; color: var(--ink); }
.order-hero-note { display: block; margin-top: 4px; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.order-hero.is-progress { --chip-bg: var(--warn-wash); --chip-ink: #b5651d; }
.order-hero.is-submitted { --chip-bg: #e9eefb;          --chip-ink: #1e3a8a; }
.order-hero.is-completed { --chip-bg: #e6f2ea;          --chip-ink: #0f5a34; }
.order-hero.is-cancelled { --chip-bg: #fbeaea;          --chip-ink: #9a1c1c; }

/* total em destaque no resumo (tipo recibo) */
.spec.is-total { border-top: 1px solid var(--line); }
.spec.is-total dt { font-weight: 600; color: var(--ink); align-self: center; }
.spec.is-total dd { font-size: 17px; font-weight: 700; color: var(--ink); }

/* rodapé discreto: "resto no computador" */
.order-foot {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 4px 2px 0;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--ink-2);
}
.order-foot svg { flex-shrink: 0; width: 16px; height: 16px; color: var(--ink-2); opacity: .85; }

/* ── linha da listagem de orders: faixa de status + valor ── */
.order-row {
  display: block;
  position: relative;
  padding: 13px 16px 13px 22px;
  border-top: 1px solid var(--line-soft);
  color: var(--ink);
  text-decoration: none;
}
.order-row:first-child { border-top: 0; }
.order-row::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 13px;
  bottom: 13px;
  width: 3px;
  border-radius: 2px;
  background: var(--accent, var(--line));
}
.order-row-top { display: flex; align-items: baseline; gap: 12px; }
.order-row-title {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.order-row-amt {
  flex-shrink: 0;
  font-size: 14.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.008em;
  color: var(--ink);
}
.order-row-meta { display: block; margin-top: 3px; font-size: 13px; color: var(--ink-2); }
.order-row-status { font-weight: 600; color: var(--accent-ink, var(--ink-2)); }
.order-row.is-progress  { --accent: #e08a0b; --accent-ink: var(--warn-ink); }
.order-row.is-submitted { --accent: #2f6fe0; --accent-ink: #1e3a8a; }
.order-row.is-completed { --accent: #1f9d57; --accent-ink: #0f5a34; }
.order-row.is-cancelled { --accent: #e0483f; --accent-ink: #9a1c1c; }

/* ── linha de Service Request (services.html) ──
   Traduz a linha da tabela do desktop (pages/services.html) para um card
   empilhado do celular: ícone de tipo colorido + status badge (.badge.is-*) +
   descrição + máquina · data. Mesmos ícones de /assets/icon-type-*.svg. */
.sr-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px;
  border-top: 1px solid var(--line-soft);
  color: var(--ink); text-decoration: none;
}
.sr-item:first-child { border-top: 0; }
.sr-item:active { background: var(--surface-2); }
.sr-type { width: 22px; height: 22px; flex-shrink: 0; margin-top: 1px; object-fit: contain; }
.sr-body { flex: 1; min-width: 0; }
.sr-top { display: flex; align-items: center; gap: 10px; }
.sr-title {
  flex: 1; min-width: 0;
  font-size: 15px; font-weight: 600; letter-spacing: -0.012em; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sr-top .badge { flex-shrink: 0; }
.sr-desc {
  margin-top: 4px; font-size: 13px; color: var(--ink-2); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sr-meta { margin-top: 5px; font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* ── barra de gasto (budget) ── */
.meter { display: block; height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--line); }
.meter-fill { display: block; height: 100%; background: var(--brand); }
.meter-fill.is-high { background: var(--warn-ink); }
.figure { display: flex; align-items: baseline; gap: 8px; }
.figure-big { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.figure-of { font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* ── busca ── */
.search { position: relative; }
.search input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 0 13px;
  font-family: inherit;
  font-size: 16px; /* < 16px faz o iOS dar zoom no foco */
  color: var(--ink);
}
.search input::placeholder { color: var(--ink-2); }
.chips { display: flex; gap: 7px; overflow-x: auto; padding: 12px 2px 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  position: relative;
  flex-shrink: 0;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 17px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}
.chip::after { content: ""; position: absolute; inset: -3px 0; }
.chip[aria-pressed="true"] { background: var(--brand-wash); border-color: var(--brand); color: var(--brand-ink); }

/* ── avisos ── */
.callout {
  border-radius: var(--radius);
  padding: 15px 17px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
}
.callout strong { color: var(--ink); font-weight: 600; }
.callout.is-warn { background: var(--warn-wash); border-color: #f0ddc9; color: var(--warn-ink); box-shadow: none; }
.callout.is-warn strong { color: var(--warn-ink); }
.callout.is-ok { background: var(--ok-wash); border-color: #cfe6d8; color: var(--ok-ink); box-shadow: none; }
.callout.is-ok strong { color: var(--ok-ink); }

/* ── badge de status (linguagem do portal: wash + bolinha viva + texto AAA) ── */
.badge {
  --dot: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 3px 10px 3px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--dot); flex-shrink: 0; }
/* Matiz do portal, texto escurecido até ≥ 7:1 sobre o wash (WCAG AAA). */
.badge.is-progress  { --dot: #e08a0b; background: var(--warn-wash); color: var(--warn-ink); }  /* In Progress */
.badge.is-submitted { --dot: #2f6fe0; background: #e9eefb;          color: #1e3a8a;         }  /* Submitted   */
.badge.is-completed { --dot: #1f9d57; background: #e6f2ea;          color: #0f5a34;         }  /* Completed   */
.badge.is-cancelled { --dot: #e0483f; background: #fbeaea;          color: #9a1c1c;         }  /* Cancelled   */

/* ── utilitários de ritmo (mesma escala do resto do app) ── */
.lead { margin-top: 16px; }              /* primeiro bloco depois do cartão de contexto */
.stack { display: flex; flex-direction: column; gap: 10px; } /* cartões irmãos sob um mesmo título */

/* ── captura Milla (photo / product code) ── */
.scan-capture { margin-top: 16px; }
.scan-capture > .btn { margin-top: 14px; }

.scan-frame {
  position: relative;
  height: 300px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  text-align: center;
  padding: 28px 24px;
  overflow: hidden;
}

/* Retículo de scanner: 4 cantos em L (não uma borda inteira). */
.scan-reticle {
  --c: rgba(0, 113, 103, 0.5);
  --len: 24px;
  --th: 2px;
  position: absolute;
  inset: 13%;
  pointer-events: none;
  background:
    linear-gradient(var(--c), var(--c)) 0 0 / var(--len) var(--th),
    linear-gradient(var(--c), var(--c)) 0 0 / var(--th) var(--len),
    linear-gradient(var(--c), var(--c)) 100% 0 / var(--len) var(--th),
    linear-gradient(var(--c), var(--c)) 100% 0 / var(--th) var(--len),
    linear-gradient(var(--c), var(--c)) 0 100% / var(--len) var(--th),
    linear-gradient(var(--c), var(--c)) 0 100% / var(--th) var(--len),
    linear-gradient(var(--c), var(--c)) 100% 100% / var(--len) var(--th),
    linear-gradient(var(--c), var(--c)) 100% 100% / var(--th) var(--len);
  background-repeat: no-repeat;
}
.scan-reticle.is-code::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  top: 50%;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
  box-shadow: 0 0 8px rgba(0, 113, 103, 0.55);
  animation: scanline 2.1s ease-in-out infinite;
}
@keyframes scanline { 0%, 100% { transform: translateY(-14px); } 50% { transform: translateY(14px); } }

/* Ícone no mesmo "chip" brand-wash que o resto do app (.row-icon), só maior. */
.scan-ico {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--brand-wash);
  color: var(--brand-ink);
  display: flex;
  align-items: center;
  justify-content: center;
}
.scan-ico svg { width: 28px; height: 28px; }
.scan-hint { position: relative; font-size: 13.5px; color: var(--ink-2); max-width: 26ch; line-height: 1.5; }

.scan-input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  padding: 0 16px;
  font-family: inherit;
  font-size: 16px; /* < 16px faz o iOS dar zoom no foco */
  color: var(--ink);
}
.scan-input::placeholder { color: var(--ink-2); }

.empty { text-align: center; padding: 30px 20px; }
.empty svg { width: 28px; height: 28px; color: var(--ink-2); margin-bottom: 10px; }
.empty h3 { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.empty p { font-size: 13.5px; color: var(--ink-2); max-width: 34ch; margin: 0 auto; line-height: 1.55; }

/* ── notificações ── */
.notif-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 13px 16px;
  border-top: 1px solid var(--line-soft);
  text-decoration: none;
  color: inherit;
}
.notif-item:first-child { border-top: 0; }
.notif-item.is-unread { background: var(--surface-2); }
a.notif-item:active { background: var(--brand-wash); }
.notif-top { display: flex; align-items: baseline; gap: 8px; }
.notif-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  align-self: flex-start;
  margin-top: 5px;
}
.notif-title { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 500; letter-spacing: -0.012em; line-height: 1.35; }
.notif-item.is-unread .notif-title { font-weight: 700; }
.notif-time { flex-shrink: 0; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.notif-desc { font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.notif-meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.notif-type {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 2px 7px;
  border-radius: 5px;
}
.notif-go { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--brand-ink); }
.notif-go svg { width: 7px; height: 12px; }
.notif-portal { margin-left: auto; font-size: 11.5px; color: var(--ink-3); }

/* ── ações de decisão (approve/reject · aceitar quote · grant/deny) ── */
.actions { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.btn-danger { color: #9a1c1c; border-color: #e6c9c9; }
.btn-danger:active { background: #fbeaea; border-color: #cf6b6b; color: #7f1414; }

/* ── campo de texto (motivo de recusa etc.) ── */
.field { margin-top: 14px; }
.field-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 0 2px 7px; }
.field-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 11px 13px;
  font-family: inherit;
  font-size: 16px; /* < 16px faz o iOS dar zoom no foco */
  color: var(--ink);
  line-height: 1.5;
}
textarea.field-input { min-height: 92px; resize: vertical; }
.field-input::placeholder { color: var(--ink-2); }
.field-input:focus { outline: none; border-color: var(--brand); }
.field-error { margin: 8px 2px 0; font-size: 12.5px; color: #9a1c1c; font-weight: 600; }

/* ── radio cards — tipo do chamado ──
   Espelha o desktop (pages/service-request.html): card com título + subtítulo,
   círculo à esquerda; selecionado ganha borda verde 2px + wash. Empilhados no
   celular: alvo de toque generoso e leitura AAA. */
.radio-cards { display: grid; gap: 10px; margin-top: 2px; }
.radio-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: var(--surface);
  cursor: pointer;
  min-height: 44px;
  transition: border-color 0.15s, background 0.15s;
}
.radio-card:active { background: var(--surface-2); }
.radio-card:focus-within { outline: 2px solid var(--brand-ink); outline-offset: 2px; }
.radio-card.is-selected {
  border-color: var(--brand);
  border-width: 2px;
  padding: 13px 15px;            /* compensa a borda +1px para não "pular" */
  background: var(--brand-wash);
}
.radio-card input { position: absolute; opacity: 0; width: 0; height: 0; }
.radio-mark {
  width: 20px; height: 20px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  flex: 0 0 auto;
  margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
}
.radio-card.is-selected .radio-mark { border-color: var(--brand); }
.radio-mark::after {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  background: var(--brand); transform: scale(0); transition: transform 0.12s;
}
.radio-card.is-selected .radio-mark::after { transform: scale(1); }
.radio-body { min-width: 0; }
/* título e subtítulo empilhados (block), igual aos .radio-card-title/subtitle
   do desktop — como spans inline eles colavam na mesma linha. */
.radio-title { display: block; font-size: 14.5px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.radio-sub { display: block; font-size: 12.5px; color: var(--ink-2); line-height: 1.35; margin-top: 3px; }
@media (prefers-reduced-motion: reduce) { .radio-card, .radio-mark::after { transition: none; } }

/* ── resultado de uma decisão (confirmação) ── */
.result { text-align: center; padding: 34px 22px; }
.result-ico {
  width: 56px; height: 56px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.result-ico svg { width: 28px; height: 28px; }
.result-ico.is-ok { background: var(--ok-wash); color: var(--ok-ink); }
.result-ico.is-no { background: #fbeaea; color: #9a1c1c; }
.result h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 7px; }
.result p { font-size: 13.5px; color: var(--ink-2); max-width: 36ch; margin: 0 auto; line-height: 1.55; }

/* ── nota de protótipo (discovery) ── */
.note { margin: 20px 2px 0; font-size: 12px; line-height: 1.6; color: var(--ink-2); }
.note strong { font-weight: 700; color: var(--ink-2); }

/* ── captura de foto: perfil (03) · problema no SR (09) · ticket de suporte (12) ──
   Um só padrão (m/capture.html), três entradas — herda o viewfinder de .scan-frame. */
.cap { margin-top: 16px; }
.cap > .btn { margin-top: 14px; }
/* Instrução da captura: fora do viewfinder, logo acima do botão, uma linha. */
.cap-hint { margin: 13px 2px 0; text-align: center; font-size: 13px; line-height: 1.5; color: var(--ink-2); }

/* ── viewfinder de câmera: escuro, guia clara, shutter redondo (tela "tirar foto") ── */
.cam { margin-top: 16px; display: flex; flex-direction: column; align-items: center; min-height: calc(100dvh - 210px); }
.cam-frame {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-height: 300px;
  border-radius: 20px;
  overflow: hidden;
  background: radial-gradient(125% 95% at 50% 32%, #2b3036, #15171a 72%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 8px 24px rgba(0, 0, 0, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
}
/* guia circular para o rosto, com o resto do quadro escurecido (spotlight) */
.cam-guide.is-face {
  width: min(58%, 196px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.3);
}
/* guia em 4 cantos (foto do problema / scan) */
.cam-guide.is-frame {
  position: relative;
  --c: rgba(255, 255, 255, 0.9);
  --len: 26px;
  --th: 2px;
  width: 66%;
  height: 62%;
  background:
    linear-gradient(var(--c), var(--c)) 0 0 / var(--len) var(--th),
    linear-gradient(var(--c), var(--c)) 0 0 / var(--th) var(--len),
    linear-gradient(var(--c), var(--c)) 100% 0 / var(--len) var(--th),
    linear-gradient(var(--c), var(--c)) 100% 0 / var(--th) var(--len),
    linear-gradient(var(--c), var(--c)) 0 100% / var(--len) var(--th),
    linear-gradient(var(--c), var(--c)) 0 100% / var(--th) var(--len),
    linear-gradient(var(--c), var(--c)) 100% 100% / var(--len) var(--th),
    linear-gradient(var(--c), var(--c)) 100% 100% / var(--th) var(--len);
  background-repeat: no-repeat;
}
/* botão de girar a câmera (front/rear), no canto do viewfinder */
.cam-flip {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.cam-flip svg { width: 20px; height: 20px; }
.cam-flip::after { content: ""; position: absolute; inset: -5px; }  /* alvo de toque ≥ 44px */
.cam-flip:active { background: rgba(255, 255, 255, 0.28); }

/* linha de leitura animada (scan de código/nameplate/beads) */
.cam-guide.is-scan::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: 50%;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
  animation: scanline 2.1s ease-in-out infinite;
}

/* foto capturada dentro do viewfinder (review do perfil) — anel branco, destaca no escuro */
.cam-frame .cap-crop { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.92), 0 8px 24px rgba(0, 0, 0, 0.4); }
.cam-hint { margin: 14px 2px 0; text-align: center; font-size: 13px; line-height: 1.5; color: var(--ink-2); }

/* seletor de quantidade (reorder) */
.stepper { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; }
.stepper-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 22px;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.stepper-btn:active { background: var(--brand-wash); border-color: var(--brand); color: var(--brand-ink); }
.stepper-val { font-size: 17px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.stepper-val b { font-size: 24px; font-weight: 700; color: var(--ink); }
.stepper-price { padding: 11px 16px; border-top: 1px solid var(--line-soft); text-align: center; font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.stepper-price strong { color: var(--ink); font-weight: 700; font-size: 15px; }

/* ── card de produto (reorder) — visual + specs + quantidade/total num só bloco ── */
.prod-body { padding: 16px 18px; }
.prod-name { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.prod-spec { font-size: 13px; color: var(--ink-2); margin-top: 3px; }
.prod-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0 0; margin-top: 14px; border-top: 1px solid var(--line-soft); }
.prod-row-label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.prod-total strong { font-size: 17px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.prod-unit { font-size: 12px; color: var(--ink-2); }

/* stepper compacto (linha de quantidade) */
.qstep { display: inline-flex; align-items: center; gap: 12px; }
.qstep-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 20px;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.qstep-btn:active { background: var(--brand-wash); border-color: var(--brand); color: var(--brand-ink); }
.qstep-val { font-size: 14px; font-weight: 600; color: var(--ink-2); display: inline-flex; align-items: baseline; gap: 4px; }
.qstep-input {
  width: 42px;
  border: 0;
  border-bottom: 2px solid var(--line);
  background: transparent;
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
  padding: 2px 0;
  font-variant-numeric: tabular-nums;
}
.qstep-input:focus { outline: none; border-bottom-color: var(--brand); }

/* último pedido: link discreto abaixo do botão */
.prod-last { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 14px; font-size: 12.5px; color: var(--ink-2); text-decoration: none; }
.prod-last svg { width: 6px; height: 11px; }

/* seletor segmentado (Photo | Code na busca de peça) */
.seg { display: flex; margin-top: 16px; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; }
.seg-opt {
  flex: 1;
  text-align: center;
  padding: 8px 0;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
}
.seg-opt.is-active { background: var(--surface); color: var(--brand-ink); box-shadow: var(--shadow); }

/* divisor "or" entre escanear e digitar */
.cam-or { display: flex; align-items: center; gap: 12px; margin: 22px 2px 16px; color: var(--ink-2); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.cam-or::before, .cam-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* shutter redondo estilo câmera */
.cam-shutter {
  margin-top: 20px;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 4px var(--brand-wash), 0 3px 12px rgba(0, 0, 0, 0.16);
  transition: transform 0.1s ease;
}
.cam-shutter-ring { width: 56px; height: 56px; border-radius: 50%; border: 3px solid var(--brand-deep); }
.cam-shutter:active { transform: scale(0.94); }
.cam-shutter:active .cam-shutter-ring { background: var(--brand-wash); }
.cap-actions { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }

/* Guia circular para o rosto — no lugar dos 4 cantos do scanner de código. */
.scan-reticle.is-face {
  inset: auto;
  top: 50%;
  left: 50%;
  width: min(62%, 208px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(0, 113, 103, 0.5);
  border-radius: 50%;
  background: none;
}

/* Foto de perfil capturada — recorte circular, como aparece no portal. */
.cap-crop {
  position: relative;
  width: 208px;
  height: 208px;
  margin: 0 auto;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: 0 0 0 1px var(--card-border), var(--shadow);
}
.cap-crop img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cap-reframe { margin: 12px auto 0; text-align: center; font-size: 12.5px; color: var(--ink-2); max-width: 32ch; }

/* Sucesso do perfil: centrado, com a foto nova em destaque. */
.done-hero { text-align: center; padding: 30px 24px; }
.done-avatar { position: relative; display: inline-block; width: 96px; height: 96px; }
.done-avatar img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; display: block; box-shadow: 0 0 0 1px var(--card-border), 0 0 0 5px var(--brand-wash); }
.done-check {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ok-ink);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 3px var(--surface);
}
.done-check svg { width: 17px; height: 17px; }
.done-hero h3 { margin-top: 18px; font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.done-hero p { margin: 7px 0 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.55; }
/* check centrado (service/support, sem foto-avatar) */
.done-mark {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--ok-wash);
  color: var(--ok-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.done-mark svg { width: 27px; height: 27px; }
/* fotos anexadas, centradas no card de sucesso */
.done-shots { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.done-shot { position: relative; width: 68px; height: 68px; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1px var(--card-border); }
/* nota da perna de volta, centrada e discreta */
.done-note { margin: 14px 0 0; text-align: center; font-size: 12.5px; color: var(--ink-2); line-height: 1.55; }

/* ── Carrinho + checkout (compra inteira no mobile) ── */
.sum-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; padding: 4px 0; }
.sum-row b { font-size: 15px; font-weight: 700; }
.sum-row.is-muted { color: var(--ink-2); font-size: 13px; }
.sum-total { border-top: 1px solid var(--line-soft); margin-top: 8px; padding-top: 12px; }
.sum-total span { font-size: 15px; font-weight: 600; }
.sum-total b { font-size: 19px; }
.sum-note { font-size: 12px; color: var(--ink-2); margin-top: 8px; line-height: 1.5; }

.actionbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; max-width: 620px; margin: 0 auto; display: flex; align-items: center; gap: 14px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line-soft); box-shadow: 0 -6px 20px rgba(16, 24, 32, 0.06); }
.actionbar .btn { flex: 1; margin: 0; }
.actionbar-total { display: flex; flex-direction: column; line-height: 1.15; flex-shrink: 0; }
.actionbar-total span { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-2); }
.actionbar-total b { font-size: 18px; font-weight: 700; color: var(--ink); }
.actionbar-spacer { height: 88px; }

.co-section-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-2); margin: 22px 2px 10px; }
.co-pad { padding: 12px 16px; }
.co-sumline { align-items: flex-start; gap: 16px; padding: 9px 0; border-top: 1px solid var(--line-soft); }
.co-sumline:first-child { border-top: 0; padding-top: 2px; }
.co-sumline > span { white-space: nowrap; color: var(--ink-2); flex-shrink: 0; }
.co-sumline > b { text-align: right; line-height: 1.4; }

/* Snackbar "Added to cart" + atalho pro carrinho (o carrinho vive no menu) */
.cart-toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%) translateY(12px); z-index: 60; display: flex; align-items: center; gap: 12px; max-width: calc(100% - 28px); padding: 11px 12px 11px 16px; border-radius: 13px; background: #0f3f39; color: #fff; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28); opacity: 0; pointer-events: none; transition: opacity 0.22s ease, transform 0.22s ease; }
.cart-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.cart-toast-msg { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.cart-toast-msg svg { width: 18px; height: 18px; color: #7ee0d0; flex-shrink: 0; }
.cart-toast-action { font-size: 14px; font-weight: 700; color: #7ee0d0; text-decoration: none; white-space: nowrap; padding: 6px 8px; border-radius: 8px; }
.cart-toast-action:active { background: rgba(255, 255, 255, 0.12); }
@media (prefers-reduced-motion: reduce) { .cart-toast { transition: opacity 0.22s ease; } }
.co-addr { font-size: 14px; line-height: 1.55; color: var(--ink); }
.co-addr .co-addr-name { font-weight: 600; }
.co-change { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--brand-ink); background: none; border: none; padding: 0; cursor: pointer; }
.co-opts { display: flex; flex-direction: column; gap: 8px; }
.co-opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--card-border); border-radius: 12px; cursor: pointer; }
.co-opt.is-sel { border-color: var(--brand-ink); background: var(--brand-wash); }
.co-opt input { accent-color: var(--brand-ink); width: 18px; height: 18px; flex-shrink: 0; }
.co-opt-body { flex: 1; min-width: 0; }
.co-opt-title { display: block; font-size: 14px; font-weight: 600; }
.co-opt-sub { display: block; font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.co-opt-price { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.co-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.co-input { width: 100%; box-sizing: border-box; height: 44px; border: 1px solid var(--card-border); border-radius: 12px; padding: 0 14px; font-family: inherit; font-size: 15px; color: var(--ink); background: var(--surface); }
.co-input:focus { outline: none; border-color: var(--brand-ink); box-shadow: 0 0 0 3px var(--brand-wash); }
.co-hint { font-size: 12px; color: var(--ink-2); margin-top: 8px; line-height: 1.5; }
.co-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; font-size: 14px; padding: 8px 0; border-top: 1px solid var(--line-soft); }
.co-line:first-child { border-top: none; }
.co-line-name { min-width: 0; }
.co-line-sub { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.co-line-price { font-weight: 600; white-space: nowrap; }
.co-line-price.quote { color: var(--ink-2); font-weight: 500; }

/* Galeria de fotos do problema (múltiplas). */
.shots { margin-top: 4px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.shot {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--card-border);
}
.shot-img { position: absolute; inset: 0; }
.shot-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 7px 5px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.58));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shot-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.shot-remove svg { width: 13px; height: 13px; }
.shot-remove::after { content: ""; position: absolute; inset: -9px; }  /* alvo de toque ≥ 44px */
.shot-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  border: 1.5px dashed var(--line-strong);
  background: var(--surface);
  color: var(--brand-ink);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
.shot-add svg { width: 22px; height: 22px; }

/* Progresso de upload (feliz, lento e falho). */
.progress { height: 8px; border-radius: 5px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--line); }
.progress-fill { height: 100%; width: 0; background: var(--brand); transition: width 0.18s linear; }
.progress-fill.is-fail { background: #9a1c1c; }
.up-pct { margin-top: 9px; text-align: center; font-size: 13px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* ── botão da topbar: peças juntadas pra enviar ao computador ── */
.topbar-send {
  margin-left: auto;              /* empurra o grupo direito da topbar */
  position: relative;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.topbar-send svg { width: 23px; height: 23px; }
/* quando o botão existe, o hamburger fica logo ao lado (sem 2º auto-margin) */
.topbar-send ~ .hamburger-btn { margin-left: 4px; }
.topbar-send-count {
  position: absolute;
  top: 2px;
  right: -1px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: #fff;
  color: var(--brand-deep);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--brand-deep);
}

footer {
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--ink-2);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
