/* Inter variável (400–800), hospedada no próprio servidor: sem chamada ao Google e sem pulo de layout */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/inter-var.woff2") format("woff2"); }
/* VettorPrint OS — grafite + dourado da marca. v3: mais limpo, mais respiro, hierarquia clara. */
:root {
  --gold-1: #b47c38; --gold-2: #d9a948; --gold-3: #f4d860; --gold-4: #f7e9a6;
  --gold-grad: linear-gradient(100deg, #b47c38 0%, #dcae4c 30%, #f6df6d 55%, #e4bb55 78%, #b47c38 100%);
  --side: #0e0e10; --side-2: #1a1a1d; --side-ink: #9d9da6; --side-ink-on: #fafafa;
  --radius: 14px; --radius-sm: 10px; --nav-w: 232px; --nav-min: 76px;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01";
}
[data-theme="light"] {
  --bg: #f6f6f4; --card: #ffffff; --ink: #141416; --ink-2: #3b3b40; --muted: #74747c; --line: #ececea; --line-2: #e0dfdb;
  --input: #ffffff; --input-line: #dcdbd6;
  --accent: #946417; --accent-soft: #fbf4e2; --row-hover: #fafaf8; --chip: #f2f1ed;
  --ok-bg: #e9f6ee; --ok: #12703a; --err-bg: #fdeeed; --err: #b42318; --warn-bg: #fff5de; --warn: #8a5300;
  --shadow: 0 1px 2px rgba(20, 20, 22, .04), 0 2px 8px rgba(20, 20, 22, .04);
  --shadow-lg: 0 10px 40px rgba(20, 20, 22, .14);
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #111113; --card: #19191c; --ink: #ededef; --ink-2: #c9c9ce; --muted: #93939b; --line: #26262a; --line-2: #303035;
  --input: #141416; --input-line: #34343a;
  --accent: #e9c462; --accent-soft: #2a2416; --row-hover: #1e1e22; --chip: #232327;
  --ok-bg: #12291b; --ok: #6fd99a; --err-bg: #331615; --err: #ff8a80; --warn-bg: #2f2410; --warn: #f2c26b;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }
.ic { width: 19px; height: 19px; flex: none; }
::selection { background: var(--gold-4); color: #1d1405; }

/* Estrutura */
.shell { display: flex; min-height: 100vh; }
.side {
  position: fixed; top: 0; left: 0; height: 100vh; height: 100dvh; width: var(--nav-w); flex: none;
  background: var(--side); color: var(--side-ink); display: flex; flex-direction: column;
  transition: width .18s ease; overflow: hidden; z-index: 20;
}
.side::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--gold-grad); }
.logo { display: flex; align-items: center; justify-content: center; height: 78px; padding: 16px 20px; }
.logo-full { width: 100%; max-width: 180px; height: auto; }
.logo-icon { display: none; width: 34px; height: 34px; }
.side nav { flex: 1; padding: 4px 12px 12px; display: flex; flex-direction: column; gap: 1px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #2a2a2e transparent; }
.side nav a {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 9px;
  color: var(--side-ink); white-space: nowrap; font-weight: 500; font-size: 13.5px; position: relative;
}
.side nav a:hover { background: var(--side-2); color: var(--side-ink-on); text-decoration: none; }
.side nav a.on { background: linear-gradient(90deg, rgba(244,216,96,.12), rgba(244,216,96,.02)); color: var(--side-ink-on); }
.side nav a.on::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold-3); }
.side nav a.on .ic { color: var(--gold-3); }
.sep { margin: 16px 12px 6px; font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #5c5c64; white-space: nowrap; }
.collapse {
  display: flex; align-items: center; gap: 12px; margin: 8px 12px 12px; padding: 8px 12px; border: 0; border-radius: 9px;
  background: transparent; color: var(--side-ink); font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.collapse:hover { background: var(--side-2); color: var(--side-ink-on); }

[data-nav="min"] .side { width: var(--nav-min); }
[data-nav="min"] .side nav a span, [data-nav="min"] .collapse span, [data-nav="min"] .sep span { display: none; }
[data-nav="min"] .sep { height: 1px; background: #232327; margin: 10px 8px; }
[data-nav="min"] .side nav a, [data-nav="min"] .collapse { justify-content: center; padding: 10px; }
[data-nav="min"] .collapse .ic { transform: rotate(180deg); }
[data-nav="min"] .logo-full { display: none; }
[data-nav="min"] .logo-icon { display: block; }
[data-nav="min"] .logo { padding: 14px 0; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; margin-left: var(--nav-w); transition: margin-left .18s ease; }
[data-nav="min"] .main { margin-left: var(--nav-min); }
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px;
  height: 60px; padding: 0 28px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.crumb { flex: 1; font-weight: 600; color: var(--muted); font-size: 13px; }
.who { display: flex; align-items: center; gap: 10px; line-height: 1.2; margin-left: 6px; }
.who b { display: block; font-size: 13px; }
.who small { color: var(--muted); font-size: 12px; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: var(--gold-grad); color: #1d1405; font-weight: 800; flex: none; }
.avatar.sm { width: 32px; height: 32px; font-size: 13px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px;
  border: 1px solid var(--line-2); border-radius: 10px; background: var(--card); color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { background: var(--row-hover); color: var(--ink); }
[data-theme="dark"] .sun, [data-theme="light"] .moon { display: none; }
.mobile-only { display: none; }
.content { padding: 28px; max-width: 1360px; width: 100%; margin: 0 auto; }
.content.wide { max-width: 1600px; }
.content.flush { max-width: none; padding: 0; }

/* Login */
.guest { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(1200px 600px at 50% -10%, #2a2416 0%, transparent 60%), var(--side); }
.guest-logo { width: 280px; max-width: 80vw; margin-bottom: 32px; }
.guest .card { width: 100%; max-width: 400px; padding: 28px; border-radius: 18px; }
.guest .flash { width: 100%; max-width: 400px; }
.guest-theme { position: fixed; top: 16px; right: 16px; color: #ddd; border-color: #333; background: transparent; }

/* Tipografia e blocos */
h1 { font-size: 24px; margin: 0 0 18px; letter-spacing: -.02em; font-weight: 700; }
h2 { font-size: 15px; margin: 0 0 14px; font-weight: 650; letter-spacing: -.005em; }
h2 small, h1 small { font-weight: 400; font-size: 12.5px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { margin: 0 0 4px; }
.page-head p { margin: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 18px; box-shadow: var(--shadow); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.narrow { max-width: 420px; margin: 0 auto; }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.bar h1 { margin: 0; }
.small { font-size: 12px; }
.right { text-align: right !important; }
.ok-text { color: var(--ok); } .warn-text { color: var(--warn); }
kbd { font: 600 12px ui-monospace, monospace; background: var(--chip); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; }
code { font-size: 12.5px; background: var(--chip); padding: 1px 6px; border-radius: 5px; }

/* Formulários */
label { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-weight: 500; font-size: 12.5px; color: var(--ink-2); }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; color: var(--ink); }
input, select, textarea {
  font: inherit; font-size: 14px; color: var(--ink); padding: 9px 12px; border: 1px solid var(--input-line); border-radius: var(--radius-sm);
  background: var(--input); min-width: 0; transition: border-color .15s, box-shadow .15s;
}
input[type=checkbox], input[type=radio] { accent-color: var(--gold-1); width: 16px; height: 16px; padding: 0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold-3) 30%, transparent); }
textarea { width: 100%; min-height: 80px; resize: vertical; }
.upper { text-transform: uppercase; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form input, .inline-form select { width: auto; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: var(--radius-sm);
  padding: 9px 16px; font: inherit; font-weight: 600; cursor: pointer; color: #1d1405; background: var(--gold-grad);
  background-size: 140% 100%; background-position: 0 0; transition: background-position .3s, transform .05s; white-space: nowrap; text-decoration: none !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 1px 2px rgba(120, 80, 20, .25);
}
.btn:hover { background-position: 100% 0; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.block { width: 100%; }
.btn.lg { padding: 13px 20px; font-size: 15px; }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn.ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line-2); box-shadow: none; }
.btn.ghost:hover { background: var(--row-hover); border-color: var(--input-line); }
.btn.wa { background: #1f9d55; color: #fff; box-shadow: 0 1px 2px rgba(20, 90, 50, .3); }
.btn.wa:hover { background: #18834a; }
.btn + .btn.block { margin-top: 8px; }
.link { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; font-weight: 500; }
.danger { color: var(--err) !important; }

/* Tabelas */
table { width: 100%; border-collapse: collapse; }
.card > table, .content > table { background: var(--card); }
.content > table { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; background: transparent; }
tr:last-child td { border-bottom: 0; }
table tr:hover td { background: var(--row-hover); }
.table.compact td, .table.compact th { padding: 7px 8px; }
/* Cabeçalho fixo: a linha de títulos fica grudada abaixo da barra superior ao rolar a página (use class="sticky-head" na tabela).
   overflow: clip (não hidden) para a tabela não virar contêiner de rolagem e quebrar o sticky. */
table.sticky-head { overflow: clip; }
.content > table.sticky-head { overflow: clip; }
table.sticky-head th { position: sticky; top: 60px; z-index: 5; background: var(--card); box-shadow: 0 1px 0 var(--line); }
.table-wrap, .card { overflow: visible; }
tr.off { opacity: .5; }
tr.pend td { background: var(--warn-bg); }
.actions { display: flex; gap: 12px; align-items: center; }
/* célula de ação: continua célula de tabela (display:flex quebrava a linha: altura própria e separador deslocado) */
td.actions, th.actions { display: table-cell; white-space: nowrap; vertical-align: middle; }
td.actions > * { display: inline-flex; align-items: center; vertical-align: middle; margin-right: 12px; }
td.actions > *:last-child { margin-right: 0; }
.tbl-mid td, .tbl-mid th { vertical-align: middle; }
td.nowrap, th.nowrap { white-space: nowrap; }
.inline { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

.flash { display: block; padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 18px; font-weight: 500; }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.err { background: var(--err-bg); color: var(--err); }
.flash.warn { background: var(--warn-bg); color: var(--warn); }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.grid2.tight { gap: 0 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.muted { color: var(--muted); }
.note { font-size: 12.5px; color: var(--muted); margin: 8px 0 12px; }
.code { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; background: var(--chip); padding: 2px 7px; border-radius: 5px; font-weight: 600; }
.tag { display: inline-block; background: var(--chip); color: var(--ink-2); border-radius: 999px; padding: 2px 9px; margin: 1px 2px; font-size: 11.5px; font-weight: 600; vertical-align: middle; }
.tag.off { text-decoration: line-through; }
.tag.gold { background: var(--accent-soft); color: var(--accent); }
.tag.red { background: var(--err-bg); color: var(--err); }
.tag.green { background: var(--ok-bg); color: var(--ok); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 18px; }
.stats div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; color: var(--muted); box-shadow: var(--shadow); }
.stats span { display: block; font-size: 24px; font-weight: 700; color: var(--ink); letter-spacing: -.02em; }
.search { display: flex; gap: 8px; margin-bottom: 16px; }
.search input { flex: 1; padding: 11px 14px; }
.sticky { position: sticky; top: 76px; align-self: start; }
dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 0 0 12px; }
dd { margin: 0; text-align: right; }
.qr { background: #fff; padding: 10px; border-radius: 8px; width: max-content; margin: 0 auto 12px; }
.qr svg { width: 220px; height: 220px; display: block; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); margin: 0 0 14px; padding: 12px 14px; }
legend { font-weight: 600; font-size: 13px; padding: 0 6px; }
details summary { cursor: pointer; color: var(--accent); margin: 6px 0; font-weight: 500; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.status { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--chip); }
.status.enviada, .status.entregue, .status.lida { background: var(--ok-bg); color: var(--ok); }
.status.falhou { background: var(--err-bg); color: var(--err); }
.status.aguardando_conexao { background: var(--warn-bg); color: var(--warn); }
.msg-body { white-space: pre-wrap; font-size: 13px; }

/* Busca com ícone */
.search-box { flex-direction: row; align-items: center; gap: 8px; margin: 0; background: var(--card); border: 1px solid var(--input-line); border-radius: 12px; padding: 0 12px; min-width: 300px; color: var(--muted); }
.search-box:focus-within { border-color: var(--gold-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold-3) 30%, transparent); }
.search-box input { border: 0; box-shadow: none !important; padding: 10px 0; flex: 1; background: transparent; }
.search-box.wide { min-width: min(520px, 100%); }

/* Abas segmentadas e chips */
.seg { display: inline-flex; background: var(--chip); border-radius: 11px; padding: 3px; gap: 2px; }
.seg a { padding: 6px 14px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: 13px; text-decoration: none; }
.seg a.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line-2); background: var(--card); color: var(--ink-2); border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; transition: all .12s; }
.chip:hover { border-color: var(--gold-2); }
.chip.on { background: var(--ink); color: var(--card); border-color: var(--ink); }
.chip-check { flex-direction: row; margin: 0; }
.chip-check input { position: absolute; opacity: 0; pointer-events: none; }
.chip-check span { border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 13px; font-size: 13px; cursor: pointer; color: var(--ink-2); background: var(--card); }
.chip-check input:checked + span { background: var(--accent-soft); border-color: var(--gold-2); color: var(--accent); font-weight: 600; }
.chip-check input:focus-visible + span { box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold-3) 35%, transparent); }
.funcoes { padding: 14px 16px; }
.funcoes legend small { font-weight: 400; }

/* Interruptor */
.switch { flex-direction: row; align-items: center; gap: 10px; cursor: pointer; color: var(--ink); font-size: 13.5px; font-weight: 500; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 38px; height: 22px; border-radius: 999px; background: var(--line-2); position: relative; flex: none; transition: background .15s; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform .15s; }
.switch input:checked + .track { background: var(--gold-1); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold-3) 35%, transparent); }
.settings .grid3 { align-items: end; }
.sticky-save { position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(transparent, var(--bg) 35%); z-index: 5; margin-bottom: 8px; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpis.three { grid-template-columns: repeat(3, 1fr); }
.kpis.small .kpi b { font-size: 22px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); color: var(--ink); display: flex; flex-direction: column; gap: 2px; text-decoration: none !important; transition: border-color .15s, transform .15s; }
a.kpi:hover { border-color: var(--gold-2); transform: translateY(-1px); }
.kpi small { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.kpi b { font-size: 26px; font-weight: 750; letter-spacing: -.025em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi em { font-style: normal; color: var(--muted); font-size: 12px; }
.kpi.hero { background: var(--side); border-color: var(--side); color: #fff; position: relative; overflow: hidden; }
.kpi.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 3px; background: var(--gold-grad); }
.kpi.hero small, .kpi.hero em { color: #a8a8b0; }
.kpi.hero b { color: var(--gold-3); font-size: 30px; }
.up { color: #4ade80; font-weight: 700; } .down { color: #f87171; font-weight: 700; }
.kpi:not(.hero) .up { color: var(--ok); } .kpi:not(.hero) .down { color: var(--err); }

/* Atalhos */
.shortcuts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 18px; }
.shortcuts a { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); text-decoration: none; }
.shortcuts a .ic { color: var(--accent); width: 22px; height: 22px; }
.shortcuts a:hover { border-color: var(--gold-2); }
.prio { display: grid; grid-template-columns: 70px 1fr auto auto; gap: 10px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none !important; }
.prio:last-child { border-bottom: 0; }
.prio:hover { background: var(--row-hover); }
.prio .num { font-weight: 800; font-size: 16px; }
.prio small { display: block; }

/* Gráfico de barras */
.chart { position: relative; margin: 0; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .ax { fill: var(--muted); font-size: 11px; font-family: inherit; }
.chart .mark { fill: var(--gold-1); transition: opacity .1s; }
.chart .hit { fill: transparent; }
.chart .bar.on .mark { fill: var(--gold-2); }
.chart:has(.bar.on) .bar:not(.on) .mark { opacity: .55; }
.chart-tip { position: absolute; transform: translate(-50%, -100%); background: var(--ink); color: var(--card); font-size: 12px; font-weight: 600; padding: 5px 9px; border-radius: 7px; pointer-events: none; white-space: nowrap; }

/* Lista de cartões (fila de arte) */
.list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.row-card { display: flex; gap: 16px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow); border-left: 4px solid var(--line-2); }
.row-card.warn { border-left-color: #e0a526; }
.row-card.late { border-left-color: var(--err); background: color-mix(in srgb, var(--err-bg) 55%, var(--card)); }
.rc-main { flex: 1; min-width: 0; }
.rc-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rc-top .num { font-weight: 800; font-size: 15px; }
.rc-items { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 5px 0 4px; font-size: 13px; }
.rc-meta { font-size: 12.5px; }
.rc-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.empty-state { text-align: center; padding: 32px; }

/* Diálogos */
dialog.dlg { border: 0; border-radius: 18px; padding: 26px; width: min(560px, 94vw); max-height: 92vh; background: var(--card); color: var(--ink); box-shadow: var(--shadow-lg); }
dialog.dlg::backdrop { background: rgba(10, 10, 12, .55); backdrop-filter: blur(2px); }
dialog.dlg h2 { font-size: 18px; margin-bottom: 16px; }
.modal-close { position: absolute; top: 12px; right: 12px; margin: 0; }
.modal-close button { border: 0; background: var(--chip); color: var(--ink); width: 34px; height: 34px; border-radius: 50%; font-size: 20px; cursor: pointer; line-height: 1; }
.paste-zone { border: 2px dashed var(--input-line); border-radius: 14px; min-height: 200px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px; cursor: pointer; color: var(--muted); background: var(--row-hover); font-weight: 400; font-size: 14px; }
.paste-zone:focus, .paste-zone.over { border-color: var(--gold-2); outline: none; background: var(--accent-soft); }
.paste-zone img { max-width: 100%; max-height: 300px; border-radius: 8px; }
.art-lib { margin-bottom: 14px; }
.art-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.art-pick { border: 2px solid var(--line); background: var(--card); border-radius: 10px; padding: 4px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; color: var(--muted); font: inherit; font-size: 11px; }
.art-pick img { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--chip); border-radius: 6px; }
.art-pick.on { border-color: var(--gold-1); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold-3) 35%, transparent); }
.art-card { margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--card); }
.art-card img { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--chip); display: block; }
.art-card figcaption { padding: 8px 10px; font-size: 12px; display: flex; flex-direction: column; gap: 2px; }
.art-card figcaption small { color: var(--muted); }
.art-card.dim { opacity: .55; }
.img-field { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.img-field img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }

/* Loja */
.store { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 24px; align-items: start; }
.store .chips { margin-bottom: 18px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.product-card { display: flex; flex-direction: column; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0; overflow: hidden; cursor: pointer; font: inherit; color: var(--ink); box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s, border-color .15s; }
.product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--gold-2); }
.pc-img { aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; background: var(--chip); overflow: hidden; }
.pc-img img, .pc-img svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.pc-body b { font-size: 14px; line-height: 1.3; }
.pc-body small { font-size: 12px; line-height: 1.35; }
.pc-price { margin-top: auto; padding-top: 8px; font-weight: 750; font-size: 16px; letter-spacing: -.01em; }
.pc-price small { font-weight: 500; color: var(--muted); font-size: 11px; }
.pc-price em { display: block; font-style: normal; font-size: 12px; font-weight: 600; color: var(--ok); }
.cart { position: sticky; top: 76px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); max-height: calc(100vh - 92px); overflow-y: auto; }
.cart-block { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.cart-block:last-child { border-bottom: 0; }
.cart-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 14px; }
.cart-items { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cart-items li { display: grid; grid-template-columns: 48px 1fr auto; gap: 10px; align-items: start; }
.cart-items li.empty { display: block; padding: 18px 0; text-align: center; }
.ci-img { width: 48px; height: 48px; border-radius: 10px; overflow: hidden; background: var(--chip); }
.ci-img svg, .ci-img img { width: 100%; height: 100%; object-fit: cover; }
.ci-txt { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
.ci-txt small { color: var(--muted); font-size: 12px; }
.ci-line { color: var(--ink-2) !important; font-weight: 600; }
.ci-act { display: flex; flex-direction: column; gap: 2px; font-size: 12px; align-items: flex-end; }
.cart-opts label { margin-bottom: 10px; }
.totals:empty { display: none; }
.sum { font-size: 13px; color: var(--ink-2); }
.pay-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pay { border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; }
.pay small { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.pay b { font-size: 18px; letter-spacing: -.02em; }
.pay em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.pay.pix { border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: var(--ok-bg); }
.pay.pix em { color: var(--ok); }
.who-card { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.who-card b { display: block; }
.picker { position: relative; }
.picker input { width: 100%; }
.picker-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--card); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 5; overflow: hidden; }
.picker-list button { display: flex; flex-direction: column; width: 100%; text-align: left; border: 0; background: transparent; padding: 10px 12px; cursor: pointer; font: inherit; color: var(--ink); border-bottom: 1px solid var(--line); }
.picker-list button:hover { background: var(--row-hover); }
.picker-list small { color: var(--muted); }
.picker-list p { padding: 10px 12px; margin: 0; }
.arts-strip { display: flex; gap: 6px; flex-wrap: wrap; }
.arts-strip img { width: 52px; height: 52px; object-fit: contain; border-radius: 8px; background: var(--chip); border: 1px solid var(--line); }
#msg-box textarea { margin-top: 8px; font-size: 13px; }
.product-modal { width: min(860px, 96vw) !important; padding: 0 !important; }
.pd { display: grid; grid-template-columns: 1fr 1.15fr; min-height: 420px; }
.pd-img { background: var(--chip); display: flex; align-items: center; justify-content: center; }
.pd-img img, .pd-img svg { width: 100%; height: 100%; object-fit: cover; }
.pd-info { padding: 26px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; max-height: 88vh; }
.pd-info h2 { font-size: 20px; margin: 0; padding-right: 30px; }
.pd-info p { margin: -6px 0 0; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.opt { border: 1.5px solid var(--line-2); background: var(--card); border-radius: 11px; padding: 9px 10px; text-align: left; cursor: pointer; font: inherit; color: var(--ink); display: flex; flex-direction: column; gap: 1px; position: relative; }
.opt small { color: var(--muted); font-size: 11.5px; }
.opt i { position: absolute; top: -8px; right: 6px; background: var(--gold-grad); color: #1d1405; font-style: normal; font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 999px; }
.opt.on { border-color: var(--gold-1); background: var(--accent-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold-3) 28%, transparent); }
.wh { display: flex; align-items: center; gap: 8px; } .wh input { width: 110px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--input-line); border-radius: 11px; overflow: hidden; width: max-content; }
.stepper button { border: 0; background: var(--chip); width: 40px; height: 40px; font-size: 18px; cursor: pointer; color: var(--ink); }
.stepper input { border: 0; width: 70px; text-align: center; border-radius: 0; box-shadow: none !important; font-weight: 700; }
.pd-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding-top: 16px; }
.pd-foot div { display: flex; flex-direction: column; }
.pd-foot b { font-size: 22px; letter-spacing: -.02em; }

/* Telas de TV e ripagem */
.tv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 18px; }
.tv-preview { aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #0b0b0d; margin-bottom: 14px; position: relative; }
.tv-preview iframe { width: 300%; height: 300%; transform: scale(.3334); transform-origin: 0 0; border: 0; pointer-events: none; }
.live { font-size: 11px; font-weight: 700; color: var(--err); text-transform: uppercase; letter-spacing: .08em; }
.live::before { content: "● "; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.ripagem-wrap { position: relative; height: calc(100vh - 60px); }
.ripagem-frame { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.ripagem-dock { position: absolute; right: 16px; bottom: 16px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; z-index: 3; max-width: 380px; }
.ripagem-dock .card { margin: 0; padding: 12px 14px; box-shadow: var(--shadow-lg); }
.ripagem-versions[open] { max-height: 50vh; overflow-y: auto; }
.rip-req h2 { font-size: 13px; margin-bottom: 8px; }
.rr { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.rr small { display: block; }

/* Badge do menu */
.badge { margin-left: auto; background: #1f9d55; color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 7px; }
[data-nav="min"] .badge { position: absolute; margin: -14px 0 0 14px; padding: 0 5px; }

/* Central de atendimento */
.content.full { max-width: none; padding: 0; }
.inbox { display: grid; grid-template-columns: 320px 1fr 300px; height: calc(100vh - 60px); }
.inbox > * { min-width: 0; min-height: 0; }
.ib-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; background: var(--card); }
.ib-list .tools { padding: 12px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.ib-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.ib-tabs button { border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 12px; cursor: pointer; }
.ib-tabs button.on { background: var(--accent-soft); color: var(--accent); border-color: transparent; font-weight: 600; }
.ib-items { overflow-y: auto; flex: 1; }
.ib-item { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); font: inherit; padding: 11px 14px; cursor: pointer; }
.ib-item:hover { background: var(--row-hover); }
.ib-item.on { background: var(--accent-soft); }
.ib-item .top { display: flex; justify-content: space-between; gap: 8px; }
.ib-item .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-item .pv { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.ib-item .meta { display: flex; gap: 6px; margin-top: 4px; font-size: 11px; color: var(--muted); align-items: center; }
.ib-item .un { background: #1f9d55; color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 0 7px; }
.pill { font-size: 11px; border-radius: 999px; padding: 1px 7px; background: var(--chip); color: var(--muted); }
.pill.bot { background: var(--accent-soft); color: var(--accent); }
.pill.new { background: var(--warn-bg); color: var(--warn); }

.ib-chat { display: flex; flex-direction: column; background: var(--bg); }
.ib-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line); min-height: 58px; }
.ib-head .who2 { flex: 1; min-width: 0; }
.ib-head .who2 b { display: block; }
.ib-head small { color: var(--muted); }
.ib-msgs { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 6px; }
.empty-state { margin: auto; color: var(--muted); text-align: center; }
.bub { max-width: 68%; padding: 8px 11px 6px; border-radius: 10px; position: relative; box-shadow: var(--shadow); white-space: pre-wrap; word-wrap: break-word; }
.bub.in { align-self: flex-start; background: var(--card); border-top-left-radius: 2px; }
.bub.out { align-self: flex-end; background: #dcf3e3; color: #0f2a19; border-top-right-radius: 2px; }
[data-theme="dark"] .bub.out { background: #18402a; color: #e5f6eb; }
.bub.bot.out { background: var(--accent-soft); color: var(--ink); }
.bub .ft { display: flex; justify-content: flex-end; gap: 6px; font-size: 11px; opacity: .7; margin-top: 3px; white-space: nowrap; }
.bub .who3 { font-size: 11px; font-weight: 700; opacity: .75; margin-bottom: 2px; }
.bub img { max-width: 260px; max-height: 260px; border-radius: 6px; display: block; margin-bottom: 4px; cursor: zoom-in; }
.bub .q { border-left: 3px solid var(--gold-2); background: rgba(127,127,127,.12); padding: 4px 8px; border-radius: 4px; font-size: 12px; margin-bottom: 4px; }
.bub .btns { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.bub .btns span { border: 1px solid currentColor; opacity: .7; border-radius: 6px; padding: 2px 8px; font-size: 12px; }
/* ações ao lado da bolha (fora dela): à esquerda nas de saída, à direita nas de entrada */
.bub .acts { position: absolute; top: 2px; display: flex; gap: 2px; align-items: center; padding: 2px 6px; opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 4; }
.bub.out .acts { right: 100%; } .bub.in .acts { left: 100%; }
.bub:hover .acts, .bub.pk .acts { opacity: 1; pointer-events: auto; }
.bub .acts a { display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; border-radius: 50%; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 14px; line-height: 1; text-decoration: none; color: var(--ink); }
.bub .acts a:hover { background: var(--chip); }
@media (hover: none) { .bub .acts { opacity: .45; pointer-events: auto; } }
.bub.hid { opacity: .55; font-style: italic; }
.tick.lida { color: #1d8cf8; opacity: 1; }
.tick.falhou, .bub .err { color: var(--err); opacity: 1; }
.day-sep { align-self: center; font-size: 11px; color: var(--muted); background: var(--card); padding: 2px 10px; border-radius: 999px; margin: 6px 0; }

.ib-compose { background: var(--card); border-top: 1px solid var(--line); padding: 10px 14px; position: relative; }
.ib-compose.drag { outline: 2px dashed var(--gold-2); outline-offset: -6px; }
.ib-compose .row { display: flex; gap: 8px; align-items: flex-end; }
.ib-compose textarea { flex: 1; min-height: 42px; max-height: 160px; resize: none; }
.ib-compose .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.ib-compose .chips span { background: var(--chip); border-radius: 6px; padding: 3px 8px; font-size: 12px; }
.replybar { display: flex; justify-content: space-between; gap: 8px; background: var(--chip); border-left: 3px solid var(--gold-2); padding: 6px 10px; border-radius: 6px; margin-bottom: 8px; font-size: 12px; }
.qr-menu { position: absolute; bottom: 100%; left: 14px; right: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); max-height: 240px; overflow-y: auto; }
.qr-menu button { display: block; width: 100%; text-align: left; border: 0; background: transparent; color: var(--ink); font: inherit; padding: 8px 12px; cursor: pointer; }
.qr-menu button:hover, .qr-menu button.on { background: var(--row-hover); }
.window-closed { background: var(--warn-bg); color: var(--warn); padding: 10px 12px; border-radius: 8px; font-size: 13px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }

.ib-side { border-left: 1px solid var(--line); background: var(--card); overflow-y: auto; padding: 16px; }
.ib-side h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 18px 0 8px; }
.ib-side h3:first-child { margin-top: 0; }
.ib-side .ord { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }

div.modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 50; }
div.modal .card { width: min(520px, 92vw); max-height: 86vh; overflow-y: auto; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; z-index: 60; cursor: zoom-out; }
.lightbox img { max-width: 92vw; max-height: 92vh; }

/* Simulador (tela de celular) */
.sim { display: grid; grid-template-columns: 340px 400px; gap: 24px; align-items: start; }
.phone { border: 10px solid #111; border-radius: 34px; height: 720px; display: flex; flex-direction: column; overflow: hidden; background: #efe7dd; }
[data-theme="dark"] .phone { background: #0b141a; }
.phone .ph-head { background: #075e54; color: #fff; padding: 14px 16px; font-weight: 600; }
.phone .ph-msgs { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.phone .bub.in { align-self: flex-end; background: #d9fdd3; color: #111; }
.phone .bub.out { align-self: flex-start; background: #fff; color: #111; }
[data-theme="dark"] .phone .bub.in { background: #005c4b; color: #e9edef; }
[data-theme="dark"] .phone .bub.out { background: #202c33; color: #e9edef; }
.phone .btns button { display: block; width: 100%; margin-top: 4px; border: 0; border-top: 1px solid rgba(0,0,0,.1); background: transparent; color: #027eb5; font: inherit; font-weight: 600; padding: 7px; cursor: pointer; }
.phone .ph-input { display: flex; gap: 6px; padding: 8px; background: rgba(0,0,0,.04); }
.phone .ph-input input[type=text] { flex: 1; border-radius: 999px; }

@media (max-width: 1200px) { .inbox { grid-template-columns: 280px 1fr; } .ib-side { display: none; } }
@media (max-width: 900px) { .inbox { grid-template-columns: 1fr; } .ib-list.hide-m { display: none; } .sim { grid-template-columns: 1fr; } }
.bell { position: relative; }
.bell .badge { position: absolute; top: -6px; right: -6px; background: var(--err); }
.bell-menu { position: absolute; right: 0; top: 46px; width: 340px; max-height: 420px; overflow-y: auto; z-index: 30; }
.bell-item { display: block; padding: 8px 6px; border-bottom: 1px solid var(--line); color: var(--ink); }
.bell-item small { display: block; color: var(--muted); }
.bell-item.new b::before { content: "● "; color: var(--err); }

@media (max-width: 1200px) { .store { grid-template-columns: 1fr; } .cart { position: static; max-height: none; } }
@media (max-width: 900px) {
  .grid2, .grid3, .kpis.three, .pd { grid-template-columns: 1fr; }
  .main, [data-nav="min"] .main { margin-left: 0; }
  .side { position: fixed; left: 0; transform: translateX(-100%); transition: transform .2s; width: var(--nav-w) !important; }
  .nav-open .side { transform: none; }
  [data-nav="min"] .side nav a span, [data-nav="min"] .sep span { display: inline; }
  [data-nav="min"] .logo-full { display: block; }
  [data-nav="min"] .logo-icon { display: none; }
  .mobile-only { display: inline-flex; }
  .collapse { display: none; }
  .who span:not(.avatar) { display: none; }
  .content { padding: 16px; }
  .topbar { padding: 0 14px; }
  .search-box { min-width: 0; width: 100%; }
  .row-card { flex-direction: column; align-items: stretch; }
  .pd-img { max-height: 200px; }
  .tv-grid { grid-template-columns: 1fr; }
}
select, input, textarea { max-width: 100%; }
.grid2 > *, .grid3 > * { min-width: 0; }
.grid3 select, .grid2 select, .grid3 input:not([type=checkbox]):not([type=radio]), .grid2 input:not([type=checkbox]):not([type=radio]) { width: 100%; }

/* Barras horizontais (categorias de chamado) */
.hbar { display: grid; grid-template-columns: 190px 1fr 40px; gap: 12px; align-items: center; padding: 5px 0; color: var(--ink); text-decoration: none !important; font-size: 13px; }
.hbar i { display: block; height: 12px; width: var(--w); min-width: 3px; background: var(--gold-1); border-radius: 0 4px 4px 0; }
.hbar:hover i { background: var(--gold-2); }
.hbar b { text-align: right; font-variant-numeric: tabular-nums; }
.ib-tabs.sectors button.on { background: var(--ink); color: var(--card); }
.agent-banner { display: flex; justify-content: space-between; gap: 8px; background: var(--accent-soft); color: var(--accent); padding: 8px 10px; border-radius: 9px; font-size: 13px; }
.pill.sec-vendas { background: #e7f0fb; color: #1f5fa8; } .pill.sec-suporte { background: var(--err-bg); color: var(--err); } .pill.sec-arte { background: #f1e9fb; color: #6b3fa0; }
[data-theme="dark"] .pill.sec-vendas { background: #172636; color: #8cbcf0; } [data-theme="dark"] .pill.sec-arte { background: #261b33; color: #c6a5ee; }
a.pill { text-decoration: none; display: inline-block; margin-top: 3px; }

/* Supervisão */
.alerts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.alert-item { display: block; padding: 12px 16px; border-radius: 12px; background: var(--warn-bg); color: var(--warn); text-decoration: none !important; }
.alert-item.red { background: var(--err-bg); color: var(--err); }
.agents { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.agent { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.agent.busy { border-color: color-mix(in srgb, var(--err) 35%, var(--line)); }
.agent header { display: flex; align-items: center; gap: 10px; }
.agent header div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.agent header small { font-size: 11.5px; }
.agent .avatar { position: relative; }
.dot { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: var(--line-2); border: 2px solid var(--card); }
.dot.on { background: #22c55e; }
.agent-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.agent-stats span { background: var(--chip); border-radius: 8px; padding: 4px 9px; font-size: 12px; color: var(--ink-2); }
.agent-stats span.red { background: var(--err-bg); color: var(--err); }
.agent-convs { display: flex; flex-direction: column; border-top: 1px solid var(--line); padding-top: 6px; }
.ac { display: grid; grid-template-columns: 1fr auto auto; gap: 2px 8px; padding: 7px 4px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none !important; font-size: 13px; align-items: center; }
.ac:last-child { border-bottom: 0; }
.ac:hover { background: var(--row-hover); }
.ac .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac .un { background: #1f9d55; color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 0 7px; }
.ac small { color: var(--muted); font-size: 11px; }
.ac .pv { grid-column: 1 / -1; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.late-pill { background: var(--err-bg); color: var(--err); font-weight: 700; font-size: 12.5px; padding: 6px 12px; border-radius: 999px; text-decoration: none !important; animation: blink 2.4s infinite; }
a.chip { text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.chip b { font-size: 11.5px; background: var(--chip); color: var(--ink-2); border-radius: 999px; padding: 0 7px; }
.chip.on b { background: rgba(255,255,255,.18); color: inherit; }
.chip-red { border-color: color-mix(in srgb, var(--err) 50%, transparent); color: var(--err); }
tr.row-late td { background: color-mix(in srgb, var(--err-bg) 60%, transparent); }
.ib-head { flex-wrap: wrap; row-gap: 8px; }
.ib-head .who2 { min-width: 200px; }
.ib-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.pc-img { position: relative; }
.pc-edit { position: absolute; left: 8px; bottom: 8px; background: rgba(14,14,16,.78); color: #fff; font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px; opacity: 0; transition: opacity .15s; }
.pc-edit.rm { left: auto; right: 8px; padding: 5px 9px; }
.product-card:hover .pc-edit, .product-card:focus-within .pc-edit { opacity: 1; }
@media (hover: none) { .pc-edit { opacity: 1; } }

/* Menu com grupos recolhíveis */
.sep-toggle { display: flex; align-items: center; justify-content: space-between; width: calc(100% - 0px); background: none; border: 0; cursor: pointer; font: inherit; font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #5c5c64; padding: 6px 12px; margin: 10px 0 2px; border-radius: 8px; }
.sep-toggle:hover { color: #a1a1aa; background: var(--side-2); }
.sep-toggle .chev { font-style: normal; transition: transform .15s; font-size: 11px; }
.nav-group.closed .chev { transform: rotate(-90deg); }
.nav-group.closed .nav-items { display: none; }
.nav-items { display: flex; flex-direction: column; gap: 1px; }
.nav-group.closed:has(.badge:not([hidden])) .sep-toggle span::after { content: " ●"; color: #22c55e; }
[data-nav="min"] .nav-group.closed .nav-items { display: flex; }
[data-nav="min"] .sep-toggle { height: 1px; padding: 0; margin: 10px 8px; background: #232327; overflow: hidden; pointer-events: none; }
[data-nav="min"] .sep-toggle * { display: none; }
.side nav a.team-link { margin-top: 2px; }
.badge.team { background: #3b82f6; }

/* Avisos na tela */
.toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 10px; z-index: 100; width: min(360px, calc(100vw - 36px)); }
.toast { display: flex; flex-direction: column; gap: 2px; background: var(--card); color: var(--ink); border: 1px solid var(--line-2); border-left: 4px solid #22c55e; border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow-lg); text-decoration: none !important; animation: toastIn .25s ease; transition: opacity .35s, transform .35s; }
.toast.team { border-left-color: #3b82f6; }
.toast b { font-size: 13.5px; }
.toast span { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.toast.out { opacity: 0; transform: translateX(20px); }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } }
.raw { max-height: 320px; overflow: auto; background: var(--chip); padding: 10px; border-radius: 8px; font-size: 12px; }
.freight-box { grid-column: 1 / -1; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; }
.freight-box .cart-title { margin-bottom: 6px; }
.fopts { display: flex; flex-direction: column; gap: 6px; }
.fopt { flex-direction: row; align-items: center; gap: 10px; margin: 0; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer; color: var(--ink); font-weight: 400; }
.fopt span { flex: 1; display: flex; flex-direction: column; }
.fopt small { color: var(--muted); font-size: 11.5px; }
.fopt:has(input:checked) { border-color: var(--gold-1); background: var(--accent-soft); }
.fmanual { margin: 8px 0 0 !important; }
.checks-field { grid-column: span 2; margin: 0 0 14px; padding: 8px 12px; }

/* fotos dos produtos quadradas */
.pc-img { aspect-ratio: 1 / 1; }
.pd-img { aspect-ratio: 1 / 1; align-self: start; }
.version { margin: 0 12px; padding: 6px 12px; font-size: 11px; color: #6b6b73; white-space: nowrap; }
.version b { color: #a1a1aa; font-weight: 600; }
[data-nav="min"] .version { display: none; }
.update-bar { position: fixed; left: 50%; top: 14px; transform: translateX(-50%); z-index: 200; display: flex; align-items: center; gap: 10px; background: var(--side); color: #fff; padding: 10px 14px; border-radius: 14px; box-shadow: var(--shadow-lg); font-size: 14px; }
.update-bar .btn.ghost { background: transparent; color: #ddd; border-color: #444; }
[data-embed] .side, [data-embed] .topbar { display: none !important; }
[data-embed] .main, html.present .main { margin-left: 0 !important; }
[data-embed] .content { padding: 18px; max-width: none; }
[data-embed] .cart { top: 12px; max-height: calc(100vh - 24px); }
[data-embed] .page-head p { display: none; }

/* Perfil do cliente na conversa */
.prof-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.prof-head div { display: flex; flex-direction: column; min-width: 0; }
.prof-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; }
.prof-actions { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.prof-actions .btn + .btn.block { margin-top: 0; }
.prof-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 6px; }
.prof-stats div { background: var(--chip); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; }
.prof-stats b { font-size: 14px; } .prof-stats small { color: var(--muted); font-size: 11px; }
dialog.quote-dlg { width: min(1320px, 96vw); height: 92vh; max-height: 92vh; padding: 0; overflow: hidden; }
dialog.quote-dlg iframe { width: 100%; height: 100%; border: 0; display: block; background: var(--bg); }
dialog.quote-dlg .modal-close { z-index: 2; }

/* 0.3.2 — Operações, painéis de desempenho */
.table-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 14px; }
.table-wrap table td, .table-wrap table th { white-space: normal; overflow-wrap: anywhere; } .table-wrap td small { white-space: normal; }
tr.late td { background: var(--err-bg) !important; }
.kpi b.warn { color: var(--warn); } .kpi b.err { color: var(--err); } .kpi b.ok { color: var(--ok); }
select.pill-select { border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; border: 0; width: auto; }
select.pill-select.warn { background: var(--warn-bg); color: var(--warn); } select.pill-select.ok { background: var(--ok-bg); color: var(--ok); } select.pill-select.err { background: var(--err-bg); color: var(--err); }
.hbar { display: grid; grid-template-columns: 130px 1fr auto; align-items: center; gap: 10px; margin: 7px 0; font-size: 13px; }
.hbar i { height: 10px; border-radius: 6px; background: var(--gold-grad); min-width: 4px; }
.hbar b { font-variant-numeric: tabular-nums; font-weight: 600; }
.progress { height: 8px; background: var(--chip); border-radius: 6px; overflow: hidden; min-width: 90px; }
.progress i { display: block; height: 100%; background: var(--gold-grad); border-radius: 6px; }
.progress.ok i { background: var(--ok); } .progress.err i { background: var(--err); }
[data-theme="light"] { --s1: #b07a22; --s2: #2f6db5; }
[data-theme="dark"] { --s1: #a8761f; --s2: #4f86cf; }
.chart .mark.s1 { fill: var(--s1); } .chart .mark.s2 { fill: var(--s2); }
.chart .bar.on .mark.s1, .chart .bar.on .mark.s2 { filter: brightness(1.12); }
.legend i.s1 { background: var(--s1); } .legend i.s2 { background: var(--s2); }
.chart .val { fill: var(--ink-2); font-size: 11px; font-weight: 600; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.status-dot { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 12.5px; border-radius: 999px; padding: 2px 10px; }
.status-dot.suave { background: var(--ok-bg); color: var(--ok); } .status-dot.fluxo { background: var(--warn-bg); color: var(--warn); } .status-dot.correria { background: var(--err-bg); color: var(--err); }
.tiers { display: flex; gap: 4px; margin-top: 6px; } .tiers span { flex: 1; text-align: center; font-size: 10.5px; padding: 3px 0; border-radius: 5px; background: var(--chip); color: var(--muted); }
.tiers span.on { background: var(--gold-grad); color: #1d1405; font-weight: 700; }
.person-card { display: grid; gap: 8px; }
.person-card h3 { margin: 0; font-size: 15px; display: flex; justify-content: space-between; align-items: center; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-bottom: 18px; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; font-size: 12px; color: var(--muted); }
.mini-stats b { display: block; font-size: 15px; white-space: nowrap; color: var(--ink); font-variant-numeric: tabular-nums; }
.quick-result { background: var(--side); color: #fff; border-radius: var(--radius); padding: 20px; position: relative; overflow: hidden; }
.quick-result::after { content: ""; position: absolute; inset: auto 0 0 0; height: 3px; background: var(--gold-grad); }
.quick-result small { color: #a8a8b0; } .quick-result b.big { font-size: 34px; color: var(--gold-3); display: block; letter-spacing: -.02em; }
.quick-result .row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid #26262a; font-size: 13.5px; }
@media (max-width: 800px) { .grid2 { grid-template-columns: 1fr; } .hbar { grid-template-columns: 90px 1fr auto; } }
.dash3 { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 14px; margin-bottom: 18px; }
.dash3 .card { margin: 0; }
.big-num { display: block; font-size: 30px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.donut-wrap { display: flex; align-items: center; gap: 18px; }
.donut { width: 140px; flex: none; }
.donut .dn-n { font-size: 18px; font-weight: 750; fill: var(--ink); } .donut .dn-l { font-size: 7.5px; fill: var(--muted); }
.act-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 13.5px; text-decoration: none !important; }
.act-row:last-child { border-bottom: 0; } .act-row:hover b { color: var(--accent); }
.act-row b { font-variant-numeric: tabular-nums; }
select.sm { padding: 4px 8px; font-size: 12.5px; width: auto; }
@media (max-width: 1100px) { .dash3 { grid-template-columns: 1fr; } }
/* cartão do vendedor */
.card.seller { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card.seller header { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.card.seller h3 { margin: 0; font-size: 15.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card.seller .status-dot { flex: none; white-space: nowrap; }
.seller-total { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.seller-total b { font-size: 24px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.seller-total span { color: var(--muted); font-size: 13px; }
.seller-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; margin: 0; }
.seller-stats div { min-width: 0; }
.seller-stats dt { color: var(--muted); font-size: 12px; }
.seller-stats dd { text-align: left; margin: 2px 0 0; font-weight: 650; font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.seller footer { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.card.seller footer b { color: var(--ink); }
.cards-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.person-card, .mini-stats div { min-width: 0; }
.card.seller .up { color: var(--ok); }
/* envio de arte por modelo */
.slots + .link { margin-bottom: 10px; display: inline-block; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin: 8px 0; max-height: 52vh; overflow: auto; }
.slot { border: 1.5px solid var(--line); border-radius: 10px; padding: 8px; cursor: pointer; outline: 0; display: flex; flex-direction: column; gap: 6px; }
.slot.on { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.slot.over { background: var(--chip); }
.slot-head { font-size: 12.5px; line-height: 1.3; }
.slot-zone { height: 130px; border: 1.5px dashed var(--line-2); border-radius: 8px; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--muted); font-size: 12px; padding: 6px; overflow: hidden; }
.slot-zone img { max-width: 100%; max-height: 100%; object-fit: contain; }
.model-arts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.model-arts figure { margin: 0; border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.model-arts img { width: 100%; height: 130px; object-fit: contain; display: block; }
.model-arts figcaption { font-size: 12px; margin-top: 6px; line-height: 1.35; }

/* ---------- Tema natalino (Configurações → liga/desliga). Só CSS: 1 camada animada por transform, sem JS. ---------- */
[data-xmas] body::before { /* varal de luzes no topo */
  content: ""; position: fixed; inset: 0 0 auto 0; height: 7px; z-index: 60; pointer-events: none;
  background: radial-gradient(circle at 10px 3px, #e23b3b 2.6px, transparent 3.2px) 0 0 / 60px 7px repeat-x,
              radial-gradient(circle at 30px 3px, #f4d860 2.6px, transparent 3.2px) 0 0 / 60px 7px repeat-x,
              radial-gradient(circle at 50px 3px, #2fae5b 2.6px, transparent 3.2px) 0 0 / 60px 7px repeat-x,
              linear-gradient(#1d5f2f, #1d5f2f) 0 2px / 100% 1px no-repeat;
  animation: xmas-blink 2.4s steps(2) infinite;
}
@keyframes xmas-blink { 50% { filter: brightness(1.45) saturate(1.2); } }
[data-xmas] .side::before { /* neve só no menu lateral: leve e não atrapalha a leitura */
  content: ""; position: absolute; top: -100%; left: 0; right: 0; height: 200%; pointer-events: none; z-index: 0; opacity: .5;
  background-image: radial-gradient(1.6px 1.6px at 20px 30px, #fff 50%, transparent 52%), radial-gradient(1.2px 1.2px at 80px 90px, #fff 50%, transparent 52%),
                    radial-gradient(2px 2px at 140px 50px, #fff 50%, transparent 52%), radial-gradient(1.4px 1.4px at 200px 140px, #fff 50%, transparent 52%),
                    radial-gradient(1.8px 1.8px at 50px 180px, #fff 50%, transparent 52%);
  background-size: 240px 200px; will-change: transform; animation: xmas-snow 18s linear infinite;
}
[data-xmas] .side > * { position: relative; z-index: 1; }
@keyframes xmas-snow { to { transform: translateY(50%); } }
.xmas-hi { font-size: 13px; font-weight: 600; color: #c0392b; background: #fdecec; border: 1px solid #f5c2c2; border-radius: 999px; padding: 4px 12px; white-space: nowrap; }
[data-theme="dark"] .xmas-hi { color: #ffb4b4; background: #3a1414; border-color: #5a2020; }
[data-xmas] .btn:not(.ghost):not(.wa) { box-shadow: inset 0 -2px 0 rgba(192, 57, 43, .35); }
[data-xmas] .kpi.hero { background-image: radial-gradient(circle at 92% 18%, rgba(226, 59, 59, .18), transparent 40%); }
@media (prefers-reduced-motion: reduce) { [data-xmas] body::before, [data-xmas] .side::before { animation: none; } }
@media (max-width: 800px) { .xmas-hi { display: none; } }
@media print { [data-xmas] body::before, [data-xmas] .side::before { display: none; } }

.sim-prod table td { padding: 6px 4px; vertical-align: middle; }
.sim-prod { max-height: 360px; overflow: auto; }

/* paginação */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 14px 0 4px; }
.pager-info { color: var(--muted); font-size: 13px; }
.pager-links { display: flex; gap: 4px; flex-wrap: wrap; }
.pager .pg { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--card); color: var(--ink-2); font-size: 13px; font-weight: 600; text-decoration: none; }
.pager a.pg:hover { border-color: var(--gold-2); color: var(--accent); }
.pager .pg.on { background: var(--gold-grad); border-color: transparent; color: #1d1405; }
.pager .pg.off { opacity: .45; }
.pager .pg.gap { border-color: transparent; background: none; min-width: 20px; padding: 0; }

/* painel gerencial */
.db-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.db-head h1 { margin: 2px 0 0; font-size: 26px; letter-spacing: -.02em; }
.db-date { margin: 0; color: var(--muted); font-size: 13px; }
.db-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.db-actions .search-box { min-width: 320px; }
.db-actions .btn .ic { width: 18px; height: 18px; }
.db-hero { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 18px; }
.db-hero > * { padding: 22px 24px; display: flex; flex-direction: column; gap: 4px; color: var(--ink); text-decoration: none !important; }
.db-hero small { color: var(--muted); font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.db-hero b { font-size: 28px; font-weight: 750; letter-spacing: -.025em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.db-stat + .db-stat, .db-main + .db-stat { border-left: 1px solid var(--line); }
.db-main { background: var(--side); color: #fff !important; position: relative; }
.db-main::after { content: ""; position: absolute; inset: auto 0 0 0; height: 3px; background: var(--gold-grad); }
.db-main small, .db-main .db-sub { color: #a8a8b0; }
.db-main > b { color: var(--gold-3); font-size: 34px; }
.db-main:hover > b { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.db-sub { color: var(--muted); font-size: 13px; }
.db-pill { display: inline-block; padding: 1px 7px; border-radius: 999px; font-weight: 700; font-size: 12px; margin-right: 4px; }
.db-pill.up { background: rgba(111, 217, 154, .16); color: #6fd99a; } .db-pill.down { background: rgba(255, 138, 128, .16); color: #ff8a80; }
.db-proj { margin-top: auto; padding-top: 10px; font-size: 13px; color: #c9c9ce; }
.db-proj b { font-size: 13px; color: #fff; letter-spacing: 0; }
.db-bar { height: 6px; border-radius: 99px; background: var(--chip); overflow: hidden; margin-top: auto; }
.db-bar i { display: block; height: 100%; background: var(--gold-2); border-radius: 99px; }
.db-bar.ok i { background: var(--ok); }
.db-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 18px; margin-bottom: 18px; align-items: start; }
.db-grid > .card { margin: 0; }
.db-chart .chart { margin: 0; }
.db-alert { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 12px; padding: 11px 10px; margin: 0 -10px; border-radius: 10px; color: var(--ink); text-decoration: none !important; }
.db-alert:hover { background: var(--row-hover); }
.db-alert i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.db-alert.err i { background: var(--err); box-shadow: 0 0 0 4px var(--err-bg); } .db-alert.err b { color: var(--err); }
.db-alert.warn i { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-bg); } .db-alert.warn b { color: var(--warn); }
.db-alert.calm { color: var(--muted); }
.db-alert span { font-size: 14px; font-weight: 500; }
.db-alert small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.db-alert b { font-size: 20px; font-weight: 750; font-variant-numeric: tabular-nums; }
.db-flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; }
.db-flow a { position: relative; padding: 12px 18px 12px 26px; background: var(--chip); color: var(--ink); text-decoration: none !important; display: flex; flex-direction: column; gap: 2px;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%, 14px 50%); margin-right: -8px; transition: background .15s; }
.db-flow a:first-child { clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%); border-radius: 10px 0 0 10px; padding-left: 18px; }
.db-flow a:last-child { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 14px 50%); border-radius: 0 10px 10px 0; margin-right: 0; }
.db-flow a:hover { background: var(--accent-soft); }
.db-flow small { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.db-flow b { font-size: 24px; font-weight: 750; font-variant-numeric: tabular-nums; }
.db-flow-card { margin-bottom: 18px; }
.db-side { display: flex; flex-direction: column; gap: 18px; }
.db-side .card { margin: 0; }
.db-split { display: flex; height: 12px; border-radius: 99px; overflow: hidden; gap: 2px; background: var(--chip); margin: 6px 0 14px; }
.db-split i.s1 { background: var(--s1); } .db-split i.s2 { background: var(--s2); }
.db-split-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.db-split-legend span { display: flex; flex-direction: column; font-size: 13px; color: var(--muted); }
.db-split-legend span i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-bottom: 4px; }
.db-split-legend i.s1 { background: var(--s1); } .db-split-legend i.s2 { background: var(--s2); }
.db-split-legend b { font-size: 22px; color: var(--ink); font-weight: 750; font-variant-numeric: tabular-nums; }
.db-base { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.db-base a { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 10px; background: var(--chip); color: var(--ink); text-decoration: none !important; }
.db-base a:hover { background: var(--accent-soft); }
.db-base b { font-size: 18px; font-weight: 750; font-variant-numeric: tabular-nums; }
.db-base small { color: var(--muted); font-size: 12px; }
.db-activity { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.db-activity a { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); text-decoration: none !important; }
.db-activity a:hover { border-color: var(--gold-2); }
.db-activity b { font-size: 22px; font-weight: 750; font-variant-numeric: tabular-nums; }
.db-activity small { color: var(--muted); font-size: 12.5px; line-height: 1.3; }
.empty-hint b { display: block; font-size: 16px; margin-bottom: 4px; }
@media (max-width: 1100px) {
  .db-hero, .db-grid { grid-template-columns: 1fr; }
  .db-stat + .db-stat, .db-main + .db-stat { border-left: 0; border-top: 1px solid var(--line); }
  .db-activity { grid-template-columns: repeat(3, 1fr); }
  .db-flow { grid-template-columns: 1fr 1fr; gap: 8px; }
  .db-flow a, .db-flow a:first-child, .db-flow a:last-child { clip-path: none; border-radius: 10px; margin: 0; padding-left: 16px; }
}
@media (max-width: 640px) { .db-actions .search-box { min-width: 0; width: 100%; } .db-activity { grid-template-columns: 1fr 1fr; } }
.db-grid.stretch { align-items: stretch; }
.db-chart { display: flex; flex-direction: column; } .db-chart .chart { margin-top: auto; }
.db-split-legend em { font-style: normal; display: flex; align-items: center; gap: 6px; }
.db-split-legend span i { margin: 0; }
.db-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.db-pair > .card { margin: 0; }
@media (max-width: 1100px) { .db-pair { grid-template-columns: 1fr; } }
.db-empty { margin: auto 0; padding: 48px 12px; text-align: center; color: var(--muted); font-weight: 600; }
.db-empty small { font-weight: 400; }

/* faturamento: produtos à esquerda (coluna inteira); por origem e por vendedor empilhados à direita */
.billing-3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); grid-template-areas: "prod origem" "prod vend"; grid-template-rows: auto 1fr; align-items: start; gap: 24px; margin: 24px 0; }
.billing-3 > .card { margin: 0; }
.billing-3 > .card.prod { grid-area: prod; }
.billing-3 > .card.origin { grid-area: origem; }
.billing-3 > .card.vend { grid-area: vend; }
.billing-3 table { font-size: 14px; }
.billing-3 th, .billing-3 td { padding: 12px 10px; }
.billing-3 > .card { padding: 22px 24px; }
.billing-3 > .card h2 { margin-bottom: 14px; }
.billing-3 th:first-child, .billing-3 td:first-child { padding-left: 0; }
.billing-3 th:last-child, .billing-3 td:last-child { padding-right: 0; }
.billing-3 > .card { min-width: 0; }
.billing-3 td.right, .billing-3 th.right { white-space: nowrap; }
.billing-3 .table-x { overflow-x: auto; }
@media (max-width: 1000px) { .billing-3 { grid-template-columns: 1fr; grid-template-areas: "origem" "vend" "prod"; } }
/* foto do contato */
.ib-item { display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 10px; align-items: start; }
.ib-item > .avatar { grid-row: 1 / span 3; margin-top: 2px; }
.ib-item > :not(.avatar) { grid-column: 2; }
img.avatar.photo { object-fit: cover; background: var(--chip); padding: 0; }
.ib-head > .avatar { margin-right: 10px; }
/* reações e edição */
.bub { position: relative; }
.react-badge { position: absolute; bottom: -12px; right: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 0 6px; font-size: 14px; line-height: 20px; box-shadow: var(--shadow); }
.bub:has(.react-badge) { margin-bottom: 16px; }
.react-pick { position: absolute; bottom: calc(100% + 2px); right: 0; z-index: 50; white-space: nowrap; display: flex; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 4px 6px; box-shadow: var(--shadow); }
.react-pick button { border: 0; background: none; font-size: 20px; cursor: pointer; padding: 2px 4px; border-radius: 8px; line-height: 1; color: var(--muted); }
.react-pick button:hover { background: var(--chip); }
.bub .ft i { font-style: italic; opacity: .8; }
.ib-item .meta .pill, .ib-item .meta span { white-space: nowrap; }

/* vendas ao vivo */
.db-live { margin-bottom: 18px; }
.db-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(30, 160, 90, .5); animation: dbpulse 2s infinite; }
@keyframes dbpulse { 70% { box-shadow: 0 0 0 8px rgba(30, 160, 90, 0); } 100% { box-shadow: 0 0 0 0 rgba(30, 160, 90, 0); } }
@media (prefers-reduced-motion: reduce) { .db-dot { animation: none; } }
.lv-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.lv-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; }
.lv-tabs { display: inline-flex; background: var(--chip); border-radius: 10px; padding: 3px; gap: 2px; }
.lv-tabs button { border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.lv-tabs button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.lv-upd { margin-left: auto; font-variant-numeric: tabular-nums; }
.lv-kpis { display: grid; grid-template-columns: 1.15fr 1fr 1.1fr; gap: 14px; margin-bottom: 18px; }
.lv-big { border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 3px; border: 1px solid var(--line); }
.lv-big small { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.lv-big b { font-size: 30px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.lv-big > span { font-size: 13px; color: var(--muted); }
.lv-big.ok { background: color-mix(in srgb, var(--ok) 9%, var(--card)); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.lv-big.ok b { color: var(--ok); }
.lv-big.wait { background: color-mix(in srgb, var(--warn) 9%, var(--card)); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.lv-big.wait b { color: var(--warn); }
.lv-var { font-weight: 700; } .lv-var.up { color: var(--ok); } .lv-var.down { color: var(--err); }
.lv-split { display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.lv-src { display: grid; grid-template-columns: 96px 1fr; grid-template-rows: auto auto; column-gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--chip); font-size: 13px; }
.lv-src .lv-name { grid-row: 1 / span 2; display: flex; align-items: center; gap: 7px; font-weight: 700; }
.lv-src .lv-name i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.lv-src i.s1, .lv-chart .legend i.s1 { background: var(--s1); } .lv-src i.s2, .lv-chart .legend i.s2 { background: var(--s2); }
.lv-src em { font-style: normal; font-variant-numeric: tabular-nums; }
.lv-src b { font-variant-numeric: tabular-nums; }
.lv-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 22px; }
.lv-chart-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.lv-chart .legend { display: flex; gap: 12px; font-size: 12.5px; color: var(--muted); }
.lv-chart .legend span { display: inline-flex; align-items: center; gap: 5px; }
.lv-chart .legend i { width: 10px; height: 3px; border-radius: 2px; display: inline-block; }
.lv-svg { position: relative; }
.lv-svg svg { width: 100%; height: auto; display: block; }
.lv-svg .grid { stroke: var(--line); stroke-width: 1; }
.lv-svg .ax { fill: var(--muted); font-size: 11px; }
.lv-line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.lv-line.s1 { stroke: var(--s1); } .lv-line.s2 { stroke: var(--s2); }
.lv-area { stroke: none; opacity: .1; } .lv-area.s1 { fill: var(--s1); } .lv-area.s2 { fill: var(--s2); }
.lv-guide { stroke: var(--line-2); stroke-dasharray: 3 3; }
.lv-pt { stroke: var(--card); stroke-width: 2; } .lv-pt.s1 { fill: var(--s1); } .lv-pt.s2 { fill: var(--s2); }
.lv-svg .chart-tip { position: absolute; pointer-events: none; background: var(--side); color: #fff; font-size: 12px; padding: 7px 10px; border-radius: 8px; line-height: 1.45; min-width: 130px; }
.lv-feed-wrap { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.db-feed { list-style: none; margin: 0; padding: 0 4px 0 0; max-height: 280px; overflow: auto; overscroll-behavior: contain; }
.db-feed li { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.db-feed li.new { animation: dbnew 2.5s ease-out; }
@keyframes dbnew { from { background: var(--accent-soft); } to { background: transparent; } }
.db-feed li.empty { display: block; color: var(--muted); border: 0; padding: 40px 0; text-align: center; }
.db-feed .t { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.db-feed .n { display: flex; flex-direction: column; min-width: 0; } .db-feed .n b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.db-feed .n small { color: var(--muted); font-size: 12px; }
.db-feed .v { font-weight: 700; font-variant-numeric: tabular-nums; }
.db-feed .st { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.db-feed .st.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); } .db-feed .st.wait { background: var(--warn-bg); color: var(--warn); }
.db-feed .tag.s1 { background: color-mix(in srgb, var(--s1) 16%, transparent); color: var(--s1); } .db-feed .tag.s2 { background: color-mix(in srgb, var(--s2) 16%, transparent); color: var(--s2); }
@media (max-width: 1100px) { .lv-kpis, .lv-body { grid-template-columns: 1fr; } .lv-upd { margin-left: 0; } }
/* gráfico de vendas (linha) */
.lv-svg .base { stroke: var(--line-2); stroke-width: 1; }
.lv-cur { fill: none; stroke: var(--s1); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.lv-prev { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 4 4; opacity: .55; }
.lv-g0 { stop-color: var(--s1); stop-opacity: .22; } .lv-g1 { stop-color: var(--s1); stop-opacity: 0; }
.lv-end { fill: var(--s1); stroke: var(--card); stroke-width: 2.5; }
.lv-endtxt { fill: var(--ink); font-size: 12px; font-weight: 700; paint-order: stroke; stroke: var(--card); stroke-width: 4px; }
.lv-guide { stroke: var(--line-2); stroke-width: 1; }
.lv-pt { fill: var(--s1); stroke: var(--card); stroke-width: 2.5; } .lv-pt.prev { fill: var(--muted); }
.lv-chart .legend i.cur { background: var(--s1); height: 3px; width: 14px; }
.lv-chart .legend i.prev { background: repeating-linear-gradient(90deg, var(--muted) 0 4px, transparent 4px 7px); height: 2px; width: 14px; opacity: .7; }
.lv-svg .chart-tip { top: 6px; transform: none; font-weight: 400; white-space: nowrap; min-width: 190px; padding: 9px 12px; background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0, 0, 0, .14); }
.lv-svg .chart-tip > b { display: block; margin-bottom: 4px; font-size: 12px; color: var(--muted); }
.lv-svg .chart-tip .r { display: flex; justify-content: space-between; gap: 14px; font-variant-numeric: tabular-nums; }
.lv-svg .chart-tip .r.sub { color: var(--muted); font-size: 12px; padding-left: 8px; }
.lv-svg .chart-tip .r.prev { margin-top: 4px; padding-top: 4px; border-top: 1px dashed var(--line); color: var(--muted); }
.btn.danger { background: var(--err); color: #fff !important; border-color: transparent; }
.del-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; position: sticky; top: 8px; z-index: 5; border: 1px solid var(--err); margin-bottom: 12px; }
.del-bar label { margin: 0; display: flex; align-items: center; gap: 8px; }
.del-bar input { margin: 0; }
.db-actions .search-box input { min-width: 0; flex: 1; text-overflow: ellipsis; }
.del-conv { margin-top: 18px; padding-top: 12px; border-top: 1px dashed var(--line); }
.del-conv summary { cursor: pointer; font-size: 13px; font-weight: 600; }
/* liberar computador (pensado para o celular do admin) */
.dev-pend { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin: 14px 0 20px; }
.dev-card { display: flex; flex-direction: column; gap: 10px; border: 2px solid var(--gold-2); margin: 0; }
.dev-card .code.big { font-size: 26px; letter-spacing: .12em; font-weight: 800; }
.dev-card input { width: 100%; margin: 0; }
.dev-card .btn { justify-content: center; min-height: 44px; }
@media (max-width: 640px) {
  .db-hero > * { padding: 16px; }
  .db-hero b { font-size: 24px; } .db-main > b { font-size: 28px; }
  .lv-head { gap: 10px; } .lv-tabs { width: 100%; } .lv-tabs button { flex: 1; padding: 6px 4px; }
  .lv-big b { font-size: 24px; }
  .db-feed li { grid-template-columns: auto minmax(0, 1fr) auto; }
  .db-feed li .tag, .db-feed li .t { display: none; }
  .db-flow { grid-template-columns: 1fr 1fr; }
  .db-head h1 { font-size: 22px; }
}
/* telas de entrada/formulário: conteúdo mais alto que a tela não corta o topo (logo) */
.guest { justify-content: flex-start; }
.guest { min-height: 100dvh; }
.guest-logo { margin-top: auto; }
.guest::after { content: ''; margin-top: auto; } /* espaço igual em cima e embaixo, mesmo com <script> no fim */
.guest-logo { flex: none; height: auto; }
/* barra inferior e instalar app */
.bottom-nav { display: none; }
.install-btn { display: inline-flex; align-items: center; gap: 6px; }
.install-btn[hidden] { display: none; }
.install-btn .ic { width: 16px; height: 16px; }
.install-ios { position: fixed; left: 12px; right: 12px; bottom: 76px; z-index: 60; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
@media (max-width: 900px) {
  .hide-m { display: none !important; }
  .install-btn span { display: none; }
  .bottom-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--card); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 16px rgba(0, 0, 0, .08); }
  .bottom-nav a, .bottom-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; position: relative; padding: 4px 0;
    font: inherit; font-size: 11px; font-weight: 600; color: var(--muted); background: none; border: 0; text-decoration: none !important; }
  .bottom-nav .ic { width: 22px; height: 22px; }
  .bottom-nav .on { color: var(--accent); }
  .bottom-nav .badge { position: absolute; top: 0; left: calc(50% + 6px); }
  .content { padding-bottom: 84px; }
}
@media print { .bottom-nav, .install-ios { display: none !important; } }
/* orçamento rápido (balcão) */
.qq-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.qq-head h1 { margin: 0; } .qq-head p { margin: 4px 0 0; }
.qq-head .btn { display: inline-flex; align-items: center; gap: 8px; }
.qq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 20px; align-items: start; }
.qq-in { margin: 0; }
.qq-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 18px 0 8px; }
.qq-label:first-child { margin-top: 0; }
.qq-size { display: flex; align-items: flex-start; gap: 10px; }
.qq-size label { flex: 1; margin: 0; }
.qq-size > span { font-size: 28px; color: var(--muted); padding-top: 8px; }
.qq-size input, .qq-qty { width: 100%; font-size: 30px; font-weight: 800; text-align: center; padding: 10px; border-radius: 12px; font-variant-numeric: tabular-nums; }
.qq-size small { display: block; text-align: center; color: var(--muted); font-size: 12px; margin-top: 4px; font-weight: 500; }
.qq-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.qq-chips button { border: 1px solid var(--line-2); background: var(--card); color: var(--ink); border-radius: 99px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.qq-chips button:hover { border-color: var(--gold-2); }
.qq-mats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.qq-mats label { margin: 0; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; }
.qq-mats input { display: none; }
.qq-mats b { font-size: 14px; } .qq-mats small { color: var(--muted); font-variant-numeric: tabular-nums; }
.qq-mats label:has(input:checked) { border-color: var(--gold-2); background: var(--accent-soft); }
.qq-seg { display: inline-flex; background: var(--chip); border-radius: 10px; padding: 3px; }
.qq-seg label { margin: 0; cursor: pointer; } .qq-seg input { display: none; }
.qq-seg span { display: block; padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--muted); }
.qq-seg input:checked + span { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.qq-cep { margin-top: 10px; max-width: 200px; font-size: 18px; }
.qq-in .fopts { margin-top: 10px; }
.qq-result { background: var(--side); color: #fff; border-radius: 18px; padding: 26px; position: relative; overflow: hidden; min-height: 300px; }
.qq-result::after { content: ""; position: absolute; inset: auto 0 0 0; height: 4px; background: var(--gold-grad); }
.qq-empty { color: #a8a8b0; font-size: 20px; font-weight: 600; text-align: center; padding: 90px 10px; }
.qq-empty small { font-size: 14px; font-weight: 400; }
.qq-top { display: flex; align-items: center; gap: 18px; font-size: 16px; color: #d8d8dd; margin-bottom: 18px; }
.qq-top b { color: #fff; font-size: 20px; }
.qq-shape { flex: none; display: flex; align-items: center; justify-content: center; border: 2px dashed var(--gold-3); border-radius: 10px; background: rgba(240, 200, 90, .08); }
.qq-shape i { font-style: normal; font-size: 11px; color: var(--gold-3); font-weight: 700; }
.qq-cap { color: #a8a8b0; font-size: 14px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.qq-price { display: block; font-size: 56px; line-height: 1.05; font-weight: 800; color: var(--gold-3); letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin: 2px 0 6px; }
.qq-card { font-size: 17px; color: #d8d8dd; } .qq-card b { color: #fff; }
.qq-rows { margin-top: 18px; border-top: 1px solid #2c2c31; }
.qq-rows div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #2c2c31; font-size: 15px; color: #c9c9ce; }
.qq-rows b { color: #fff; text-align: right; }
.qq-det { margin-top: 10px; } .qq-det summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.qq-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.qq-exit { display: none; }
html.present .side, html.present .topbar, html.present .bottom-nav, html.present .qq-in, html.present .qq-head, html.present .qq-det, html.present .qq-actions, html.present #txt { display: none !important; }
html.present .content { padding: 0; max-width: none; }
html.present .qq { grid-template-columns: 1fr; min-height: 100vh; align-content: center; padding: 4vh 6vw; background: var(--side); }
html.present .qq-result { min-height: 0; padding: 5vh 5vw; font-size: 1.3em; }
html.present .qq-price { font-size: clamp(64px, 12vw, 150px); }
html.present .qq-top { font-size: 24px; } html.present .qq-top b { font-size: 32px; }
html.present .qq-card { font-size: 26px; } html.present .qq-rows div { font-size: 22px; padding: 14px 0; }
html.present .qq-exit { display: block; position: fixed; top: 16px; right: 16px; z-index: 99; opacity: .5; }
html.present .qq-exit:hover { opacity: 1; }
.m2-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin: 10px 0 14px; }
.m2-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 0; }
.m2-row small { display: flex; align-items: center; gap: 5px; color: var(--muted); font-weight: 400; font-size: 12px; }
.m2-row small input { width: auto; margin: 0; }
.money-in { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.money-in input { width: 90px; margin: 0; text-align: right; }
@media (max-width: 1000px) { .qq { grid-template-columns: 1fr; } .qq-price { font-size: 44px; } }
.qq-logo { display: none; }
html.present .qq-logo { display: block; height: 70px; margin: 0 auto 4vh; }

/* app no celular: desbloqueio e configuração */
.unlock { text-align: center; }
.unlock h1 { margin: 8px 0 4px; }
.unlock .muted { margin: 0 0 18px; }
.unlock-ic { display: inline-grid; place-items: center; width: 76px; height: 76px; border-radius: 22px; background: var(--gold-bg, rgba(212, 175, 55, .12)); color: var(--gold, #d4af37); }
.app-setup { position: fixed; left: 12px; right: 12px; bottom: 76px; z-index: 59; padding: 6px 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); max-width: 480px; margin: 0 auto; }
.as-row { display: flex; align-items: center; gap: 8px; padding: 10px 0; }
.as-row + .as-row { border-top: 1px solid var(--line); }
.as-row > div { flex: 1; min-width: 0; }
.as-row small { display: block; color: var(--muted); }
@media (min-width: 901px) { .app-setup { bottom: 20px; right: 20px; left: auto; width: 420px; } }

/* pedido vindo da Irroba */
.irr-item { padding: 10px 0; border-top: 1px solid var(--line); }
.irr-item ul { margin: 6px 0 0; padding-left: 18px; }
.irr-item li { margin: 2px 0; }
.st-list { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.mobile-only-flex { display: none !important; }
@media (max-width: 900px) { .mobile-only-flex { display: flex !important; } }
.pwa-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pwa-row:first-of-type { border-top: 0; }
.pwa-row > div { flex: 1; min-width: 200px; }
.pwa-row small { display: block; color: var(--muted); }
.pwa-st { font-weight: 600; }
.pwa-st.ok { color: var(--ok, #16a34a); } .pwa-st.off { color: var(--muted); }

/* Usuários: formulário em passos e listagem */
.uform .step { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 16px; margin: 26px 0 12px; }
.uform .step:first-of-type { margin-top: 10px; }
.uform .step .n { width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.uform .step small { font-weight: 400; font-size: 13px; }
.role-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 10px; }
.rcard { flex-direction: row; margin: 0; cursor: pointer; min-width: 0; }
.rcard input { position: absolute; opacity: 0; pointer-events: none; }
.rcard .rc-body { display: flex; flex-direction: column; gap: 4px; width: 100%; border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 12px 14px; background: var(--card); }
.rcard .rc-body b { font-size: 14px; color: var(--ink); }
.rcard .rc-body small { color: var(--muted); font-size: 12.5px; line-height: 1.35; font-weight: 400; }
.rcard:hover .rc-body { border-color: var(--gold-2); }
.rcard input:checked + .rc-body { border-color: var(--gold-2); background: var(--accent-soft); box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold-3) 45%, transparent); }
.rcard input:focus-visible + .rc-body { box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold-3) 55%, transparent); }
.fgroup { min-width: 0; }
.frow { width: 100%; padding: 9px 0; border-top: 1px solid var(--line); align-items: flex-start; flex-wrap: nowrap; }
.fgroup legend + .frow { border-top: 0; }
.frow .track { margin-top: 2px; }
.frow .ftxt { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.frow .ftxt small { color: var(--muted); font-weight: 400; font-size: 12.5px; }
.frow input:disabled + .track { opacity: .55; }
.frow .ptag { font-style: normal; font-size: 11px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 2px 9px; white-space: nowrap; flex: none; }
.frow .ptag[hidden] { display: none; }
.access-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.access-chips .ac { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: var(--chip); color: var(--ink-2); }
.access-chips .ac.x { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
@media (max-width: 800px) {
  .utable, .utable tbody, .utable tr, .utable td { display: block; width: 100%; box-sizing: border-box; }
  .utable tr.head { display: none; }
  .utable tr { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 10px; }
  .utable td { border: 0; padding: 4px 0; overflow-wrap: anywhere; }
  .utable td[data-l]::before { content: attr(data-l); display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
  .utable td.actions { display: flex; gap: 14px; flex-wrap: wrap; padding-top: 8px; }
}

/* Equipe */
.eq-app { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); height: calc(100vh - 60px); height: calc(100dvh - 60px); overflow: hidden; background: var(--card); }
.eq-app * { box-sizing: border-box; }
.eq-list, .eq-chat { min-width: 0; min-height: 0; display: flex; flex-direction: column; position: relative; }
.eq-list { background: var(--card); }
.eq-chat { display: none; background: #efeae2; }
.eq-app.in-chat .eq-list { display: none; }
.eq-app.in-chat .eq-chat { display: flex; }
.eq-lhead { padding: 14px 16px; font-size: 18px; border-bottom: 1px solid var(--line); background: var(--card); }
.eq-items { flex: 1; overflow-y: auto; overflow-x: hidden; }
.eq-empty, .eq-hint { padding: 18px 16px; color: var(--muted); font-size: 13px; text-align: center; }
.eq-item, .eq-person { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.eq-item:hover, .eq-person.tap:hover { background: var(--row-hover); }
.eq-item.on { background: var(--chip); }
.eq-av { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 46px; height: 46px; border-radius: 50%; color: #fff; font-weight: 700; font-size: 16px; }
.eq-av.sm { width: 36px; height: 36px; font-size: 13px; }
.eq-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.eq-nm { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eq-pv { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eq-rt { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.eq-tm { color: var(--muted); font-size: 11.5px; }
.eq-tm.hot { color: #1fa855; font-weight: 700; }
.eq-un { font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #25d366; color: #fff; font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.eq-fab { position: absolute; right: 16px; bottom: 16px; width: 56px; height: 56px; border-radius: 50%; border: 0; background: #25d366; color: #fff; font-size: 30px; line-height: 1; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.28); z-index: 4; }
.eq-blank { flex: 1; display: flex; align-items: center; justify-content: center; color: #667781; padding: 20px; text-align: center; }
.eq-pane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.eq-pane[hidden], .eq-blank[hidden], .eq-sheet[hidden], .eq-menu[hidden], .eq-toast[hidden] { display: none; }
.eq-head { display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: #008069; color: #fff; flex: none; }
.eq-back { border: 0; background: transparent; color: #fff; font-size: 24px; width: 36px; height: 40px; cursor: pointer; flex: none; }
.eq-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: transparent; color: #fff; font: inherit; text-align: left; cursor: pointer; padding: 0; }
.eq-who .eq-av { width: 40px; height: 40px; }
.eq-wt { min-width: 0; display: flex; flex-direction: column; }
.eq-wt b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eq-wt small { font-size: 12px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eq-msgs { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 10px 10px 6px; background-color: #efeae2; background-image: radial-gradient(rgba(0,0,0,.045) 1px, transparent 1.4px); background-size: 18px 18px; }
.eq-day { text-align: center; margin: 10px 0; }
.eq-day span { display: inline-block; background: #fff; color: #54656f; font-size: 12px; padding: 4px 12px; border-radius: 8px; box-shadow: 0 1px 1px rgba(0,0,0,.08); }
.eq-row { display: flex; margin: 2px 0; }
.eq-row.out { justify-content: flex-end; }
.eq-bub { position: relative; max-width: min(82%, 520px); min-width: 0; padding: 6px 9px 4px; border-radius: 9px; background: #fff; color: #111b21; box-shadow: 0 1px 1px rgba(0,0,0,.12); overflow-wrap: anywhere; }
.eq-row.out .eq-bub { background: #d9fdd3; border-top-right-radius: 2px; }
.eq-row.in .eq-bub { border-top-left-radius: 2px; }
.eq-au { font-size: 12.5px; font-weight: 700; margin-bottom: 1px; }
.eq-tx { white-space: pre-wrap; font-size: 14.5px; line-height: 1.35; }
.eq-file { display: inline-block; font-size: 13.5px; color: #027eb5; margin-bottom: 2px; }
.eq-ft { text-align: right; font-size: 11px; color: #667781; margin-top: 1px; }
.eq-more { display: none; border: 0; background: transparent; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 4px 8px; flex: none; }
.eq-more.on { display: inline-block; }
.eq-row.in .eq-bub .eq-more { position: absolute; top: 0; right: 0; background: rgba(255,255,255,.9); border-radius: 0 9px 0 9px; padding: 0 6px; opacity: 0; }
.eq-row.in .eq-bub:hover .eq-more { opacity: 1; display: inline-block; }
.eq-compose { display: flex; align-items: flex-end; gap: 8px; padding: 8px 10px; background: #f0f2f5; flex: none; }
.eq-compose textarea { flex: 1; min-width: 0; width: auto; resize: none; border: 0; border-radius: 22px; padding: 10px 14px; font: inherit; font-size: 15px; line-height: 1.3; max-height: 120px; background: #fff; color: #111b21; outline: none; }
.eq-clip { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 42px; margin: 0; color: #54656f; cursor: pointer; flex: none; }
.eq-send { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #008069; color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.eq-send:disabled { opacity: .6; }
.eq-sheet { position: absolute; inset: 0; z-index: 20; background: rgba(0,0,0,.4); display: flex; align-items: flex-end; justify-content: center; }
.eq-sheet-box { width: 100%; max-width: 520px; max-height: 85%; display: flex; flex-direction: column; background: var(--card); border-radius: 16px 16px 0 0; overflow: hidden; }
.eq-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.eq-sheet-head b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eq-x { border: 0; background: transparent; color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer; width: 36px; height: 36px; }
.eq-sheet-body { overflow-y: auto; overflow-x: hidden; }
.eq-menu { position: fixed; z-index: 60; width: min(260px, calc(100vw - 16px)); background: var(--card); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 8px 28px rgba(0,0,0,.28); overflow: hidden; }
.eq-menu button { display: block; width: 100%; padding: 13px 16px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eq-menu button:last-child { border-bottom: 0; }
.eq-menu button:hover { background: var(--row-hover); }
.eq-toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); max-width: calc(100vw - 32px); background: #111b21; color: #fff; padding: 10px 16px; border-radius: 20px; font-size: 13px; z-index: 70; }
.eq-back { display: inline-block; }
@media (hover: none) { .eq-bub[data-uid], .eq-person { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; } }
@media (min-width: 900px) {
  .eq-app { grid-template-columns: 340px minmax(0, 1fr); }
  .eq-app.in-chat .eq-list { display: flex; }
  .eq-chat { display: flex; border-left: 1px solid var(--line); }
  .eq-back { display: none; }
  .eq-sheet { align-items: center; }
  .eq-sheet-box { border-radius: 16px; max-width: 440px; }
}
[data-theme="dark"] .eq-lhead, [data-theme="dark"] .eq-item.on { color: var(--ink); }

/* Metas dos vendedores */
.kpi em.sf { font-size: 11.5px; opacity: .85; }
.goal-pct { display: inline-flex; flex-direction: column; align-items: flex-end; font-size: 28px; font-weight: 800; line-height: 1; letter-spacing: -.03em; flex: none; }
.goal-pct small { font-size: 11px; font-weight: 600; letter-spacing: 0; color: var(--muted); margin-top: 3px; }
.goal-pct.ok { color: var(--ok); } .goal-pct.warn { color: var(--warn); } .goal-pct.err { color: var(--err); }
.goal-lines { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; margin: 0; }
.goal-lines div { min-width: 0; }
.goal-lines dt { color: var(--muted); font-size: 12px; }
.goal-lines dd { margin: 1px 0 0; font-weight: 650; font-size: 14.5px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.goal-lines .up { color: var(--ok); }
.goal-bar { position: relative; height: 22px; background: var(--chip); border-radius: 999px; overflow: hidden; }
.goal-bar i { display: block; height: 100%; border-radius: 999px; background: var(--ok); }
.goal-bar.warn i { background: var(--warn); } .goal-bar.err i { background: var(--err); }
.goal-bar u { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--ink); text-decoration: none; }
.goal-done { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12.5px; font-weight: 700; }
.goal-days { width: 100%; height: auto; display: block; max-width: 100%; }

/* Tabelas responsivas */
html { overflow-x: hidden; }
body { overflow-x: hidden; }
/* clip não cria contêiner de rolagem: mantém a barra lateral e o topo fixos ao rolar */
@supports (overflow-x: clip) { body { overflow-x: clip; } }
img, video, canvas, svg, pre { max-width: 100%; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 699px) {
  table:not(.no-cards), table:not(.no-cards) thead, table:not(.no-cards) tbody, table:not(.no-cards) tfoot, table:not(.no-cards) tr, table:not(.no-cards) td, table:not(.no-cards) th { display: block; width: 100%; max-width: 100%; box-sizing: border-box; }
  table:not(.no-cards) thead, table:not(.no-cards) tr:not(:has(td)) { display: none; }
  table:not(.no-cards) tr { border: 1px solid var(--line); border-radius: 12px; margin: 0 0 10px; padding: 6px 12px; background: var(--card); }
  table:not(.no-cards) td { display: block; position: relative; text-align: right !important; padding: 7px 0 7px 42%; min-height: 32px; border: 0; border-bottom: 1px dashed var(--line); white-space: normal !important; overflow-wrap: break-word; word-break: normal; min-width: 0; }
  table:not(.no-cards) td:not([data-label]), table:not(.no-cards) td[data-label=""] { padding-left: 0; }
  table:not(.no-cards) td:last-child { border-bottom: 0; }
  table:not(.no-cards) td::before { content: attr(data-label); position: absolute; left: 0; top: 8px; width: 40%; text-align: left; color: var(--muted); font-size: 12px; font-weight: 600; white-space: normal; }
  table:not(.no-cards) td:not([data-label])::before, table:not(.no-cards) td[data-label=""]::before { content: none; }
  table:not(.no-cards) td[colspan] { display: block; text-align: left !important; }
  .rank-table td.c, .rank-table td.r { text-align: right !important; }
}
@media (max-width: 699px) {
  table:not(.no-cards) td, table:not(.no-cards) th { width: 100% !important; max-width: 100% !important; }
  .sim { grid-template-columns: minmax(0, 1fr); }
  .phone { height: auto; min-height: 480px; }
  .hbar { grid-template-columns: minmax(0, 110px) minmax(0, 1fr) auto; }
}

/* Barra do topo no celular: tudo cabe, o título encurta com reticências */
@media (max-width: 600px) {
  .topbar { gap: 6px; }
  .topbar > * { flex-shrink: 0; }
  .topbar .crumb { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar .late-pill { white-space: nowrap; padding: 4px 8px; font-size: 12px; }
  .topbar .late-pill .lp-txt { display: none; }
  .topbar .who { display: none; }
}

/* v0.4.28 — Atendimento verde WhatsApp, ícones fixos no menu recolhido */
/* v0.4.66 — Atendimento discreto: igual aos outros itens do menu; só o ícone e o contador lembram o WhatsApp */
.side nav a.nav-wa .badge { background: #1f9d55; color: #fff; }
.wa-ic { flex: none; width: 20px; height: 20px; min-width: 20px; padding: 0; box-sizing: border-box; border-radius: 50%; background: transparent; object-fit: contain; opacity: .85; filter: saturate(.75); }
.side nav a.nav-wa:hover .wa-ic, .side nav a.nav-wa.on .wa-ic { opacity: 1; filter: none; }
[data-nav="min"] .side nav a { min-height: 42px; }
[data-nav="min"] .side nav a .ic, [data-nav="min"] .side nav a .wa-ic { margin: 0; }
@media (max-width: 900px) { [data-nav="min"] .side nav a { justify-content: flex-start; padding: 8px 12px; } }

/* Equipe no celular: a conversa ocupa exatamente a tela visível */
.eq-tx, .eq-au, .eq-file { overflow-wrap: anywhere; min-width: 0; }
.eq-msgs { overscroll-behavior: contain; }
html.eq-lock, html.eq-lock body { overflow: hidden; overscroll-behavior: none; }
@media (max-width: 899px) {
  .eq-app { height: calc(100vh - 60px - 62px - env(safe-area-inset-bottom)); height: calc(100dvh - 60px - 62px - env(safe-area-inset-bottom)); }
  .eq-app.in-chat { position: fixed; left: 0; right: 0; top: var(--vvt, 0px); height: 100vh; height: var(--vvh, 100dvh); z-index: 80; }
  .eq-compose { padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
  .eq-compose textarea { font-size: 16px; }
  .eq-head { padding-top: calc(8px + env(safe-area-inset-top)); }
  .eq-fab { bottom: 16px; }
}

/* Animação de entrada pós-login */
.intro { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; animation: introFail .3s ease 2.4s forwards; }
.intro-bg { position: absolute; inset: 0; background: radial-gradient(1200px 600px at 50% -10%, #2a2416 0%, transparent 60%), var(--side); }
.intro-logo { position: relative; width: 280px; max-width: 80vw; height: auto; will-change: transform; }
@keyframes introFail { to { opacity: 0; visibility: hidden; pointer-events: none; } }
.intro-run .side .logo img { opacity: 0; }
@keyframes introIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes introShine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
html.intro-go .intro-item { animation: introIn .45s cubic-bezier(.2,.7,.2,1) backwards; }
html.intro-go .kpi:not(.hero) { position: relative; overflow: hidden; }
html.intro-go .kpi:not(.hero)::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.28) 50%, transparent 70%); animation: introShine .8s ease .55s 1 both; }
@keyframes vpPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .55; transform: scale(.97); } }
.guest-logo.pulse { animation: vpPulse 1s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .intro { display: none; } .intro-item, .kpi::after, .guest-logo.pulse { animation: none !important; } .main, .side { transition: none; } }

/* v0.4.30 — Barra lateral: ritmo único (expandida 232 px / recolhida 76 px), tooltips, sem barra de rolagem solta */
.logo { justify-content: flex-start; height: auto; padding: 20px 24px 16px; }
.logo-full { width: auto; max-width: 100%; height: 36px; object-fit: contain; object-position: left center; }
.logo-icon { width: 32px; height: 32px; object-fit: contain; }
.side nav { padding: 2px 12px 12px; gap: 2px; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: transparent transparent; }
.side nav:hover { scrollbar-color: rgba(255,255,255,.18) transparent; }
.side nav::-webkit-scrollbar { width: 6px; }
.side nav::-webkit-scrollbar-thumb { background: transparent; border-radius: 6px; }
.side nav:hover::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); }
.side nav a { min-height: 40px; padding: 0 12px; gap: 12px; border-radius: 10px; font-size: 14px; font-weight: 500; transition: background .18s ease, color .18s ease; }
.side nav a:hover { background: rgba(255,255,255,.06); }
.side nav a.on { background: rgba(244,216,96,.10); }
.side nav a.on::before { left: -12px; top: 9px; bottom: 9px; width: 3px; }
.side nav a .ic { width: 20px; height: 20px; }
.side nav a:focus-visible, .collapse:focus-visible { outline: 2px solid var(--gold-3); outline-offset: -2px; }
.side nav a span { overflow: hidden; text-overflow: ellipsis; }
.wa-ic { width: 22px; height: 22px; min-width: 22px; }
.sep, .sep-toggle { font-size: 11px; color: var(--muted); }
.sep-toggle { margin: 18px 0 4px; padding: 6px 12px; }
.sep-toggle:hover { color: var(--side-ink-on); background: rgba(255,255,255,.05); }
.nav-items { gap: 2px; }
.side .badge { margin-left: auto; min-width: 20px; height: 20px; line-height: 20px; padding: 0 6px; font-size: 11px; text-align: center; border-radius: 999px; }
.version { margin: 0 12px; padding: 4px 12px; font-size: 10.5px; opacity: .8; }
.collapse { height: 36px; margin: 2px 12px 14px; padding: 0 12px; border-radius: 10px; font-size: 12.5px; transition: background .18s ease, color .18s ease; }
.collapse:hover { background: rgba(255,255,255,.06); }
.collapse .ic { width: 20px; height: 20px; }
#nav-tip { position: fixed; z-index: 1000; transform: translateY(-50%); background: #1c1c20; color: #fafafa; font-size: 12.5px; font-weight: 500; line-height: 1.2; padding: 7px 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,.12); box-shadow: 0 6px 20px rgba(0,0,0,.35); white-space: nowrap; pointer-events: none; }
@media (max-width: 900px) { #nav-tip { display: none !important; } }

@media (min-width: 901px) {
  [data-nav="min"] .side nav { padding: 2px 14px 12px; gap: 4px; align-items: center; scrollbar-width: none; scrollbar-color: auto; }
  [data-nav="min"] .side nav::-webkit-scrollbar { width: 0; height: 0; }
  [data-nav="min"] .logo { justify-content: center; padding: 20px 0 14px; }
  [data-nav="min"] .logo-icon { width: 32px; height: 32px; }
  [data-nav="min"] .nav-group, [data-nav="min"] .nav-items { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; }
  [data-nav="min"] .side nav a { width: 48px; min-height: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 12px; gap: 0; flex: none; }
  [data-nav="min"] .side nav a span, [data-nav="min"] .sep-toggle > *, [data-nav="min"] .sep-toggle::after, [data-nav="min"] .collapse span { display: none !important; }
  [data-nav="min"] .side nav a .ic { width: 22px; height: 22px; }
  [data-nav="min"] .side nav a .wa-ic { width: 22px; height: 22px; min-width: 22px; }
  [data-nav="min"] .side nav a.on { background: var(--gold-3); color: #1d1405; }
  [data-nav="min"] .side nav a.on .ic { color: #1d1405; }
  [data-nav="min"] .side nav a.on::before { display: none; }
  [data-nav="min"] .side nav a.team-link { margin-top: 0; }
  [data-nav="min"] .sep-toggle { display: block; width: 24px; height: 1px; padding: 0; margin: 10px auto; background: var(--line-2, var(--line)); border-radius: 0; overflow: hidden; pointer-events: none; }
  [data-nav="min"] .side nav > .nav-group:first-of-type .sep-toggle { margin-top: 8px; }
  [data-nav="min"] .side .badge { position: absolute; top: 3px; right: 3px; margin: 0; min-width: 16px; height: 16px; line-height: 16px; padding: 0 4px; font-size: 10px; box-shadow: 0 0 0 2px var(--side); }
  [data-nav="min"] .side .badge:empty { min-width: 8px; width: 8px; height: 8px; padding: 0; top: 6px; right: 8px; }
  [data-nav="min"] .collapse { width: 48px; height: 44px; margin: 6px auto 14px; padding: 0; justify-content: center; border-radius: 12px; gap: 0; }
  [data-nav="min"] .collapse .ic { width: 22px; height: 22px; }
}
@media (prefers-reduced-motion: reduce) { .side, .main, .side nav a, .collapse { transition: none !important; } }

/* v0.4.33: bipes em sequência — últimas leituras em fichas claras */
.scanlog{list-style:none;margin:12px 0 0;padding:0;display:flex;flex-direction:column;gap:6px;max-height:260px;overflow:hidden}
.scanlog:empty{display:none}
.scanlog li{display:flex;align-items:center;gap:10px;padding:8px 12px;border-radius:var(--radius-sm,8px);font-size:14px;line-height:1.35;
  background:var(--chip);border:1px solid var(--line);border-left-width:4px;animation:scanIn .25s ease-out}
.scanlog li:first-child{font-size:15px;font-weight:600}
.scanlog li:nth-child(n+4){opacity:.6}
.scanlog li.ok{background:var(--ok-bg);border-color:var(--ok);color:var(--ink)}
.scanlog li.err{background:var(--err-bg);border-color:var(--err);color:var(--err);font-weight:600}
.scanlog li.dup{background:var(--warn-bg);border-color:var(--warn);color:var(--ink)}
.scanlog li.wait{border-left-color:var(--muted);color:var(--muted)}
@keyframes scanIn{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
tr.bipado td{background:var(--ok-bg)!important;transition:background .3s}
tr.bipado td:first-child b::after{content:" ✓";color:var(--ok);font-weight:800}

/* Atendimento: etiqueta (robô / atendente / setor) ao lado do nome */
.ib-item .top { align-items: center; }
.ib-item .top .nm { flex: 0 1 auto; min-width: 0; }
.ib-item .top .pill { flex: none; font-size: 12px; margin-right: auto; }
.ib-item .top small { flex: none; }
.pill.tag-user { background: var(--ok-bg); color: var(--ok); }

.art-approve { background: var(--ok, #1a7f4b); color: #fff; font-weight: 700; margin-bottom: 8px; }
.art-wait { display: block; margin-bottom: 8px; background: var(--gold-bg, #fff4d6); color: var(--gold, #8a6100); }
.art-done { margin: 0 0 8px; padding: 8px 10px; border-radius: 8px; background: var(--ok-bg); color: var(--ok); font-weight: 600; }

/* v0.4.36: botão Excluir número separado do Salvar, com área de perigo própria */
.chf-del { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.chf-del::before { content: "Excluir este número do sistema (as conversas antigas continuam no Atendimento)."; color: var(--muted); font-size: 13px; flex: 1 1 260px; }
.chf-del .btn.ghost.danger { background: transparent; color: var(--err) !important; border: 1px solid var(--err); }
.chf-del .btn.ghost.danger:hover { background: var(--err-bg); }

/* orçamento rápido: seletor de formato */
.qq-fmt span { display: inline-flex; align-items: center; gap: 6px; }
.qq-size input[readonly] { opacity: .7; background: var(--chip); }

/* ===== Acessos do usuário: cartões por área, interruptores com 3 estados ===== */
.acc-summary { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; align-items: center; border: 1px solid var(--line-2); background: var(--accent-soft); border-radius: var(--radius-sm); padding: 12px 14px; margin: 0 0 14px; font-size: 13.5px; }
.acc-summary .acc-sum-txt { flex: 1 1 320px; min-width: 0; line-height: 1.45; }
.acc-summary .acc-sum-count { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.acc-summary [hidden] { display: none; }
.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px; align-items: start; }
.acc-grid[hidden] { display: none; }
.acard { border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--card); padding: 6px 14px 8px; margin: 0; }
.acard legend { font-size: 13px; font-weight: 700; color: var(--ink); padding: 0 6px; }
.frow.st-extra .ptag { background: #e3f5ea; color: #137a3d; }
.frow.st-removido .ptag { background: #fdecea; color: #b3261e; }
.frow.st-removido .ftxt b { text-decoration: line-through; text-decoration-color: color-mix(in srgb, #b3261e 55%, transparent); }
.frow.st-extra { box-shadow: inset 3px 0 0 #1f9d55; padding-left: 8px; }
.frow.locked { opacity: .65; cursor: not-allowed; }
.frow.locked .ptag { display: inline-flex; align-items: center; gap: 4px; background: var(--chip); color: var(--muted); }
#homeBox[hidden] { display: none; }
.access-chips .ac.r { background: #fdecea; color: #b3261e; font-weight: 600; }
.acc-line { display: block; margin-top: 3px; font-size: 11.5px; line-height: 1.35; }

/* arte: busca, botão fixo e prévia da mensagem */
.art-bar { display: grid; gap: 10px; padding: 14px 16px; }
.art-search { flex-direction: row; align-items: center; gap: 8px; margin: 0; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; background: var(--card); color: var(--muted); }
.art-search svg { width: 18px; height: 18px; flex: none; }
.art-search input { border: 0; background: none; flex: 1; min-width: 0; padding: 12px 0; font-size: 15px; box-shadow: none; }
.art-search input:focus { outline: none; box-shadow: none; }
.art-search:focus-within { border-color: var(--gold, #c9a227); box-shadow: 0 0 0 3px rgba(201, 162, 39, .18); }
.art-line { display: flex; flex-wrap: wrap; gap: 6px 10px; }
.wa-prev { margin: 14px 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.wa-route { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 8px 12px; background: var(--chip); }
.wa-chat { background: #e9dfd5; padding: 14px; }
html[data-theme=dark] .wa-chat { background: #0b141a; }
.wa-bubble { background: #fff; color: #111b21; border-radius: 10px 10px 10px 2px; max-width: 340px; padding: 6px; box-shadow: 0 1px 1px rgba(0, 0, 0, .12); }
html[data-theme=dark] .wa-bubble { background: #202c33; color: #e9edef; }
.wa-imgs { display: grid; gap: 4px; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.wa-imgs figure { margin: 0; }
.wa-imgs img { width: 100%; max-height: 220px; object-fit: contain; background: #f0f2f5; border-radius: 6px; }
.wa-imgs figcaption { font-size: 11px; opacity: .7; }
.wa-text { padding: 6px 4px 4px; font-size: 14px; line-height: 1.4; }
.wa-btns { display: grid; gap: 2px; }
.wa-btns span { text-align: center; color: #027eb5; border-top: 1px solid rgba(0, 0, 0, .08); padding: 8px; font-size: 14px; }
dialog.quote-dlg#adlg { width: min(720px, 96vw); }
.art-side { margin: 12px 0; display: grid; gap: 8px; }
.art-side h3 { margin: 0; }
.art-quick { display: flex; flex-wrap: wrap; gap: 6px; }
html[data-embed] #send-dlg { width: 100%; max-width: none; max-height: none; height: 100%; border-radius: 0; box-shadow: none; }
.wa-bubble.wa-terms { margin-bottom: 8px; padding: 8px 10px; font-size: 12.5px; line-height: 1.4; max-height: 180px; overflow: auto; }
.pill.prio { background: var(--err-bg, #fde8e8); color: var(--err, #c0392b); font-weight: 700; }
.bulk-list { display: grid; gap: 4px; max-height: 32vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin: 8px 0 12px; }
.bulk-list label { margin: 0; }
.bulk-tools { font-size: 12.5px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.head-actions form { margin: 0; }
.seller-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; margin: 0 0 14px; background: var(--card, #fff); }
.seller-bar form { margin: 0; display: flex; gap: 6px; align-items: center; }
.ap-items { display: grid; gap: 8px; margin: 10px 0 12px; max-height: 50vh; overflow: auto; }
#apdlg label.ap-item { display: flex; flex-direction: row; text-align: left; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 8px; margin: 0; }
.ap-thumb { width: 64px; height: 64px; flex: none; border-radius: 8px; background: var(--soft, #f4f4f5); display: flex; align-items: center; justify-content: center; overflow: hidden; font-size: 11px; color: #888; }
.ap-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ap-txt { display: grid; gap: 2px; min-width: 0; }
.ap-txt small { color: var(--muted, #777); }
.ap-txt input { font-size: 12px; }
.ap-inline form { display: grid; gap: 6px; margin-top: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; max-width: 320px; }
.ap-inline label { margin: 0; }
#apdlg label.ap-item.sel { border-color: var(--gold, #b8862b); box-shadow: 0 0 0 2px rgba(184, 134, 43, .25); }
#apdlg label.ap-item.sel .ap-txt b::after { content: "  · Ctrl+V aqui"; font-weight: 600; font-size: 11px; color: var(--gold, #b8862b); }
.ap-inline label.sel { outline: 2px solid var(--gold, #b8862b); outline-offset: 2px; border-radius: 6px; }

/* Pedidos recentes (Atendimento): cartões com "Chamar cliente" */
.ord-card { border-bottom: 1px solid var(--line); padding: 11px 14px; }
.ord-card .top { display: flex; justify-content: space-between; gap: 8px; }
.ord-card .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ord-card .pv { color: var(--muted); font-size: 12px; margin-top: 2px; }
.ord-card .meta { display: flex; gap: 8px; margin: 4px 0 8px; font-size: 11px; color: var(--muted); }
.bub.in .react-pick { right: auto; left: 0; }
.ib-tabs button .cnt { font-weight: 700; }
.side-mode { display: flex; align-items: center; gap: 4px; margin: 8px 0; }
.side-mode button { border: 1px solid var(--line); background: var(--chip); color: var(--ink); border-radius: 999px; padding: 2px 10px; font-size: 12px; cursor: pointer; }
.side-mode button.on { background: var(--ink); color: var(--card); border-color: var(--ink); }
.side-card { background: var(--chip); border-radius: 12px; padding: 10px 12px; display: grid; gap: 4px; }
.side-card .top, .prev-ord .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.si-list { display: grid; gap: 6px; margin-top: 4px; }
.si-item { display: flex; flex-direction: column; background: var(--card); border-radius: 8px; padding: 6px 8px; font-size: 13px; }
.si-note { background: #fff7d6; color: #5c4a00; border-radius: 8px; padding: 6px 8px; font-size: 12px; }
.si-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.prev-ord { border-bottom: 1px solid var(--line); padding: 7px 0; display: grid; gap: 3px; font-size: 13px; }
.prev-ord .btn { justify-self: start; }
dialog.os-dlg { width: min(900px, 96vw); height: 92vh; max-height: 92vh; padding: 0; overflow: hidden; }
dialog.os-dlg[open] { display: flex; flex-direction: column; }
dialog.os-dlg .os-bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); }
dialog.os-dlg iframe { flex: 1; width: 100%; border: 0; background: #fff; }

/* Configurações: abas, busca e rodapé fixo */
.settings-tools { display: flex; gap: 10px; margin-bottom: 14px; }
.settings-tools input[type=search] { flex: 1; max-width: 420px; margin: 0; }
.settings-tools select { display: none; margin: 0; }
.settings-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; align-items: start; }
.settings-nav { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 2px; }
.settings-nav a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--ink-2); font-weight: 500; font-size: 13.5px; text-decoration: none; border-left: 3px solid transparent; }
.settings-nav a:hover { background: var(--accent-soft); }
.settings-nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 700; border-left-color: var(--gold-2); }
.settings-nav a.dim { opacity: .4; }
.settings-nav a.has-err::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--err); flex: none; }
.settings-nav .cnt { background: var(--gold-1); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 7px; font-weight: 700; }
.settings-main .spanel { display: none; }
.settings-main .spanel.on { display: block; }
.settings-shell.searching .spanel { display: block; }
.settings-shell.searching .spanel.nomatch { display: none; }
.settings-main [hidden] { display: none !important; }
.settings-main .panel-title { margin: 0 0 14px; font-size: 20px; }
.settings-shell:not(.searching) .panel-title { display: none; }
.settings-main .sset h3 { margin: 0 0 10px; font-size: 15px; }
.settings .sfield { display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; margin-bottom: 14px; min-width: 0; }
.settings .sfield > label { margin-bottom: 0; }
.settings .sfield.wide { grid-column: 1 / -1; }
.settings .sfield.is-toggle { justify-content: center; }
.settings .sfield .help { color: var(--muted); font-size: 11.5px; line-height: 1.35; margin-top: 3px; }
.settings .sfield.is-toggle .help { padding-left: 48px; margin-top: 0; }
.settings .sfield .field-err { color: var(--err); font-size: 12px; font-weight: 600; }
.settings .sfield .checks-field { margin: 0; }
.settings .sfield .tab-badge { display: none; align-self: flex-start; margin-top: 4px; background: var(--accent-soft); color: var(--accent); border-radius: 999px; font-size: 10.5px; font-weight: 700; padding: 1px 8px; }
.settings-shell.searching .sfield .tab-badge { display: inline-block; }
.settings-main .sticky-save { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.settings-main .sticky-save .dirty-msg { color: var(--warn); font-weight: 600; font-size: 13px; }
@media (max-width: 800px) {
  .settings-shell { grid-template-columns: 1fr; }
  .settings-nav { display: none; }
  .settings-tools { flex-direction: column; }
  .settings-tools input[type=search] { max-width: none; }
  .settings-tools select { display: block; }
}
.settings-main .grid3 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* Chat da equipe v2: mídia, tiques, reações, presença, chamar atenção */
.eq-compose[hidden], .eq-rec[hidden], .eq-ctx[hidden], .eq-stage[hidden], .eq-emo[hidden], .eq-drop[hidden], .eq-send[hidden], .eq-ib[hidden], .eq-call[hidden] { display: none; }
.eq-lhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.eq-newbtn { border: 0; border-radius: 999px; background: #25d366; color: #fff; font: inherit; font-size: 13px; font-weight: 700; padding: 8px 14px; cursor: pointer; white-space: nowrap; }
.eq-sbox { padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--card); }
.eq-sbox input { width: 100%; margin: 0; border-radius: 999px; padding: 9px 14px; }
.eq-tabs { display: flex; border-bottom: 1px solid var(--line); background: var(--card); }
.eq-tabs button { flex: 1; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); font: inherit; font-weight: 600; padding: 9px 0; cursor: pointer; }
.eq-tabs button.on { color: #008069; border-bottom-color: #25d366; }
.eq-grp { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 8px 14px 6px; background: var(--chip); color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.eq-grp small { font-weight: 600; text-transform: none; letter-spacing: 0; }
.eq-avw { position: relative; display: inline-flex; flex: none; }
.eq-dot { position: absolute; right: 0; bottom: 0; width: 13px; height: 13px; border-radius: 50%; background: #25d366; border: 2px solid var(--card); box-sizing: border-box; }
.eq-head .eq-dot { border-color: #008069; }
.eq-pv.on { color: #1fa855; font-weight: 600; }
.eq-wt small.on { color: #b9f6ca; font-weight: 600; }
.eq-item.un .eq-nm { font-weight: 800; }
.eq-person .eq-callm { flex: none; border: 1px solid var(--line); background: var(--card); border-radius: 50%; width: 34px; height: 34px; font-size: 16px; cursor: pointer; line-height: 1; }
.eq-person .eq-callm:hover { background: var(--chip); }
.eq-call { flex: none; display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; background: rgba(255,255,255,.18); color: #fff; font: inherit; font-size: 13px; font-weight: 600; padding: 8px 12px; cursor: pointer; }
.eq-call:hover { background: rgba(255,255,255,.3); }
.eq-call em { font-style: normal; }
@media (max-width: 599px) { .eq-call em { display: none; } .eq-call { padding: 8px 10px; font-size: 18px; } }
.eq-row { align-items: center; }
.eq-row.in { justify-content: flex-start; }
.eq-bub { max-width: min(78%, 520px); }
.eq-acts { flex: none; display: flex; gap: 2px; padding: 0 4px; opacity: 0; transition: opacity .12s; }
.eq-row:hover .eq-acts, .eq-row:focus-within .eq-acts { opacity: 1; }
.eq-acts button { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); color: var(--ink); font-size: 13px; line-height: 1; cursor: pointer; padding: 0; }
.eq-acts button:hover { background: var(--chip); }
@media (hover: none) { .eq-acts { display: none; } .eq-bub { max-width: 86%; } }
.eq-quote { border-left: 4px solid #25d366; background: rgba(0,0,0,.06); border-radius: 6px; padding: 4px 8px; margin: 0 0 4px; cursor: pointer; display: flex; flex-direction: column; font-size: 12.5px; min-width: 120px; }
.eq-quote b { font-size: 12.5px; }
.eq-quote span { color: #54656f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 360px; }
.eq-img { display: block; margin: 0 0 3px; }
.eq-img img { display: block; max-width: 100%; max-height: 300px; min-height: 60px; border-radius: 7px; background: rgba(0,0,0,.06); cursor: zoom-in; }
.eq-aud { display: flex; align-items: center; gap: 8px; min-width: 0; }
.eq-aud audio { width: 230px; max-width: 100%; height: 36px; }
.eq-aud small { color: #667781; font-size: 11.5px; }
.eq-del { color: #667781; font-style: italic; }
.eq-ft { display: flex; justify-content: flex-end; align-items: center; gap: 5px; }
.eq-ft i { font-style: italic; }
.eq-tk { font-size: 12.5px; font-weight: 700; letter-spacing: -2px; color: #8696a0; cursor: pointer; line-height: 1; }
.eq-tk.read { color: #34b7f1; }
.eq-rx { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.eq-rx button { border: 1px solid rgba(0,0,0,.1); background: rgba(255,255,255,.85); border-radius: 999px; font-size: 13px; padding: 1px 7px; cursor: pointer; line-height: 1.4; color: #111b21; }
.eq-rx button.mine { background: #e1f5e0; border-color: #25d366; }
.eq-sys { text-align: center; margin: 8px 0; }
.eq-sys span { display: inline-block; background: #fff3c4; color: #5c4a00; font-size: 12.5px; padding: 4px 12px; border-radius: 8px; box-shadow: 0 1px 1px rgba(0,0,0,.08); }
.eq-row.hl .eq-bub { animation: eqHl 1.4s ease; }
@keyframes eqHl { 0%, 60% { box-shadow: 0 0 0 3px rgba(37,211,102,.7); } 100% { box-shadow: 0 1px 1px rgba(0,0,0,.12); } }
.eq-ctx { display: flex; align-items: center; gap: 8px; padding: 6px 12px; background: #f0f2f5; border-top: 1px solid var(--line); flex: none; }
.eq-ctx-t { flex: 1; min-width: 0; border-left: 4px solid #25d366; padding: 2px 8px; display: flex; flex-direction: column; font-size: 13px; color: #111b21; }
.eq-ctx-t span { color: #54656f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eq-stage { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #f0f2f5; border-top: 1px solid var(--line); flex: none; color: #111b21; }
.eq-stage img { height: 64px; max-width: 120px; object-fit: cover; border-radius: 8px; }
.eq-stage-i { font-size: 28px; }
.eq-stage-n { flex: 1; min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
.eq-stage .eq-x, .eq-ctx .eq-x { color: #54656f; }
.eq-emo { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 2px; padding: 8px; background: #fff; border-top: 1px solid var(--line); max-height: 170px; overflow-y: auto; flex: none; }
.eq-emo button { border: 0; background: transparent; font-size: 22px; padding: 4px; border-radius: 8px; cursor: pointer; line-height: 1.2; }
.eq-emo button:hover { background: var(--chip); }
.eq-ib { flex: none; width: 40px; height: 42px; border: 0; background: transparent; font-size: 22px; cursor: pointer; color: #54656f; line-height: 1; }
.eq-ib.mic { width: 44px; height: 44px; border-radius: 50%; background: #008069; color: #fff; font-size: 19px; }
.eq-rec { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #f0f2f5; flex: none; color: #111b21; }
.eq-rec-dot { width: 12px; height: 12px; border-radius: 50%; background: #e11d48; animation: eqBlink 1s infinite; flex: none; }
.eq-rec-h { flex: 1; font-size: 12.5px; color: #54656f; }
.eq-rec-x { border: 0; background: transparent; font-size: 22px; cursor: pointer; width: 40px; height: 40px; }
@keyframes eqBlink { 50% { opacity: .2; } }
.eq-drop { position: absolute; inset: 0; z-index: 15; display: flex; align-items: center; justify-content: center; background: rgba(0,128,105,.82); color: #fff; font-size: 18px; font-weight: 700; text-align: center; padding: 20px; pointer-events: none; border: 3px dashed #fff; }
.eq-menu.rp { display: flex; width: auto; max-width: calc(100vw - 16px); padding: 4px 6px; border-radius: 999px; }
.eq-menu.rp button { display: inline-block; width: auto; border: 0; font-size: 22px; padding: 4px 6px; border-radius: 8px; }
.eq-info { display: flex; flex-direction: column; padding: 8px 16px; border-bottom: 1px solid var(--line); }
.eq-info small { color: var(--muted); }

/* Chamar atenção: a janela inteira treme; com "reduzir movimento" vira um clarão */
@keyframes vpShake { 0%, 100% { transform: translate(0, 0); } 10% { transform: translate(-14px, 4px) rotate(-.5deg); } 20% { transform: translate(12px, -5px) rotate(.5deg); } 30% { transform: translate(-12px, 3px) rotate(-.4deg); } 40% { transform: translate(10px, -3px) rotate(.4deg); } 50% { transform: translate(-8px, 2px); } 60% { transform: translate(7px, -2px); } 70% { transform: translate(-5px, 1px); } 80% { transform: translate(4px, 0); } 90% { transform: translate(-2px, 0); } }
html.vp-shake { animation: vpShake .6s cubic-bezier(.36, .07, .19, .97) both; }
.vp-flash { position: fixed; inset: 0; z-index: 9998; background: #fff; pointer-events: none; animation: vpFlash .9s ease-out forwards; }
@keyframes vpFlash { 0% { opacity: .85; } 100% { opacity: 0; } }
#vp-attn { position: fixed; top: 0; left: 0; right: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; padding: 12px 44px 12px 16px; background: #e11d48; color: #fff; font-weight: 700; box-shadow: 0 4px 16px rgba(0,0,0,.35); animation: toastIn .25s ease; }
#vp-attn a { background: #fff; color: #e11d48; border-radius: 999px; padding: 6px 14px; text-decoration: none; font-weight: 800; }
#vp-attn button { position: absolute; right: 8px; top: 8px; border: 0; background: transparent; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; width: 34px; height: 34px; }
@media (prefers-reduced-motion: reduce) { html.vp-shake { animation: none; } .eq-rec-dot { animation: none; } }

/* v0.4.67 — citação clicável: vai até a mensagem original e pulsa */
.bub .q[data-goto] { cursor: pointer; }
.bub .q[data-goto]:hover { background: rgba(127,127,127,.2); }
.bub .q.q-miss { animation: qmiss .3s 2; }
@keyframes qmiss { 50% { transform: translateX(3px); } }
.bub.pulse-hl { animation: pulsehl 1.1s ease-in-out 2; }
@keyframes pulsehl { 0%, 100% { box-shadow: 0 0 0 0 rgba(212,170,80,0); } 50% { box-shadow: 0 0 0 6px rgba(212,170,80,.55); filter: brightness(1.18); } }
@media (prefers-reduced-motion: reduce) { .bub.pulse-hl { animation: none; outline: 3px solid rgba(212,170,80,.8); } }

.bub .q.has-thumb { display: flex; align-items: center; gap: 6px; }
.bub .q .qthumb { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; flex: none; max-width: 36px; margin: 0; cursor: inherit; }
.hub-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: 10px; }
.hub-card { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--line, #e3e3e8); border-radius: 10px; text-decoration: none; color: inherit; }
.hub-card:hover { border-color: var(--brand, #6c5ce7); }

/* Ajustes v0.4.xx: lista do Atendimento sem rolagem lateral, Chat da equipe no tema do sistema e ícones de traço único */
.ib-list { min-width: 0; overflow: hidden; }
.ib-list .tools { min-width: 0; }
.ib-list .tools input { width: 100%; min-width: 0; box-sizing: border-box; }
.ib-items { overflow-x: hidden; min-width: 0; }
.ib-item { box-sizing: border-box; max-width: 100%; overflow: hidden; grid-template-columns: 34px minmax(0, 1fr); }
.ib-item > * { min-width: 0; }
.ib-item > .avatar { grid-column: 1; width: 34px; height: 34px; justify-self: start; overflow: hidden; }
.ib-item > :not(.avatar) { grid-column: 2; max-width: 100%; }
.ib-item .top { min-width: 0; flex-wrap: wrap; row-gap: 2px; overflow: hidden; }
.ib-item .top .nm { flex: 1 1 130px; max-width: 100%; }
.ib-item .top .pill { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: 0; }
.ib-item .top small { margin-left: auto; }
.ib-item .pv { min-width: 0; max-width: 100%; }
.ib-item .meta { flex-wrap: wrap; min-width: 0; row-gap: 3px; }
.ib-item .meta .pill, .ib-item .meta span { white-space: normal; overflow-wrap: anywhere; max-width: 100%; }
.ord-card { box-sizing: border-box; max-width: 100%; overflow: hidden; overflow-wrap: anywhere; }
.ord-card .top { min-width: 0; flex-wrap: wrap; }
.ord-card .top .nm { min-width: 0; flex: 1 1 80px; }
.ib-side { min-width: 0; overflow-x: hidden; overflow-wrap: anywhere; box-sizing: border-box; }
.ib-side > *, .ib-side .ord, .ib-side .ord > * { min-width: 0; max-width: 100%; }
.ib-side img, .ib-side iframe, .ib-side table, .ib-side input, .ib-side select, .ib-side textarea { max-width: 100%; box-sizing: border-box; }
.ib-chat { min-width: 0; }
.ib-compose .icon-btn .ic, .ib-compose .btn .ic { width: 20px; height: 20px; }

/* Chat da equipe: cores vêm do tema do sistema (data-theme claro/escuro) */
.eq-themed { --eq-bg: var(--bg); --eq-in: var(--card); --eq-out: var(--accent-soft); --eq-ink: var(--ink); --eq-sub: var(--muted); --eq-bar: var(--card); --eq-field: var(--input); --eq-pri: var(--accent); --eq-on-pri: #fff; --eq-link: var(--accent); --eq-dots: rgba(127, 127, 127, .14); --eq-ok: var(--ok); }
[data-theme="dark"] .eq-themed { --eq-on-pri: #1d1405; }
.eq-themed .eq-chat, .eq-themed .eq-msgs { background-color: var(--eq-bg); }
.eq-themed .eq-msgs { background-image: radial-gradient(var(--eq-dots) 1px, transparent 1.4px); }
.eq-themed .eq-blank { color: var(--eq-sub); }
.eq-themed .eq-head { background: var(--eq-bar); color: var(--eq-ink); border-bottom: 1px solid var(--line); }
.eq-themed .eq-back, .eq-themed .eq-who { color: var(--eq-ink); }
.eq-themed .eq-head .eq-dot { border-color: var(--eq-bar); }
.eq-themed .eq-wt small { opacity: 1; color: var(--eq-sub); }
.eq-themed .eq-wt small.on, .eq-themed .eq-pv.on, .eq-themed .eq-tm.hot { color: var(--eq-ok); }
.eq-themed .eq-dot, .eq-themed .eq-un { background: var(--eq-ok); }
.eq-themed .eq-un { color: var(--card); }
.eq-themed .eq-newbtn, .eq-themed .eq-fab, .eq-themed .eq-send, .eq-themed .eq-ib.mic { background: var(--eq-pri); color: var(--eq-on-pri); }
.eq-themed .eq-tabs button.on { color: var(--eq-pri); border-bottom-color: var(--eq-pri); }
.eq-themed .eq-day span { background: var(--eq-in); color: var(--eq-sub); border: 1px solid var(--line); box-shadow: none; }
.eq-themed .eq-bub { background: var(--eq-in); color: var(--eq-ink); border: 1px solid var(--line); box-shadow: var(--shadow); }
.eq-themed .eq-row.out .eq-bub { background: var(--eq-out); border-color: var(--line-2); }
.eq-themed .eq-row.in .eq-bub .eq-more { background: var(--eq-in); }
.eq-themed .eq-file, .eq-themed .eq-file .eq-ic { color: var(--eq-link); }
.eq-themed .eq-file { display: inline-flex; align-items: center; gap: 6px; }
.eq-themed .eq-ft, .eq-themed .eq-aud small, .eq-themed .eq-del, .eq-themed .eq-quote span { color: var(--eq-sub); }
.eq-themed .eq-quote { border-left-color: var(--eq-pri); background: var(--chip); }
.eq-themed .eq-img img { background: var(--chip); }
.eq-themed .eq-rx button { background: var(--card); border-color: var(--line-2); color: var(--eq-ink); }
.eq-themed .eq-rx button.mine { background: var(--accent-soft); border-color: var(--eq-pri); }
.eq-themed .eq-sys span { background: var(--warn-bg); color: var(--warn); box-shadow: none; }
.eq-themed .eq-tk.read { color: #34b7f1; }
.eq-themed .eq-compose, .eq-themed .eq-ctx, .eq-themed .eq-stage, .eq-themed .eq-rec { background: var(--eq-bar); color: var(--eq-ink); border-top: 1px solid var(--line); }
.eq-themed .eq-ctx-t { color: var(--eq-ink); border-left-color: var(--eq-pri); }
.eq-themed .eq-ctx-t span, .eq-themed .eq-rec-h, .eq-themed .eq-stage .eq-x, .eq-themed .eq-ctx .eq-x { color: var(--eq-sub); }
.eq-themed .eq-compose textarea { background: var(--eq-field); color: var(--eq-ink); border: 1px solid var(--input-line); }
.eq-themed .eq-compose textarea::placeholder { color: var(--eq-sub); }
.eq-themed .eq-clip, .eq-themed .eq-ib { color: var(--eq-sub); }
.eq-themed .eq-ib.mic { color: var(--eq-on-pri); }
.eq-themed .eq-emo { background: var(--card); border-top: 1px solid var(--line); }
.eq-themed .eq-rec-x { color: var(--eq-sub); }
.eq-themed .eq-rec-dot { background: var(--err); }
.eq-themed .eq-call { background: var(--chip); color: var(--eq-ink); border: 1px solid var(--line-2); }
.eq-themed .eq-call:hover { background: var(--row-hover); }
.eq-themed .eq-toast { background: var(--ink); color: var(--card); }
.eq-themed .eq-drop { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); opacity: .96; }
.eq-themed .eq-sheet { background: rgba(0, 0, 0, .5); }
.eq-themed .eq-menu button { display: flex; align-items: center; gap: 10px; }
.eq-themed .eq-menu.rp button { display: inline-block; }
.eq-themed .eq-person .eq-callm { color: var(--eq-sub); display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.eq-themed .eq-person .eq-callm:hover { color: var(--eq-ink); }
.eq-themed .eq-acts button { color: var(--eq-sub); display: inline-flex; align-items: center; justify-content: center; }
.eq-themed .eq-acts button:hover { color: var(--eq-ink); }
.eq-themed .eq-quote b { color: var(--eq-ink); }
.eq-ic { display: inline-flex; align-items: center; justify-content: center; flex: none; line-height: 0; }
.eq-ic .ic, .eq-themed .ic { width: 20px; height: 20px; }
.eq-acts .eq-ic .ic { width: 15px; height: 15px; }
.eq-callm .eq-ic .ic { width: 18px; height: 18px; }
.eq-menu button .eq-ic .ic { width: 18px; height: 18px; }
.eq-ib .ic, .eq-clip .ic { width: 22px; height: 22px; }
.eq-ib.mic .ic { width: 21px; height: 21px; }
.eq-send .ic { width: 20px; height: 20px; }
.eq-rec-x .ic { width: 22px; height: 22px; }
.eq-ib, .eq-rec-x, .eq-callm { display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.eq-stage-i { display: inline-flex; color: var(--eq-sub, var(--muted)); }
.eq-stage-i .ic { width: 30px; height: 30px; }
.eq-call .ic { width: 18px; height: 18px; }

/* Cadastrador: conferência dos pedidos novos */
.ord-card .rv-box { font-size: 12px; line-height: 1.5; margin: 4px 0 8px; padding: 6px 8px; background: var(--bg-soft, rgba(127,127,127,.08)); border-radius: 6px; }
.rv-data { font-size: 13px; line-height: 1.6; margin-bottom: 10px; }
.rv-check { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 10px; }
.rv-lbl { display: block; font-size: 12px; margin-bottom: 10px; }
.rv-lbl textarea, .rv-lbl select { display: block; width: 100%; box-sizing: border-box; margin-top: 4px; }
.rv-actions { margin: 6px 0; }

/* trava de tela: nome do usuário vira link para "Meu PIN" */
a.who { color: inherit; text-decoration: none; }
a.who:hover b { text-decoration: underline; }

/* atendimento: ocupa a altura da viewport, cada coluna rola sozinha (0.4.73) */
.inbox { grid-template-rows: minmax(0, 1fr); height: calc(100vh - 60px); height: calc(100dvh - 60px); overflow: hidden; }
.ib-list, .ib-chat, .ib-side { min-height: 0; height: 100%; box-sizing: border-box; }
.ib-chat { overflow: hidden; }
.ib-chat > .ib-head, .ib-chat > #numbox, .ib-chat > .ib-compose { flex: none; }
.ib-chat > .ib-msgs { flex: 1 1 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.ib-compose { max-height: 45%; } /* sem overflow: a lista do "/" abre acima da caixa e não pode ser cortada */
.ib-compose .chips { max-height: 80px; overflow-y: auto; }
.ib-items, .ib-side { overscroll-behavior: contain; }
.ib-side { overflow-y: auto; }
@media (min-width: 901px) { html:has(.inbox) body { overflow: hidden; } }

/* 0.4.74: cadeia flex do layout do app até a coluna (sem calc de 60px), cabeçalho fixo, mensagens rolando, caixa de digitar sempre visível */
@media (min-width: 901px) {
  html:has(.inbox) .shell { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
  html:has(.inbox) .main { height: 100%; min-height: 0; }
  html:has(.inbox) .topbar { flex: none; }
  html:has(.inbox) .content.full { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
  html:has(.inbox) .content.full > .inbox { flex: 1 1 0; height: auto; min-height: 0; }
}
.ib-head { flex: none; }
.ib-compose { flex: none; }
@media (max-height: 800px) {
  .ib-head { flex-wrap: nowrap; padding: 6px 12px; min-height: 0; gap: 8px; row-gap: 0; }
  .ib-head .who2 { min-width: 120px; }
  .ib-head .who2 { flex: 1 1 120px; overflow: hidden; }
  .ib-head .who2 b, .ib-head .who2 small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .ib-head .who2 b { font-size: 14px; line-height: 1.25; }
  .ib-head .who2 small { font-size: 11px; line-height: 1.25; display: block; }
  .ib-head .who2 .pill { display: none; }
  .ib-head .avatar { width: 32px; height: 32px; }
  .ib-actions { flex-wrap: nowrap; flex: 0 1 auto; max-width: 62%; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
  .ib-actions .btn { white-space: nowrap; flex: none; padding: 3px 9px; font-size: 12px; min-height: 28px; }
  .ib-msgs { padding: 10px 14px; }
  .ib-compose { padding: 6px 10px; }
  .ib-compose textarea { min-height: 36px; }
}

/* 0.4.74: anotações internas no painel lateral do atendimento */
.side-notes .note-row { border-top: 1px solid var(--line); padding: 6px 0; font-size: 13px; }
.side-notes .note-body { white-space: pre-line; overflow-wrap: anywhere; }

/* 0.4.74: linha de sistema no chat (transferências) */
.ib-msgs .sysline { align-self: center; text-align: center; font-size: 11px; color: var(--muted); background: var(--chip); border-radius: 999px; padding: 2px 12px; margin: 4px 0; }

/* 0.4.83: selo da janela no cabeçalho, regras do número oficial e seletor de modelos */
.win-badge { display: inline-block; margin-left: 8px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; vertical-align: middle; white-space: nowrap; }
.win-badge.win-ok { background: var(--ok-bg); color: var(--ok); border: 1px solid var(--ok); }
.win-badge.win-bad { background: var(--err-bg); color: var(--err); border: 1px solid var(--err); }
.win-rules { border: 0; background: none; color: var(--muted); text-decoration: underline; font-size: 11px; cursor: pointer; margin-left: 6px; padding: 0; }
.rules-list { padding-left: 20px; display: grid; gap: 8px; margin: 0 0 14px; font-size: 14px; }
.tag.red { background: var(--err-bg); color: var(--err); }
.tplc { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.tplc.sel { border-color: var(--ok); }
.tplc.off { opacity: .55; }
.tplc-h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; cursor: pointer; }
.tplc-b { margin-top: 10px; display: grid; gap: 8px; }
.tplc-b label { display: grid; gap: 3px; font-size: 12px; color: var(--muted); }
.tpl-bubble { background: #dcf8c6; color: #1b1b1b; border-radius: 10px; padding: 10px 12px; white-space: pre-wrap; font-size: 14px; max-width: 460px; }
.tpl-bubble .tpl-foot { color: #667; font-size: 11px; margin-top: 6px; }
.tpl-bubble .tpl-btns { display: grid; gap: 4px; margin-top: 8px; }
.tpl-bubble .tpl-btns span { background: #fff; color: #128c7e; border-radius: 8px; text-align: center; padding: 5px; font-size: 13px; }
.rules-window { background: var(--ok-bg); color: var(--ink); border: 1px solid var(--ok); border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; font-size: 14px; }
.rules-window p { margin: 6px 0 0; }
