/* DOMMO CAR — base visual compartilhada (app do cliente, painel e app da equipe) */
:root {
  --bg: #0d0e10;
  --surface: #16171a;
  --raised: #1e1f23;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .16);
  --text: #edf1f6;
  --muted: #959ca7;
  --faint: #7f879a;
  --gold: #5b8fd0;
  --gold-strong: #2f6aa8;
  --gold-soft: rgba(91,143,208, .12);
  --ok: #7fbf9a;
  --warn: #e0b46a;
  --bad: #e07a6a;
  --info: #a7b4c8;
  --radius: 14px;
  --radius-sm: 10px;
  --display: 'Montserrat', 'Inter', system-ui, sans-serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --shadow: 0 10px 40px rgba(0, 0, 0, .45);
  --on-accent: #07182b;                                              /* texto sobre botão azul */
  --accent-grad: linear-gradient(90deg, #a9c8ee, var(--gold-strong)); /* botões principais */
  --accent-grad-d: linear-gradient(135deg, #a9c8ee, var(--gold-strong));
  --text-grad: linear-gradient(90deg, #dce9f8, var(--gold) 55%, #2f6aa8);
  --glass: rgba(13, 14, 16, .92);
  --glass-2: rgba(22, 23, 26, .96);
  --side-bg: #0f1012;
  --photo-fade: rgba(18, 19, 21, .98);
  --pill-bg: #050506;
  --card-dark: linear-gradient(135deg, #17263a 0%, #17181a 70%);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
/* a letra não cresce sozinha ao girar o celular; nada vaza para os lados */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { overflow-x: clip; }
body { min-height: 100dvh; }
a { color: var(--gold); text-decoration: none; }
img, video { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.01em; margin: 0 0 .4em; line-height: 1.15; }
h1 { font-size: 28px; } h2 { font-size: 22px; } h3 { font-size: 17px; }
p { margin: 0 0 .8em; }
small, .muted { color: var(--muted); }
.faint { color: var(--faint); }
.eyebrow { font: 600 11px/1.2 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.num { font-variant-numeric: tabular-nums; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

/* botões */
.btn { appearance: none; border: 1px solid var(--line-strong); background: transparent; color: var(--text); font: 500 14px/1 var(--sans); letter-spacing: .02em;
  padding: 13px 18px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px;
  transition: background .2s, border-color .2s, transform .1s, opacity .2s; text-align: center; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn.primary { background: var(--gold); border-color: var(--gold); color: var(--on-accent); font-weight: 600; }
.btn.primary:hover { background: #9fc0ea; }
.btn.ghost { border-color: transparent; color: var(--gold); padding-inline: 10px; }
.btn.danger { border-color: rgba(224, 122, 106, .5); color: var(--bad); }
.btn.block { width: 100%; }
.btn.sm { min-height: 34px; padding: 8px 14px; font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }

/* formulário */
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; letter-spacing: .02em; }
input, select, textarea { width: 100%; background: var(--raised); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 13px 14px; font: 15px/1.3 var(--sans); outline: none; transition: border-color .2s; }
/* no iPhone, campo com letra menor que 16px dá zoom ao tocar e a tela fica ampliada */
@media (max-width: 1023px) { input, select, textarea { font-size: 16px; } }
input:focus, select:focus, textarea:focus { border-color: var(--gold); }
textarea { min-height: 96px; resize: vertical; }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--gold); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.check input { margin-top: 3px; }

/* cartões e listas */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card + .card { margin-top: 12px; }
.card.tap { cursor: pointer; transition: border-color .2s; }
.card.tap:hover { border-color: var(--line-strong); }
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.list > .item { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.list > .item:last-child { border-bottom: 0; }
.list > .item:hover { background: rgba(255, 255, 255, .02); }
.chev { color: var(--faint); font-size: 18px; }
.badge { display: inline-flex; align-items: center; gap: 6px; font: 600 11px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; padding: 6px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, .06); color: var(--muted); white-space: nowrap; }
.badge.gold { background: var(--gold-soft); color: var(--gold); }
.badge.ok { background: rgba(127, 191, 154, .12); color: var(--ok); }
.badge.warn { background: rgba(224, 180, 106, .12); color: var(--warn); }
.badge.bad { background: rgba(224, 122, 106, .12); color: var(--bad); }
.badge.info { background: rgba(143, 178, 217, .12); color: var(--info); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); display: inline-block; }
.empty { text-align: center; color: var(--muted); padding: 36px 16px; }
.empty .ico { font-size: 28px; color: var(--faint); margin-bottom: 8px; }

/* chips de seleção */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line-strong); border-radius: 999px; padding: 9px 14px; font-size: 13px; cursor: pointer; background: transparent; color: var(--text); font-family: var(--sans); }
.chip.on { background: var(--gold); color: var(--on-accent); border-color: var(--gold); font-weight: 600; }
.chip:disabled { opacity: .35; }

/* toast */
#toast { position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px); opacity: 0; pointer-events: none; z-index: 100;
  background: #26272b; color: var(--text); border: 1px solid var(--line-strong); padding: 12px 18px; border-radius: 999px; font-size: 14px; box-shadow: var(--shadow);
  transition: all .3s cubic-bezier(.2, .8, .2, 1); max-width: calc(100vw - 32px); text-align: center; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
#toast.err { border-color: rgba(224, 122, 106, .5); }

/* modal (folha que sobe) */
.sheet-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: 80; display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
.sheet { background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: 22px 22px 0 0; width: 100%; max-width: 560px; max-height: 92dvh; overflow: auto;
  padding: 22px 20px calc(22px + env(safe-area-inset-bottom)); animation: up .3s cubic-bezier(.2, .8, .2, 1); }
.sheet .grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line-strong); margin: -8px auto 16px; }
@media (min-width: 760px) { .sheet-back { align-items: center; } .sheet { border-radius: 22px; border-bottom: 1px solid var(--line); } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

/* assinatura */
.sig { position: relative; background: #f4f1ea; border-radius: var(--radius-sm); touch-action: none; }
.sig canvas { width: 100%; height: 180px; display: block; border-radius: var(--radius-sm); }
.sig .hint { position: absolute; left: 14px; bottom: 10px; color: #8a867c; font-size: 12px; pointer-events: none; }
.sig .clear { position: absolute; right: 8px; top: 8px; background: rgba(0, 0, 0, .06); border: 0; border-radius: 999px; padding: 6px 10px; font-size: 12px; color: #555; cursor: pointer; }

/* galeria */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.gallery > * { aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--raised); position: relative; cursor: zoom-in; }
.gallery img, .gallery video { width: 100%; height: 100%; object-fit: cover; }
.gallery .play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 22px; text-shadow: 0 2px 8px rgba(0,0,0,.6); pointer-events: none; }
.gallery .rm { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.7); color: #fff; cursor: pointer; font-size: 13px; line-height: 22px; padding: 0; }
.addmedia { border: 1px dashed var(--line-strong) !important; display: grid !important; place-items: center; color: var(--muted); font-size: 12px; text-align: center; cursor: pointer !important; background: transparent !important; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.94); z-index: 120; display: grid; place-items: center; padding: 20px; animation: fade .2s; }
.lightbox img, .lightbox video { max-height: 88dvh; border-radius: 8px; }

/* desenho do carro (vistoria) */
.cardiagram { position: relative; background: var(--raised); border-radius: var(--radius); padding: 10px; }
.cardiagram svg { width: 100%; height: auto; display: block; }
.cardiagram .mark { position: absolute; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%; background: var(--bad); color: #fff; font: 700 11px/24px var(--sans);
  text-align: center; box-shadow: 0 0 0 4px rgba(224, 122, 106, .25); }

/* linha do tempo */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 1px; background: var(--line-strong); }
.tl { position: relative; padding-bottom: 20px; }
.tl::before { content: ''; position: absolute; left: -24px; top: 4px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line-strong); }
.tl.done::before { background: var(--gold); border-color: var(--gold); }
.tl.now::before { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 0 5px var(--gold-soft); }
.tl .t { font-weight: 600; } .tl.todo .t { color: var(--faint); font-weight: 500; }

/* utilidades */
.hide { display: none !important; }
.center { text-align: center; }
.mt { margin-top: 16px; } .mt2 { margin-top: 28px; } .mb { margin-bottom: 16px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; }
.kv > :first-child { color: var(--muted); }
.kv.total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; font-weight: 600; font-size: 16px; }
.spinner { width: 22px; height: 22px; border: 2px solid var(--line-strong); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.logo { color: var(--gold); display: block; }
.logo svg { width: 100%; height: auto; display: block; }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }

/* foco visível ao navegar pelo teclado */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 8px; }
.btn:focus-visible, .chip:focus-visible { border-radius: 999px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }

/* avatar (foto ou iniciais) */
.avatar { flex: none; border-radius: 50%; background: linear-gradient(135deg, #22364f, #1e1f23); border: 1px solid rgba(91,143,208,.35); color: var(--gold);
  display: inline-grid; place-items: center; font: 600 15px var(--display); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.person { display: flex; gap: 12px; align-items: center; }
.person .who { flex: 1; min-width: 0; }
.person .who b { display: block; font-weight: 600; }
.person .who small { color: var(--muted); }

/* aviso de nova versão */
#updbar { position: fixed; left: 0; right: 0; top: calc(8px + env(safe-area-inset-top)); z-index: 110; display: flex; justify-content: center; padding: 0 12px; pointer-events: none;
  animation: updIn .4s cubic-bezier(.2,.8,.2,1) both; }
@keyframes updIn { from { transform: translateY(-120%); opacity: 0; } }
#updbar .upd-in { pointer-events: auto; width: 100%; max-width: 540px; display: flex; gap: 12px; align-items: center; padding: 12px 12px 12px 14px; border-radius: 18px;
  background: rgba(30,31,35,.96); border: 1px solid rgba(91,143,208,.35); box-shadow: var(--shadow); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
#updbar .upd-ic { width: 36px; height: 36px; border-radius: 11px; flex: none; display: grid; place-items: center; color: var(--on-accent); background: linear-gradient(135deg, #a9c8ee, var(--gold-strong)); }
#updbar .upd-ic svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#updbar .upd-tx { flex: 1; min-width: 0; }
#updbar .upd-tx b { display: block; font-size: 14px; font-weight: 600; }
#updbar .upd-tx small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#updbar .upd-x { background: none; border: 0; color: var(--muted); font-size: 20px; cursor: pointer; padding: 4px 6px; }

/* borda champanhe metálico, bem sutil, em cartões e ícones (app, painel e equipe) */
:root { --metal: linear-gradient(135deg, rgba(220,233,248,.42) 0%, rgba(91,143,208,.18) 28%, rgba(28,77,125,.14) 55%, rgba(169,200,238,.34) 100%); }
.card, .list, .svc, .vcard2, .herocard, .next, .pointscard, .banner, .action, .opt, .qmenu a, .vpick button, .modes button,
.kpi, .lane, .week .day, .ct,
.svc .th, .svcicon, .quick .qi, .qmenu .qi, .iconbtn, .avatar { position: relative; border-color: transparent !important; }
.card::after, .list::after, .svc::after, .vcard2::after, .herocard::after, .next::after, .pointscard::after, .banner::after, .action::after, .opt::after, .qmenu a::after,
.vpick button::after, .modes button::after, .kpi::after, .lane::after, .week .day::after, .ct::after,
.svc .th::after, .svcicon::after, .quick .qi::after, .qmenu .qi::after, .iconbtn::after, .avatar::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 2;
  background: var(--metal); opacity: .85; transition: opacity .2s;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.card.tap:hover::after, .svc:hover::after, .opt:hover::after, .qmenu a:hover::after { opacity: 1; }
/* selecionados continuam com a borda champanhe cheia */
.opt.on::after, .vpick button.on::after, .modes button.on::after { background: linear-gradient(135deg, #dce9f8, var(--gold) 45%, #1c4d7d); opacity: 1; }
.tablewrap { border-color: rgba(91,143,208,.2) !important; }


/* ---------- tema claro (o padrão é o escuro) ---------- */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f5f8; --surface: #ffffff; --raised: #eef2f7;
  --line: rgba(12, 24, 40, .09); --line-strong: rgba(12, 24, 40, .17);
  --text: #0f1722; --muted: #566171; --faint: #5f6979;
  --gold: #1c4d7d; --gold-strong: #005aaa; --gold-soft: rgba(28, 77, 125, .08);
  --ok: #2e8a5c; --warn: #b7791f; --bad: #c2463a; --info: #52627a;
  --shadow: 0 10px 30px rgba(15, 23, 34, .10);
  --on-accent: #ffffff;
  --accent-grad: linear-gradient(90deg, #2f6aa8, #1c4d7d);
  --accent-grad-d: linear-gradient(135deg, #2f6aa8, #1c4d7d);
  --text-grad: linear-gradient(90deg, #005aaa, #1c4d7d 60%, #13334e);
  --glass: rgba(255, 255, 255, .9); --glass-2: rgba(255, 255, 255, .96);
  --side-bg: #ffffff; --photo-fade: rgba(255, 255, 255, .98); --pill-bg: #0f1722;
  --card-dark: linear-gradient(135deg, #e6eef8 0%, #ffffff 70%);
  --metal: linear-gradient(135deg, rgba(28,77,125,.35) 0%, rgba(0,90,170,.12) 30%, rgba(19,51,78,.10) 55%, rgba(47,106,168,.30) 100%);
}
:root[data-theme="light"] .btn.primary { color: #fff; }
:root[data-theme="light"] .btn.primary:hover { background: #163e66; }
:root[data-theme="light"] #toast { background: #0f1722; color: #fff; }
:root[data-theme="light"] input, :root[data-theme="light"] select, :root[data-theme="light"] textarea { background: #f7f9fc; }
:root[data-theme="light"] .sig { background: #fff; border: 1px solid var(--line); }

/* ---------- Emissor NFS-e (painel e frente de loja) ---------- */
.nf-val { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 10px; margin: 10px 0 6px; }
.nf-val > div { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; display: grid; gap: 2px; }
.nf-val small { color: var(--muted); font-size: 11.5px; } .nf-val b { font-size: 16px; } .nf-val input { padding: 4px 6px; font-size: 13px; }
.nf-sec { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 14px 0 6px; }
.nf-tipo { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; font-size: 14px; } .nf-tipo label { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.nf-addr { display: grid; grid-template-columns: 3fr 1fr; gap: 0 10px; } .nf-addr .field:nth-child(3) { grid-column: 1; } .nf-addr .field:nth-child(4) { grid-column: 2 / 3; }
@media (max-width: 520px) { .nf-val { grid-template-columns: 1fr 1fr; } .nf-val > div:last-child { grid-column: span 2; } .nf-addr { grid-template-columns: 1fr 1fr; } .nf-addr .field:nth-child(1) { grid-column: span 2; } .nf-addr .field:nth-child(3), .nf-addr .field:nth-child(4) { grid-column: auto; } }
.nf-actions { gap: 8px; margin-top: 6px; }
.nf-res { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; border: 1px solid var(--line); margin: 10px 0; }
.nf-res.ok { border-color: rgba(127, 191, 154, .45); background: rgba(127, 191, 154, .08); } .nf-res.err { border-color: rgba(224, 122, 106, .45); background: rgba(224, 122, 106, .08); }
.nf-res-ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; flex: none; background: var(--ok); color: #fff; } .nf-res.err .nf-res-ic { background: var(--bad); }
.nf-res b { display: block; font-size: 15px; } .nf-res small { display: block; color: var(--muted); margin: 2px 0 6px; }
.nf-res-btns { gap: 8px; flex-wrap: wrap; }
.nf-ask { text-align: center; display: grid; gap: 8px; justify-items: center; padding-bottom: 6px; }
.nf-ask h3 { margin: 4px 0 0; } .nf-ask p { margin: 0; }
.nf-ask-ic { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #fff; font-size: 22px; font-weight: 700; }
.nf-ask-val { display: grid; gap: 4px; justify-items: center; margin: 4px 0; } .nf-ask-val b { font-size: 24px; } .nf-ask-val span { color: var(--muted); font-size: 13px; }
.nf-ask-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; max-width: 360px; margin-top: 4px; }
.nf-ask-btns .btn { padding: 12px; font-size: 15px; }

/* ---------- Funilaria e pintura: desenho do carro (contorno) + peças ---------- */
.fn { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 720px) { .fn { grid-template-columns: 1fr; } }
.fn-car { display: grid; gap: 6px; justify-items: center; }
/* o desenho só acompanha a rolagem em telas largas (no celular ele ficava por cima da lista e bloqueava os toques) */
@media (min-width: 721px) { .fn-car { position: sticky; top: 12px; } }
.fn-legend { display: flex; justify-content: space-between; width: 100%; font-size: 12px; color: var(--muted); }
.fn-legend small { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; margin: 0 auto; }
.fn-legend span + small { margin: 0; }
.fn-svg { width: 100%; max-width: 280px; height: auto; touch-action: manipulation; }
@media (max-width: 720px) { .fn-svg { max-width: 230px; } }
.fn-z { fill: transparent; stroke: var(--text); stroke-opacity: .55; stroke-width: 1.4; stroke-linejoin: round; cursor: pointer; transition: fill .18s, stroke .18s; outline: none; }
.fn-z:hover, .fn-z:focus-visible { stroke-opacity: 1; fill: rgba(79, 143, 217, .10); }
.fn-z.hint { fill: rgba(79, 143, 217, .08); stroke-dasharray: 4 3; stroke-opacity: .9; }
.fn-z.on { fill: rgba(79, 143, 217, .34); stroke: #4f8fd9; stroke-opacity: 1; stroke-width: 2; }
.fn-z.on.dent { fill: rgba(224, 180, 106, .38); stroke: #e0b46a; }
.fn-z.focus { stroke-width: 3; }
.fn-glass { fill: none; stroke: var(--text); stroke-opacity: .22; stroke-width: 1.1; stroke-dasharray: 3 3; pointer-events: none; }
.fn-nums circle { fill: #4f8fd9; stroke: var(--surface); stroke-width: 2; }
.fn-nums text { fill: #fff; font: 700 11px var(--sans, system-ui); pointer-events: none; }
.fn-nums g { pointer-events: none; }
.fn-cargrp { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: grid; gap: 6px; }
.fn-t { font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.fn-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fn-chip { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; padding: 6px 11px; font: 500 12.5px var(--sans, system-ui); cursor: pointer; }
.fn-chip em { font-style: normal; color: var(--muted); font-size: 11.5px; margin-left: 2px; }
.fn-chip.on { background: rgba(79, 143, 217, .18); border-color: #4f8fd9; }
.fn-chip.on em { color: inherit; }
.fn-check { display: flex; gap: 7px; align-items: center; font-size: 13px; cursor: pointer; } .fn-check em { font-style: normal; color: var(--muted); font-size: 12px; }
.fn-side { display: grid; gap: 10px; min-width: 0; }
.fn-empty { border: 1px dashed var(--line); border-radius: 14px; padding: 22px; text-align: center; color: var(--muted); }
.fn-list { display: grid; gap: 8px; }
.fn-item { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.fn-item.open { border-color: #4f8fd9; }
.fn-ih { display: flex; gap: 10px; align-items: center; padding: 10px 12px; cursor: pointer; }
.fn-ih .grow { min-width: 0; } .fn-ih b { display: block; font-size: 14px; } .fn-ih small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.fn-n { width: 24px; height: 24px; border-radius: 50%; background: #4f8fd9; color: #fff; display: grid; place-items: center; font: 700 12px var(--sans, system-ui); flex: none; }
.fn-x { border: 0; background: none; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; padding: 0 2px; }
.fn-opts { display: none; padding: 0 12px 12px; gap: 6px; }
.fn-item.open .fn-opts { display: grid; }
.fn-qty { display: flex; align-items: center; gap: 10px; } .fn-qty button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 17px; cursor: pointer; }
.fn-calc { margin-top: 6px; font-size: 12.5px; color: var(--muted); line-height: 1.6; } .fn-calc b { color: var(--text); }
.fn-more summary { cursor: pointer; font-size: 13px; color: var(--muted); padding: 4px 0 8px; }
.fn-total { position: sticky; bottom: 0; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--surface); display: grid; gap: 4px; box-shadow: 0 -8px 20px -16px rgba(0,0,0,.6); }
.fn-total > div { display: flex; justify-content: space-between; align-items: baseline; } .fn-total b { font-size: 22px; } .fn-total small { font-size: 12px; }

/* ---------- PPF / LPF / películas (mesmo desenho da funilaria) ---------- */
.fn-z.on.g-lpf { fill: rgba(79, 143, 217, .34); stroke: #4f8fd9; }
.fn-z.on.g-ppf { fill: rgba(92, 184, 150, .34); stroke: #5cb896; }
.fn-z.on.g-pelicula { fill: rgba(30, 36, 48, .78); stroke: #8fa0b8; }
.fn-z.pr-glass { stroke-dasharray: 3 3; stroke-opacity: .5; }
.fn-z.pr-glass.on { stroke-dasharray: none; }
.fn-z.pr-wheel { pointer-events: none; stroke-opacity: .3; }
.pr-leg { display: flex; gap: 12px; font-size: 12px; color: var(--muted); }
.pr-leg i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.pr-leg i.g-lpf { background: #4f8fd9; } .pr-leg i.g-ppf { background: #5cb896; } .pr-leg i.g-pelicula { background: #2a3140; border: 1px solid #8fa0b8; }
.pr-grp { display: grid; gap: 6px; }
.pr-opts, .pr-zone .fn-opts { display: grid; gap: 6px; }
.pr-opt { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 12px; padding: 9px 12px; cursor: pointer; font: inherit; }
.pr-opt b { font-weight: 600; font-size: 13.5px; display: block; } .pr-opt small { display: block; color: var(--muted); font-size: 11.5px; } .pr-opt em { font-style: normal; font-weight: 600; white-space: nowrap; font-size: 13px; }
.pr-opt.on.g-lpf { border-color: #4f8fd9; background: rgba(79, 143, 217, .14); }
.pr-opt.on.g-ppf { border-color: #5cb896; background: rgba(92, 184, 150, .14); }
.pr-opt.on.g-pelicula { border-color: #8fa0b8; background: rgba(143, 160, 184, .16); }
.pr-opt.inc { opacity: .6; } .pr-opt.inc em { text-decoration: line-through; }
.pr-sum { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); } .pr-sum b { color: var(--text); font-weight: 600; }
.pr-zone { border-color: #4f8fd9; }
.fn-z.on.g-interior { fill: rgba(201, 164, 92, .34); stroke: #c9a45c; }
.pr-leg i.g-interior { background: #c9a45c; } .pr-leg { flex-wrap: wrap; justify-content: center; }
.pr-opt.on.g-interior { border-color: #c9a45c; background: rgba(201, 164, 92, .14); }
.pr-vista { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; width: 100%; }
.pr-vista button { border: 0; background: transparent; color: var(--muted); padding: 7px; border-radius: 7px; font: 600 12.5px var(--sans, system-ui); cursor: pointer; }
.pr-vista button.on { background: var(--surface-2, rgba(255,255,255,.08)); color: var(--text); box-shadow: 0 0 0 1px var(--line) inset; }
.pr-decor { stroke-dasharray: none; stroke-opacity: .28; }
.fn-z.on.g-pelicula { fill: rgba(165, 138, 216, .40); stroke: #a58ad8; }
.pr-leg i.g-pelicula { background: #a58ad8; border: 0; }
.pr-opt.on.g-pelicula { border-color: #a58ad8; background: rgba(165, 138, 216, .14); }
.fn-total .pr-sum b { font-size: 12.5px; }
.fn-total .pr-sum { display: grid; gap: 2px; } .fn-total .pr-sum span { display: flex; justify-content: space-between; gap: 10px; }
@media (max-width: 720px) { .fn-total { position: static; } }
/* PPF/LPF: grupos em abas (lista curta) */
.pr-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.pr-tabs button { flex: none; border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 999px; padding: 7px 13px; font: 600 12.5px var(--sans, system-ui); cursor: pointer; }
.pr-tabs button.on { color: var(--text); border-color: currentColor; }
.pr-tabs button.on.g-lpf { color: #4f8fd9; } .pr-tabs button.on.g-ppf { color: #5cb896; } .pr-tabs button.on.g-pelicula { color: #a58ad8; } .pr-tabs button.on.g-interior { color: #c9a45c; }
.pr-tabs i { font-style: normal; background: currentColor; color: var(--bg, #0b1422); border-radius: 999px; padding: 0 6px; margin-left: 3px; font-size: 11px; }
/* barra fixa do app (funilaria e proteção): total + pedir orçamento */
.fn-cta { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0 0; padding: 10px 10px 10px 16px; border-radius: 16px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); box-shadow: 0 10px 30px -12px rgba(0,0,0,.7); }
.fn-cta div { display: grid; } .fn-cta small { color: var(--muted); font-size: 11.5px; } .fn-cta b { font-size: 19px; }
.fn-cta .btn { flex: none; }
@media (min-width: 1024px) { .fn-cta { bottom: 16px; } }
.pr-tabs i { color: #0b1422; }
/* no app, a barra fixa já mostra o total: o quadro repetido do editor sai */
#view:has(.fn-cta) .fn-total { display: none; }
/* emissor: uma parte (empresa) por nota */
.nf-partes { display: grid; gap: 8px; margin: 10px 0; }
.nf-parte { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: grid; gap: 6px; }
.nf-parte.done { opacity: .75; }
.nf-ph { display: flex; gap: 10px; align-items: center; cursor: pointer; }
.nf-ph input { width: 18px; height: 18px; flex: none; accent-color: #4f8fd9; }
.nf-ph .grow { min-width: 0; } .nf-ph b { display: block; font-size: 14.5px; } .nf-ph small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nf-pv { text-align: right; flex: none; } .nf-pv b { display: block; font-size: 16px; } .nf-pv small { color: var(--muted); font-size: 11.5px; }
.nf-ok { width: 20px; height: 20px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; font-size: 12px; flex: none; }
.nf-pmeta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.nf-desc summary { cursor: pointer; font-size: 12.5px; color: var(--muted); } .nf-desc textarea { margin-top: 6px; width: 100%; }
.nf-val1 { display: flex; gap: 10px; align-items: center; } .nf-val1 small { color: var(--muted); font-size: 12px; } .nf-val1 input { padding: 5px 8px; width: auto; }
.nf-emp { display: block; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; }
.nf-ask-list { display: grid; gap: 6px; width: 100%; max-width: 380px; margin: 4px 0; }
.nf-ask-list > div { display: flex; align-items: center; gap: 8px; justify-content: space-between; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.nf-ask-list span { font-weight: 600; } .nf-ask-list b { margin-left: auto; }
.nf-ask-btns.hib { grid-template-columns: 1fr; }
.nf-res.wait { border-color: rgba(224, 180, 106, .55); background: rgba(224, 180, 106, .10); }
.nf-res.wait .nf-res-ic { background: var(--warn, #e0b46a); color: #1b1300; font-size: 16px; }
.nf-pedinfo { border: 1px solid rgba(224,180,106,.5); background: rgba(224,180,106,.1); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; margin: 8px 0; }
.nf-pedok { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0; }
.nf-pedrow { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin-bottom: 6px; }
.nf-pedrow1 { display: flex; justify-content: space-between; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 8px 0; font-weight: 600; }

/* ---------- Pix por QR Code ---------- */
.pix-sh { text-align: center; }
.pix-qr { width: 244px; height: 244px; margin: 10px auto 12px; background: #fff; border-radius: 16px; padding: 12px; display: grid; place-items: center; }
.pix-qr img, .pix-qr canvas { width: 220px !important; height: 220px !important; }
.pix-amt { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-bottom: 12px; }
.pix-amt b { font: 600 28px var(--display, inherit); }
.pix-cc { gap: 8px; } .pix-cc input { flex: 1; min-width: 0; font-size: 12px; font-family: ui-monospace, monospace; }
.pix-st { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 14px; margin: 12px 0; flex-wrap: wrap; }
.pix-st .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--warn, #d9a441); animation: pixpulse 1.4s infinite; }
@keyframes pixpulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.pix-wait { padding: 40px 0; color: var(--muted); display: flex; gap: 10px; justify-content: center; align-items: center; }
.pix-wait .spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--gold); animation: pixspin .8s linear infinite; }
@keyframes pixspin { to { transform: rotate(360deg); } }
.pix-ok { padding: 10px 0 4px; } .pix-ok .rc-ok { margin: 0 auto 10px; }
.pix-ok .rc-ok:not([style]) { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #fff; font-size: 28px; }

/* ---------- placa de carro (padrão Mercosul) ---------- */
.placa { display: inline-flex; flex-direction: column; width: 132px; border: 2px solid #111; border-radius: 6px; background: #fff; overflow: hidden; line-height: 1; box-shadow: 0 1px 2px rgba(0,0,0,.25); user-select: all; vertical-align: middle; }
.placa .pl-top { position: relative; display: flex; align-items: center; justify-content: center; height: 13px; background: linear-gradient(#1f4fa3, #163b80); color: #fff; }
.placa .pl-top b { font: 800 8.5px/1 Arial, Helvetica, sans-serif; letter-spacing: .14em; }
.placa .pl-ms { position: absolute; left: 3px; bottom: 1px; font: 700 3.6px/1 Arial, sans-serif; font-style: normal; letter-spacing: .02em; opacity: .9; }
.placa .pl-br { position: absolute; right: 3px; top: 2.5px; width: 12px; height: 8px; border-radius: 1px; background: #1a9b47; }
.placa .pl-br::before { content: ''; position: absolute; inset: 1.2px 1.6px; background: #f6d21b; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.placa .pl-br::after { content: ''; position: absolute; left: 4px; top: 2px; width: 4px; height: 4px; border-radius: 50%; background: #1f4fa3; }
.placa .pl-num { position: relative; display: flex; align-items: center; justify-content: center; height: 27px; padding-left: 10px; color: #111; font: 700 19px/1 "Arial Narrow", "Roboto Condensed", Arial, sans-serif; letter-spacing: .08em; }
.placa .pl-qr { position: absolute; left: 4px; top: 6px; width: 9px; height: 11px; background: repeating-linear-gradient(#111 0 1px, transparent 1px 2.4px); border: 1px solid #111; }
.placa.antiga { border-color: #555; } .placa.antiga .pl-top { background: linear-gradient(#9aa0a8, #7c828a); } .placa.antiga .pl-num { background: #e8e9eb; }
.placa.vazia { display: inline-block; width: auto; border: 1px dashed var(--line-strong); background: none; color: var(--faint); font-size: 11px; padding: 3px 8px; box-shadow: none; border-radius: 6px; }
.okc .placa { margin: 2px 0 2px; }
