/* PedeMais -- visual da "Proposta com fotos" (aprovado no mockup de 28/10/2026) sobre os tokens do
   kit (kit.css vem inline pelo Ui::styleTag). Celular primeiro; >= 1024px vira o editor em tela larga. */

:root {
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --accent: #2563eb; --accent-hover: #1d4ed8; --accent-weak: #eff6ff; --accent-ring: rgba(37,99,235,.35);
  --pm-bg: #f8fafc; --pm-ink: #0f172a; --pm-mut: #5b6474; --pm-line: #e2e8f0; --pm-line2: #eef2f6;
  --pm-head: #1e293b; --pm-blue-ink: #1d4ed8;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --pm-bg: #0c0e12; --pm-ink: #e8eaef; --pm-mut: #9aa1ad; --pm-line: #262b34; --pm-line2: #1f242d; --pm-head: #0f1420; --pm-blue-ink: #8fb4ff; --accent-weak: #16233a; }
}
:root[data-theme="dark"] { --pm-bg: #0c0e12; --pm-ink: #e8eaef; --pm-mut: #9aa1ad; --pm-line: #262b34; --pm-line2: #1f242d; --pm-head: #0f1420; --pm-blue-ink: #8fb4ff; --accent-weak: #16233a; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); background: var(--pm-bg); color: var(--pm-ink); -webkit-tap-highlight-color: transparent; font-size: 14px; }
[x-cloak] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--pm-blue-ink); }

/* ---- shell ---------------------------------------------------------------------------- */
.pm-app { min-height: 100dvh; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; background: var(--pm-bg); position: relative; }
.pm-wide .pm-app { max-width: none; }
.pm-top { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--pm-line); padding: 12px 16px 10px; display: flex; flex-direction: column; gap: 10px; }
.pm-row { display: flex; align-items: center; gap: 10px; }
.pm-grow { flex: 1; min-width: 0; }
.pm-title { font-weight: 800; font-size: 16px; }
.pm-sub { font-size: 12px; color: var(--pm-mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-main { flex: 1; padding: 12px 16px 120px; display: flex; flex-direction: column; gap: 10px; }
.pm-foot { position: sticky; bottom: 0; z-index: 20; background: var(--surface); border-top: 1px solid var(--pm-line); padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; }
.pm-nav { position: sticky; bottom: 0; z-index: 20; display: flex; background: var(--surface); border-top: 1px solid var(--pm-line); padding: 4px 8px calc(8px + env(safe-area-inset-bottom)); }
.pm-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--pm-mut); background: none; border: 0; padding: 8px 0; cursor: pointer; }
.pm-nav button.on { color: var(--accent); }

/* ---- blocos --------------------------------------------------------------------------- */
.pm-card { background: var(--surface); border: 1px solid var(--pm-line); border-radius: 14px; }
.pm-pad { padding: 12px 14px; }
.pm-lbl { font-size: 11px; font-weight: 700; color: var(--pm-mut); text-transform: uppercase; letter-spacing: .4px; }
.pm-mut { color: var(--pm-mut); }
.pm-small { font-size: 12px; }
.pm-strong { font-weight: 700; }
.pm-money { font-weight: 800; color: var(--pm-blue-ink); white-space: nowrap; }
.pm-big { font-size: 22px; line-height: 1.1; }
.pm-sep { border-top: 1px solid var(--pm-line2); }
.pm-list > * + * { border-top: 1px solid var(--pm-line2); }
.pm-li { display: flex; align-items: center; gap: 10px; padding: 10px 0; font-size: 13.5px; }
.pm-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.pm-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.pm-kpi .pm-lbl { text-transform: none; letter-spacing: 0; }
.pm-kpi b { display: block; font-size: 18px; font-weight: 800; }

/* ---- controles ------------------------------------------------------------------------ */
.pm-btn { height: 48px; border-radius: 999px; border: 0; background: var(--accent); color: #fff; font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 20px; cursor: pointer; text-decoration: none; }
.pm-btn:hover { background: var(--accent-hover); }
.pm-btn:disabled { opacity: .55; cursor: default; }
.pm-btn.full { width: 100%; }
.pm-btn.ghost { background: var(--surface); color: var(--pm-ink); border: 1px solid var(--border-strong); }
.pm-btn.danger { background: var(--surface); color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); }
.pm-btn.green { background: #16a34a; }
.pm-btn.sm { height: 36px; font-size: 13px; padding: 0 14px; }
.pm-ib { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--pm-line); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; color: var(--pm-ink); padding: 0; cursor: pointer; flex: none; }
.pm-ib.acc { background: var(--accent); border-color: var(--accent); color: #fff; }
.pm-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.pm-chips::-webkit-scrollbar { display: none; }
.pm-chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); font-weight: 600; font-size: 12.5px; color: var(--pm-ink); white-space: nowrap; cursor: pointer; flex: none; }
.pm-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.pm-chip.dark.on { background: var(--pm-ink); border-color: var(--pm-ink); color: var(--pm-bg); }
.pm-bd { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.b-ok { background: #dcfce7; color: #166534; } .b-warn { background: #fef3c7; color: #92400e; } .b-err { background: #fee2e2; color: #991b1b; }
.b-info { background: #dbeafe; color: #1e40af; } .b-neu { background: #eef2f6; color: #475569; } .b-pur { background: #f3e8ff; color: #6b21a8; } .b-org { background: #ffedd5; color: #9a3412; }
.pm-field { display: flex; flex-direction: column; gap: 5px; }
.pm-input, .pm-select, .pm-textarea { width: 100%; height: 44px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface); padding: 0 12px; font-size: 15px; color: var(--pm-ink); outline: none; }
.pm-textarea { height: auto; min-height: 80px; padding: 10px 12px; resize: vertical; }
.pm-input:focus, .pm-select:focus, .pm-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.pm-search { display: flex; align-items: center; gap: 8px; height: 46px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface); padding: 0 12px; }
.pm-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.pm-search input { border: 0; outline: 0; background: none; flex: 1; min-width: 0; font-size: 15px; }
.pm-seg { display: flex; background: var(--pm-line2); border-radius: 10px; padding: 3px; gap: 3px; }
.pm-seg button { flex: 1; text-align: center; font-size: 12.5px; font-weight: 700; padding: 8px 4px; border-radius: 8px; color: var(--pm-mut); border: 0; background: none; cursor: pointer; }
.pm-seg button.on { background: var(--surface); color: var(--pm-ink); box-shadow: 0 1px 2px rgba(15,23,42,.12); }
.pm-step { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface); font-weight: 700; font-size: 20px; cursor: pointer; }
.pm-qty { flex: 1; height: 44px; border-radius: 12px; border: 2px solid var(--accent); text-align: center; font-weight: 800; font-size: 18px; background: var(--surface); outline: 0; }
.pm-switch { width: 42px; height: 26px; border-radius: 999px; background: var(--border-strong); position: relative; border: 0; cursor: pointer; flex: none; }
.pm-switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s; }
.pm-switch.on { background: var(--accent); }
.pm-switch.on::after { left: 19px; }

/* ---- passos --------------------------------------------------------------------------- */
.pm-steps { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 6px; }
.pm-steps button { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
.pm-steps i { display: block; height: 4px; border-radius: 4px; background: var(--pm-line); }
.pm-steps span { display: block; font-size: 11px; font-weight: 600; color: var(--pm-mut); margin-top: 5px; }
.pm-steps .feito i { background: var(--accent); }
.pm-steps .atual span { color: var(--pm-blue-ink); font-weight: 700; }

/* ---- produto / item ------------------------------------------------------------------- */
.pm-foto { width: 72px; height: 72px; border-radius: 10px; flex: none; background: var(--pm-line2) center/cover no-repeat; border: 1px solid var(--pm-line); position: relative; display: flex; align-items: center; justify-content: center; color: var(--pm-mut); overflow: hidden; }
.pm-foto.lg { width: 96px; height: 96px; }
.pm-foto.sm { width: 44px; height: 44px; border-radius: 6px; }
.pm-foto img { width: 100%; height: 100%; object-fit: cover; }
.pm-foto .tag { position: absolute; left: 4px; bottom: 4px; font-size: 9.5px; font-weight: 800; background: #fff; color: #334155; border-radius: 5px; padding: 1px 5px; }
.pm-item { display: flex; gap: 12px; padding: 10px; cursor: pointer; text-align: left; width: 100%; background: var(--surface); border: 1px solid var(--pm-line); border-radius: 14px; color: inherit; }
.pm-item:hover { border-color: var(--border-strong); }
.pm-item .nm { font-weight: 700; font-size: 13.5px; line-height: 1.25; }
.pm-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.pm-amb { display: flex; align-items: center; gap: 8px; }
.pm-amb i { width: 6px; height: 20px; border-radius: 4px; background: var(--accent); }

/* ---- resumo (faixa escura como na proposta com fotos) --------------------------------- */
.pm-resumo { border-radius: 14px; overflow: hidden; border: 1px solid var(--pm-line); background: var(--surface); }
.pm-resumo .hd { background: var(--pm-head); color: #fff; padding: 9px 12px; display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 700; }
.pm-resumo .bd2 { padding: 8px 12px; }
.pm-ln { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 3px 0; }

/* ---- folha / modal -------------------------------------------------------------------- */
.pm-scrim { position: fixed; inset: 0; background: rgba(15,23,42,.55); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.pm-sheet { background: var(--surface); width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; border-radius: 20px 20px 0 0; padding: 10px 16px calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }
.pm-sheet .grip { width: 40px; height: 5px; border-radius: 5px; background: var(--border-strong); align-self: center; }
@media (min-width: 700px) { .pm-scrim { align-items: center; } .pm-sheet { border-radius: 20px; } }
.pm-alert { border-radius: 12px; padding: 10px 12px; font-size: 13px; display: flex; flex-direction: column; gap: 8px; }
.pm-alert.warn { background: #fffbeb; border: 1px solid #fcd34d; color: #78350f; }
.pm-alert.err { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.pm-alert.info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a; }
.pm-alert.ok { background: #f0fdf4; border: 1px solid #bbf7d0; color: #14532d; }
.pm-toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 60; background: var(--pm-head); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 13.5px; font-weight: 600; max-width: 90vw; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.pm-fab { position: fixed; right: max(16px, calc(50vw - 264px)); bottom: calc(84px + env(safe-area-inset-bottom)); height: 52px; padding: 0 20px; border-radius: 999px; background: var(--accent); color: #fff; display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; border: 0; box-shadow: 0 8px 20px rgba(37,99,235,.35); cursor: pointer; z-index: 25; }
.pm-code { display: flex; gap: 8px; justify-content: center; }
.pm-code input { width: 44px; height: 54px; border-radius: 12px; border: 1px solid var(--border-strong); text-align: center; font-size: 24px; font-weight: 800; background: var(--surface); }
.pm-sync { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; }
.pm-dot { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; flex: none; }
.pm-dot.off { background: #d97706; }
.pm-empty { text-align: center; color: var(--pm-mut); padding: 36px 12px; font-size: 13.5px; }
.pm-spin { width: 20px; height: 20px; border: 2.5px solid var(--pm-line); border-top-color: var(--accent); border-radius: 50%; animation: pmspin .8s linear infinite; }
@keyframes pmspin { to { transform: rotate(360deg); } }

/* ---- tabela (tela larga) -------------------------------------------------------------- */
.pm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pm-table th { text-align: left; font-size: 11.5px; color: var(--pm-mut); font-weight: 700; padding: 9px 10px; border-bottom: 1px solid var(--pm-line); background: var(--pm-line2); white-space: nowrap; }
.pm-table td { padding: 8px 10px; border-bottom: 1px solid var(--pm-line2); vertical-align: middle; }
.pm-table .num { text-align: right; white-space: nowrap; }
.pm-table tr.sel td { background: var(--accent-weak); }
.pm-table tbody tr { cursor: pointer; }
.pm-kbd { font: 700 10.5px var(--font); background: var(--pm-line2); color: var(--pm-ink); border-radius: 5px; padding: 2px 5px; }

/* ---- tela larga (navegador / dentro do SEAC) ------------------------------------------ */
@media (min-width: 1024px) {
  .pm-wide-only { display: initial; }
  .pm-app { max-width: none; }
  .pm-main.pm-cols { display: grid; grid-template-columns: 220px minmax(0,1fr) 320px; align-items: start; gap: 16px; padding: 16px 20px 40px; }
  .pm-main { padding: 16px 20px 40px; }
  .pm-fab { right: 24px; bottom: 24px; }
  .pm-narrow-only { display: none !important; }
}
@media (max-width: 1023px) { .pm-wide-only { display: none !important; } }

/* ======================= v2.1 (revisao do Fable, 28/10/2026) ======================= */
.pm-plain { background: none; border: 0; padding: 0; text-align: left; color: inherit; font: inherit; cursor: pointer; }
.pm-plain:disabled { cursor: default; }
.pm-link-sub { background: none; border: 0; padding: 0; cursor: pointer; color: var(--pm-mut); text-align: left; max-width: 100%; }
.pm-ink { color: var(--pm-ink); }
.t-ok { color: #166534; } .t-warn { color: #92400e; } .t-info { color: #1e40af; }
.pm-sync.ok { color: #166534; } .pm-sync.off { color: #92400e; }
.pm-kpic { padding: 10px 12px; }
.pm-l100 { width: 100px; flex: none; }
.pm-avatar { width: 42px; height: 42px; border-radius: 50%; background: #dbeafe; color: #1d4ed8; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; }
.pm-avatar.sm { width: 36px; height: 36px; font-size: 12px; }
.pm-ib-sm { width: 32px; height: 32px; border-radius: 9px; font-size: 13px; }
.pm-on { border-color: var(--accent) !important; color: var(--pm-blue-ink) !important; font-weight: 700; }
.pm-pop { position: absolute; top: 100%; left: 0; right: 0; z-index: 3; max-height: 220px; overflow-y: auto; }
.pm-pop .pm-li { width: 100%; padding: 8px 12px; }
.pm-mini { border: 1px solid var(--pm-line); border-radius: 10px; padding: 6px 10px; display: flex; flex-direction: column; }
.pm-mini span { font-size: 10.5px; font-weight: 600; color: var(--pm-mut); }
.pm-mini b { font-size: 14px; }
.pm-qtybox { flex: 1; position: relative; display: flex; }
.pm-qtybox span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-weight: 700; color: var(--pm-mut); font-size: 14px; }
.pm-codigo { text-align: center; font-size: 26px; font-weight: 800; letter-spacing: 10px; height: 56px; }
.pm-foto .tagr { position: absolute; right: 4px; bottom: 4px; font-size: 9.5px; font-weight: 700; background: rgba(15,23,42,.75); color: #fff; border-radius: 5px; padding: 1px 5px; }
.pm-details summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px; }
.pm-details summary::-webkit-details-marker { display: none; }
.pm-details .pm-chev { margin-left: auto; transition: transform .15s; color: var(--pm-mut); flex: none; }
.pm-details[open] .pm-chev { transform: rotate(180deg); }
.pm-plano { padding: 11px 12px; width: 100%; gap: 10px; }
.pm-plano.on { border: 2px solid var(--accent); padding: 10px 11px; }
.pm-plano.bloq { opacity: .55; }
.pm-radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-strong); display: flex; align-items: center; justify-content: center; flex: none; }
.pm-radio span { width: 10px; height: 10px; border-radius: 50%; }
.pm-radio.on { border-color: var(--accent); }
.pm-radio.on span { background: var(--accent); }
.pm-ok-circle { width: 52px; height: 52px; border-radius: 50%; background: #dcfce7; color: #166534; display: flex; align-items: center; justify-content: center; }
.pm-docmini { width: 64px; height: 84px; border-radius: 8px; border: 1px solid var(--pm-line); background: var(--pm-bg); flex: none; padding: 5px; display: flex; flex-direction: column; gap: 3px; }
.pm-docmini .l1 { height: 3px; border-radius: 3px; background: #3b82f6; }
.pm-docmini .l2 { height: 6px; width: 60%; border-radius: 3px; background: var(--border-strong); }
.pm-docmini .li { display: flex; gap: 3px; }
.pm-docmini .li span:first-child { width: 14px; height: 14px; border-radius: 3px; background: var(--pm-line); }
.pm-docmini .li span:last-child { flex: 1; height: 4px; margin-top: 5px; border-radius: 3px; background: var(--pm-line); }
.pm-docmini .lf { margin-top: auto; height: 10px; border-radius: 3px; background: var(--pm-head); }
.pm-share { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 6px; }
.pm-share button { display: flex; flex-direction: column; align-items: center; gap: 6px; font: 600 11.5px var(--font); color: var(--pm-ink); background: none; border: 0; cursor: pointer; padding: 0; }
.pm-share button:disabled { opacity: .45; cursor: default; }
.pm-share .ic { width: 52px; height: 52px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: var(--pm-line2); color: var(--pm-ink); }
.pm-share .ic.z { background: #dcfce7; color: #166534; }
.pm-acao { width: 100%; gap: 10px; }
.pm-resumo .hd-sub { font-weight: 600; color: #cbd5e1; }
.pm-kbd-inv { background: rgba(255,255,255,.2) !important; color: #fff !important; }
.pm-ambrow { border-radius: 10px; gap: 4px; padding-right: 4px; }
.pm-ambrow.on { background: var(--accent-weak); color: var(--pm-blue-ink); box-shadow: inset 3px 0 0 var(--accent); }

/* tela larga: Gerenciar Propostas */
.pm-app.pm-app-largo { max-width: none; }
.pm-gestao { display: flex; min-height: 100dvh; }
.pm-side { width: 230px; flex: none; background: var(--surface); border-right: 1px solid var(--pm-line); padding: 16px; display: flex; flex-direction: column; gap: 14px; position: sticky; top: 0; height: 100dvh; }
.pm-sidenav { display: flex; flex-direction: column; gap: 2px; }
.pm-sidenav button { text-align: left; padding: 9px 12px; border-radius: 10px; border: 0; background: none; font: 600 13.5px var(--font); color: var(--pm-ink); cursor: pointer; }
.pm-sidenav button.on { background: var(--accent-weak); color: var(--pm-blue-ink); }
.pm-gmain { flex: 1; min-width: 0; padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; }
.pm-filtros { display: flex; flex-wrap: wrap; gap: 8px; }
.pm-f { height: 38px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); display: flex; align-items: center; padding: 0 10px; gap: 6px; font-size: 13px; }
.pm-f b { font-weight: 600; color: var(--pm-mut); font-size: 11.5px; }
.pm-f input, .pm-f select { border: 0; outline: 0; background: none; font: 500 13px var(--font); color: var(--pm-ink); }
.pm-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.pm-kpis b { display: block; font-size: 22px; font-weight: 800; }
.pm-gcols { display: flex; gap: 14px; align-items: flex-start; }
.pm-gcols > .pm-card:first-child { flex: 1; }
.pm-det { width: 340px; flex: none; position: sticky; top: 16px; max-height: calc(100dvh - 32px); overflow-y: auto; }
.pm-table td.t-ok { color: #166534; }

/* tela larga: editor */
.pm-fbar { display: flex; flex-wrap: wrap; gap: 6px; }
.pm-fbar button { height: 34px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); font: 600 12.5px var(--font); color: var(--pm-ink); padding: 0 10px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.pm-fbar button:disabled { opacity: .45; cursor: default; }
.pm-painel-normal { display: contents; }
.pm-painel-scrim { position: fixed; inset: 0; z-index: 40; background: rgba(15,23,42,.45); display: flex; justify-content: center; align-items: flex-start; padding: 32px 16px; overflow-y: auto; }
.pm-main.pm-painel { background: var(--pm-bg); border-radius: 18px; width: 100%; max-width: 760px; padding: 18px 20px 24px; box-shadow: 0 20px 60px rgba(0,0,0,.3); flex: none; }

/* tema escuro: cores que eram fixas */
:root[data-theme="dark"] .pm-alert.warn { background: #322a1c; border-color: #6b5222; color: #f0c98a; }
:root[data-theme="dark"] .pm-alert.err { background: #331d20; border-color: #6b2a30; color: #f5a3a7; }
:root[data-theme="dark"] .pm-alert.info { background: #16233a; border-color: #2b4572; color: #a9c6ff; }
:root[data-theme="dark"] .pm-alert.ok { background: #10281f; border-color: #1f5a40; color: #8fe0bd; }
:root[data-theme="dark"] .b-ok, :root[data-theme="dark"] .pm-ok-circle, :root[data-theme="dark"] .pm-share .ic.z { background: #10281f; color: #8fe0bd; }
:root[data-theme="dark"] .b-warn { background: #322a1c; color: #f0c98a; }
:root[data-theme="dark"] .b-err { background: #331d20; color: #f5a3a7; }
:root[data-theme="dark"] .b-info, :root[data-theme="dark"] .pm-avatar { background: #16233a; color: #a9c6ff; }
:root[data-theme="dark"] .b-neu { background: #232833; color: #c3c9d4; }
:root[data-theme="dark"] .b-pur { background: #2a1d3a; color: #d7b4ff; }
:root[data-theme="dark"] .b-org { background: #33231a; color: #f5b98a; }
:root[data-theme="dark"] .t-ok, :root[data-theme="dark"] .pm-sync.ok, :root[data-theme="dark"] .pm-table td.t-ok { color: #8fe0bd; }
:root[data-theme="dark"] .t-warn, :root[data-theme="dark"] .pm-sync.off { color: #f0c98a; }
:root[data-theme="dark"] .t-info { color: #a9c6ff; }
:root[data-theme="dark"] .pm-foto .tag { background: #0c0e12; color: #e8eaef; }
:root[data-theme="dark"] .pm-chip.dark.on { background: #e8eaef; color: #0c0e12; border-color: #e8eaef; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .pm-alert.warn { background: #322a1c; border-color: #6b5222; color: #f0c98a; }
  :root:not([data-theme]) .pm-alert.err { background: #331d20; border-color: #6b2a30; color: #f5a3a7; }
  :root:not([data-theme]) .pm-alert.info { background: #16233a; border-color: #2b4572; color: #a9c6ff; }
  :root:not([data-theme]) .b-ok, :root:not([data-theme]) .pm-ok-circle { background: #10281f; color: #8fe0bd; }
  :root:not([data-theme]) .b-warn { background: #322a1c; color: #f0c98a; }
  :root:not([data-theme]) .b-err { background: #331d20; color: #f5a3a7; }
  :root:not([data-theme]) .b-info, :root:not([data-theme]) .pm-avatar { background: #16233a; color: #a9c6ff; }
  :root:not([data-theme]) .b-neu { background: #232833; color: #c3c9d4; }
  :root:not([data-theme]) .t-ok, :root:not([data-theme]) .pm-sync.ok { color: #8fe0bd; }
  :root:not([data-theme]) .t-warn, :root:not([data-theme]) .pm-sync.off { color: #f0c98a; }
}
@media (max-width: 400px) { .pm-kpi .pm-lbl { font-size: 10.5px; } }

/* folhas no celular: input/select tem largura minima propria e empurrava a folha para fora da tela */
.pm-sheet > *, .pm-sheet .pm-row > *, .pm-sheet .pm-field { min-width: 0; }
.pm-qtybox { min-width: 0; }
.pm-qty, .pm-sheet .pm-input, .pm-sheet .pm-select { min-width: 0; width: 100%; }
.pm-sheet .pm-step, .pm-sheet .pm-btn, .pm-sheet .pm-ib { flex: none; }
.pm-sheet { overflow-x: hidden; overflow-wrap: anywhere; }
/* linha do ambiente: no celular nome + valor + botoes passavam de 390px e alargavam a pagina inteira */
.pm-amb { flex-wrap: wrap; row-gap: 6px; }
.pm-amb .pm-btn { flex: none; }
/* ficha do produto: galeria que desliza para o lado */
.pm-galeria { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 14px; border: 1px solid var(--pm-line); background: #fff; scrollbar-width: none; }
.pm-galeria::-webkit-scrollbar { display: none; }
.pm-galeria-item { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; }
.pm-galeria-item img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pm-galeria-pontos { display: flex; justify-content: center; gap: 6px; margin-top: -4px; }
.pm-galeria-pontos button { width: 8px; height: 8px; border-radius: 50%; border: 0; padding: 0; background: var(--border-strong); cursor: pointer; }
.pm-galeria-pontos button.on { background: var(--accent); width: 18px; border-radius: 4px; }

/* rodape EXATA em todas as telas: no celular no fim do conteudo de cada tela (acima das barras e do botao flutuante) */
.pm-rodape { text-align: center; font-size: 12px; color: var(--pm-mut); padding: 10px 16px 16px; }
.pm-rodape-in { padding: 18px 0 0; }
.pm-rodape a { color: inherit; text-decoration: none; }
.pm-rodape a:hover { text-decoration: underline; color: var(--pm-blue-ink); }
.pm-app.pm-app-largo .pm-rodape, .pm-wide .pm-rodape { padding-bottom: 16px; }

/* telefone clicavel (ligar) + atalho do WhatsApp */
.pm-fone a { color: var(--pm-ink); text-decoration: none; }
.pm-fone a:hover { color: var(--pm-blue-ink); text-decoration: underline; }
.pm-fone a.pm-zap { display: inline-flex; width: 26px; height: 26px; border-radius: 8px; align-items: center; justify-content: center; background: #dcfce7; color: #166534; }
.pm-fone a.pm-zap:hover { text-decoration: none; background: #bbf7d0; }
:root[data-theme="dark"] .pm-fone a.pm-zap { background: #10281f; color: #8fe0bd; }

/* tema: o claro declara so claro (sem isso o modo escuro forcado do navegador do celular deixava a tela cinza) */
:root[data-theme="light"] { color-scheme: only light; }
:root[data-theme="dark"] { color-scheme: dark; }
:root:not([data-theme]) { color-scheme: light dark; }

/* cartao clicavel (.pm-card + .pm-plain): o reset do botao apagava fundo e borda -- lista de propostas sem divisao */
.pm-card.pm-plain { background: var(--surface); border: 1px solid var(--pm-line); border-radius: 14px; box-shadow: 0 1px 2px rgba(15, 23, 42, .05); }
.pm-card.pm-plain.pm-pad { padding: 12px 14px; }
.pm-card.pm-plain:active { background: var(--pm-line2); }
.pm-versao { font-size: 11px; margin-top: 3px; opacity: .8; }
