/* =====================================================================
   Mobile do técnico (docs/DESIGN_SYSTEM.md, seção 7): sobrepõe atend.css.
   Alvos de 48 px ou mais (ações principais 56 px), fonte de 16 px ou mais, barra inferior fixa com safe-area,
   opções empilhadas, bottom sheet, medição com limite, chips de defeitos/causas e tela de sucesso.
   ===================================================================== */
#atend { font-size: 16px; }
.at-net { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-full); background: var(--warning-soft); color: var(--warning-text); font-size: 13px; font-weight: 600; white-space: nowrap; }
.at-net svg { width: 16px; height: 16px; }
.at-lbl { font-size: 13px; font-weight: 500; color: var(--fg-subtle); }
.at-prob { font-size: 20px; line-height: 28px; font-weight: 600; }
.at-line { display: flex; align-items: flex-start; gap: 8px; } .at-line svg { margin-top: 3px; color: var(--fg-muted); }
.at-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--space-2); }
.at-todo { border-left: 3px solid var(--primary); }
/* barra inferior fixa */
.at-foot { gap: var(--space-2); }
.at-foot.at-cta { flex-direction: column; align-items: stretch; }
.at-foot .btn-xl { min-height: 56px; font-size: 16px; }
.at-why { text-align: center; font-size: 14px; color: var(--fg-muted); }
.at-nav { border-radius: var(--radius-md); min-height: 56px; }
/* pergunta atual: cabeçalho que abre a lista */
.at-prog { width: 100%; min-height: 48px; border: 0; background: none; padding: 0; display: flex; align-items: center; gap: var(--space-2); justify-content: space-between; color: inherit; font: inherit; font-size: 16px; cursor: pointer; text-align: left; }
.at-prog span { margin-left: auto; } .at-prog svg { width: 22px; height: 22px; color: var(--fg-muted); }
.at-q { font-size: 20px; line-height: 28px; font-weight: 600; }
/* opções empilhadas, largura total */
.at-ans { display: flex; flex-direction: column; gap: var(--space-3); }
.at-btn { min-height: 60px; width: 100%; flex-direction: row; justify-content: flex-start; padding: 0 var(--space-4); gap: var(--space-3); border-width: 2px; border-color: var(--border-strong); font-size: 16px; font-weight: 600; color: var(--fg); }
.at-btn .icon { width: 24px; height: 24px; }
.at-btn.ok .icon { color: var(--success); } .at-btn.nc .icon { color: var(--danger); }
.at-btn.ok, .at-btn.nc { border-color: var(--border-strong); color: var(--fg); }
.at-btn.ok.on { background: var(--success); border-color: var(--success); color: #fff; } .at-btn.nc.on { background: var(--danger); border-color: var(--danger); color: #fff; }
.at-btn.on .icon { color: #fff; } .at-btn.on::after { content: "✓"; margin-left: auto; font-size: 20px; font-weight: 700; }
.at-btn.na { min-height: 48px; border: 0; background: none; justify-content: center; color: var(--fg-muted); font-weight: 500; }
.at-btn.na.on { background: var(--neutral-soft); color: var(--fg); } .at-btn.na.on::after { content: none; }
.at-btn.foto { border-color: var(--primary); color: var(--primary); }
/* campos */
.at-in { font-size: 16px; min-height: 56px; }
.at-in.is-good { border-color: var(--success); } .at-in.is-warn { border-color: var(--warning); } .at-in.is-bad { border-color: var(--danger); }
.at-med .at-in { font-size: 24px; min-height: 64px; }
.at-ta { position: relative; } .at-ta .textarea { padding-right: 56px; }
.at-mic { position: absolute; right: 8px; top: 8px; width: 44px; height: 44px; border-radius: var(--radius-full); border: 0; background: var(--surface-muted); color: var(--fg); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.at-chips2 { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.at-ch2 { min-height: 44px; padding: 0 var(--space-4); border: 1px solid var(--border-strong); border-radius: var(--radius-full); background: var(--surface); color: var(--fg); font: inherit; font-size: 15px; cursor: pointer; }
.at-ch2:active { background: var(--surface-muted); }
/* bottom sheet */
.at-sheet { position: absolute; inset: 0; z-index: 30; display: flex; align-items: flex-end; }
.at-sh-bd { position: absolute; inset: 0; background: rgb(0 0 0 / .45); }
.at-sh { position: relative; width: 100%; max-height: 85%; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius-xl) var(--radius-xl) 0 0; box-shadow: var(--shadow-lg); }
.at-sh-h { display: flex; align-items: center; justify-content: space-between; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border); font-size: 18px; }
.at-sh-b { overflow-y: auto; padding: var(--space-3) var(--space-4) calc(var(--space-4) + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: var(--space-3); }
.at-nl { display: flex; flex-direction: column; gap: var(--space-1); }
.at-ni { display: flex; align-items: center; gap: var(--space-3); min-height: 56px; padding: var(--space-2) var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); color: var(--fg); font: inherit; font-size: 16px; text-align: left; cursor: pointer; }
.at-ni.cur { border-color: var(--primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 30%, transparent); }
.at-nt { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.at-st { flex: none; width: 28px; height: 28px; border-radius: var(--radius-full); display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--border-strong); color: #fff; }
.at-st svg { width: 16px; height: 16px; }
.at-st.s-ok { background: var(--success); border-color: var(--success); } .at-st.s-nc { background: var(--danger); border-color: var(--danger); }
.at-st.s-warn { background: var(--warning); border-color: var(--warning); } .at-st.s-na { background: var(--neutral); border-color: var(--neutral); }
/* peças */
.at-sr { display: flex; gap: var(--space-2); } .at-sr .at-in { flex: 1; }
.at-pl { display: flex; flex-direction: column; gap: var(--space-1); }
.at-pi2 { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 56px; padding: var(--space-2) var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); color: var(--fg); font: inherit; font-size: 16px; text-align: left; cursor: pointer; }
.at-qty2 { display: flex; align-items: center; gap: var(--space-3); } .at-qty2 input { text-align: center; font-size: 20px; font-weight: 600; }
.at-qty2 button { flex: none; width: 56px; height: 56px; border-radius: var(--radius-full); border: 2px solid var(--border-strong); background: var(--surface); color: var(--fg); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
/* sucesso */
.at-ok { align-items: center; justify-content: center; text-align: center; gap: var(--space-2); }
.at-okic svg { width: 88px; height: 88px; color: var(--success); } .at-ok h2 { margin: 0; font-size: 24px; }
/* Minhas OS: botão flutuante e puxar para atualizar */
.fab-qr { position: fixed; right: var(--space-4); bottom: calc(var(--space-4) + env(safe-area-inset-bottom)); z-index: 25; display: inline-flex; align-items: center; gap: 8px; min-height: 56px; padding: 0 var(--space-5); border: 0; border-radius: var(--radius-full); background: var(--primary); color: var(--primary-foreground); font: inherit; font-size: 16px; font-weight: 600; box-shadow: var(--shadow-md); cursor: pointer; }
.fab-qr svg { width: 22px; height: 22px; }
.ptr { position: fixed; top: 64px; left: 50%; z-index: 40; padding: 6px 14px; border-radius: var(--radius-full); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-md); font-size: 13px; color: var(--fg-muted); pointer-events: none; }
body[data-role="tecnico"] .main { padding-bottom: 96px; }
/* ---------- remodelação da visão da OS (protótipo): etapas em barra, progresso por item, rodapé, revisão e atalhos ---------- */
.at-steps { gap: var(--space-2); padding: var(--space-2) var(--space-4) var(--space-3); }
.at-steps button { align-items: stretch; gap: 6px; padding: 4px 0; border: 0; min-height: 48px; text-align: left; }
.at-steps button i { display: block; height: 6px; border-radius: var(--radius-full); background: var(--border); }
.at-steps button span { width: auto; height: auto; border-radius: 0; background: none; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 500; color: var(--fg-muted); }
.at-steps button.on i { background: var(--primary); } .at-steps button.done i { background: var(--success); }
.at-steps button.on span { background: none; color: var(--primary); } .at-steps button.done span { background: none; color: var(--fg); }
.at-steps button.done span .icon { color: var(--success); width: 14px; height: 14px; }
.at-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); font-size: 16px; flex: none; }
.at-all { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 var(--space-3); border: 0; border-radius: var(--radius-full); background: none; color: var(--primary); font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; }
.at-all:hover { background: var(--primary-soft, var(--surface-muted)); } .at-all .icon { width: 18px; height: 18px; }
.at-seg { display: flex; gap: 6px; flex: none; }
.at-seg button { flex: 1 1 0; min-width: 8px; height: 28px; padding: 0; border: 0; background: none; display: flex; align-items: center; cursor: pointer; }
.at-seg button i { display: block; width: 100%; height: 8px; border-radius: var(--radius-full); background: var(--border); }
.at-seg .s-ok i { background: var(--success); } .at-seg .s-nc i { background: var(--danger); } .at-seg .s-warn i { background: var(--warning); } .at-seg .s-na i { background: var(--neutral); }
.at-seg .cur i { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--primary); }
.at-seg button:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; border-radius: var(--radius-sm); }
.at-back { flex: none; width: 56px; padding: 0; } .at-back:disabled { opacity: .4; } .at-back .icon { width: 24px; height: 24px; }
.at-foot .at-next, .at-foot .at-skip { flex: 1; }
.at-skip { background: var(--surface-muted); border-color: var(--surface-muted); }
.at-h { margin: 0; font-size: 22px; line-height: 28px; font-weight: 600; flex: none; }
.at-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); flex: none; }
.at-tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-4); }
.at-tl { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--fg-muted); } .at-tl .icon { width: 16px; height: 16px; }
.at-tv { margin-top: var(--space-2); font-size: 28px; line-height: 32px; font-weight: 600; font-variant-numeric: tabular-nums; } .at-tv.neg { color: var(--danger-text); }
.at-qs { display: flex; align-items: center; gap: 8px; font-size: 16px; } .at-qs .icon { color: var(--warning-text); }
.at-rows { padding: 0; gap: 0; }
.at-row { display: flex; align-items: center; gap: var(--space-3); min-height: 56px; padding: var(--space-2) var(--space-4); border: 0; border-bottom: 1px solid var(--border); background: none; color: var(--fg); font: inherit; text-align: left; cursor: pointer; }
.at-row:last-child { border-bottom: 0; } .at-row > span { flex: 1; min-width: 0; display: flex; flex-direction: column; } .at-row .icon { width: 20px; height: 20px; color: var(--fg-muted); }
.at-rows > .muted { padding: var(--space-3) var(--space-4); }
/* assinatura do responsável */
.at-signbtn { min-height: 96px; border: 2px dashed var(--border-strong); border-radius: var(--radius-lg); background: none; color: var(--fg-muted); font: inherit; font-size: 16px; font-weight: 500; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.at-sign { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-2); } .at-sign img { display: block; width: 100%; max-height: 140px; object-fit: contain; }
.at-sigbox { position: relative; background: #fff; border: 2px solid var(--border-strong); border-radius: var(--radius-md); height: 200px; } .at-sigbox canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.at-sighint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; color: #6B6B75; }
