/* Victor's Celulares Loja 6 · CSS próprio v1.0 — zero CDN/offline-safe */
:root {
  --bg: #0b1220; --panel: #111c33; --panel2: #16223d; --line: #243354;
  --txt: #e8eefc; --mut: #93a3c4; --ok: #22c55e; --warn: #f59e0b;
  --bad: #ef4444; --acc: #38bdf8; --chip: #1b2a4a;
  --r: 14px; --tap: 56px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--txt);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

/* ---------- SCROLLBAR PREMIUM GRUPO ATLAS (DARK / NEON SLIM) ---------- */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--line) var(--panel);
}
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: #080f1d;
  border-radius: 8px;
}
::-webkit-scrollbar-thumb {
  background: #243556;
  border-radius: 8px;
  border: 1px solid #111c33;
}
::-webkit-scrollbar-thumb:hover {
  background: #38bdf8;
}

/* Garante selects, options e dropdowns 100% dark theme sem fundo branco nativo */
select {
  background-color: #0a1122 !important;
  color: var(--txt) !important;
}
select option {
  background-color: #0a1122 !important;
  color: #f1f5f9 !important;
  padding: 8px 12px;
}

/* Blindagem contra fundo branco nativo de inputs e autofill (Chrome/Edge/Safari) */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #060e1d inset !important;
  -webkit-text-fill-color: #ffffff !important;
  transition: background-color 5000s ease-in-out 0s;
  caret-color: #38bdf8 !important;
}

input[type="text"], input[type="password"], input[type="search"] {
  background-color: #060e1d;
  color: #ffffff;
}


/* ---------- LOGIN ---------- */
.login-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.login-card {
  width: min(420px, 100%); background: var(--panel);
  border: 1px solid var(--line); border-radius: 20px; padding: 28px 24px;
}
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.brand-mark {
  width: 52px; height: 52px; border-radius: 14px; background: #052e16;
  display: grid; place-items: center; font-weight: 800; font-size: 22px; color: var(--ok);
}
.brand h1 { font-size: 20px; margin: 0; }
.brand small { color: var(--mut); }
.field { margin: 12px 0; }
.field label { display: block; font-size: 13px; color: var(--mut); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; background: #0a1122; border: 1px solid var(--line);
  border-radius: 10px; padding: 12px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--acc); border-color: var(--acc);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 18px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--panel2); color: var(--txt);
  font-weight: 600;
}
.btn-primary { background: #15803d; border-color: #166534; }
.btn-danger { background: #7f1d1d; border-color: #991b1b; }
.btn-ghost { background: transparent; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.hint { font-size: 13px; color: var(--mut); }
.err { color: #fca5a5; font-size: 13px; min-height: 18px; }

/* ---------- SHELL ---------- */
.shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100dvh; }
.side {
  background: #0a1122; border-right: 1px solid var(--line);
  padding: 16px 12px; display: flex; flex-direction: column; gap: 8px;
  position: sticky; top: 0; height: 100dvh;
}
.side .logo { display: flex; align-items: center; gap: 12px; padding: 6px 8px 16px; }
.side .logo .brand-mark { width: 44px; height: 44px; font-size: 18px; }
.side .logo b { font-size: 15px; display: block; }
.side .logo span { font-size: 12px; color: var(--mut); }
.nav-btn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: transparent; border: 1px solid transparent; border-radius: 12px;
  padding: 12px; font-size: 15px; text-align: left; min-height: var(--tap);
}
.nav-btn .ic { font-size: 20px; width: 26px; text-align: center; }
.nav-btn.active { background: var(--chip); border-color: var(--line); }
.side .who { margin-top: auto; font-size: 12px; color: var(--mut); padding: 8px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; background: #0d1528;
  border-bottom: 1px solid var(--line); padding: 10px 16px;
}
.topbar .row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.subtabs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.subtab {
  border: 1px solid var(--line); background: transparent; border-radius: 999px;
  padding: 8px 14px; white-space: nowrap; font-size: 14px;
}
.subtab.active { background: var(--chip); border-color: var(--acc); }
.conn { margin-left: auto; font-size: 13px; color: var(--mut); display: flex; gap: 8px; align-items: center; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); display: inline-block; }
.dot.off { background: var(--bad); }
.content { padding: 16px 20px; max-width: 1750px; width: 100%; margin: 0 auto; }
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r); padding: 16px; margin-bottom: 14px;
}
.card h2 { margin: 0 0 4px; font-size: 17px; }
.card p.sub { margin: 0 0 12px; color: var(--mut); font-size: 13px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th, table.tbl td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; }
table.tbl th { color: var(--mut); font-weight: 600; font-size: 12px; text-transform: uppercase; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.badge {
  display: inline-block; font-size: 12px; padding: 2px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--chip);
}
.badge.ok { color: #86efac; border-color: #166534; }
.badge.warn { color: #fcd34d; border-color: #92400e; }
.badge.bad { color: #fca5a5; border-color: #7f1d1d; }

/* ---------- PDV ---------- */
.pdv { display: grid; grid-template-columns: 1fr 340px; gap: 14px; align-items: start; }
.pdv-grid { grid-template-columns: 1.15fr 0.85fr; }
.pdv-topo-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 14px; }
.pdv-tabs-tipo { display: flex; gap: 8px; margin-bottom: 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.pdv-tab-btn { background: transparent; border: 1px solid var(--line); color: var(--mut); padding: 8px 16px; border-radius: 8px; font-weight: 700; cursor: pointer; transition: all .15s; font-size: 14px; }
.pdv-tab-btn.active { background: var(--panel2); border-color: var(--acc); color: var(--acc); box-shadow: 0 0 10px rgba(56, 189, 248, .15); }
.box-cad-inline { background: #070e1c; border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-top: 8px; }
.box-cad-inline .grid-cad { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; }
.chip {
  background: var(--chip); border: 1px solid var(--line); border-radius: 14px;
  min-height: 96px; padding: 10px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px; font-size: 14px;
}
.chip:active { transform: scale(.96); border-color: var(--ok); }
.chip.active { border-color: var(--ok); background: rgba(34, 197, 94, .12); box-shadow: inset 0 0 0 1px rgba(34,197,94,.35); }
.chip.active::after { content: "✓"; position: absolute; margin: -46px 0 0 74px; color: var(--ok); font-weight: 800; }
.chip { position: relative; }
.chip .e { font-size: 30px; }
.chip .p { color: var(--ok); font-weight: 700; }
.cart { position: sticky; top: 130px; }
.cart-lines { max-height: 300px; overflow: auto; margin: 8px 0; }
.cart-line { display: grid; grid-template-columns: 1fr auto auto auto; gap: 6px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; align-items: center; }
.qty button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); }
.totals { font-size: 15px; }
.totals .grand { font-size: 24px; font-weight: 800; color: var(--ok); }
.paygrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.paygrid .btn { min-height: 48px; font-size: 14px; }
.scanbar { display: flex; gap: 8px; margin: 10px 0; }
.scanbar input { flex: 1; background: #0a1122; border: 1px solid var(--line); border-radius: 10px; padding: 12px; }

/* ---------- MODAL ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(2,6,16,.72); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal { 
  position: relative; 
  width: min(620px, 100%); 
  max-height: 90dvh; 
  overflow-y: auto; 
  background: var(--panel); 
  border: 1px solid rgba(56, 189, 248, 0.25); 
  border-radius: 20px; 
  padding: 24px; 
  box-shadow: 0 20px 50px rgba(0,0,0,0.85), 0 0 30px rgba(14,116,244,0.15);
}
.modal-lg { width: min(920px, 100%) !important; }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; padding-right: 44px; }
.modal-header h2 { margin: 0; }
.modal-close { 
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 50;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.85); 
  border: 1px solid rgba(255, 255, 255, 0.15); 
  color: #94a3b8; 
  font-size: 18px; 
  cursor: pointer; 
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1; 
  transition: all .2s ease;
  backdrop-filter: blur(8px);
}
.modal-close:hover { 
  color: #ffffff; 
  background: rgba(239, 68, 68, 0.2); 
  border-color: #ef4444;
  transform: scale(1.08);
}
.modal h2 { margin-top: 0; padding-right: 40px; }
.modal .actions { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }

/* ---------- TOASTS ---------- */
#toasts { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 99; display: flex; flex-direction: column; gap: 8px; width: min(480px, 92vw); }
.toast { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.toast.ok { border-color: #166534; } .toast.bad { border-color: #7f1d1d; }

/* ---------- SELETOR RAPIDO DE MERCADORIA REAL (DROPDOWN) ---------- */
.search-box-wrap { position: relative; margin-bottom: 12px; }
.search-dropdown {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 999;
  background: #0d172e; border: 1px solid var(--acc); border-radius: 12px;
  max-height: 380px; overflow-y: auto; box-shadow: 0 16px 36px rgba(0,0,0,.85);
}
.search-item {
  display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px;
  align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line);
  cursor: pointer; font-size: 14px; transition: background .15s ease;
}
.search-item:hover, .search-item.selected { background: var(--chip); }
.search-item .cod { color: var(--mut); font-family: monospace; font-size: 12px; }
.search-item .nome { font-weight: 600; color: var(--txt); }
.search-item .est { font-size: 12px; padding: 2px 8px; border-radius: 6px; background: rgba(56, 189, 248, .1); color: var(--acc); }
.search-item .prc { font-weight: 700; color: var(--ok); text-align: right; font-size: 15px; }
.search-count { padding: 6px 14px; font-size: 12px; color: var(--mut); background: #070d1a; border-bottom: 1px solid var(--line); }

/* ---------- PRINT: promissória ---------- */
@media print {
  body.print-promissoria .shell, body.print-promissoria #toasts { display: none !important; }
  body.print-promissoria .print-area { display: block !important; }
}
.print-area { display: none; color: #000; background: #fff; }
.promissoria { border: 2px solid #000; padding: 18px; font-family: serif; max-width: 700px; margin: 0 auto; }
.promissoria h2 { text-align: center; margin: 0 0 10px; }
.promissoria .linha { border-bottom: 1px solid #000; min-height: 22px; margin: 6px 0; }

/* ---------- PRINT: etiquetas 16,93 x 44,45mm ---------- */
@page etiqueta { size: 44.45mm 16.93mm; margin: 1mm; }
@media print {
  body.print-etiqueta .shell, body.print-etiqueta #toasts { display: none !important; }
  body.print-etiqueta .etiquetas { display: block !important; }
}
.etiquetas { display: none; }
.etiqueta {
  page: etiqueta; width: 42mm; height: 14.9mm; overflow: hidden;
  font-size: 7pt; color: #000; background: #fff;
  border: 1px dashed #999; padding: 1mm; margin-bottom: 1mm;
  page-break-inside: avoid;
}

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 40; left: 0; top: 0; bottom: 0; width: 240px; transform: translateX(-100%); transition: transform .2s; height: 100dvh; }
  .side.open { transform: none; }
  .pdv, .pdv-grid, .grid2 { grid-template-columns: 1fr; }
  .cart { position: static; }
  #menuBtn { display: inline-flex !important; }
}
#menuBtn { display: none; }

/* ═══════════════════════════════════════════════════════════════════════════
   v2.0 — primitivas compartilhadas pelos módulos novos
   (Financeiro/RH · Compras XML · Produtos & Preços · Caixa & Fechamento)
   ═══════════════════════════════════════════════════════════════════════════ */

/* utilitários de texto */
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .92em; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mut { color: var(--mut); }

/* KPI cards */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px 18px; border-left: 4px solid var(--line);
  display: flex; flex-direction: column; justify-content: center; gap: 4px;
}
.kpi .v { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.25; display: block; }
.kpi .l { font-size: 12px; color: var(--mut); text-transform: uppercase; letter-spacing: .05em; margin-top: 4px; display: block; }
.kpi.ok { border-left-color: var(--ok); } .kpi.ok .v { color: #86efac; }
.kpi.warn { border-left-color: var(--warn); } .kpi.warn .v { color: #fcd34d; }
.kpi.bad { border-left-color: var(--bad); } .kpi.bad .v { color: #fca5a5; }

/* barras de filtro / ação */
.filters {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r); padding: 12px 14px; margin-bottom: 12px;
}
.filters .field { margin: 0; flex: 0 1 auto; min-width: 120px; }
.filters .field-sm { flex: 0 0 130px !important; min-width: 120px !important; }
.filters .field-md { flex: 0 1 180px !important; min-width: 150px !important; }
.filters .field-grow { flex: 1 1 240px !important; min-width: 200px !important; }
.filters .field input, .filters .field select { padding: 10px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.toolbar .btn { min-height: 44px; }

/* tabela densa com rolagem */
.tbl-wrap {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  overflow: auto; max-height: 62dvh; margin-bottom: 14px;
}
.tbl-wrap table.tbl { margin: 0; }
.tbl-wrap table.tbl thead th {
  position: sticky; top: 0; z-index: 2; background: #0d1528;
  box-shadow: inset 0 -1px 0 var(--line);
}
.tbl-wrap table.tbl tbody tr:hover { background: rgba(56, 189, 248, .05); }
table.tbl tfoot th { border-top: 2px solid var(--line); background: #0d1528; }
table.tbl tr.tot td { font-weight: 700; border-top: 1px solid var(--line); }
table.tbl tr.tot.ok td { color: #86efac; }
table.tbl tr.tot.bad td { color: #fca5a5; }
table.tbl td .badge { margin-left: 4px; }

/* abas internas de módulo e stepper tátil */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 16px 0; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.tab {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: rgba(17, 28, 51, 0.7); border-radius: 12px;
  padding: 10px 18px; font-size: 13.5px; font-weight: 700; min-height: 44px; color: var(--mut);
  cursor: pointer; transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
}
.tab:hover { background: rgba(30, 58, 95, 0.6); color: #fff; border-color: rgba(56, 189, 248, 0.4); transform: translateY(-1px); }
.tab.active, .tab.is-on {
  background: linear-gradient(135deg, rgba(14, 116, 244, 0.25) 0%, rgba(56, 189, 248, 0.15) 100%);
  border-color: var(--acc); color: #fff; font-weight: 800;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.tab-num {
  width: 22px; height: 22px; border-radius: 50%; background: #0f172a;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: var(--acc); border: 1px solid rgba(56, 189, 248, 0.3);
}
.tab.active .tab-num { background: var(--acc); color: #040812; font-weight: 900; }

/* etiquetas de dado */
.tag {
  display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 6px;
  background: rgba(56, 189, 248, .12); color: var(--acc); border: 1px solid rgba(56, 189, 248, .25);
  white-space: nowrap;
}
.pill-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* estado vazio */
.empty {
  padding: 32px 16px; text-align: center; color: var(--mut); font-size: 14px;
  border: 1px dashed var(--line); border-radius: 14px; margin: 12px 0;
  background: rgba(10, 17, 34, 0.4);
}

/* barra de progresso (margem, meta, ocupação) */
.bar { height: 10px; background: #0a1122; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, #15803d, var(--ok)); transition: width .3s ease; }

/* layout em 2 colunas (form + lista) */
.split { display: grid; grid-template-columns: minmax(320px, 420px) 1fr; gap: 18px; align-items: start; }

/* checkbox de linha */
.chk { width: 18px; height: 18px; accent-color: var(--ok); cursor: pointer; }

/* tecla de atalho visível nos botões */
.kbd {
  display: inline-block; font-family: ui-monospace, Consolas, monospace; font-size: 11px;
  padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line);
  background: #0a1122; color: var(--mut); margin-left: 6px; line-height: 1.5;
}

/* dropzone ultra-moderna do XML de compra (sem input feio visível) */
.dropzone {
  border: 2px dashed rgba(56, 189, 248, 0.35); border-radius: 16px; padding: 28px 20px;
  text-align: center; color: var(--mut); transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
  background: rgba(10, 17, 34, 0.7); cursor: pointer; position: relative;
}
.dropzone:hover {
  border-color: var(--acc); background: rgba(14, 116, 244, 0.08);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.15); transform: translateY(-1px);
}
.dropzone.is-over {
  border-color: #22c55e; background: rgba(34, 197, 94, 0.12);
  color: #fff; box-shadow: 0 0 24px rgba(34, 197, 94, 0.25);
}

/* controle de quantidade rápido para etiquetas (+ e - táteis) */
.qty-stepper {
  display: inline-flex; align-items: center; background: #060e1d;
  border: 1px solid rgba(56, 189, 248, 0.3); border-radius: 10px; overflow: hidden;
}
.qty-stepper-btn {
  width: 36px; height: 38px; background: rgba(30, 58, 95, 0.5);
  border: none; color: #fff; font-size: 16px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: all .15s ease;
}
.qty-stepper-btn:hover { background: var(--acc); color: #040812; }
.qty-stepper-input {
  width: 50px; height: 38px; background: transparent; border: none;
  text-align: center; color: #fff; font-size: 14px; font-weight: 800; font-family: monospace;
}
.qty-stepper-input:focus { outline: none; }

/* input number dark mode global */
input[type="number"] {
  background: #0a1122; color: #fff; border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px;
}

/* impressão genérica de relatórios (DRE, fechamento, promissória) */
@media print {
  body.print-relatorio .shell, body.print-relatorio #toasts, body.print-relatorio .topbar { display: none !important; }
  body.print-relatorio .print-area { display: block !important; }
}
.print-area .relatorio { color: #000; background: #fff; padding: 16px; font-size: 12px; }
.print-area .relatorio table { width: 100%; border-collapse: collapse; }
.print-area .relatorio td, .print-area .relatorio th { border-bottom: 1px solid #999; padding: 4px 6px; }

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .kpi .v { font-size: 18px; }
  .tbl-wrap { max-height: none; }
}

/* ==============================================================================
 * ESTILOS ESPECÍFICOS: ASSISTÊNCIA TÉCNICA (O.S.), SENHAS & CONSULTA DE PREÇOS
 * ============================================================================== */
.pattern-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #060b16;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  margin-top: 6px;
}
.pattern-grid {
  display: grid;
  grid-template-columns: repeat(3, 44px);
  grid-template-rows: repeat(3, 44px);
  gap: 12px;
  justify-content: center;
  margin: 8px 0;
}
.pattern-dot {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #111e38;
  border: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  color: var(--mut);
  cursor: pointer;
  user-select: none;
  transition: all .15s ease;
}
.pattern-dot:hover {
  border-color: var(--acc);
  color: var(--txt);
  transform: scale(1.08);
}
.pattern-dot.active {
  background: var(--acc);
  border-color: #38bdf8;
  color: #04101e;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}
.pattern-seq-display {
  font-family: ui-monospace, monospace;
  font-size: 13px;
  color: #38bdf8;
  letter-spacing: 2px;
  min-height: 20px;
}
.status-step-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.status-step-pill.aberta { background: rgba(234, 179, 8, .15); color: #fde047; border: 1px solid rgba(234, 179, 8, .3); }
.status-step-pill.bancada { background: rgba(56, 189, 248, .15); color: #7dd3fc; border: 1px solid rgba(56, 189, 248, .3); }
.status-step-pill.aprovada { background: rgba(168, 85, 247, .15); color: #d8b4fe; border: 1px solid rgba(168, 85, 247, .3); }
.status-step-pill.concluida { background: rgba(34, 197, 94, .15); color: #86efac; border: 1px solid rgba(34, 197, 94, .3); }
.status-step-pill.cancelada { background: rgba(239, 68, 68, .15); color: #fca5a5; border: 1px solid rgba(239, 68, 68, .3); }

/* ---------- MODAL RESPONSIVO AMPLO ---------- */
.modal-lg { width: min(1040px, 96vw) !important; max-height: 94dvh !important; }
.modal-xl { width: min(1200px, 98vw) !important; max-height: 96dvh !important; }

/* ---------- STEPPER ELEGANTE DE ETIQUETAS (SEM BORDAS OU BOTOES BRANCOS) ---------- */
.etiq-stepper {
  display: inline-flex !important;
  align-items: center !important;
  background: #090e1a !important;
  border: 1px solid rgba(56, 189, 248, 0.4) !important;
  border-radius: 6px !important;
  overflow: hidden !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4) !important;
}
.etiq-stepper button {
  background: #1e293b !important;
  color: #38bdf8 !important;
  border: none !important;
  outline: none !important;
  width: 28px !important;
  height: 28px !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  line-height: 1 !important;
  transition: all 0.15s ease !important;
}
.etiq-stepper button:hover {
  background: #38bdf8 !important;
  color: #040812 !important;
}
.etiq-stepper input {
  background: #050b16 !important;
  color: #f8fafc !important;
  border: none !important;
  outline: none !important;
  width: 44px !important;
  height: 28px !important;
  text-align: center !important;
  font-family: ui-monospace, monospace !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  padding: 0 !important;
  -webkit-appearance: textfield !important;
  -moz-appearance: textfield !important;
  appearance: textfield !important;
}
.etiq-stepper input::-webkit-outer-spin-button,
.etiq-stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}

/* Layout de impressão Pimaco / Gôndola */
.etiquetas {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2mm;
  padding: 0;
  margin: 0;
}
.etiqueta-box {
  background: #fff;
  color: #000;
  border: 1px dashed #94a3b8;
  border-radius: 4px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  font-family: system-ui, -apple-system, sans-serif;
}

/* ---------- IMPRESSÃO OFICIAL: ETIQUETAS E RELATÓRIO DE COMPRA ---------- */
#printArea, #printAreaRelatorio { display: none; }

@media print {
  @page {
    margin: 8mm;
    size: auto;
  }
  body {
    background: #fff !important;
    color: #000 !important;
  }
  
  /* Impressão de Etiquetas */
  body.print-etiqueta * {
    visibility: hidden;
  }
  body.print-etiqueta #printArea,
  body.print-etiqueta #printArea * {
    visibility: visible;
  }
  body.print-etiqueta #printArea {
    display: block !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    background: #fff;
    color: #000;
  }

  /* Impressão de Caixa, Extratos de Comissão e Promissória */
  body.print-promissoria * {
    visibility: hidden;
  }
  body.print-promissoria #printArea,
  body.print-promissoria #printArea * {
    visibility: visible;
  }
  body.print-promissoria #printArea {
    display: block !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    background: #fff;
    color: #000;
  }

  /* Impressão de Relatório Oficial de Compras */
  body.print-relatorio * {
    visibility: hidden;
  }
  body.print-relatorio #printAreaRelatorio,
  body.print-relatorio #printAreaRelatorio * {
    visibility: visible;
  }
  body.print-relatorio #printAreaRelatorio {
    display: block !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    background: #fff;
    color: #000;
  }
  #printAreaRelatorio table {
    width: 100%;
    border-collapse: collapse;
  }
  #printAreaRelatorio thead {
    display: table-header-group !important;
  }
  #printAreaRelatorio tr {
    page-break-inside: avoid !important;
  }
  .no-print {
    display: none !important;
  }
}
