/* AGÊNCIA EXEMPLO — painel de gestão. Mesma identidade da vitrine. */
[hidden] { display: none !important; }
:root {
  --azul: #2f5cf0; --azul2: #2448d8; --verde: #0a7f4c; --ambar: #8f5c00; --verm: #c8323f; --roxo: #6d4fd8;
  --bg: #f3f5f9; --bg2: #ffffff; --card: #ffffff; --campo: #ffffff; --linha: #e1e6ef; --linha2: #cdd5e3;
  --txt: #0d1322; --txt2: #4a5470; --txt3: #5f6a84; --sutil: rgba(13,19,34,.05); --sombra: rgba(13,19,34,.18);
  --barra: rgba(243,245,249,.9); color-scheme: light;
  --fonte: 'Schibsted Grotesk', system-ui, -apple-system, sans-serif;
  --r: 10px;
}
@media (prefers-color-scheme: dark) { :root:not([data-tema="claro"]) {
  --azul: #2f62f2; --azul2: #94b0ff; --verde: #1fc27a; --ambar: #f2b24c; --verm: #f0616d; --roxo: #a78bfa;
  --bg: #080b14; --bg2: #0d1220; --card: #10172a; --campo: #0b1120; --linha: #1d2742; --linha2: #2a3657;
  --txt: #e8ecf5; --txt2: #a0a9bf; --txt3: #8b95b0; --sutil: rgba(255,255,255,.06); --sombra: rgba(0,0,0,.6);
  --barra: rgba(8,11,20,.9); color-scheme: dark;
} }
:root[data-tema="escuro"] {
  --azul: #2f62f2; --azul2: #94b0ff; --verde: #1fc27a; --ambar: #f2b24c; --verm: #f0616d; --roxo: #a78bfa;
  --bg: #080b14; --bg2: #0d1220; --card: #10172a; --campo: #0b1120; --linha: #1d2742; --linha2: #2a3657;
  --txt: #e8ecf5; --txt2: #a0a9bf; --txt3: #8b95b0; --sutil: rgba(255,255,255,.06); --sombra: rgba(0,0,0,.6);
  --barra: rgba(8,11,20,.9); color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scrollbar-width: thin; scrollbar-color: var(--linha2) var(--bg); }
body { background: var(--bg); color: var(--txt); font: 14.5px/1.5 var(--fonte); overflow-x: hidden; min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--linha2); border-radius: 10px; border: 2px solid var(--bg); }

/* campos */
input, select, textarea { width: 100%; background: var(--campo); border: 1px solid var(--linha2); border-radius: var(--r); padding: 0 12px; height: 40px; outline: 0; transition: border-color .15s, box-shadow .15s; }
textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
select { -webkit-appearance: none; appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2375809a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
input:focus, select:focus, textarea:focus { border-color: var(--azul); box-shadow: 0 0 0 3px rgba(59,108,255,.15); }
/* campos de texto já mostram o foco pela borda + sombra: sem o contorno extra do :focus-visible */
input:not([type="checkbox"]):not([type="radio"]):focus-visible, select:focus-visible, textarea:focus-visible { outline: 0; }
input::placeholder, textarea::placeholder { color: var(--txt3); }
input[type="checkbox"] { width: 18px; height: 18px; padding: 0; accent-color: var(--azul); cursor: pointer; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--txt2); min-width: 0; }
small { color: var(--txt3); font-size: 12px; font-weight: 500; }

/* botões */
.bt { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--r);
  border: 1px solid var(--linha2); background: var(--bg2); font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap; color: var(--txt); transition: border-color .15s, background .15s; }
.bt:hover { border-color: var(--txt3); }
.bt svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bt.primario { background: var(--azul); border-color: var(--azul); color: #fff; }
.bt.primario:hover { filter: brightness(1.08); }
.bt.perigo { color: var(--verm); }
.bt.perigo:hover { border-color: var(--verm); }
.bt.mini { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.bt.icone { width: 40px; padding: 0; }
.bt:disabled { opacity: .55; cursor: default; }
.mudo { color: var(--txt2); }
.link-adm { background: none; border: 0; color: var(--azul2); font-weight: 600; cursor: pointer; font-size: 13.5px; }

/* marca */
.marca-p { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--txt); }
.marca-u { width: 34px; height: 34px; border-radius: 9px; background: var(--azul); color: #fff; display: grid; place-items: center; flex: none; }
.marca-u svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 7; }
.marca-p b { font-weight: 800; font-size: 17px; letter-spacing: -.01em; }
.marca-p span.selo-g { font-size: 11.5px; font-weight: 700; color: var(--azul2); background: rgba(59,108,255,.12); border: 1px solid rgba(59,108,255,.3); padding: 2px 8px; border-radius: 99px; }

/* login */
.tela-login { max-width: none; min-height: 100vh; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(59,108,255,.16), transparent 70%), var(--bg); }
.login { width: min(380px, 100%); background: var(--card); border: 1px solid var(--linha); border-radius: 18px; padding: 28px; display: grid; gap: 16px; box-shadow: 0 30px 70px -30px var(--sombra); }
.login .marca-p { justify-content: center; margin-bottom: 4px; }
.login h1 { font-size: 20px; text-align: center; }
.login p.mudo { text-align: center; margin-top: -10px; font-size: 13.5px; }
.login .bt { height: 44px; }
.link-esqueci { background: none; border: 0; color: var(--azul2); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; justify-self: center; padding: 2px 6px; }
.link-esqueci:hover { text-decoration: underline; }
.ok-msg { color: var(--verde); font-size: 13.5px; font-weight: 500; background: rgba(34,197,94,.08); border: 1px solid rgba(34,197,94,.25); border-radius: 10px; padding: 10px 12px; }
.login[hidden] { display: none; }
.erro { color: var(--verm); font-size: 13.5px; min-height: 1.2em; font-weight: 500; }

/* barra do topo */
.barra { position: sticky; top: 0; z-index: 20; height: 62px; background: var(--bg); border-bottom: 1px solid var(--linha); }
.barra-in { max-width: 1320px; margin: 0 auto; height: 100%; padding: 0 24px; display: flex; align-items: center; gap: 20px; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--sutil); border-radius: 12px; }
.tabs button { background: none; border: 0; padding: 7px 14px; border-radius: 9px; color: var(--txt2); cursor: pointer; font-weight: 600; font-size: 14px; }
.tabs button.on { background: var(--card); color: var(--txt); box-shadow: 0 1px 3px var(--sombra); }
.barra-dir { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.usuario { font-size: 13px; color: var(--txt3); margin-right: 4px; }
.tema-wrap { position: relative; }
.tema-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 190px; padding: 6px; background: var(--card); border: 1px solid var(--linha2); border-radius: 12px; box-shadow: 0 18px 40px -12px var(--sombra); }
.tema-op { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--txt2); cursor: pointer; text-align: left; }
.tema-op:hover, .tema-op:focus-visible { background: var(--sutil); color: var(--txt); outline: none; }
.tema-op svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tema-op .ok { margin-left: auto; color: var(--azul2); visibility: hidden; }
.tema-op[aria-checked="true"] { color: var(--txt); font-weight: 600; }
.tema-op[aria-checked="true"] .ok { visibility: visible; }

main { max-width: 1320px; margin: 0 auto; padding: 24px 24px 80px; }
.cab-pag { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.cab-pag h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.cab-pag p { color: var(--txt2); font-size: 14px; margin-top: 4px; }

/* indicadores */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--card); border: 1px solid var(--linha); border-radius: 14px; padding: 14px 16px; min-width: 0; }
.kpi small { display: block; font-size: 12.5px; font-weight: 600; color: var(--txt3); }
.kpi b { display: block; font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin: 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi i { font-style: normal; font-size: 12.5px; color: var(--txt3); }

/* barra de ferramentas (fixa ao rolar) */
.ferramentas { position: sticky; top: 62px; z-index: 15; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 0; margin-bottom: 4px; background: var(--bg); }
.busca-adm { flex: 1 1 280px; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; background: var(--campo); border: 1px solid var(--linha2); border-radius: 99px; }
.busca-adm:focus-within { border-color: var(--azul); box-shadow: 0 0 0 3px rgba(59,108,255,.15); }
.busca-adm svg { width: 17px; height: 17px; flex: none; fill: none; stroke: var(--txt3); stroke-width: 2; }
.busca-adm input { border: 0; background: none; padding: 0; height: 100%; box-shadow: none !important; outline: 0 !important; border-radius: 0; }
/* (09/11) busca dentro do pop-up Filtros: acha a opção pelo nome */
.f-busca { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 4px 0 12px; margin-bottom: 12px; background: var(--campo); border: 1px solid var(--linha2); border-radius: 99px; }
.f-busca:focus-within { border-color: var(--azul); box-shadow: 0 0 0 3px rgba(59,108,255,.15); }
.f-busca > svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--txt3); stroke-width: 2; stroke-linecap: round; }
.f-busca input { flex: 1; min-width: 0; border: 0; background: none; padding: 0; height: 34px; font-size: 14px; box-shadow: none !important; outline: 0 !important; border-radius: 0; }
.f-busca input::-webkit-search-cancel-button { display: none; }
.f-busca-x { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 99px; background: none; color: var(--txt3); cursor: pointer; }
.f-busca-x:hover { background: var(--sutil); color: var(--txt); }
.f-busca-x svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.f-busca-nada { font-size: 13px; color: var(--txt3); margin: -4px 2px 12px; }
#pop-filtros .f-oculto { display: none !important; }
.qtd { font-size: 11.5px; font-weight: 700; background: var(--azul); color: #fff; border-radius: 99px; padding: 1px 7px; line-height: 1.5; }
.pop-wrap { position: relative; }
.pop { position: absolute; top: calc(100% + 8px); left: 0; z-index: 30; width: min(480px, calc(100vw - 32px)); max-height: 70vh; overflow: auto; background: var(--card); border: 1px solid var(--linha2); border-radius: 14px; padding: 16px; box-shadow: 0 24px 60px -18px var(--sombra); display: grid; gap: 16px; }
#pop-ordem { left: auto; right: 0; }
.pop h4, .pop-grupo h4 { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.pop h4 small, .pop-grupo h4 small { font-weight: 500; margin-left: 4px; }
.chips-adm { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-adm { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--linha2); background: var(--bg2); border-radius: 99px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--txt2); }
.chip-adm span { color: var(--txt3); font-weight: 500; }
.chip-adm[aria-pressed="true"] { background: var(--azul); border-color: var(--azul); color: #fff; }
.chip-adm[aria-pressed="true"] span { color: rgba(255,255,255,.8); }
.pop-pe { display: flex; justify-content: flex-end; border-top: 1px solid var(--linha); padding-top: 12px; }
.ativos-filtros { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ativos-filtros:empty { display: none; }
.tag-f { height: 28px; padding: 0 10px; border: 1px solid rgba(59,108,255,.45); background: rgba(59,108,255,.1); color: var(--txt); border-radius: 99px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.ord-linha { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto 32px 28px; gap: 6px; align-items: center; }
.ord-linha > * { min-width: 0; }
.pop h4 small { display: inline-block; }
@media (max-width: 520px) {
  .ord-linha { grid-template-columns: 26px minmax(0, 1fr) 32px 28px; grid-template-areas: "n k sobe x" ". d d d"; row-gap: 6px; }
  .ord-linha .ord-n { grid-area: n; } .ord-linha .sel { grid-area: k; } .ord-linha [data-ord="d"] { grid-area: d; justify-self: start; }
  .ord-linha [data-ord="sobe"] { grid-area: sobe; } .ord-linha [data-ord="tira"] { grid-area: x; }
  .pop .ord-linha .sel-bt { min-width: 0; }
}
.ord-linha select { height: 34px; font-size: 13.5px; }
.ord-n { color: var(--txt3); font-weight: 700; font-size: 13px; }
.dica-ord { color: var(--txt3); font-size: 12.5px; }
.m-x { background: none; border: 0; color: var(--txt3); font-size: 22px; line-height: 1; cursor: pointer; padding: 0 4px; border-radius: 6px; }
.m-x:hover { color: var(--verm); }
.m-x:disabled { opacity: .3; cursor: default; }

/* lista (tabela) */
.lista { background: var(--card); border: 1px solid var(--linha); border-radius: 14px; }
.item { display: grid; grid-template-columns: 22px 84px minmax(0, 1fr) 130px 130px 146px 64px 186px; gap: 14px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--linha); }
.item:first-child { border-top: 0; border-radius: 14px 14px 0 0; }
.item:last-child { border-radius: 0 0 14px 14px; }
.item:not(.cab):hover { background: var(--sutil); }
.item.cab { color: var(--txt3); font-size: 12.5px; font-weight: 700; padding: 10px 18px; background: var(--sutil); }
.item .cod { font-weight: 700; color: var(--azul2); font-size: 13.5px; }
.item .tit { min-width: 0; }
.item .tit b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.item .tit small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .num { font-weight: 600; }
.item > .v, .item > .g, .item.cab > span:nth-child(4), .item.cab > span:nth-child(5) { text-align: right; }
.item > .v small { font-weight: 500; }
.item.cab > span:nth-child(7) { text-align: center; }
.item > .p { display: flex; justify-content: center; }
.item .acoes { display: flex; gap: 6px; justify-content: flex-end; }
.item select.st { height: 34px; font-size: 13px; font-weight: 700; border-radius: 99px; padding-left: 12px; }
.st[data-v="disponivel"] { color: var(--verde); } .st[data-v="reservada"] { color: var(--ambar); }
.st[data-v="vendida"] { color: var(--roxo); } .st[data-v="caida"] { color: var(--verm); }
.item.apagado .tit, .item.apagado .num { opacity: .55; }
.ordenavel { cursor: pointer; user-select: none; }
.ordenavel:hover { color: var(--txt); }
.seta-ord { font-style: normal; color: var(--azul2); margin-left: 4px; font-size: 11px; }
.n-lista { margin-left: 6px; font-size: 11.5px; background: var(--sutil); padding: 1px 7px; border-radius: 99px; }
.chave { position: relative; width: 40px; height: 23px; border-radius: 99px; background: var(--linha2); border: 0; cursor: pointer; transition: background .15s; }
.chave::after { content: ''; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.chave.on { background: var(--verde); } .chave.on::after { left: 20px; }
.vazio { padding: 48px 16px; text-align: center; color: var(--txt2); }

/* aba Site */
.cfg { max-width: 640px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; background: var(--card); border: 1px solid var(--linha); border-radius: 14px; padding: 24px; }
.cfg h2 { font-size: 18px; }
.cfg .bt { justify-self: start; }

/* janelas */
dialog { margin: auto; background: var(--card); color: var(--txt); border: 1px solid var(--linha2); border-radius: 18px; width: min(1080px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 0; box-shadow: 0 40px 100px -30px var(--sombra); }
dialog::backdrop { background: rgba(3,5,10,.6); backdrop-filter: blur(3px); }
dialog form { display: flex; flex-direction: column; max-height: calc(100vh - 34px); }
.dlg-topo { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--linha); }
.dlg-topo h2 { font-size: 19px; font-weight: 800; letter-spacing: -.01em; margin-right: auto; }
.dlg-corpo { padding: 20px 22px; overflow: auto; display: grid; gap: 16px; }
.dlg-pe { display: flex; gap: 8px; align-items: center; padding: 14px 22px; border-top: 1px solid var(--linha); background: var(--card); border-radius: 0 0 18px 18px; }
.dlg-pe span { flex: 1; }
.fechar-dlg { width: 36px; height: 36px; border: 0; background: none; color: var(--txt3); border-radius: 8px; cursor: pointer; display: grid; place-items: center; }
.fechar-dlg:hover { background: var(--sutil); color: var(--txt); }
.fechar-dlg svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; }
#dlg-venda, #dlg-meta { width: min(440px, calc(100% - 32px)); }
.duas { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.esq { display: grid; gap: 14px; align-content: start; min-width: 0; }
.duas textarea[name="texto"] { font-size: 13px; min-height: 340px; }
.campos { display: grid; gap: 12px; align-content: start; padding: 16px; background: var(--sutil); border-radius: 14px; }
.so-colar { display: grid; gap: 12px; }
.linha2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.checks { display: flex; flex-wrap: wrap; gap: 16px; padding-top: 4px; }
.checks label { flex-direction: row; align-items: center; gap: 8px; color: var(--txt); font-weight: 500; font-size: 13.5px; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--txt); color: var(--bg); padding: 10px 18px; border-radius: 10px; font-weight: 600; z-index: 99; box-shadow: 0 10px 30px -8px var(--sombra); }

/* modo de cadastro */
.modo { display: inline-flex; gap: 4px; padding: 4px; background: var(--sutil); border-radius: 12px; justify-self: start; }
.modo button { border: 0; background: none; padding: 8px 14px; border-radius: 9px; font-weight: 600; font-size: 13.5px; color: var(--txt2); cursor: pointer; }
.modo button[aria-pressed="true"] { background: var(--card); color: var(--txt); box-shadow: 0 1px 3px var(--sombra); }
.modo-montar .so-colar { display: none; }
.modo-montar textarea[name="texto"] { min-height: 220px; font-size: 12.5px; color: var(--txt2); background: var(--sutil); }

/* montador */
.montador { display: grid; gap: 14px; }
.m-seg { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.m-seg button { height: 36px; border: 1px solid var(--linha2); background: var(--bg2); border-radius: 99px; padding: 0 16px; font-weight: 600; cursor: pointer; color: var(--txt2); }
.m-seg button[aria-pressed="true"] { border-color: var(--azul); background: var(--azul); color: #fff; }
.m-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(130px, 100%), 1fr)); gap: 12px; }
.m-cas, .m-extras { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--linha); border-radius: 14px; }
.m-cab { display: flex; justify-content: space-between; align-items: center; }
.m-ca { border: 1px solid var(--linha); border-radius: 12px; padding: 12px; display: grid; gap: 10px; background: var(--sutil); }
.m-ca-topo { display: flex; align-items: center; gap: 10px; }
.m-ca-topo select { width: auto; flex: 1; }
.m-ca-campos { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.m-checks { display: flex; flex-wrap: wrap; gap: 16px; }
.m-checks label { flex-direction: row; align-items: center; gap: 8px; color: var(--txt); font-weight: 500; font-size: 13.5px; }
.m-valor input { font-size: 17px; font-weight: 700; height: 44px; }

/* tablet */
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .item { grid-template-columns: 22px 76px minmax(0, 1fr) 112px 112px 132px 56px 176px; gap: 10px; }
}
/* celular: lista vira cartões, janelas em tela cheia */
@media (max-width: 900px) {
  .barra { height: 58px; }
  .barra-in { padding: 0 16px; gap: 10px; }
  .marca-p b { display: none; }
  .marca-p .selo-g, .usuario, .bt-vitrine span, .bt-instalar span { display: none; }
  .bt-vitrine, .bt-instalar { width: 40px; padding: 0; }
  .tabs button { padding: 7px 10px; font-size: 13.5px; }
  main { padding: 16px 16px 80px; }
  .cab-pag h1 { font-size: 22px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi { padding: 12px; } .kpi b { font-size: 20px; } .kpi i { display: none; }
  .kpi:first-child { grid-column: 1 / -1; }
  .ferramentas { top: 58px; }
  .busca-adm { flex-basis: 100%; }
  .ferramentas > .pop-wrap { flex: 1; position: static; }
  .ferramentas .pop, .ferramentas #pop-ordem { left: 0; right: 0; width: auto; max-height: min(70vh, calc(100dvh - 200px)); }
  .ferramentas > .pop-wrap > .bt { width: 100%; }
  #novo { flex: 1 1 100%; }
  .lista { background: none; border: 0; border-radius: 0; display: grid; gap: 10px; }
  .item.cab { display: none; }
  .item { grid-template-columns: 22px minmax(0, 1fr) auto; grid-template-areas: "ck cod p" "tit tit tit" "v v g" "s s acoes"; gap: 8px 12px; background: var(--card); border: 1px solid var(--linha) !important; border-radius: 14px !important; padding: 14px; }
  .item .ck { grid-area: ck; } .item .cod { grid-area: cod; } .item .tit { grid-area: tit; } .item > .v { grid-area: v; text-align: left; } .item > .g { grid-area: g; }
  .item .s { grid-area: s; } .item .p { grid-area: p; justify-content: flex-end; } .item .acoes { grid-area: acoes; }
  .item > .v::before { content: 'Valor'; display: block; font-size: 11.5px; color: var(--txt3); font-weight: 600; }
  .item > .g::before { content: 'Gasto total'; display: block; font-size: 11.5px; color: var(--txt3); font-weight: 600; }
  .item .tit b { white-space: normal; }
  dialog { width: 100%; max-width: 100%; max-height: 100%; height: 100%; border-radius: 0; border: 0; }
  dialog form { max-height: 100vh; height: 100%; }
  .dlg-topo, .dlg-corpo, .dlg-pe { padding-left: 16px; padding-right: 16px; }
  .dlg-pe { border-radius: 0; flex-wrap: wrap; }
  .dlg-pe .bt { flex: 1; }
  .dlg-pe span { display: none; }
  #dlg-venda, #dlg-meta { width: 100%; height: auto; margin-bottom: 0; border-radius: 18px 18px 0 0; }
  #dlg-venda form, #dlg-meta form { height: auto; }
  #dlg-meta { top: auto; max-height: calc(100% - 24px); }
  .duas { grid-template-columns: minmax(0, 1fr); }
  .duas textarea[name="texto"] { min-height: 220px; }
  .cfg { padding: 18px; }
}
@media (max-width: 420px) { .tabs button { padding: 7px 8px; } .barra-dir { gap: 6px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.icone-mini { width: 32px; padding: 0; }
.icone-mini svg { width: 16px; height: 16px; }

/* aba Site */
.seg-disp { display: inline-flex; gap: 4px; padding: 4px; background: var(--sutil); border-radius: 12px; }
.seg-disp button { border: 0; background: none; padding: 7px 12px; border-radius: 9px; font-weight: 600; font-size: 13.5px; color: var(--txt2); cursor: pointer; }
.seg-disp button[aria-pressed="true"] { background: var(--card); color: var(--txt); box-shadow: 0 1px 3px var(--sombra); }
.site-grade { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; align-items: start; }
.site-lado { position: sticky; top: 80px; }
.site-lado .cfg { padding: 18px; gap: 14px; }
.site-lado h2 { font-size: 14px; margin-top: 4px; }
.linha-chave { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; color: var(--txt); font-weight: 500; font-size: 13.5px; }
.linha-chave .chave { flex: none; }
.estado-salvo { font-size: 13px; color: var(--txt3); padding-top: 4px; border-top: 1px solid var(--linha); }
.estado-salvo.salvando { color: var(--ambar); } .estado-salvo.ok { color: var(--verde); } .estado-salvo.erro { color: var(--verm); }
.espelho { background: var(--card); border: 1px solid var(--linha2); border-radius: 14px; overflow: hidden; box-shadow: 0 20px 50px -30px var(--sombra); margin: 0 auto; width: 100%; transition: width .25s; }
.espelho.cel { width: 400px; max-width: 100%; }
.espelho-barra { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--linha); background: var(--sutil); }
.espelho-barra span { width: 10px; height: 10px; border-radius: 50%; background: var(--linha2); }
.espelho-barra b { margin-left: 10px; font-size: 12.5px; font-weight: 600; color: var(--txt3); background: var(--campo); border: 1px solid var(--linha); border-radius: 99px; padding: 3px 12px; }
.espelho iframe { display: block; width: 100%; height: calc(100vh - 200px); min-height: 560px; border: 0; background: var(--bg); }
.espelho.cel iframe { height: 760px; }

/* aba Avisos */
.inscritos { display: flex; align-items: baseline; gap: 8px; background: var(--card); border: 1px solid var(--linha); border-radius: 12px; padding: 10px 16px; }
.inscritos b { font-size: 22px; font-weight: 800; }
.inscritos span { color: var(--txt3); font-size: 13px; }
.notif-grade { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.notif-grade .cfg { max-width: none; }
.modelos { display: flex; flex-wrap: wrap; gap: 6px; }
.prev-notif { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--sutil); border: 1px solid var(--linha); }
.prev-notif img { width: 38px; height: 38px; border-radius: 9px; flex: none; }
.prev-notif div { display: grid; gap: 1px; min-width: 0; }
.prev-notif b { font-size: 14px; }
.prev-notif span { font-size: 13.5px; color: var(--txt2); }
.hist-lista { display: grid; }
.hist-item { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--linha); }
.hist-item:first-child { border-top: 0; }
.hist-item div { display: grid; gap: 2px; min-width: 0; }
.hist-item b { font-size: 14px; }
.hist-item span { font-size: 13.5px; color: var(--txt2); }
#apagar-notifs { height: 32px; padding: 0 12px; font-size: 13px; }
.hist-cab h2 { margin: 0; }
.hist-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hist-item .hist-dir { display: flex; align-items: center; gap: 8px; flex: none; }
.hist-dir .bt { width: 30px; height: 30px; }
.hist-num { font-weight: 800; white-space: nowrap; color: var(--verde) !important; }
.hist-num i { font-style: normal; color: var(--verm); font-weight: 600; font-size: 12px; }
@media (max-width: 1100px) { .site-grade, .notif-grade { grid-template-columns: minmax(0, 1fr); } .site-lado { position: static; } }
@media (max-width: 900px) { .tabs button { padding: 7px 8px; } .cab-pag { flex-wrap: wrap; } .espelho iframe { height: 70vh; min-height: 480px; } }

/* seleção, cópia e lote */
.ck { display: flex; align-items: center; }
.item.marcado { background: rgba(59,108,255,.07); }
.cp { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.cp svg { width: 13px; height: 13px; flex: none; fill: none; stroke: var(--txt3); stroke-width: 2; opacity: 0; transition: opacity .15s; }
.cp:hover svg, .cp:focus-visible svg { opacity: 1; }
.cp:hover { color: var(--azul2); }
.internos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.internos .cp { font-size: 12px; font-weight: 600; color: var(--txt2); background: var(--sutil); border: 1px solid var(--linha); border-radius: 6px; padding: 2px 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.internos .cp svg { opacity: .7; }
.internos .chip-cp { gap: 6px; color: var(--txt); }
.chip-cp i { font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: 0; color: var(--txt3); }
.internos .chip-cp:hover { border-color: var(--azul); color: var(--azul2); }
.internos .chip-cp.copiado { border-color: var(--verde); color: var(--verde); }
.sub-v { display: block; font-weight: 500 !important; }
.sub-v .cp { font-weight: 600; }
.sub-campos { font-size: 12.5px; color: var(--txt3); font-weight: 700; margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--linha); }
.lote { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; background: rgba(59,108,255,.1); border: 1px solid rgba(59,108,255,.4); border-radius: 12px; }
.lote b { font-size: 13.5px; margin-right: 4px; }
.lote select { width: auto; height: 32px; font-size: 13px; border-radius: 8px; }
.ids-res { font-size: 13.5px; color: var(--txt2); }
.nao-achou { color: var(--verm); }
@media (max-width: 900px) { .cp svg { opacity: .7; } }
/* Filtrar por ID (dentro do popup Filtros) */
.pop-grupos { display: grid; gap: 16px; min-width: 0; }
.ids-sec { display: grid; gap: 8px; min-width: 0; padding-bottom: 16px; border-bottom: 1px solid var(--linha); }
.ids-sec h4 { margin-bottom: 0; }
.ids-sec textarea { min-height: 96px; max-height: 40vh; font-size: 13.5px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.ids-linha { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-width: 0; }
.ids-linha .ids-res { min-width: 0; overflow-wrap: anywhere; }
.ids-linha .link-adm { flex: none; padding: 4px 0; }
.ids-acoes { display: flex; flex-wrap: wrap; gap: 6px; }
.ids-acoes[hidden], .ids-linha [hidden] { display: none; }

/* revisão de responsividade */
:root { --barra-h: 62px; }
.ferramentas { top: var(--barra-h); }
@media (max-width: 1180px) {
  .item { grid-template-columns: 22px 76px minmax(0, 1fr) 120px 136px 56px 176px; }
  .item > .g, .item.cab > span:nth-child(5) { display: none; }
}
@media (max-width: 900px) {
  :root { --barra-h: 58px; }
  .item { grid-template-columns: 22px minmax(0, 1fr) auto; }
  .item > .g { display: block; }
}
@media (max-width: 600px) {
  :root { --barra-h: 106px; }
  .barra { height: auto; }
  .barra-in { flex-wrap: wrap; padding: 8px 16px; row-gap: 8px; }
  .barra-in .tabs { order: 3; flex: 1 1 100%; justify-content: space-between; }
  .barra-in .tabs button { flex: 1; }
  .barra-dir .bt { width: 38px; height: 38px; }
}
.modo button { white-space: nowrap; }
@media (max-width: 420px) { .modo { width: 100%; } .modo button { flex: 1; padding: 8px 6px; font-size: 13px; } .m-ca-topo b { white-space: nowrap; } }
.login .erro:empty { display: none; }

/* ===== Empresa: tarefas, notas, agenda ===== */
:root { --n-amarelo: #e9a23b; --n-rosa: #e5557a; --n-laranja: #f07a3a; --n-verde: #17a86a; --n-azul: #2f5cf0; --n-roxo: #7b5cf0; --n-cinza: #75809a; --n-mix: 11%; --n-borda: 34%; }
@media (prefers-color-scheme: dark) { :root:not([data-tema="claro"]) { --n-amarelo: #f2b24c; --n-rosa: #f06a8f; --n-laranja: #ff8f52; --n-verde: #1fc27a; --n-azul: #5b85ff; --n-roxo: #9c84ff; --n-cinza: #8792ad; --n-mix: 13%; --n-borda: 38%; } }
:root[data-tema="escuro"] { --n-amarelo: #f2b24c; --n-rosa: #f06a8f; --n-laranja: #ff8f52; --n-verde: #1fc27a; --n-azul: #5b85ff; --n-roxo: #9c84ff; --n-cinza: #8792ad; --n-mix: 13%; --n-borda: 38%; }
.cor-amarelo { --nc: var(--n-amarelo); } .cor-rosa { --nc: var(--n-rosa); } .cor-laranja { --nc: var(--n-laranja); } .cor-verde { --nc: var(--n-verde); }
.cor-azul { --nc: var(--n-azul); } .cor-roxo { --nc: var(--n-roxo); } .cor-cinza { --nc: var(--n-cinza); }
/* fundo do papel: a cor da nota bem suave sobre o cartão do tema */
.nota, .nota-nova, .dlg-nota { --papel: color-mix(in srgb, var(--nc) var(--n-mix), var(--card)); --borda-n: color-mix(in srgb, var(--nc) var(--n-borda), var(--linha)); }

.emp-grade { display: grid; grid-template-columns: minmax(320px, 420px) minmax(0, 1fr); gap: 18px; align-items: start; }
.emp-col { display: grid; gap: 18px; min-width: 0; }
.bloco { background: var(--card); border: 1px solid var(--linha); border-radius: 14px; padding: 18px; min-width: 0; }
.bloco-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.bloco-cab h2 { font-size: 17px; font-weight: 800; }
.bloco h3 { font-size: 14px; font-weight: 700; }
.mudo { color: var(--txt3); font-size: 13px; }
.vazio-min { color: var(--txt3); font-size: 13.5px; padding: 10px 2px; list-style: none; }
.alca { border: 0; background: none; color: var(--txt3); cursor: grab; padding: 2px; display: grid; place-items: center; touch-action: none; border-radius: 6px; }
.alca svg { width: 16px; height: 16px; fill: currentColor; }
.alca:active { cursor: grabbing; }
.pegando { opacity: .55; box-shadow: 0 12px 30px -10px var(--sombra); }
.arrastando { user-select: none; }

.nova-tarefa { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px; margin-bottom: 10px; }
.nova-tarefa input[name=titulo] { grid-column: 1 / -1; }
.nova-tarefa input, .nova-tarefa select, .novo-evento input { height: 38px; min-width: 0; }
.nova-tarefa .bt, .novo-evento .bt { height: 38px; }
.nova-tarefa input[type=date] { width: 100%; }
.t-lista { list-style: none; display: grid; gap: 2px; }
.tarefa { display: flex; align-items: center; gap: 8px; padding: 7px 6px; border-radius: 9px; transition: opacity .18s, transform .18s; }
.tarefa:hover { background: var(--sutil); }
.tarefa.saindo { opacity: 0; transform: translateX(8px); }
.tarefa input[type=checkbox] { width: 18px; height: 18px; flex: none; accent-color: var(--azul); }
.t-tit { flex: 1; min-width: 0; font-size: 14.5px; outline: 0; border-radius: 4px; padding: 1px 3px; overflow-wrap: anywhere; }
.t-tit:focus { background: var(--campo); box-shadow: 0 0 0 2px var(--azul); }
.feita .t-tit { text-decoration: line-through; color: var(--txt3); }
.pri { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--txt3); }
.pri-alta .pri { background: var(--verm); } .pri-media .pri { background: var(--ambar); } .pri-baixa .pri { background: var(--verde); }
.prazo { font-size: 12px; font-weight: 600; color: var(--txt2); background: var(--sutil); padding: 2px 7px; border-radius: 99px; white-space: nowrap; }
.prazo.hoje { color: var(--azul2); background: rgba(59,108,255,.12); }
.prazo.atrasada { color: var(--verm); background: rgba(240,97,109,.12); }
.t-del { border: 0; background: none; color: var(--txt3); cursor: pointer; padding: 4px; border-radius: 6px; opacity: 0; display: grid; }
.t-del svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
.tarefa:hover .t-del, .ev:hover .t-del, .t-del:focus-visible { opacity: 1; }
.t-del:hover { color: var(--verm); }
.t-feitas { margin-top: 8px; border-top: 1px solid var(--linha); padding-top: 8px; }
.t-feitas summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--txt2); padding: 4px 2px; }

.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-nav b { font-size: 14px; min-width: 120px; text-align: center; }
.cal-nav svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-sem { text-align: center; font-size: 11.5px; font-weight: 700; color: var(--txt3); padding: 4px 0; }
.cal-dia { position: relative; aspect-ratio: 1 / .82; border: 0; background: none; border-radius: 9px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--txt); cursor: pointer; display: grid; place-items: center; }
.cal-dia:hover { background: var(--sutil); }
.cal-dia.fora { color: var(--txt3); } /* sem opacity: dia de outro mês continua clicável e precisa de contraste 4,5 (#213) */
.cal-dia.hoje { color: var(--azul2); box-shadow: inset 0 0 0 1.5px var(--azul); }
.cal-dia.sel { background: var(--azul); color: #fff; }
.pontos { position: absolute; bottom: 4px; left: 0; right: 0; display: flex; justify-content: center; gap: 3px; }
.pontos i { width: 5px; height: 5px; border-radius: 50%; }
.p-ev { background: var(--azul); } .p-tf { background: var(--ambar); }
.cal-dia.sel .pontos i { background: #fff; }
.dia-sel { margin-top: 12px; border-top: 1px solid var(--linha); padding-top: 12px; display: grid; gap: 8px; }
.novo-evento { display: grid; grid-template-columns: minmax(0, 1fr) 104px auto; gap: 6px; }
.ev-lista { list-style: none; display: grid; gap: 4px; }
.ev { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; background: var(--sutil); border-left: 3px solid var(--azul); }
.ev-tarefa { border-left-color: var(--ambar); }
.ev-hora { font-size: 12px; font-weight: 700; color: var(--txt2); white-space: nowrap; min-width: 52px; }
.ev-tit { flex: 1; min-width: 0; font-size: 14px; overflow-wrap: anywhere; }
.prox-tit { margin: 14px 0 6px; }

.notas-bloco { min-height: 300px; }
.n-busca { height: 36px; width: min(240px, 100%); }
.nota-nova { display: grid; gap: 6px; background: var(--papel); border: 1px solid var(--borda-n); border-top: 4px solid var(--nc); border-radius: 12px; padding: 10px; margin-bottom: 14px; color: var(--txt); transition: background .2s, border-color .2s; }
.nota-nova[data-cor=amarelo] { --nc: var(--n-amarelo); } .nota-nova[data-cor=rosa] { --nc: var(--n-rosa); } .nota-nova[data-cor=laranja] { --nc: var(--n-laranja); } .nota-nova[data-cor=verde] { --nc: var(--n-verde); } .nota-nova[data-cor=azul] { --nc: var(--n-azul); } .nota-nova[data-cor=roxo] { --nc: var(--n-roxo); } .nota-nova[data-cor=cinza] { --nc: var(--n-cinza); }
.nota-nova input, .nota-nova textarea, .dlg-nota input, .dlg-nota textarea { background: transparent; border: 0; box-shadow: none; color: inherit; padding: 4px 6px; resize: none; }
.nota-nova input, .dlg-nota input { font-weight: 700; font-size: 15px; }
.nota-nova input:focus, .nota-nova textarea:focus, .dlg-nota input:focus, .dlg-nota textarea:focus { outline: 0; box-shadow: none; }
.nota-pe { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.cores { display: flex; gap: 6px; flex-wrap: wrap; }
.cor { width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--nc); cursor: pointer; padding: 0; }
.cor.on { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--azul); }
.notas { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; align-items: start; }
.nota { position: relative; background: var(--papel); color: var(--txt); border: 1px solid var(--borda-n); border-top: 4px solid var(--nc); border-radius: 12px; padding: 12px 14px 16px; min-height: 90px; cursor: pointer; box-shadow: 0 1px 2px var(--sutil); transition: transform .12s, box-shadow .12s, border-color .12s; outline: 0; }
.nota:hover, .nota:focus-visible { transform: translateY(-2px); border-color: color-mix(in srgb, var(--nc) 60%, var(--linha)); box-shadow: 0 14px 28px -16px var(--sombra); }
.nota p { color: var(--txt2); }
.nota h3 { font-size: 15px; font-weight: 800; margin: 0 22px 6px 0; overflow-wrap: anywhere; }
.nota p { font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 320px; overflow: hidden; }
.nota .alca { position: absolute; top: 6px; right: 6px; color: inherit; opacity: 0; }
.nota:hover .alca, .nota .alca:focus-visible { opacity: .55; }
.nota .fixa { position: absolute; bottom: 6px; right: 8px; opacity: .55; }
.nota .fixa svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.dlg-nota { width: min(560px, calc(100vw - 24px)); border: 1px solid var(--borda-n); border-top: 5px solid var(--nc); border-radius: 16px; padding: 14px; background: linear-gradient(var(--papel), var(--papel)), var(--card); color: var(--txt); }
.dlg-nota::backdrop { background: rgba(3,5,10,.55); }
.dlg-nota form { display: grid; gap: 8px; }
.dlg-nota textarea { min-height: 200px; font-size: 15px; line-height: 1.5; }
.nota-acoes { display: flex; gap: 6px; align-items: center; }
.nota-acoes .bt.icone { color: var(--txt2); background: var(--card); border-color: var(--linha2); }
.nota-acoes .bt.icone svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; }
#nota-fixar.on { background: var(--azul); color: #fff; border-color: var(--azul); }

/* ===== Vendas ===== */
.seg { display: flex; gap: 4px; padding: 4px; background: var(--sutil); border-radius: 11px; }
.seg button { border: 0; background: none; padding: 7px 12px; border-radius: 8px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--txt2); cursor: pointer; }
.seg button.on { background: var(--card); color: var(--txt); box-shadow: 0 1px 3px var(--sombra); }
.v-grade { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.barras { display: flex; align-items: flex-end; gap: 6px; height: 190px; padding-top: 18px; }
.vbar { flex: 1; min-width: 0; height: 100%; display: grid; grid-template-rows: auto 1fr auto; justify-items: center; gap: 4px; }
.b-col { align-self: end; width: 100%; max-width: 44px; min-height: 3px; border-radius: 6px 6px 2px 2px; background: color-mix(in srgb, var(--azul) 45%, transparent); transition: height .35s; }
.vbar.top .b-col { background: var(--azul); }
.b-val { font-size: 11px; font-weight: 700; color: var(--txt2); white-space: nowrap; align-self: end; }
.b-rot { font-size: 11.5px; color: var(--txt3); font-weight: 600; }
.barras.dias { gap: 3px; }
.barras.dias .b-val { visibility: hidden; }
.barras.dias .b-rot, .barras.horas .b-rot { font-size: 11px; }
.tab-v { width: 100%; border-collapse: collapse; font-size: 14px; }
.tab-v th { text-align: left; font-size: 12px; color: var(--txt3); font-weight: 700; padding: 6px 8px; border-bottom: 1px solid var(--linha); }
.tab-v td { padding: 8px; border-bottom: 1px solid var(--linha); overflow-wrap: anywhere; }
.tab-v tr:last-child td { border-bottom: 0; }
.tab-v td:last-child, .tab-v th:last-child { text-align: right; white-space: nowrap; }
.coroa { font-size: 11px; font-weight: 800; color: #fff; background: var(--ambar); padding: 1px 6px; border-radius: 99px; }

@media (max-width: 1100px) { .emp-grade, .v-grade { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) {
  .notas { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .nota .alca { opacity: .5; }
  .t-del { opacity: .6; }
  .barras.horas .b-val { visibility: hidden; }
  .seg { width: 100%; } .seg button { flex: 1; padding: 7px 4px; }
  .cab-pag { flex-wrap: wrap; }
}

/* ===== lista suspensa (substitui o menu nativo do <select>) ===== */
.sel { position: relative; width: 100%; min-width: 0; }
.sel > select { display: none !important; }
.sel-bt { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; height: 40px; padding: 0 10px 0 12px; font: inherit; font-size: 14px; color: var(--txt);
  background: var(--campo); border: 1px solid var(--linha2); border-radius: var(--r); cursor: pointer; text-align: left; transition: border-color .15s, box-shadow .15s; }
.sel-bt span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel-bt svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--txt3); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.sel-bt:hover { border-color: var(--txt3); }
.sel-bt:focus-visible, .sel.aberto .sel-bt { outline: 0; border-color: var(--azul); box-shadow: 0 0 0 3px rgba(59,108,255,.18); }
.sel.aberto .sel-bt svg { transform: rotate(180deg); }
.sel-bt:disabled { opacity: .55; cursor: not-allowed; }
.sel-lista { position: fixed; z-index: 1000; max-height: 320px; overflow: auto; width: max-content; max-width: min(360px, calc(100vw - 16px)); padding: 5px;
  background: var(--card); border: 1px solid var(--linha2); border-radius: 12px; box-shadow: 0 18px 44px -14px var(--sombra); display: grid; gap: 1px; animation: sel-in .12s ease-out; }
@keyframes sel-in { from { opacity: 0; transform: translateY(-4px); } }
.sel-op { display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: 8px;
  font: inherit; font-size: 14px; font-weight: 500; color: var(--txt2); text-align: left; cursor: pointer; white-space: nowrap; }
.sel-op:hover, .sel-op:focus-visible { background: var(--sutil); color: var(--txt); outline: 0; }
.sel-op svg { width: 15px; height: 15px; flex: none; margin-left: auto; padding-left: 8px; box-sizing: content-box; fill: none; stroke: var(--azul2); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; visibility: hidden; }
.sel-op[aria-selected="true"] { color: var(--txt); font-weight: 700; background: rgba(59,108,255,.1); }
.sel-op[aria-selected="true"] svg { visibility: visible; }
.sel-op:disabled { opacity: .45; cursor: default; }
/* status colorido (linha do estoque e opções) */
.item .sel.st .sel-bt { height: 34px; font-size: 13px; font-weight: 700; border-radius: 99px; color: inherit; padding-left: 14px; }
.sel.st[data-v="disponivel"] .sel-bt svg, .sel.st[data-v="reservada"] .sel-bt svg, .sel.st[data-v="vendida"] .sel-bt svg, .sel.st[data-v="caida"] .sel-bt svg { stroke: currentColor; opacity: .7; }
.sel-op[data-v="disponivel"]::before, .sel-op[data-v="reservada"]::before, .sel-op[data-v="vendida"]::before, .sel-op[data-v="caida"]::before { content: ''; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.sel-op[data-v="disponivel"]::before { background: var(--verde); } .sel-op[data-v="reservada"]::before { background: var(--ambar); }
.sel-op[data-v="vendida"]::before { background: var(--roxo); } .sel-op[data-v="caida"]::before { background: var(--verm); }
/* tamanhos por lugar */
.lote .sel { width: auto; }
.lote .sel-bt { height: 32px; font-size: 13px; border-radius: 8px; min-width: 130px; }
.ord-linha .sel-bt { height: 34px; font-size: 13.5px; min-width: 140px; }
.m-ca-topo .sel { width: auto; flex: 1; }
.nova-tarefa .sel-bt { height: 38px; }

.atalhos-valor { display: flex; gap: 6px; flex-wrap: wrap; margin-top: -6px; }
.atalhos-valor:empty { display: none; }
small.opcional { font-weight: 500; color: var(--txt3); }

/* ===== Vendas: mapa de calor e funis ===== */
#v-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.v-mapa-bloco { margin-bottom: 18px; }
.v-mapa { display: grid; grid-template-columns: 34px repeat(24, minmax(0, 1fr)); gap: 3px; align-items: center; }
.v-mapa .mh { font-size: 11px; font-weight: 700; color: var(--txt3); letter-spacing: .04em; white-space: nowrap; overflow: visible; }
.v-mapa .md { font-size: 11px; font-weight: 700; color: var(--txt3); letter-spacing: .04em; }
.v-mapa i { display: block; aspect-ratio: 1.6 / 1; border-radius: 4px; cursor: default; outline: 0; }
.v-mapa i:hover, .v-mapa i:focus-visible { box-shadow: 0 0 0 2px var(--azul); }
.m0 { background: var(--sutil); } .m1 { background: color-mix(in srgb, var(--azul) 25%, transparent); } .m2 { background: color-mix(in srgb, var(--azul) 48%, transparent); }
.m3 { background: color-mix(in srgb, var(--azul) 72%, transparent); } .m4 { background: var(--azul); }
.v-mapa-leg { display: flex; align-items: center; gap: 5px; margin-top: 12px; font-size: 12px; color: var(--txt2); flex-wrap: wrap; }
.v-mapa-leg i { width: 16px; height: 11px; border-radius: 3px; display: inline-block; }
.funil { display: grid; gap: 12px; }
.f-rot { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; margin-bottom: 5px; }
.f-rot b { font-weight: 600; color: var(--txt2); }
.f-rot span { font-weight: 800; font-variant-numeric: tabular-nums; }
.f-trilho { display: flex; justify-content: center; background: var(--sutil); border-radius: 8px; height: 30px; overflow: hidden; }
.f-barra { height: 100%; border-radius: 8px; background: color-mix(in srgb, var(--azul) calc(100% - var(--i) * 18%), var(--card)); transition: width .4s; }
.f-conv { font-size: 12px; color: var(--txt3); margin-top: 4px; text-align: center; }
@media (max-width: 1180px) { #v-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  #v-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v-mapa { grid-template-columns: 30px repeat(24, minmax(0, 1fr)); gap: 2px; }
  .v-mapa i { aspect-ratio: 1 / 1.6; border-radius: 2px; }
}

/* ===== Planilha ===== */
.pl-abas { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-bottom: 10px; }
.pl-abas::-webkit-scrollbar { display: none; }
.pl-abas button { flex: none; border: 1px solid var(--linha); background: var(--card); color: var(--txt2); font: inherit; font-size: 13.5px; font-weight: 600; padding: 8px 14px; border-radius: 10px; cursor: pointer; }
.pl-abas button.on { background: var(--azul); border-color: var(--azul); color: #fff; }
.pl-abas .pl-nova { border-style: dashed; color: var(--azul2); background: transparent; }
.pl-barra { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.pl-barra #pl-info { min-width: 7em; min-height: 19.5px; } /* (07/11) reserva a linha do contador: no celular ele quebra para baixo e empurrava a planilha ao carregar */
.pl-barra input[type=search] { width: min(320px, 100%); height: 38px; }
.pl-livre-acoes { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.pl-acoes .bt svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pl-caixa { background: var(--card); border: 1px solid var(--linha); border-radius: 14px; overflow: auto; max-height: calc(100vh - 290px); min-height: 220px; }
.pl { border-collapse: separate; border-spacing: 0; font-size: 13.5px; min-width: 100%; }
.pl th, .pl td { padding: 0 10px; height: 38px; border-bottom: 1px solid var(--linha); border-right: 1px solid var(--linha); white-space: nowrap; max-width: 280px; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.pl thead th { position: sticky; top: 0; z-index: 2; background: var(--bg2); font-size: 12px; font-weight: 700; color: var(--txt2); cursor: pointer; user-select: none; }
.pl thead th:hover { color: var(--txt); }
.pl tfoot td { position: sticky; bottom: 0; background: var(--bg2); font-weight: 800; }
.pl .pl-n { position: sticky; left: 0; z-index: 1; background: var(--bg2); color: var(--txt3); font-size: 11.5px; text-align: center; width: 40px; min-width: 40px; padding: 0 6px; }
.pl thead .pl-n { z-index: 3; }
.pl .num { text-align: right; font-variant-numeric: tabular-nums; }
.pl td[tabindex] { cursor: cell; }
.pl td[tabindex]:hover { background: var(--sutil); }
.pl td[tabindex]:focus-visible { outline: 2px solid var(--azul); outline-offset: -2px; }
.pl td.ro, .pl td.calc, .pl td.data:not([tabindex]) { color: var(--txt2); }
.pl td.editando { padding: 0; overflow: visible; outline: 2px solid var(--azul); outline-offset: -2px; position: relative; }
.pl-ed { height: 37px; border: 0; border-radius: 0; background: var(--campo); width: 100%; min-width: 160px; box-shadow: none !important; }
.pl-opcoes { position: absolute; z-index: 5; top: 100%; left: 0; display: grid; gap: 2px; padding: 5px; background: var(--card); border: 1px solid var(--linha2); border-radius: 10px; box-shadow: 0 16px 36px -14px var(--sombra); min-width: 150px; }
.pl-opcoes button { border: 0; background: none; text-align: left; font: inherit; font-weight: 600; padding: 8px 10px; border-radius: 7px; cursor: pointer; }
.pl-opcoes button:hover, .pl-opcoes button:focus-visible, .pl-opcoes button.on { background: var(--sutil); outline: 0; }
.st-disponivel { color: var(--verde); } .st-reservada { color: var(--ambar); } .st-vendida { color: var(--roxo); } .st-caida { color: var(--verm); }
.pl td.st { font-weight: 700; }
.pl-del-col { border: 0; background: none; color: var(--txt3); margin-left: 6px; cursor: pointer; font-size: 15px; line-height: 1; opacity: 0; }
.pl th:hover .pl-del-col { opacity: 1; }
.pl-del-lin { border: 0; background: none; color: var(--txt3); cursor: pointer; font-size: 16px; }
.pl-del-lin:hover, .pl-del-col:hover { color: var(--verm); }
.pl-vazio { text-align: center !important; color: var(--txt3); height: 80px !important; }
.pl-dica { margin-top: 8px; font-size: 12.5px; }
@media (max-width: 700px) { .pl-caixa { max-height: calc(100vh - 330px); } .pl-livre-acoes { margin-left: 0; } .pl-del-col { opacity: 1; } }

/* ===== calendário e relógio (substituem os do navegador) ===== */
.dt { position: relative; width: 100%; min-width: 0; }
.dt > input { display: none !important; }
.dt-bt { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; height: 40px; padding: 0 10px 0 12px; font: inherit; font-size: 14px; color: var(--txt);
  background: var(--campo); border: 1px solid var(--linha2); border-radius: var(--r); cursor: pointer; text-align: left; transition: border-color .15s, box-shadow .15s; }
.dt-bt span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dt-bt .dt-vazio { color: var(--txt3); }
.dt-bt svg { width: 17px; height: 17px; flex: none; fill: none; stroke: var(--txt3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dt-bt:hover { border-color: var(--txt3); }
.dt-bt:focus-visible, .dt.aberto .dt-bt { outline: 0; border-color: var(--azul); box-shadow: 0 0 0 3px rgba(59,108,255,.18); }
.dt.aberto .dt-bt svg { stroke: var(--azul2); }
.dt-pop { position: fixed; z-index: 1000; width: 288px; max-width: calc(100vw - 16px); padding: 12px; background: var(--card); border: 1px solid var(--linha2); border-radius: 14px;
  box-shadow: 0 22px 50px -16px var(--sombra); animation: sel-in .12s ease-out; display: grid; gap: 10px; }
.dt-cab { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dt-cab b { font-size: 14.5px; font-weight: 800; text-transform: capitalize; }
.dt-nav { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--linha); background: none; color: var(--txt2); display: grid; place-items: center; cursor: pointer; }
.dt-nav:hover { background: var(--sutil); color: var(--txt); }
.dt-nav svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.dt-grade { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dt-grade > span { text-align: center; font-size: 11px; font-weight: 700; color: var(--txt3); padding: 4px 0; }
.dt-dia { height: 34px; border: 0; background: none; border-radius: 9px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--txt); cursor: pointer; font-variant-numeric: tabular-nums; }
.dt-dia:hover, .dt-dia:focus-visible { background: var(--sutil); outline: 0; }
.dt-dia.fora { color: var(--txt3); }
.dt-dia.hoje { color: var(--azul2); box-shadow: inset 0 0 0 1.5px var(--azul); }
.dt-dia.sel { background: var(--azul); color: #fff; box-shadow: none; }
.dt-dia:disabled { opacity: .25; cursor: not-allowed; }
.dt-hora { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dt-hora label { font-size: 11.5px; font-weight: 700; color: var(--txt3); gap: 4px; }
.dt-col { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; max-height: 128px; overflow: auto; padding: 4px; border: 1px solid var(--linha); border-radius: 10px; }
.dt-col button { height: 30px; border: 0; background: none; border-radius: 7px; font: inherit; font-size: 13px; font-weight: 600; color: var(--txt); cursor: pointer; font-variant-numeric: tabular-nums; }
.dt-col button:hover, .dt-col button:focus-visible { background: var(--sutil); outline: 0; }
.dt-col button.sel { background: var(--azul); color: #fff; }
.dt-pe { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--linha); padding-top: 10px; }
.dt-link { border: 0; background: none; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--azul2); cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.dt-link:hover { background: var(--sutil); }
.dt-link + .dt-link { margin-left: auto; }
.dt-ok { margin-left: 8px; height: 32px; padding: 0 14px; border: 0; border-radius: 8px; background: var(--azul); color: #fff; font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.nova-tarefa .dt-bt, .novo-evento .dt-bt { height: 38px; }
.pl td.editando .dt-bt { height: 37px; border: 0; border-radius: 0; min-width: 190px; }

/* status rollback */
/* (cor do rollback no fim do arquivo) */
.sel.st[data-v="rollback"] .sel-bt svg { stroke: currentColor; opacity: .7; }
.sel-op[data-v="rollback"]::before { content: ''; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--n-laranja); }
/* abas do topo com rolagem no celular (não estoura a tela) */
@media (max-width: 900px) { .tabs { overflow-x: auto; scrollbar-width: none; max-width: 100%; } .tabs::-webkit-scrollbar { display: none; } .tabs button { flex: none; } }

/* barras que não estouram o cartão */
.barras { min-width: 0; overflow: hidden; }
.vbar { overflow: hidden; }
.barras.dias .b-val, .barras.pilha .b-val { font-size: 0; visibility: hidden; }
.barras.dias, .barras.pilha { gap: 2px; }
.barras.dias .b-rot, .barras.pilha .b-rot { font-size: 11px; white-space: nowrap; }
/* movimento do estoque */
.v-largo { grid-column: 1 / -1; }
.c-vendida { --mc: var(--roxo); } .c-caida { --mc: var(--verm); } .c-rollback { --mc: var(--n-laranja); } .c-reposicao { --mc: var(--azul); }
.mov-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 8px; }
.mov-k { border: 1px solid var(--linha); border-left: 4px solid var(--mc); border-radius: 10px; padding: 10px 12px; }
.mov-k b { display: block; font-size: 22px; font-weight: 800; }
.mov-k span { font-size: 12.5px; color: var(--txt2); font-weight: 600; }
.b-pilha { align-self: end; width: 100%; max-width: 30px; height: 100%; display: flex; flex-direction: column-reverse; justify-self: center; }
.b-pilha i { display: block; background: var(--mc); min-height: 3px; }
.b-pilha i:last-child { border-radius: 4px 4px 0 0; }
.mov-leg { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; font-size: 12.5px; color: var(--txt2); }
.mov-leg i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--mc); margin-right: 5px; vertical-align: -1px; }
.st[data-v="reposicao"], .st-reposicao { color: var(--azul2); }
.sel.st[data-v="reposicao"] .sel-bt svg { stroke: currentColor; opacity: .7; }
.sel-op[data-v="reposicao"]::before { content: ''; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--azul); }
@media (max-width: 600px) { .mov-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* HIG (Charts): rótulo do eixo nunca abaixo de 11px. No celular, em vez de sumir com todos, mostra um dia a cada cinco (contando do último) */
@media (max-width: 600px) {
  .barras.dias, .barras.pilha, .barras.dias .vbar, .barras.pilha .vbar { overflow: visible; }
  .barras.dias .vbar, .barras.pilha .vbar { grid-template-columns: minmax(0, 1fr); }
  .barras.dias .vbar:not(:nth-last-child(5n+1)) .b-rot, .barras.pilha .vbar:not(:nth-last-child(5n+1)) .b-rot { visibility: hidden; }
}

.v-perso { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin: -6px 0 16px; }
.v-perso label { width: 170px; }
.cab-pag .seg { flex-wrap: wrap; }

/* ---------- equipe: app, notificações de trabalho e sons ---------- */
.eq-cab { margin-top: 34px; }
.som-linha { display: flex; align-items: flex-end; gap: 8px; }
.som-linha label { flex: 1; min-width: 0; }
.som-linha .bt { height: 40px; flex: none; }
.eq-estado { margin: 0; color: var(--txt2); font-size: 14px; }
.eq-estado .ok { color: var(--verde); }
.eq-acoes { display: flex; flex-wrap: wrap; gap: 8px; }
.eq-dica { margin: 0; font-size: 13px; color: var(--txt3); }
.eq-sub { margin-top: 10px; }
.eq-nota { margin: -4px 0 0; font-size: 12.5px; color: var(--txt3); }
.eq-sons { display: grid; gap: 8px; }
.eq-som { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 170px) auto; align-items: center; gap: 8px 10px; }
.eq-som .chave { flex: none; }
.eq-som > span { font-size: 13.5px; font-weight: 600; color: var(--txt2); min-width: 0; }
.eq-som .bt.icone svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.eq-hist-cab { margin-top: 18px; }
.eq-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; margin-right: 4px; background: var(--sutil); color: var(--txt2); }
.eq-venda, .eq-tag[data-t="venda"], .eq-tag[data-t="meta"], .eq-atualizacao, .eq-tag[data-t="atualizacao"] { background: color-mix(in srgb, var(--verde) 14%, transparent); color: var(--verde); }
.eq-estoque, .eq-lembrete, .eq-tag[data-t="estoque"], .eq-tag[data-t="lembrete"], .eq-tag[data-t="reposicao"], .eq-tag[data-t="reservada"], .eq-tag[data-t="desfazer"] { background: color-mix(in srgb, var(--ambar) 16%, transparent); color: var(--ambar); }
.eq-tarefa, .eq-agenda, .eq-tag[data-t="tarefa"], .eq-tag[data-t="agenda"], .eq-tag[data-t="empresa"], .eq-tag[data-t="preferencia"], .eq-tag[data-t="lead"], .eq-tag[data-t="whatsapp"], .eq-tag[data-t="voltou"], .eq-tag[data-t="cliente"] { background: color-mix(in srgb, var(--azul2) 14%, transparent); color: var(--azul2); }
.eq-tag[data-t="caida"], .eq-tag[data-t="rollback"], .eq-tag[data-t="login"] { background: color-mix(in srgb, var(--verm) 14%, transparent); color: var(--verm); }
.eq-aviso, .eq-tag[data-t="aviso"], .eq-tag[data-t="site"] { background: color-mix(in srgb, var(--roxo) 16%, transparent); color: var(--roxo); }
.eq-n { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; margin-right: 4px; border: 1px solid var(--linha2); color: var(--txt2); }
.eq-item b, .eq-item span { overflow-wrap: anywhere; }
.eq-link { cursor: pointer; border-radius: 10px; margin: 0 -8px; padding-left: 8px; padding-right: 8px; transition: background .12s; }
.eq-link:hover { background: var(--sutil); }
.eq-link:focus-visible { outline: 2px solid var(--azul); outline-offset: -2px; }
.eq-grupo { display: grid; gap: 8px; }
.eq-grupo + .eq-grupo { margin-top: 8px; }
.eq-grupo h3 { margin: 4px 0 0; font-size: 12px; font-weight: 700; letter-spacing: 0; color: var(--txt3); }
.eq-som.desl > span { color: var(--txt3); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--txt3) 60%, transparent); }
.eq-som .chave:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.eq-filtro { width: 190px; max-width: 100%; }
.eq-hist-cab { flex-wrap: wrap; gap: 8px; }
.eq-hist-cab .eq-acoes { align-items: center; min-width: 0; }
.eq-hist-cab .eq-acoes > .sel, .eq-hist-cab .eq-acoes > select { flex: 1 1 170px; min-width: 0; max-width: 220px; }
#dlg-novidades { width: min(620px, calc(100% - 32px)); }
#dlg-novidades .hist-item small { color: var(--txt3); font-size: 12px; }
@media (max-width: 520px) {
  .eq-som { grid-template-columns: auto minmax(0, 1fr) auto; }
  .eq-som > span { grid-column: 2 / -1; }
  .eq-som > select, .eq-som > .sel { grid-column: 1 / 3; }
}
#f-equipe { display: grid; gap: 16px; }

.mais-lista { padding: 18px; text-align: center; color: var(--txt3); font-size: 13px; }
.bt-instalar { background: var(--azul); border-color: var(--azul); color: #fff; }
.bt-instalar svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.toast { width: max-content; max-width: min(460px, calc(100vw - 32px)); text-align: center; line-height: 1.4; }

/* ---------- metas (aba Vendas) ---------- */
.metas-bloco { margin-bottom: 14px; }
.metas { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.meta { border: 1px solid var(--linha); border-radius: 12px; padding: 14px; min-width: 0; display: grid; gap: 8px; cursor: pointer; background: var(--card); text-align: left; transition: border-color .15s; }
.meta:hover, .meta:focus-visible { border-color: var(--azul); outline: 0; }
.meta-cab { display: grid; gap: 2px; min-width: 0; }
.meta-cab h3 { font-size: 15px; font-weight: 700; min-width: 0; overflow: hidden; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.meta-cab small { font-size: 12px; color: var(--txt3); overflow-wrap: anywhere; }
.meta-num { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; min-width: 0; }
.meta-num b { font-size: 20px; font-weight: 800; letter-spacing: -.02em; overflow-wrap: anywhere; }
.meta-num span { color: var(--txt3); font-size: 13px; overflow-wrap: anywhere; }
.meta-num em { margin-left: auto; font-style: normal; font-weight: 800; font-size: 14px; color: var(--azul); }
.meta.ok .meta-num em { color: var(--verde); }
.meta-trilho { height: 10px; border-radius: 99px; background: var(--sutil); overflow: hidden; }
.meta-barra { height: 100%; border-radius: inherit; background: var(--azul); transition: width .5s ease; }
.meta.ok .meta-barra { background: var(--verde); }
.meta-pe { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--txt2); min-width: 0; }
.meta-pe span { overflow-wrap: anywhere; }
.meta-pe .ok-txt { color: var(--verde); font-weight: 700; }
.meta-pe .atras-txt { color: var(--ambar); font-weight: 600; }
.campo-pre { position: relative; display: block; }
.campo-pre i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-style: normal; font-weight: 600; color: var(--txt3); pointer-events: none; }
.campo-pre i:not(:empty) + input { padding-left: 38px; }
.linha2:has(> [hidden]) { grid-template-columns: minmax(0, 1fr); }

/* ---------- desfazer, confirmação e histórico ---------- */
#dlg-confirmar { width: min(480px, calc(100% - 32px)); }
#dlg-hist { width: min(640px, calc(100% - 32px)); }
#conf-txt { line-height: 1.5; }
.conf-cods { display: flex; flex-wrap: wrap; gap: 6px; max-height: 180px; overflow: auto; padding: 10px; border: 1px solid var(--linha); border-radius: 10px; background: var(--sutil); }
.conf-cods span { font-size: 12.5px; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: var(--card); border: 1px solid var(--linha2); overflow-wrap: anywhere; }
.conf-alerta { display: inline-block; margin-top: 8px; color: var(--ambar); font-weight: 600; font-size: 13.5px; }
.bt.perigo-cheio { background: var(--verm); border-color: var(--verm); color: #fff; }
.hist-dica { font-size: 13.5px; }
.hist-lista { display: grid; }
.hist-acao { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--linha); }
.hist-acao:first-child { border-top: 0; }
.hist-txt { display: grid; gap: 3px; min-width: 0; }
.hist-txt b { font-size: 14px; overflow-wrap: anywhere; }
.hist-txt small { font-size: 12.5px; color: var(--txt3); overflow-wrap: anywhere; }
.hist-acao.desfeito b { color: var(--txt3); text-decoration: line-through; }
.hist-desf { color: var(--verde) !important; font-weight: 600; }
.hist-acao .bt { flex: none; }
.aviso-desfazer { position: fixed; inset: auto; margin: 0; border: 0; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 100; display: flex; align-items: center; gap: 14px; width: max-content; max-width: calc(100vw - 32px);
  padding: 10px 10px 10px 16px; border-radius: 12px; background: var(--txt); color: var(--bg); font-weight: 600; box-shadow: 0 14px 34px -10px var(--sombra); overflow: hidden; animation: aviso-entra .18s ease-out; }
.aviso-desfazer span { min-width: 0; overflow-wrap: anywhere; line-height: 1.35; font-size: 14px; }
.aviso-desfazer .bt { flex: none; background: transparent; color: var(--bg); border-color: color-mix(in srgb, var(--bg) 40%, transparent); }
.aviso-desfazer .bt:hover { background: color-mix(in srgb, var(--bg) 14%, transparent); }
.aviso-barra { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--azul); transform-origin: left; animation: aviso-tempo 8s linear forwards; }
@keyframes aviso-tempo { to { transform: scaleX(0); } }
@keyframes aviso-entra { from { opacity: 0; transform: translate(-50%, 8px); } }
@media (max-width: 900px) { #bt-hist span { display: none; } #bt-hist { width: 40px; padding: 0; } .aviso-desfazer { bottom: 16px; } }
@media (max-width: 900px) { #dlg-confirmar, #dlg-hist { width: 100%; } #dlg-confirmar { height: fit-content; top: auto; margin-bottom: 0; border-radius: 18px 18px 0 0; } #dlg-confirmar form { height: auto; } }

/* =====================================================================
   POLIMENTO UI/UX (out/2026): contraste, números, estados, toque, carregamento
   ===================================================================== */
:root { --laranja-txt: #b04f17; --anel: 0 0 0 3px rgba(59,108,255,.22); }
@media (prefers-color-scheme: dark) { :root:not([data-tema="claro"]) { --laranja-txt: #ff8f52; } }
:root[data-tema="escuro"] { --laranja-txt: #ff8f52; }
.st[data-v="rollback"], .st-rollback { color: var(--laranja-txt); }
.coroa, .qtd, .t-vivo-n:not(:empty) { color: var(--card); }
.meta-num em { color: var(--azul2); }

/* números alinhados */
/* (a fonte alarga ponto e vírgula no modo tabular: só em contagens e datas, sem separador de milhar) */
.hist-num, .inscritos b, .mov-k b, .t-fl-n, .cal-dia, .prazo, .n-lista, .qtd, .chip-adm span, .t-vivo-n { font-variant-numeric: tabular-nums; }
.item > .v, .item > .g { white-space: nowrap; }

/* estados dos botões e controles */
.bt { transition: border-color .15s, background .15s, color .15s, transform .08s, box-shadow .15s; }
@media (hover: hover) {
  .bt:hover:not(:disabled) { background: var(--sutil); }
  .bt.primario:hover:not(:disabled) { background: var(--azul); filter: brightness(1.1); }
  .bt.perigo-cheio:hover:not(:disabled) { background: var(--verm); filter: brightness(1.08); }
  .tabs button:hover:not(.on), .seg button:hover:not(.on), .seg-disp button:hover:not([aria-pressed="true"]), .modo button:hover:not([aria-pressed="true"]) { color: var(--txt); background: var(--sutil); }
  .chip-adm:hover:not([aria-pressed="true"]) { border-color: var(--txt3); color: var(--txt); }
}
@media (hover: none) { .bt:hover { border-color: var(--linha2); } .bt.primario:hover { filter: none; } }
.bt:active:not(:disabled) { transform: translateY(1px); }
.bt:disabled, .bt[aria-disabled="true"] { opacity: .5; cursor: not-allowed; filter: none; }
.bt:disabled:hover { border-color: var(--linha2); }
.bt.primario:disabled:hover { border-color: var(--azul); }
.bt.carregando { position: relative; color: transparent !important; pointer-events: none; }
.bt.carregando::after { content: ''; position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-color: #fff #fff transparent transparent; animation: girar .7s linear infinite; }
.bt:not(.primario):not(.perigo-cheio).carregando::after { border-color: var(--txt2) var(--txt2) transparent transparent; }
@keyframes girar { to { transform: rotate(360deg); } }
.tabs button, .seg button, .seg-disp button, .modo button, .chip-adm, .m-seg button, .pl-abas button, .tema-op, .link-adm, .fechar-dlg, .tag-f { transition: background .15s, color .15s, border-color .15s, box-shadow .15s; }
.tag-f:hover { border-color: var(--azul); background: rgba(59,108,255,.18); }
.link-adm:hover { text-decoration: underline; }
.tabs button:focus-visible, .seg button:focus-visible, .chip-adm:focus-visible, .pl-abas button:focus-visible { outline: 2px solid var(--azul); outline-offset: 1px; }
.chave:focus-visible, .cor:focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; }
.chave:hover { filter: brightness(1.05); }
input:disabled, textarea:disabled { opacity: .6; cursor: not-allowed; }
input[aria-invalid="true"] { border-color: var(--verm); }
.cp { position: relative; }

/* área de toque maior sem mudar o desenho (ícones pequenos) */
.alvo-ext { position: relative; }
.alvo-ext::after, .cor::after, .chave::before, .t-del::after, .alca::after, .m-x::after { content: ''; position: absolute; inset: -10px; }
.cor, .t-del, .alca, .m-x { position: relative; }

/* avisos (toast) com tipo: sucesso / erro */
.toast { top: auto; right: auto; margin: 0; border: 0; display: flex; align-items: center; gap: 10px; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); animation: aviso-entra .18s ease-out; }
.toast::before { content: ''; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--azul); }
.toast.ok::before { background: var(--verde); }
.toast.erro { background: var(--verm); color: #fff; }
.toast.erro::before { background: #fff; }

/* carregando: esqueleto em vez de branco */
.sk { display: block; border-radius: 8px; background: linear-gradient(90deg, var(--sutil) 25%, color-mix(in srgb, var(--txt3) 14%, transparent) 50%, var(--sutil) 75%); background-size: 200% 100%; animation: sk 1.3s ease-in-out infinite; }
@keyframes sk { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.sk-kpi { min-height: 92px; display: grid; gap: 10px; align-content: start; }
.sk-kpi .sk:nth-child(1) { width: 55%; height: 12px; } .sk-kpi .sk:nth-child(2) { width: 70%; height: 24px; } .sk-kpi .sk:nth-child(3) { width: 45%; height: 10px; }
.sk-linhas { display: grid; gap: 12px; padding: 16px 18px; }
.sk-linha { display: grid; grid-template-columns: 22px 70px minmax(0, 1fr) 90px 120px; gap: 14px; align-items: center; }
.sk-linha .sk { height: 14px; } .sk-linha .sk:first-child { height: 18px; }
.sk-bloco { display: grid; gap: 10px; padding: 4px 0; }
.sk-bloco .sk { height: 14px; } .sk-bloco .sk:nth-child(2n) { width: 82%; } .sk-bloco .sk:nth-child(3n) { width: 64%; }
.lista > .sk-linhas { padding: 18px; }
@media (max-width: 900px) { .sk-linha { grid-template-columns: 22px minmax(0, 1fr) 70px; } .sk-linha .sk:nth-child(n+4) { display: none; } .lista > .sk-linhas { background: var(--card); border: 1px solid var(--linha); border-radius: 14px; } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } .bt.carregando::after { animation-duration: 1.6s; } }

/* estados vazios com ação */
.vazio { display: grid; justify-items: center; gap: 10px; }
.vazio b { color: var(--txt); font-size: 15px; }
.vazio-acao { display: grid; justify-items: start; gap: 10px; }

/* abas do topo: indica que dá para rolar (sombra nas pontas) */
@media (min-width: 901px) {
  .tabs { overflow-x: auto; scrollbar-width: none; min-width: 0; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { flex: none; white-space: nowrap; }
  .marca-p b { white-space: nowrap; }
  /* abas não cabem ao lado da marca (painel.js linhasAbas): linha própria, largura toda */
  html.abas-2l .barra { height: auto; }
  html.abas-2l .barra > .barra-in { height: auto !important; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; row-gap: 8px; }
  html.abas-2l .barra-in .tabs { order: 3; flex: 1 1 100%; }
  html.abas-2l .barra-in .tabs button { flex: 1 0 auto; }
}
.tabs { scroll-behavior: smooth; scroll-padding-inline: 24px; }
@media all {
  .tabs.rola-dir { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
  .tabs.rola-esq { -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px); mask-image: linear-gradient(90deg, transparent, #000 28px); }
  .tabs.rola-esq.rola-dir { -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent); }
}

/* indicadores: no celular só o primeiro ocupa a linha quando a quantidade é ímpar */
@media (max-width: 900px) {
  .kpi:first-child { grid-column: auto; }
  .kpi:first-child:nth-last-child(odd) { grid-column: 1 / -1; }
  .kpi i { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* períodos (Hoje, 7 dias...) sem quebrar palavra no celular */
.seg button { white-space: nowrap; }
@media (max-width: 600px) {
  .cab-pag .seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cab-pag .seg button { padding: 7px 4px; }
  .t-sub { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .t-sub button { padding: 7px 2px; font-size: 13px; }
  #t-lst { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  #t-lst button { padding: 5px 2px; }
}

/* janelas: altura certa no celular (barra do navegador) */
dialog form, .t-dlg-in { max-height: calc(100dvh - 34px); }
@media (max-width: 900px) { dialog form { max-height: 100dvh; } .t-dlg-in { max-height: 100dvh; height: 100%; } .dlg-pe { padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); } }
dialog:focus-visible { outline: 0; }

/* celular e tablet: alvos de toque com pelo menos 44px */
@media (max-width: 900px) {
  .bt, .bt.mini, .bt.pequeno, .som-linha .bt, .nova-tarefa .bt, .novo-evento .bt { height: 44px; min-height: 44px; }
  .bt.icone, .bt-vitrine, .bt-instalar, .barra-dir .bt, #bt-hist, .icone-mini, .hist-dir .bt, .nota-acoes .bt.icone { width: 44px; height: 44px; }
  input:not([type="checkbox"]):not([type="radio"]), select, .sel-bt, .dt-bt, .nova-tarefa input, .nova-tarefa .sel-bt, .nova-tarefa .dt-bt, .novo-evento input, .novo-evento .dt-bt, .pl-barra input[type=search], .n-busca, .ord-linha .sel-bt, .lote .sel-bt, .busca-adm { height: 44px; }
  .item .sel.st .sel-bt { height: 44px; }
  .busca-adm input { height: 100%; }
  .tabs button { min-height: 44px; }
  .seg button, .seg.mini button, .seg-disp button, .modo button, .m-seg button { min-height: 44px; }
  .chip-adm, .tag-f { min-height: 44px; }
  .pl-abas button { min-height: 44px; }
  .fechar-dlg { width: 44px; height: 44px; margin-right: -6px; }
  .cal-nav .bt { width: 44px; height: 44px; }
  .t-chave { height: 44px; }
  .link-adm, .link-esqueci, .dt-link { min-height: 44px; padding: 0 6px; }
  .t-feitas summary { padding: 12px 2px; }
  .marca-p { min-height: 44px; }
  .t-lead-bt { min-height: 44px; }
  .m-x { min-width: 44px; min-height: 44px; display: grid; place-items: center; }
  .ord-linha { grid-template-columns: 26px minmax(0, 1fr) auto 44px 44px; }
  .checks label, .m-checks label { min-height: 44px; }
  .item .ck { width: 44px; height: 44px; margin: -11px; justify-content: center; cursor: pointer; }
  .tema-op { min-height: 44px; }
  .sel-op { min-height: 44px; }
  .login .bt { height: 48px; }
  .marca-p { min-width: 44px; justify-content: center; }
  .tabs button { min-width: 44px; }
  .t-filtros .t-chave { height: 44px; }
  .t-equipe-box .t-equipe-bt { min-height: 44px; }
}
@media (max-width: 520px) { .ord-linha { grid-template-columns: 26px minmax(0, 1fr) 44px 44px; } }
.item .ck { flex-direction: row; }
/* abas do celular: largura do texto (não espremer) */
@media (max-width: 900px) { .barra-in .tabs button { flex: 1 0 auto; } }
/* botão de limpar das buscas no tema (sem o "x" padrão do navegador) */
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; margin-left: 6px; cursor: pointer; background-color: var(--txt3);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7 7 17'/%3E%3C/svg%3E") center / 18px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7 7 17'/%3E%3C/svg%3E") center / 18px no-repeat; }
input[type="search"]::-webkit-search-cancel-button:hover { background-color: var(--txt); }
/* caixinhas de marcar no tema (sem o visual padrão) */
input[type="checkbox"] { -webkit-appearance: none; appearance: none; flex: none; width: 18px; height: 18px; margin: 0; border: 1.5px solid var(--txt3); border-radius: 5px; background: var(--campo); display: inline-grid; place-content: center; cursor: pointer; transition: background .12s, border-color .12s; }
input[type="checkbox"]::before { content: ''; width: 12px; height: 12px; background: #fff; transform: scale(0); transition: transform .12s;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat; }
input[type="checkbox"]:checked { background: var(--azul); border-color: var(--azul); }
input[type="checkbox"]:checked::before { transform: scale(1); }
@media (hover: hover) { input[type="checkbox"]:hover:not(:checked) { border-color: var(--azul); } }
input[type="checkbox"]:focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; }
.m-x svg, .icone-mini svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.m-x { display: inline-grid; place-items: center; min-width: 28px; min-height: 28px; }
@media (max-width: 900px) { .m-x { min-width: 44px; min-height: 44px; } .seg button { min-width: 44px; } }
/* venda e metas no celular: folha que sobe de baixo, só da altura do conteúdo */
@media (max-width: 900px) {
  #dlg-venda, #dlg-meta { height: fit-content; top: auto; margin: auto 0 0; max-height: calc(100% - 24px); }
  #dlg-venda form, #dlg-meta form { max-height: calc(100dvh - 24px); }
}
label > small.opcional { margin-top: -4px; }

/* ---------- preferências salvas (filtros + ordem + busca) ---------- */
#bt-pref svg { fill: none; }
#bt-pref.on svg { fill: var(--ambar); stroke: var(--ambar); }
#pop-pref { left: auto; right: 0; width: min(420px, calc(100vw - 32px)); gap: 12px; padding: 14px; }
.pref-cab { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pref-cab h4 { margin: 0; }
.pref-fechar { display: none; }
.pref-lista { display: grid; gap: 6px; min-width: 0; }
.pref-vazio { color: var(--txt3); font-size: 13.5px; padding: 6px 2px; line-height: 1.45; }
.pref-item { border: 1px solid var(--linha); border-radius: 12px; background: var(--bg2); min-width: 0; }
.pref-item.ativa { border-color: var(--azul); box-shadow: inset 3px 0 0 var(--azul); }
.pref-linha { display: flex; align-items: stretch; min-width: 0; }
.pref-aplicar { flex: 1; min-width: 0; min-height: 52px; display: grid; gap: 1px; text-align: left; padding: 8px 12px; background: none; border: 0; border-radius: 12px; cursor: pointer; }
.pref-aplicar:hover { background: var(--sutil); }
.pref-nome { display: flex; align-items: center; gap: 6px; min-width: 0; font-weight: 700; font-size: 14px; }
.pref-nome > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pref-selo { flex: none; font-size: 11px; font-weight: 700; line-height: 1; padding: 4px 7px; border-radius: 99px; background: var(--sutil); color: var(--txt2); }
.pref-selo.padrao { background: color-mix(in srgb, var(--ambar) 18%, transparent); color: var(--ambar); }
.pref-resumo { font-size: 12.5px; color: var(--txt3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pref-mais { flex: none; width: 44px; min-height: 44px; display: grid; place-items: center; background: none; border: 0; border-left: 1px solid var(--linha); border-radius: 0 12px 12px 0; color: var(--txt2); cursor: pointer; }
.pref-mais:hover, .pref-mais[aria-expanded="true"] { background: var(--sutil); color: var(--txt); }
.pref-mais svg, .pref-acoes svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pref-mais svg circle { fill: currentColor; stroke: none; }
.pref-acoes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; padding: 8px; border-top: 1px solid var(--linha); }
.pref-acoes .bt { height: 44px; justify-content: flex-start; padding: 0 10px; font-size: 13.5px; min-width: 0; }
.pref-acoes .bt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pref-pe { display: grid; gap: 8px; border-top: 1px solid var(--linha); padding-top: 12px; }
.pref-pe .bt { height: 44px; width: 100%; }
.pref-pe small { color: var(--txt3); font-size: 12px; line-height: 1.4; }
.tag-pref { position: relative; display: inline-flex; align-items: center; gap: 6px; border-color: color-mix(in srgb, var(--ambar) 55%, transparent); background: color-mix(in srgb, var(--ambar) 12%, transparent); max-width: 100%; }
.tag-pref::after { content: ''; position: absolute; inset: -8px -2px; }
.tag-pref span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tag-pref svg { width: 13px; height: 13px; flex: none; fill: var(--ambar); stroke: var(--ambar); stroke-width: 2; stroke-linejoin: round; }
.tag-pref i { font-style: normal; font-weight: 600; color: var(--ambar); white-space: nowrap; }
.conf-erro { display: block; color: var(--verm); font-size: 12.5px; font-weight: 600; margin-top: 6px; }
.conf-opcao { margin-top: 10px; height: 44px; }
@keyframes pref-sobe { from { transform: translateY(100%); } }
@media (max-width: 900px) {
  .ferramentas > .pref-wrap { flex: 0 0 auto; }
  #bt-pref span { display: none; }
  #bt-pref { width: 44px; padding: 0; }
  .ferramentas #pop-pref { position: fixed; top: auto; bottom: 0; left: 0; right: 0; width: auto; max-height: min(78dvh, calc(100dvh - 90px)); border-radius: 18px 18px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); z-index: 60; box-shadow: 0 0 0 100vmax rgba(5, 8, 16, .45), 0 -10px 40px -10px var(--sombra); animation: pref-sobe .2s ease-out; }
  .pref-fechar { display: grid; }
  .pref-acoes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .ferramentas #pop-pref { animation: none; } }

/* ---------- copiar direto: Clientes / Revenda / Interno ---------- */
.copias { --c-cli: var(--azul); --c-rev: var(--ambar); display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; min-width: 0; }
:root[data-tema="escuro"] .copias { --c-cli: #7d9dff; }
@media (prefers-color-scheme: dark) { :root:not([data-tema="claro"]) .copias { --c-cli: #7d9dff; } }
.item .copias { margin-top: 8px; flex-wrap: wrap; }
.cpx { --c: var(--txt2); gap: 6px; color: var(--c); border-color: color-mix(in srgb, var(--c) 45%, var(--linha2)); background: color-mix(in srgb, var(--c) 8%, var(--bg2)); }
.cpx:hover { border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, var(--bg2)); }
.cpx:focus-visible { outline-color: var(--c); }
.cpx svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cpx-clientes { --c: var(--c-cli); } .cpx-revenda { --c: var(--c-rev); }
.cpx-interno { --c: var(--txt2); margin-left: 10px; position: relative; }
.cpx-interno::before { content: ''; position: absolute; left: -9px; top: 20%; bottom: 20%; width: 1px; background: var(--linha2); }
.cpx.off { --c: var(--txt3); opacity: .6; border-style: dashed; background: transparent; cursor: not-allowed; }
.cpx.copiado { --c: var(--verde); border-color: var(--verde); background: color-mix(in srgb, var(--verde) 14%, var(--bg2)); }
.dlg-pe .copias, .dlg-pe .cpx span { flex: none; }
@media (max-width: 900px) {
  .copias, .item .copias { width: 100%; flex-wrap: nowrap; }
  .copias .cpx { flex: 1 1 0; min-width: 0; height: 44px; padding: 0 6px; font-size: 13px; }
  .cpx-interno { margin-left: 12px; }
  .cpx span { overflow: hidden; text-overflow: ellipsis; }
  .lote .copias { flex-basis: 100%; }
  .dlg-pe .copias, .dlg-pe .cpx span { display: flex; } .dlg-pe .cpx span { display: inline; }
  .dlg-pe .copias { flex: 1 1 100%; order: -1; }
}
.toast.t-clientes { background: var(--azul); color: #fff; }
.toast.t-revenda { background: #8f5c00; color: #fff; }
.toast.t-interno { background: var(--txt); color: var(--bg); outline: 2px dashed var(--verm); outline-offset: 2px; }
.toast.t-clientes::before, .toast.t-revenda::before { background: #fff; }
.toast.t-interno::before { background: var(--verm); }

/* login: manter conectado (interruptor no tema) */
.lembrar { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; background: var(--sutil); border: 1px solid var(--linha); border-radius: 12px; padding: 12px 14px; font: inherit; color: var(--txt); cursor: pointer; transition: border-color .15s, background .15s; }
.lembrar:hover { border-color: var(--linha2); }
.lembrar-tr { width: 38px; height: 22px; border-radius: 99px; background: var(--linha2); position: relative; flex: none; margin-top: 1px; transition: background .15s; }
.lembrar-tr::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s; }
.lembrar[aria-checked="true"] { border-color: color-mix(in srgb, var(--azul) 45%, transparent); background: color-mix(in srgb, var(--azul) 8%, transparent); }
.lembrar[aria-checked="true"] .lembrar-tr { background: var(--azul); }
.lembrar[aria-checked="true"] .lembrar-tr::after { transform: translateX(16px); }
.lembrar-txt { display: grid; gap: 2px; min-width: 0; }
.lembrar-txt b { font-size: 14px; font-weight: 600; }
.lembrar-txt small { font-size: 12.5px; color: var(--txt3); line-height: 1.4; }
@media (prefers-reduced-motion: reduce) { .lembrar-tr, .lembrar-tr::after { transition: none; } }

/* Equipe: aparelhos conectados */
.ap-box { max-width: none; margin-top: 18px; }
.ap-box .hist-cab { align-items: flex-start; flex-wrap: wrap; }
.ap-nota { margin: 4px 0 0; }
.ap-item { justify-content: flex-start; align-items: center; }
.ap-item > div:not(.hist-dir) { flex: 1; }
.ap-item small { color: var(--txt3); font-size: 12px; }
.ap-ic { width: 38px; height: 38px; border-radius: 10px; background: var(--sutil); border: 1px solid var(--linha); display: grid; place-items: center; flex: none; color: var(--txt2); }
.ap-ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ap-atual .ap-ic { color: var(--azul2); border-color: color-mix(in srgb, var(--azul) 40%, transparent); background: color-mix(in srgb, var(--azul) 10%, transparent); }
.ap-selo { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--azul2); background: color-mix(in srgb, var(--azul) 12%, transparent); border-radius: 99px; padding: 2px 8px; margin-left: 6px; white-space: nowrap; vertical-align: 1px; }
.ap-item .hist-dir .bt { width: auto; padding: 0 12px; }
@media (max-width: 560px) {
  .ap-item { flex-wrap: wrap; }
  .ap-item .hist-dir { width: 100%; padding-left: 50px; }
  #ap-outros { width: 100%; }
}

/* ---------- Conferir lista (status atual das BMs de uma lista colada) ---------- */
#dlg-conferir { width: min(920px, calc(100% - 32px)); }
.cf-corpo { gap: 14px; grid-auto-rows: max-content; align-content: start; }
.cf-campo { display: grid; gap: 6px; color: var(--txt); font-weight: 600; font-size: 13.5px; }
.cf-campo small { font-weight: 500; color: var(--txt3); margin-left: 4px; }
#cf-txt { min-height: 120px; font-size: 14px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.cf-estado { font-size: 13px; color: var(--txt3); }
.cf-estado:empty { display: none; }
.cf-resumo { display: flex; flex-wrap: wrap; gap: 6px; }
.cf-resumo:empty { display: none; }
.cf-n { --c: var(--txt3); display: inline-flex; align-items: baseline; gap: 5px; padding: 5px 10px; border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); }
.cf-n b { font-size: 15px; }
.cf-tag { --c: var(--txt3); display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 700; white-space: nowrap; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); border: 1px solid color-mix(in srgb, var(--c) 32%, transparent); }
.cf-tag::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
:is(.cf-tag, .cf-n)[data-st="disponivel"] { --c: var(--verde); } :is(.cf-tag, .cf-n)[data-st="reservada"] { --c: var(--ambar); } :is(.cf-tag, .cf-n)[data-st="vendida"] { --c: var(--txt3); }
:is(.cf-tag, .cf-n)[data-st="caida"], :is(.cf-tag, .cf-n)[data-st="nao"] { --c: var(--verm); } :is(.cf-tag, .cf-n)[data-st="rollback"] { --c: var(--laranja-txt); } :is(.cf-tag, .cf-n)[data-st="reposicao"] { --c: var(--azul2); } :is(.cf-tag, .cf-n)[data-st="ambiguo"] { --c: var(--ambar); }
.cf-n.cf-mud { --c: var(--ambar); }
.cf-res { display: grid; border: 1px solid var(--linha); border-radius: 12px; overflow: clip; }
.cf-res:empty { display: none; }
.cf-linha { display: grid; grid-template-columns: minmax(110px, 1.1fr) 150px minmax(0, 2.4fr); gap: 4px 14px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--linha); min-width: 0; }
.cf-linha:first-child { border-top: 0; }
.cf-cab { background: var(--sutil); font-size: 12px; font-weight: 700; color: var(--txt3); letter-spacing: 0; padding-top: 8px; padding-bottom: 8px; }
.cf-linha.mudou { box-shadow: inset 3px 0 0 var(--ambar); background: color-mix(in srgb, var(--ambar) 5%, transparent); }
.cf-cod { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; min-width: 0; }
.cf-cod b { font-size: 15px; font-weight: 800; letter-spacing: .01em; }
.cf-cod small { font-size: 12px; color: var(--txt3); font-weight: 600; }
.cf-cod .cf-marca { padding: 0 6px; border: 1px solid var(--linha2); border-radius: 6px; }
.cf-cod .cf-id { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cf-porid { color: var(--txt2); font-weight: 600; }
.cf-meta { display: grid; grid-template-columns: minmax(70px, .8fr) minmax(110px, 1fr) minmax(80px, 1fr); gap: 14px; min-width: 0; font-size: 13.5px; color: var(--txt2); }
.cf-meta > span { min-width: 0; overflow-wrap: anywhere; }
.cf-vit.on { color: var(--verde); font-weight: 600; }
.cf-preco { font-weight: 600; color: var(--txt); font-variant-numeric: tabular-nums; }
.cf-cab .cf-meta, .cf-cab .cf-preco { color: inherit; font-weight: inherit; font-size: inherit; }
.cf-notas { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--txt3); }
.cf-notas > span { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.cf-mudou { color: var(--ambar); font-weight: 700; }
.cf-amb { color: var(--ambar); font-weight: 600; }
.cf-escolher .bt.mini { height: 30px; }
.cf-notas .link-adm { font-size: 12.5px; padding: 0; }
.cf-previa h3 { font-size: 12px; font-weight: 700; color: var(--txt3); letter-spacing: 0; margin-bottom: 6px; }
.cf-previa pre { margin: 0; padding: 12px 14px; border: 1px dashed var(--linha2); border-radius: 10px; background: var(--sutil); font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 220px; overflow: auto; }
.cf-pe { flex-wrap: wrap; }
.cf-so { display: inline-flex; flex-direction: row; align-items: center; color: var(--txt); gap: 10px; min-height: 44px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.cf-pe .bt:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 900px) {
  #bt-conferir span { display: none; }
  #bt-conferir { width: 44px; height: 44px; padding: 0; flex: none; }
  #ferramentas #novo { flex: 1 1 0; min-width: 140px; }
  #dlg-conferir { width: 100%; }
  .cf-escolher .bt.mini { height: 44px; }
  .cf-notas .link-adm { min-height: 44px; }
  .cf-so { flex: 1 1 100%; }
}
@media (max-width: 640px) {
  .cf-cab { display: none; }
  .cf-linha { grid-template-columns: minmax(0, 1fr) auto; border-top-color: var(--linha); }
  .cf-linha:nth-child(2) { border-top: 0; }
  .cf-meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 13px; }
  .cf-meta > span + span::before { content: '·'; margin-right: 12px; color: var(--txt3); }
}
.cf-so em { font-style: normal; }

/* faixa: notificações desativadas neste aparelho */
.faixa-push { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 9px 12px; border-radius: 12px;
  background: color-mix(in srgb, var(--ambar) 12%, var(--card)); border: 1px solid color-mix(in srgb, var(--ambar) 38%, var(--linha)); color: var(--txt); font-size: 13.5px; }
.faixa-push[hidden] { display: none; }
.faixa-push > span { flex: 1 1 0; min-width: 0; }
.faixa-push .bt { flex: none; }
main:has(#tab-notif:not([hidden])) #faixa-push { display: none; }
.faixa-push .faixa-x { flex: none; border: 0; background: none; color: var(--txt3); font-size: 20px; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 8px; }
.faixa-push .faixa-x:hover { color: var(--txt); }
.faixa-aba { font-size: 14px; padding: 12px 14px; }
.eq-proprias { padding-bottom: 8px; border-bottom: 1px solid var(--linha); margin-bottom: 4px; }
.eq-proprias > span { grid-column: 2 / -1; }
.eq-proprias small { display: block; font-weight: 400; color: var(--txt3); font-size: 12px; margin-top: 2px; }

/* origem da venda: duas opções grandes no tema (radio nativo escondido) */
.origem-venda { border: 0; display: grid; gap: 8px; min-width: 0; }
.origem-venda legend { font-weight: 600; font-size: 13.5px; color: var(--txt); margin-bottom: 8px; padding: 0; }
.origem-ops { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.origem-op { position: relative; display: flex !important; flex-direction: row !important; gap: 10px; align-items: flex-start; padding: 12px; min-height: 64px; border: 1.5px solid var(--linha2); border-radius: var(--r); background: var(--campo); cursor: pointer; transition: border-color .15s, background .15s; color: var(--txt); }
.origem-op input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.origem-op:hover { border-color: color-mix(in srgb, var(--azul) 55%, var(--linha2)); }
.origem-op:has(input:focus-visible) { outline: 2px solid var(--azul); outline-offset: 2px; }
.origem-op:has(input:checked) { border-color: var(--azul); background: color-mix(in srgb, var(--azul) 10%, var(--campo)); }
.origem-ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--sutil); }
.origem-ic svg { width: 19px; height: 19px; fill: none; stroke: var(--txt2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.origem-op:has(input:checked) .origem-ic { background: var(--azul); }
.origem-op:has(input:checked) .origem-ic svg { stroke: #fff; }
.origem-txt { display: grid; gap: 2px; min-width: 0; }
.origem-txt b { font-size: 14px; font-weight: 650; }
.origem-txt small { font-size: 12px; color: var(--txt2); font-weight: 400; line-height: 1.35; }
.origem-dica { font-size: 12.5px; color: var(--txt2); min-height: 1em; }
.origem-dica:empty { display: none; }
@media (max-width: 560px) { .origem-ops { grid-template-columns: 1fr; } }
/* perfil, fanpage e outros não são BM: sem campos de BM no editor */
#f-ativo:not([data-tipo="bm"]) .so-bm { display: none !important; }
.tag-origem { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 99px; background: var(--sutil); color: var(--txt2); }
.tag-origem.site { background: color-mix(in srgb, var(--azul) 14%, transparent); color: var(--azul2); }
.aviso-tipo { font-size: 12.5px; color: var(--ambar); display: flex; gap: 6px; align-items: flex-start; }

/* ---------- ordem personalizada das BMs (arrastar e soltar) ---------- */
.ord-manual { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; margin: 2px 0 10px; padding: 8px 12px; border: 1px solid var(--linha2); border-radius: 10px; background: var(--bg2); color: var(--txt); text-align: left; cursor: pointer; font: inherit; }
.ord-manual svg { width: 20px; height: 20px; flex: none; fill: currentColor; color: var(--txt3); }
.ord-manual span { display: grid; gap: 2px; min-width: 0; }
.ord-manual b { font-size: 13.5px; }
.ord-manual small { color: var(--txt3); font-size: 12px; font-weight: 500; }
.ord-manual:hover { border-color: var(--azul); }
.ord-manual[aria-pressed="true"] { border-color: var(--azul); background: color-mix(in srgb, var(--azul) 10%, var(--bg2)); }
.ord-manual[aria-pressed="true"] svg { color: var(--azul2); }
.manual-barra { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 18px; border-bottom: 1px solid var(--linha); background: color-mix(in srgb, var(--azul) 6%, var(--card)); border-radius: 14px 14px 0 0; }
.manual-txt { display: grid; gap: 2px; min-width: 0; flex: 1 1 320px; }
.manual-txt b { font-size: 14px; }
.manual-txt span { color: var(--txt2); font-size: 12.5px; }
.manual-copia { display: grid; gap: 6px; justify-items: start; }
.manual-copia small { color: var(--txt3); font-size: 12px; font-weight: 600; }
.lista.manual .manual-barra + .item.cab { border-radius: 0; }
.lista.manual .item { position: relative; padding-left: 60px; }
.alca { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--txt3); cursor: grab; touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; transition: background .15s, color .15s, transform .15s; }
.alca svg { width: 22px; height: 22px; fill: currentColor; }
.alca:hover, .alca:focus-visible { color: var(--azul2); background: var(--sutil); border-color: var(--linha2); }
.alca:focus-visible { outline: 2px solid var(--azul); outline-offset: 1px; }
.alca.segurando { color: #fff; background: var(--azul); transform: translateY(-50%) scale(1.08); }
html.arrastando, html.arrastando * { cursor: grabbing !important; -webkit-user-select: none !important; user-select: none !important; }
.item.arr-lugar { background: color-mix(in srgb, var(--azul) 7%, var(--card)) !important; outline: 2px dashed color-mix(in srgb, var(--azul) 60%, transparent); outline-offset: -4px; }
.item.arr-lugar > * { visibility: hidden; }
.item.arr-clone { background: var(--card); border: 1px solid var(--azul) !important; border-radius: 12px !important; box-shadow: 0 18px 40px -12px var(--sombra); opacity: .97; }
.item.arr-clone .alca { color: #fff; background: var(--azul); cursor: grabbing; }
.mover { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.mover .bt.mini { gap: 5px; }
.mover .bt svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pos-manual { font-style: normal; font-weight: 700; font-size: 12.5px; color: var(--azul2); min-width: 34px; height: 26px; display: inline-grid; place-items: center; padding: 0 8px; border-radius: 99px; background: color-mix(in srgb, var(--azul) 12%, transparent); }
.checks-pub { padding-top: 0; }
@media (max-width: 900px) {
  .lista.manual .manual-barra { border-radius: 14px; border: 1px solid var(--linha); }
  /* celular: a alça fica na linha de cima do card (ao lado da chave da vitrine) e o card usa a largura toda */
  .lista.manual .item { padding-left: 14px; }
  .lista.manual .item[data-arrastar] .cod { padding-right: 52px; }
  .alca { top: 8px; right: 74px; left: auto; transform: none; background: var(--sutil); border-color: var(--linha); }
  .alca.segurando { transform: scale(1.06); }
}
@media (prefers-reduced-motion: reduce) { .alca { transition: none; } }

/* ---------- excluir do filtro ("todas desse filtro menos estas") ---------- */
.ids-sec [hidden] { display: none !important; }
.ids-modo button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; }
.ids-modo button i { font-style: normal; font-size: 12px; font-weight: 700; min-width: 20px; height: 20px; line-height: 20px; padding: 0 6px; border-radius: 99px; background: var(--sutil); color: var(--txt2); font-variant-numeric: tabular-nums; }
.ids-modo button i:empty { display: none; }
.ids-modo button.on i { background: color-mix(in srgb, var(--azul) 16%, transparent); color: var(--azul2); }
.ids-modo button[data-ids-modo="excl"].on i { background: color-mix(in srgb, var(--verm) 15%, transparent); color: var(--verm); }
.excl-sec { display: grid; gap: 8px; min-width: 0; }
.excl-sec textarea { min-height: 96px; max-height: 40vh; font-size: 13.5px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.excl-amb { display: grid; gap: 8px; }
.excl-amb:empty { display: none; }
.excl-amb-l { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--linha); border-radius: 10px; background: var(--sutil); font-size: 13px; color: var(--txt2); }
.excl-amb-l b { color: var(--txt); }
.excl-amb-bts { display: flex; flex-wrap: wrap; gap: 6px; }
.excl-chips { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; max-width: 100%; }
.excl-rot { font-size: 12.5px; font-weight: 700; color: var(--txt2); }
.tag-excl { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; border-color: color-mix(in srgb, var(--verm) 45%, transparent); background: color-mix(in srgb, var(--verm) 9%, transparent); }
.tag-excl span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--verm) 60%, transparent); }
.tag-excl small { font-weight: 500; color: var(--txt2); white-space: nowrap; }
.tag-excl svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.tag-excl:hover { border-color: var(--verm); background: color-mix(in srgb, var(--verm) 16%, transparent); }
.tag-mais { font-variant-numeric: tabular-nums; }
.lote [data-lote="entregaveis"] { display: inline-flex; align-items: center; gap: 6px; }
.lote [data-lote="entregaveis"][hidden] { display: none; }
.lote [data-lote="entregaveis"] svg { width: 16px; height: 16px; }
.lote [data-lote="entregaveis"][aria-busy="true"] { opacity: .72; cursor: progress; }
.lote [data-lote="excl-filtro"] { display: inline-flex; align-items: center; gap: 6px; }
.lote [data-lote="excl-filtro"][hidden] { display: none; }
.lote [data-lote="excl-filtro"] svg, .item .acoes [data-acao="excl-filtro"] svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 900px) { .ids-modo button { min-height: 44px; } }

/* ======================= 2026-10-06: tema claro refinado, tiers, busca, atalhos ======================= */
/* tema claro: superfícies com profundidade sutil, bordas mais definidas e texto secundário mais firme (o escuro não muda) */
:root {
  --bg: #f1f4f9; --linha: #dde3ed; --linha2: #c6cfdd; --txt2: #3f4a66; --txt3: #56617c; --sutil: rgba(15,23,42,.045);
  --sombra-card: 0 1px 2px rgba(15,23,42,.05), 0 2px 6px -2px rgba(15,23,42,.06);
  --sombra-alta: 0 10px 30px -12px rgba(15,23,42,.22);
  --hover-linha: #f6f8fc; --sel-bg: #e9efff;
  --t3-bg: #14613a; --t3-tx: #ffffff; --t3-bd: #14613a;
  --t2-bg: #daf5e2; --t2-tx: #135c2e; --t2-bd: #9edcb1;
  --t1-bg: #ffe6d2; --t1-tx: #8a3307; --t1-bd: #f5b98a;
  --mark-bg: #ffe58a; --mark-tx: #3a2a00;
}
@media (prefers-color-scheme: dark) { :root:not([data-tema="claro"]) {
  --bg: #080b14; --linha: #1d2742; --linha2: #2a3657; --txt2: #a0a9bf; --txt3: #8b95b0; --sutil: rgba(255,255,255,.06);
  --sombra-card: none; --sombra-alta: 0 24px 60px -18px rgba(0,0,0,.6); --hover-linha: rgba(255,255,255,.025); --sel-bg: rgba(59,108,255,.14);
  --t3-bg: #1d7a46; --t3-tx: #ffffff; --t3-bd: #2a9a5b;
  --t2-bg: rgba(74,222,128,.14); --t2-tx: #8ff0b0; --t2-bd: rgba(74,222,128,.38);
  --t1-bg: rgba(251,146,60,.15); --t1-tx: #ffb57a; --t1-bd: rgba(251,146,60,.42);
  --mark-bg: rgba(250,204,21,.32); --mark-tx: #fff3c4;
} }
:root[data-tema="escuro"] {
  --bg: #080b14; --linha: #1d2742; --linha2: #2a3657; --txt2: #a0a9bf; --txt3: #8b95b0; --sutil: rgba(255,255,255,.06);
  --sombra-card: none; --sombra-alta: 0 24px 60px -18px rgba(0,0,0,.6); --hover-linha: rgba(255,255,255,.025); --sel-bg: rgba(59,108,255,.14);
  --t3-bg: #1d7a46; --t3-tx: #ffffff; --t3-bd: #2a9a5b;
  --t2-bg: rgba(74,222,128,.14); --t2-tx: #8ff0b0; --t2-bd: rgba(74,222,128,.38);
  --t1-bg: rgba(251,146,60,.15); --t1-tx: #ffb57a; --t1-bd: rgba(251,146,60,.42);
  --mark-bg: rgba(250,204,21,.32); --mark-tx: #fff3c4;
}
.kpi, .bloco, .lista { box-shadow: var(--sombra-card); }
.pop, .sel-lista, .ini-menu { box-shadow: var(--sombra-alta), 0 0 0 1px rgba(15,23,42,.02); }
.item:not(.cab):hover { background: var(--hover-linha); }
.item.marcado, .item.marcado:hover { background: var(--sel-bg); }
.tabs button:not(.on):hover, .seg button:not(.on):hover { color: var(--txt); background: color-mix(in srgb, var(--card) 55%, transparent); }
.bt:hover { background: var(--hover-linha); }
.bt.primario:hover { background: var(--azul); }
.chip-adm:hover { border-color: var(--txt3); color: var(--txt); }
.item.cab { border-radius: 14px 14px 0 0; }

/* tiers: Tier 3 verde escuro · Tier 2 verde claro · Tier 1 laranja (contraste AA nos dois temas) */
.tier-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 99px; font-size: 11.5px; font-weight: 700; letter-spacing: .01em; line-height: 1; white-space: nowrap; vertical-align: middle;
  background: var(--sutil); color: var(--txt2); border: 1px solid var(--linha2); }
.tier-tag[data-tier="3"] { background: var(--t3-bg); color: var(--t3-tx); border-color: var(--t3-bd); }
.tier-tag[data-tier="2"] { background: var(--t2-bg); color: var(--t2-tx); border-color: var(--t2-bd); }
.tier-tag[data-tier="1"] { background: var(--t1-bg); color: var(--t1-tx); border-color: var(--t1-bd); }
.item .tit > b .tier-tag { margin-left: 8px; vertical-align: 1px; }
.score-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 99px; font-size: 11.5px; font-weight: 700; line-height: 1; white-space: nowrap; vertical-align: middle; font-variant-numeric: tabular-nums; border: 1px solid var(--linha, rgba(127,127,127,.35)); color: var(--txt2, inherit); }
.score-tag.s-excelente { background: #0a84ff; border-color: #0a84ff; color: #fff; }
.score-tag.s-muito-bom { border-color: #0a84ff; color: #0a84ff; background: rgba(10,132,255,.12); }
.item .tit > b .score-tag { margin-left: 6px; vertical-align: 1px; }
.chip-adm .tier-tag { height: 22px; }
.chip-adm[aria-pressed="true"] .tier-tag { box-shadow: 0 0 0 2px rgba(255,255,255,.75); }
.tag-f .tier-tag { height: 18px; margin: 0 2px; }
.cf-cod .tier-tag { margin-top: 2px; }
.sel-op .tier-tag, .sel-bt .tier-tag { margin-right: 4px; }

/* ícones próprios de tipo (maleta, pessoa, bandeira) */
.ico-tipo { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -2px; margin-right: 4px; }
.op-tipo { display: inline-flex; align-items: center; gap: 2px; }
.op-tipo .ico-tipo { margin-right: 2px; }

/* busca do estoque: maior, mais visível, com contador, limpar, atalho e sugestões */
.busca-adm { position: relative; flex: 1 1 420px; min-width: min(100%, 300px); height: 48px; padding: 0 8px 0 16px; gap: 10px; border-radius: 14px; border-width: 1.5px; background: var(--campo); box-shadow: var(--sombra-card); transition: border-color .15s, box-shadow .15s; }
.busca-adm:hover { border-color: var(--txt3); }
.busca-adm:focus-within { border-color: var(--azul); box-shadow: 0 0 0 4px rgba(59,108,255,.16); }
.busca-adm .q-lupa { width: 20px; height: 20px; stroke: var(--txt2); stroke-width: 2.2; }
.busca-adm input { font-size: 15.5px; font-weight: 500; min-width: 0; flex: 1; }
.busca-adm input::placeholder { color: var(--txt3); font-weight: 400; }
.busca-adm input::-webkit-search-cancel-button { display: none; }
.q-n { flex: none; font-size: 12.5px; font-weight: 700; color: var(--txt2); background: var(--sutil); border-radius: 99px; padding: 3px 9px; white-space: nowrap; }
.q-n:empty { display: none; }
.q-limpar { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border: 0; background: none; border-radius: 10px; cursor: pointer; color: var(--txt2); }
.q-limpar:hover { background: var(--sutil); color: var(--txt); }
.q-limpar svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2.2; fill: none; stroke-linecap: round; }
kbd, .q-kbd { font: 600 11.5px/1 var(--fonte); color: var(--txt2); background: var(--bg2); border: 1px solid var(--linha2); border-bottom-width: 2px; border-radius: 6px; padding: 3px 6px; white-space: nowrap; }
.q-kbd { flex: none; margin-right: 6px; }
.busca-adm.tem-q .q-kbd, .sem-teclado .q-kbd { display: none; }
.q-sug { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 40; background: var(--card); border: 1px solid var(--linha2); border-radius: 14px; padding: 6px; box-shadow: var(--sombra-alta); max-height: min(60vh, 420px); overflow: auto; }
.q-op { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 6px 10px; border: 0; background: none; border-radius: 10px; text-align: left; cursor: pointer; color: var(--txt); font-size: 14px; }
.q-op svg { width: 17px; height: 17px; flex: none; fill: none; stroke: var(--txt3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.q-op span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-op small { flex: none; }
.q-op:hover, .q-op[aria-selected="true"] { background: var(--sel-bg); }
.q-dica { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; font-size: 12.5px; color: var(--txt2); border-top: 1px solid var(--linha); margin-top: 4px; }
.q-dica:first-child { border-top: 0; margin-top: 0; }
.q-dica svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--txt3); stroke-width: 2; margin-top: 1px; }
mark.q-m { background: var(--mark-bg); color: var(--mark-tx); border-radius: 3px; padding: 0 1px; }
.cp mark.q-m { color: inherit; }
.q-hoje.on, .q-hoje[aria-pressed="true"] { background: color-mix(in srgb, var(--verde) 14%, var(--bg2)); border-color: var(--verde); color: var(--txt); }
.q-hoje .qtd { background: var(--verde); }
.tag-hoje { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: color-mix(in srgb, var(--verde) 16%, transparent); color: var(--verde); }
:root:not([data-tema="escuro"]) .tag-hoje { color: #0a6a40; }
@media (prefers-color-scheme: dark) { :root:not([data-tema="claro"]) .tag-hoje { color: var(--verde); } }
@media (max-width: 760px) {
  .busca-adm { flex-basis: 100%; height: 48px; }
  .busca-adm input { font-size: 16px; }
  .q-hoje { flex: 1; }
}

/* paleta de comandos (Ctrl/Cmd + K) */
dialog.dlg-paleta { width: min(640px, calc(100% - 24px)); margin: 10vh auto auto; border-radius: 16px; overflow: hidden; }
.pal-box { display: grid; }
.pal-busca { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--linha); }
.pal-busca svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--txt3); stroke-width: 2.2; }
.pal-busca input { border: 0; height: 56px; padding: 0; font-size: 16px; background: none; box-shadow: none !important; }
.pal-lista { max-height: min(56vh, 440px); overflow: auto; padding: 6px; }
.pal-g { font-size: 11.5px; font-weight: 700; letter-spacing: 0; color: var(--txt3); padding: 10px 10px 4px; }
.pal-op { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 6px 10px; border: 0; background: none; border-radius: 10px; cursor: pointer; text-align: left; color: var(--txt); font-size: 14.5px; }
.pal-op > svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--txt2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pal-op > span:first-of-type { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-op[aria-selected="true"], .pal-op:hover { background: var(--sel-bg); }
.pal-k { display: inline-flex; gap: 4px; flex: none; }
.pal-vazio { padding: 18px; text-align: center; color: var(--txt2); }
.pal-pe { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 8px 14px; border-top: 1px solid var(--linha); font-size: 12.5px; color: var(--txt3); }
.pal-pe span { display: inline-flex; align-items: center; gap: 4px; }
.pal-pe .link-adm { margin-left: auto; min-height: 44px; }
@media (hover: none) and (pointer: coarse) { .pal-pe > span { display: none; } }

/* lista de atalhos ("?") */
.atl-corpo { display: grid; gap: 18px; }
.atl-grupo h3 { font-size: 13px; letter-spacing: 0; color: var(--txt3); margin-bottom: 8px; }
.atl-grupo dl { display: grid; gap: 2px; }
.atl-it { display: grid; grid-template-columns: minmax(150px, auto) 1fr; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--linha); }
.atl-it dt { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.atl-it dd { color: var(--txt2); }
.kbd-mais { font-size: 11.5px; color: var(--txt3); margin: 0 2px; }
.atl-off { padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--ambar) 12%, transparent); color: var(--txt); }
.atl-nota { font-size: 12.5px; color: var(--txt3); }
#pers-teclado .pers-ch > span { display: grid; gap: 2px; }
#pers-teclado .chave:disabled { opacity: .45; cursor: default; }
@media (max-width: 520px) { .atl-it { grid-template-columns: 1fr; gap: 4px; } }
@media (min-width: 761px) {
  /* barra do estoque cabe numa linha com a busca larga: Preferências, Histórico e Conferir lista viram só ícone (nome no tooltip) */
  #bt-pref > span, #bt-hist > span, #bt-conferir > span { display: none; }
  #bt-pref, #bt-hist, #bt-conferir { width: 44px; padding: 0; }
}
#pers-teclado .chave { align-self: center; flex: none; }
#dlg-atalhos { width: min(640px, calc(100% - 24px)); }
.ini-hoje-t small > * { white-space: nowrap; }
/* topo entre 901 e 1280 px: sem o e-mail e com Vitrine só ícone, para o menu caber sem rolagem lateral */
@media (min-width: 901px) and (max-width: 1280px) {
  .usuario, .bt-vitrine span, .bt-instalar span { display: none; }
  .bt-vitrine, .bt-instalar { width: 44px; padding: 0; }
  .marca-p .selo-g { display: none; }
}
@media (min-width: 901px) and (max-width: 1060px) { .tabs button { padding: 7px 9px; } .barra-in { gap: 10px; } }
@media (min-width: 901px) and (max-width: 960px) { .marca-p b { display: none; } }
/* filtro "Somente da lista" (Conferir lista / Ver só selecionados) */
.lista-f { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; max-width: 100%; }
.tag-lista { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; border-color: var(--azul); background: color-mix(in srgb, var(--azul) 16%, transparent); }
.tag-lista span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag-lista svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.lista-nao { color: var(--txt2); font-size: 12.5px; }
.lista-nao-cods { min-width: 0; max-width: 100%; font-size: 12.5px; color: var(--txt2); overflow-wrap: anywhere; }

/* Estoque: barra compacta ao rolar (rolagem.js) */
.ferr-sentinela { height: 0; }
#ferramentas { overflow-anchor: none; }
.ferramentas > .ferr-mais { display: none; }
.ferramentas.mini ~ .lista { margin-top: var(--ferr-comp, 0px); }
.ferramentas.mini { flex-wrap: nowrap; gap: 6px; padding: 7px 0; border-bottom: 1px solid var(--linha); box-shadow: 0 12px 18px -18px var(--sombra); }
.ferramentas.mini > * { display: none; }
.ferramentas.mini > .busca-adm { display: flex; flex: 1 1 220px; min-width: 0; height: 36px; order: 1; }
.ferramentas.mini > [data-barra="filtros"], .ferramentas.mini > [data-barra="ordem"], .ferramentas.mini > .pop-wrap:has(> .pop:not([hidden])) { display: block; flex: none; order: 2; }
/* o Ordenar fica na faixa compacta: no celular a tabela não tem cabeçalho clicável, então é o único jeito de ordenar */
.ferramentas.mini > .pop-wrap > .bt { height: 36px; }
.ferramentas.mini > .ferr-mais { display: inline-flex; flex: none; height: 36px; padding: 0 12px; gap: 4px; order: 6; }
.ferramentas.mini > .lote:not([hidden]) { display: flex; flex: 0 1 auto; flex-wrap: nowrap; min-width: 0; gap: 6px; padding: 3px 4px 3px 10px; overflow-x: auto; scrollbar-width: none; order: 4; }
.ferramentas.mini > .lote::-webkit-scrollbar, .ferramentas.mini > .ativos-filtros::-webkit-scrollbar { display: none; }
.ferramentas.mini > .lote > * { display: none; }
.ferramentas.mini > .lote > #lote-n { display: inline; white-space: nowrap; font-size: 13px; }
.ferramentas.mini > .lote > [data-lote="so-sel"], .ferramentas.mini > .lote > [data-lote="limpar"] { display: inline-flex; align-items: center; flex: none; height: 28px; white-space: nowrap; }
.ferramentas.mini > .ativos-filtros:not(:empty) { display: flex; flex: 1 1 0; flex-wrap: nowrap; min-width: 60px; gap: 4px; overflow-x: auto; scrollbar-width: none; order: 3; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); }
.ferramentas.mini > .ativos-filtros > * { flex: none; height: 28px; font-size: 12px; padding-block: 0; white-space: nowrap; }
.ferramentas.mini > .ativos-filtros > .chip-adm { padding-inline: 10px; }
/* anima só o conteúdo: o fundo da barra fica opaco (antes a barra inteira ficava translúcida e a lista aparecia por trás, piscando) */
.ferramentas.ferr-anim-a > * { animation: ferr-a .18s ease-out; }
.ferramentas.ferr-anim-b > * { animation: ferr-b .2s ease-out; }
@keyframes ferr-a { from { opacity: .35; transform: translateY(-4px); } }
@keyframes ferr-b { from { opacity: .5; } }
.lista > .item.cab { position: sticky; top: var(--ferr-fim, 0px); z-index: 4; background: linear-gradient(var(--sutil), var(--sutil)), var(--card); }
@media (max-width: 1180px) {
  .ferramentas.mini { flex-wrap: wrap; }
  .ferramentas.mini > .ativos-filtros:not(:empty) { flex: 1 1 100%; order: 8; }
}
@media (max-width: 900px) {
  .ferramentas.mini { row-gap: 6px; }
  .ferramentas.mini > .busca-adm { flex: 1 1 0; height: 40px; }
  .ferramentas.mini > .pop-wrap { flex: none; }
  .ferramentas.mini > .pop-wrap > .bt, .ferramentas.mini > .ferr-mais { height: 40px; width: auto; padding: 0 12px; }
  .ferramentas.mini > .ferr-mais span { display: none; }
  .ferramentas.mini > .lote:not([hidden]) { flex: 1 1 100%; order: 7; }
  .ferramentas.mini > .lote > #lote-n { font-size: 12.5px; margin-right: 0; }
  .ferramentas.mini > .lote > [data-lote="so-sel"] { padding: 0 9px; font-size: 12.5px; }
  .ferramentas.mini > .busca-adm .q-kbd { display: none; }
}
@media (max-width: 400px) {
  .ferramentas.mini { gap: 5px; }
  .ferramentas.mini > .pop-wrap > .bt, .ferramentas.mini > .ferr-mais { padding: 0 9px; }
  .ferramentas.mini #n-ordem { display: none; }
}

/* verificação em duas etapas (login e Configurações) */
.d2-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; color: var(--azul2); background: color-mix(in srgb, var(--azul) 12%, transparent); border: 1px solid color-mix(in srgb, var(--azul) 28%, transparent); }
.d2-ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.d2-ico-login { justify-self: center; margin-bottom: -6px; }
.d2-input, #d2-cod { font-variant-numeric: tabular-nums; font-size: 24px !important; font-weight: 700; letter-spacing: .18em; text-align: center; height: 56px !important; }
.d2-input::placeholder, #d2-cod::placeholder { color: var(--txt3); opacity: .45; font-weight: 600; }
.d2-input.rec { font-size: 19px !important; letter-spacing: .1em; text-transform: uppercase; }
.d2-voltar { margin-top: -10px; color: var(--txt3); }

/* ======================= Estoque em cards (botão Tabela | Cards; mesmos dados e ações da tabela) ======================= */
.vista-seg { flex: 0 0 auto; }
#lista.cards { background: none; border: 0; border-radius: 0; box-shadow: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 12px; }
#lista.cards > .cards-cab { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--sutil); border: 1px solid var(--linha); border-radius: 14px; color: var(--txt3); font-size: 12.5px; font-weight: 700; }
#lista.cards > .manual-barra, #lista.cards > .mais-lista, #lista.cards > .vazio { grid-column: 1 / -1; }
#lista.cards > .item.cartao { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; position: relative; min-width: 0; padding: 14px; background: var(--card); border: 1px solid var(--linha) !important; border-radius: 14px !important; box-shadow: var(--sombra-card); }
#lista.cards > .item.cartao:hover { background: var(--card); }
#lista.cards > .item.cartao.marcado { background: var(--sel-bg); border-color: color-mix(in srgb, var(--azul) 45%, var(--linha)) !important; }
#lista.cards.manual > .item.cartao { padding-left: 14px; }
#lista.cards .cartao .cc-topo { display: flex; align-items: center; gap: 10px; flex: 1 1 100%; min-width: 0; }
#lista.cards .cartao .cc-topo .cod { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
#lista.cards .cartao .cc-topo .s { flex: 0 0 auto; }
#lista.cards .cartao .cc-topo .s select.st { width: auto; }
#lista.cards .cartao .tit { flex: 1 1 100%; min-width: 0; }
#lista.cards .cartao .tit b, #lista.cards .cartao .tit small { white-space: normal; overflow-wrap: anywhere; }
#lista.cards .cartao .internos { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 6px; }
#lista.cards .cartao .cc-nums { flex: 1 1 auto; display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: flex-end; }
#lista.cards .cartao .cc-nums .num { display: grid; gap: 2px; font-size: 16px; }
#lista.cards .cartao .cc-nums .num::before { font-size: 11.5px; color: var(--txt3); font-weight: 600; }
#lista.cards .cartao .cc-nums .num.v::before { content: 'Valor'; }
#lista.cards .cartao .cc-nums .num.g::before { content: 'Gasto total'; }
#lista.cards .cartao .cc-vitrine { display: flex; align-items: center; gap: 8px; margin-left: auto; }
#lista.cards .cartao .cc-rot { font-size: 12px; color: var(--txt3); font-weight: 600; }
#lista.cards .cartao .copias { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 6px; width: 100%; margin: 0; }
#lista.cards .cartao .mover { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
#lista.cards .cartao .acoes { flex: 1 1 100%; justify-content: flex-end; }
#lista.cards .cartao .alca { position: static; transform: none; left: auto; top: auto; width: 36px; height: 36px; margin-left: auto; }
#lista.cards .cartao.marcado .alca { color: var(--azul); }
#lista.cards .cartao .copias .cpx { flex: 0 1 auto; min-width: 0; white-space: nowrap; }

/* Conversor e 2FA no cabeçalho, com texto */
.bt-rot { gap: 6px; padding: 0 12px; font-size: 13px; }
.bt-rot svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
@media (max-width: 900px) { .barra-dir .bt.bt-rot { flex-direction: column; width: auto !important; min-width: 44px; padding: 0 5px; gap: 1px; font-size: 10px; line-height: 1; font-weight: 700; } .bt-rot svg { width: 15px; height: 15px; } }
.destaque-pisca { outline: 2px solid var(--azul, #2f5cf0); outline-offset: 3px; border-radius: 14px; transition: outline-color .4s; }

/* botão "voltar ao topo" (como na vitrine): aparece depois de rolar a página */
.topo-bt { position: fixed; right: 22px; bottom: 22px; z-index: 30; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: var(--card); color: var(--txt2); border: 1px solid var(--linha2); box-shadow: 0 10px 26px -10px var(--sombra);
  opacity: 0; transform: translateY(14px); pointer-events: none; transition: opacity .2s, transform .2s, background .15s; }
.topo-bt svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.topo-bt:hover { background: var(--azul); color: #fff; border-color: var(--azul); }
.topo-bt.mostrar { opacity: 1; transform: none; pointer-events: auto; }
@media (prefers-reduced-motion: reduce) { .topo-bt { transition: none; } }

/* estoque: para quem a BM foi vendida */
.tag-cliente { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 8px; margin-right: 4px; border-radius: 99px; background: color-mix(in srgb, var(--azul) 12%, transparent); color: var(--azul2); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.tag-cliente b { font-weight: 800; }
.tag-cliente.vazio { background: var(--sutil); color: var(--txt3); font-style: italic; }
/* cabeçalho: com muitas abas, as abas rolam de lado em vez de empurrar os botões da direita para fora da tela */
.barra-in { min-width: 0; }
.barra-in > .tabs { flex: 0 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.barra-in > .tabs::-webkit-scrollbar { display: none; }
.barra-in > .tabs button { flex: none; }
.barra-dir { flex: none; }

/* datas do ativo na lista do estoque (entrada, edição, venda) */
.datas-at { display: flex !important; flex-wrap: wrap; gap: 2px 10px; margin-top: 2px; font-size: 11.5px; color: var(--txt3); }
.datas-at span { white-space: nowrap; }
.tag-entrou { background: color-mix(in srgb, var(--azul) 14%, transparent) !important; color: var(--azul2) !important; }
/* filtro por dia */
.f-dia-seg { display: inline-flex; margin: 2px 0 8px; }
.f-dia-linha { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.f-dia-linha > :first-child { flex: 1 1 180px; min-width: 0; }
.f-dia-seg button[aria-checked="true"] { background: var(--card); color: var(--txt); box-shadow: 0 1px 3px var(--sombra); }

/* tabela do estoque: colunas de largura fixa (cabeçalho e linhas usam a mesma grade) e seletor de colunas */
#lista:not(.cards):not(.antiga) .item > span { min-width: 0; }
#lista:not(.cards):not(.antiga) .item > .ex { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; color: var(--txt2); }
#lista:not(.cards):not(.antiga) .item > .c-status, #lista:not(.cards):not(.antiga) .item > .c-vitrine { overflow: visible; }
#lista:not(.cards):not(.antiga) .item.cab > .c-acoes { position: relative; display: flex; justify-content: flex-end; align-items: center; }
#lista:not(.cards):not(.antiga) .item.cab > .c-acoes > [data-col-toggle]:not(.primario) { font-size: 12.5px; }
.est-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; width: 280px; max-width: calc(100vw - 32px); background: var(--card); border: 1px solid var(--linha); border-radius: 14px; box-shadow: var(--sombra-card); padding: 14px; text-align: left; font-weight: 500; color: var(--txt); cursor: default; }
.est-pop h4 { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.est-pop ul { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow: auto; }
.est-pop li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 0; border-top: 1px solid var(--linha); }
.est-pop li:first-child { border-top: 0; }
.est-pop label { display: flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; min-width: 0; }
.est-mv { display: flex; gap: 4px; flex: none; }
.est-mv .bt[disabled] { opacity: .35; pointer-events: none; }
.est-pop .pop-pe { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--linha); }
/* compacta e rola na horizontal (como planilha), só no computador */
.est-barra { display: flex; justify-content: flex-end; margin: 0 0 8px; }
.est-barra .est-pop { right: 0; }
@media all {
  .est-tab { display: block; overflow-x: auto; border-radius: 14px; }
  .est-tab .item { width: max-content; min-width: 100%; gap: 8px; padding: 6px 10px; font-size: 13px; }
  .est-tab .item.cab { padding: 7px 10px; }
  .est-tab .item select.st { height: 28px; font-size: 12px; padding-left: 10px; }
  .est-tab .item .tit small { font-size: 11.5px; }
  .est-tab .item > .ex { font-size: 12.5px; }
}

.cp-v { margin-left: 5px; padding: 0 3px; border: 0; background: none; color: var(--txt3); font-size: 12px; line-height: 1; opacity: .5; cursor: pointer; vertical-align: 1px; border-radius: 4px; }
.cp-v:hover, .cp-v:focus-visible { opacity: 1; color: var(--azul); background: var(--sutil); }
.cp-v.copiado { color: var(--verde, #1a9e5c); opacity: 1; }

/* repaginação estilo Notion: tabela limpa, linhas finas, sem caixas pesadas, cabeçalho discreto */
@media all {
  #lista:not(.cards):not(.antiga) { background: var(--card); border: 1px solid var(--linha); border-radius: 8px; box-shadow: none; }
  .est-tab { border-radius: 0; }
  #lista:not(.cards):not(.antiga) .item { font-size: 14px; color: var(--txt); min-height: 36px; padding: 4px 12px; gap: 10px; border-top: 1px solid var(--linha); background: transparent; }
  #lista:not(.cards):not(.antiga) .item:first-child { border-top: 0; border-radius: 0; }
  #lista:not(.cards):not(.antiga) .item:last-child { border-radius: 0; }
  #lista:not(.cards):not(.antiga) .item:not(.cab):hover { background: color-mix(in srgb, var(--txt) 4%, transparent); }
  #lista:not(.cards):not(.antiga) .item.marcado, #lista:not(.cards):not(.antiga) .item.marcado:hover { background: color-mix(in srgb, var(--azul) 7%, transparent); }
  #lista:not(.cards):not(.antiga) .item.cab { position: sticky; top: 0; z-index: 3; background: var(--card); padding: 0 12px; min-height: 32px; font-size: 12px; font-weight: 500; color: var(--txt3); border-top: 0; border-bottom: 1px solid var(--linha); }
  #lista:not(.cards):not(.antiga) .item.cab .ordenavel { white-space: nowrap; }
  #lista:not(.cards):not(.antiga) .item .cod { font-size: 13px; font-weight: 500; color: var(--txt2); }
  #lista:not(.cards):not(.antiga) .item .tit b { font-weight: 500; font-size: 14px; }
  #lista:not(.cards):not(.antiga) .item .tit small { font-size: 12px; color: var(--txt3); }
  #lista:not(.cards):not(.antiga) .item .num { font-weight: 400; font-variant-numeric: tabular-nums; }
  #lista:not(.cards):not(.antiga) .item .ex { font-size: 13px; color: var(--txt2); }
  #lista:not(.cards):not(.antiga) .item select.st { height: 24px; font-size: 12px; font-weight: 500; border-radius: 4px; padding: 0 8px; background: var(--sutil); border: 0; }
  #lista:not(.cards):not(.antiga) .item .acoes .bt.mini { height: 24px; font-size: 12px; padding: 0 8px; }
  #lista:not(.cards):not(.antiga) .item .acoes .bt.mini.icone-mini { width: 24px; padding: 0; }
  #lista:not(.cards):not(.antiga) .item .cp-v { opacity: 0; }
  #lista:not(.cards):not(.antiga) .item:hover .cp-v, #lista:not(.cards):not(.antiga) .item .cp-v:focus-visible, #lista:not(.cards):not(.antiga) .item .cp-v.copiado { opacity: .7; }
  .est-barra { margin: 0 0 10px; }
  .est-barra .bt.mini { font-weight: 500; color: var(--txt2); background: transparent; border-color: transparent; }
  .est-barra .bt.mini:hover { background: var(--sutil); }
}
/* tabela (computador): uma linha por BM, como no Notion. Detalhes viram colunas; o resto fica no card/editar */
@media all {
  #lista:not(.cards):not(.antiga) .est-tab .c-tit > small, #lista:not(.cards):not(.antiga) .est-tab .c-tit > .internos, #lista:not(.cards):not(.antiga) .est-tab .c-tit > .copias, #lista:not(.cards):not(.antiga) .est-tab .c-tit > .datas-at { display: none; }
  #lista:not(.cards):not(.antiga) .est-tab .c-tit > b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #lista:not(.cards):not(.antiga) .est-tab .item > .c-copiar { overflow: visible; }
  #lista:not(.cards):not(.antiga) .est-tab .c-copiar .copias { display: flex; flex-wrap: nowrap; gap: 4px; margin: 0; width: auto; }
  #lista:not(.cards):not(.antiga) .est-tab .c-copiar .copias .bt, #lista:not(.cards):not(.antiga) .est-tab .c-copiar .copias button { height: 24px; font-size: 12px; padding: 0 8px; }
  #lista:not(.cards):not(.antiga) .est-tab .c-copiar .copias svg { width: 13px; height: 13px; }
}
@media all {
  #lista:not(.cards):not(.antiga) .est-tab .c-tit > :not(b):not(.mover) { display: none !important; }
  #lista:not(.cards):not(.antiga) .est-tab .item .sel.st .sel-bt { height: 26px; font-size: 12px; font-weight: 600; border-radius: 6px; padding: 0 8px 0 10px; }
  #lista:not(.cards):not(.antiga) .est-tab .item .chave { transform: scale(.85); }
  #lista:not(.cards):not(.antiga) .est-tab .item .cod .cp { font-size: 13px; }
}
@media all {
  #lista:not(.cards):not(.antiga) .est-tab .item > .num.v, #lista:not(.cards):not(.antiga) .est-tab .item > .num.g { font-size: 13.5px; font-weight: 500; }
  #lista:not(.cards):not(.antiga) .est-tab .item > .num.v small { display: none; }
  #lista:not(.cards):not(.antiga) .est-tab .item > .c-revenda, #lista:not(.cards):not(.antiga) .est-tab .item.cab > .c-valor, #lista:not(.cards):not(.antiga) .est-tab .item.cab > .c-gastos, #lista:not(.cards):not(.antiga) .est-tab .item.cab > .c-ciclo, #lista:not(.cards):not(.antiga) .est-tab .item.cab > .c-revenda { text-align: right; }
}
/* arrastar colunas */
#lista .item.cab [data-col-drag] { cursor: grab; user-select: none; }
#lista .item.cab [data-col-drag]:active { cursor: grabbing; }
#lista .col-arrastando { opacity: .4; }
#lista .item.cab .col-alvo-antes { box-shadow: inset 2px 0 0 var(--azul); }
#lista .item.cab .col-alvo-depois { box-shadow: inset -2px 0 0 var(--azul); }
.est-pop li { cursor: grab; }
.est-pop li.col-alvo-antes { box-shadow: inset 0 2px 0 var(--azul); }
.est-pop li.col-alvo-depois { box-shadow: inset 0 -2px 0 var(--azul); }
.est-grip { color: var(--txt3); font-size: 11px; letter-spacing: -2px; margin-right: 2px; flex: none; }
.est-pop li > label { flex: 1; }
/* célula clicada: mostra só aquele campo */
#lista .est-tab .item > span:not(.c-acoes):not(.c-copiar):not(.c-status):not(.c-vitrine) { cursor: pointer; }
#lista .est-tab .item > .cel-ativa { box-shadow: inset 0 0 0 2px var(--azul); border-radius: 4px; }
.cel-pop { position: fixed; z-index: 60; width: 280px; max-width: calc(100vw - 16px); background: var(--card); border: 1px solid var(--linha); border-radius: 10px; box-shadow: 0 12px 32px -8px rgba(0,0,0,.35); padding: 12px; display: grid; gap: 10px; }
.cel-pop-tit { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 12px; font-weight: 600; color: var(--txt3); }
.cel-pop-val { font-size: 14px; word-break: break-word; }
.cel-pop-in { width: 100%; height: 34px; border: 1px solid var(--linha2, var(--linha)); border-radius: 6px; background: var(--fundo, var(--card)); color: var(--txt); padding: 0 10px; font: inherit; font-size: 14px; }
.cel-pop-in:focus { outline: 2px solid var(--azul); outline-offset: -1px; }
.cel-pop-ck { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.cel-pop-pe { display: flex; justify-content: space-between; gap: 8px; }
/* células: texto corta com reticências e o botão de copiar fica sempre dentro da célula */
@media all {
  #lista:not(.cards):not(.antiga) .est-tab .item:not(.cab) > .ex, #lista:not(.cards):not(.antiga) .est-tab .item:not(.cab) > .num { display: flex; align-items: center; gap: 2px; overflow: hidden; }
  #lista:not(.cards):not(.antiga) .est-tab .item:not(.cab) > :is(.c-valor, .c-gastos, .c-ciclo, .c-revenda, .c-divida, .c-lmeta, .c-lext) { justify-content: flex-end; }
  #lista:not(.cards):not(.antiga) .est-tab .item:not(.cab) .cv-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #lista:not(.cards):not(.antiga) .est-tab .item:not(.cab) .cp-v { flex: none; margin-left: 2px; }
  #lista:not(.cards):not(.antiga) .est-tab .item:not(.cab) > .c-divida .verm { display: flex; align-items: center; min-width: 0; }
  #lista:not(.cards):not(.antiga) .est-tab .item:not(.cab) > .c-copiar { overflow: visible; }
}

/* tabela com rolagem própria: barra horizontal sempre visível no rodapé da caixa e cabeçalho fixo no topo */
.est-tab { display: block; overflow-x: scroll; overflow-y: auto; max-height: calc(100dvh - 150px); border-radius: 8px; scrollbar-color: color-mix(in srgb, var(--txt3) 55%, transparent) var(--sutil); }
.est-tab > .item.cab { position: sticky; top: 0; z-index: 3; }
.est-tab > .mais-lista { position: sticky; left: 0; width: fit-content; padding: 10px 14px; color: var(--txt3); font-size: 12.5px; }
.est-barra { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin: 0; padding: 8px 10px; border-bottom: 1px solid var(--linha); }
.est-cols-bt { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.est-cols-bt svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.est-cols-bt small { color: var(--txt3); font-weight: 500; }
/* celular: a tabela continua tabela (rola para o lado); quem quiser cartões usa "Cards" */
@media (max-width: 900px) {
  #lista:not(.cards):not(.antiga) { display: block; background: var(--card); border: 1px solid var(--linha); border-radius: 8px; }
  #lista:not(.cards):not(.antiga) .item { grid-template-areas: none !important; background: transparent !important; border: 0 !important; border-top: 1px solid var(--linha) !important; border-radius: 0 !important; }
  #lista:not(.cards):not(.antiga) .item.cab { display: grid !important; border-top: 0 !important; border-bottom: 1px solid var(--linha) !important; }
  #lista:not(.cards):not(.antiga) .item > * { grid-area: auto !important; }
  #lista:not(.cards):not(.antiga) .item > .v::before, #lista:not(.cards):not(.antiga) .item > .g::before { content: none !important; }
  #lista:not(.cards):not(.antiga) .item .ck { width: auto !important; height: auto !important; margin: 0 !important; }
  #lista:not(.cards):not(.antiga) .item .sel.st .sel-bt { height: 26px !important; }
}
/* painel "Colunas" */
.est-pop2 { position: fixed; z-index: 70; width: 300px; display: flex; flex-direction: column; background: var(--card); color: var(--txt); border: 1px solid var(--linha); border-radius: 12px; box-shadow: 0 18px 44px -14px rgba(0,0,0,.5); overflow: hidden; }
.ep-cab { display: flex; align-items: center; justify-content: space-between; padding: 12px 10px 4px 14px; }
.ep-cab b { font-size: 14px; }
.ep-x { width: 30px; height: 30px; border: 0; background: none; color: var(--txt3); font-size: 20px; line-height: 1; border-radius: 6px; cursor: pointer; }
.ep-x:hover { background: var(--sutil); color: var(--txt); }
.ep-busca { margin: 6px 12px 6px; height: 34px; border: 1px solid var(--linha); border-radius: 8px; background: var(--sutil); color: var(--txt); padding: 0 10px; font: inherit; font-size: 13.5px; }
.ep-busca:focus { outline: 2px solid var(--azul); outline-offset: -1px; }
.ep-lista { overflow: auto; padding: 0 6px 6px; flex: 1; min-height: 0; overscroll-behavior: contain; }
.ep-sec { display: flex; justify-content: space-between; padding: 10px 8px 4px; font-size: 11px; font-weight: 700; color: var(--txt3); letter-spacing: 0; }
.ep-it { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 4px 0 6px; border-radius: 6px; font-size: 13.5px; user-select: none; }
.ep-it:hover { background: var(--sutil); }
.ep-grupo[data-ep-grupo="vis"] .ep-it { cursor: grab; }
.ep-it.off .ep-nome { color: var(--txt3); }
.ep-grip { width: 16px; flex: none; color: var(--txt3); text-align: center; touch-action: none; font-size: 13px; }
.ep-nome { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-olho { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border: 0; background: none; color: var(--txt2); border-radius: 6px; cursor: pointer; }
.ep-olho:hover { background: color-mix(in srgb, var(--txt) 9%, transparent); color: var(--txt); }
.ep-olho svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ep-fixa { font-size: 11px; color: var(--txt3); padding-right: 8px; }
.ep-vazio { font-size: 12.5px; color: var(--txt3); padding: 6px 8px; margin: 0; }
.ep-pe { display: flex; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--linha); }
.ep-pe .bt { flex: 1; padding: 0 6px; }
.ep-it.col-alvo-antes { box-shadow: inset 0 2px 0 var(--azul); }
.ep-it.col-alvo-depois { box-shadow: inset 0 -2px 0 var(--azul); }
.ep-it.col-arrastando { opacity: .4; }
#lista .item.cab [data-col-drag] { touch-action: none; }
#lista .item.cab .col-alvo-antes, #lista .item.cab .col-alvo-depois { background: color-mix(in srgb, var(--azul) 8%, transparent); }
.col-ghost { position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none; padding: 6px 10px; background: var(--card); color: var(--txt); border: 1px solid var(--azul); border-radius: 6px; font-size: 12.5px; font-weight: 600; box-shadow: 0 10px 24px -8px rgba(0,0,0,.45); white-space: nowrap; }
body.col-arrastando-on, body.col-arrastando-on * { cursor: grabbing !important; user-select: none !important; }
.est-pop2 { align-items: stretch; border-color: color-mix(in srgb, var(--txt) 14%, transparent); }
.est-pop2 > * { min-width: 0; }
.ep-busca { width: auto; align-self: stretch; }
.cel-pop { border-color: color-mix(in srgb, var(--txt) 14%, transparent); }
.cel-pop-in { box-sizing: border-box; }
/* celular: botões da tabela no mesmo tamanho do computador (linhas de 36px) */
@media (max-width: 900px) {
  #lista:not(.cards):not(.antiga) .est-tab .item .acoes .bt, #lista:not(.cards):not(.antiga) .est-tab .item .copias .bt, #lista:not(.cards):not(.antiga) .est-tab .item .copias button { min-height: 0 !important; height: 24px !important; }
  #lista:not(.cards):not(.antiga) .est-tab .item .acoes .bt.icone-mini { min-width: 0 !important; width: 24px !important; }
  #lista:not(.cards):not(.antiga) .est-tab .item .chave { min-height: 0 !important; }
  #lista:not(.cards):not(.antiga) .est-tab .item input[type="checkbox"] { min-width: 0 !important; min-height: 0 !important; }
}
/* tela unificada: uma rolagem horizontal só (barra fixa no rodapé da tela), sem rolagem vertical dentro da tabela */
#lista .est-tab { overflow-x: auto; overflow-y: hidden; max-height: none; scrollbar-width: none; border-radius: 0; }
#lista .est-tab::-webkit-scrollbar { display: none; }
#lista .est-cab { position: sticky; top: var(--ferr-fim, 0px); z-index: 4; overflow: hidden; background: var(--card); border-bottom: 1px solid var(--linha); }
#lista .est-cab > .item.cab { position: static !important; border-bottom: 0 !important; }
#lista .est-corpo > .item:first-child { border-top: 0 !important; }
#lista .est-hbar { position: sticky; bottom: 0; z-index: 4; overflow-x: auto; overflow-y: hidden; height: 14px; background: var(--card); border-top: 1px solid var(--linha); border-radius: 0 0 8px 8px; scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--txt3) 60%, transparent) transparent; }
#lista .est-hbar > div { height: 1px; }
#lista .est-hbar[hidden] { display: none; }
/* todas as células com a mesma tipografia (só o nome da BM em destaque) */
#lista:not(.cards):not(.antiga) .est-corpo .item > :is(.ex, .num, .cod) { font-size: 13px !important; font-weight: 400 !important; color: var(--txt) !important; font-variant-numeric: tabular-nums; letter-spacing: normal; }
#lista:not(.cards):not(.antiga) .est-corpo .item > :is(.ex, .num, .cod) .cv-t, #lista:not(.cards):not(.antiga) .est-corpo .item > .cod .cp { font: inherit; color: inherit; }
#lista:not(.cards):not(.antiga) .est-corpo .item.apagado > :is(.ex, .num, .cod) { color: var(--txt3) !important; }
#lista:not(.cards):not(.antiga) .est-corpo .item.apagado > .num, #lista:not(.cards):not(.antiga) .est-corpo .item.apagado > .tit { opacity: 1 !important; }
#lista:not(.cards):not(.antiga) .est-corpo .item.apagado > .tit b { color: var(--txt3); }
.ok-v { color: var(--verde, #1fc27a); }
/* limites de todas as contas */
.lim-lista .lim-sep { font-style: normal; color: var(--txt3); margin: 0 5px; }
.lim-lista .lim-off, .lim-l.lim-off { color: var(--txt3); text-decoration: line-through; }
.lim-tab { display: grid; gap: 2px; max-height: 280px; overflow: auto; }
.lim-l { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 2px; border-top: 1px solid var(--linha); font-size: 13.5px; }
.lim-l:first-child { border-top: 0; }
.lim-n { display: grid; min-width: 0; }
.lim-n small { color: var(--txt3); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lim-l b { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lim-l.lim-off b { text-decoration: line-through; }
#lista:not(.cards):not(.antiga) .est-corpo .item > :is(.c-lmeta, .c-lext) { justify-content: flex-start !important; text-align: left !important; }
/* filtro avançado */
#bt-filtro-av { display: inline-flex; align-items: center; gap: 6px; }
#bt-filtro-av svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
#bt-filtro-av.on { border-color: var(--azul); color: var(--azul); }
.av-pop { position: fixed; z-index: 70; width: 390px; display: flex; flex-direction: column; background: var(--card); color: var(--txt); border: 1px solid color-mix(in srgb, var(--txt) 14%, transparent); border-radius: 12px; box-shadow: 0 18px 44px -14px rgba(0,0,0,.5); overflow: hidden; }
.av-pop > * { min-width: 0; }
.av-corpo { overflow: auto; padding: 4px 12px 12px; flex: 1; min-height: 0; display: grid; gap: 10px; align-content: start; overscroll-behavior: contain; }
.av-e, .av-vazio { font-size: 12.5px; color: var(--txt3); margin: 0; line-height: 1.45; }
.av-regra { border: 1px solid var(--linha); border-radius: 10px; padding: 10px; display: grid; gap: 8px; }
.av-regra.incompleta { border-style: dashed; }
.av-regra-cab { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.av-regra-cab b { font-size: 13.5px; font-weight: 600; }
.av-x { width: 26px; height: 26px; flex: none; border: 0; background: none; color: var(--txt3); font-size: 18px; line-height: 1; border-radius: 6px; cursor: pointer; }
.av-x:hover { background: var(--sutil); color: var(--txt); }
.av-seg { display: flex; flex-wrap: wrap; gap: 2px; background: var(--sutil); border-radius: 8px; padding: 2px; width: fit-content; max-width: 100%; }
.av-seg button { border: 0; background: none; color: var(--txt2); font: inherit; font-size: 12.5px; font-weight: 500; padding: 5px 9px; border-radius: 6px; cursor: pointer; }
.av-seg button[aria-pressed="true"] { background: var(--card); color: var(--txt); box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.av-faixa { display: grid; gap: 6px; }
.av-ou { font-size: 11px; font-weight: 700; letter-spacing: 0; color: var(--azul); }
.av-nums { display: flex; align-items: center; gap: 6px; }
.av-nums span { font-size: 12.5px; color: var(--txt3); }
.av-in, .av-chip-in { height: 32px; min-width: 0; border: 1px solid var(--linha); border-radius: 7px; background: var(--sutil); color: var(--txt); padding: 0 9px; font: inherit; font-size: 13.5px; box-sizing: border-box; }
.av-in { flex: 1; width: 0; font-variant-numeric: tabular-nums; }
.av-in:focus, .av-chip-in:focus { outline: 2px solid var(--azul); outline-offset: -1px; }
.av-mais { justify-self: start; border: 0; background: none; color: var(--azul); font: inherit; font-size: 12.5px; font-weight: 600; padding: 2px 0; cursor: pointer; }
.av-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border: 1px solid var(--linha); border-radius: 8px; padding: 5px; background: var(--sutil); }
.av-chips .av-chip-in { flex: 1 1 140px; border: 0; background: none; height: 26px; padding: 0 4px; }
.av-chips .av-chip-in:focus { outline: 0; }
.av-chip { display: inline-flex; align-items: center; gap: 2px; background: color-mix(in srgb, var(--azul) 16%, transparent); color: var(--txt); border-radius: 6px; padding: 2px 2px 2px 8px; font-size: 12.5px; }
.av-chip button { border: 0; background: none; color: var(--txt2); width: 20px; height: 20px; border-radius: 4px; cursor: pointer; font-size: 14px; line-height: 1; }
.av-chip button:hover { background: rgba(0,0,0,.15); }
.av-dica { font-size: 11.5px; color: var(--txt3); }
.av-add { display: grid; gap: 8px; }
.av-add > .bt { justify-self: start; }
.av-menu { display: grid; gap: 8px; border: 1px solid var(--linha); border-radius: 10px; padding: 8px; }
.av-menu-g { display: flex; flex-wrap: wrap; gap: 4px; }
.av-menu-g > span { flex-basis: 100%; font-size: 11px; font-weight: 700; letter-spacing: 0; color: var(--txt3); margin: 2px 2px 0; }
.av-menu-g button { border: 1px solid var(--linha); background: none; color: var(--txt); font: inherit; font-size: 12.5px; padding: 5px 9px; border-radius: 99px; cursor: pointer; }
.av-menu-g button:hover { border-color: var(--azul); color: var(--azul); }
.av-pe { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--linha); font-size: 12.5px; color: var(--txt3); }
/* atalhos dentro de Filtros */
.filtros-rapidos .fr-linha { display: flex; flex-wrap: wrap; gap: 6px; }
.filtros-rapidos .fr-linha .bt { height: 34px; font-size: 13px; }
.filtros-rapidos .fr-linha .bt svg { width: 15px; height: 15px; }
.filtros-rapidos .fr-linha .bt.on, .filtros-rapidos .fr-linha .bt[aria-pressed="true"] { border-color: var(--azul); color: var(--azul); }
.av-faixa-acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.av-ilim { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; color: var(--txt2); font: inherit; font-size: 12.5px; font-weight: 600; padding: 2px 0; cursor: pointer; }
.av-ilim .av-ck { width: 15px; height: 15px; border: 1.5px solid var(--linha2, var(--txt3)); border-radius: 4px; display: grid; place-items: center; }
.av-ilim[aria-pressed="true"] { color: var(--azul); }
.av-ilim[aria-pressed="true"] .av-ck { background: var(--azul); border-color: var(--azul); }
.av-ilim[aria-pressed="true"] .av-ck::after { content: ''; width: 7px; height: 4px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
#lista:not(.cards):not(.antiga) .est-corpo .item > .c-tit > b.tit-bm { display: flex; align-items: center; gap: 2px; min-width: 0; overflow: hidden; }
#lista:not(.cards):not(.antiga) .est-corpo .item > .c-tit > b.tit-bm .cv-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#lista:not(.cards):not(.antiga) .est-corpo .item > .c-tit > b.tit-bm .cp-v { flex: none; }
/* status Restabelecida */
.c-restabelecida { --mc: #14b8a6; }
.st[data-v="restabelecida"], .st-restabelecida { color: #14b8a6; }
.sel.st[data-v="restabelecida"] .sel-bt svg { stroke: currentColor; opacity: .7; }
.sel-op[data-v="restabelecida"]::before { content: ''; width: 8px; height: 8px; border-radius: 50%; flex: none; background: #14b8a6; }
:is(.cf-tag, .cf-n)[data-st="restabelecida"] { --c: #14b8a6; }
/* marcar colunas para copiar */
#lista .item.cab .col-sel { width: 14px; height: 14px; margin: 0 7px 0 0; padding: 0; vertical-align: -2px; border: 1.5px solid color-mix(in srgb, var(--txt3) 70%, transparent); border-radius: 4px; background: none; cursor: pointer; display: inline-grid; place-items: center; opacity: .55; transition: opacity .12s; }
#lista .item.cab > span:hover .col-sel, #lista .item.cab .col-sel:focus-visible { opacity: 1; }
#lista .item.cab .col-sel[aria-pressed="true"] { opacity: 1; background: var(--azul); border-color: var(--azul); }
#lista .item.cab .col-sel[aria-pressed="true"]::after { content: ''; width: 7px; height: 4px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
#bt-copiar-cols.on { border-color: var(--azul); color: var(--azul); }
/* desempenho: linhas fora da tela não são desenhadas pelo navegador */
/* (03/11) sem content-visibility nas linhas da tabela: com as colunas fixas da esquerda cada linha virava um bloco de pintura
   isolado e a rolagem para o lado travava; as linhas já vêm em lotes de 60, então desenhar todas sai mais barato */
#lista .est-corpo > .item { content-visibility: visible; contain: layout style; }
/* status leve (botão + menu único) */
#lista .st-pill { display: inline-flex; align-items: center; justify-content: space-between; gap: 6px; height: 26px; min-width: 112px; padding: 0 8px 0 10px; border: 1px solid var(--linha); border-radius: 6px; background: var(--sutil); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
#lista .st-pill svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; opacity: .7; }
#lista .st-pill:hover { border-color: color-mix(in srgb, var(--txt) 25%, transparent); }
.st-pill[data-v="disponivel"] { color: var(--verde, #1fc27a); } .st-pill[data-v="reservada"] { color: var(--ambar); } .st-pill[data-v="vendida"] { color: var(--roxo, #9c84ff); } .st-pill[data-v="caida"] { color: var(--verm); } .st-pill[data-v="rollback"] { color: var(--laranja-txt, #ff8f52); } .st-pill[data-v="reposicao"] { color: var(--azul2); } .st-pill[data-v="restabelecida"] { color: #14b8a6; }
.st-menu { position: fixed; z-index: 80; min-width: 170px; display: grid; gap: 2px; padding: 6px; background: var(--card); border: 1px solid color-mix(in srgb, var(--txt) 14%, transparent); border-radius: 10px; box-shadow: 0 14px 36px -12px rgba(0,0,0,.5); }
.st-menu .sel-op { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; color: var(--txt); font: inherit; font-size: 13px; text-align: left; padding: 7px 10px; border-radius: 6px; cursor: pointer; }
.st-menu .sel-op:hover, .st-menu .sel-op[aria-selected="true"] { background: var(--sutil); }
.st-menu .sel-op::before { content: ''; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--txt3); }
.st-menu .sel-op[data-v="disponivel"]::before { background: var(--verde, #1fc27a); } .st-menu .sel-op[data-v="reservada"]::before { background: var(--ambar); } .st-menu .sel-op[data-v="vendida"]::before { background: var(--roxo, #9c84ff); } .st-menu .sel-op[data-v="caida"]::before { background: var(--verm); } .st-menu .sel-op[data-v="rollback"]::before { background: var(--n-laranja, #ff8f52); } .st-menu .sel-op[data-v="reposicao"]::before { background: var(--azul); } .st-menu .sel-op[data-v="restabelecida"]::before { background: #14b8a6; }
/* conferência estoque × extensão: ícone fixo na lateral esquerda */
#lista .est-tab .item > .c-ck, #lista .est-tab .item > .c-alerta { position: sticky; z-index: 2; background: var(--card); }
#lista .est-tab .item > .c-ck { left: 0; box-shadow: -12px 0 0 var(--card); }
#lista .est-tab .item > .c-alerta { left: 32px; box-shadow: -10px 0 0 var(--card), 12px 0 0 var(--card); display: flex; align-items: center; justify-content: center; overflow: visible; }
#lista .est-tab .item.marcado > .c-ck, #lista .est-tab .item.marcado > .c-alerta { background: color-mix(in srgb, var(--azul) 7%, var(--card)); box-shadow: none; }
#lista .item.cab > .c-alerta { display: flex; align-items: center; justify-content: center; color: var(--txt3); }
#lista .item.cab > .c-alerta svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.al { position: relative; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; cursor: pointer; }
.al svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.al b { position: absolute; top: -4px; right: -6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: currentColor; font-size: 11px; line-height: 16px; text-align: center; }
.al b { color: var(--card); }
.al.al-erro b, .al.al-aviso b { background: var(--card); }
.al-ok { color: var(--verde, #1fc27a); opacity: .85; }
.al-erro { color: var(--verm); background: color-mix(in srgb, var(--verm) 14%, transparent); }
.al-aviso { color: var(--ambar); background: color-mix(in srgb, var(--ambar) 14%, transparent); }
.al-info { color: var(--azul2); background: color-mix(in srgb, var(--azul) 12%, transparent); }
.al.al-erro b { color: var(--verm); box-shadow: inset 0 0 0 1.5px var(--verm); } .al.al-aviso b { color: var(--ambar); box-shadow: inset 0 0 0 1.5px var(--ambar); }
#lista .est-corpo .item > .c-alerta .cv-t { overflow: visible; }
/* status na extensão */
.xs { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; }
.xs::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.xs-ativa { color: var(--verde, #1fc27a); } .xs-caida { color: var(--verm); } .xs-fora { color: var(--ambar); } .xs-nunca, .xs-semid { color: var(--txt3); }
.xs-h { color: var(--txt3); font-size: 11.5px; margin-left: 6px; }
/* janela da conferência */
.al-pop { width: 360px; }
.al-resumo { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--txt2); }
.al-lista { display: grid; gap: 8px; max-height: 320px; overflow: auto; }
.al-item { display: grid; gap: 6px; padding: 9px 10px; border-radius: 8px; border: 1px solid var(--linha); }
.al-item.al-erro { border-color: color-mix(in srgb, var(--verm) 45%, var(--linha)); background: color-mix(in srgb, var(--verm) 7%, transparent); }
.al-item.al-aviso { border-color: color-mix(in srgb, var(--ambar) 45%, var(--linha)); background: color-mix(in srgb, var(--ambar) 7%, transparent); }
.al-item.al-info { background: color-mix(in srgb, var(--azul) 6%, transparent); }
.al-t { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; color: var(--txt); }
.al-t svg { width: 16px; height: 16px; flex: none; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.al-item.al-erro .al-t svg { color: var(--verm); } .al-item.al-aviso .al-t svg { color: var(--ambar); } .al-item.al-info .al-t svg { color: var(--azul2); }
.al-m { font-size: 12.5px; color: var(--txt2); padding-left: 24px; }
.al-item .bt { justify-self: start; margin-left: 24px; }
.al-ok { margin: 0; }
p.al-ok { font-size: 13.5px; color: var(--verde, #1fc27a); }
/* filtros: mesmos grupos da vitrine em cima, os da equipe embaixo */
.pop-sec { font-size: 11.5px; font-weight: 700; letter-spacing: 0; color: var(--azul); padding-bottom: 6px; border-bottom: 1px solid var(--linha); }
.pop-sec small { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--txt3); margin-left: 6px; }
.pop-grupos .pop-sec:not(:first-child) { margin-top: 6px; }
.op-moeda { display: inline-flex; align-items: center; gap: 6px; }
.op-moeda .bandeira { width: 18px; height: 12px; flex: none; border-radius: 2px; box-shadow: 0 0 0 1px rgba(127,127,127,.25); }
.op-cor { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.moeda-cod { display: inline-grid; place-items: center; min-width: 28px; height: 15px; padding: 0 3px; border-radius: 3px; flex: none; font: 700 9px/1 system-ui, sans-serif; letter-spacing: .03em; color: var(--txt2); background: color-mix(in srgb, var(--azul) 14%, transparent); box-shadow: 0 0 0 1px rgba(127,127,127,.25); }
.chip-adm[aria-pressed="true"] .moeda-cod { color: #fff; background: rgba(255,255,255,.18); }
.rng-adm { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rng-adm input { width: 110px; min-width: 0; flex: 1 1 90px; height: 34px; padding: 0 10px; border: 1px solid var(--linha2); border-radius: 9px; background: var(--bg2); color: var(--txt); font: inherit; font-size: 13px; }
.rng-adm input:focus { outline: 2px solid var(--azul); outline-offset: 0; border-color: var(--azul); }
.rng-adm span { color: var(--txt3); font-size: 12.5px; }
.tag-f .op-moeda .bandeira { width: 16px; height: 10.7px; }
.av-moeda { flex-wrap: wrap; }

/* editor: BMs semelhantes à venda (referência de preço), embaixo do Valor venda */
.ed-sem { display: grid; gap: 4px; min-width: 0; }
.ed-sem[hidden] { display: none; }
.ed-sem-tit { color: var(--txt2, inherit); opacity: .8; }
.ed-sem-l { display: flex; flex-wrap: wrap; gap: 6px; }
.ed-sem-it { font-size: 12px; padding: 3px 8px; border-radius: 99px; border: 1px solid var(--linha2, rgba(127,127,127,.35)); white-space: nowrap; font-variant-numeric: tabular-nums; }
/* "Semelhantes N" nas ações da BM (estoque): filtra a lista para ela + as parecidas */
.bt.mini.sem-bt { display: inline-flex; align-items: center; gap: 5px; color: var(--azul2); white-space: nowrap; }
.sem-bt svg { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
#lista:not(.cards):not(.antiga) .est-corpo .item > .c-tit > b.tit-bm .sem-bt { flex: none; margin-left: 8px; height: 24px; font-size: 12px; padding: 0 8px; }

/* login rápido por QR code (login.html e aprovar-qr.html) */
.qr-caixa { justify-self: center; width: min(220px, 100%); aspect-ratio: 1; background: #fff; border: 1px solid var(--linha2); border-radius: 14px; padding: 8px; transition: opacity .2s; }
.qr-caixa svg { display: block; width: 100%; height: 100%; }
.qr-caixa.qr-velho { opacity: .18; }
.qr-sk { width: 100%; height: 100%; }
.qr-num { display: grid; justify-items: center; gap: 2px; }
.qr-num small { font-size: 12.5px; color: var(--txt3); }
.qr-num b { font-size: 34px; font-weight: 800; letter-spacing: 2px; color: var(--azul2); font-variant-numeric: tabular-nums; }
.qr-tempo { text-align: center; font-size: 13px; margin: -6px 0 0; }
.qr-tempo:empty { display: none; }
#aq section { display: grid; gap: 16px; }
#aq section[hidden] { display: none; }
.aq-video { position: relative; width: 100%; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: #000; }
.aq-video video { width: 100%; height: 100%; object-fit: cover; display: block; }
.aq-mira { position: absolute; inset: 18%; border: 3px solid rgba(255,255,255,.85); border-radius: 16px; box-shadow: 0 0 0 999px rgba(0,0,0,.28); pointer-events: none; }
.aq-dados { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; margin: 0; padding: 12px 14px; border: 1px solid var(--linha); border-radius: 12px; background: var(--bg2); font-size: 14px; }
.aq-dados dt { color: var(--txt3); }
.aq-dados dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.aq-rot { text-align: center; font-weight: 600; font-size: 14px; margin: 0; }
.aq-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.aq-n.bt { height: 64px; font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.aq-n.bt:hover { border-color: var(--azul); }
.cfg-qr { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cfg-qr > div { display: grid; gap: 2px; min-width: 0; flex: 1 1 220px; }
.cfg-qr small { font-size: 12.5px; color: var(--txt3); }
/* aviso chegou antes do primeiro clique: o navegador segurou o som (sons.js) */
.som-bloqueado { position: fixed; top: calc(14px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 120; border: 0; border-radius: 999px; padding: 10px 18px; font: inherit; font-weight: 700; cursor: pointer; background: var(--txt); color: var(--bg); box-shadow: 0 10px 30px -8px var(--sombra); animation: aviso-entra .18s ease-out; }

/* tela de carregamento: cobre o painel até o estoque chegar e a aba certa abrir (abrir-cedo.js).
   Pelo id: a classe "carregando" também marca o Início, gráficos e botões carregando, e com ela o esqueleto
   do Início cobria a tela toda e o painel parecia travado enquanto o /api/dashboard não respondia. */
#carregando { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: var(--bg); transition: opacity .22s; }
#carregando.saindo { opacity: 0; pointer-events: none; }
.carregando-in { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 24px; }
.carregando-in .marca-u { width: 52px; height: 52px; border-radius: 14px; }
.carregando-in .marca-u svg { width: 32px; height: 32px; }
.carregando-in b { font-size: 15px; color: var(--txt); font-weight: 650; }
.carregando-in small { font-size: 12.5px; color: var(--txt3); }
.carregando-giro { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--linha); border-top-color: var(--azul); animation: carregando-gira .8s linear infinite; }
@keyframes carregando-gira { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .carregando-giro { animation-duration: 2.4s; } }

/* aba Site: modos "Editar na vitrine" e "Configurações do site" */
#tab-site .seg-disp[hidden], #site-editar[hidden], #site-config[hidden] { display: none !important; }
#tab-site .cab-pag { flex-wrap: wrap; }
.site-config { display: grid; gap: 16px; min-width: 0; }
@media (max-width: 600px) { #tab-site .site-modo { width: 100%; } #tab-site .site-modo button { flex: 1; } }
/* Registrar reposição: mesmo diálogo da venda, só com o cliente */
#f-venda[data-modo="reposicao"] [data-so-venda], #f-venda[data-modo="reserva"] [data-so-venda] { display: none; }
/* reservada: para quem é a reserva, embaixo do status (issue #594) */
.st-para { display: block; max-width: 140px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: var(--txt2); }
/* (03/11) Tabela antiga entre 901 e 1180 px: a coluna do título ficava estreita e as etiquetas (Clientes, Revenda,
   Interno, Entregável) empilhavam uma por linha. Nessa faixa ela vira cartões, dois por linha, como no celular. */
@media (min-width: 901px) and (max-width: 1180px) {
  #lista.antiga { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; background: none; border: 0; border-radius: 0; box-shadow: none; }
  #lista.antiga > :not(.item) { grid-column: 1 / -1; }
  #lista.antiga > .item.cab { display: none; }
  #lista.antiga > .item { grid-template-columns: 22px minmax(0, 1fr) auto !important; grid-template-areas: "ck cod p" "tit tit tit" "v v g" "s s acoes"; gap: 8px 12px !important; align-content: start; background: var(--card); border: 1px solid var(--linha) !important; border-radius: 14px !important; padding: 14px; }
  #lista.antiga > .item .ck { grid-area: ck; } #lista.antiga > .item .cod { grid-area: cod; } #lista.antiga > .item .tit { grid-area: tit; }
  #lista.antiga > .item > .v { grid-area: v; text-align: left; } #lista.antiga > .item > .g { grid-area: g; display: block; text-align: right; }
  #lista.antiga > .item .s { grid-area: s; } #lista.antiga > .item .p { grid-area: p; justify-content: flex-end; } #lista.antiga > .item .acoes { grid-area: acoes; }
  #lista.antiga > .item > .v::before { content: 'Valor'; display: block; font-size: 11.5px; color: var(--txt3); font-weight: 600; }
  #lista.antiga > .item > .g::before { content: 'Gasto total'; display: block; font-size: 11.5px; color: var(--txt3); font-weight: 600; }
  #lista.antiga > .item .tit b { white-space: normal; }
}
/* (03/11) botão de copiar código no título da BM: sempre à vista, como o "Copiar código" da vitrine */
#lista .item .cp-v.cp-cod-tit { opacity: .75 !important; font-size: 13px; }
#lista .item .cp-v.cp-cod-tit:hover, #lista .item .cp-v.cp-cod-tit:focus-visible { opacity: 1 !important; }

/* 05/11: cabeçalho da tabela do estoque opaco (com o vidro, as linhas apareciam por trás dele ao rolar) */
#lista .est-cab, #lista:not(.cards):not(.antiga) .item.cab { background: linear-gradient(var(--card), var(--card)), var(--bg); }
.lista > .item.cab { background: linear-gradient(var(--sutil), var(--sutil)), linear-gradient(var(--card), var(--card)), var(--bg); }
/* 05/11: com a barra de abas flutuante, a barra do Estoque gruda no fim do topo real (sem vão por onde as linhas apareciam) */
body.tem-ab .ferramentas { top: var(--barra-real, var(--barra-h)); }

/* (09/11, issue #460) botão de confirmar filtros: rodapé fixo no fim do pop-up Filtros e do Filtro avançado,
   "Limpar" à esquerda e "Ver N BMs" (azul da marca) à direita; no celular com toque de 44pt (HIG) */
.pop-pe.f-pe { position: sticky; bottom: -16px; margin: 0 -16px -16px; padding: 12px 16px; background: var(--card); justify-content: space-between; align-items: center; gap: 12px; z-index: 1; border-radius: 0 0 14px 14px; }
.ferramentas .pop .pop-pe.f-pe { background: color-mix(in srgb, var(--bg) 96%, transparent); }
.f-ver { white-space: nowrap; }
.av-pe-bts { display: inline-flex; gap: 8px; align-items: center; }
@media (pointer: coarse) { .f-ver, .pop-pe.f-pe .link-adm, .av-pe-bts .bt { min-height: 44px; } }
/* o "Voltar ao topo" ficava por cima do "Ver N BMs" no celular: some enquanto um pop-up de filtro está aberto */
body:has(#pop-filtros:not([hidden])) .topo-bt, body:has(#av-pop) .topo-bt { visibility: hidden; }

/* (10/11, issue #501) selo de atenção no Estoque: rollback, sumiu dos perfis, caiu na Meta, conta desabilitada */
.at-selo { display: inline-flex; align-items: center; gap: 4px; min-height: 24px; padding: 0 9px 0 7px; margin: 2px 0 0 8px; border: 0; border-radius: 99px; font: inherit; font-size: 11.5px; font-weight: 700; line-height: 1; white-space: nowrap; vertical-align: middle; cursor: pointer;
  color: var(--verm); background: color-mix(in srgb, var(--verm) 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--verm) 40%, transparent); }
.at-selo.at-sumiu, .at-selo.at-conta, .at-selo.at-divida { color: var(--ambar); background: color-mix(in srgb, var(--ambar) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ambar) 45%, transparent); }
.at-selo svg { width: 13px; height: 13px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.at-selo b { font-weight: 800; opacity: .8; }
.at-selo:hover { filter: brightness(1.08); } .at-selo:focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; }
.item .tit > .at-selo { margin-left: 0; margin-top: 4px; display: inline-flex; }
.item.cartao .cc-at { padding: 0 2px 8px; } .item.cartao .cc-at .at-selo { margin: 0; }
.at-faixa { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--verm) 40%, var(--linha)); background: color-mix(in srgb, var(--verm) 8%, var(--card)); }
.at-faixa[hidden] { display: none; }
.at-faixa-ic { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--verm); background: color-mix(in srgb, var(--verm) 15%, transparent); }
.at-faixa-ic svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.at-faixa-t { flex: 1; min-width: 0; display: grid; gap: 2px; } .at-faixa-t b { font-size: 14px; } .at-faixa-t small { font-size: 12.5px; color: var(--txt2, var(--txt3)); }
.at-faixa .bt { flex: none; }
@media (max-width: 560px) { .at-faixa { flex-wrap: wrap; } .at-faixa .bt { width: 100%; } }
#lista .item .tit-bm > .at-selo { flex: none; margin: 0 4px 0 6px; order: 0; }
.at-selo.at-curto { width: 24px; padding: 0; justify-content: center; }
.at-selo.at-curto svg { width: 14px; height: 14px; }
#lista .est-corpo .item.at-on { background: color-mix(in srgb, var(--verm) 6%, var(--card)); box-shadow: inset 3px 0 0 var(--verm); }
#lista .est-corpo .item.at-on > .c-ck, #lista .est-corpo .item.at-on > .c-alerta { background: color-mix(in srgb, var(--verm) 6%, var(--card)); }
