:root {
  --bg: #f3f3f3;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --ink: #1b1b1b;
  --muted: #5f6368;
  --line: #e5e5e5;
  --accent: #005fb8;
  --accent-ink: #ffffff;
  --accent-soft: #e5f1fb;
  --danger: #c92a2a;
  --danger-soft: #fff0f0;
  --ok: #2b8a3e;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Escala do layout (v1.260.0). CSS novo usa estas medidas em vez de números soltos; as telas antigas migram aos poucos.
     Larguras de quebra (não dá para pôr em variável): 640 px = celular, 880 px = menu vira gaveta, 1180 px = janela estreita. */
  --fs-1: 12px; --fs-2: 13px; --fs-3: 14px; --fs-4: 16px; --fs-5: 18px; --fs-6: 22px;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px;
  --r-1: 6px; --r-2: 10px; --r-3: 14px;
  --toque: 44px; /* altura mínima do que se toca com o dedo */

  --s-orcamento: #667085; --s-orcamento-bg: #eef0f3;
  --s-aberta: #1c64f2; --s-aberta-bg: #e8f0fe;
  --s-em_andamento: #b45309; --s-em_andamento-bg: #fef3c7;
  --s-aguardando: #7e3af2; --s-aguardando-bg: #f1e8ff;
  --s-concluida: #1f7a3a; --s-concluida-bg: #dcf5e4;
  --s-cancelada: #c92a2a; --s-cancelada-bg: #fde8e8;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12161d; --surface: #1a1f29; --surface-2: #202633; --ink: #e8ecf3; --muted: #9aa5b6;
    --line: #2b3342; --accent: #4aa3f0; --accent-ink: #06182b; --accent-soft: #15293f;
    --danger: #ff8787; --danger-soft: #3a2024; --ok: #69db7c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --s-orcamento: #aab3c2; --s-orcamento-bg: #2a303c;
    --s-aberta: #8db3ff; --s-aberta-bg: #1c2b4d;
    --s-em_andamento: #fcc96b; --s-em_andamento-bg: #3d3216;
    --s-aguardando: #c9a8ff; --s-aguardando-bg: #2e2250;
    --s-concluida: #7be09a; --s-concluida-bg: #173523;
    --s-cancelada: #ff9b9b; --s-cancelada-bg: #3d2024;
  }
}
:root[data-theme="dark"] {
  --bg: #12161d; --surface: #1a1f29; --surface-2: #202633; --ink: #e8ecf3; --muted: #9aa5b6;
  --line: #2b3342; --accent: #4aa3f0; --accent-ink: #06182b; --accent-soft: #15293f;
  --danger: #ff8787; --danger-soft: #3a2024; --ok: #69db7c;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  --s-orcamento: #aab3c2; --s-orcamento-bg: #2a303c;
  --s-aberta: #8db3ff; --s-aberta-bg: #1c2b4d;
  --s-em_andamento: #fcc96b; --s-em_andamento-bg: #3d3216;
  --s-aguardando: #c9a8ff; --s-aguardando-bg: #2e2250;
  --s-concluida: #7be09a; --s-concluida-bg: #173523;
  --s-cancelada: #ff9b9b; --s-cancelada-bg: #3d2024;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.5 var(--font); background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 22px; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
.muted { color: var(--muted); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hidden { display: none !important; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 32px 28px; box-shadow: var(--shadow); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -.02em; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.login-card h1 { margin: 22px 0 4px; }
.login-card p { margin: 0 0 20px; color: var(--muted); }
.login-card .f { margin-bottom: 14px; }
.login-selos { width: 100%; max-width: 380px; margin-top: 14px; text-align: center; }
.login-selos .selos-grade { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.login-selos .selo-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px 3px 5px; }
.login-selos .selo-marca { width: 18px; height: 18px; border-radius: 4px; display: block; }
.login-selos .selo-chip .ico { width: 18px; height: 18px; padding: 2px; box-sizing: border-box; fill: none; stroke: currentColor; stroke-width: 1.8; color: var(--accent, #1d4ed8); }
.login-selos .selos-ots { font-size: 11.5px; color: var(--muted); margin-top: 8px; min-height: 1em; }
.login-selos .selos-mais { display: inline-block; font-size: 12px; margin-top: 6px; }
.login-card .btn { width: 100%; justify-content: center; padding: 10px; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; }
.side .brand { padding: 4px 10px 18px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 500; }
.nav a:hover { background: var(--accent-soft); color: var(--accent); }
.nav a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; box-shadow: inset 2px 0 0 var(--accent); }
.nav .grp { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 14px 10px 4px; }
/* cabeçalho de grupo (menu) com barra própria, para destacar do submenu */
.nav button.grp { display: flex; justify-content: space-between; align-items: center; width: 100%; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; margin-top: 10px; padding: 9px 10px; font-weight: 700; cursor: pointer; font-family: inherit; font-weight: 600; text-align: left; }
.nav button.grp:hover { color: var(--ink); background: var(--line); }
.nav .grp-box.open > button.grp { color: var(--ink); border-color: var(--accent-soft); }
/* submenu: recuado e com uma linha-guia à esquerda, para diferenciar do cabeçalho */
.nav .grp-items { margin: 2px 0 2px 12px; padding-left: 8px; border-left: 2px solid var(--line); }
.nav .chev { display: inline-block; transition: transform .15s; font-size: 12px; }
.nav .grp-box.open .chev { transform: rotate(90deg); }
.nav .grp-items { display: none; }
.nav .grp-box.open .grp-items { display: block; }

/* Configurações: grupos expansíveis (Aparência, Fiscal, Vitrine…) */
.cfg-grupo { margin-bottom: 14px; }
.cfg-busca { position: relative; width: 340px; max-width: 100%; }
.cfg-busca .search { width: 100%; }
.cfg-busca-res { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0; min-width: 300px; max-height: min(420px, 60vh); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(0,0,0,.18); padding: 4px; }
.cfg-busca-res[hidden] { display: none; }
.cfg-busca-item { display: block; width: 100%; text-align: left; background: none; border: 0; border-radius: 8px; padding: 8px 10px; font: inherit; color: var(--ink); cursor: pointer; }
.cfg-busca-item:hover, .cfg-busca-item.on { background: var(--bg); }
.cfg-busca-t { display: block; font-size: 14px; font-weight: 600; line-height: 1.35; }
.cfg-busca-t mark { background: color-mix(in srgb, var(--accent) 28%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.cfg-busca-onde { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.cfg-busca-tag { display: inline-block; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 6px; margin-right: 6px; vertical-align: 1px; }
.cfg-busca-vazio { padding: 10px 12px; color: var(--muted); font-size: 13px; }
@keyframes cfgAchado { 0%, 60% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: 0 0 0 3px transparent; } }
.cfg-achado { animation: cfgAchado 2.4s ease-out; border-radius: 8px; }
.cfg-grupo-tit { display: flex; align-items: center; gap: 10px; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; text-align: left; box-shadow: var(--shadow); }
.cfg-grupo-tit:hover { border-color: var(--accent); }
.cfg-grupo-nome { flex: 1; }
.cfg-grupo-n { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--bg); border-radius: 999px; padding: 2px 9px; }
.cfg-grupo-tit .chev { display: inline-block; font-size: 13px; color: var(--muted); transition: transform .15s; }
.cfg-grupo-tit[aria-expanded="true"] .chev { transform: rotate(90deg); }
.cfg-grupo-itens { padding-top: 12px; }
.cfg-grupo-itens[hidden] { display: none; }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side-foot { margin-top: auto; border-top: 1px solid var(--line); padding: 12px 6px 0; }
.me { padding: 0 6px 8px; }
.me b { display: block; }
.me small { color: var(--muted); }
.side-foot .row { display: flex; gap: 6px; }
/* versão do sistema: discreta, no pé do menu e embaixo do login */
.side-ver { margin: 10px 6px 0; font-size: 11.5px; color: var(--muted); letter-spacing: .02em; }
.shell > div { min-width: 0; }
.main { padding: 28px 32px 48px; max-width: 1280px; width: 100%; min-width: 0; }
.topbar { display: none; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin-right: auto; }
.page-head .search { width: 260px; }

/* ---------- Controles ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); padding: 7px 13px; border-radius: 8px; cursor: pointer; font-weight: 550; line-height: 1.3; }
.btn[hidden] { display: none !important; } /* sem isto o display do .btn vence o atributo hidden (ex.: "Custo logístico" e "Baixar SEFAZ" em todos os relatórios) */
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.small { padding: 4px 9px; font-size: 13px; }
.icon-btn { border: 0; background: transparent; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); padding: 2px 8px; border-radius: 6px; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], input[type=password], input[type=search], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
textarea { resize: vertical; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); }
.f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.f > span { font-size: 12.5px; font-weight: 550; color: var(--muted); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.f.chk { flex-direction: row; align-items: center; gap: 8px; padding-top: 22px; }
.f.chk > span { font-size: 14px; color: var(--ink); font-weight: 500; order: 2; }

/* ---------- Cartões e tabelas ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px 20px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th.num { text-align: right; }
td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover { background: var(--surface-2); }
tr.off td { opacity: .55; }
.empty { padding: 44px 16px; text-align: center; color: var(--muted); }
.sub { display: block; color: var(--muted); font-size: 12.5px; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.badge.red { background: var(--danger-soft); color: var(--danger); }
.badge.green { background: var(--s-concluida-bg); color: var(--s-concluida); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 4px 12px; cursor: pointer; font-size: 13px; font-weight: 550; color: var(--muted); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* ---------- Dashboard ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { padding: 16px 18px; }
.stat small { color: var(--muted); font-weight: 550; }
.stat b { display: block; font-size: 26px; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.two { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
.two.metade { grid-template-columns: 1fr 1fr; }
.two > * { min-width: 0; } /* sem isso, uma tabela larga estica a coluna e o cartão passa da tela no celular */
.two h3 { padding: 16px 18px 6px; font-size: 15px; }
.bars { padding: 6px 18px 16px; display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 110px 1fr 30px; align-items: center; gap: 10px; font-size: 13px; }
.bar { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; }
.list { list-style: none; margin: 0; padding: 4px 18px 14px; }
.list li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(15, 20, 30, .45); display: flex; align-items: flex-start; justify-content: center; padding: 4vh 12px; overflow-y: auto; z-index: 50; }
.modal { background: var(--surface); border-radius: 14px; width: 100%; max-width: 640px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); display: flex; flex-direction: column; }
.modal.lg { max-width: 980px; }
.modal.sm { max-width: 420px; }
.modal > header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal > header h2 { font-size: 17px; }
.modal .body { padding: 18px 20px; }
.modal > footer { display: flex; align-items: center; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 14px 14px; flex-wrap: wrap; }
.modal > footer { position: sticky; bottom: 0; z-index: 3; box-shadow: 0 -6px 14px rgba(0, 0, 0, .06); } /* botões sempre à vista em janelas longas (OS, pedido) */
.modal > footer .sp { flex: 1; }
.err { color: var(--danger); font-size: 13px; font-weight: 550; flex: 1 1 100%; }
.err:empty { display: none; }
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px 14px; }
.grid > .f { grid-column: span 12; }
.sec { grid-column: 1 / -1; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 8px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.sec:first-child { margin-top: 0; }
@media (min-width: 700px) {
  .grid > .c2 { grid-column: span 2; } .grid > .c3 { grid-column: span 3; } .grid > .c4 { grid-column: span 4; }
  .grid > .c5 { grid-column: span 5; } .grid > .c6 { grid-column: span 6; } .grid > .c7 { grid-column: span 7; }
  .grid > .c8 { grid-column: span 8; } .grid > .c9 { grid-column: span 9; }
}

/* ---------- Itens da OS ---------- */
.items { margin-top: 16px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.items table td, .items table th { padding: 6px 8px; }
.items td input, .items td select { padding: 6px 8px; }
.items .tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.items-bar { display: flex; gap: 8px; padding: 10px; background: var(--surface-2); border-top: 1px solid var(--line); flex-wrap: wrap; }
.totals { display: grid; gap: 6px; justify-content: end; padding: 12px 14px; border-top: 1px solid var(--line); }
.totals div { display: flex; justify-content: space-between; gap: 30px; align-items: center; }
.totals input { width: 120px; text-align: right; }
/* desconto com escolha R$ / % */
.descbox { display: inline-flex; gap: 6px; align-items: center; }
.descbox select { width: auto; padding: 6px 8px; font-size: 13px; }
.descbox input { width: 110px; text-align: right; }
/* relatórios: cartões clicáveis e filtros */
.rel-card { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 14px 16px; cursor: pointer; font: inherit; color: inherit; width: 100%; }
.rel-card:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.rel-card b { font-size: 14.5px; }
.rel-card small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.rel-filtros { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.rel-filtros .f { margin: 0; max-width: 170px; }
/* DRE: linhas de total em negrito */
.rel-forte td { font-weight: 700; background: var(--accent-soft); }
/* DRE: linhas informativas de produção (não entram no resultado) */
.rel-memo td { color: var(--muted); font-style: italic; }
.rel-memo td:first-child { padding-left: 22px; }
.nat-sel { max-width: 130px; font-size: 12.5px; padding: 4px 6px; }
.totals .grand { font-size: 17px; font-weight: 700; }

.s-badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 650; white-space: nowrap; }

/* ---------- Toasts ---------- */
#toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 100; }
.toast { background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); font-weight: 550; max-width: 340px; }
.toast.err { background: var(--danger); color: #fff; }

/* ---------- Responsivo ---------- */
@media (max-width: 880px) {
  .shell { grid-template-columns: 1fr; }
  .topbar { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; height: auto; max-height: 100dvh; padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); overscroll-behavior: contain; width: 260px; z-index: 40; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 30px rgba(0, 0, 0, .25); }
  .side.open { transform: none; }
  .main { padding: 18px 14px 40px; }
  .page-head .search { width: 100%; order: 5; }
  .cfg-busca { width: 100%; order: 5; }
  .two, .two.metade { grid-template-columns: 1fr; }
  .modal-bg { padding: 0; }
  .modal, .modal.lg { border-radius: 0; min-height: 100%; max-width: none; }
  .modal > footer { border-radius: 0; }
}

/* ---------- Logo ---------- */
.logo { display: block; height: 58px; width: auto; max-width: 100%; object-fit: contain; flex: none; }
.side .logo { height: 82px; margin: 2px 8px 16px; align-self: flex-start; }
.topbar .logo { height: 40px; }
.login-card .logo { height: 120px; margin: 0 auto 6px; }
.login-card h1, .login-card p { text-align: center; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo { filter: brightness(0) invert(.94); } }
:root[data-theme="dark"] .logo { filter: brightness(0) invert(.94); }

/* ---------- Cobrança / Pix ---------- */
.cobranca { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 32px; background: var(--s-em_andamento-bg); color: var(--s-em_andamento); border-bottom: 1px solid var(--line); }
.pix-valor { text-align: center; font-size: 30px; font-weight: 750; letter-spacing: -.02em; }
.pix-qr { display: flex; justify-content: center; margin: 4px 0 12px; }
.pix-qr svg { width: 240px; height: 240px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.pix-code { font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; word-break: break-all; }
@media (max-width: 880px) { .cobranca { padding: 10px 14px; } }

.acts { text-align: right; min-width: 200px; }
.acts .btn { margin: 2px 0 2px 4px; }
.cob-sub { display: block; font-weight: 500; opacity: .9; }
.pix-det { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 0 0 12px; font-size: 13.5px; }
.pix-lin { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.login-card.susp { max-width: 460px; }
.susp-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.susp-acts .btn { width: auto; flex: 1 1 auto; justify-content: center; }
.cobranca.info { background: var(--s-aberta-bg); color: var(--s-aberta); }

/* fotos do produto (vitrine) */
.fotos { margin-top: 8px; }
.fotos-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.foto-item { position: relative; width: 96px; height: 96px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.foto-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto-item .btn { position: absolute; top: 4px; right: 4px; padding: 0 7px; line-height: 20px; }

/* inscrição pública */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.login-card.wide { max-width: 440px; }
.signup-cta { margin-top: 18px; text-align: center; }
.signup-cta .ou, .login-social .ou { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.signup-cta .ou::before, .signup-cta .ou::after, .login-social .ou::before, .login-social .ou::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.signup-cta .muted.small, .login-card .muted.small { font-size: 13px; margin: 10px 0 0; }
.check-line { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin: 4px 0 14px; color: var(--muted); }
.check-line input { margin-top: 3px; }
.btn.link { border: 0; background: none; box-shadow: none; color: var(--muted); margin-top: 8px; }

/* logotipo e etiqueta */
.logo-prev { display: flex; align-items: center; justify-content: center; width: fit-content; max-width: 100%; min-width: 180px; min-height: 90px; padding: 14px 18px; border: 1px dashed var(--line); border-radius: 10px; background: #fff; }
.logo-prev img { display: block; height: 120px; width: auto; max-width: 100%; object-fit: contain; }
.etq-prev { border: 1px solid var(--line); border-radius: 4px; overflow: auto; background: #fff; width: fit-content; max-width: 100%; box-shadow: var(--shadow); }

/* máscaras e validação de CPF/CNPJ */
input.invalido { border-color: var(--danger, #d33); }
.campo-erro { color: var(--danger, #d33); font-size: 12px; min-height: 0; }
.campo-erro:empty { display: none; }
input.travado { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }

/* equipe e permissões */
.perm-presets { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.perm-grid { display: grid; gap: 8px; }
.perm-grid.off, .perm-presets.off { opacity: .45; pointer-events: none; }
.perm-row { display: grid; grid-template-columns: 1fr minmax(150px, 220px); gap: 10px; align-items: center; }
.ro .items-bar, .ro .fotos .btn, .ro .icon-btn[aria-label="Remover item"] { display: none; }

/* recuperação de senha e verificação em duas etapas */
.forgot { text-align: center; }
.forgot .btn.link { margin-top: 10px; }
.login-blog { margin-top: 14px; text-align: center; }
.login-blog .btn { font-size: 14px; font-weight: 500; }
.login-idiomas { margin-top: 10px; display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 10px; }
.login-idiomas .btn { font-size: 13px; padding: 2px 4px; color: var(--muted); }
.login-idiomas .btn.on { color: var(--ink); font-weight: 600; text-decoration: underline; }
.login-ver { margin-top: 12px; text-align: center; font-size: 12px; color: var(--muted); }
/* faixa de campanha (ex.: Black Friday) no topo da página pública */
.camp { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; background: #111; color: #d7ff3e; text-decoration: none; padding: 11px 16px; font-size: 13.5px; }
.camp b { font-size: 12px; letter-spacing: .12em; }
.camp span { color: #f1f1f1; }
.camp i { font-style: normal; font-weight: 700; }
.camp:hover { text-decoration: none; background: #1c1c1c; }
.cod2fa { text-align: center; font-size: 22px; letter-spacing: .25em; font-variant-numeric: tabular-nums; }
.chave2fa { display: inline-block; font-size: 15px; line-height: 1.6; letter-spacing: .08em; background: var(--bg, #f4f6fa); padding: 6px 10px; border-radius: 8px; word-break: break-all; user-select: all; }
.passos2fa { margin: 0 0 10px; padding-left: 20px; }
.passos2fa li { margin: 4px 0; }
.rec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0; }
.rec-grid code { background: var(--bg, #f4f6fa); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; text-align: center; font-size: 15px; letter-spacing: .05em; user-select: all; }
.ts-box { display: flex; justify-content: center; margin: 14px 0 4px; min-height: 65px; }

/* regime tributário */
table.mini { width: 100%; border-collapse: collapse; margin: 0 0 10px; font-size: 14px; }
table.mini th, table.mini td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
table.mini th { font-size: 12px; color: var(--muted); font-weight: 600; }
table.mini .sub { display: block; }

/* aparência (claro / escuro / automático) */
.tema-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.tema-opts .btn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

/* NCM */
.ncm-desc { display: block; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.ncm-desc.ok { color: var(--ok); }
.ncm-desc.warn { color: var(--s-em_andamento); }
.ncm-lista { margin: 10px 0 0; max-height: 50vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.ncm-lista > p { margin: 0; padding: 12px; }
.ncm-item { display: flex; gap: 12px; width: 100%; text-align: left; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); background: none; cursor: pointer; }
.ncm-item:hover { background: var(--accent-soft); }
.ncm-item b { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.ncm-item span { min-width: 0; }
.ncm-desc + .btn { align-self: flex-start; width: auto; }

/* ---- financeiro ---- */
.pos { color: var(--s-concluida, #15803d); }
.neg { color: var(--danger, #b91c1c); }
.stat.conta { text-align: left; cursor: pointer; font: inherit; color: inherit; width: 100%; }
.stat.conta.on { outline: 2px solid var(--accent, #08805c); }
.stat.conta.off { opacity: .6; }
.label.inline, label.inline { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
label.inline input { width: auto; }
.tit-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
tr.on td { background: var(--surface-2); }
.conc { padding: 12px 16px; margin-bottom: 10px; }
.conc-head { display: flex; align-items: baseline; gap: 12px; }
.conc-data { color: var(--muted); font-size: 13px; min-width: 76px; }
.conc-desc { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.conc-acoes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; align-items: center; }
.conc-acoes .btn { text-align: left; white-space: normal; height: auto; padding: 6px 10px; }
.fin-os { margin-top: 14px; }
.fin-os-row { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.fin-os-row label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.fin-os-row input { width: auto; max-width: 150px; }
@media (max-width: 720px) { .conc-head { flex-wrap: wrap; } .conc-desc { flex-basis: 100%; order: 3; } }

/* ---- compras ---- */
.drop { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; padding: 36px 16px; border: 2px dashed var(--line); border-radius: 12px; background: var(--surface-2); cursor: pointer; font: inherit; color: inherit; text-align: center; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.items-bar .muted { align-self: center; }

/* ---------- NFC-e e frente de caixa (PDV) ---------- */
.badge.amber { background: var(--s-em_andamento-bg); color: var(--s-em_andamento); }
.pdv { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.pdv-esq { display: flex; flex-direction: column; min-height: 60vh; overflow: visible; }
.pdv-busca-box { position: relative; padding: 14px; border-bottom: 1px solid var(--line); }
.pdv-busca { font-size: 17px; padding: 12px 14px; }
.pdv-busca-linha { display: flex; gap: 8px; align-items: stretch; }
.pdv-busca-linha .pdv-busca { flex: 1; min-width: 0; }
.pdv-cam { flex: none; width: 52px; justify-content: center; font-size: 22px; padding: 0; }
/* leitor pela câmera */
.cam-quadro { position: relative; border-radius: 12px; overflow: hidden; background: #000; aspect-ratio: 4 / 3; }
.cam-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-mira { position: absolute; left: 10%; right: 10%; top: 50%; height: 2px; background: #ff3b3b; box-shadow: 0 0 10px #ff3b3b; }
.cam-mira::before { content: ''; position: absolute; left: -2px; right: -2px; top: -48px; height: 96px; border: 2px solid rgba(255, 255, 255, .7); border-radius: 10px; }
.cam-quadro.cam-ok { animation: camOk .45s ease-out; }
@keyframes camOk { 0% { box-shadow: inset 0 0 0 6px #10a676; } 100% { box-shadow: inset 0 0 0 0 transparent; } }
.cam-status { margin: 10px 0 6px; font-size: 14px; }
.cam-rodape { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; }
.cam-lista { list-style: none; margin: 8px 0 0; padding: 0; }
.cam-lista li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 14px; }
.cam-lista li small { color: var(--muted); white-space: nowrap; }
.pdv-sug { position: absolute; left: 14px; right: 14px; top: calc(100% - 8px); z-index: 20; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; }
.pdv-sug-item { display: flex; justify-content: space-between; gap: 12px; width: 100%; text-align: left; border: 0; background: transparent; padding: 9px 12px; cursor: pointer; color: inherit; font: inherit; }
.pdv-sug-item.on, .pdv-sug-item:hover { background: var(--accent-soft); }
.pdv-itens { flex: 1; }
.pdv-itens td { padding: 8px 10px; }
.pdv-qtd, .pdv-vu { width: 76px; text-align: right; padding: 6px 8px; font-variant-numeric: tabular-nums; }
.pdv-vu { width: 104px; }
.pdv-dir { display: flex; flex-direction: column; gap: 10px; position: sticky; top: 16px; }
.pdv-linha { display: flex; justify-content: space-between; font-size: 13px; }
.pdv-rot { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 4px; }
.pdv-total { font-size: 34px; font-weight: 750; line-height: 1.1; font-variant-numeric: tabular-nums; margin-bottom: 6px; }
.pdv-fim { justify-content: center; font-size: 16px; padding: 12px; }
.pdv-aviso { border-radius: 8px; margin-bottom: 12px; padding: 8px 14px; }
.pdv-troco { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; margin-bottom: 12px; }
.pdv-troco b { font-size: 30px; font-variant-numeric: tabular-nums; }
.pag-editor { display: flex; flex-direction: column; gap: 8px; }
.pag-atalhos { display: flex; gap: 6px; flex-wrap: wrap; }
.pag-linha { display: grid; grid-template-columns: minmax(0, 1fr) 130px 34px; gap: 8px; align-items: center; }
.pag-valor { text-align: right; font-variant-numeric: tabular-nums; }
.pag-resumo { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 12px; border-radius: 8px; background: var(--surface-2); }
.pag-resumo b { font-size: 18px; font-variant-numeric: tabular-nums; }
.pag-resumo.falta { background: var(--danger-soft); color: var(--danger); }
.pag-resumo.troco { background: var(--s-concluida-bg); color: var(--s-concluida); }
@media (max-width: 880px) {
  .pdv { grid-template-columns: minmax(0, 1fr); } /* minmax(0,…): a tabela não alarga a coluna além da tela */
  .pdv-dir { position: static; }
  .pdv-esq { min-height: 0; }
}
/* Frente de caixa no celular (e na maquininha): cabeçalho compacto e cada item do carrinho como um cartão de duas linhas */
@media (max-width: 600px) {
  .pdv-head { gap: 8px; margin-bottom: 12px; }
  .pdv-head h1 { width: 100%; margin: 0; font-size: 24px; }
  .pdv-head .btn, .pdv-head a { padding: 6px 10px; font-size: 13px; }
  .pdv-busca-box { padding: 10px; }
  .pdv-busca { font-size: 16px; padding: 10px 12px; } /* 16px: o celular não dá zoom ao tocar no campo */
  .pdv-itens { overflow: visible; }
  .pdv-itens table, .pdv-itens tbody { display: block; width: 100%; }
  .pdv-itens thead { display: none; }
  .pdv-itens tr.pdv-item { display: grid; grid-template-columns: 22px 64px 104px minmax(0, 1fr) 30px; grid-template-areas: "n prod prod prod x" ". qtd vu tot tot"; gap: 4px 6px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line); }
  .pdv-itens tr.pdv-item td { display: block; padding: 0; border: 0; width: auto !important; min-width: 0; }
  .pdv-c-n { grid-area: n; } .pdv-c-prod { grid-area: prod; overflow-wrap: anywhere; } .pdv-c-x { grid-area: x; justify-self: end; }
  .pdv-c-qtd { grid-area: qtd; } .pdv-c-vu { grid-area: vu; } .pdv-c-tot { grid-area: tot; text-align: right; font-weight: 700; }
  .pdv-itens .pdv-qtd, .pdv-itens .pdv-vu { width: 100%; font-size: 15px; }
  .pdv-itens td.empty { display: block; padding: 18px 12px; }
  .pdv-total { font-size: 30px; }
  .pag-linha { grid-template-columns: minmax(0, 1fr) 110px 30px; }
}
.pag-bloco { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; }
.pag-cartao { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-right: 42px; }
@media (max-width: 600px) { .pag-cartao { grid-template-columns: 1fr; margin-right: 0; } }
.pag-maq { font-size: 12.5px; color: var(--muted); padding: 6px 10px; border: 1px dashed var(--line); border-radius: 8px; margin-right: 42px; }
.pag-maq.ok { color: var(--ok); border-style: solid; border-color: currentColor; background: var(--accent-soft); font-weight: 600; }
@media (max-width: 600px) { .pag-maq { margin-right: 0; } }

/* ---------- parcelas do orçamento / pedido ---------- */
.parc { margin-top: 14px; }
.parc-gerar { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 10px; }
.parc-gerar > .f { width: 190px; }
.parc-campos { display: flex; gap: 10px; flex-wrap: wrap; flex: 1; min-width: 240px; }
.parc-campos .f { width: 120px; }
.parc-botoes { display: flex; gap: 6px; }
.parc table td { padding: 6px 8px; }
.parc table input { padding: 6px 8px; }
.parc-soma { margin-top: 8px; font-size: 13px; color: var(--muted); text-align: right; }
.parc-soma.erro { color: var(--danger); font-weight: 600; }

/* ---------- NF-e: notas referenciadas e CFOP por item ---------- */
.ref-add { display: flex; gap: 8px; flex-wrap: wrap; }
.ref-add input { flex: 1; min-width: 240px; font-variant-numeric: tabular-nums; }
.ref-lista { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.ref-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-2); border-radius: 99px; padding: 2px 4px 2px 12px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.ref-chip .icon-btn { font-size: 18px; padding: 0 6px; }
.items .col-cfop { display: none; }
.items.mostra-cfop .col-cfop { display: table-cell; }
.chave-linha { font-size: 12.5px; margin-top: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chave-linha span { word-break: break-all; font-variant-numeric: tabular-nums; }
.chave-linha .btn { padding: 2px 8px; font-size: 12px; }

/* conferência de estoque */
.conf-tab th .sm { display: none; }
.conf-tab input.qtd-conf { width: 96px; text-align: right; padding: 6px 8px; font-variant-numeric: tabular-nums; }
.conf-tab input.qtd-conf.err-in { border-color: var(--danger); }
.conf-tab tr.ok-row td:first-child { box-shadow: inset 3px 0 0 var(--ok); }
.conf-tab tr.flash td { background: var(--accent-soft); transition: background .2s; }
@media (max-width: 700px) {
  .conf-tab th:nth-child(1), .conf-tab td:nth-child(1), .conf-tab th:nth-child(3), .conf-tab td:nth-child(3) { display: none; }
  .conf-tab tr.ok-row td:nth-child(2) { box-shadow: inset 3px 0 0 var(--ok); }
  .conf-tab th, .conf-tab td { padding-left: 8px; padding-right: 8px; }
  .conf-tab input.qtd-conf { width: 62px; padding: 6px; }
  .conf-tab th .sm { display: inline; } .conf-tab th .lg { display: none; }
  .conf-tab td { font-size: 13.5px; }
  .conf-stats { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 8px !important; }
  .conf-stats .stat { padding: 10px !important; }
  .conf-stats .stat b { font-size: 17px !important; }
  .conf-stats .stat .sub { display: none; }
}

/* horário de atendimento (configuração da vitrine) */
.hz-tab th, .hz-tab td { padding: 6px 8px; white-space: nowrap; }
.hz-tab tbody th { text-align: left; font-weight: 600; }
.hz-tab .hz-par { display: inline-flex; gap: 6px; align-items: center; }
.hz-tab input.hz-in { width: 104px; padding: 5px 6px; }
.hz-tab .hz-f label { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; cursor: pointer; }
.hz-tab tr.off td:not(.hz-f) { opacity: .35; }

/* seleção em lote nos cadastros */
th.sel-col, td.sel-col { width: 38px; padding-right: 0 !important; cursor: default; }
th.sel-col input, td.sel-col input { width: 17px; height: 17px; cursor: pointer; vertical-align: middle; }
tr.sel td { background: var(--accent-soft); }
.sel-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--accent-soft); border: 1px solid var(--accent); border-radius: var(--radius); padding: 8px 12px; margin-bottom: 12px; position: sticky; top: 8px; z-index: 4; }
.sel-bar b { margin-right: 6px; }
.btn.link { background: none; border-color: transparent; color: var(--accent); }
/* conferência: filtros */
.conf-filtros { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; font-size: 13.5px; }

/* envelope de e-mail na lista de NF-e */
.mail-btn { position: relative; color: var(--muted); }
.mail-btn:hover { color: var(--accent); }
.mail-btn.enviado { color: var(--ok); }
.mail-btn .ok-dot { position: absolute; right: 2px; top: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.mail-btn.off { opacity: .35; cursor: not-allowed; }
.mail-btn.off:hover { background: transparent; color: var(--muted); opacity: .55; }

/* crédito do cliente */
.credito-box { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6px 16px; padding: 10px 14px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.credito-box > div { display: flex; flex-direction: column; }
.credito-box small { font-size: 12px; color: var(--muted); font-weight: 550; }
.credito-box b { font-size: 18px; font-variant-numeric: tabular-nums; }
.credito-box p { margin: 0; font-size: 12.5px; }
.credito-topo { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.credito-saldo small { display: block; font-size: 12px; color: var(--muted); font-weight: 550; }
.credito-saldo b { font-size: 24px; font-variant-numeric: tabular-nums; }
.credito-acoes { display: flex; gap: 8px; }
.pag-cred { font-size: 12.5px; color: var(--muted); padding: 2px 2px 4px; }
.pag-cred.falta { color: var(--danger); }
.pag-atalhos .btn.cred { border-color: color-mix(in srgb, var(--s-concluida) 45%, var(--line)); color: var(--s-concluida); }
.pdv-cli-box { position: relative; }
.pdv-cli-box .pdv-sug { left: 0; right: 0; top: 100%; }
.pdv-cli:empty { display: none; }
.pdv-cli { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 4px 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.pdv-cli > span:first-child { flex: 1; min-width: 0; }
.pdv-cli .icon-btn { margin-left: auto; }
@media (max-width: 640px) { .credito-box { grid-template-columns: 1fr; } }

/* nota manual (MEI) */
.nm-totais { margin-top: 10px; display: flex; flex-direction: column; gap: 3px; max-width: 360px; margin-left: auto; font-size: 13.5px; }
.nm-totais .lin { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.nm-totais .lin.g { font-weight: 700; font-size: 15px; border-top: 1px solid var(--line); padding-top: 4px; margin-top: 2px; }
.nm-ciente { display: flex; gap: 10px; align-items: center; margin-top: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); cursor: pointer; }

/* abertura e fechamento de caixa */
.cx-fechado { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.cx-fechado h2, .cx-topo h2 { margin: 0 0 4px; font-size: 19px; display: flex; align-items: center; gap: 8px; }
.cx-fechado p, .cx-topo p { margin: 0; font-size: 13.5px; }
.cx-topo { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.cx-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.cx-stats { margin-bottom: 6px; }
.cx-stats .stat { box-shadow: none; }
.cx-hist { font-size: 17px; margin: 22px 0 10px; }
.cx-valor { text-align: right; font-variant-numeric: tabular-nums; }
.cx-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--s-concluida, #2b8a3e); display: inline-block; }
.cx-aviso { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
tfoot td { border-top: 1px solid var(--line); }
@media (max-width: 640px) {
  .cx-stats { grid-template-columns: 1fr 1fr !important; gap: 8px; }
  .cx-stats .stat b { font-size: 18px; }
  .cx-fecha td, .cx-fecha th { padding: 8px 6px; }
  .cx-fecha .sub { display: none; }
  .cx-fecha td:nth-child(3) { width: 96px !important; }
}
.cx-receb { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); font-size: 13.5px; }
.cx-receb select { width: auto; }

/* lançamento de estoque e contas na lista de notas */
.lanc-grp { display: inline-flex; gap: 2px; margin-right: 4px; vertical-align: middle; }
.lanc-btn { display: inline-flex; align-items: center; padding: 4px 5px; }
.lanc-btn svg { width: 17px; height: 17px; }
.lanc-btn.on { color: var(--ok); }
.lanc-btn.off { color: var(--danger); }
.lanc-btn.on:hover, .lanc-btn.off:hover { background: var(--surface-2); }
.lanc-btn.na { color: var(--muted); opacity: .25; padding: 4px 5px; }
.lanc-btn:disabled { cursor: not-allowed; opacity: .6; }

/* busca e tratamento de fotos dos produtos */
.bf-prod { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.bf-busca { display: flex; gap: 8px; }
.bf-busca input { flex: 1; }
.bf-avisos { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin: 8px 0; font-size: 12.5px; }
.bf-avisos:empty { display: none; }
.bf-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-top: 8px; }
.bf-cand { display: flex; flex-direction: column; gap: 4px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; color: #667085; font-size: 11px; overflow: hidden; }
.bf-cand img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; }
.bf-cand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bf-cand:hover { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.bf-cand.falhou { opacity: .35; cursor: not-allowed; }
.bf-vazio { grid-column: 1 / -1; padding: 24px 0; text-align: center; }
.bf-comp { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8px; }
.bf-comp figure { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.bf-comp img { width: 100%; aspect-ratio: 1; object-fit: contain; background: repeating-conic-gradient(#e9ecf1 0 25%, #fff 0 50%) 0 0 / 16px 16px; border: 1px solid var(--line); border-radius: 10px; }
.bf-comp figure:last-child img { background: #fff; }
.bf-comp figcaption { font-size: 12.5px; color: var(--muted); text-align: center; }
.bf-ops { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.bf-ops select { width: auto; }
.bf-topo { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.bf-nota { font-size: 12px; margin: 12px 0 0; }
@media (max-width: 640px) { .bf-grade { grid-template-columns: repeat(3, 1fr); } .bf-comp { grid-template-columns: 1fr 1fr; gap: 8px; } }
.bf-ops > select { width: auto; }
.bf-ops-tratar { display: inline-flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.bf-grade { grid-template-columns: repeat(auto-fill, minmax(150px, 180px)); }
.bf-mais { align-self: center; justify-self: start; }
.bf-fim { grid-column: 1 / -1; font-size: 12.5px; }
.bf-fim:empty { display: none; }
@media (max-width: 640px) { .bf-grade { grid-template-columns: repeat(3, 1fr); } .bf-mais { grid-column: 1 / -1; justify-self: stretch; } }

/* estatísticas de acesso */
.est-cab { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.est-cab .chips, .page-head .chips { margin: 0; }
.est-tiles { margin-bottom: 14px; }
.est-tile { box-shadow: none; }
.est-tile .sub { display: block; font-size: 12px; margin-top: 2px; }
.est-graficos { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 14px; }
.est-fig { margin: 0; }
.est-fig figcaption { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.est-fig figcaption b { color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; }
.est-graf { width: 100%; height: auto; display: block; }
.est-grade { stroke: var(--line); stroke-width: 1; }
.est-base { stroke: var(--muted); stroke-width: 1; opacity: .6; }
.est-eixo { fill: var(--muted); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.est-barra { fill: var(--accent); }
.est-hit { fill: transparent; }
.est-col:hover .est-barra { opacity: .75; }
.est-col:hover .est-hit { fill: var(--accent-soft); opacity: .5; }
.est-listas { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.est-lista h4 { margin: 0 0 6px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.est-lista table td { padding: 6px 4px; font-size: 13.5px; }
.est-lista .sub { display: block; }
.est-rodape { margin-bottom: 14px; font-size: 13.5px; }
.est-h2 { font-size: 17px; margin: 22px 0 10px; }
@media (max-width: 760px) { .est-graficos { grid-template-columns: 1fr; } .stats.est-tiles { grid-template-columns: 1fr 1fr; gap: 10px; } .est-tile b { font-size: 22px; } .est-tile .sub { font-size: 11.5px; } }

/* novidades */
.nov-card { padding: 18px 20px; margin-bottom: 14px; border-left: 4px solid var(--accent); }
.nov-card h3 { margin: 6px 0 8px; font-size: 18px; }
.nov-rot { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); }
.nov-rot .muted { text-transform: none; letter-spacing: 0; font-weight: 400; }
.nov-ico svg { width: 15px; height: 15px; display: block; }
.nov-texto { font-size: 14.5px; line-height: 1.55; }
.nov-texto p { margin: 0 0 10px; }
.nov-texto ul { margin: 0 0 10px; padding-left: 20px; }
.nov-texto li { margin: 0 0 4px; }
.nov-texto h3 { font-size: 15px; margin: 14px 0 6px; }
.nov-texto a { color: var(--accent); }
.nov-item { padding: 0 0 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.nov-item:last-child { border-bottom: 0; margin-bottom: 0; }
.nov-item h3 { margin: 2px 0 8px; }
.nov-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.nov-edit { font-family: inherit; min-height: 260px; resize: vertical; }
.nov-prev-cab { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; font-size: 13px; }
.nov-prev { width: 100%; height: 520px; border: 1px solid var(--line); border-radius: 10px; background: #f4f5f7; }
.nov-ed-barra { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.nov-ed { background: #f4f5f7; border: 1px solid var(--line); border-radius: 10px; padding: 16px 10px; max-height: 560px; overflow: auto; }
.nov-ed-papel { background: #fff; color: #14171c; border-radius: 12px; padding: 22px 22px 16px; font-family: Arial, Helvetica, sans-serif; font-size: 15px; line-height: 1.55; }
.nov-ed-rot { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: #08805c; font-weight: bold; margin: 0 0 6px; }
.nov-ed-tit { margin: 0 0 14px; font-size: 22px; line-height: 1.3; outline: none; border-radius: 6px; }
.nov-ed-corpo { min-height: 140px; outline: none; border-radius: 6px; }
.nov-ed-tit:focus, .nov-ed-corpo:focus { box-shadow: 0 0 0 2px rgba(8,128,92,.35); }
.nov-ed-tit:empty::before, .nov-ed-corpo:empty::before { content: attr(data-ph); color: #98a2b3; }
.nov-ed-corpo p { margin: 0 0 14px; } .nov-ed-corpo ul { margin: 0 0 14px; padding-left: 22px; } .nov-ed-corpo li { margin: 0 0 6px; } .nov-ed-corpo h3 { margin: 22px 0 8px; font-size: 17px; }
.nov-ed-ola { margin: 0 0 14px; }
.nov-ed-botao { background: #08805c; color: #fff; padding: 12px 22px; border-radius: 8px; display: inline-block; }
.nov-ed-rod { margin: 18px 0 0; color: #667085; font-size: 13px; }
@media (max-width: 860px) { .nov-grid { grid-template-columns: 1fr; } .nov-prev { height: 420px; } }
.bol-stats { margin-bottom: 14px; }
.bol-stats .stat .sub { display: block; font-size: 12px; margin-top: 2px; color: var(--muted); }
.bol-regras { font-size: 12.5px; margin: 10px 0 0 18px; padding: 0; }
.bol-regras li { margin-bottom: 3px; }
.lanc-btn.sem { color: var(--muted); opacity: .45; }

/* grade, série, validade */
.item-ctl { display: grid; gap: 6px; margin-top: 6px; }
.item-ctl:empty { display: none; }
.item-ctl select.falta { border-color: var(--danger); }
.ctl-box { margin: 12px 0; padding: 12px 14px; }
.pdv-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.pdv-tam { display: flex; flex-direction: column; align-items: center; padding: 10px 6px; gap: 2px; }
.pdv-tam b { font-size: 17px; }
.pdv-tam small { font-size: 11.5px; opacity: .75; }
.pdv-peso { font-size: 22px; text-align: right; }
.val-card { margin-bottom: 14px; border-left: 4px solid var(--danger); }

/* etiquetas */
.etq-palco { background: repeating-conic-gradient(var(--surface-2) 0% 25%, transparent 0% 50%) 50% / 16px 16px; border: 1px solid var(--line); border-radius: 10px; padding: 24px; display: grid; place-items: center; min-height: 220px; overflow: hidden; }
.etq-prev { zoom: 2.2; }
.etq-prev .etq { box-shadow: 0 0 0 .2mm #999; }
.etq-campos { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
input.invalido { border-color: var(--danger); }

/* aviso de cookies (página pública, quando a tag do Google Ads está ligada) */
.cookie-aviso { position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 640px; margin: 0 auto; z-index: 50; display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.18); font-size: 13.5px; }
.cookie-aviso > span { flex: 1 1 280px; }
.cookie-btns { display: flex; gap: 8px; margin-left: auto; }
.contato-whats { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 18px; text-decoration: none; color: #128c4a; border-color: #b7e4c7; background: #f0fbf4; }
.contato-whats:hover { background: #e2f6e9; }
.contato-whats svg { width: 18px; height: 18px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .contato-whats { color: #6fdc9b; background: rgba(34, 197, 94, .1); border-color: rgba(34, 197, 94, .35); } }
:root[data-theme="dark"] .contato-whats { color: #6fdc9b; background: rgba(34, 197, 94, .1); border-color: rgba(34, 197, 94, .35); }

/* ---------- OS: seleção, painel lateral de ações, filtros e menu ⋮ ---------- */
.os-filtros { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: -6px 0 12px; }
.os-filtros select { width: auto; max-width: 220px; min-width: 150px; font-size: 13px; padding: 6px 8px; }
.os-filtros select.on { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.os-lista { display: flex; gap: 16px; align-items: flex-start; }
.os-lista > .table-wrap { flex: 1; min-width: 0; }
th.ck, td.ck { width: 1%; padding-right: 0 !important; text-align: center; }
td.ck, th.ck { cursor: default; }
td.ck input, th.ck input { width: 17px; height: 17px; margin: 0; cursor: pointer; accent-color: var(--accent); vertical-align: middle; }
tr.sel > td { background: var(--accent-soft); }
.os-mais { font-size: 20px; font-weight: 700; padding: 2px 10px; }
.os-painel { width: 230px; flex: 0 0 230px; position: sticky; top: 16px; padding: 14px 16px; }
.os-painel-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.os-painel-tot { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.os-painel-tot b { font-size: 18px; }
.os-painel-cli { font-size: 12.5px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.os-painel-acoes { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.os-painel-acoes .btn { justify-content: flex-start; width: 100%; text-align: left; }
.os-painel-motivo { font-size: 12px; margin: -2px 0 4px 4px; line-height: 1.3; }
.os-sit-lista { display: flex; flex-direction: column; gap: 6px; }
.os-sit-btn { justify-content: flex-start; gap: 8px; }
.menu-pop { position: fixed; z-index: 1000; min-width: 230px; max-height: calc(100vh - 16px); overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(16, 24, 40, .18); padding: 6px; }
.menu-it { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 13.5px; text-align: left; padding: 7px 10px; border-radius: 6px; cursor: pointer; }
.menu-it:hover:not(:disabled), .menu-it:focus-visible { background: var(--surface-2); outline: none; }
.menu-it:disabled { color: var(--muted); opacity: .6; cursor: not-allowed; }
.menu-it.perigo { color: var(--danger); }
.menu-it.atual { font-weight: 650; }
.menu-ok { margin-left: auto; color: var(--accent); }
.menu-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 9px; display: inline-block; }
.menu-sep { height: 1px; background: var(--line); margin: 5px 4px; }
.menu-tit { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 4px 10px 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 900px) {
  .os-lista { flex-direction: column-reverse; }
  .os-painel { position: static; width: 100%; flex: none; }
  .os-painel-acoes { flex-direction: row; flex-wrap: wrap; }
  .os-painel-acoes .btn { width: auto; }
  .os-painel-motivo { display: none; }
}
.os-lista td:nth-child(3) { min-width: 180px; }
.os-lista td .sub { white-space: nowrap; }
/* Com o painel de totais aberto, o subtexto longo pode quebrar em vez de empurrar a tabela para baixo do painel. */
.os-lista.com-painel td:nth-child(3) .sub { white-space: normal; }
@media (max-width: 1500px) { .os-lista.lst-os.com-painel th:nth-child(6), .os-lista.lst-os.com-painel td:nth-child(6) { display: none; } }

/* ---------- pedidos de venda: datas, menu lateral de filtros ---------- */
.pv-datas { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.pv-datas input[type=date] { width: auto; padding: 6px 8px; font-size: 13px; }
.btn.on { background: var(--accent-soft); border-color: var(--accent); }
.pv-lateral { width: 230px; flex: 0 0 230px; position: sticky; top: 16px; padding: 14px 16px; }
.pv-lateral-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.pv-prod-lista { display: flex; flex-direction: column; gap: 2px; max-height: 260px; overflow-y: auto; margin-top: 4px; }
.pv-prod-it { border: 0; background: transparent; text-align: left; font: inherit; font-size: 13px; padding: 5px 6px; border-radius: 6px; cursor: pointer; color: var(--ink); }
.pv-prod-it:hover, .pv-prod-it:focus-visible { background: var(--surface-2); outline: none; }
.pv-prod-sel { display: flex; align-items: center; justify-content: space-between; gap: 6px; background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 8px; padding: 4px 4px 4px 10px; font-size: 13px; font-weight: 600; }
.pv-prod-sel .icon-btn { font-size: 18px; padding: 0 6px; }
@media (max-width: 1600px) { .pv-lista.lst-pv.com-painel .pv-lateral:not([hidden]) ~ .table-wrap td:nth-child(5), .pv-lista.lst-pv.com-painel .pv-lateral:not([hidden]) ~ .table-wrap th:nth-child(5) { display: none; } }
@media (max-width: 1600px) { .pv-lista.lst-fin.com-painel .pv-lateral:not([hidden]) ~ .table-wrap td:nth-child(4), .pv-lista.lst-fin.com-painel .pv-lateral:not([hidden]) ~ .table-wrap th:nth-child(4) { display: none; } }
@media (max-width: 900px) {
  .pv-lateral { position: static; width: 100%; flex: none; }
  .pv-datas { flex-wrap: wrap; }
  .pv-lista { flex-direction: column; }
  .pv-lista .pv-lateral { order: 0; } .pv-lista .os-painel { order: 1; } .pv-lista > .table-wrap { order: 2; }
}
.page-head .search.pv-busca { width: 190px; }
.pv-datas input[type=date] { width: 132px; }
@media (max-width: 900px) { .page-head .search.pv-busca { width: 100%; } }

/* ---------- busca de cliente/fornecedor (campo de escolha) ---------- */
.pp { position: relative; display: block; }
.pp .pp-sel { display: none !important; }
.pp .pp-in { width: 100%; padding-left: 30px !important; padding-right: 30px !important; text-overflow: ellipsis; }
.pp.pp-tem .pp-in { font-weight: 600; }
.pp .pp-in:disabled { background: var(--surface-2); color: var(--muted); }
.pp-lupa { position: absolute; left: 10px; top: 50%; transform: translateY(-52%); color: var(--muted); font-size: 17px; pointer-events: none; line-height: 1; }
.pp-x { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--muted); font-size: 18px; line-height: 1; padding: 4px 8px; border-radius: 6px; cursor: pointer; }
.pp-x:hover { background: var(--surface-2); color: var(--ink); }
.pp-x[hidden] { display: none; }
.pp-lista { position: fixed; z-index: 1000; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(16, 24, 40, .18); padding: 4px; }
.pp-lista[hidden] { display: none; }
.pp-it { display: flex; flex-direction: column; gap: 1px; padding: 7px 10px; border-radius: 7px; cursor: pointer; font-size: 13.5px; }
.pp-it small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-it .pp-onde { color: var(--accent); }
.pp-it:hover, .pp-it.on { background: var(--accent-soft); }
.pp-it.atual b::after { content: ' ✓'; color: var(--accent); }
.pp-vazio { color: var(--muted); font-style: italic; }
.pp-novo { color: var(--accent); font-weight: 600; border-top: 1px solid var(--line); border-radius: 0 0 7px 7px; margin-top: 2px; }
.pp-nada, .pp-mais { color: var(--muted); font-size: 12.5px; padding: 8px 10px; }

/* ---------- busca de produto/serviço nos itens ---------- */
.ip { position: relative; }
.ip-in { width: 100%; }
.ip-status { font-size: 12px; margin-top: 3px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; min-height: 0; }
.ip-status:empty { display: none; }
.ip-cad { color: var(--s-concluida); font-weight: 600; }
.ip-av { color: var(--s-em_andamento); }
.ip-desv { border: 0; background: transparent; color: var(--accent); font: inherit; font-size: 12px; padding: 0; cursor: pointer; text-decoration: underline; }
.ro .ip-desv { display: none; }
.ip-avulso b { font-weight: 600; }
.ip-avulso { border-top: 1px solid var(--line); border-radius: 0; margin-top: 2px; }

/* ---------- filtro de data das listas ---------- */
.fd { display: flex; align-items: center; gap: 6px; }
.fd select.fd-sel { width: auto; max-width: 215px; font-size: 13px; padding: 7px 8px; }
.fd input[type=date] { width: 138px; padding: 6px 8px; font-size: 13px; }
.fd.on select.fd-sel { border-color: var(--accent); background: var(--accent-soft); }
.fd-sep { font-size: 13px; }
@media (max-width: 900px) { .fd { flex-wrap: wrap; width: 100%; } .fd select.fd-sel { max-width: none; flex: 1; } }
.conf-ordem { width: auto; padding: 6px 8px; font-size: 13px; }

/* ---------- financeiro: filtros, painel do caixa ---------- */
.fin-faixa { display: flex; gap: 6px; }
.fin-faixa input { width: 50%; }
.cx-infos { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.cx-info { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13.5px; }
.cx-info b { font-size: 15px; }
.env-palco { background: repeating-conic-gradient(var(--surface-2) 0 25%, var(--surface) 0 50%) 0 0 / 16px 16px; border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: flex; justify-content: center; overflow: auto; max-height: 560px; }
.env-prev { transform-origin: top center; }

/* ---------- situação das contas a receber/pagar ---------- */
:root { --sit-aberto: #8a6100; --sit-aberto-bg: #fff3c4; --sit-hoje: #c2410c; --sit-hoje-bg: #ffe4cc; --sit-parcial: #1f7a3a; --sit-parcial-bg: #e3f6e8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --sit-aberto: #f5cf5a; --sit-aberto-bg: #3a3214; --sit-hoje: #ffa66b; --sit-hoje-bg: #44261a; --sit-parcial: #8be3a6; --sit-parcial-bg: #18301f; } }
:root[data-theme="dark"] { --sit-aberto: #f5cf5a; --sit-aberto-bg: #3a3214; --sit-hoje: #ffa66b; --sit-hoje-bg: #44261a; --sit-parcial: #8be3a6; --sit-parcial-bg: #18301f; }
.badge.sit-aberto { background: var(--sit-aberto-bg); color: var(--sit-aberto); }
.badge.sit-hoje { background: var(--sit-hoje-bg); color: var(--sit-hoje); }
.badge.sit-parcial { background: var(--sit-parcial-bg); color: var(--sit-parcial); box-shadow: inset 0 0 0 1px currentColor; }
.fd-rot { font-size: 13px; margin-right: -6px; }
/* uma embaixo da outra: link ou texto longo nao espreme o lado */
.obs-duas { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 14px; }
.obs-duas .obs-int textarea { background: var(--sit-aberto-bg); border-color: color-mix(in srgb, var(--sit-aberto) 35%, var(--line)); }
@media (max-width: 700px) { .obs-duas { grid-template-columns: 1fr; } }

/* ---------- itens separados em Serviços / Produtos ---------- */
tr.it-sec > td { background: var(--surface-2); padding: 7px 10px !important; border-top: 1px solid var(--line); }
.it-sec-cab { display: flex; align-items: center; gap: 10px; }
.it-sec-cab b { font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; }
.it-sec-cab .muted { font-size: 12.5px; }
tr.it-vazio > td { font-size: 13px; padding: 10px 12px !important; }
.ro tr.it-sec .btn { display: none; }
/* número do item no orçamento: 1, 2, 3… seguindo a ordem em que os itens aparecem (e saem na impressão) */
.it-lin { display: flex; gap: 8px; align-items: flex-start; }
.it-lin > .it-corpo { flex: 1; min-width: 0; }
.it-n { flex: none; min-width: 24px; height: 24px; padding: 0 6px; margin-top: 6px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2); border: 1px solid var(--line); font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.baixa-acr { margin-top: 4px; } .baixa-tot { margin: 8px 0 0; font-size: 14px; } .baixa-tot b { font-size: 15px; }
.em-ajuda { margin-top: 10px; font-size: 13.5px; } .em-ajuda summary { cursor: pointer; color: var(--accent, #08805c); font-weight: 600; }
.em-ajuda ol { margin: 8px 0 0; padding-left: 20px; } .em-ajuda li { margin: 4px 0; }

/* imagem ampliada dentro do sistema (print de ticket): miniatura clicável e visualizador */
.img-thumb { padding: 0; border: 0; background: none; cursor: zoom-in; display: block; line-height: 0; }
.img-thumb img { max-height: 150px; max-width: 240px; border-radius: 6px; border: 1px solid var(--line, #ddd); display: block; }
.img-thumb:hover img { border-color: var(--brand, #0a7d5a); }
.img-view { text-align: center; max-height: 70vh; overflow: auto; }
.img-view img { max-width: 100%; height: auto; border-radius: 8px; margin: 0 auto; }
/* janela do vídeo de apresentação (depois do login) */
.video-capa { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 10px; overflow: hidden; }
.video-capa img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.video-play { position: absolute; left: 73%; top: 50%; width: 68px; height: 48px; margin: -24px 0 0 -34px; border-radius: 14px; background: #ff0033; box-shadow: 0 6px 20px rgba(0, 0, 0, .4); transition: transform .15s; }
.video-play::after { content: ""; position: absolute; left: 27px; top: 13px; border-left: 20px solid #fff; border-top: 11px solid transparent; border-bottom: 11px solid transparent; }
.video-capa:hover .video-play, .video-capa:focus-visible .video-play { transform: scale(1.08); }

/* Observações e observações internas: texto sem limite, com rolagem vertical */
textarea.obs-longo { min-height: 9.5rem; max-height: 42vh; overflow-y: auto; resize: vertical; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
textarea.obs-longo::-webkit-scrollbar { width: 10px; }
textarea.obs-longo::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }
textarea.obs-longo::-webkit-scrollbar-track { background: transparent; }

/* Pedido mobile: tela enxuta para celular, inclusive usuário somente Pedido Mobile */
.mobile-shell { min-height: 100vh; background: var(--bg); }
.mobile-shell .main { max-width: 560px; margin: 0 auto; padding: 14px 12px 90px; }
.pedido-mobile { display: flex; flex-direction: column; gap: 12px; }
.pedido-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.pedido-head h1 { margin: 2px 0 4px; font-size: 24px; }
.pedido-head-acoes { display: flex; gap: 6px; flex-wrap: wrap; }
.pedido-bloco { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.pedido-label { display: block; font-weight: 700; margin-bottom: 8px; }
.pedido-bloco input[type="search"], .pedido-bloco input[type="number"], .pedido-bloco select, .pedido-bloco textarea { width: 100%; box-sizing: border-box; }
.pedido-resultados { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.pedido-opcao { text-align: left; border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px; padding: 10px; cursor: pointer; }
.pedido-opcao b, .pedido-opcao small { display: block; }
.pedido-opcao small { color: var(--muted); margin-top: 2px; }
.pedido-cliente { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; padding: 10px; border-radius: 10px; background: var(--surface-2); }
.pedido-cliente small { display: block; color: var(--muted); }
.pedido-linha { display: grid; grid-template-columns: 1fr 72px 86px 34px; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.pedido-linha:last-child { border-bottom: 0; }
.pedido-item-nome b, .pedido-item-nome small { display: block; }
.pedido-item-nome small { color: var(--muted); font-size: 12px; }
.pedido-item-total { text-align: right; }
.pedido-item-qtd input { width: 100%; box-sizing: border-box; }
.pedido-fechamento { display: flex; flex-direction: column; gap: 10px; }
.pedido-totais { display: flex; flex-direction: column; gap: 6px; }
.pedido-total { font-size: 18px; margin-top: 4px; }
.pedido-totais input { width: 96px; }
.pedido-salvar { width: 100%; padding: 13px; font-size: 16px; }
@media (max-width: 420px) {
  .pedido-linha { grid-template-columns: 1fr 62px 72px 30px; gap: 5px; }
  .pedido-head h1 { font-size: 21px; }
}

/* Produtos → Alterações em massa */
.massa-filtros { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; } .massa-filtros input[type=search] { flex: 1; min-width: 200px; }
.massa-cols { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .massa-cols { grid-template-columns: 1fr; } }
.massa-info { display: flex; gap: 14px; align-items: center; margin: 0 0 8px; }
.massa-painel { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.massa-grupo { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px 8px; margin: 0 0 10px; }
.massa-grupo legend { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted, #667085); padding: 0 4px; }
.massa-campo { display: grid; grid-template-columns: 18px minmax(0, 1fr) minmax(0, 1.25fr); gap: 8px; align-items: center; padding: 3px 4px; border-radius: 6px; margin: 0; }
.massa-campo > span { font-size: 13px; } .massa-campo.on { background: var(--surface-2); } .massa-campo.on > span { font-weight: 600; }
.massa-inp { display: flex; gap: 6px; min-width: 0; } .massa-inp input, .massa-inp select { width: 100%; min-width: 0; padding-top: 6px; padding-bottom: 6px; }
.massa-campo:has(select + input) { grid-template-columns: 18px minmax(0, 1fr); } .massa-campo:has(select + input) .massa-inp { grid-column: 2; }
.massa-cols table { min-width: 560px; }
.massa-grupo.massa-ibs { border-color: var(--accent, #3b5bdb); background: color-mix(in srgb, var(--accent, #3b5bdb) 4%, transparent); }
.massa-grupo.massa-ibs legend { color: var(--accent, #3b5bdb); font-weight: 700; }

/* seção juntada dentro de um cartão de Configurações (ex.: tabela do IBS/CBS e naturezas dentro do Fiscal NF-e) */
.cfg-sub { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 18px; }
/* bloco recolhível dentro de um formulário (ex.: numeração de testes/homologação das notas) */
.cfg-fold { border: 1px dashed var(--line); border-radius: 8px; padding: 8px 12px; }
.cfg-fold > summary { cursor: pointer; font-size: 13.5px; font-weight: 600; }
.cfg-fold[open] > summary { margin-bottom: 6px; }
/* Personalizar menu */
.meu-menu-grp { margin-bottom: 14px; }
.meu-menu-grp h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.meu-menu-itens { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 16px; }
.meu-menu-itens label { display: flex; gap: 8px; align-items: center; padding: 4px 0; cursor: pointer; }
.meu-menu-itens label.fixo { cursor: default; opacity: .75; }

/* ============================================================
   Temas (Configurações → Aparência). tema.js põe data-theme (base clara/escura) e data-estilo.
   ============================================================ */
/* ---- Verde claro: a identidade verde-sobre-branco de antes, agora como estilo opcional ---- */
:root[data-estilo="verde-claro"] {
  --bg: #f7f9f8; --surface: #ffffff; --surface-2: #f8faf9; --ink: #1a2420; --muted: #657069; --line: #e2e8e5;
  --accent: #08805c; --accent-ink: #ffffff; --accent-soft: #e3f5ee;
}
/* ---- All Black: preto puro, cinzas neutros e destaque branco ---- */
:root[data-estilo="preto"] {
  --bg: #000; --surface: #0a0a0a; --surface-2: #141414; --ink: #f5f5f5; --muted: #9e9e9e; --line: #242424;
  --accent: #fafafa; --accent-ink: #000; --accent-soft: #1c1c1c; --shadow: none;
  --s-orcamento-bg: #1a1a1a; --s-aberta-bg: #10192e; --s-em_andamento-bg: #2a2210; --s-aguardando-bg: #1e1636; --s-concluida-bg: #0f2418; --s-cancelada-bg: #2c1214;
}
:root[data-estilo="preto"] .side { border-right-color: #1a1a1a; }
:root[data-estilo="preto"] .nav a.on { background: #fff; color: #000; }
:root[data-estilo="preto"] .modal-bg { background: rgba(0, 0, 0, .75); }
:root[data-estilo="preto"] .modal { border: 1px solid #262626; }

/* ---- Retrô 98: janelas cinza com relevo, barra de título azul e área de trabalho verde-azulada ---- */
:root[data-estilo="retro"] {
  --bg: #008080; --surface: #c0c0c0; --surface-2: #d4d0c8; --ink: #000; --muted: #3c3c3c; --line: #808080;
  --accent: #000080; --accent-ink: #fff; --accent-soft: #c6c6e8; --danger: #a00000; --danger-soft: #f0d0d0;
  --radius: 0; --shadow: none; --font: Tahoma, "MS Sans Serif", Geneva, Verdana, sans-serif;
  --r-claro: #fff; --r-escuro: #404040; --r-meio: #808080;
}
:root[data-estilo="retro"] body { font-size: 13px; }
:root[data-estilo="retro"] .main > .page-head h1 { color: #fff; text-shadow: 1px 1px 0 #000; }
:root[data-estilo="retro"] .main > p.muted, :root[data-estilo="retro"] .main > .chips + div .muted { color: #e8ffff; }
:root[data-estilo="retro"] .card, :root[data-estilo="retro"] .cfg-grupo-tit, :root[data-estilo="retro"] .modal, :root[data-estilo="retro"] .menu-pop {
  border: 2px solid; border-color: var(--r-claro) var(--r-escuro) var(--r-escuro) var(--r-claro); box-shadow: 1px 1px 0 #000; border-radius: 0;
}
:root[data-estilo="retro"] .btn, :root[data-estilo="retro"] .chip {
  background: #c0c0c0; color: #000; border: 2px solid; border-color: var(--r-claro) var(--r-escuro) var(--r-escuro) var(--r-claro); border-radius: 0; box-shadow: 1px 1px 0 #000; font-weight: 400;
}
:root[data-estilo="retro"] .btn:active, :root[data-estilo="retro"] .chip.on { border-color: var(--r-escuro) var(--r-claro) var(--r-claro) var(--r-escuro); box-shadow: inset 1px 1px 0 #000; }
:root[data-estilo="retro"] .chip.on { background: #d4d0c8; color: #000; font-weight: 700; }
:root[data-estilo="retro"] .btn.primary { background: #c0c0c0; color: #000; font-weight: 700; outline: 1px solid #000; outline-offset: -4px; }
:root[data-estilo="retro"] .btn:hover, :root[data-estilo="retro"] .btn.primary:hover { filter: none; background: #c8c8c8; }
:root[data-estilo="retro"] input[type=text], :root[data-estilo="retro"] input[type=email], :root[data-estilo="retro"] input[type=tel], :root[data-estilo="retro"] input[type=number],
:root[data-estilo="retro"] input[type=date], :root[data-estilo="retro"] input[type=password], :root[data-estilo="retro"] input[type=search], :root[data-estilo="retro"] select, :root[data-estilo="retro"] textarea {
  background: #fff; border: 2px solid; border-color: var(--r-escuro) var(--r-claro) var(--r-claro) var(--r-escuro); border-radius: 0;
}
:root[data-estilo="retro"] input:focus, :root[data-estilo="retro"] select:focus, :root[data-estilo="retro"] textarea:focus { box-shadow: none; outline: 1px dotted #000; }
:root[data-estilo="retro"] .side { background: #c0c0c0; border-right: 2px solid var(--r-escuro); }
:root[data-estilo="retro"] .nav a { border-radius: 0; }
:root[data-estilo="retro"] .nav a:hover { background: #d4d0c8; }
:root[data-estilo="retro"] .nav a.on { background: #000080; color: #fff; }
:root[data-estilo="retro"] .modal > header { background: linear-gradient(90deg, #000080, #1084d0); color: #fff; padding: 6px 8px 6px 10px; border-bottom: 0; }
:root[data-estilo="retro"] .modal > header h2 { font-size: 13px; font-weight: 700; }
:root[data-estilo="retro"] .modal > header button { background: #c0c0c0; color: #000; border: 2px solid; border-color: var(--r-claro) var(--r-escuro) var(--r-escuro) var(--r-claro); border-radius: 0; width: 22px; height: 20px; line-height: 1; font-size: 14px; padding: 0; }
:root[data-estilo="retro"] .modal > footer { border-radius: 0; background: #c0c0c0; box-shadow: none; }
:root[data-estilo="retro"] .modal-bg { background: rgba(0, 64, 64, .35); }
:root[data-estilo="retro"] th { background: #c0c0c0; color: #000; border: 1px solid; border-color: var(--r-claro) var(--r-escuro) var(--r-escuro) var(--r-claro); text-transform: none; letter-spacing: 0; }
:root[data-estilo="retro"] .table-wrap { background: #fff; border: 2px solid; border-color: var(--r-escuro) var(--r-claro) var(--r-claro) var(--r-escuro); }
:root[data-estilo="retro"] .badge { border-radius: 0; border: 1px solid #808080; }

/* ---- Moderno (estilo "fluente"): cantos arredondados, vidro fosco, azul e fonte Segoe ---- */
:root[data-estilo="fluente"] {
  --bg: #f3f3f3; --surface: rgba(255, 255, 255, .78); --surface-2: rgba(249, 249, 249, .9); --ink: #1b1b1b; --muted: #5f5f5f; --line: #e5e5e5;
  --accent: #005fb8; --accent-ink: #fff; --accent-soft: #e5f1fb; --radius: 8px;
  --danger: #c92a2a; --danger-soft: #fff0f0; --ok: #2b8a3e; /* estilo sempre claro: não herda as cores do modo escuro */
  --shadow: 0 2px 4px rgba(0, 0, 0, .04), 0 0 0 1px rgba(0, 0, 0, .03);
  --font: "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
:root[data-estilo="fluente"] body { background: linear-gradient(135deg, #eef3fa 0%, #f6f3f9 45%, #f3f6f4 100%) fixed; }
:root[data-estilo="fluente"] .side { background: rgba(243, 243, 243, .7); -webkit-backdrop-filter: blur(30px) saturate(1.4); backdrop-filter: blur(30px) saturate(1.4); border-right: 0; }
:root[data-estilo="fluente"] .nav a { border-radius: 6px; position: relative; }
:root[data-estilo="fluente"] .nav a.on { background: rgba(0, 0, 0, .05); color: var(--ink); }
:root[data-estilo="fluente"] .nav a.on::before { content: ''; position: absolute; left: 0; top: 25%; bottom: 25%; width: 3px; border-radius: 3px; background: var(--accent); }
:root[data-estilo="fluente"] .card, :root[data-estilo="fluente"] .cfg-grupo-tit { -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border-color: rgba(0, 0, 0, .06); }
:root[data-estilo="fluente"] .btn { border-radius: 4px; border-color: rgba(0, 0, 0, .1); border-bottom-color: rgba(0, 0, 0, .2); background: #fbfbfb; font-weight: 500; }
:root[data-estilo="fluente"] .btn.primary { background: var(--accent); border-color: #0054a3; color: #fff; }
:root[data-estilo="fluente"] input[type=text], :root[data-estilo="fluente"] input[type=email], :root[data-estilo="fluente"] input[type=tel], :root[data-estilo="fluente"] input[type=number],
:root[data-estilo="fluente"] input[type=date], :root[data-estilo="fluente"] input[type=password], :root[data-estilo="fluente"] input[type=search], :root[data-estilo="fluente"] select, :root[data-estilo="fluente"] textarea {
  border-radius: 4px; background: #fff; border-color: rgba(0, 0, 0, .08); border-bottom: 1px solid rgba(0, 0, 0, .45);
}
:root[data-estilo="fluente"] input:focus, :root[data-estilo="fluente"] select:focus, :root[data-estilo="fluente"] textarea:focus { box-shadow: none; border-bottom: 2px solid var(--accent); }
:root[data-estilo="fluente"] .modal { border-radius: 8px; background: #fff; box-shadow: 0 32px 64px rgba(0, 0, 0, .19), 0 2px 21px rgba(0, 0, 0, .15); }
:root[data-estilo="fluente"] .modal > footer { border-radius: 0 0 8px 8px; background: #f3f3f3; }
:root[data-estilo="fluente"] .chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---- Roxo pop: noite roxa, gradiente lilás e rosa, corações discretos ---- */
:root[data-estilo="roxo"] {
  --bg: #120a22; --surface: #1d1233; --surface-2: #271945; --ink: #f4edff; --muted: #b8a6d8; --line: #3a2960;
  --accent: #b57bff; --accent-ink: #1a0b33; --accent-soft: #34205a; --radius: 14px;
  --shadow: 0 4px 18px rgba(80, 30, 160, .25);
}
:root[data-estilo="roxo"] body {
  background:
    radial-gradient(1200px 600px at 100% 0%, rgba(181, 123, 255, .18), transparent 60%),
    radial-gradient(900px 500px at 0% 100%, rgba(255, 120, 200, .12), transparent 60%), #120a22 fixed;
}
:root[data-estilo="roxo"] .side { background: linear-gradient(180deg, #1d1233, #160d2a); border-right-color: #2d1f4d; }
:root[data-estilo="roxo"] .nav a.on { background: linear-gradient(90deg, #8b5cf6, #c084fc); color: #fff; }
:root[data-estilo="roxo"] .btn.primary { background: linear-gradient(90deg, #8b5cf6, #d16bd8); border-color: transparent; color: #fff; }
:root[data-estilo="roxo"] .chip.on { background: linear-gradient(90deg, #8b5cf6, #d16bd8); border-color: transparent; color: #fff; }
:root[data-estilo="roxo"] .page-head h1::after { content: ' \2665'; color: #c084fc; font-size: .8em; }
:root[data-estilo="roxo"] .modal-bg { background: rgba(18, 6, 40, .6); }

/* ---- Verde Hub: noite azul-petróleo com brilho verde, nos tons do vídeo de apresentação ---- */
:root[data-estilo="verde"] {
  --bg: #0a111a; --surface: #101b22; --surface-2: #15252a; --ink: #eef6f3; --muted: #a9bac3; --line: #213538;
  --accent: #38d6a0; --accent-ink: #052419; --accent-soft: #10362b; --radius: 14px;
  --shadow: 0 4px 18px rgba(0, 0, 0, .35);
  --s-orcamento-bg: #182630; --s-aberta-bg: #10243a; --s-em_andamento-bg: #2a2410; --s-aguardando-bg: #1e1a36; --s-concluida-bg: #0d2c22; --s-cancelada-bg: #2c1416;
}
:root[data-estilo="verde"] body {
  background:
    radial-gradient(1100px 700px at 85% 100%, rgba(8, 128, 92, .32), transparent 62%),
    linear-gradient(180deg, #0a111a 0%, #0e2622 100%) fixed;
  background-attachment: fixed;
}
:root[data-estilo="verde"] .side { background: linear-gradient(180deg, #0c1720, #0c201d); border-right-color: #1c3134; }
:root[data-estilo="verde"] .nav a.on { background: #08805c; color: #fff; }
:root[data-estilo="verde"] .btn.primary { background: linear-gradient(90deg, #08805c, #10a676); border-color: transparent; color: #fff; }
:root[data-estilo="verde"] .btn.primary:hover { filter: brightness(1.08); }
:root[data-estilo="verde"] .chip.on { background: #08805c; border-color: #08805c; color: #fff; }
:root[data-estilo="verde"] .card { border-color: rgba(56, 214, 160, .16); }
:root[data-estilo="verde"] .modal-bg { background: rgba(3, 10, 12, .65); }

/* ---- Unicórnio: pastel rosa, lilás e menta, arco-íris e brilhos ---- */
:root[data-estilo="unicornio"] {
  --bg: #fff5fb; --surface: #ffffff; --surface-2: #fdf0fa; --ink: #4a2b5e; --muted: #8a6d9e; --line: #f1d9ef;
  --accent: #c04fd6; --accent-ink: #fff; --accent-soft: #fbe6fb; --radius: 16px;
  --danger: #c92a2a; --danger-soft: #fff0f0; --ok: #2b8a3e; /* estilo sempre claro: não herda as cores do modo escuro */
  --shadow: 0 4px 14px rgba(214, 120, 200, .14);
  --arco: linear-gradient(90deg, #ff9ad5, #ffc48a, #fff08a, #a8f0c6, #9cd9ff, #c9a7ff);
}
:root[data-estilo="unicornio"] body {
  background:
    radial-gradient(700px 420px at 0% 0%, rgba(255, 182, 230, .45), transparent 60%),
    radial-gradient(700px 420px at 100% 10%, rgba(201, 167, 255, .38), transparent 60%),
    radial-gradient(800px 500px at 50% 100%, rgba(168, 240, 220, .35), transparent 60%), #fff5fb fixed;
}
:root[data-estilo="unicornio"] .side { background: linear-gradient(180deg, #fff0fa, #f6efff 55%, #effcf7); border-right: 3px solid; border-image: linear-gradient(180deg, #ff9ad5, #ffc48a, #fff08a, #a8f0c6, #9cd9ff, #c9a7ff) 1; }
:root[data-estilo="unicornio"] body::before { content: ""; position: fixed; top: 0; left: 0; right: 0; height: 4px; background: var(--arco); z-index: 40; pointer-events: none; }
:root[data-estilo="unicornio"] .nav a { border-radius: 999px; }
:root[data-estilo="unicornio"] .nav a.on { background: linear-gradient(90deg, #ffd1ec, #e3d4ff); color: #7a2a8f; }
:root[data-estilo="unicornio"] .btn { border-radius: 999px; }
:root[data-estilo="unicornio"] .btn.primary { background: linear-gradient(90deg, #d63c94, #9b5de5); border-color: transparent; color: #fff; box-shadow: 0 3px 10px rgba(200, 90, 210, .3); }
:root[data-estilo="unicornio"] .chip.on { background: linear-gradient(90deg, #d63c94, #9b5de5); border-color: transparent; color: #fff; }
:root[data-estilo="unicornio"] .card, :root[data-estilo="unicornio"] .cfg-grupo-tit { border-color: #f3dcf2; }
:root[data-estilo="unicornio"] input[type=text], :root[data-estilo="unicornio"] input[type=search], :root[data-estilo="unicornio"] input[type=email], :root[data-estilo="unicornio"] input[type=number],
:root[data-estilo="unicornio"] input[type=tel], :root[data-estilo="unicornio"] input[type=date], :root[data-estilo="unicornio"] input[type=password], :root[data-estilo="unicornio"] select, :root[data-estilo="unicornio"] textarea { border-radius: 12px; border-color: #ecd3ef; }
:root[data-estilo="unicornio"] .page-head h1 { background: linear-gradient(90deg, #e04fa8, #9b5cf0 60%, #3fb5a8); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-estilo="unicornio"] .page-head h1::after { content: ' \2728'; -webkit-text-fill-color: initial; color: initial; font-size: .8em; }
:root[data-estilo="unicornio"] .modal { border-radius: 18px; border-top: 0; overflow: hidden; }
:root[data-estilo="unicornio"] .modal > header { border-top: 5px solid; border-image: var(--arco) 1; }
:root[data-estilo="unicornio"] .modal > footer { border-radius: 0 0 18px 18px; background: #fdf3fb; }
:root[data-estilo="unicornio"] .modal-bg { background: rgba(120, 60, 140, .28); }

/* ---- E-mail no Hub (public/email.js): lista à esquerda, leitura à direita; no celular, um embaixo do outro ---- */
.email-wrap { display: grid; grid-template-columns: minmax(260px, 380px) 1fr; gap: 14px; align-items: start; }
.email-wrap.gmail { grid-template-columns: 210px minmax(250px, 360px) 1fr; }
.email-menu { display: flex; flex-direction: column; gap: 1px; min-width: 0; position: sticky; top: 8px; }
.email-escrever { margin: 0 0 10px; padding: 12px 18px; border-radius: 16px; font-size: 15px; align-self: flex-start; }
.email-menu-item { display: flex; align-items: center; border-radius: 0 16px 16px 0; min-width: 0; }
.email-menu-item:hover { background: var(--surface-2); }
.email-menu-item.on { background: var(--accent-soft); }
.email-menu-item.on .email-menu-nome { font-weight: 700; color: var(--text); }
.email-menu-nome { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 7px 10px; background: none; border: 0; cursor: pointer; font: inherit; color: inherit; text-align: left; }
.email-menu-nome > span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.email-menu-nome .ico { width: 18px; height: 18px; flex: none; opacity: .75; }
.email-conta { font-size: 12.5px; }
.email-seta { width: 16px; flex: none; background: none; border: 0; cursor: pointer; color: var(--muted); padding: 0; font-size: 12px; }
.email-seta.vazia { cursor: default; }
.email-menu-mais { opacity: 0; padding: 2px 8px; }
.email-menu-item:hover .email-menu-mais, .email-menu-mais:focus { opacity: 1; }
.email-menu-titulo { display: flex; align-items: center; justify-content: space-between; margin: 12px 0 2px; padding: 0 6px 0 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.email-menu-dica { font-size: 12.5px; padding: 0 10px; margin: 2px 0; }
.email-menu .email-uso { flex-direction: column; align-items: flex-start; gap: 4px; margin: 14px 0 0; padding: 0 10px; }
.email-menu .email-barra { width: 100%; max-width: 180px; }
.email-estrela { background: none; border: 0; cursor: pointer; color: var(--muted); font-size: 16px; padding: 0 6px 0 0; line-height: 1; }
.email-estrela.on { color: #e6a700; }
.email-destinos { display: flex; flex-direction: column; gap: 2px; max-height: 50vh; overflow-y: auto; }
.email-destino { display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: none; border: 0; border-radius: 8px; cursor: pointer; font: inherit; color: inherit; text-align: left; }
.email-destino:hover { background: var(--surface-2); }
.email-destino .ico { width: 16px; height: 16px; opacity: .75; }
@media (max-width: 1100px) { .email-wrap.gmail { grid-template-columns: 190px 1fr; } .email-wrap.gmail .email-leitura { grid-column: 1 / -1; } }
@media (max-width: 880px) {
  .email-wrap.gmail { grid-template-columns: 1fr; }
  .email-menu { position: static; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
  .email-menu-item { border-radius: 16px; flex: none; }
  .email-menu-titulo, .email-menu-dica, .email-menu .email-uso, .email-seta, .email-menu-mais { display: none; }
  .email-escrever { margin: 0 6px 0 0; padding: 8px 14px; }
}
.email-col-lista { min-width: 0; }
.email-abas { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.email-lista { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; max-height: calc(100vh - 230px); overflow-y: auto; }
.email-item { padding: 10px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.email-item:last-child { border-bottom: 0; }
.email-item:hover { background: var(--surface-2); }
.email-item.aberto { background: var(--accent-soft); }
.email-item.nao-lido .email-de, .email-item.nao-lido .email-item-l2 > span:first-child { font-weight: 700; }
.email-item.nao-lido { border-left: 3px solid var(--accent); }
.email-item-l1 { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.email-de { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; text-align: left; }
.email-quando { font-size: 12px; white-space: nowrap; }
.email-item-l2 { display: flex; gap: 6px; align-items: center; font-size: 13.5px; overflow: hidden; }
.email-item-l2 > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.email-item-l2 .ico { width: 14px; height: 14px; flex: none; opacity: .6; }
.email-leitura { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; min-width: 0; min-height: 200px; }
.email-leitura:empty { display: flex; align-items: center; justify-content: center; color: var(--muted); }
.email-leitura:empty::before { content: 'Escolha um e-mail na lista.'; }
.email-acoes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.email-cab h2 { margin: 0 0 4px; font-size: 18px; }
.email-cab .sub { display: block; }
.email-corpo { margin-top: 12px; overflow-wrap: anywhere; overflow-x: auto; }
.email-frame { width: 100%; border: 0; min-height: 120px; background: #fff; border-radius: 8px; }
.email-texto { white-space: pre-wrap; font: inherit; margin: 0; }
.email-anexos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.email-anexos .chip { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.email-anexos .chip .ico { width: 14px; height: 14px; }
.email-anexo-chip { background: var(--surface-2); border: 1px solid var(--line); color: var(--text); font-weight: 600; padding: 6px 6px 6px 10px; }
.email-anexo-chip small { color: var(--muted); font-weight: 400; margin-left: 4px; }
.email-anexo-chip .icon-btn { color: var(--muted); font-size: 16px; padding: 0 6px; }
.email-anexo-chip .icon-btn:hover { color: var(--danger); }
.email-assinar { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin: 4px 0; cursor: pointer; }
.email-selo-ok { border-radius: 10px; margin: 0 0 10px; padding: 8px 14px; font-size: 13px; background: #e6f6ee; color: #0b5e3a; font-weight: 600; }
.email-selo-ext { border-radius: 10px; margin: 0 0 10px; padding: 8px 14px; font-size: 12.5px; background: var(--surface-2); color: var(--muted); }
.email-uso { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); margin: -4px 0 10px; }
.email-barra { display: inline-block; width: 160px; height: 8px; background: var(--line); border-radius: 6px; overflow: hidden; }
.email-barra-fill { display: block; height: 100%; background: var(--accent); }
.email-barra-fill.cheia { background: var(--danger); }
.email-editor { display: grid; gap: 8px; }
.email-editor textarea { width: 100%; box-sizing: border-box; font: inherit; }
.email-editor input { width: 100%; box-sizing: border-box; }
@media (max-width: 880px) {
  .email-wrap { grid-template-columns: 1fr; }
  .email-lista { max-height: 50vh; }
  .email-leitura:empty { display: none; }
}

/* ---- Drive no Hub (public/drive.js) ---- */
.drive-topo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.drive-abas { display: flex; gap: 6px; flex-wrap: wrap; }
.drive-uso { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.linkbtn { background: none; border: 0; padding: 2px 4px; margin: 0; cursor: pointer; color: var(--accent); font: inherit; border-radius: 6px; }
.linkbtn:hover { background: var(--surface-2); }
.drive-item .linkbtn { color: inherit; }
.drive-caminho { font-size: 14px; margin: 4px 0 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.drive-lista { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.drive-nav.soltando .drive-lista { outline: 2px dashed var(--accent); outline-offset: 2px; }
.drive-item { display: grid; grid-template-columns: 1fr 90px 140px auto; gap: 10px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.drive-item:last-child { border-bottom: 0; }
.drive-item:hover { background: var(--surface-2); }
.drive-nome { text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: inherit; color: inherit; }
.drive-item.pasta .drive-nome { font-weight: 600; }
.drive-tam, .drive-data { font-size: 12.5px; white-space: nowrap; }
.drive-acoes { display: flex; gap: 6px; justify-content: flex-end; }
.email-anexo { display: inline-flex; align-items: center; gap: 4px; }
@media (max-width: 700px) {
  .drive-item { grid-template-columns: 1fr auto; }
  .drive-tam, .drive-data { display: none; }
}

/* ---- Tron: a Grade. Preto absoluto, neon ciano (programas) e laranja (o lado de lá), grade em perspectiva, varredura,
   títulos em Orbitron e números em Share Tech Mono. Motos de luz, abertura e sons ficam em tron.js. ---- */
@font-face { font-family: 'Orbitron'; font-style: normal; font-weight: 500; font-display: swap; src: url('fontes/orbitron-500.woff2') format('woff2'); }
@font-face { font-family: 'Orbitron'; font-style: normal; font-weight: 700; font-display: swap; src: url('fontes/orbitron-700.woff2') format('woff2'); }
@font-face { font-family: 'Orbitron'; font-style: normal; font-weight: 900; font-display: swap; src: url('fontes/orbitron-900.woff2') format('woff2'); }
@font-face { font-family: 'Share Tech Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('fontes/share-tech-mono.woff2') format('woff2'); }
:root[data-estilo="tron"] {
  --bg: #02060a; --surface: #061018; --surface-2: #0a1a24; --ink: #d9f7ff; --muted: #6fa6b8; --line: #0f3a4a;
  --accent: #00eaff; --accent-ink: #02141a; --accent-soft: #072c38; --radius: 4px;
  --danger: #ff8a1f; --danger-soft: #2a1606; --ok: #39ffb4;
  --shadow: 0 0 0 1px rgba(0, 234, 255, .12), 0 0 18px rgba(0, 234, 255, .08);
  --tron-ciano: #00eaff; --tron-laranja: #ff8a1f; --tron-titulo: 'Orbitron', system-ui, sans-serif; --tron-mono: 'Share Tech Mono', ui-monospace, Consolas, monospace;
  --s-orcamento: #9ec9d6; --s-orcamento-bg: #0b2430; --s-aberta: #00eaff; --s-aberta-bg: #063442; --s-em_andamento: #ffc24d; --s-em_andamento-bg: #2b2208;
  --s-aguardando: #c084fc; --s-aguardando-bg: #221238; --s-concluida: #39ffb4; --s-concluida-bg: #063a2a; --s-cancelada: #ff8a1f; --s-cancelada-bg: #2a1606;
}
:root[data-estilo="tron"] body {
  background:
    radial-gradient(900px 500px at 50% 120%, rgba(0, 234, 255, .18), transparent 65%),
    linear-gradient(180deg, #02060a 0%, #030a10 100%) fixed;
}
/* a grade em perspectiva, fixa no pé da tela */
:root[data-estilo="tron"] body::before {
  content: ""; position: fixed; left: -30%; right: -30%; bottom: 0; height: 52vh; z-index: 0; pointer-events: none;
  background-image: linear-gradient(rgba(0, 234, 255, .38) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 234, 255, .38) 1px, transparent 1px);
  background-size: 56px 56px; transform: perspective(420px) rotateX(60deg); transform-origin: 50% 100%; opacity: .9;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 45%); mask-image: linear-gradient(180deg, transparent, #000 45%);
  border-top: 1px solid rgba(0, 234, 255, .55); box-shadow: 0 -2px 16px rgba(0, 234, 255, .35);
  animation: tronGrade 6s linear infinite;
}
@keyframes tronGrade { from { background-position: 0 0, 0 0; } to { background-position: 0 56px, 0 0; } }
/* varredura de monitor antigo, bem sutil */
:root[data-estilo="tron"] body::after {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .35;
  background: repeating-linear-gradient(180deg, transparent 0 3px, rgba(0, 0, 0, .22) 3px 4px);
}
:root[data-estilo="tron"] .shell, :root[data-estilo="tron"] .login-wrap, :root[data-estilo="tron"] .estacao-shell { position: relative; z-index: 1; }
:root[data-estilo="tron"] h1, :root[data-estilo="tron"] h2, :root[data-estilo="tron"] h3, :root[data-estilo="tron"] .brand, :root[data-estilo="tron"] .nav .grp, :root[data-estilo="tron"] th, :root[data-estilo="tron"] .modal > header h2 {
  font-family: var(--tron-titulo); letter-spacing: .06em; text-transform: uppercase; font-weight: 700;
}
:root[data-estilo="tron"] h1 { font-size: 19px; }
:root[data-estilo="tron"] .page-head h1 { color: var(--tron-ciano); text-shadow: 0 0 8px rgba(0, 234, 255, .55), 0 0 22px rgba(0, 234, 255, .25); }
:root[data-estilo="tron"] .page-head h1::before { content: '// '; color: var(--tron-laranja); text-shadow: 0 0 10px rgba(255, 138, 31, .6); }
:root[data-estilo="tron"] .num, :root[data-estilo="tron"] .side-ver, :root[data-estilo="tron"] .login-ver, :root[data-estilo="tron"] code, :root[data-estilo="tron"] .papel-sim { font-family: var(--tron-mono); font-size: 1.04em; }
:root[data-estilo="tron"] .side { background: linear-gradient(180deg, #030b11, #02060a); border-right: 1px solid var(--line); box-shadow: inset -1px 0 0 rgba(0, 234, 255, .18), 4px 0 24px rgba(0, 234, 255, .06); }
:root[data-estilo="tron"] .side .brand { color: var(--tron-ciano); text-shadow: 0 0 10px rgba(0, 234, 255, .6); }
:root[data-estilo="tron"] .brand-mark { background: transparent; border: 2px solid var(--tron-ciano); color: var(--tron-ciano); box-shadow: 0 0 10px rgba(0, 234, 255, .6), inset 0 0 8px rgba(0, 234, 255, .3); }
:root[data-estilo="tron"] .logo { filter: brightness(0) invert(.92) sepia(1) saturate(6) hue-rotate(150deg) drop-shadow(0 0 6px rgba(0, 234, 255, .7)); }
:root[data-estilo="tron"] .nav a { border-radius: 2px; border-left: 2px solid transparent; transition: box-shadow .15s, border-color .15s; }
:root[data-estilo="tron"] .nav a:hover { background: rgba(0, 234, 255, .08); border-left-color: var(--tron-ciano); }
:root[data-estilo="tron"] .nav a.on { background: rgba(0, 234, 255, .12); color: var(--tron-ciano); border-left-color: var(--tron-ciano); box-shadow: 0 0 14px rgba(0, 234, 255, .25), inset 0 0 12px rgba(0, 234, 255, .08); text-shadow: 0 0 6px rgba(0, 234, 255, .5); }
:root[data-estilo="tron"] .nav button.grp { border-radius: 2px; background: transparent; border-color: var(--line); font-family: var(--tron-titulo); font-size: 10.5px; letter-spacing: .1em; }
:root[data-estilo="tron"] .nav .grp-items { border-left-color: rgba(0, 234, 255, .35); }
:root[data-estilo="tron"] .card, :root[data-estilo="tron"] .cfg-grupo-tit, :root[data-estilo="tron"] .login-card, :root[data-estilo="tron"] .cfg-busca-res, :root[data-estilo="tron"] .menu-pop {
  border-radius: 4px; border: 1px solid rgba(0, 234, 255, .32); background: linear-gradient(180deg, rgba(6, 16, 24, .96), rgba(3, 10, 16, .96));
  box-shadow: 0 0 0 1px rgba(0, 234, 255, .06), 0 0 24px rgba(0, 234, 255, .08), inset 0 0 40px rgba(0, 234, 255, .03);
}
/* cantos "cortados" com marcas de alvo nos cartões */
:root[data-estilo="tron"] .card { position: relative; }
:root[data-estilo="tron"] .card::before, :root[data-estilo="tron"] .card::after { content: ""; position: absolute; width: 10px; height: 10px; border: 2px solid var(--tron-ciano); pointer-events: none; opacity: .9; }
:root[data-estilo="tron"] .card::before { top: -2px; left: -2px; border-right: 0; border-bottom: 0; }
:root[data-estilo="tron"] .card::after { bottom: -2px; right: -2px; border-left: 0; border-top: 0; }
:root[data-estilo="tron"] .btn { border-radius: 2px; border: 1px solid rgba(0, 234, 255, .45); background: rgba(0, 234, 255, .05); color: var(--ink); text-transform: uppercase; letter-spacing: .05em; font-size: 12.5px; font-family: var(--tron-titulo); font-weight: 500; transition: box-shadow .15s, background .15s; }
:root[data-estilo="tron"] .btn:hover { background: rgba(0, 234, 255, .14); box-shadow: 0 0 14px rgba(0, 234, 255, .35); }
:root[data-estilo="tron"] .btn.primary { background: var(--tron-ciano); color: #02141a; border-color: var(--tron-ciano); box-shadow: 0 0 16px rgba(0, 234, 255, .55), inset 0 0 10px rgba(255, 255, 255, .25); font-weight: 700; }
:root[data-estilo="tron"] .btn.primary:hover { filter: brightness(1.1); box-shadow: 0 0 26px rgba(0, 234, 255, .8); }
:root[data-estilo="tron"] .btn.danger { color: var(--tron-laranja); border-color: rgba(255, 138, 31, .6); background: rgba(255, 138, 31, .06); }
:root[data-estilo="tron"] .btn.danger:hover { background: rgba(255, 138, 31, .16); box-shadow: 0 0 14px rgba(255, 138, 31, .4); }
:root[data-estilo="tron"] .btn.ghost { border-color: transparent; background: transparent; }
:root[data-estilo="tron"] .btn.small, :root[data-estilo="tron"] .side-foot .btn, :root[data-estilo="tron"] .side-foot select { font-family: var(--font); text-transform: none; letter-spacing: 0; font-size: 13px; }
:root[data-estilo="tron"] .side-foot select { border-radius: 2px; border-color: rgba(0, 234, 255, .35); background: #030a10; }
:root[data-estilo="tron"] .chip { border-radius: 2px; border-color: rgba(0, 234, 255, .35); background: transparent; color: var(--muted); font-family: var(--tron-titulo); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; }
:root[data-estilo="tron"] .chip.on { background: rgba(0, 234, 255, .14); border-color: var(--tron-ciano); color: var(--tron-ciano); box-shadow: 0 0 10px rgba(0, 234, 255, .35); }
:root[data-estilo="tron"] input[type=text], :root[data-estilo="tron"] input[type=email], :root[data-estilo="tron"] input[type=tel], :root[data-estilo="tron"] input[type=number], :root[data-estilo="tron"] input[type=date],
:root[data-estilo="tron"] input[type=password], :root[data-estilo="tron"] input[type=search], :root[data-estilo="tron"] select, :root[data-estilo="tron"] textarea {
  background: #030a10; border: 1px solid rgba(0, 234, 255, .3); border-radius: 2px; color: var(--ink); caret-color: var(--tron-ciano);
}
:root[data-estilo="tron"] input:focus, :root[data-estilo="tron"] select:focus, :root[data-estilo="tron"] textarea:focus { outline: none; border-color: var(--tron-ciano); box-shadow: 0 0 0 1px var(--tron-ciano), 0 0 14px rgba(0, 234, 255, .35); }
:root[data-estilo="tron"] th { color: var(--tron-ciano); font-size: 10.5px; letter-spacing: .1em; border-bottom: 1px solid rgba(0, 234, 255, .35); text-shadow: 0 0 6px rgba(0, 234, 255, .35); }
:root[data-estilo="tron"] td { border-bottom: 1px solid rgba(0, 234, 255, .08); }
:root[data-estilo="tron"] tbody tr:hover td { background: rgba(0, 234, 255, .05); }
:root[data-estilo="tron"] .badge { border-radius: 2px; font-family: var(--tron-mono); text-transform: uppercase; letter-spacing: .06em; border: 1px solid currentColor; background: transparent; }
:root[data-estilo="tron"] .modal-bg { background: rgba(0, 6, 10, .8); backdrop-filter: blur(2px); }
:root[data-estilo="tron"] .modal { border-radius: 4px; border: 1px solid var(--tron-ciano); box-shadow: 0 0 0 1px rgba(0, 234, 255, .2), 0 0 40px rgba(0, 234, 255, .35); animation: tronAbre .22s ease-out; }
@keyframes tronAbre { from { transform: scaleY(.02); opacity: 0; } 60% { transform: scaleY(1.02); opacity: 1; } to { transform: scaleY(1); } }
:root[data-estilo="tron"] .modal > header { border-bottom: 1px solid rgba(0, 234, 255, .35); background: linear-gradient(90deg, rgba(0, 234, 255, .12), transparent); }
:root[data-estilo="tron"] .modal > header h2 { color: var(--tron-ciano); font-size: 14px; }
:root[data-estilo="tron"] .modal > footer { background: #030a10; border-top: 1px solid rgba(0, 234, 255, .25); border-radius: 0; }
:root[data-estilo="tron"] .toast { background: #030a10; color: var(--tron-ciano); border: 1px solid var(--tron-ciano); border-radius: 2px; box-shadow: 0 0 20px rgba(0, 234, 255, .45); font-family: var(--tron-mono); }
:root[data-estilo="tron"] .toast::before { content: '> '; }
:root[data-estilo="tron"] .toast.err { color: var(--tron-laranja); border-color: var(--tron-laranja); box-shadow: 0 0 20px rgba(255, 138, 31, .5); }
:root[data-estilo="tron"] .err { color: var(--tron-laranja); }
:root[data-estilo="tron"] a { color: var(--tron-ciano); }
:root[data-estilo="tron"] ::selection { background: rgba(0, 234, 255, .35); color: #fff; }
:root[data-estilo="tron"] ::-webkit-scrollbar { width: 10px; height: 10px; }
:root[data-estilo="tron"] ::-webkit-scrollbar-track { background: #02060a; }
:root[data-estilo="tron"] ::-webkit-scrollbar-thumb { background: rgba(0, 234, 255, .3); border: 2px solid #02060a; border-radius: 0; }
:root[data-estilo="tron"] ::-webkit-scrollbar-thumb:hover { background: rgba(0, 234, 255, .6); }
:root[data-estilo="tron"] .login-card { border-color: var(--tron-ciano); box-shadow: 0 0 0 1px rgba(0, 234, 255, .2), 0 0 60px rgba(0, 234, 255, .25); }
:root[data-estilo="tron"] .login-card h1 { color: var(--tron-ciano); text-shadow: 0 0 10px rgba(0, 234, 255, .6); }
:root[data-estilo="tron"] .side-foot { border-top-color: rgba(0, 234, 255, .25); }
:root[data-estilo="tron"] .topbar { background: #030b11; border-bottom: 1px solid rgba(0, 234, 255, .35); box-shadow: 0 0 18px rgba(0, 234, 255, .15); }
:root[data-estilo="tron"] .tema-amostra { border-color: var(--tron-ciano); }
/* PDV: total da venda em neon grande */
:root[data-estilo="tron"] .pdv-total, :root[data-estilo="tron"] .pdv-tot-v { font-family: var(--tron-mono); color: var(--tron-ciano); text-shadow: 0 0 12px rgba(0, 234, 255, .6); }
/* motos de luz (tron.js): rastros que cruzam a tela */
.tron-moto { position: fixed; z-index: 0; pointer-events: none; height: 2px; width: 0; background: linear-gradient(90deg, transparent, var(--moto-cor, #00eaff)); box-shadow: 0 0 6px var(--moto-cor, #00eaff), 0 0 14px var(--moto-cor, #00eaff); transform-origin: left center; opacity: 0; }
.tron-moto.v { height: 0; width: 2px; background: linear-gradient(180deg, transparent, var(--moto-cor, #00eaff)); transform-origin: center top; }
/* abertura de terminal (tron.js) */
#tron-boot { position: fixed; inset: 0; z-index: 9999; background: #02060a; color: #00eaff; font-family: 'Share Tech Mono', ui-monospace, Consolas, monospace; font-size: clamp(12px, 1.6vw, 15px); padding: 6vh 6vw; cursor: pointer; overflow: hidden; }
#tron-boot::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(180deg, transparent 0 3px, rgba(0, 0, 0, .25) 3px 4px); pointer-events: none; }
#tron-boot pre { margin: 0; white-space: pre-wrap; text-shadow: 0 0 6px rgba(0, 234, 255, .5); line-height: 1.55; }
#tron-boot .tron-cursor { display: inline-block; width: .6em; height: 1.1em; background: #00eaff; vertical-align: -0.15em; animation: tronPisca .7s steps(1) infinite; box-shadow: 0 0 8px #00eaff; }
@keyframes tronPisca { 50% { opacity: 0; } }
#tron-boot .tron-titulo { font-family: 'Orbitron', system-ui, sans-serif; font-weight: 900; font-size: clamp(26px, 6vw, 64px); letter-spacing: .18em; color: #fff; text-shadow: 0 0 10px #00eaff, 0 0 30px #00eaff, 0 0 60px rgba(0, 234, 255, .6); margin: 3vh 0 1vh; opacity: 0; animation: tronTitulo .8s ease-out .2s forwards; }
@keyframes tronTitulo { from { opacity: 0; letter-spacing: .6em; filter: blur(6px); } to { opacity: 1; letter-spacing: .18em; filter: blur(0); } }
#tron-boot .tron-sub { color: #ff8a1f; text-shadow: 0 0 8px rgba(255, 138, 31, .7); letter-spacing: .3em; font-size: .9em; }
#tron-boot .tron-pular { position: absolute; right: 4vw; bottom: 4vh; color: #6fa6b8; font-size: .85em; letter-spacing: .1em; }
#tron-boot.sai { animation: tronSai .5s ease-in forwards; }
@keyframes tronSai { to { opacity: 0; transform: scaleY(.01); } }
@media (prefers-reduced-motion: reduce) { :root[data-estilo="tron"] body::before { animation: none; } .tron-moto { display: none; } }

/* prévias dos temas no cartão Aparência */
.tema-amostra { display: inline-block; width: 26px; height: 18px; border-radius: 4px; border: 1px solid rgba(0, 0, 0, .25); vertical-align: middle; margin-right: 6px; }

/* Entrar com Google / Facebook */
.login-social { display: grid; gap: 8px; margin-top: 16px; }
.login-social .ou { margin-bottom: 2px; }
.login-social .btn-social { width: 100%; justify-content: center; gap: 10px; padding: 9px; background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; }
.logo-social { width: 18px; height: 18px; flex: none; vertical-align: middle; }

.side-instalar { width: 100%; margin-top: 8px; justify-content: center; }
.btn-instalar[hidden] { display: none !important; }
.login-instalar { display: block; margin: 10px auto 0; }
.est-tile.click { cursor: pointer; } .est-tile.click:hover { border-color: var(--accent, #08805c); }

/* Anúncio próprio da Ok Computer: login e Início (responsável). HTML do Hub, sem script de terceiros. */
.anuncio-hub { --ah: #12a06a; display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--ah); border-radius: var(--radius); padding: 12px 16px; color: var(--ink); text-decoration: none; box-shadow: var(--shadow); margin-top: 16px; }
.anuncio-hub:hover { border-color: var(--ah); text-decoration: none; }
.anuncio-hub.cor-azul { --ah: #2563eb; } .anuncio-hub.cor-laranja { --ah: #ea7a12; } .anuncio-hub.cor-roxo { --ah: #7c3aed; } .anuncio-hub.cor-escuro { --ah: #475467; }
.anuncio-hub .ah-ico { font-size: 26px; line-height: 1; flex: none; }
.anuncio-hub .ah-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.anuncio-hub .ah-txt small { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.anuncio-hub .ah-txt b { font-size: 14.5px; }
.anuncio-hub .ah-txt span { color: var(--muted); font-size: 13px; line-height: 1.4; }
.anuncio-hub .ah-bt { flex: none; font-weight: 600; font-size: 13.5px; color: var(--ah); white-space: nowrap; }
.anuncio-hub .ah-x { flex: none; background: none; border: 0; color: var(--muted); font-size: 18px; cursor: pointer; padding: 2px 4px; align-self: flex-start; }
.login-anuncio { width: 100%; max-width: 420px; margin: 0 auto; }
.login-anuncio .anuncio-hub { margin-top: 14px; }
@media (max-width: 640px) { .anuncio-hub { flex-wrap: wrap; } .anuncio-hub .ah-bt { width: 100%; padding-left: 40px; } }

/* Fila de etiquetas */
.etq-fila-busca { position: relative; margin-bottom: 12px; }
.etq-fila-busca input { width: 100%; }
.etq-fila-res { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.etq-fila-res:empty { display: none; }
.etq-fila-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font: inherit; color: var(--ink); cursor: pointer; }
.etq-fila-item:hover { border-color: var(--accent); }
.etq-fila-item .sub { display: block; }

/* ---- chat interno (v1.162.0) ---- */
.chat-fab{position:fixed;right:18px;bottom:18px;z-index:60;width:56px;height:56px;border-radius:50%;border:0;background:#0a7a4f;color:#fff;font-size:24px;cursor:pointer;box-shadow:0 8px 24px rgba(0,0,0,.28)}
.chat-fab .chat-badge{position:absolute;top:-4px;right:-4px;background:#e33;color:#fff;border-radius:999px;font:700 11px/1 Inter,sans-serif;padding:4px 6px}
.chat-panel{position:fixed;right:18px;bottom:84px;z-index:61;width:380px;height:520px;max-height:calc(100vh - 110px);background:var(--surface,#fff);color:var(--ink,#111);border:1px solid var(--line,#ddd);border-radius:14px;box-shadow:0 18px 50px rgba(0,0,0,.3);display:flex;flex-direction:column;overflow:hidden}
.chat-panel.chat-max{left:18px;top:18px;right:18px;bottom:18px;width:auto;height:auto;max-height:none}
.chat-head{display:flex;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid var(--line,#ddd)}
.chat-head .sp{flex:1}
.chat-corpo{display:flex;flex:1;min-height:0}
.chat-canais{width:130px;border-right:1px solid var(--line,#ddd);overflow:auto;padding:6px}
.chat-canais button{display:block;width:100%;text-align:left;border:0;background:transparent;color:inherit;padding:8px;border-radius:8px;cursor:pointer;font:inherit;font-size:13px}
.chat-canais button.on{background:rgba(10,122,79,.14);font-weight:700}
.chat-canais button .n{float:right;background:#e33;color:#fff;border-radius:999px;font-size:10px;padding:2px 5px}
.chat-thread{flex:1;display:flex;flex-direction:column;min-width:0}
.chat-msgs{flex:1;overflow:auto;padding:10px;display:flex;flex-direction:column;gap:8px}
.chat-msg{max-width:85%;background:rgba(0,0,0,.05);border-radius:10px;padding:7px 10px;font-size:13px;line-height:1.4;white-space:pre-wrap;overflow-wrap:anywhere}
.chat-msg.eu{align-self:flex-end;background:rgba(10,122,79,.16)}
.chat-msg .quem{display:block;font-size:11px;opacity:.65;margin-bottom:2px}
.chat-msg a{color:#0a7a4f}
.chat-form{display:flex;gap:6px;padding:8px;border-top:1px solid var(--line,#ddd)}
.chat-form input{flex:1;min-width:0;border:1px solid var(--line,#ddd);border-radius:8px;padding:8px 10px;font:inherit;background:var(--bg,#fff);color:inherit}
.chat-vazio{padding:16px;color:#777;font-size:13px}

.chat-nova{display:flex;gap:6px;padding:6px 4px;border-top:1px solid var(--line,#ddd);margin-top:6px;flex-wrap:wrap}
.chat-nova select{flex:1;min-width:0;border:1px solid var(--line,#ddd);border-radius:6px;padding:5px;font:inherit;font-size:12px;background:var(--bg,#fff);color:inherit}

.chat-file{max-width:110px;font-size:11px}
.chat-img{max-width:180px;max-height:140px;border-radius:8px;display:block;margin-top:6px}
.chat-arq{display:inline-block;margin-top:6px;text-decoration:underline}

.chat-aud{max-width:240px;width:100%;margin-top:6px;display:block}

/* cores fixas do chat: legível em qualquer tema */
.chat-panel{background:#fff;color:#111;border-color:#d9d9d9}
.chat-head{border-color:#e3e3e3}
.chat-head b{color:#111}
.chat-canais{border-color:#e3e3e3}
.chat-canais button{color:#111}
.chat-canais button.on{background:#e3f4ec;color:#0a7a4f;font-weight:700}
.chat-canais button .n{background:#d92d20;color:#fff}
.chat-msgs{background:#fff}
.chat-msg{background:#f1f3f5;color:#111}
.chat-msg.eu{background:#dcf3e8;color:#111}
.chat-msg .quem{color:#5b6470}
.chat-form{border-color:#e3e3e3;background:#fff}
.chat-form input{background:#fff;color:#111;border-color:#cfd4da}
.chat-form input::placeholder{color:#7a828c}
.chat-vazio{color:#5b6470}
.chat-busca{background:#fff;color:#111;border-color:#cfd4da}
.chat-nova{border-color:#e3e3e3}
.chat-nova select{background:#fff;color:#111;border-color:#cfd4da}
.chat-clip{min-width:42px;font-size:16px;line-height:1;padding:6px 8px}
.chat-file-oculto{display:none}

@media (max-width: 768px) {
  .chat-fab { bottom: 78px; right: 14px; width: 52px; height: 52px; }
  .chat-panel { right: 10px; left: 10px; width: auto; bottom: 138px; height: 62vh; max-height: none; }
  .chat-panel.chat-max { left: 8px; right: 8px; top: 8px; bottom: 8px; }
}

.senha-wrap{position:relative;display:block}
.senha-wrap input{padding-right:46px}
.senha-olho{position:absolute;right:6px;top:50%;transform:translateY(-50%);border:0;background:transparent;cursor:pointer;font-size:18px;line-height:1;padding:6px;color:inherit}

.crm-board{display:flex;gap:10px;overflow-x:auto;padding-bottom:12px;align-items:flex-start}
.crm-col{min-width:240px;flex:1;background:var(--surface-2,rgba(0,0,0,.04));border:1px solid var(--line,#ddd);border-radius:12px;padding:8px}
.crm-col-head{display:flex;align-items:center;gap:6px;padding:4px 4px 8px}
.crm-col-head .dot{width:10px;height:10px;border-radius:50%;display:inline-block}
/* --surface/--ink: as cores de cada tema (o antigo --card não existe no sistema e deixava o cartão branco no tema escuro) */
.crm-card{background:var(--surface,#fff);color:var(--ink,#111);border:1px solid var(--line,#ddd);border-radius:10px;padding:8px;margin-bottom:8px}

.ag-sem,.ag-grade{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}
.ag-w{font-size:12px;color:#6b7280;text-align:center;padding:4px 0}
.ag-grade{margin-top:4px}
.ag-dia{min-height:86px;border:1px solid var(--line,#e3e3e3);border-radius:8px;padding:4px;background:var(--surface,#fff);cursor:pointer;overflow:hidden}
.ag-dia.vazio{border:0;background:transparent;cursor:default}
.ag-dia.hoje{outline:2px solid #0a7a4f}
.ag-num{font-size:12px;color:#6b7280}
.ag-evt{font-size:11px;border-left:3px solid #0a7a4f;padding:1px 4px;margin-top:2px;background:rgba(0,0,0,.04);border-radius:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.ag-linha{display:flex;gap:10px;align-items:center;padding:8px 4px;border-bottom:1px solid var(--line,#e5e5e5)}
.ag-linha b{min-width:110px}
.ag-linha.hoje{background:rgba(10,122,79,.08);border-radius:8px}

.qd-grade{display:grid;grid-template-columns:64px repeat(auto-fit,minmax(110px,1fr));gap:4px;margin-top:8px}
.qd-h{font-weight:700;font-size:13px;padding:6px;text-align:center;border-bottom:1px solid var(--line,#e3e3e3)}
.qd-hora{font-size:12px;color:#6b7280;text-align:right;padding:6px 8px 0 0}
.qd-cel{min-height:42px;border:1px solid var(--line,#e3e3e3);border-radius:8px;padding:4px 6px;font:inherit;font-size:12px;background:var(--surface,#fff);color:inherit;text-align:left;cursor:pointer;display:flex;flex-direction:column;gap:2px;overflow:hidden}
.qd-cel.livre{color:#0a7a4f;border-style:dashed;background:transparent}
.qd-cel.livre:hover{background:rgba(10,122,79,.08)}
.qd-cel.ocup{background:rgba(10,122,79,.12);border-color:rgba(10,122,79,.4);cursor:default}
.qd-cel b{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}

.qd-cel.bloq{background:rgba(180,83,9,.12);border-color:rgba(180,83,9,.45);color:#b45309;cursor:default}

/* ---------- Janelas menores e celular (v1.241.0) ---------- */
/* A coluna do conteúdo nunca se alarga pelo que tem dentro: quem é largo rola no próprio cartão. */
.shell { grid-template-columns: 240px minmax(0, 1fr); }
/* O texto para leitor de tela (.sr) é absoluto: sem isto ele "escapa" da tabela rolável e alarga a página em 1-2 px
   (aparecia uma segunda barra de rolagem horizontal embaixo da janela). */
.table-wrap { position: relative; }
.os-lista > .table-wrap { flex: 1 1 auto; min-width: 0; }
/* Menu lateral: barra de rolagem fina, que só aparece com o mouse em cima (não compete com a da página). */
.side { scrollbar-width: thin; scrollbar-color: transparent transparent; }
.side:hover, .side:focus-within { scrollbar-color: color-mix(in srgb, var(--muted) 45%, transparent) transparent; }
.side::-webkit-scrollbar { width: 8px; }
.side::-webkit-scrollbar-thumb { background: transparent; border-radius: 8px; }
.side:hover::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--muted) 45%, transparent); }

/* Janela estreita (notebook pequeno, janela dividida): menu um pouco mais estreito e menos margem. */
@media (min-width: 881px) and (max-width: 1180px) {
  .shell { grid-template-columns: 222px minmax(0, 1fr); }
  .side { padding: 16px 10px; }
  .nav a { padding: 7px 8px; gap: 9px; font-size: 13.5px; white-space: nowrap; }
  .side .logo { height: 72px; margin-bottom: 12px; }
  .main { padding: 22px 20px 40px; }
  .page-head .search { width: 220px; }
  th, td { padding-left: 10px; padding-right: 10px; }
}
@media (max-width: 880px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
}
/* Listas com painel (pedidos, OS, contas): empilhadas, a tabela ocupa a largura e rola dentro do cartão. */
@media (max-width: 900px) {
  .os-lista { align-items: stretch; }
  .os-lista > .table-wrap { width: 100%; }
}
/* Celular: cada linha da lista vira um cartão (nº e ações em cima, cliente embaixo, situação/data/valor por último). */
@media (max-width: 640px) {
  .main { padding: 14px 10px 90px; }
  .page-head { gap: 8px; }
  .page-head h1 { font-size: 20px; flex-basis: 100%; }
  .os-lista table, .os-lista tbody { display: block; }
  .os-lista thead { display: block; border-bottom: 1px solid var(--line); }
  .os-lista thead tr { display: flex; align-items: center; padding: 8px 12px; }
  .os-lista thead th { display: none; border: 0; padding: 0; }
  .os-lista thead th.ck { display: block; }
  .os-lista thead th.ck::after { content: 'Selecionar todos'; margin-left: 10px; font-size: 12px; letter-spacing: .04em; vertical-align: middle; }
  .os-lista tbody tr { display: flex; flex-wrap: wrap; align-items: center; column-gap: 10px; row-gap: 4px; padding: 11px 12px; border-bottom: 1px solid var(--line); }
  .os-lista tbody tr:last-child { border-bottom: 0; }
  .os-lista tbody td { display: block; border: 0; padding: 0 !important; width: auto !important; min-width: 0 !important; text-align: left; }
  .os-lista tbody td.ck { order: 0; }
  .os-lista tbody td:nth-child(2) { order: 1; flex: 1 1 auto; }
  .os-lista tbody td:last-child { order: 2; }
  .os-lista tbody td:nth-child(3) { order: 3; flex: 1 1 100%; padding-left: 27px !important; }
  .os-lista tbody td:nth-child(n+4):not(:last-child) { order: 4; font-size: 13px; }
  .os-lista tbody td:nth-child(4) { padding-left: 27px !important; }
  .os-lista tbody td.num:not(:last-child) { margin-left: auto; font-weight: 650; }
  .os-lista tbody td.num:not(:last-child) ~ td.num:not(:last-child) { margin-left: 0; }
  .os-lista td .sub { white-space: normal; }
  .os-lista tbody td[colspan] { flex: 1 1 100%; padding: 6px 0 !important; text-align: center; }
  /* OS: o equipamento/assunto também ganha linha própria */
  .os-lista.lst-os tbody td:nth-child(4) { flex: 1 1 100%; }
}
/* Endereços e códigos longos quebram a linha em vez de alargar a página. */
.main code { overflow-wrap: anywhere; }
@media (max-width: 1100px) { .massa-cols { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Delivery: painel de pedidos (v1.242.0) ---------- */
.dl-hub-quadro { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; }
@media (max-width: 1180px) { .dl-hub-quadro { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .dl-hub-quadro { grid-template-columns: minmax(0, 1fr); } }
.dl-hub-col { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; display: grid; gap: 8px; }
.dl-hub-col h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); display: flex; align-items: center; justify-content: space-between; padding: 2px 4px; }
.dl-hub-n { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0 9px; font-size: 12px; color: var(--ink); }
.dl-hub-vazio { text-align: center; margin: 6px 0; }
.dl-hub-card { padding: 10px 12px; display: grid; gap: 4px; }
.dl-hub-card.novo { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.dl-hub-card.atrasado { border-left: 4px solid var(--danger); }
.dl-hub-c1 { display: flex; align-items: center; gap: 8px; }
.dl-hub-c1 .sub { margin-right: auto; }
.dl-hub-c1 .icon-btn { font-size: 16px; }
.dl-hub-nome { background: none; border: 0; padding: 0; text-align: left; font: inherit; font-weight: 650; color: var(--ink); cursor: pointer; }
.dl-hub-nome:hover { color: var(--accent); text-decoration: underline; }
.dl-hub-c2 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.s-badge.dl-pago { background: var(--accent-soft); color: var(--accent); }
.s-badge.dl-cobrar { background: color-mix(in srgb, #f5a524 18%, transparent); color: #b7791f; }
.dl-hub-av { justify-content: center; margin-top: 4px; }
.btn.dl-hub-on { border-color: var(--accent); color: var(--accent); }
.dl-hub-rodape { margin-top: 14px; }
.dl-hub-l { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.dl-hub-l > span:last-child { text-align: right; }
.dl-hub-l.inativo { opacity: .6; }
.dl-hub-cfg { display: grid; gap: 10px; }
.dl-hub-cfg3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 560px) { .dl-hub-cfg3 { grid-template-columns: 1fr; } }

/* ---------- Mesas e garçom (v1.243.0) ---------- */
.gc-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; margin-top: 12px; }
.gc-mesa-b { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 8px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); cursor: pointer; font: inherit; color: var(--ink); box-shadow: var(--shadow); min-height: 112px; justify-content: center; }
.gc-mesa-b:hover { border-color: var(--accent); }
.gc-mesa-b.ocupada { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.gc-num { font-size: 30px; font-weight: 800; line-height: 1.1; }
.gc-lug { font-size: 12px; color: var(--muted); }
.gc-lugares { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.gc-lugar { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; background: var(--surface); display: grid; gap: 6px; align-content: start; }
.gc-lugar.foco { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.gc-lugar.livre { border-style: dashed; background: transparent; cursor: pointer; font: inherit; color: var(--muted); min-height: 96px; align-content: center; justify-items: center; }
.gc-lugar.livre:hover { border-color: var(--accent); color: var(--accent); }
.gc-lugar-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.gc-lugar-n { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.gc-itens { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 13px; }
.gc-itens li { display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.gc-itens li > span:last-child { white-space: nowrap; display: inline-flex; align-items: center; }
.gc-itens .icon-btn { font-size: 16px; padding: 0 4px; }
.gc-lugar-tot { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 6px; }
.gc-lugar-acoes { display: flex; gap: 6px; flex-wrap: wrap; }
.gc-prods { display: grid; gap: 4px; max-height: 46vh; overflow-y: auto; margin: 10px 0; }
.gc-prod { display: flex; justify-content: space-between; gap: 10px; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font: inherit; color: var(--ink); cursor: pointer; }
.gc-prod:hover, .gc-prod.on { border-color: var(--accent); background: var(--accent-soft); }
.gc-escolhido { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.gc-escolhido input { flex: 1; min-width: 180px; }
.gc-qtd { display: inline-flex; align-items: center; gap: 8px; }
.gc-qtd b { min-width: 24px; text-align: center; font-size: 16px; }
.gc-video { width: 100%; border-radius: 10px; background: #000; aspect-ratio: 1; object-fit: cover; }
.gc-fechar { display: grid; gap: 10px; }
.gc-cfg3 { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }
.gc-cfg-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; max-height: 240px; overflow-y: auto; margin-bottom: 8px; }
.gc-cfg-it { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.gc-cfg-it span { min-width: 58px; font-weight: 600; }
.gc-cfg-it input { width: 64px; padding: 5px 6px; }
@media (max-width: 640px) {
  .gc-grade { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .gc-mesa-b { min-height: 96px; padding: 10px 4px; }
  .gc-num { font-size: 26px; }
  .gc-lugares { grid-template-columns: minmax(0, 1fr); }
  .gc-cfg3 { grid-template-columns: 1fr 1fr; }
  .gc-cfg3 .btn { grid-column: 1 / -1; justify-content: center; }
}

/* ---------- Cozinha (v1.244.0) ---------- */
.cz-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; align-items: start; margin-top: 10px; }
.cz-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; border-top: 5px solid var(--accent); }
.cz-card.delivery { border-top-color: #5b8def; }
.cz-card.alerta { border-top-color: #f5a524; }
.cz-card.atraso { border-top-color: var(--danger); box-shadow: 0 0 0 2px color-mix(in srgb, var(--danger) 30%, transparent); }
.cz-card > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 10px 12px 6px; }
.cz-tit { font-size: 19px; }
.cz-min { font-weight: 800; font-size: 15px; white-space: nowrap; background: var(--surface-2); border-radius: 999px; padding: 2px 10px; }
.cz-card.alerta .cz-min { background: color-mix(in srgb, #f5a524 22%, transparent); }
.cz-card.atraso .cz-min { background: var(--danger); color: #fff; }
.cz-novo { margin: 0 12px; justify-self: start; align-self: flex-start; background: color-mix(in srgb, #5b8def 20%, transparent); color: #5b8def; }
.cz-itens { list-style: none; margin: 4px 0; padding: 0 8px; display: grid; gap: 4px; }
.cz-it { display: block; width: 100%; text-align: left; font: inherit; font-size: 16px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
button.cz-it { cursor: pointer; }
button.cz-it:hover { border-color: var(--accent); background: var(--accent-soft); }
.cz-it em { display: block; font-style: normal; font-weight: 700; color: #b7791f; font-size: 14px; margin-top: 2px; }
.cz-obs { margin: 2px 12px 6px; font-weight: 650; color: #b7791f; }
.cz-card > footer { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--line); margin-top: auto; }
.cz-card > footer .sp { flex: 1; }
.cz-vazio { display: grid; gap: 4px; place-items: center; padding: 40px 10px; border: 1px dashed var(--line); border-radius: var(--radius); grid-column: 1 / -1; }
.cz-vazio b { font-size: 18px; }
.cz-imp { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.cz-imp:empty { display: none; }
.cz-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 2px 10px; }
.cz-cats .f.chk { padding-top: 4px; }
@media (max-width: 640px) { .cz-grade { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Mapa (public/mapa.js) e marcadores do rastreio (v1.245.0) ---------- */
.okmapa { position: relative; overflow: hidden; background: #dfe7e3; touch-action: none; user-select: none; cursor: grab; }
.okmapa:active { cursor: grabbing; }
.okmapa-tiles, .okmapa-marc { position: absolute; inset: 0; }
.okmapa-tiles img { position: absolute; width: 256px; height: 256px; max-width: none; pointer-events: none; }
.okmapa-linhas { position: absolute; left: 0; top: 0; pointer-events: none; }
.okmapa-m { position: absolute; transform: translate(-50%, -50%); pointer-events: auto; white-space: nowrap; }
.okmapa-m.dl-moto { z-index: 3; }
.okmapa-ctl { position: absolute; right: 10px; top: 10px; display: grid; gap: 4px; z-index: 5; }
.okmapa-ctl button { width: 34px; height: 34px; border-radius: 8px; border: 1px solid rgba(0, 0, 0, .2); background: #fff; color: #111; font: 700 18px/1 Arial, sans-serif; cursor: pointer; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.okmapa-ctl button[hidden] { display: none; }
.okmapa-attr { position: absolute; right: 0; bottom: 0; z-index: 5; background: rgba(255, 255, 255, .8); color: #333; font: 11px Arial, sans-serif; padding: 1px 6px; }
.okmapa-attr a { color: #0b5cad; }
.dl-pin { display: inline-flex; align-items: center; gap: 4px; font: 700 13px/1.1 Arial, sans-serif; color: #111; background: #fff; border-radius: 999px; padding: 4px 9px; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); border: 2px solid var(--cor, #10a676); }
.dl-pin small { font-size: 11px; font-weight: 700; color: var(--cor, #10a676); }
.dl-pin.moto { background: var(--cor, #10a676); color: #fff; font-size: 14px; border-color: #fff; animation: dlPin 2s ease-in-out infinite; }
.dl-pin.loja { border-color: #111; }
.dl-pin.destino { padding: 3px 7px; }
@keyframes dlPin { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--cor, #10a676) 30%, transparent), 0 2px 8px rgba(0, 0, 0, .35); } }
.dl-hub-mapa { height: 58vh; min-height: 320px; border-radius: 10px; }
.dl-hub-mapa-lista { margin-top: 10px; display: grid; gap: 4px; }
.dl-hub-rota { display: grid; gap: 2px; margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.dl-hub-rota .f.chk { padding-top: 4px; }
.dl-hub-pixemp { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; }
.pix-psp { display: grid; gap: 10px; }
.pix-psp[hidden] { display: none; }
.pix-psp textarea { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.dl-hub-sel { position: sticky; top: 8px; z-index: 6; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 12px; border: 1px solid var(--accent); border-radius: var(--radius); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); box-shadow: var(--shadow); }
.dl-hub-sel[hidden] { display: none; }
.dl-hub-ck { width: 17px; height: 17px; accent-color: var(--accent); flex: none; }
.dl-hub-c1 .os-mais { font-size: 20px; }
.tema-opts .btn.modo-off { opacity: .55; border-style: dashed; }
.gc-sabores { flex: 1 1 100%; display: grid; gap: 6px; }
.gc-sabores[hidden] { display: none; }
.gc-sab-lista { display: flex; flex-wrap: wrap; gap: 6px; }

/* Aviso "o sistema foi atualizado" (faixa no rodapé, não bloqueia a tela) */
.aviso-versao { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 9000; width: min(720px, calc(100% - 32px));
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--accent); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); font-size: 13.5px; }
.aviso-versao-txt { flex: 1 1 320px; line-height: 1.4; }
.aviso-versao-bts { display: flex; gap: 8px; flex: none; }
@media print { .aviso-versao { display: none; } }

/* Acessibilidade: contorno de foco ao navegar com o teclado (Tab). Só aparece no teclado, não no clique do mouse.
   :where() tem peso zero: as regras próprias de cada componente continuam valendo. */
:where(a, button, summary, [role="button"], [tabindex]:not([tabindex="-1"])):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Acessibilidade: quem pede "reduzir animações" no sistema operacional (enjoo, labirintite, concentração)
   não vê transições, pulsos nem rolagem suave. As telas continuam iguais; só param de se mexer. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
}
.cam-ajuda:empty { display: none; }
.cam-ajuda { margin: 0 0 8px; }
.cam-passos { margin: 0; padding-left: 20px; line-height: 1.6; }

/* ---------- Celular confortável (v1.260.0) ---------- */
/* Até 640 px: o que se toca com o dedo tem pelo menos 44 px de altura, e os campos usam letra de 16 px
   (com menos que isso o iPhone amplia a tela ao tocar no campo). Só muda no celular. */
@media (max-width: 640px) {
  .btn, .chip, .menu-it, .nav a, .nav button.grp, .icon-btn, .cfg-busca-item, .pdv-sug-item, .ncm-item, .pv-prod-it, .ip-desv { min-height: var(--toque); }
  .pp-it { min-height: var(--toque); justify-content: center; }
  .chip { display: inline-flex; align-items: center; }
  .nav button.grp { padding-top: 6px; padding-bottom: 6px; }
  .topbar .icon-btn, .modal > header .icon-btn, .os-mais { min-width: var(--toque); }
  input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], input[type=time], input[type=month], input[type=datetime-local],
  input[type=password], input[type=search], input:not([type]), select, textarea { font-size: var(--fs-4) !important; min-height: var(--toque); }
  input[type=checkbox], input[type=radio], th.ck input, td.ck input, th.sel-col input, td.sel-col input { width: 22px; height: 22px; }
  /* a data com letra de 16 px não cabe nas larguras fixas do computador */
  .fd input[type=date], .pv-datas input[type=date] { width: auto; min-width: 150px; flex: 1; }
  /* cartões das listas: o texto continua alinhado com o nº, agora que a caixa de seleção é maior */
  .os-lista tbody td:nth-child(3), .os-lista tbody td:nth-child(4) { padding-left: 32px !important; }
  /* itens da OS, do pedido e da nota: o campo não encolhe a ponto de cortar o número */
  .items td input:not([type=checkbox]), .items td select { min-width: 68px; }
  /* botões pequenos que moram dentro de outro componente continuam do tamanho dele */
  .foto-item .btn, .chave-linha .btn, .ref-chip .icon-btn, .pv-prod-sel .icon-btn, .pp-x { min-height: 0; }
}

/* ---------- Início em três faixas (v1.262.0): atalhos do dia, "Precisa de atenção" e os números ---------- */
a.card.stat { text-decoration: none; color: inherit; }
.home-head { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-2) var(--sp-3); }
.home-webloja { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }
.home-webloja-st { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: inherit; text-decoration: none; font-size: 13px; }
.home-webloja-st svg { width: 16px; height: 16px; }
.home-webloja-st b { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
.home-webloja-st .pt { width: 8px; height: 8px; border-radius: 50%; background: #9ca3af; display: inline-block; }
.home-webloja.on .home-webloja-st b { color: #15803d; } .home-webloja.on .pt { background: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, .18); }
.home-webloja.off .home-webloja-st b { color: #b91c1c; } .home-webloja.off .pt { background: #dc2626; }
.home-webloja-cp { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; }
.home-webloja-cp svg { width: 14px; height: 14px; }
.home-atalhos { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--sp-3); margin-bottom: var(--sp-4); }
.home-at { justify-content: center; min-height: 52px; padding: var(--sp-3) var(--sp-4); font-size: 15px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.home-at .ico { color: var(--accent); }
.home-at:hover { border-color: var(--accent); }
.home-atencao { margin-bottom: var(--sp-4); border-left: 4px solid var(--s-em_andamento); }
.home-atencao.ok { border-left-color: var(--ok); }
.home-atencao h3 { display: flex; align-items: center; gap: var(--sp-2); padding: 14px 18px 6px; font-size: 15px; }
.home-avs { list-style: none; margin: 0; padding: 0 18px 6px; }
.home-av { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2) 0; border-top: 1px solid var(--line); }
.home-av:first-child { border-top: 0; }
.home-av-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--s-aberta); }
.home-av.perigo .home-av-dot { background: var(--danger); }
.home-av.aviso .home-av-dot { background: var(--s-em_andamento); }
.home-av-txt { flex: 1; min-width: 0; }
.home-av-txt small { display: block; color: var(--muted); overflow-wrap: anywhere; }
.home-av .btn { flex: none; text-decoration: none; color: var(--ink); }
.home-ok { margin: 0; padding: 0 18px 14px; }
.fin-painel { margin-bottom: var(--sp-4); }
.fin-painel .stats { margin-bottom: 0; }
.home-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.home-cad { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-4); margin: -6px 0 var(--sp-4); font-size: var(--fs-2); }
.home-cad a { color: var(--ink); text-decoration: none; }
.home-cad a:hover { color: var(--accent); }
.home-cad b { font-variant-numeric: tabular-nums; }
@media (max-width: 1100px) { .home-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .home-atalhos, .home-stats, .home-ind { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
  .home-stats .stat, .home-ind .stat { padding: var(--sp-3); }
  .home-stats .stat b, .home-ind .stat b { font-size: 19px; overflow-wrap: anywhere; }
  .home-at { padding: var(--sp-2); font-size: var(--fs-3); }
  .home-ind .stat:last-child:nth-child(odd) { grid-column: 1 / -1; } /* o terceiro indicador não fica sozinho numa coluna */
  .home-cad a { min-height: 32px; display: inline-flex; align-items: center; gap: 4px; }
}

/* ---------- Cabeçalho padrão das listas (v1.266.0): uma ação principal, "Mais ações" e filtros recolhidos no celular ---------- */
.ph-acoes, .ph-filtros { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; }
.ph-curto { display: none; }
.ph-bfiltros:not(.ph-proprio) { display: none; }
.ph-pontos { font-weight: 700; letter-spacing: 1px; line-height: 1; }
.ph-n:not(:empty) { min-width: 20px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: var(--fs-1); text-align: center; }
@media (max-width: 640px) {
  /* 1ª linha: título e ações; 2ª: busca e "Filtros"; 3ª: os filtros (só quando abertos) */
  .page-head.ph { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "tit acoes" "busca bf" "filtros filtros"; gap: var(--sp-2); align-items: center; margin-bottom: var(--sp-3); }
  .page-head.ph h1 { grid-area: tit; margin: 0; overflow-wrap: anywhere; }
  .page-head.ph .ph-acoes { grid-area: acoes; flex-wrap: nowrap; justify-content: flex-end; }
  .page-head.ph .search { grid-area: busca; width: 100%; }
  .page-head.ph.ph-semfiltro .search { grid-column: 1 / -1; }
  .page-head.ph .ph-bfiltros { grid-area: bf; display: inline-flex; gap: 6px; }
  .page-head.ph .ph-filtros { grid-area: filtros; }
  .page-head.ph .ph-filtros .fd-rot { margin-right: 0; } /* o rótulo ("Vencimento") fica na mesma linha do filtro */
  .page-head.ph .ph-filtros .fd-rot + .fd { width: auto; flex: 1; min-width: 0; }
  .ph-recolhe { display: none !important; }
  .ph-recolhe.ph-aberto { display: flex !important; }
  .ph-longo { display: none; }
  .ph-curto { display: inline; }
  .ph-mais { min-width: var(--toque); justify-content: center; padding-left: 10px; padding-right: 10px; font-size: 20px; }
  .ph-acoes .ph-extra { display: none; } /* no celular o botão extra vira item do menu ⋯ */
}

/* ---------- Tabelas que viram cartões no celular (v1.268.0): cadastros e listas de notas. Marcadas por tabelaCartoes() ---------- */
@media (max-width: 640px) {
  table.cartoes, table.cartoes tbody { display: block; width: 100%; }
  table.cartoes thead { display: block; border-bottom: 1px solid var(--line); }
  table.cartoes thead tr { display: flex; align-items: center; padding: 8px 12px; }
  table.cartoes thead th { display: none; border: 0; padding: 0; }
  table.cartoes thead th.sel-col { display: block; width: auto; padding: 0 !important; }
  table.cartoes thead th.sel-col::after { content: 'Selecionar todos'; margin-left: 10px; font-size: var(--fs-1); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); vertical-align: middle; }
  table.cartoes tbody tr { position: relative; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px 16px; padding: 12px; border-bottom: 1px solid var(--line); }
  table.cartoes tbody tr:last-child { border-bottom: 0; }
  table.cartoes tbody td { display: block; flex: 1 1 38%; min-width: 0; width: auto !important; padding: 0 !important; border: 0; text-align: left; font-size: 13.5px; overflow-wrap: anywhere; }
  table.cartoes tbody td[data-rot]::before { content: attr(data-rot); display: block; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
  table.cartoes tbody td[data-vazio] { display: none; }
  table.cartoes tbody td[data-principal] { order: -1; flex: 1 1 100%; padding-right: 36px !important; font-size: 15px; font-weight: 600; }
  table.cartoes tbody tr[data-sel] td[data-principal] { padding-left: 32px !important; }
  table.cartoes tbody td.sel-col { position: absolute; left: 12px; top: 12px; flex: none; }
  table.cartoes tbody td[data-acoes] { position: absolute; right: 4px; top: 4px; flex: none; }
  table.cartoes tbody td[colspan] { flex: 1 1 100%; padding: 18px 0 !important; text-align: center; font-size: 14px; font-weight: 400; }
}

/* ---------- Frente de caixa no celular (v1.269.0): avisos recolhidos e total + Finalizar fixos no rodapé ---------- */
.pdv-av-bt, .pdv-barra { display: none; }
.pdv-av-seta { display: inline-block; transition: transform .15s; }
.pdv-av-bt[aria-expanded="true"] .pdv-av-seta { transform: rotate(90deg); }
@media (max-width: 640px) {
  .pdv-avisos { margin-bottom: var(--sp-3); }
  .pdv-av-bt { display: inline-flex; gap: 6px; }
  .pdv-av-lista { display: none; margin-top: var(--sp-2); }
  .pdv-av-lista.aberto { display: block; }
  .pdv-barra { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; align-items: center; gap: var(--sp-3); padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 16px rgba(0, 0, 0, .18); }
  .pdv-barra-tot { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
  .pdv-barra-tot small { color: var(--muted); font-size: var(--fs-1); }
  .pdv-barra-tot b { font-size: 24px; font-variant-numeric: tabular-nums; }
  .pdv-barra .btn { min-width: 150px; justify-content: center; font-size: var(--fs-4); }
  body:has(.pdv-barra) .chat-fab { display: none; } /* o botão do chat cobriria o "Finalizar" */
}

/* ---------- Usuários e chat no celular (v1.270.0) ---------- */
/* Usuários: a linha vira cartão; as ações ficam na última linha do cartão, à direita (o "Registrar pagamento" e o menu ⋮) */
@media (max-width: 640px) {
  table.cartoes tbody td.acts[data-acoes] { position: static; flex: 1 1 100%; min-width: 0; text-align: right; }
  /* chat: título e botões na 1ª linha, a busca na 2ª (antes o título quebrava em três linhas e a busca ficava espremida) */
  .chat-head { flex-wrap: wrap; row-gap: 8px; }
  .chat-head b { flex: 1 1 auto; white-space: nowrap; }
  .chat-head .sp { display: none; }
  .chat-head .chat-busca { order: 3; flex: 1 1 100%; width: 100%; min-width: 0; }
  .chat-canais { width: 104px; }
}
/* tabela mais justa (Usuários): cabe sem rolar para o lado, com o "Registrar pagamento" e o menu ⋮ à vista */
table.compacta th, table.compacta td { padding-left: 9px; padding-right: 9px; }
table.compacta td.acts { min-width: 0; white-space: nowrap; }
/* chat: o painel é sempre claro (cores fixas), então os botões também; no tema escuro eles ficavam escuros com o ícone apagado */
.chat-panel .btn:not(.primary) { background: #f1f3f5; color: #111; border-color: #cfd4da; }
.chat-panel .btn:not(.primary):hover { background: #e4e8eb; }

/* ---------- Menu lateral (v1.271.0): busca no menu e grupos reorganizados ---------- */
.nav-busca-box { position: relative; margin: 0 4px 8px; }
.nav-busca-box .ico { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.nav-busca-box .nav-busca { padding-left: 32px; font-size: var(--fs-2); background: var(--surface-2); }
.nav a[hidden], .nav .grp-box[hidden], .nav-vazio[hidden] { display: none !important; }
.nav.filtrando .grp-box.achou .grp-items { display: block; } /* com a busca ligada, os grupos que têm resultado abrem sozinhos */
.nav.filtrando .grp-box .chev { visibility: hidden; }
.nav-vazio { padding: 8px 14px; font-size: var(--fs-2); }

/* ---------- Estados vazios e carregamento (v1.272.0) ---------- */
.vazio-box { display: flex; flex-direction: column; align-items: center; gap: var(--sp-3); }
.vazio-ico { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.vazio-ico .ico { width: 26px; height: 26px; }
.vazio-box.filtrado .vazio-ico { background: var(--surface-2); color: var(--muted); }
.vazio-txt { margin: 0; max-width: 440px; line-height: 1.45; }
/* linhas e cartões "fantasma": barras cinzas que piscam no lugar do que ainda está chegando */
.fantasma { display: block; height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: fantasma 1.4s ease infinite; }
.fantasma.grande { height: 26px; margin-top: 10px; }
@keyframes fantasma { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.fantasma-linha td { padding: 16px 14px; border-bottom: 1px solid var(--line); }
.fantasma-linha:last-child td { border-bottom: 0; }
.fantasma-grade { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.fantasma-card { padding: 18px; }
.fantasma-card.alto { display: grid; gap: 14px; padding: 22px; }
@media (max-width: 640px) {
  .fantasma-grade { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
  table.cartoes tbody tr.fantasma-linha { padding: 8px 12px; }
}

/* Frente de caixa: o menu ⋯ só existe no celular, no lugar dos dois atalhos para outras telas (cabeçalho numa linha só) */
.pdv-mais { display: none; }
@media (max-width: 640px) {
  .pdv-head { display: flex; flex-wrap: nowrap; align-items: center; }
  .pdv-head h1 { flex: 1 1 auto; width: auto; min-width: 0; margin: 0; }
  .pdv-head .pdv-link { display: none; }
  .pdv-head .pdv-mais { display: inline-flex; min-width: var(--toque); justify-content: center; font-size: 20px; padding: 0 10px; }
}

/* Contratos → Mês a mês: grade cliente × mês (a primeira coluna fica parada ao rolar para o lado) */
.mes-a-mes { font-size: 13px; }
.mes-a-mes td, .mes-a-mes th { white-space: nowrap; padding: 7px 8px; }
.mes-a-mes td:first-child, .mes-a-mes th:first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; white-space: normal; min-width: 180px; }
.mes-a-mes tfoot th, .mes-a-mes tfoot td { border-top: 1px solid var(--line); }

/* Inscrição: planos em cartões e botões de pagamento com as marcas (v1.312.0) */
.planos-tit { font-weight: 650; font-size: var(--fs-3); margin: 6px 0 8px; }
.planos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.planos.um { grid-template-columns: 1fr; }
.plano-card { display: flex; flex-direction: column; gap: 2px; text-align: left; font: inherit; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; }
.plano-card:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.plano-card.sel { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--surface)); box-shadow: 0 0 0 1px var(--accent); }
.plano-tit { display: flex; align-items: center; gap: 8px; font-size: var(--fs-3); }
.plano-selo { background: var(--accent); color: var(--accent-ink); border-radius: 99px; padding: 1px 8px; font-size: 12px; font-weight: 700; }
.plano-preco b { font-size: 22px; }
.plano-preco small { color: var(--muted); margin-left: 5px; }
.plano-sub { color: var(--muted); font-size: 12.5px; }
.pag-titulo { font-weight: 650; text-align: left !important; color: var(--ink) !important; margin: 14px 0 8px !important; font-size: var(--fs-3); }
.login-card .pag-btn { justify-content: flex-start; gap: 12px; padding: 10px 14px; min-height: 54px; margin-top: 8px; font-size: 15px; font-weight: 650; text-align: left; }
.login-card .pag-btn:first-of-type { margin-top: 0; }
.pag-logos { display: flex; gap: 6px; flex: none; }
.pag-logo { height: 30px; width: auto; background: #fff; border-radius: 7px; padding: 4px 7px; box-sizing: border-box; display: block; border: 1px solid rgba(0, 0, 0, .08); }
.pag-rot { flex: 1; }
.pag-seguro { font-size: 12.5px; margin: 12px 0 0 !important; }
.login-card .pag-teste { margin-top: 4px; }
@media (max-width: 420px) { .planos { grid-template-columns: 1fr; } .pag-logo { height: 26px; padding: 3px 5px; } }

/* "Selecionar todos" das listas em cartões (celular) no idioma da tela: o texto vem do CSS e não passa pelo tradutor */
@media (max-width: 640px) {
  html[lang="en-US"] .os-lista thead th.ck::after, html[lang="en-US"] table.cartoes thead th.sel-col::after { content: 'Select all'; }
  html[lang="es-419"] .os-lista thead th.ck::after, html[lang="es-419"] table.cartoes thead th.sel-col::after { content: 'Seleccionar todos'; }
}

/* Modo estação (1.393.0): só a tela do aparelho, sem menu; um botão discreto no canto para as opções */
.estacao-shell { min-height: 100vh; background: var(--bg); }
.estacao-shell .main { max-width: none; margin: 0; padding: 12px 16px 24px; }
.estacao-menu { position: fixed; left: 10px; bottom: 10px; z-index: 50; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; opacity: .55; }
.estacao-menu:hover, .estacao-menu:focus-visible { opacity: 1; }

/* Conferir este caixa (Vendas → PDVs, 1.394.0) */
.conf-lista { display: grid; gap: 2px; }
.conf-item { display: flex; gap: 10px; align-items: flex-start; padding: 9px 2px; border-bottom: 1px solid var(--line); }
.conf-item:last-child { border-bottom: 0; }
.conf-item > .conf-txt, .conf-item > div { flex: 1; min-width: 0; }
.conf-item > .btn { flex: none; align-self: center; }
.conf-ic { flex: none; min-width: 24px; text-align: center; font-weight: 700; }

/* Conta de demonstração (1.395.0) */
.faixa-demo { position: sticky; top: 0; z-index: 60; background: #fff4d6; color: #5c4400; border-bottom: 1px solid #f0d58a; padding: 6px 14px; font-size: 13px; text-align: center; }
[data-theme="dark"] .faixa-demo { background: #3a2f10; color: #f5dc9b; border-color: #6b5520; }
.papel-sim { background: #fff; color: #111; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; line-height: 1.35; padding: 12px 10px; border: 1px dashed #bbb; max-width: 340px; margin: 0 auto; white-space: pre-wrap; word-break: break-word; }
.papel-sim-l.g { font-weight: 700; font-size: 13.5px; }
.papel-sim-qr { margin: 8px auto; width: 120px; height: 120px; border: 2px solid #111; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 4px; }
.papel-sim-qr small { font-size: 9px; color: #555; word-break: break-all; padding: 0 4px; }
.papel-sim-corte { text-align: center; color: #888; margin-top: 6px; }

/* Fichas técnicas (#/fichas): lista de cartões, ficha aberta e impressão */
.ficha-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.ficha-card { display: block; color: inherit; text-decoration: none; }
.ficha-card:hover { border-color: var(--accent); }
.ficha-card h3 { margin: 0 0 6px; font-size: 16px; }
.ficha-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.ficha-meta .badge { background: var(--surface-2, var(--line)); }
.badge.ficha-modulo { background: var(--warn-soft, #fff3cd); color: var(--warn, #7a5300); }
.badge.ficha-publico { background: var(--accent-soft, #e7f0ff); color: var(--accent); }
.ficha { max-width: 860px; }
.ficha-capa { margin: 0 0 16px; padding: 18px 20px; border-radius: 14px; background: #0f172a; color: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.ficha-capa-marca { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; opacity: .9; }
.ficha-capa-marca b { font-size: 13px; letter-spacing: 0; text-transform: none; color: #7cc4ff; }
.ficha-capa-marca span + span::before, .ficha-capa-marca b + span::before { content: '·'; margin-right: 8px; opacity: .6; }
.ficha-capa-tit { margin: 8px 0 0; font-size: 24px; line-height: 1.2; color: #fff; }
.ficha-acoes { max-width: 860px; justify-content: flex-start; gap: 8px; }
.ficha-acoes .sp { flex: 1; }
.ficha-grupo { margin: 0 0 22px; }
.ficha-grupo-tit { margin: 0 0 10px; font-size: 15px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted, #555); }
.ficha-grupo-tit .muted { text-transform: none; letter-spacing: 0; font-weight: 400; }
.ficha-resumo { font-size: 16px; margin: 0 0 8px; }
.ficha-precisa { margin: 16px 0; }
.ficha-precisa h3, .ficha-problemas h3, .ficha-ver h3 { margin: 0 0 8px; font-size: 15px; }
.ficha-precisa ul { margin: 0; padding-left: 20px; }
.ficha-passo { padding: 16px 0; border-top: 1px solid var(--line); break-inside: avoid; }
.ficha-passo-cab { display: flex; gap: 10px; align-items: baseline; }
.ficha-passo-cab h3 { margin: 0; font-size: 16px; }
.ficha-n { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 700; font-size: 13px; }
.ficha-passo p { margin: 8px 0 0; }
.ficha-dica { padding-left: 10px; border-left: 3px solid var(--accent); }
.ficha-cmd { display: block; margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2, #f3f4f6); font-size: 13px; overflow-x: auto; }
.ficha-img { display: block; width: 100%; max-width: 100%; margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; }
.ficha-img.cel { max-width: 320px; }
.ficha-problemas { margin-top: 16px; }
.ficha-problemas table { width: 100%; border-collapse: collapse; }
.ficha-problemas th, .ficha-problemas td { text-align: left; vertical-align: top; padding: 8px; border-top: 1px solid var(--line); }
.ficha-ver { margin-top: 16px; }
.ficha-rodape { margin-top: 24px; font-size: 12px; }
body.imprimindo .side, body.imprimindo .topbar, body.imprimindo #cobranca, body.imprimindo .page-head, body.imprimindo .aviso-versao { display: none !important; }
body.imprimindo .shell { grid-template-columns: 1fr; }
@media print {
  .side, .topbar, #cobranca, .page-head, .aviso-versao { display: none !important; }
  .shell { grid-template-columns: 1fr; }
  body, .shell, .main { background: #fff; }
  .main { padding: 0; }
  .ficha { max-width: none; font-size: 12.5px; }
  .ficha-capa { border-radius: 0; margin: 0 0 14px; }
  /* o passo pode quebrar entre o texto e a imagem; o título não fica sozinho no pé da página e a imagem não é cortada */
  .ficha-passo { break-inside: auto; page-break-inside: auto; padding: 12px 0; }
  .ficha-passo-cab { break-after: avoid; page-break-after: avoid; }
  .ficha-passo p, .ficha-dica, .ficha-cmd { break-inside: avoid; page-break-inside: avoid; }
  .ficha-img { max-width: 100%; max-height: 120mm; width: auto; object-fit: contain; break-inside: avoid; page-break-inside: avoid; }
  .ficha-precisa, .ficha-problemas tr, .ficha-ver { break-inside: avoid; page-break-inside: avoid; }
  .ficha-problemas h3 { break-after: avoid; }
  a { color: inherit; text-decoration: none; }
}

/* ---- Vitrine: cartões de estilo da loja (Configurações → Vitrine) ---- */
.estilo-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 12px; }
.estilo-card { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 0 0 10px; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); color: inherit; text-align: left; cursor: pointer; font: inherit; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.estilo-card img { display: block; width: 100%; aspect-ratio: 8 / 5; object-fit: cover; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.estilo-card .estilo-nome { font-weight: 700; padding: 8px 12px 0; }
.estilo-card .estilo-para { font-size: 12.5px; color: var(--muted); padding: 0 12px; line-height: 1.3; }
.estilo-card:hover { border-color: var(--accent); }
.estilo-card[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.estilo-card.breve { opacity: .75; cursor: not-allowed; }
.estilo-card.breve img { filter: grayscale(.4); }
.estilo-card .estilo-breve { position: absolute; top: 8px; right: 8px; }
.tema-opts.paletas[hidden], .estilo-cores[hidden] { display: none; }
.estilo-cores { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; align-items: end; }
.estilo-cores input[type="color"] { height: 42px; padding: 3px; cursor: pointer; }
.banner-prev { width: 160px; height: 90px; border: 1px dashed var(--line); border-radius: 8px; display: grid; place-items: center; overflow: hidden; background: var(--bg); font-size: 12px; text-align: center; padding: 4px; }
.banner-prev img { width: 100%; height: 100%; object-fit: cover; }
/* locação: grade da composição da cobrança e faixa da situação */
.loc-itens table td { vertical-align: middle; padding: 6px 6px; }
.loc-itens table select { min-width: 128px; }
.loc-itens table input[type=text]:not(.loc-valor) { min-width: 140px; width: 100%; }
.loc-itens table input[type=month] { width: 118px; }
.loc-itens .loc-parc { display: inline-flex; align-items: center; gap: 4px; margin-left: 10px; }
.loc-itens tfoot td { font-weight: 600; }
.loc-itens .loc-parc input:disabled { opacity: .45; }
.loc-cob .err:empty { display: none; }
.loc-itens tr.loc-encerrada td { opacity: .55; }
/* cartões POS: linha de taxa/líquido e blocos do comprovante */
.pag-taxa { font-size: 12.5px; margin: 4px 0 0; }
.pag-cartao-box .pag-cartao { margin-top: 0; }
.baixa-cartao, .nfse-cartao { margin-top: 8px; }
.taxas-grade input[type=number] { min-width: 0; }
.cartoes-filtros { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cartoes-filtros input[type=date] { width: 150px; }
.cartoes-filtros select { width: auto; max-width: 230px; }

/* Conciliação de cartões (Financeiro → Recebimentos em cartão → aba Conciliação) */
.abas-cartoes { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.cartoes-depositos { margin: 0 0 10px; }
.cartoes-dep-linhas { display: flex; gap: 8px; flex-wrap: wrap; }
.cartoes-dep { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; min-width: 160px; }
.cartoes-dep .sub { display: block; font-size: 12px; opacity: .7; }
.cartoes-dep.dep-dif { border-color: #d9a441; }
.importa-previa { margin-top: 10px; }
/* aviso destacado (domínio de e-mail do cliente e conciliação de cartões) */
.aviso-leve { background: color-mix(in srgb, #f5a623 14%, transparent); border-left: 3px solid #f5a623; padding: 8px 10px; border-radius: 6px; font-size: 13px; }

/* ---- Planos por nível (1.438.0): menu com o plano mínimo, Meu plano e tela de subir de plano ---- */
.nav a.nav-bloq { color: var(--muted); }
.nav a.nav-bloq svg { opacity: .55; }
.nav-plano { margin-left: auto; font-size: 10px; font-weight: 700; line-height: 1; padding: 3px 6px; border-radius: 999px; background: #f59e0b22; color: #b45309; letter-spacing: .02em; white-space: nowrap; }
:root[data-theme="dark"] .nav-plano { background: #f59e0b33; color: #fbbf24; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nav-plano { background: #f59e0b33; color: #fbbf24; } }
.side-plano { display: inline-flex; align-items: center; gap: 6px; margin: 2px 10px 8px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; text-decoration: none; color: var(--accent); background: var(--accent-soft); align-self: flex-start; }
.side-plano svg { width: 14px; height: 14px; }
.planos-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 12px; }
.plano-nivel { display: flex; flex-direction: column; gap: 6px; }
.plano-nivel.atual { box-shadow: inset 0 0 0 2px var(--accent); }
.plano-nivel.destaque { box-shadow: inset 0 0 0 2px #f59e0b; }
.plano-nivel .pn-topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 17px; }
.plano-nivel .pn-preco { font-size: 22px; font-weight: 700; }
.plano-nivel .pn-resumo, .plano-nivel .pn-suporte { margin: 0; font-size: 13px; }
.plano-nivel .pn-itens { margin: 0; padding-left: 18px; font-size: 13px; flex: 1; }
.plano-nivel .btn { margin-top: 6px; }
.plano-resumo { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: center; }
.pn-usos { display: flex; gap: 18px; flex-wrap: wrap; }
.pn-uso { display: flex; flex-direction: column; }
.plano-sobe { display: flex; gap: 14px; align-items: flex-start; }
.plano-sobe > svg { width: 28px; height: 28px; color: #b45309; flex: none; }
.plano-aviso { margin: 10px 0 0; padding: 10px 12px; border-radius: 8px; background: #f59e0b1f; font-size: 13.5px; }

/* ---- Ok Rádio: barra fixa no rodapé ---- */
body.com-radio .main { padding-bottom: 96px; }
.radio-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 8px 16px; background: #0e2238; color: #f6f8fa; border-top: 1px solid #2a3f58; box-shadow: 0 -4px 16px rgba(0,0,0,.18); min-height: 56px; }
@media (min-width: 900px) { .radio-bar { left: 240px; } }
.radio-logo { display: flex; align-items: center; gap: 8px; font-size: 14px; white-space: nowrap; }
.radio-onda { display: inline-flex; align-items: flex-end; gap: 2px; height: 16px; }
.radio-onda i { display: block; width: 3px; background: #8db8f0; border-radius: 2px; height: 6px; animation: radio-onda 1s ease-in-out infinite; }
.radio-onda i:nth-child(2) { animation-delay: .2s; } .radio-onda i:nth-child(3) { animation-delay: .4s; }
@keyframes radio-onda { 0%, 100% { height: 5px; } 50% { height: 16px; } }
.radio-play { width: 40px; height: 40px; border-radius: 50%; border: 0; background: #1f62b8; color: #fff; font-size: 15px; cursor: pointer; flex: none; }
.radio-play.on { background: #2c7a3f; }
.radio-info { flex: 1; min-width: 0; }
.radio-titulo { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.radio-sub { font-size: 12px; color: #b9c8da; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.radio-sub.radio-erro { color: #f5b3b3; }
.radio-linha { display: flex; align-items: center; gap: 8px; margin-top: 3px; max-width: 520px; }
.radio-prog { flex: 1; height: 4px; background: #2a3f58; border-radius: 2px; overflow: hidden; }
.radio-prog-fill { height: 100%; width: 0; background: #8db8f0; }
.radio-tempo { font-size: 11px; color: #b9c8da; font-variant-numeric: tabular-nums; }
.radio-vol { width: 90px; accent-color: #8db8f0; }
.radio-ico { border: 0; background: transparent; color: #b9c8da; font-size: 18px; cursor: pointer; padding: 6px; }
.radio-ico:hover, .radio-fecha:hover { color: #fff; }
.radio-aqui { border: 1px solid #8db8f0; background: transparent; color: #f6f8fa; border-radius: 8px; padding: 6px 10px; cursor: pointer; font-size: 12px; white-space: nowrap; }
.radio-bar.oferta { background: #14532d; border-top-color: #2c7a3f; }
.radio-bar.oferta .radio-info { font-size: 13px; }
.radio-bar.oferta a { color: #d7f0dc; }
.radio-fecha { border: 0; background: transparent; color: #b9c8da; font-size: 18px; cursor: pointer; padding: 4px 8px; }
@media (max-width: 640px) { .radio-vol, .radio-tempo, .radio-ico { display: none; } body.com-radio .main { padding-bottom: 84px; } }
@media print { .radio-bar { display: none; } }
.radio-adm-lista { max-height: 360px; overflow: auto; }
