/* MakerSystem · design system (VENDE+ / Admin) */

:root {
  --brand-900: #191635; --brand-800: #241f4d; --brand-700: #3730a3;
  --brand-600: #4f46e5; --brand-500: #6366f1; --brand-300: #a5b4fc;
  --brand-100: #e0e7ff; --brand-50: #eef2ff;

  --green-700: #047857; --green-600: #059669; --green-100: #d1fae5;
  --amber-600: #d97706; --amber-100: #fef3c7;
  --red-600: #dc2626; --red-100: #fee2e2;
  --blue-600: #0284c7; --blue-100: #e0f2fe;
  --violet-600: #7c3aed; --pink-600: #db2777;

  --ink-900: #0f172a; --ink-700: #334155; --ink-500: #64748b; --ink-400: #94a3b8;
  --ink-300: #cbd5e1; --ink-200: #e2e8f0; --ink-100: #f1f5f9; --ink-50: #f8fafc;

  --radius: 12px; --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.05);
  --shadow-md: 0 4px 12px rgba(15,23,42,.08);
  --shadow-lg: 0 14px 38px rgba(15,23,42,.16);
  --sidebar: 250px; --sidebar-min: 64px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: var(--font); background: var(--ink-50); color: var(--ink-900); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--ink-300); border-radius: 8px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-400); background-clip: content-box; }

/* ===== MARCA ===== */
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.02em; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--brand-500), var(--violet-600)); color: #fff; font-size: 14px; font-weight: 800; flex: 0 0 34px; }
.brand-mark.adm { background: linear-gradient(140deg, #0f766e, #0891b2); }
.brand-name { font-size: 17px; white-space: nowrap; }
.brand-name b { color: var(--brand-600); }
.brand-sub { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-400); font-weight: 600; }

/* ===== AUTENTICAÇÃO ===== */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-art { background: linear-gradient(155deg, var(--brand-900), var(--brand-700) 58%, var(--violet-600));
  color: #fff; padding: 52px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art.adm { background: linear-gradient(155deg, #0b3d3a, #0f766e 58%, #0891b2); }
.auth-art::after { content: ''; position: absolute; right: -150px; bottom: -190px; width: 480px; height: 480px; border-radius: 50%; background: rgba(255,255,255,.07); }
.auth-art::before { content: ''; position: absolute; right: 70px; top: -130px; width: 270px; height: 270px; border-radius: 50%; background: rgba(255,255,255,.05); }
.auth-art h1 { font-size: 33px; line-height: 1.18; font-weight: 700; letter-spacing: -.02em; margin-bottom: 14px; position: relative; z-index: 1; }
.auth-art p { color: rgba(255,255,255,.82); font-size: 15px; max-width: 430px; position: relative; z-index: 1; }
.auth-feats { list-style: none; margin-top: 28px; display: grid; gap: 11px; position: relative; z-index: 1; }
.auth-feats li { display: flex; gap: 10px; align-items: flex-start; color: rgba(255,255,255,.9); font-size: 14px; }
.auth-feats li b { color: #fff; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: #fff; }
.auth-card { width: 100%; max-width: 390px; }
.auth-card h2 { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.auth-card .sub { color: var(--ink-500); margin: 6px 0 24px; }
.hint { background: var(--brand-50); border: 1px solid var(--brand-100); color: var(--brand-700);
  padding: 10px 12px; border-radius: var(--radius-sm); font-size: 12.5px; margin-bottom: 18px; }
.hint.teal { background: #ecfeff; border-color: #a5f3fc; color: #0e7490; }
@media (max-width: 940px) { .auth { grid-template-columns: 1fr; } .auth-art { display: none; } }

/* ===== SHELL ===== */
.app { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar); flex: 0 0 var(--sidebar); background: var(--brand-900); color: #fff;
  display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 45; transition: width .18s, transform .2s; }
.sidebar.adm { background: #0b3d3a; }
.sidebar-top { padding: 16px 16px 10px; display: flex; align-items: center; gap: 10px; }
.sidebar-top .brand-name { color: #fff; }
.sidebar-top .brand-name b { color: var(--brand-300); }
.sidebar.adm .sidebar-top .brand-name b { color: #5eead4; }
.collapse-btn { margin-left: auto; width: 26px; height: 26px; border-radius: 7px; border: none; background: rgba(255,255,255,.09);
  color: rgba(255,255,255,.7); display: grid; place-items: center; cursor: pointer; flex: 0 0 26px; }
.collapse-btn:hover { background: rgba(255,255,255,.18); color: #fff; }

.empresa-chip { margin: 4px 12px 8px; padding: 9px 11px; background: rgba(255,255,255,.08); border-radius: 10px;
  display: flex; align-items: center; gap: 9px; cursor: pointer; }
.empresa-chip:hover { background: rgba(255,255,255,.14); }
.empresa-chip .ic { width: 26px; height: 26px; border-radius: 7px; background: var(--brand-600); display: grid; place-items: center; flex: 0 0 26px; font-size: 11px; font-weight: 700; }
.empresa-chip .b { min-width: 0; flex: 1; }
.empresa-chip .n { font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empresa-chip .s { font-size: 10.5px; color: rgba(255,255,255,.55); white-space: nowrap; }

.nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 4px 10px 18px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); }
.nav-item > a, .nav-item > button { width: 100%; display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 9px;
  color: rgba(255,255,255,.76); font-weight: 500; font-size: 13.5px; margin-bottom: 2px; border: none; background: none;
  cursor: pointer; text-align: left; transition: background .12s, color .12s; }
.nav-item > a:hover, .nav-item > button:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-item > a.active { background: var(--brand-600); color: #fff; box-shadow: 0 2px 12px rgba(79,70,229,.45); }
.sidebar.adm .nav-item > a.active { background: #0d9488; box-shadow: 0 2px 12px rgba(13,148,136,.45); }
.nav-item > button.open { color: #fff; }
.nav-item .ico { flex: 0 0 18px; display: grid; place-items: center; }
.nav-item .lbl { flex: 1; white-space: nowrap; overflow: hidden; }
.nav-item .arw { transition: transform .16s; opacity: .55; flex: 0 0 14px; }
.nav-item > button.open .arw { transform: rotate(90deg); }
.nav-badge { background: rgba(255,255,255,.18); font-size: 10.5px; padding: 1px 7px; border-radius: 20px; font-weight: 700; }
.nav-badge.hot { background: var(--red-600); }
.subnav { display: none; margin: 1px 0 5px; padding-left: 12px; border-left: 1px solid rgba(255,255,255,.13); margin-left: 20px; }
.subnav.open { display: block; }
.subnav a { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 7px; font-size: 12.5px;
  color: rgba(255,255,255,.62); margin-bottom: 1px; }
.subnav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.subnav a.active { background: rgba(255,255,255,.14); color: #fff; font-weight: 600; }
/* Icone do filho do menu (hoje so as ferramentas de celular). `flex:0 0 auto`
   para a chave inglesa nao encolher quando o rotulo for longo. */
.subnav a .ico-sub { display: inline-flex; align-items: center; flex: 0 0 auto; opacity: .8; margin-right: -2px; }
.subnav a:hover .ico-sub, .subnav a.active .ico-sub { opacity: 1; }
.nav-sep { height: 1px; background: rgba(255,255,255,.09); margin: 10px 11px; }

.sidebar-foot { padding: 10px 12px 14px; border-top: 1px solid rgba(255,255,255,.09); }
.plan-card { background: rgba(255,255,255,.07); border-radius: 10px; padding: 11px; }
.plan-card .t { font-size: 11px; color: rgba(255,255,255,.55); }
.plan-card .n { font-weight: 700; margin: 1px 0 7px; font-size: 13px; }
.plan-bar { height: 5px; border-radius: 4px; background: rgba(255,255,255,.15); overflow: hidden; }
.plan-bar i { display: block; height: 100%; background: var(--brand-300); }
.plan-card .u { font-size: 11px; color: rgba(255,255,255,.5); margin-top: 6px; }

/* colapsado */
.app.mini .sidebar { width: var(--sidebar-min); flex-basis: var(--sidebar-min); }
.app.mini .sidebar .brand-name, .app.mini .nav-item .lbl, .app.mini .nav-item .arw,
.app.mini .nav-badge, .app.mini .sidebar-foot, .app.mini .empresa-chip .b { display: none; }
.app.mini .subnav { display: none !important; }
.app.mini .nav-item > a, .app.mini .nav-item > button { justify-content: center; padding: 10px 0; }
.app.mini .sidebar-top { justify-content: center; padding: 16px 8px 10px; }
.app.mini .collapse-btn { margin: 0; position: absolute; right: -12px; top: 20px; background: var(--brand-600); border: 2px solid var(--ink-50); width: 24px; height: 24px; }
.app.mini .empresa-chip { justify-content: center; padding: 8px; margin: 4px 8px 8px; }
.app.mini .main { margin-left: var(--sidebar-min); }
.sidebar { position: fixed; }
.app.mini .sidebar .collapse-btn .chv { transform: rotate(180deg); }

.main { flex: 1; margin-left: var(--sidebar); min-width: 0; display: flex; flex-direction: column; transition: margin-left .18s; }
.topbar { height: 58px; background: #fff; border-bottom: 1px solid var(--ink-200); display: flex; align-items: center; gap: 14px;
  padding: 0 22px; position: sticky; top: 0; z-index: 30; }
/* O BLOCO DO TITULO TEM TETO. O subtitulo da NF-e ("Modelo 55 — a nota de
   operação: venda a CNPJ… O cupom do balcão (NFC-e) sai no PDV") ia
   empurrando a barra ate colidir com o botao Vender e quebrar o nome do
   usuario em duas linhas. Agora ele corta com reticencias — o texto
   inteiro continua no `title`, que e onde ele sempre esteve. */
.topbar > div:nth-child(2) { min-width: 0; flex: 1 1 auto; max-width: 52%; }
.topbar h1 { font-size: 16.5px; font-weight: 700; letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .crumb { color: var(--ink-400); font-size: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.user-chip .n, .user-chip .r { white-space: nowrap; }
.search-box { position: relative; }
.search-box svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--ink-400); }
.search-box input { border: 1px solid var(--ink-200); border-radius: 20px; padding: 7px 14px 7px 32px; width: 220px; background: var(--ink-50); outline: none; transition: .15s; }
.search-box input:focus { border-color: var(--brand-500); background: #fff; box-shadow: 0 0 0 3px var(--brand-50); width: 270px; }
.icon-btn { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--ink-200); background: #fff; display: grid; place-items: center; cursor: pointer; color: var(--ink-500); position: relative; }
.icon-btn:hover { background: var(--ink-100); color: var(--ink-900); }
.icon-btn .dot { position: absolute; top: 6px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--red-600); border: 2px solid #fff; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-600); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12.5px; flex: 0 0 34px; }
.avatar.sm { width: 26px; height: 26px; flex: 0 0 26px; font-size: 10.5px; }
.avatar.lg { width: 46px; height: 46px; flex: 0 0 46px; font-size: 16px; }
.avatar.sq { border-radius: 10px; }
.user-chip { display: flex; align-items: center; gap: 9px; cursor: pointer; padding: 4px 8px 4px 4px; border-radius: 20px; }
.user-chip:hover { background: var(--ink-100); }
.user-chip .n { font-weight: 600; font-size: 13px; line-height: 1.2; }
.user-chip .r { font-size: 11.5px; color: var(--ink-500); }
.view { padding: 20px 22px 60px; flex: 1; }
.menu-toggle { display: none; }
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; }
  .main, .app.mini .main { margin-left: 0; }
  .menu-toggle { display: grid; }
  .search-box { display: none; }
  .view { padding: 14px 12px 50px; }
  .topbar { padding: 0 12px; }
}

/* ===== COMPONENTES ===== */
.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .t { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.page-head .d { color: var(--ink-500); font-size: 13px; margin-top: 2px; }
.page-head .acts { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px; border-radius: 9px;
  border: 1px solid transparent; background: var(--brand-600); color: #fff; font-weight: 600; font-size: 13.5px; cursor: pointer; transition: .12s; white-space: nowrap; }
.btn:hover { background: var(--brand-700); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: #fff; border-color: var(--ink-200); color: var(--ink-700); }
.btn.ghost:hover { background: var(--ink-100); }
.btn.soft { background: var(--brand-50); color: var(--brand-700); }
.btn.soft:hover { background: var(--brand-100); }
.btn.green { background: var(--green-600); } .btn.green:hover { background: var(--green-700); }
.btn.amber { background: var(--amber-600); }
.btn.danger { background: var(--red-600); }
.btn.teal { background: #0d9488; } .btn.teal:hover { background: #0f766e; }
.btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 7px; }
.btn.lg { padding: 12px 20px; font-size: 15px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.card { background: #fff; border: 1px solid var(--ink-200); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-head { padding: 13px 16px; border-bottom: 1px solid var(--ink-200); display: flex; align-items: center; gap: 10px; }
.card-head .t { font-weight: 700; font-size: 14.5px; }
.card-head .d { font-size: 12px; color: var(--ink-500); }
.card-head .acts { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.card-body { padding: 16px; }

.grid { display: grid; gap: 15px; }
.g5 { grid-template-columns: repeat(5, 1fr); }
.g6 { grid-template-columns: repeat(6, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g-2-1 { grid-template-columns: 2fr 1fr; }
.g-1-2 { grid-template-columns: 1fr 2fr; }
@media (max-width: 1300px) { .g5, .g6 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1180px) { .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 1000px) { .g-2-1, .g-1-2, .g3, .g2 { grid-template-columns: 1fr; } }
/* .g5 é sempre fila de indicador (caixa, dashboard): 2 por linha em vez de
   1fr, senão a janela estreita do notebook repete o problema do celular —
   cinco cartões de linha inteira antes de qualquer conteúdo. */
@media (max-width: 1000px) { .g5, .g6 { grid-template-columns: repeat(2, 1fr); } }

.kpi { background: #fff; border: 1px solid var(--ink-200); border-radius: var(--radius); padding: 15px; box-shadow: var(--shadow-sm); position: relative; }
.kpi .lbl { font-size: 12px; color: var(--ink-500); font-weight: 600; }
.kpi .val { font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin: 6px 0 3px; }
.kpi .sub { font-size: 12px; color: var(--ink-500); }
.kpi-ico { position: absolute; right: 13px; top: 13px; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; }
.trend { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; font-size: 12px; }
.trend.up { color: var(--green-600); } .trend.down { color: var(--red-600); }

/* CELULAR: indicador não empurra a tela para baixo.
   Até 30/08/2026 o .g4 virava 1fr abaixo de 620px — quatro KPIs de linha
   inteira são ~600px de rolagem ANTES de a lojista chegar na lista, na
   planilha ou nos botões de ação. Ela abre o Dashboard no celular e vê
   quatro cartões; o que ela veio fazer está fora da tela. Dois por linha e
   mais compactos derrubam esse bloco para ~200px, e o conteúdo aparece
   ainda na primeira dobra.
   Grades de CONTEÚDO continuam empilhando (.g3 são os gráficos, .g2 e
   .g-2-1 são painéis): cartão de gráfico em meia tela de celular não se lê.
   O :has cobre a grade de KPI que não usa g4/g5; onde o navegador não
   entender, a regra some sozinha e fica só o empilhado de antes. */
@media (max-width: 620px) {
  .g4, .g5, .g6 { grid-template-columns: repeat(2, 1fr); }
  .grid:has(> .kpi) { grid-template-columns: repeat(2, 1fr); }
  .grid { gap: 10px; }
  .kpi { padding: 11px 12px; }
  .kpi .lbl { font-size: 11px; line-height: 1.25; }
  .kpi .val { font-size: 18px; margin: 4px 0 2px; letter-spacing: -.03em; }
  .kpi .sub { font-size: 10.5px; line-height: 1.3; }
  /* num cartão de 160px o ícone é enfeite roubando a largura do número,
     que é o que ela veio ver */
  .kpi-ico { display: none; }
}
/* Exceção: número solto de fonte grande dentro do corpo de um card (o painel
   de meta da equipe) continua empilhando — 2 por linha quebraria "R$ 38.490,93"
   no meio. Grade de .kpi dentro de card segue 2 por linha. */
@media (max-width: 620px) {
  .card-body .grid.g4:not(:has(> .kpi)) { grid-template-columns: 1fr; }
}

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-500); font-weight: 700;
  padding: 10px 13px; border-bottom: 1px solid var(--ink-200); background: var(--ink-50); white-space: nowrap; }
td { padding: 10px 13px; border-bottom: 1px solid var(--ink-100); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: var(--brand-50); }
tfoot td { font-weight: 700; background: var(--ink-50); border-top: 2px solid var(--ink-200); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.strong { font-weight: 600; } .muted { color: var(--ink-500); } .tiny { font-size: 12px; }
.pos { color: var(--green-600); font-weight: 600; } .neg { color: var(--red-600); font-weight: 600; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 600;
  white-space: nowrap; background: var(--ink-100); color: var(--ink-700); }
.badge.green { background: var(--green-100); color: var(--green-700); }
.badge.amber { background: var(--amber-100); color: var(--amber-600); }
.badge.red { background: var(--red-100); color: var(--red-600); }
.badge.blue { background: var(--blue-100); color: var(--blue-600); }
.badge.indigo { background: var(--brand-100); color: var(--brand-700); }
.badge.violet { background: #ede9fe; color: var(--violet-600); }
.badge.teal { background: #ccfbf1; color: #0f766e; }
.badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.field { margin-bottom: 13px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-700); margin-bottom: 5px; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--ink-200); border-radius: var(--radius-sm);
  padding: 9px 11px; outline: none; background: #fff; transition: .12s; color: var(--ink-900); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-50); }
.field input[readonly] { background: var(--ink-50); color: var(--ink-500); }
.field textarea { min-height: 74px; resize: vertical; }
.field .help { font-size: 11.5px; color: var(--ink-400); margin-top: 4px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row.t3 { grid-template-columns: 1fr 1fr 1fr; }
.field-row.t4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 680px) { .field-row, .field-row.t3, .field-row.t4 { grid-template-columns: 1fr; } }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--ink-700); }
.check input { width: auto; }

.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar input, .toolbar select { border: 1px solid var(--ink-200); border-radius: 9px; padding: 8px 11px; background: #fff; outline: none; }
.toolbar input:focus, .toolbar select:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-50); }
.toolbar .grow { flex: 1; min-width: 180px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--ink-200); margin-bottom: 16px; overflow-x: auto; }
.tabs button { border: none; background: none; padding: 9px 14px; font-weight: 600; font-size: 13.5px; color: var(--ink-500);
  cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button:hover { color: var(--ink-900); }
.tabs button.active { color: var(--brand-600); border-bottom-color: var(--brand-600); }

.pill-list { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { padding: 5px 11px; border-radius: 20px; border: 1px solid var(--ink-200); background: #fff; cursor: pointer;
  font-size: 12.5px; font-weight: 600; color: var(--ink-700); user-select: none; }
.pill:hover { border-color: var(--brand-300); }
.pill.active { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }

.bar { height: 7px; border-radius: 5px; background: var(--ink-100); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 5px; background: var(--brand-600); transition: width .4s; }
.bar.green i { background: var(--green-600); } .bar.amber i { background: var(--amber-600); } .bar.red i { background: var(--red-600); }

.rank-row { display: flex; align-items: center; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--ink-100); }
.rank-row:last-child { border-bottom: none; }
.rank-row .info { flex: 1; min-width: 0; }
.rank-row .nm { font-weight: 600; font-size: 13.5px; }
.rank-row .mt { font-size: 11.5px; color: var(--ink-500); }
.rank-row .vl { text-align: right; }

.modal-bg { position: fixed; inset: 0; background: rgba(15,23,42,.5); backdrop-filter: blur(2px); display: grid; place-items: center;
  z-index: 100; padding: 18px; animation: fade .14s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; max-height: 92vh;
  display: flex; flex-direction: column; animation: pop .16s; }
.modal.wide { max-width: 880px; } .modal.full { max-width: 1180px; } .modal.slim { max-width: 420px; }
@keyframes pop { from { transform: translateY(12px) scale(.98); opacity: 0; } }
.modal-head { padding: 15px 20px; border-bottom: 1px solid var(--ink-200); display: flex; align-items: center; gap: 10px; }
.modal-head .t { font-weight: 700; font-size: 16px; }
.modal-head .x { margin-left: auto; cursor: pointer; color: var(--ink-400); background: none; border: none; padding: 4px; border-radius: 6px; }
.modal-head .x:hover { background: var(--ink-100); color: var(--ink-900); }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { padding: 13px 20px; border-top: 1px solid var(--ink-200); display: flex; gap: 8px; justify-content: flex-end; background: var(--ink-50); border-radius: 0 0 14px 14px; flex-wrap: wrap; }

.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--ink-900); color: #fff; padding: 11px 15px; border-radius: 10px; box-shadow: var(--shadow-lg);
  font-size: 13.5px; display: flex; align-items: center; gap: 9px; animation: slide .18s; max-width: 350px; }
@keyframes slide { from { transform: translateX(16px); opacity: 0; } }
.toast.ok { background: #065f46; } .toast.err { background: #991b1b; }

.empty { text-align: center; padding: 42px 20px; color: var(--ink-400); }
.empty .t { font-weight: 600; color: var(--ink-700); margin: 8px 0 3px; }
.skeleton { background: linear-gradient(90deg, var(--ink-100), var(--ink-200), var(--ink-100)); background-size: 200% 100%;
  animation: sk 1.1s infinite; border-radius: 6px; height: 15px; }
@keyframes sk { to { background-position: -200% 0; } }
.loading-rows { display: grid; gap: 9px; padding: 16px; }

.dl { display: grid; grid-template-columns: 130px 1fr; gap: 7px 14px; font-size: 13px; }
.dl dt { color: var(--ink-500); } .dl dd { font-weight: 500; }
.detail-head { display: flex; gap: 13px; align-items: center; }

.chart-box { width: 100%; }
.chart { width: 100%; display: block; }
.chart-labels { display: flex; margin-top: 5px; }
.chart-labels span { flex: 1; text-align: center; font-size: 11px; color: var(--ink-500); }
.donut-wrap { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.donut-legend { flex: 1; min-width: 140px; display: grid; gap: 7px; }
.donut-legend .row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.donut-legend .row i { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 10px; }
.donut-legend .row .v { margin-left: auto; font-weight: 600; }

.switch { position: relative; width: 40px; height: 22px; flex: 0 0 40px; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .sl { position: absolute; inset: 0; background: var(--ink-300); border-radius: 22px; transition: .18s; }
.switch .sl::before { content: ''; position: absolute; width: 18px; height: 18px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: .18s; box-shadow: var(--shadow-sm); }
.switch input:checked + .sl { background: var(--green-600); }
.switch input:checked + .sl::before { transform: translateX(18px); }

/* ===== PDV ===== */
.pdv { display: grid; grid-template-columns: 1fr 372px; gap: 15px; align-items: start; }
@media (max-width: 1080px) { .pdv { grid-template-columns: 1fr; } }
.pdv-busca { display: flex; gap: 8px; margin-bottom: 12px; }
.pdv-busca .wrap { position: relative; flex: 1; }
.pdv-busca .wrap svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-400); }
.pdv-busca input { width: 100%; border: 2px solid var(--brand-200, var(--ink-200)); border-radius: 10px; padding: 12px 14px 12px 38px; font-size: 15px; outline: none; }
.pdv-busca input:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-50); }

.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.prod-card { border: 1px solid var(--ink-200); border-radius: 11px; background: #fff; padding: 11px; cursor: pointer; transition: .12s; }
.prod-card:hover { border-color: var(--brand-500); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.prod-card .th { height: 70px; border-radius: 8px; display: grid; place-items: center; margin-bottom: 9px; color: #fff; }
.prod-card .nm { font-weight: 650; font-size: 12.5px; line-height: 1.3; min-height: 32px; }
.prod-card .rf { font-size: 11px; color: var(--ink-400); margin-top: 2px; }
.prod-card .pr { font-weight: 700; color: var(--brand-700); margin-top: 6px; font-size: 14px; }
.prod-card .st { font-size: 11px; color: var(--ink-500); }

.grade { display: flex; gap: 6px; flex-wrap: wrap; }
.grade-btn { min-width: 46px; padding: 7px 8px; border-radius: 8px; border: 1px solid var(--ink-200); background: #fff;
  cursor: pointer; text-align: center; font-size: 12px; font-weight: 600; }
.grade-btn:hover:not(:disabled) { border-color: var(--brand-500); background: var(--brand-50); }
.grade-btn .q { display: block; font-size: 10px; color: var(--ink-400); font-weight: 500; }
.grade-btn:disabled { opacity: .35; cursor: not-allowed; }
.grade-btn.sel { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.grade-btn.sel .q { color: rgba(255,255,255,.75); }

.cupom { position: sticky; top: 74px; }
.cupom-itens { max-height: 320px; overflow-y: auto; }
.citem { display: flex; gap: 9px; padding: 9px 0; border-bottom: 1px solid var(--ink-100); align-items: center; }
.citem:last-child { border-bottom: none; }
.citem .b { flex: 1; min-width: 0; }
.citem .n { font-size: 12.5px; font-weight: 600; line-height: 1.25; }
.citem .m { font-size: 11px; color: var(--ink-500); }
.citem .qt { display: flex; align-items: center; gap: 3px; }
.citem .qt button { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--ink-200); background: #fff; cursor: pointer; display: grid; place-items: center; color: var(--ink-600, var(--ink-700)); }
.citem .qt button:hover { background: var(--ink-100); }
.citem .qt span { min-width: 20px; text-align: center; font-weight: 700; font-size: 12.5px; }
.citem .tv { font-weight: 700; font-size: 13px; min-width: 68px; text-align: right; }
.citem .rm { border: none; background: none; color: var(--ink-300); cursor: pointer; padding: 2px; }
.citem .rm:hover { color: var(--red-600); }

.total-box { background: linear-gradient(135deg, var(--brand-900), var(--brand-700)); color: #fff; border-radius: var(--radius); padding: 15px; }
.total-row { display: flex; justify-content: space-between; padding: 3px 0; font-size: 13px; color: rgba(255,255,255,.8); }
.total-row.big { font-size: 25px; font-weight: 700; color: #fff; border-top: 1px solid rgba(255,255,255,.2); margin-top: 8px; padding-top: 10px; letter-spacing: -.02em; }
.total-row.big span:first-child { font-size: 14px; font-weight: 600; align-self: center; color: rgba(255,255,255,.8); }

.pag-forma { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-bottom: 1px solid var(--ink-100); font-size: 13px; }
.pag-forma:last-child { border-bottom: none; }
.pag-forma .rm { border: none; background: none; color: var(--ink-300); cursor: pointer; }
.pag-forma .rm:hover { color: var(--red-600); }

.stat-strip { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 15px; }
.stat-chip { background: #fff; border: 1px solid var(--ink-200); border-radius: 10px; padding: 9px 13px; box-shadow: var(--shadow-sm); }
.stat-chip .l { font-size: 11px; color: var(--ink-500); font-weight: 600; }
.stat-chip .v { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }

.emp-card { border: 1px solid var(--ink-200); border-radius: var(--radius); background: #fff; padding: 16px; cursor: pointer;
  transition: .13s; box-shadow: var(--shadow-sm); display: flex; gap: 13px; align-items: center; }
.emp-card:hover { border-color: var(--brand-500); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.emp-card .b { flex: 1; min-width: 0; }
.emp-card .n { font-weight: 700; font-size: 15px; }
.emp-card .d { font-size: 12.5px; color: var(--ink-500); margin-top: 1px; }
.emp-card .f { margin-top: 9px; display: flex; gap: 6px; flex-wrap: wrap; }

.timeline { border-left: 2px solid var(--ink-200); margin-left: 7px; padding-left: 16px; }
.timeline .item { position: relative; padding-bottom: 15px; }
.timeline .item::before { content: ''; position: absolute; left: -22px; top: 4px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--brand-600); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--brand-100); }

/* Faixa de aviso do rodape. Ate a v45 ela nascia escrita com
   "Prototipo - dados ficticios - integracoes simuladas" e ficava ali para
   sempre — inclusive numa loja pagante emitindo NFC-e de verdade contra a
   SEFAZ. O elemento continua existindo porque Net.aviso() escreve NELE o
   aviso de queda de conexao, que e util; o que saiu foi o texto fixo.
   Nasce escondida e so aparece quando ha o que dizer. */
.faixa-aviso { position: fixed; left: 50%; transform: translateX(-50%); bottom: 10px; z-index: 90; background: rgba(15,23,42,.85);
  color: #fff; font-size: 11px; padding: 4px 12px; border-radius: 20px; backdrop-filter: blur(4px); pointer-events: none; }
@media print { .sidebar, .topbar, .faixa-aviso, .page-head .acts, .toolbar { display: none !important; } .main { margin: 0 !important; } .view { padding: 0; } }

/* ===== ajustes de topo no mobile ===== */
@media (max-width: 900px) {
  .topbar { gap: 8px; }
  .topbar > div:nth-child(2) { min-width: 0; flex: 1; }
  .topbar h1 { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar .crumb { display: none; }
  .topbar-actions { gap: 6px; }
  .user-chip > div:not(.avatar) { display: none; }
  .user-chip { padding: 3px; }
  #btnPdv span { display: none; }
  #btnPdv { padding: 8px 11px !important; }
  .page-head .t { font-size: 18px; }
  .stat-strip { gap: 8px; }
  .stat-chip { flex: 1; min-width: 128px; padding: 8px 11px; }
  .modal-foot { flex-direction: column-reverse; }
  .modal-foot .btn { width: 100%; }
  .cupom { position: static; }
  .prod-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

/* ===================================================================
   PERFIL DE GOSTO · "para quem é a peça" no PDV e ficha do cliente
   =================================================================== */

/* etiqueta discreta dentro do item do cupom */
.citem .para-etq {
  margin-top: 4px; border: 1px dashed var(--ink-200); background: transparent;
  color: var(--ink-400); font: inherit; font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px; cursor: pointer; line-height: 1.5;
  display: inline-flex; align-items: center; gap: 4px;
}
.citem .para-etq:hover { border-color: var(--brand-400); color: var(--brand-600); }
.citem .para-etq.eh-presente {
  border-style: solid; border-color: #c4b5fd; background: #f5f3ff; color: #6d28d9;
}
.citem .para-etq.eh-presente:hover { background: #ede9fe; }

/* modal para quem é */
.pq-item {
  background: var(--ink-50); border-radius: 9px; padding: 9px 12px; margin-bottom: 14px;
  font-weight: 700; font-size: 14px; display: flex; justify-content: space-between;
  align-items: center; gap: 10px;
}
.pq-item span { font-weight: 500; font-size: 12px; color: var(--ink-500); }

.pq-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.pq-opt {
  text-align: left; padding: 11px 12px; border-radius: 10px; cursor: pointer;
  border: 1.5px solid var(--ink-200); background: #fff; font: inherit;
}
.pq-opt b { display: block; font-size: 13.5px; color: var(--ink-800); }
.pq-opt span { display: block; font-size: 11px; color: var(--ink-400); margin-top: 2px; line-height: 1.35; }
.pq-opt:hover { border-color: var(--brand-300); }
.pq-opt.sel { border-color: var(--brand-600); background: var(--brand-50); }
.pq-opt.sel b { color: var(--brand-700); }

.rel-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rel-chip {
  border: 1px solid var(--ink-200); background: #fff; color: var(--ink-600);
  font: inherit; font-size: 12px; font-weight: 600; padding: 5px 11px;
  border-radius: 999px; cursor: pointer;
}
.rel-chip:hover { border-color: var(--brand-300); }
.rel-chip.sel { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }

.pq-lista { display: flex; flex-direction: column; gap: 4px; max-height: 210px; overflow-y: auto; }
.pq-pes {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  border: 1px solid transparent; background: #fff; border-radius: 9px;
  padding: 7px 9px; cursor: pointer; font: inherit;
}
.pq-pes:hover { background: var(--ink-50); }
.pq-pes.sel { border-color: var(--brand-600); background: var(--brand-50); }
.pq-pes .av {
  flex: none; width: 30px; height: 30px; border-radius: 9px; background: var(--brand-100);
  color: var(--brand-700); display: grid; place-items: center; font-size: 11.5px; font-weight: 700;
}
.pq-pes.novo .av { background: var(--ink-100); color: var(--ink-500); font-size: 16px; }
.pq-pes .n { font-size: 13.5px; font-weight: 600; color: var(--ink-800); }
.pq-pes .m { font-size: 11px; color: var(--ink-400); margin-top: 1px; }

/* cartão de perfil na ficha da pessoa */
.pf-nivel {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700;
  padding: 2px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em;
}
.pf-nivel.inicial { background: var(--ink-100); color: var(--ink-500); }
.pf-nivel.formando { background: #fef3c7; color: #92400e; }
.pf-nivel.consolidado { background: #d1fae5; color: #065f46; }

.pf-bloco { margin-bottom: 15px; }
.pf-bloco > .lbl {
  font-size: 11px; font-weight: 700; color: var(--ink-400);
  text-transform: uppercase; letter-spacing: .04em; margin-bottom: 7px;
}
.pf-barras { display: flex; flex-direction: column; gap: 6px; }
.pf-barra { display: grid; grid-template-columns: 90px 1fr 34px; gap: 9px; align-items: center; }
.pf-barra .n { font-size: 12.5px; font-weight: 600; color: var(--ink-700); }
.pf-barra .t {
  height: 7px; border-radius: 999px; background: var(--ink-100); overflow: hidden;
}
.pf-barra .t i { display: block; height: 100%; border-radius: 999px; background: var(--brand-500); }
.pf-barra .q { font-size: 11.5px; color: var(--ink-400); text-align: right; }

.pf-tams { display: flex; flex-wrap: wrap; gap: 6px; }
.pf-tam {
  border: 1px solid var(--ink-200); border-radius: 8px; padding: 5px 10px;
  font-size: 12px; color: var(--ink-600);
}
.pf-tam b { color: var(--ink-900); font-size: 13px; }

.pf-vazio {
  text-align: center; padding: 24px 14px; color: var(--ink-400); font-size: 12.5px; line-height: 1.55;
}

/* ============================================================
   VENDE+ · GATILHOS DE VENDA
   ============================================================ */
.gat-lista { border-top: 1px solid var(--ink-100); }
.gat {
  display: grid;
  grid-template-columns: 60px minmax(126px, .85fr) 16px minmax(232px, 1.35fr) minmax(180px, 1.2fr) 224px;
  gap: 12px; align-items: center;
  padding: 12px 15px; border-bottom: 1px solid var(--ink-100);
}
.gat:last-child { border-bottom: none; }
.gat:hover { background: var(--ink-50); }

.gat-chance { border-radius: 10px; padding: 7px 4px; text-align: center; line-height: 1; }
.gat-chance .n { font-size: 19px; font-weight: 800; letter-spacing: -.03em; }
.gat-chance .n small { font-size: 11px; font-weight: 700; opacity: .75; }
.gat-chance .l { font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em; margin-top: 3px; opacity: .8; }
.gat-chance.alta { background: var(--green-100); color: var(--green-700); }
.gat-chance.media { background: var(--amber-100); color: #92400e; }
.gat-chance.baixa { background: var(--ink-100); color: var(--ink-500); }

.gat-quem { display: flex; align-items: center; gap: 9px; min-width: 0; }
.gat-quem .nm { font-weight: 650; font-size: 13.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gat-quem .nm:hover { color: var(--brand-600); }
.gat-quem .mt { font-size: 11px; color: var(--ink-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gat-seta { color: var(--ink-300); display: grid; place-items: center; }

.gat-peca { display: flex; align-items: center; gap: 9px; min-width: 0; }
.gat-peca .th { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #fff; flex: 0 0 30px; }
.gat-peca .nm { font-weight: 650; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gat-peca .mt { font-size: 11px; color: var(--ink-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.gat-pq { display: flex; flex-wrap: wrap; gap: 4px; }
.gat-pq .motivo {
  font-size: 10.5px; line-height: 1.35; padding: 3px 8px; border-radius: 20px;
  background: var(--brand-50); color: var(--brand-700); border: 1px solid var(--brand-100);
}
.gat-acao { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
.gat-acao .bts { display: flex; gap: 5px; }

@media (max-width: 1240px) {
  .gat { grid-template-columns: 54px 1fr 1fr; grid-template-areas: "ch quem peca" "ch pq pq" "ch acao acao"; row-gap: 9px; }
  .gat-chance { grid-area: ch; align-self: start; }
  .gat-quem { grid-area: quem; } .gat-peca { grid-area: peca; }
  .gat-pq { grid-area: pq; } .gat-acao { grid-area: acao; align-items: flex-start; flex-direction: row; justify-content: space-between; width: 100%; }
  .gat-seta { display: none; }
}

/* ============================================================
   PDV · topo, painel de gosto, busca e planilha
   ============================================================ */
.pdv-topo { display: grid; grid-template-columns: 1fr 260px; gap: 12px; margin-bottom: 12px; }
.pdv-cli {
  display: flex; align-items: center; gap: 11px; cursor: pointer;
  background: #fff; border: 2px dashed var(--ink-200); border-radius: var(--radius); padding: 11px 13px;
}
.pdv-cli:hover { border-color: var(--brand-300); }
.pdv-cli.tem { border-style: solid; border-color: var(--brand-200, var(--brand-100)); background: var(--brand-50); }
.pdv-cli .ic { width: 34px; height: 34px; border-radius: 9px; background: var(--brand-100); color: var(--brand-700); display: grid; place-items: center; flex: 0 0 34px; }
.pdv-cli .lb { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-500); font-weight: 600; }
.pdv-cli .vl { font-size: 15px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdv-vend { background: #fff; border: 1px solid var(--ink-200); border-radius: var(--radius); padding: 8px 12px 10px; }
.pdv-vend .lb { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-500); font-weight: 600; margin-bottom: 3px; }
.pdv-vend select { width: 100%; border: none; outline: none; font-size: 14px; font-weight: 600; background: none; padding: 2px 0; }

.pdv-gosto { background: #fff; border: 1px solid var(--brand-100); border-left: 3px solid var(--brand-500); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px; }
.pdv-gosto.vazio { color: var(--ink-500); font-size: 12.5px; display: flex; align-items: center; gap: 8px; border-left-color: var(--ink-300); }
.pdv-gosto .gt-cab { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; color: var(--brand-700); font-size: 13px; }
.pdv-gosto .gt-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.gt-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; padding: 4px 10px; border-radius: 20px; background: var(--ink-100); color: var(--ink-700); }
.gt-chip i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.gt-chip.forte { background: var(--brand-600); color: #fff; font-weight: 700; }
.gt-sug { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 11px; padding-top: 10px; border-top: 1px dashed var(--ink-200); }
.gt-item {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  border: 1px solid var(--ink-200); background: #fff; border-radius: 20px; padding: 5px 6px 5px 10px; font-size: 12px; font-weight: 600;
}
.gt-item:hover { border-color: var(--green-600); color: var(--green-700); }
.gt-item i { width: 10px; height: 10px; border-radius: 50%; }
.gt-item .mt { font-weight: 400; color: var(--ink-500); font-size: 11px; }
.gt-item b { width: 18px; height: 18px; border-radius: 50%; background: var(--green-100); color: var(--green-700); display: grid; place-items: center; font-size: 13px; }

.pdv-res { background: #fff; border: 1px solid var(--ink-200); border-radius: var(--radius); box-shadow: var(--shadow-md); margin-bottom: 14px; overflow: hidden; }
.pdv-res .res {
  display: grid; grid-template-columns: 30px 1fr 88px 92px; gap: 11px; align-items: center; width: 100%;
  padding: 9px 14px; border: none; border-bottom: 1px solid var(--ink-100); background: #fff; cursor: pointer; text-align: left;
}
.pdv-res .res:last-child { border-bottom: none; }
.pdv-res .res:hover { background: var(--brand-50); }
.pdv-res .th { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #fff; }
.pdv-res .nm { font-weight: 650; font-size: 13.5px; min-width: 0; }
.pdv-res .nm .mt { display: block; font-weight: 400; font-size: 11px; color: var(--ink-500); }
.pdv-res .est { font-size: 11px; color: var(--green-700); text-align: right; }
.pdv-res .est.zero { color: var(--red-600); }
.pdv-res .pr { font-weight: 700; text-align: right; font-size: 14px; }

.pdv-planilha { margin-bottom: 14px; box-shadow: var(--shadow-md); }
table.planilha th { font-size: 10.5px; }
table.planilha td { vertical-align: middle; }
table.planilha tr.vazia td { text-align: center; padding: 34px 16px; color: var(--ink-400); }
table.planilha tr.vazia .t { font-weight: 600; color: var(--ink-700); margin: 8px 0 3px; }
table.planilha input.cel {
  width: 100%; max-width: 74px; text-align: right; border: 1px solid var(--ink-200); border-radius: 7px;
  padding: 5px 7px; font-size: 13.5px; font-weight: 600; outline: none; background: var(--ink-50);
}
table.planilha input.cel:focus { border-color: var(--brand-500); background: #fff; box-shadow: 0 0 0 3px var(--brand-50); }
/* A grade de digitação nasceu para número (qtd, custo), daí o max-width de
   74px e o texto à direita. Campo de TEXTO na mesma grade — a descrição da
   peça na compra manual — precisa da largura toda e alinhado à esquerda,
   senão a lojista digita "Vestido midi viscose" olhando três letras. */
table.planilha input.cel.txt { max-width: none; text-align: left; font-weight: 500; }
table.planilha .cor-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
table.planilha .cor-tag i { width: 11px; height: 11px; border-radius: 50%; }
table.planilha .tam-tag { display: inline-block; min-width: 30px; text-align: center; font-weight: 700; font-size: 12px; padding: 3px 7px; border-radius: 6px; background: var(--ink-100); }
table.planilha .rm { border: none; background: none; color: var(--ink-300); cursor: pointer; padding: 4px; }
table.planilha .rm:hover { color: var(--red-600); }
table.planilha .para-etq {
  font-size: 10.5px; padding: 3px 9px; border-radius: 20px; cursor: pointer;
  border: 1px dashed var(--ink-300); background: none; color: var(--ink-500);
}
table.planilha .para-etq:hover { border-color: var(--brand-400, var(--brand-300)); color: var(--brand-600); }
table.planilha .para-etq.eh-presente { background: #f5f3ff; border: 1px solid #ddd6fe; color: var(--violet-600); font-weight: 600; }

.pdv-fim { display: grid; grid-template-columns: 1fr 340px; gap: 14px; align-items: start; }
@media (max-width: 900px) {
  .pdv-topo, .pdv-fim { grid-template-columns: 1fr; }
  .pdv-res .res { grid-template-columns: 26px 1fr 84px; }
  .pdv-res .est { display: none; }
}

/* a vitrine flutua sobre a tela: a planilha da venda nunca e empurrada */
.pdv-buscabox { position: relative; margin-bottom: 14px; z-index: 30; }
.pdv-buscabox .pdv-busca { margin-bottom: 0; }
.pdv-buscabox .pdv-res {
  position: absolute; left: 0; right: 0; top: 100%; margin: 6px 0 0;
  max-height: 348px; overflow-y: auto; box-shadow: var(--shadow-lg);
}
.gat-peca .mt b { color: var(--ink-700); }

/* ============================================================
   FICHA DE MODA — características estruturadas da peça
   ============================================================ */

/* --- resumo na listagem --- */
.ficha-linha { font-size: 11px; color: var(--ink-500); margin-top: 3px; line-height: 1.4; }
.ficha-linha b { color: var(--brand-700); font-weight: 650; }
.ficha-linha .sep { color: var(--ink-300); margin: 0 2px; }
.est-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.est-chip {
  display: inline-block; font-size: 10px; line-height: 1.4; padding: 2px 8px; border-radius: 20px;
  background: var(--brand-50); color: var(--brand-700); border: 1px solid var(--brand-100); font-weight: 600;
}

/* --- filtro por características --- */
.filtro-ficha { background: #fff; border: 1px solid var(--ink-200); border-radius: var(--radius); margin-bottom: 14px; overflow: hidden; }
.ff-cab {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 11px 14px;
  border: none; background: none; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-700);
}
.ff-cab:hover { background: var(--ink-50); }
.ff-cab .arw { margin-left: auto; color: var(--ink-400); transition: transform .15s; }
.filtro-ficha.aberto .ff-cab .arw { transform: rotate(180deg); }
.ff-corpo { padding: 4px 14px 14px; border-top: 1px solid var(--ink-100); }
.ff-linha { display: flex; align-items: center; gap: 10px; margin-top: 11px; flex-wrap: wrap; }
.ff-lbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-500); font-weight: 700; min-width: 54px; }
.ff-selects { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.ff-selects select { border: 1px solid var(--ink-200); border-radius: 8px; padding: 7px 10px; font-size: 12.5px; background: #fff; }

/* --- "Sobre a peça" na tela do produto --- */
.sobre-quem {
  display: inline-block; font-size: 13px; font-weight: 700; color: var(--brand-700);
  background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: 20px;
  padding: 4px 13px; margin-bottom: 13px;
}
.sobre-dl { grid-template-columns: 108px 1fr; row-gap: 9px; }
.sobre-dl dd { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.sobre-dl .cor-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.sobre-dl .cor-tag i { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(15,23,42,.14); }

/* --- editor progressivo dentro do modal de produto --- */
.ficha-sec { margin-top: 14px; border: 1px solid var(--ink-200); border-radius: var(--radius); overflow: hidden; }
.ficha-toggle {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 12px 14px;
  border: none; background: var(--ink-50); cursor: pointer; text-align: left;
}
.ficha-toggle:hover { background: var(--brand-50); }
.ficha-toggle .ic {
  width: 30px; height: 30px; border-radius: 9px; flex: 0 0 30px; display: grid; place-items: center;
  background: var(--brand-100); color: var(--brand-700); transition: transform .18s;
}
.ficha-toggle.aberto .ic { background: var(--brand-600); color: #fff; }
.ficha-toggle .arw { transition: transform .18s; }
.ficha-toggle.aberto .arw { transform: rotate(180deg); }
.ficha-toggle .tx { min-width: 0; flex: 1; }
.ficha-toggle .tx b { display: block; font-size: 13.5px; }
.ficha-toggle .tx small { display: block; font-size: 11.5px; color: var(--ink-500); line-height: 1.45; margin-top: 2px; }
.ficha-toggle .cnt {
  font-size: 11px; font-weight: 600; color: var(--ink-400); white-space: nowrap;
  background: #fff; border: 1px solid var(--ink-200); border-radius: 20px; padding: 3px 10px;
}
.ficha-toggle .cnt.tem { color: var(--green-700); border-color: #a7f3d0; background: var(--green-100); }
.ficha-toggle .arw { color: var(--ink-400); margin-left: 2px; }

.ficha-body { padding: 4px 14px 14px; border-top: 1px solid var(--ink-100); }
.mgrupo { margin-top: 13px; }
.mgrupo .lbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-500); font-weight: 700; margin-bottom: 6px; }
.mgrupo .lbl .tiny { text-transform: none; letter-spacing: 0; font-weight: 500; }
.mchips { display: flex; flex-wrap: wrap; gap: 5px; }
.mchip {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font-size: 12px; padding: 5px 11px; border-radius: 20px;
  border: 1px solid var(--ink-200); background: #fff; color: var(--ink-700); transition: all .12s;
}
.mchip:hover { border-color: var(--brand-300); color: var(--brand-700); }
.mchip.active { background: var(--brand-600); border-color: var(--brand-600); color: #fff; font-weight: 600; }
.mchip i { width: 11px; height: 11px; border-radius: 50%; border: 1px solid rgba(15,23,42,.16); }
.ficha-mais {
  display: flex; align-items: center; gap: 7px; margin-top: 15px; width: 100%; justify-content: center;
  padding: 10px; border: 1px dashed var(--ink-300); border-radius: 9px; background: none;
  cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--ink-500);
}
.ficha-mais:hover { border-color: var(--brand-400, var(--brand-300)); color: var(--brand-600); background: var(--brand-50); }
.ficha-avancado { margin-top: 4px; }

/* --- medidor de força do gatilho no cadastro --- */
.forca { background: var(--ink-50); border: 1px solid var(--ink-200); border-radius: 10px; padding: 11px 13px; margin: 13px 0 4px; }
.forca-topo { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 7px; }
.forca-topo .lb { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-500); font-weight: 700; }
.forca-topo .pc { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.forca-topo .pc.fraca { color: var(--ink-400); }
.forca-topo .pc.media { color: var(--amber-600); }
.forca-topo .pc.forte { color: var(--green-600); }
.forca-bar { height: 7px; border-radius: 6px; background: var(--ink-200); overflow: hidden; }
.forca-bar i { display: block; height: 100%; border-radius: 6px; transition: width .3s ease; }
.forca-bar i.fraca { background: var(--ink-300); }
.forca-bar i.media { background: linear-gradient(90deg, #fbbf24, var(--amber-600)); }
.forca-bar i.forte { background: linear-gradient(90deg, #34d399, var(--green-600)); }
.forca-dica { font-size: 11.5px; color: var(--ink-500); line-height: 1.6; margin-top: 9px; }
.forca-dica b { color: var(--ink-700); }
.forca-dica.ok { color: var(--green-700); display: flex; align-items: center; gap: 6px; }
.forca-falta {
  display: inline-flex; align-items: center; gap: 5px; cursor: pointer; vertical-align: baseline;
  border: 1px solid var(--brand-200, var(--brand-100)); background: var(--brand-50); color: var(--brand-700);
  border-radius: 20px; padding: 2px 9px; font-size: 11.5px; font-weight: 600;
}
.forca-falta:hover { background: var(--brand-600); color: #fff; border-color: var(--brand-600); }
.forca-falta b { font-weight: 800; opacity: .75; }

.ficha-atalhos { display: flex; gap: 6px; flex-wrap: wrap; margin: 11px 0 2px; }
.ficha-toggle .cnt.tem.fraca { color: var(--ink-500); background: var(--ink-100); border-color: var(--ink-200); }
.ficha-toggle .cnt.tem.media { color: #92400e; background: var(--amber-100); border-color: #fcd34d; }
.ficha-toggle .cnt.tem.forte { color: var(--green-700); background: var(--green-100); border-color: #a7f3d0; }

.mgrupo.piscando { background: var(--brand-50); border-radius: 9px; box-shadow: 0 0 0 6px var(--brand-50); }

/* --- copiar ficha de outra peça --- */
.copiar-lista { max-height: 340px; overflow-y: auto; border: 1px solid var(--ink-200); border-radius: 10px; }
.copiar-item {
  display: grid; grid-template-columns: 30px 1fr 48px; gap: 10px; align-items: center; width: 100%;
  padding: 9px 12px; border: none; border-bottom: 1px solid var(--ink-100); background: #fff; cursor: pointer; text-align: left;
}
.copiar-item:last-child { border-bottom: none; }
.copiar-item:hover { background: var(--brand-50); }
.copiar-item .th { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #fff; }
.copiar-item .nm { font-size: 13px; font-weight: 650; min-width: 0; }
.copiar-item .nm .mt { display: block; font-weight: 400; font-size: 11px; color: var(--ink-500); }
.copiar-item .pc { font-size: 12.5px; font-weight: 800; text-align: right; }
.copiar-item .pc.fraca { color: var(--ink-400); }
.copiar-item .pc.media { color: var(--amber-600); }
.copiar-item .pc.forte { color: var(--green-600); }
.gt-chip.est { background: var(--brand-100); color: var(--brand-700); font-weight: 600; }
.gt-item { white-space: nowrap; max-width: 100%; overflow: hidden; }
.gt-item .mt { white-space: nowrap; }

/* ============================================================
   FOTOS DE PRODUTO — cadastro, listagem e ficha
   ============================================================ */
.mini-foto { width: 34px; height: 40px; border-radius: 7px; overflow: hidden; background: var(--ink-50); flex: 0 0 34px; }
.mini-foto .fotop.sem-foto svg { width: 78%; height: 78%; opacity: .55; }
.mini-foto .marca-dagua { display: none; }
.pdv-res .th.mini-foto { width: 30px; height: 36px; flex: 0 0 30px; }
.avatar.lg.sq.foto-head { width: 54px; height: 64px; flex: 0 0 54px; border-radius: 11px; overflow: hidden; background: var(--ink-50); padding: 0; }
.avatar.lg.sq.foto-head .marca-dagua { display: none; }

.fotos-sec { margin-top: 14px; border: 1px solid var(--ink-200); border-radius: var(--radius); padding: 13px 14px; }
.fs-cab { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin-bottom: 11px; color: var(--ink-700); }
.fs-cab .tiny { margin-left: auto; }
.fs-tira { display: flex; gap: 9px; flex-wrap: wrap; }
.fs-item { position: relative; width: 84px; height: 100px; border-radius: 10px; overflow: hidden; border: 2px solid var(--ink-200); }
.fs-item.capa { border-color: var(--brand-600); }
.fs-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.capa-tag {
  position: absolute; bottom: 0; left: 0; right: 0; background: var(--brand-600); color: #fff;
  font-size: 9.5px; font-weight: 800; text-align: center; padding: 2px; text-transform: uppercase; letter-spacing: .05em;
}
.fs-x, .fs-capa {
  position: absolute; top: 4px; width: 20px; height: 20px; border-radius: 50%; border: none; cursor: pointer;
  display: grid; place-items: center; background: rgba(15,23,42,.62); color: #fff;
}
.fs-x { right: 4px; }
.fs-capa { left: 4px; background: rgba(255,255,255,.9); color: var(--ink-700); }
.fs-capa:hover { background: var(--brand-600); color: #fff; }
.fs-x:hover { background: var(--red-600); }
.fs-add {
  width: 84px; height: 100px; border-radius: 10px; border: 2px dashed var(--ink-300); background: none;
  cursor: pointer; display: grid; place-items: center; align-content: center; gap: 4px; color: var(--ink-500); font-size: 11px; font-weight: 600;
}
.fs-add:hover { border-color: var(--brand-500); color: var(--brand-600); background: var(--brand-50); }
.fs-add.subindo { border-style: solid; color: var(--brand-600); }
.fotos-sec textarea { width: 100%; border: 1px solid var(--ink-200); border-radius: 9px; padding: 10px 12px; font-size: 13.5px; line-height: 1.55; resize: vertical; outline: none; }
.fotos-sec textarea:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-50); }
.fotos-sec .help i { color: var(--ink-500); }

.gal { display: flex; gap: 10px; flex-wrap: wrap; }
.gal-item { position: relative; width: 108px; height: 132px; border-radius: 11px; overflow: hidden; border: 2px solid var(--ink-100); }
.gal-item.capa { border-color: var(--brand-600); }
.gal-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal-vazia { display: flex; gap: 14px; align-items: center; width: 100%; }
.gal-vazia > .fotop { width: 92px; height: 112px; border-radius: 11px; overflow: hidden; flex: 0 0 92px; }
.gal-vazia .tx { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.gal-vazia .tx b { font-size: 13.5px; }
.gal-vazia .tx span { font-size: 12px; color: var(--ink-500); max-width: 380px; line-height: 1.5; }
.gal-vazia .tx .btn { margin-top: 8px; }
.gal-desc { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--ink-200); }
.gal-desc .lbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-500); font-weight: 700; margin-bottom: 5px; }
.gal-desc p { font-size: 13.5px; line-height: 1.6; color: var(--ink-700); }

/* ============================================================
   TELA DO CATÁLOGO (lojista)
   ============================================================ */
.link-box { display: flex; gap: 8px; }
.link-box input {
  flex: 1; border: 1.5px solid var(--ink-200); border-radius: 10px; padding: 11px 13px;
  font-size: 13.5px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--ink-50); outline: none;
}
.link-box input:focus { border-color: var(--brand-500); background: #fff; }
.aviso-cat {
  display: flex; align-items: center; gap: 12px; background: var(--amber-100); border: 1px solid #fcd34d;
  border-radius: var(--radius); padding: 12px 15px; margin-bottom: 15px; color: #92400e;
}
.aviso-cat b { display: block; font-size: 13.5px; }
.aviso-cat span { font-size: 12px; opacity: .9; }
.aviso-cat .btn { margin-left: auto; flex: 0 0 auto; }
.aviso-cat.ok { background: var(--green-100); border-color: #6ee7b7; color: var(--green-700); }
.aviso-cat.ruim { background: var(--red-100); border-color: #fca5a5; color: #991b1b; }

/* ---------- MÓDULO FISCAL ---------- */
/* A chave de acesso é o número que o cliente confere no site da SEFAZ:
   ela precisa ser lida em blocos, não como um borrão de 44 dígitos. */
.danfe-chave {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--ink-50); border: 1px solid var(--ink-100);
  border-radius: var(--radius); padding: 12px 15px;
}
.danfe-chave .l { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-400); font-weight: 700; }
.danfe-chave .v {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--ink-700); word-break: break-all;
}
.danfe-chave .btn { margin-left: auto; }

.tipo-doc { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.td-op {
  text-align: left; padding: 12px 14px; border-radius: var(--radius);
  border: 1.5px solid var(--ink-100); background: #fff; cursor: pointer; transition: .15s;
}
.td-op:hover { border-color: var(--brand-300); }
.td-op.active { border-color: var(--brand-500); background: var(--brand-50); box-shadow: 0 0 0 3px var(--brand-100); }
.td-op .n { display: block; font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.td-op .d { display: block; font-size: 11.5px; color: var(--ink-400); margin-top: 2px; }

.add-item-lista { max-height: 340px; overflow-y: auto; margin-top: 10px; }

/* ---------- CHAVE DE MÓDULOS (painel admin) ---------- */
.mod-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mod-op {
  display: block; position: relative; padding: 12px 14px 12px 38px; cursor: pointer;
  border: 1.5px solid var(--ink-100); border-radius: var(--radius); background: #fff; transition: .15s;
}
.mod-op:hover { border-color: var(--brand-300); }
.mod-op input { position: absolute; left: 14px; top: 15px; }
.mod-op:has(input:checked) { border-color: var(--brand-500); background: var(--brand-50); }
.mod-op .n { display: block; font-size: 14px; font-weight: 700; }
.mod-op .d { display: block; font-size: 11.5px; color: var(--ink-400); margin-top: 3px; line-height: 1.45; }
@media (max-width: 620px) { .mod-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .tipo-doc { grid-template-columns: 1fr; } }

.sac-lista { border-top: 1px solid var(--ink-100); }
.sac { padding: 14px 15px; border-bottom: 1px solid var(--ink-100); }
.sac:last-child { border-bottom: none; }
.sac:hover { background: var(--ink-50); }
.sac-cab { display: flex; align-items: center; gap: 10px; }
.sac-cab .nm { font-weight: 650; font-size: 14px; }
.sac-cab .nm:hover { color: var(--brand-600); }
.sac-cab .mt { font-size: 11.5px; color: var(--ink-500); }
.sac-cab .vl { margin-left: auto; text-align: right; font-weight: 800; font-size: 15px; letter-spacing: -.02em; }
.sac-cab .vl span { display: block; font-size: 11px; font-weight: 500; color: var(--ink-500); letter-spacing: 0; }
.sac-perfil { font-size: 11.5px; color: var(--brand-700); margin-top: 8px; display: flex; align-items: center; gap: 5px; }
.sac-itens { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 9px; }
.sac-item { font-size: 11.5px; padding: 4px 10px; border-radius: 20px; background: var(--ink-100); color: var(--ink-700); }
.sac-item b { color: var(--ink-900); }
.sac-obs { margin-top: 9px; font-size: 12.5px; color: var(--ink-600, var(--ink-700)); font-style: italic; }
.sac-acoes { display: flex; gap: 7px; margin-top: 11px; align-items: center; flex-wrap: wrap; }
.sac-acoes select { border: 1px solid var(--ink-200); border-radius: 8px; padding: 6px 10px; font-size: 12.5px; background: #fff; }

/* ============================================================
   ANEXO DE FOTO NA MENSAGEM
   ------------------------------------------------------------
   O bloco que mostra, dentro da caixa de mensagem, quais fotos
   vão junto. É a prova visual de que a cliente não vai receber
   só texto.
   ============================================================ */
.anexo { margin-top: 12px; border: 1px solid var(--ink-200); border-radius: var(--radius); background: var(--ink-50); padding: 11px 12px; }
.anexo-cab { display: flex; align-items: center; gap: 7px; color: var(--ink-700); font-size: 13px; margin-bottom: 10px; }
.anexo-cab b { font-weight: 650; }
.anexo-cab .tiny { margin-left: 2px; }
.anexo-cab .btn { margin-left: auto; }
.anexo-tira { display: flex; gap: 9px; flex-wrap: wrap; }
.anexo-item { width: 76px; margin: 0; }
.anexo-item .fotop { width: 76px; height: 92px; border-radius: 9px; overflow: hidden; border: 1px solid var(--ink-200); background: #fff; display: grid; place-items: center; }
.anexo-item .fotop img { width: 100%; height: 100%; object-fit: cover; display: block; }
.anexo-item .fotop.sem-foto svg { width: 80%; height: 80%; opacity: .6; }
.anexo-item .marca-dagua { display: none; }
.anexo-item figcaption { font-size: 10.5px; line-height: 1.3; color: var(--ink-500); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* foto real da peça no card do gatilho */
.gat-peca .th.foto { background: var(--ink-50); overflow: hidden; border: 1px solid var(--ink-200); }
.gat-peca .th.foto .fotop { width: 100%; height: 100%; display: grid; place-items: center; }
.gat-peca .th.foto .fotop img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gat-peca .th.foto .fotop.sem-foto svg { width: 84%; height: 84%; }
.gat-peca .th.foto .marca-dagua { display: none; }

/* ============================================================
   CARRINHOS DO CATÁLOGO — aba de atendimento
   ============================================================ */
/* ===== tabela larga: muitas colunas, uma linha por registro =====
   Numa listagem de 20 colunas a tabela de 100% de largura espreme tudo e
   "Ana Carolina Mendes" vira três linhas — a grade perde o alinhamento que
   é a razão de ser dela. Aqui a linha nunca quebra: a tabela cresce e o
   .table-wrap rola de lado, como planilha. O texto comprido (peças pedidas,
   recado da cliente) é cortado com reticências e o completo vem no title. */
table.tab-larga { width: auto; min-width: 100%; }
table.tab-larga td { white-space: nowrap; }
td.cel-longa { max-width: 240px; overflow: hidden; text-overflow: ellipsis; }

/* A fila virou planilha em 30/08/2026: a linha é o carrinho, e a ficha
   (peças com foto, recado, situação) abre no clique. O que segue de .car-*
   continua servindo — só mudou de endereço, do card para dentro do modal. */
.car-quente > td:first-child { box-shadow: inset 3px 0 0 var(--red-600); }
.car-btns { display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.car-fic { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.car-fic .vl { margin-left: auto; text-align: right; font-weight: 800; font-size: 16px; letter-spacing: -.02em; }
.car-fic .vl span { display: block; font-size: 11px; font-weight: 500; color: var(--ink-500); letter-spacing: 0; }
.car-sit { display: flex; align-items: center; gap: 9px; margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--ink-100); }
.car-sit select { border: 1px solid var(--ink-200); border-radius: 8px; padding: 6px 10px; font-size: 12.5px; background: #fff; }

.car-lista { border-top: 1px solid var(--ink-100); }
.car { padding: 14px 15px; border-bottom: 1px solid var(--ink-100); }
.car:last-child { border-bottom: none; }
.car:hover { background: var(--ink-50); }
.car.quente { border-left: 3px solid var(--red-600); }
.car-cab { display: flex; align-items: center; gap: 10px; }
.car-cab .nm { font-weight: 650; font-size: 14px; }
.car-cab .nm:hover { color: var(--brand-600); }
.car-cab .mt { font-size: 11.5px; color: var(--ink-500); }
.car-cab .vl { margin-left: auto; text-align: right; font-weight: 800; font-size: 15px; letter-spacing: -.02em; }
.car-cab .vl span { display: block; font-size: 11px; font-weight: 500; color: var(--ink-500); letter-spacing: 0; }
.car-espera { margin-top: 8px; font-size: 11.5px; color: var(--ink-500); display: flex; align-items: center; gap: 5px; }
.car-espera.hot { color: var(--red-600); font-weight: 600; }
.car-perfil { font-size: 11.5px; color: var(--brand-700); margin-top: 7px; display: flex; align-items: center; gap: 5px; }
.car-pecas { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 10px; }
.car-peca { display: flex; gap: 9px; align-items: center; border: 1px solid var(--ink-200); background: #fff; border-radius: 10px; padding: 6px 11px 6px 6px; min-width: 190px; }
.car-peca.fora { border-color: var(--amber-600); background: #fffbeb; }
.car-peca .fotop { width: 38px; height: 46px; border-radius: 7px; overflow: hidden; flex: 0 0 38px; background: var(--ink-50); display: grid; place-items: center; }
.car-peca .fotop img { width: 100%; height: 100%; object-fit: cover; display: block; }
.car-peca .fotop.sem-foto svg { width: 80%; height: 80%; opacity: .6; }
.car-peca .marca-dagua { display: none; }
.car-peca .i { min-width: 0; }
.car-peca .n { font-size: 12.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
.car-peca .m { font-size: 11px; color: var(--ink-500); }
.car-peca .fora-t { font-size: 10.5px; color: var(--amber-600); font-weight: 600; }
.car-aviso { margin-top: 9px; font-size: 12px; color: #92400e; background: var(--amber-100); border-radius: 9px; padding: 7px 11px; display: flex; align-items: center; gap: 6px; }
.car-obs { margin-top: 9px; font-size: 12.5px; color: var(--ink-700); font-style: italic; }
.car-acoes { display: flex; gap: 7px; margin-top: 11px; align-items: center; flex-wrap: wrap; }
.car-acoes select { border: 1px solid var(--ink-200); border-radius: 8px; padding: 6px 10px; font-size: 12.5px; background: #fff; }

/* ============================================================
   PAGAMENTO DO PDV — preencher e confirmar
   ------------------------------------------------------------
   Todas as formas na tela ao mesmo tempo, cada uma com seu campo.
   A vendedora digita onde entrou dinheiro e confirma; o painel da
   direita responde quanto falta, quanto foi informado e quanto é
   troco enquanto ela digita.
   ============================================================ */
.pgv { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; align-items: start; }
.pgv-formas { display: flex; flex-direction: column; gap: 8px; }
.pgv-forma { display: flex; align-items: center; gap: 8px; border: 1px solid var(--ink-200);
  border-radius: 10px; padding: 4px 12px 4px 4px; background: #fff; transition: border-color .12s, box-shadow .12s; }
.pgv-forma:focus-within { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-50); }
.pgv-forma.on { border-color: var(--brand-300); background: var(--brand-50); }
.pgv-nome { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; border: 0; background: none;
  cursor: pointer; font-size: 13.5px; font-weight: 700; color: var(--ink-700); text-align: left;
  padding: 9px 8px; border-radius: 8px; text-transform: uppercase; letter-spacing: .01em; }
.pgv-nome:hover { background: rgba(15,23,42,.05); color: var(--brand-700); }
.pgv-forma.on .pgv-nome { color: var(--brand-700); }
.pgv-nome .ic { display: grid; place-items: center; color: var(--ink-400); flex: 0 0 15px; }
.pgv-forma.on .pgv-nome .ic { color: var(--brand-600); }
.pgv-forma .cif { font-size: 11.5px; font-weight: 700; color: var(--ink-400); }
.pgv-val { width: 108px; flex: 0 0 108px; border: 0; background: none; outline: none; text-align: right;
  font-size: 18px; font-weight: 700; color: var(--ink-900); font-variant-numeric: tabular-nums; padding: 6px 2px; }
.pgv-val::placeholder { color: var(--ink-300); font-weight: 600; }
.pgv-extra:not(:empty) { margin: -2px 0 4px; padding: 11px 12px; border: 1px solid var(--ink-200);
  border-top: 0; border-radius: 0 0 10px 10px; background: var(--ink-50); }
.pgv-parc { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.pgv-parc label { font-size: 11px; font-weight: 700; color: var(--ink-500); text-transform: uppercase; letter-spacing: .05em; }
.pgv-parc select { flex: 1; border: 1px solid var(--ink-200); border-radius: 8px; padding: 7px 9px; background: #fff; }

.pgv-resumo { border: 1px solid var(--ink-200); border-radius: var(--radius); padding: 16px 18px; background: #fff; }
.pgv-resumo .l { display: flex; align-items: baseline; gap: 12px; padding: 9px 0; font-size: 14px; color: var(--ink-700); }
.pgv-resumo .l b { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.pgv-resumo .l.grande { font-size: 17px; font-weight: 700; padding-bottom: 12px; }
.pgv-resumo .l.grande b { font-size: 19px; letter-spacing: -.02em; }
.pgv-resumo .neg { color: var(--red-600); }
.pgv-resumo .pos { color: var(--green-600); }
.pgv-resumo .troco { color: var(--ink-400); }
.pgv-resumo .troco.on { color: var(--amber-600); }
/* POR QUE A VENDA NAO FECHA — colado no dinheiro, dentro do resumo do
   pagamento. Botao desabilitado sem motivo escrito ao lado e tela parada:
   foi o que aconteceu com o crediario sem cliente e com o cartao pago a
   maior, os dois em silencio. */
.pgv-motivo { display: flex; align-items: flex-start; gap: 9px; margin-top: 12px; padding: 11px 13px;
  border-radius: 10px; background: #fef2f2; border: 1px solid var(--red-100);
  color: var(--red-600); font-size: 13px; line-height: 1.45; }
.pgv-motivo svg { flex: 0 0 auto; margin-top: 1px; }
.pgv-motivo .btn { margin-left: auto; flex: 0 0 auto; }
.pgv-obs { margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--ink-100); }
.pgv-obs label { display: block; font-size: 11.5px; font-weight: 700; color: var(--ink-500); margin-bottom: 5px; }
.pgv-obs textarea { width: 100%; border: 1px solid var(--ink-200); border-radius: 9px; padding: 9px 11px;
  font-size: 13.5px; resize: vertical; outline: none; background: var(--ink-50); }
.pgv-obs textarea:focus { border-color: var(--brand-500); background: #fff; box-shadow: 0 0 0 3px var(--brand-50); }
@media (max-width: 760px) {
  .pgv { grid-template-columns: 1fr; gap: 14px; }
  .pgv-val { width: 92px; flex-basis: 92px; font-size: 17px; }
}

/* ============================================================
   BOLETO — emissão pelo Cora
   ============================================================ */
.pg-boleto { border: 1px solid var(--brand-100); background: var(--brand-50); border-radius: var(--radius); padding: 11px 12px; margin-bottom: 11px; }
.pg-boleto-cab { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--brand-700); margin-bottom: 10px; }
.pg-boleto .field label { color: var(--ink-600, var(--ink-700)); }
.pg-boleto .tiny { line-height: 1.5; }

.boleto { border: 1px solid var(--ink-300); border-radius: var(--radius); overflow: hidden; background: #fff; }
.boleto-cab { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding: 11px 14px; border-bottom: 2px solid var(--ink-900); }
.boleto-cab .banco { display: flex; align-items: baseline; gap: 7px; padding-right: 12px; border-right: 2px solid var(--ink-900); flex: 0 0 auto; white-space: nowrap; }
.boleto-cab .banco b { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.boleto-cab .banco span { font-size: 13px; font-weight: 700; color: var(--ink-500); }
.boleto-cab .linha { flex: 1 1 250px; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 12.5px; font-weight: 700; letter-spacing: -.02em; word-break: keep-all; overflow-wrap: normal; line-height: 1.45; }
.boleto-corpo { display: grid; grid-template-columns: repeat(3, 1fr); }
.boleto-corpo > div { padding: 9px 14px; border-right: 1px solid var(--ink-200); border-bottom: 1px solid var(--ink-200); }
.boleto-corpo > div:nth-child(3n) { border-right: none; }
.boleto-corpo .l { display: block; font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-500); font-weight: 700; }
.boleto-corpo .v { display: block; font-size: 13px; font-weight: 600; margin-top: 2px; }
.boleto-corpo .val .v { font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.boleto-pe { padding: 12px 14px; }
.cb { display: flex; align-items: stretch; gap: 1px; overflow: hidden; margin-bottom: 8px; }
.cb i { display: block; flex: 0 0 auto; }

.bol-mini { margin-top: 12px; border-top: 1px dashed var(--ink-200); padding-top: 10px; }
.bol-mini-cab { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-700); margin-bottom: 7px; }
.bol-mini-l { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 12.5px; border-bottom: 1px solid var(--ink-100); }
.bol-mini-l:last-child { border-bottom: none; }
.bol-mini-l b { margin-left: auto; }

@media (max-width: 760px) {
  .boleto-corpo { grid-template-columns: 1fr 1fr; }
  .boleto-corpo > div:nth-child(3n) { border-right: 1px solid var(--ink-200); }
  .boleto-corpo > div:nth-child(2n) { border-right: none; }
  .car-peca { min-width: 100%; }
}

/* ============================================================
   ORIGEM DO TÍTULO — o olhinho em Contas a receber / a pagar
   ============================================================ */
.org-cab { display: flex; align-items: center; gap: 14px; padding-bottom: 13px; margin-bottom: 14px; border-bottom: 1px solid var(--ink-200); flex-wrap: wrap; }
.org-t { flex: 1 1 200px; min-width: 0; }
.org-t .d { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.org-t .m { font-size: 12px; color: var(--ink-500); margin-top: 2px; }
.org-v { text-align: right; font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.org-v span { display: block; font-size: 11.5px; font-weight: 500; color: var(--ink-500); letter-spacing: 0; }

.org-bloco { border: 1px solid var(--ink-200); border-radius: var(--radius); padding: 12px 13px; margin-bottom: 12px; background: #fff; }
.org-bloco:last-child { margin-bottom: 0; }
.org-h { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--ink-700); margin-bottom: 10px; }
.org-venda { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 9px 14px; }
.org-venda .l { display: block; font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-500); font-weight: 700; }
.org-venda .vv { display: block; font-size: 13px; font-weight: 600; margin-top: 1px; }

.org-pecas { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 12px; padding-top: 11px; border-top: 1px dashed var(--ink-200); }
.org-peca { display: flex; gap: 9px; align-items: center; border: 1px solid var(--ink-200); border-radius: 10px; padding: 6px 12px 6px 6px; background: var(--ink-50); min-width: 200px; }
.org-peca .fotop { width: 40px; height: 48px; border-radius: 7px; overflow: hidden; flex: 0 0 40px; background: #fff; display: grid; place-items: center; }
.org-peca .fotop img { width: 100%; height: 100%; object-fit: cover; display: block; }
.org-peca .fotop.sem-foto svg { width: 80%; height: 80%; opacity: .6; }
.org-peca .marca-dagua { display: none; }
.org-peca .n { font-size: 12.5px; font-weight: 650; }
.org-peca .m { font-size: 11px; color: var(--ink-500); }

.org-serie { display: flex; flex-direction: column; gap: 2px; }
.org-parc { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 8px; font-size: 12.5px; }
.org-parc:nth-child(odd) { background: var(--ink-50); }
.org-parc.atual { background: var(--brand-50); box-shadow: inset 0 0 0 1px var(--brand-100); }
.org-parc .n { font-weight: 800; color: var(--ink-500); min-width: 38px; }
.org-parc.atual .n { color: var(--brand-700); }
.org-parc .dt { min-width: 78px; }
.org-parc b { margin-left: auto; }
.org-parc .aqui { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--brand-600); }

.org-linha { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 12.5px; font-weight: 700; letter-spacing: -.02em; background: var(--ink-50); border-radius: 8px; padding: 9px 11px; word-break: keep-all; line-height: 1.5; }

.org-outro { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--ink-100); }
.org-outro:last-of-type { border-bottom: none; }
.org-outro.clicavel { cursor: pointer; }
.org-outro.clicavel:hover .n { color: var(--brand-600); }
.org-outro .n { font-size: 13px; font-weight: 650; }
.org-outro .m { font-size: 11.5px; color: var(--ink-500); }
.org-outro b { margin-left: auto; white-space: nowrap; }
.neg { color: var(--red-600); }

/* ============================================================
   PRAZO E VENCIMENTO CASADO — tela de pagamento
   ============================================================ */
.pg-prazo { margin-bottom: 11px; }
.pz-aviso { display: flex; align-items: flex-start; gap: 9px; padding: 10px 12px; border-radius: var(--radius); margin-bottom: 9px;
  background: var(--brand-50); border: 1px solid var(--brand-100); color: var(--brand-700); font-size: 12.5px; line-height: 1.5; flex-wrap: wrap; }
.pz-aviso.hot { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.pz-aviso > svg { flex: 0 0 auto; margin-top: 2px; }
.pz-aviso > div { flex: 1 1 180px; min-width: 0; }
.pz-aviso span { color: inherit; opacity: .85; }
.pz-aviso .btn { flex: 0 0 auto; align-self: center; }
.pz-datas { border: 1px solid var(--ink-200); border-radius: var(--radius); padding: 10px 12px; background: var(--ink-50); }
.pz-cab { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 12px; font-weight: 650; color: var(--ink-700); margin-bottom: 8px; }
.pz-tag { margin-left: auto; white-space: nowrap; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; background: var(--violet-600, #7c3aed); color: #fff; border-radius: 20px; padding: 2px 9px; }
.pz-lista { display: flex; gap: 5px; flex-wrap: wrap; }
.pz-dt { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; background: #fff; border: 1px solid var(--ink-200); border-radius: 20px; padding: 3px 10px; }
.pz-dt.primeira { border-color: var(--brand-300); color: var(--brand-700); }
.pz-dt i { font-style: normal; font-size: 9.5px; font-weight: 800; color: var(--ink-400); }

.pdv-cli-deve { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 11px; font-weight: 600;
  color: var(--brand-700); background: var(--brand-100); border-radius: 20px; padding: 2px 9px; }
.pdv-cli-deve.hot { color: #991b1b; background: #fee2e2; }

/* ============================================================
   AJUSTES DA FILA (teardowns SG Master / Softmaker)
   ------------------------------------------------------------
   Cada bloco pertence a uma tela que já existia. Nada aqui cria
   página nova — são acréscimos ao cadastro de produto, à
   listagem de estoque, ao PDV, ao financeiro e às configurações.
   ============================================================ */

/* ---- cadastro de produto · markup, margem e preço ---- */
.lbl-aux { font-weight: 500; font-size: 10.5px; color: var(--ink-400); }
.preco-aviso {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  border-radius: var(--radius-sm); padding: 9px 12px; margin: -4px 0 13px;
  background: var(--ink-50); border: 1px solid var(--ink-200); font-size: 12.5px; color: var(--ink-500);
}
.preco-aviso b { font-size: 14px; }
.preco-aviso .tiny { margin-left: auto; color: inherit; opacity: .8; }
.preco-aviso.boa { background: var(--green-100); border-color: #a7f3d0; color: var(--green-700); }
.preco-aviso.ok { background: var(--amber-100); border-color: #fde68a; color: #92400e; }
.preco-aviso.ruim { background: var(--red-100); border-color: #fecaca; color: #991b1b; }

/* ---- listagem de estoque · contadores que filtram ---- */
.pend-strip { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 15px; }
.pend-chip {
  display: flex; align-items: center; gap: 9px; cursor: pointer;
  background: #fff; border: 1px solid var(--ink-200); border-radius: 10px;
  padding: 7px 12px 7px 8px; box-shadow: var(--shadow-sm); font: inherit; color: var(--ink-900);
}
.pend-chip:hover { border-color: var(--brand-300); }
.pend-chip.on { border-color: var(--brand-600); box-shadow: 0 0 0 3px var(--brand-50); }
.pend-chip.zero { opacity: .55; }
.pend-chip .ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex: 0 0 26px; }
.pend-chip .n { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.pend-chip .t { font-size: 12px; color: var(--ink-500); font-weight: 600; }
.pend-limpar { border: none; background: none; cursor: pointer; color: var(--ink-500); font: inherit; font-size: 12px; display: flex; align-items: center; gap: 4px; }
.pend-limpar:hover { color: var(--red-600); }

/* ---- financeiro · seleção e soma ---- */
/* a linha inteira, não só as células: a coluna de ações é um td flex e
   deixava uma falha branca no fim da linha marcada */
tr.marcada, tr.marcada td { background: var(--brand-50); }
#tabLanc tbody tr { cursor: pointer; }
#tabLanc td:last-child { align-items: center; }
.sel-bar {
  position: sticky; bottom: 14px; margin-top: 15px; display: none;
  align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--brand-900); color: #fff; border-radius: var(--radius);
  padding: 12px 16px; box-shadow: var(--shadow-lg);
}
.sel-bar.on { display: flex; }
.sel-bar .q { font-size: 13px; color: rgba(255,255,255,.75); }
.sel-bar .q b { color: #fff; font-size: 16px; }
.sel-bar .s { font-size: 13px; color: rgba(255,255,255,.75); }
.sel-bar .s b { color: #fff; font-size: 19px; font-weight: 700; letter-spacing: -.02em; margin-left: 4px; }
.sel-bar .acoes { margin-left: auto; display: flex; gap: 7px; flex-wrap: wrap; }
.sel-bar .btn.ghost { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.22); color: #fff; }
.sel-bar .btn.ghost:hover { background: rgba(255,255,255,.18); }
.sel-bar .btn[disabled] { opacity: .4; cursor: not-allowed; }

/* ---- PDV · desconto R$|%, acréscimo e frete ---- */
.total-row.fech { align-items: center; padding: 4px 0; }
.fech-c { display: flex; align-items: center; gap: 6px; }
.fech-c input {
  width: 78px; text-align: right; border: none; border-radius: 6px; padding: 3px 7px;
  background: rgba(255,255,255,.16); color: #fff; font-weight: 600; outline: none;
}
.fech-c input:focus { background: rgba(255,255,255,.26); }
.total-box .rg { display: inline-flex; border-radius: 6px; overflow: hidden; background: rgba(255,255,255,.12); }
.total-box .rg button {
  border: none; background: none; cursor: pointer; padding: 3px 7px;
  font: inherit; font-size: 11px; font-weight: 700; color: rgba(255,255,255,.65);
}
.total-box .rg button.on { background: rgba(255,255,255,.9); color: var(--brand-900); }

/* ---- configurações · busca de ajuste ---- */
.cfg-busca { position: relative; margin-bottom: 14px; max-width: 520px; }
.cfg-busca .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-400); display: grid; }
.cfg-busca input {
  width: 100%; border: 1px solid var(--ink-200); border-radius: 10px; padding: 10px 13px 10px 36px;
  background: #fff; outline: none; font-size: 13.5px;
}
.cfg-busca input:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-50); }
.cfg-res {
  display: none; position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 5px);
  background: #fff; border: 1px solid var(--ink-200); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); overflow: hidden; padding: 4px;
}
.cfg-res.on { display: block; }
.cfg-i {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; cursor: pointer;
  border: none; background: none; border-radius: 9px; padding: 8px 10px; font: inherit;
}
.cfg-i:hover { background: var(--brand-50); }
.cfg-i .n {
  display: grid; place-items: center; width: 30px; height: 26px; border-radius: 7px; flex: 0 0 30px;
  background: var(--ink-100); color: var(--ink-500); font-weight: 800; font-size: 12px; font-variant-numeric: tabular-nums;
}
.cfg-i .b { display: flex; flex-direction: column; min-width: 0; }
.cfg-i .t { font-size: 13px; font-weight: 600; }
.cfg-i .d { font-size: 11px; color: var(--ink-400); }
.cfg-piscou { box-shadow: 0 0 0 3px var(--brand-100); border-radius: var(--radius-sm); transition: box-shadow .3s; }

/* =====================================================================
   ETIQUETA DE PRECO — a previa na tela usa as MESMAS medidas da impressao
   ---------------------------------------------------------------------
   Tudo em mm de proposito. Etiqueta e o unico lugar do sistema onde o
   pixel nao serve: o que aparece na tela tem de sair do mesmo tamanho no
   papel, senao nao cola no lugar e o codigo de barras nao le.
   ===================================================================== */
.etq {
  background: #fff; border: 1px solid var(--ink-200); border-radius: 3px;
  padding: 2mm 2.5mm; overflow: hidden; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; justify-content: space-between;
  font-family: Arial, Helvetica, sans-serif; color: #000;
}
.etq-nome { font-size: 7.5pt; font-weight: 700; line-height: 1.1; }
.etq-det { font-size: 6pt; color: #333; }
.etq-preco { font-size: 13pt; font-weight: 800; letter-spacing: -0.3px; }
.etq-barras { display: flex; justify-content: center; }
.etq-cod {
  font-size: 6pt; text-align: center; letter-spacing: 1px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (max-width: 760px) {
  .pend-chip { flex: 1 1 45%; }
  .preco-aviso .tiny { margin-left: 0; width: 100%; }
}

/* ===== AJUDA COM IA (balao de suporte — assets/js/ajuda.js) =====
   Fica abaixo dos modais (z-index 200) de proposito: um modal aberto
   cobre a ajuda, e nao o contrario. */
.ajuda-bolha {
  position: fixed; right: 18px; bottom: 18px; z-index: 95;
  display: flex; align-items: center; gap: 8px;
  padding: 11px 16px 11px 13px; border: 0; cursor: pointer;
  border-radius: 999px; color: #fff; font-weight: 600; font-size: 13px;
  background: linear-gradient(140deg, var(--brand-500), var(--violet-600));
  box-shadow: var(--shadow-lg);
  transition: transform .15s ease, opacity .15s ease;
}
.ajuda-bolha:hover { transform: translateY(-1px); }
.ajuda-bolha .ic { display: grid; }
.ajuda-bolha.aberto { opacity: 0; pointer-events: none; }

.ajuda-painel {
  position: fixed; right: 18px; bottom: 18px; z-index: 96;
  width: 380px; max-width: calc(100vw - 24px); height: 560px; max-height: calc(100vh - 36px);
  display: none; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid var(--ink-200); border-radius: 16px;
  box-shadow: var(--shadow-lg);
}
.ajuda-painel.aberto { display: flex; animation: ajudaSobe .16s ease-out; }
@keyframes ajudaSobe { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.ajuda-topo {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  background: linear-gradient(140deg, var(--brand-700), var(--brand-600) 60%, var(--violet-600)); color: #fff;
}
.ajuda-topo .av {
  width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(255,255,255,.18); font-weight: 800; font-size: 12px; flex: 0 0 32px;
}
.ajuda-topo .tt { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.ajuda-topo .tt b { font-size: 14px; }
.ajuda-topo .tt span { font-size: 11px; opacity: .82; }
.ajuda-x {
  margin-left: auto; background: transparent; border: 0; color: #fff; cursor: pointer;
  font-size: 22px; line-height: 1; opacity: .8; padding: 0 2px;
}
.ajuda-x:hover { opacity: 1; }

.ajuda-corpo { flex: 1; overflow-y: auto; padding: 14px; background: var(--ink-50); }
.ajuda-msg {
  max-width: 88%; margin-bottom: 10px; padding: 10px 12px; font-size: 13px; line-height: 1.55;
  border-radius: 14px; word-wrap: break-word;
}
.ajuda-msg.ia { background: #fff; border: 1px solid var(--ink-200); color: var(--ink-900); border-bottom-left-radius: 5px; }
.ajuda-msg.user { background: var(--brand-600); color: #fff; margin-left: auto; border-bottom-right-radius: 5px; }
.ajuda-msg.aviso { background: var(--amber-100); border-color: #fcd34d; color: #78350f; }
.ajuda-msg b { font-weight: 700; }

.ajuda-sug { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.ajuda-sug button {
  text-align: left; padding: 8px 10px; font-size: 12px; cursor: pointer;
  background: var(--brand-50); color: var(--brand-700); border: 1px solid var(--brand-100);
  border-radius: 9px; font-weight: 600;
}
.ajuda-sug button:hover { background: var(--brand-100); }

.ajuda-ir { margin-top: 10px; }
.ajuda-btn-ir {
  padding: 7px 13px; font-size: 12px; font-weight: 600; cursor: pointer;
  background: var(--brand-600); color: #fff; border: 0; border-radius: 8px;
}
.ajuda-btn-ir:hover { background: var(--brand-700); }

.ajuda-pts { display: inline-flex; gap: 4px; padding: 2px 0; }
.ajuda-pts i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--ink-300);
  animation: ajudaPisca 1.1s infinite ease-in-out;
}
.ajuda-pts i:nth-child(2) { animation-delay: .16s; }
.ajuda-pts i:nth-child(3) { animation-delay: .32s; }
@keyframes ajudaPisca { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }

.ajuda-pe { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px 6px; background: #fff; border-top: 1px solid var(--ink-200); }
.ajuda-pe textarea {
  flex: 1; resize: none; max-height: 90px; padding: 9px 11px; font-size: 13px; line-height: 1.4;
  border: 1px solid var(--ink-200); border-radius: 10px; background: var(--ink-50); color: var(--ink-900);
}
.ajuda-pe textarea:focus { outline: 0; border-color: var(--brand-300); background: #fff; }
.ajuda-enviar {
  width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center; cursor: pointer;
  background: var(--brand-600); color: #fff; border: 0; border-radius: 10px; transform: rotate(-90deg);
}
.ajuda-enviar:disabled { background: var(--ink-300); cursor: default; }
.ajuda-nota { padding: 0 12px 10px; background: #fff; font-size: 10.5px; color: var(--ink-400); text-align: center; }

@media (max-width: 560px) {
  .ajuda-bolha { right: 12px; bottom: 12px; padding: 11px 14px; }
  .ajuda-bolha .tx { display: none; }
  .ajuda-painel { right: 8px; left: 8px; bottom: 8px; width: auto; height: calc(100vh - 70px); }
}
@media print { .ajuda-bolha, .ajuda-painel { display: none !important; } }

/* ============================================================
   PLANILHA — a camada que transforma toda tabela do sistema em
   planilha: cabeçalho que filtra, coluna que ordena, colunas que o
   lojista liga e desliga, e o filtro de data no canto direito.
   Nenhuma tela precisa pedir: quem liga é o assets/js/planilha.js.
   ============================================================ */

.pl-barra { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 14px; border-bottom: 1px solid var(--ink-200); background: #fff;
  border-radius: var(--radius) var(--radius) 0 0; }
.card > .pl-barra { border-radius: var(--radius) var(--radius) 0 0; }
.card-head + .pl-barra { border-radius: 0; }
.pl-esq { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.pl-canto { display: flex; align-items: center; gap: 7px; margin-left: auto; }
/* A contagem é a frase da barra, não um rodapé de tabela: "16 de 16 pedidos
   no período". Por isso ela é do tamanho do texto normal e não miúda. */
.pl-cont { font-size: 13px; color: var(--ink-500); font-weight: 500; white-space: nowrap; }
.pl-cont b { color: var(--ink-900); font-weight: 700; }

.pl-chip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--brand-100);
  background: var(--brand-50); color: var(--brand-700); border-radius: 20px; padding: 3px 8px 3px 10px;
  font-size: 11.5px; font-weight: 600; cursor: pointer; max-width: 210px; }
.pl-chip b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-chip:hover { background: var(--brand-100); }
.pl-chip svg { opacity: .6; }
/* Todo botão da barra tem RÓTULO ESCRITO. Ícone sozinho economiza espaço e
   custa um chamado de suporte: ninguém adivinha que a setinha para baixo é
   "exportar". Os três — Colunas, Limpar filtros, Exportar — moram juntos no
   canto direito, no mesmo lugar em toda tela do sistema. */
.pl-btn { display: inline-flex; align-items: center; gap: 7px; position: relative;
  border: 1px solid var(--ink-200); background: #fff; color: var(--ink-700);
  border-radius: 9px; padding: 7px 12px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.pl-btn:hover { background: var(--ink-100); border-color: var(--ink-300); }
.pl-limpar { color: var(--ink-500); }
.pl-limpar:hover { color: var(--ink-900); }
.pl-exp { border-color: var(--brand-100); background: var(--brand-50); color: var(--brand-700); }
.pl-exp:hover { background: var(--brand-100); border-color: var(--brand-300); }
.pl-exp svg { opacity: 1; }
.pl-btn.on { border-color: var(--brand-300); background: var(--brand-50); color: var(--brand-700); }
.pl-btn svg { opacity: .75; }
.pl-btn .pl-n { position: absolute; top: -6px; right: -6px; min-width: 15px; height: 15px; padding: 0 3px;
  border-radius: 8px; background: var(--brand-600); color: #fff; font-size: 9.5px; font-style: normal;
  font-weight: 700; display: grid; place-items: center; }

/* --- o cabeçalho vira o filtro --- */
th.pl-th { cursor: pointer; user-select: none; transition: background .12s; }
th.pl-th:hover { background: var(--ink-100); color: var(--ink-900); }
th.pl-th.pl-on { background: var(--brand-50); color: var(--brand-700); }
/* O indicador ficava em position:absolute para não roubar largura da coluna.
   Saiu da posição absoluta em 30/08/2026: o funil agora fica visível o tempo
   todo (é assim que o lojista descobre que o cabeçalho filtra), e visível +
   absoluto = funil pisando no texto da coluna vizinha em tabela apertada.
   Preço aceito: ~16px por coluna filtrável; a tabela já vive dentro de
   .table-wrap com overflow-x, então o pior caso é rolar, não quebrar. */
.pl-th-in { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; vertical-align: middle; }
.pl-th-ic { display: inline-flex; align-items: center; gap: 3px; flex: 0 0 auto; line-height: 0;
  color: var(--ink-300); transition: color .12s; pointer-events: none; }
.pl-th-ic i { display: inline-flex; font-style: normal; }
.pl-th-ord { color: var(--brand-600); }
th.pl-th:hover .pl-th-ic { color: var(--ink-500); }
th.pl-th:hover .pl-th-ord { color: var(--brand-600); }
.pl-th-ic.ord, .pl-th-ic.filtrado { color: var(--brand-600); }

/* A coluna de ação: sempre a primeira da planilha, sempre os mesmos dois
   botões no mesmo lugar — olhinho abre, lápis edita. */
.pl-acoes { white-space: nowrap; }
.pl-acoes .btn { padding: 4px 8px; }
.pl-acoes .btn + .btn { margin-left: 5px; }

/* --- arrastar a coluna de lugar e esticar a largura ---
   O pegador de largura tem 9px e mora colado na borda direita do cabeçalho.
   Precisa ficar ACIMA do clique do filtro (z-index) e engolir o próprio
   clique, senão esticar a coluna abriria o menu do filtro junto. */
th.pl-col { position: relative; }
.pl-th-grip { position: absolute; top: 0; right: -4px; width: 9px; height: 100%; z-index: 5; cursor: col-resize; }
.pl-th-grip::after { content: ''; position: absolute; left: 4px; top: 7px; bottom: 7px; width: 1px; background: var(--ink-200); }
th.pl-col:hover .pl-th-grip::after { background: var(--brand-300); width: 2px; }
th.pl-arrastando { opacity: .45; }
body.pl-arrastando-body, body.pl-arrastando-body * { cursor: grabbing !important; user-select: none; }
body.pl-medindo, body.pl-medindo * { cursor: col-resize !important; user-select: none; }
/* onde a coluna vai cair */
th.pl-alvo-antes { box-shadow: inset 3px 0 0 var(--brand-600); }
th.pl-alvo-depois { box-shadow: inset -3px 0 0 var(--brand-600); }
/* Depois do primeiro puxão a tabela congela em larguras exatas. O min-width
   sai junto: com ele, a sobra de espaço seria redistribuída e a largura que o
   lojista escolheu deixaria de ser a que ele vê. */
table.pl-fixa { table-layout: fixed; min-width: 0; }
table.pl-fixa th, table.pl-fixa td { overflow: hidden; text-overflow: ellipsis; }

tr.pl-fora { display: none !important; }
tr.pl-vazio td { padding: 0; }

/* --- os menus --- */
.pl-pop { position: fixed; z-index: 400; background: #fff; border: 1px solid var(--ink-200);
  border-radius: 12px; box-shadow: 0 12px 34px rgba(15,23,42,.16); overflow: hidden;
  font-size: 13px; animation: plIn .12s ease-out; }
@keyframes plIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.pl-pop-tit { padding: 10px 12px 4px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-400); font-weight: 700; }
.pl-pop-ord { padding: 6px; border-bottom: 1px solid var(--ink-100); }
.pl-pop-ord button { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none;
  text-align: left; padding: 7px 9px; border-radius: 8px; cursor: pointer; font-size: 12.5px;
  color: var(--ink-700); font-weight: 500; }
.pl-pop-ord button:hover { background: var(--ink-100); }
.pl-pop-ord button.on { background: var(--brand-50); color: var(--brand-700); font-weight: 600; }
.pl-pop-ord i { font-style: normal; font-size: 9px; color: var(--brand-600); }
.pl-pop-busca { padding: 8px 9px 4px; }
.pl-pop-busca input { width: 100%; border: 1px solid var(--ink-200); border-radius: 8px;
  padding: 7px 9px; outline: none; font-size: 12.5px; background: var(--ink-50); }
.pl-pop-busca input:focus { border-color: var(--brand-500); background: #fff; box-shadow: 0 0 0 3px var(--brand-50); }
.pl-pop-sel { padding: 2px 9px 6px; }
.pl-pop-sel select { width: 100%; border: 1px solid var(--ink-200); border-radius: 8px; padding: 7px 9px;
  background: #fff; outline: none; font-size: 12.5px; }
.pl-pop-nota { padding: 4px 12px 8px; font-size: 11px; color: var(--ink-400); }
.pl-pop-lista { max-height: 236px; overflow-y: auto; padding: 4px 6px 8px; }
.pl-pop-lista label { display: flex; align-items: center; gap: 8px; padding: 5px 7px; border-radius: 7px;
  cursor: pointer; font-size: 12.5px; color: var(--ink-700); }
.pl-pop-lista label:hover { background: var(--ink-100); }
.pl-pop-lista label span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-pop-lista label b { font-size: 10.5px; color: var(--ink-400); font-weight: 600; }
.pl-pop-lista input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--brand-600); flex: 0 0 15px; }
.pl-pop-lista label.pl-tudo { font-weight: 700; color: var(--ink-900);
  border-bottom: 1px solid var(--ink-100); border-radius: 0; margin-bottom: 3px; padding-bottom: 7px; }
.pl-per { display: grid; gap: 2px; padding: 6px; max-height: none; }
.pl-per button { text-align: left; border: 0; background: none; padding: 7px 9px; border-radius: 8px;
  cursor: pointer; font-size: 12.5px; color: var(--ink-700); font-weight: 500; }
.pl-per button:hover { background: var(--ink-100); }
.pl-per button.on { background: var(--brand-50); color: var(--brand-700); font-weight: 600; }
.pl-pop-custom { display: none; gap: 8px; padding: 2px 10px 10px; }
.pl-pop-custom.on { display: flex; }
.pl-pop-custom label { flex: 1; font-size: 10.5px; font-weight: 700; color: var(--ink-400);
  text-transform: uppercase; letter-spacing: .05em; }
.pl-pop-custom input { width: 100%; margin-top: 3px; border: 1px solid var(--ink-200); border-radius: 8px;
  padding: 6px 8px; outline: none; font-size: 12.5px; font-family: inherit; }
.pl-pop-custom input:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-50); }
.pl-pop-pe { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px; border-top: 1px solid var(--ink-100); background: var(--ink-50); }
.pl-lnk { border: 0; background: none; color: var(--ink-500); font-size: 12px; font-weight: 600;
  cursor: pointer; padding: 4px 6px; border-radius: 7px; }
.pl-lnk:hover { background: var(--ink-100); color: var(--ink-900); }
.pl-ok { border: 0; background: var(--brand-600); color: #fff; font-size: 12px; font-weight: 600;
  cursor: pointer; padding: 6px 14px; border-radius: 8px; }
.pl-ok:hover { background: var(--brand-700); }

/* No celular a barra QUEBRA em duas linhas em vez de esconder os rótulos: o
   ponto do padrão é que Colunas / Limpar filtros / Exportar estejam escritos
   em toda tela, e é justo no celular que ninguém adivinha ícone. */
@media (max-width: 720px) {
  .pl-barra { padding: 8px 10px; gap: 6px; }
  .pl-cont { font-size: 12.5px; width: 100%; }
  .pl-canto { margin-left: 0; width: 100%; flex-wrap: wrap; gap: 6px; }
  .pl-btn { padding: 6px 10px; font-size: 12.5px; }
}
@media print { .pl-barra, .pl-pop, .pl-th-ic { display: none !important; } }
.pl-ok:disabled { background: var(--ink-200); color: var(--ink-400); cursor: not-allowed; }

/* Contador do topo que aciona o filtro da coluna (Condicionais). Ele não
   filtra por conta própria — chama `Planilha.alternar`, então o estado
   ligado aqui é o mesmo estado do cabeçalho da coluna. */
.stat-chip.on { border-color: var(--brand-300); background: var(--brand-50); box-shadow: 0 0 0 3px var(--brand-50); }
/* rodapé de "mostrando N de M" — paginação, não filtro: ele diz em voz alta
   que o filtro do cabeçalho só alcança o que está desenhado */
.pl-mais { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center;
  font-size: 12px; color: var(--ink-500); border-top: 1px solid var(--ink-100); }
.pl-mais b { color: var(--ink-900); }

/* ============================================================
   HÍBRIDO — a densidade de ERP por cima do shell do VENDE+
   ------------------------------------------------------------
   O shell (barra lateral, topo, paleta) já era o do mockup; o que
   entrou em 31/08/2026 foi a parte de ERP: uma BARRA DE AÇÕES com a
   tecla escrita em cada botão, a tela travada na altura da janela
   (a tabela rola por dentro e o rodapé de totais fica colado
   embaixo), a linha compacta com chave Compacto/Confortável, e a
   mesma tabela virando cartão no celular.

   Por que a barra existe: as ações da tela moravam soltas no canto
   do título, mudavam de lugar conforme o tamanho do texto e não
   diziam a tecla. Agora estão sempre na mesma faixa, sempre na
   mesma ordem, com a tecla escrita — que é como um operador de
   balcão aprende um ERP sem ler manual.
   ============================================================ */

.actionbar { flex: 0 0 auto; background: #fff; border-bottom: 1px solid var(--ink-200);
  display: flex; align-items: center; gap: 6px; padding: 8px 22px; overflow-x: auto;
  scrollbar-width: thin; position: sticky; top: 58px; z-index: 29; }
.actionbar[hidden] { display: none; }
.actionbar::-webkit-scrollbar { height: 6px; }

/* Todo botão que a tela manda para a barra vira botão de ERP: contorno
   discreto, ícone colorido pelo peso da ação e a tecla à direita. As views
   continuam escrevendo `<button class="btn ghost">` como sempre — quem
   troca a cara é esta regra, não 21 telas. */
.actionbar .btn, .actionbar .ab { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto;
  border: 1px solid var(--ink-200); background: #fff; border-radius: 9px; padding: 6px 11px 6px 9px;
  color: var(--ink-700); font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.actionbar .btn:hover, .actionbar .ab:hover { background: var(--ink-100); border-color: var(--ink-300); }
.actionbar .btn svg, .actionbar .ab svg { color: var(--brand-600); flex: 0 0 auto; }
/* a primeira ação da tela é a que ela existe para fazer */
.actionbar .btn.pri, .actionbar .btn:not(.ghost):not(.soft):not(.danger):not(.amber):not(.green):not(.teal) {
  background: var(--brand-600); border-color: var(--brand-600); color: #fff; box-shadow: 0 2px 10px rgba(79,70,229,.28); }
.actionbar .btn.pri:hover, .actionbar .btn:not(.ghost):not(.soft):not(.danger):not(.amber):not(.green):not(.teal):hover {
  background: var(--brand-700); border-color: var(--brand-700); }
.actionbar .btn.pri svg,
.actionbar .btn:not(.ghost):not(.soft):not(.danger):not(.amber):not(.green):not(.teal) svg { color: #fff; }
/* o peso da ação vive na cor do ícone, não no fundo: uma barra com quatro
   botões coloridos não tem hierarquia nenhuma */
.actionbar .btn.danger { background: #fff; border-color: var(--ink-200); color: var(--ink-700); box-shadow: none; }
.actionbar .btn.danger:hover { background: var(--red-100); border-color: #fecaca; color: var(--red-600); }
.actionbar .btn.danger svg { color: var(--red-600); }
.actionbar .btn.amber { background: #fff; border-color: var(--ink-200); color: var(--ink-700); box-shadow: none; }
.actionbar .btn.amber:hover { background: var(--amber-100); border-color: #fde68a; color: var(--amber-600); }
.actionbar .btn.amber svg { color: var(--amber-600); }
.actionbar .btn.green { background: #fff; border-color: var(--ink-200); color: var(--ink-700); box-shadow: none; }
.actionbar .btn.green:hover { background: var(--green-100); border-color: #a7f3d0; color: var(--green-700); }
.actionbar .btn.green svg { color: var(--green-600); }

/* A tecla escrita. Ela é desenhada pelo shell a partir do data-tecla do
   botão — a view declara a tecla uma vez e ganha o desenho e o atalho
   funcionando juntos, que é o único jeito de os dois nunca discordarem. */
.actionbar kbd { font-family: var(--font); font-size: 10.5px; font-weight: 700; color: var(--ink-400);
  background: var(--ink-100); border: 1px solid var(--ink-200); border-radius: 5px; padding: 1px 5px;
  letter-spacing: .02em; line-height: 1.45; }
.actionbar .btn.pri kbd,
.actionbar .btn:not(.ghost):not(.soft):not(.danger):not(.amber):not(.green):not(.teal) kbd {
  background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.25); color: #fff; }
.ab-sep { width: 1px; height: 24px; background: var(--ink-200); flex: 0 0 1px; margin: 0 3px; }
.ab-canto { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: 0 0 auto; padding-left: 10px; }

/* chave de densidade — vale para o sistema inteiro, guardada no navegador */
.dens { display: flex; background: var(--ink-100); border-radius: 9px; padding: 3px; gap: 2px; flex: 0 0 auto; }
.dens button { border: 0; background: none; border-radius: 7px; padding: 4px 11px; font-size: 12.5px;
  font-weight: 600; color: var(--ink-500); cursor: pointer; white-space: nowrap; }
.dens button:hover { color: var(--ink-900); }
.dens button.on { background: #fff; color: var(--brand-700); box-shadow: var(--shadow-sm); }

/* ---- linha compacta ----
   Compacto virou o padrão das LISTAGENS (tabela dentro de .table-wrap).
   Grade de digitação (table.planilha), tabelinha de detalhe dentro de card
   e tfoot ficam fora: encolher campo de digitar não ganha nada e atrapalha
   o dedo no celular. */
.table-wrap table:not(.planilha) td { padding: 5px 12px; font-size: 13px; }
.table-wrap table:not(.planilha) th { padding: 9px 12px; }
.app.dens-conf .table-wrap table:not(.planilha) td { padding: 11px 13px; font-size: 14px; }
.app.dens-conf .table-wrap table:not(.planilha) th { padding: 10px 13px; }
/* A grade de tamanhos (PP·2 P·6 M·9 …) empilhava dentro da célula e sozinha
   fazia a linha do Estoque ter 100px — a linha compacta não adianta nada se
   uma célula cresce sem limite. Em Compacto ela vira uma fita de uma linha
   só com rolagem própria; em Confortável ela volta a se abrir inteira.
   A grade completa continua a um clique, na ficha do produto. */
.table-wrap table:not(.planilha) td > .grade { flex-wrap: nowrap; overflow-x: auto;
  max-width: 230px; scrollbar-width: none; }
.table-wrap table:not(.planilha) td > .grade::-webkit-scrollbar { display: none; }
.app.dens-conf .table-wrap table:not(.planilha) td > .grade { flex-wrap: wrap; overflow: visible; max-width: none; }

/* ---- tela travada na altura da janela (só listagens; App.telaCheia) ----
   O ganho não é estético: o cabeçalho da tabela para de sumir na rolagem e
   a linha de totais fica sempre visível, então o lojista lê "127 notas ·
   R$ 84.312,90" sem descer até o fim da lista. */
.app.cheia { height: 100vh; overflow: hidden; }
.app.cheia .main { height: 100vh; min-height: 0; }
.app.cheia .topbar, .app.cheia .actionbar { position: static; }
.app.cheia .view { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 22px 14px;
  display: flex; flex-direction: column; }
.app.cheia .view > .card-cheio { flex: 1 1 auto; min-height: 300px; display: flex; flex-direction: column;
  overflow: hidden; margin-bottom: 0; }
.app.cheia .view > .card-cheio > .table-wrap { flex: 1; min-height: 0; overflow: auto; }
/* cabeçalho grudado: só faz sentido quando a rolagem é do .table-wrap */
.app.cheia .card-cheio .table-wrap table:not(.planilha) th { position: sticky; top: 0; z-index: 3; }
.app.cheia .card-cheio > .pl-barra { flex: 0 0 auto; }
/* o rodapé de "mostrando 1.200 de 5.120" fica colado no pé do card: com a
   lista travada na janela ele deixa de ser algo que se descobre rolando */
.app.cheia .card-cheio > .pl-mais { flex: 0 0 auto; }
@media (max-width: 1180px) { .app.cheia .view { padding: 12px; } .actionbar { padding: 8px 12px; } }

/* ---- no celular a barra de ações desce para o rodapé ----
   Ela vira a faixa de ação do polegar. A tecla some (não há teclado) e as
   ações marcadas como secundárias saem da faixa — cabem no menu de sempre
   da tela, não numa fila horizontal de dez botões que ninguém rola. */
@media (max-width: 760px) {
  .actionbar { position: fixed; left: 0; right: 0; bottom: 0; top: auto; border-bottom: 0;
    border-top: 1px solid var(--ink-200); padding: 7px 10px; gap: 5px;
    box-shadow: 0 -6px 16px rgba(15,23,42,.07); z-index: 60; }
  /* a tecla e a chave de densidade saem: não há teclado, e no cartão a
     altura da linha da tabela não quer dizer nada */
  .actionbar kbd, .ab-sep, .ab-canto { display: none; }
  .actionbar .btn { padding: 8px 12px; }
  .app.cheia .actionbar, .actionbar { position: fixed; }
  .view, .app.cheia .view { padding-bottom: 68px; }
  .app.cheia { height: auto; overflow: visible; }
  .app.cheia .main { height: auto; }
  .app.cheia .view { overflow: visible; display: block; }
  .app.cheia .view > .card-cheio { min-height: 0; display: block; overflow: visible; }
  .faixa-aviso { bottom: 62px; }
  /* A BOLHA DE AJUDA NAO PODE COBRIR A BARRA DE ACAO. Em 390px ela ficava
     em cima do botao Exportar do Estoque; em 768px comia a ultima linha
     das tabelas. Ela sobe acima da faixa fixa do polegar e encolhe para
     so o icone — no celular o texto "Ajuda" custa mais do que vale. */
  .ajuda-bolha { bottom: calc(68px + 12px); padding: 12px; }
  .ajuda-bolha .tx { display: none; }
  .ajuda-painel { bottom: calc(68px + 12px); height: calc(100vh - 140px); }
}

/* Tablet: a barra de acoes ainda esta no topo, mas a bolha cobria a
   ultima linha da tabela — que e justamente onde o "mostrando X de Y"
   e o total ficam. */
@media (min-width: 761px) and (max-width: 1024px) {
  .ajuda-bolha { bottom: 26px; }
  .app.cheia .view > .card-cheio > .table-wrap { padding-bottom: 56px; }
}

/* ============================================================
   A MESMA TABELA VIRA CARTÃO NO CELULAR
   ------------------------------------------------------------
   Não é uma segunda marcação: é a mesma <tr>, com o nome da coluna
   colado em cada célula (data-rot, escrito pela camada de planilha).
   Por isso o clique da linha, o filtro do cabeçalho e as colunas
   que o lojista desligou continuam valendo dentro do cartão — uma
   lista paralela de cartões teria que repetir tudo isso e ia
   divergir no primeiro ajuste.
   ============================================================ */
@media (max-width: 760px) {
  .tab-cartao, .tab-cartao > tbody, .tab-cartao > tbody > tr, .tab-cartao > tbody > tr > td { display: block; width: auto; }
  .tab-cartao > thead { display: none; }
  /* a linha é uma coluna flex só para o título poder subir: no cartão o
     nome da peça tem que ser a primeira coisa, mesmo que a coluna dele
     seja a quinta da tabela */
  .tab-cartao > tbody > tr { display: flex; flex-direction: column;
    border: 1px solid var(--ink-200); border-radius: 12px; background: #fff;
    box-shadow: var(--shadow-sm); padding: 9px 12px; margin: 0 0 8px; }
  .tab-cartao > tbody > tr:last-child td { border-bottom: none; }
  .tab-cartao > tbody > tr > td { border: 0; padding: 2px 0; white-space: normal; text-align: left;
    display: flex; gap: 12px; align-items: baseline; min-height: 22px; }
  .tab-cartao > tbody > tr > td::before { content: attr(data-rot); flex: 0 0 38%; color: var(--ink-400);
    font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; line-height: 1.9; }
  .tab-cartao > tbody > tr > td[data-rot=""]::before, .tab-cartao > tbody > tr > td:not([data-rot])::before { content: none; }
  /* o campo forte do cartão: a primeira coluna de texto sobe para título */
  .tab-cartao > tbody > tr > td.cartao-tit { font-size: 15px; font-weight: 700; padding-bottom: 5px; order: -1; }
  .tab-cartao > tbody > tr > td.cartao-tit::before { display: none; }
  .tab-cartao > tbody > tr > td.num { justify-content: space-between; }
  .tab-cartao > tbody > tr > td.num::before { flex: 0 0 auto; }
  /* linha de estado vazio e qualquer célula que atravessa a tabela */
  .tab-cartao > tbody > tr > td[colspan] { display: block; }
  .tab-cartao > tbody > tr > td[colspan]::before { content: none; }
  .tab-cartao > tbody > tr:has(> td[colspan]) { border: 0; box-shadow: none; background: none; padding: 0; }
  /* A coluna de ação é a PRIMEIRA da planilha, então no cartão ela é a
     linha de cima: olhinho e lápis no canto direito, sem rótulo e sem
     separador (separador em cima da primeira linha vira uma risca solta). */
  .tab-cartao > tbody > tr > td.pl-acoes { justify-content: flex-end; padding: 0 0 4px; order: -2; }
  .tab-cartao > tbody > tr > td.pl-acoes::before { content: none; }
  /* a célula sem rótulo não reserva a faixa de 38% do rótulo */
  .tab-cartao > tbody > tr > td[data-rot=""] { display: block; }
  /* Solta a rolagem lateral SÓ do wrap que já virou cartão. Sem o :has,
     a tabela vazava para fora da tela no intervalo entre a view escrever a
     tabela e a camada de planilha adotá-la — e ficava vazando para sempre
     na tabela que a planilha não adota (grade de digitação), porque essa
     nunca vira cartão e precisa da rolagem lateral de verdade. */
  .card > .table-wrap:has(> .tab-cartao) { overflow-x: visible; }
  .card:has(> .table-wrap > .tab-cartao) { border: 0; background: none; box-shadow: none; }
  .card:has(> .table-wrap > .tab-cartao) > .pl-barra { border: 1px solid var(--ink-200); border-radius: var(--radius); margin-bottom: 9px; }
}
@media print { .actionbar { display: none !important; } }

/* =====================================================================
   FOTO PELO CELULAR
   ---------------------------------------------------------------------
   Dois lugares: o modal que o computador abre enquanto espera, e a tela
   que o celular deixa aberta o dia todo. O modal e informacao; a tela do
   celular e um botao do tamanho de um polegar e mais nada.
   ===================================================================== */
.fs-add.fs-cel { border-style: solid; border-color: var(--brand-100); background: var(--brand-50); color: var(--brand-600); }
.fs-add.fs-cel:hover { border-color: var(--brand-500); background: var(--brand-100); }

.fcel-peca { font-size: 13.5px; color: var(--ink-700); margin-bottom: 14px; }
.fcel-grid { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.fcel-qr { text-align: center; flex: 0 0 auto; }
.fcel-qr svg { border: 1px solid var(--ink-200); border-radius: 10px; display: block; }
.fcel-cod {
  margin-top: 8px; font-size: 19px; font-weight: 800; letter-spacing: .18em;
  color: var(--ink-900); font-variant-numeric: tabular-nums;
}
.fcel-txt { flex: 1 1 240px; min-width: 220px; }
.fcel-status {
  display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700;
  color: var(--ink-500); margin-bottom: 12px;
}
.fcel-status i { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-300); animation: fcelPulso 1.4s infinite; }
.fcel-status.on { color: var(--green-700); }
.fcel-status.on i { background: var(--green-600); animation: none; }
@keyframes fcelPulso { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.fcel-passos { margin: 0 0 12px 16px; padding: 0; font-size: 13px; color: var(--ink-700); line-height: 1.55; }
.fcel-passos li { margin-bottom: 7px; }
.fcel-exp { font-size: 12px; color: var(--ink-400); }
.fcel-esperando { padding: 34px; text-align: center; color: var(--ink-500); font-size: 13.5px; }
.fcel-esperando.erro { color: var(--red-600); }
.fcel-recebidas { margin-top: 16px; border-top: 1px solid var(--ink-200); padding-top: 13px; }
.fcel-recebidas .t { font-size: 12.5px; font-weight: 700; color: var(--green-700); margin-bottom: 9px; }
.fcel-recebidas .t.vazio { color: var(--ink-400); font-weight: 500; }
.fcel-recebidas .tira { display: flex; gap: 8px; flex-wrap: wrap; }
.fcel-recebidas img { width: 66px; height: 80px; object-fit: cover; border-radius: 8px; border: 1px solid var(--ink-200); }

/* --- a tela que o celular deixa aberta --- */
.cel-tela { max-width: 520px; margin: 0 auto; }
.cel-cab { display: flex; align-items: center; gap: 11px; margin-bottom: 18px; color: var(--brand-600); }
.cel-cab .t { font-size: 17px; font-weight: 800; color: var(--ink-900); letter-spacing: -.02em; }
.cel-cab .s { font-size: 12.5px; color: var(--ink-500); }
.cel-pedido {
  background: #fff; border: 1px solid var(--ink-200); border-radius: var(--radius);
  padding: 20px; margin-bottom: 14px; box-shadow: var(--shadow-sm); text-align: center;
}
.cel-pedido.primeiro { border-color: var(--brand-300); box-shadow: var(--shadow-md); }
.cel-peca { font-size: 19px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 3px; }
.cel-cod { font-size: 11.5px; color: var(--ink-400); margin-bottom: 16px; letter-spacing: .06em; }
.cel-pedido .btn.lg { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 17px; font-size: 16px; }
.cel-tira { display: flex; gap: 8px; justify-content: center; margin-bottom: 14px; flex-wrap: wrap; }
.cel-tira img { width: 62px; height: 76px; object-fit: cover; border-radius: 8px; border: 1px solid var(--ink-200); }
.cel-ok { margin-top: 10px; font-size: 12.5px; font-weight: 700; color: var(--green-700); }
.cel-vazio { text-align: center; padding: 48px 22px; color: var(--ink-500); }
.cel-vazio .ic {
  width: 62px; height: 62px; border-radius: 18px; background: var(--ink-100); color: var(--ink-400);
  display: grid; place-items: center; margin: 0 auto 16px;
}
.cel-vazio .t { font-size: 16px; font-weight: 700; color: var(--ink-700); margin-bottom: 8px; }
.cel-vazio .s { font-size: 13.5px; line-height: 1.6; max-width: 340px; margin: 0 auto; }

/* =====================================================================
   ATUALIZAÇÃO RÁPIDA — a tela de bipar
   ---------------------------------------------------------------------
   Feita para ser usada em pé, com uma peça de roupa na outra mão: a
   câmera ocupa a tela, o botão é do tamanho de um polegar e o texto que
   importa é o nome da peça.
   ===================================================================== */
.rap { max-width: 520px; margin: 0 auto; }
.rap-cab { display: flex; align-items: center; gap: 11px; margin-bottom: 16px; color: var(--brand-600); }
.rap-cab .t { font-size: 17px; font-weight: 800; color: var(--ink-900); letter-spacing: -.02em; }
.rap-cab .s { font-size: 12.5px; color: var(--ink-500); }
.rap-conta[hidden] { display: none; }
.rap-conta {
  margin-left: auto; min-width: 30px; height: 30px; padding: 0 9px; border-radius: 15px;
  background: var(--green-100); color: var(--green-700); font-weight: 800; font-size: 14px;
  display: grid; place-items: center;
}

.rap-cam {
  position: relative; width: 100%; aspect-ratio: 3 / 4; max-height: 60vh;
  background: #0f172a; border-radius: var(--radius); overflow: hidden; margin-bottom: 12px;
}
.rap-cam video { width: 100%; height: 100%; object-fit: cover; display: block; }
/* a mira não é enfeite: ela diz onde a etiqueta tem de estar */
.rap-mira { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.rap-mira i {
  width: 78%; height: 34%; border: 2px solid rgba(255,255,255,.85); border-radius: 12px;
  box-shadow: 0 0 0 100vmax rgba(15,23,42,.35);
  animation: rapPulso 1.6s ease-in-out infinite;
}
@keyframes rapPulso { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.rap-dica {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 11px 14px;
  background: linear-gradient(transparent, rgba(15,23,42,.85));
  color: #fff; font-size: 13px; font-weight: 600; text-align: center;
}
.rap-dica.erro { background: var(--red-600); }
.rap-semcam { height: 100%; display: grid; place-content: center; justify-items: center; gap: 8px; padding: 26px; color: #fff; text-align: center; }
.rap-semcam .t { font-size: 14.5px; font-weight: 700; }
.rap-semcam .s { font-size: 12.5px; color: #cbd5e1; }

.rap-manual { display: flex; gap: 8px; }
.rap-manual input {
  flex: 1; border: 1px solid var(--ink-200); border-radius: 10px; padding: 12px 13px;
  font-size: 15px; outline: none; font-variant-numeric: tabular-nums;
}
.rap-manual input:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-50); }
.rap-alerta[hidden] { display: none; }
.rap-alerta {
  margin-top: 10px; padding: 11px 13px; border-radius: 10px;
  background: var(--red-100); color: var(--red-600);
  font-size: 13px; font-weight: 600; text-align: center;
}
.rap-feitas { margin-top: 12px; text-align: center; font-size: 12.5px; color: var(--green-700); font-weight: 700; }

.rap-peca {
  background: #fff; border: 1px solid var(--ink-200); border-radius: var(--radius);
  padding: 22px; text-align: center; box-shadow: var(--shadow-md);
}
.rap-peca.ok { border-color: var(--green-600); }
.rap-foto { width: 132px; height: 162px; margin: 0 auto 14px; border-radius: 12px; overflow: hidden; border: 1px solid var(--ink-200); }
.rap-foto img, .rap-foto svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.rap-nome { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.rap-ref { font-size: 12.5px; color: var(--ink-500); margin-bottom: 18px; }
.rap-ok { font-size: 13px; font-weight: 800; color: var(--green-700); display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 6px; }
.rap-pergunta { font-size: 14px; color: var(--ink-700); margin: 14px 0 16px; }
.rap-status { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--brand-600); font-weight: 700; font-size: 14px; padding: 15px; }
.rap-peca .btn.lg { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 16px; font-size: 16px; }
.rap-peca .btn.block + .btn.block { margin-top: 9px; }


/* ======================================================================
 * ERRO ONDE O ERRO ESTA
 * ----------------------------------------------------------------------
 * Toast no canto conta o que houve; isto mostra ONDE. Ver App.erroNoCampo.
 * ====================================================================== */
.field input.erro, .field select.erro, .field textarea.erro {
  border-color: var(--red-600) !important; background: #fef2f2;
  box-shadow: 0 0 0 3px rgba(220,38,38,.12); }
.campo-erro { font-size: 11.5px; font-weight: 600; color: var(--red-600); margin-top: 5px; line-height: 1.35; }
.field label .req { color: var(--red-600); font-weight: 800; }

/* Movimento de caixa estornado: continua na lista, riscado, com o
   contrario logo acima dele. Historico de gaveta nao perde linha. */
.rank-row.estornado { opacity: .6; }
.rank-row.estornado .nm { text-decoration: line-through; }
.rank-row .btn.sm { margin-left: 10px; flex: 0 0 auto; }

/* ====================================================================
   GRADE COM COR — a matriz do cadastro de peça (01/09/2026)
   --------------------------------------------------------------------
   Uma cor só desenha a fileira de sempre (.gfila); da segunda cor em
   diante vira tabela (.gmatriz), com a cor na lateral e o total da
   linha no fim — que é o número que o lojista compara com a caixa
   aberta na frente dele.
   ==================================================================== */
.cores-lin { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.cchip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--ink-50); border: 1px solid var(--ink-200);
  border-radius: 999px; padding: 4px 10px 4px 7px; font-size: 12.5px; font-weight: 600;
}
.cchip .bola { width: 13px; height: 13px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); flex: 0 0 auto; }
.cchip button {
  border: 0; background: none; cursor: pointer; color: var(--ink-400);
  font-size: 15px; line-height: 1; padding: 0 0 0 2px;
}
.cchip button:hover { color: var(--red-600, #dc2626); }
.cchip.add { padding: 2px 6px; background: none; border-style: dashed; }
.cchip.add input { border: 0; background: none; width: 84px; font-size: 12.5px; padding: 3px 2px; outline: none; }

.gcel { text-align: center; display: flex; flex-direction: column; gap: 3px; }
.gcel > label { font-size: 11px; }
.gcel.fora > label { color: var(--amber-600); font-weight: 700; }
.gcel input { text-align: center; padding: 7px 4px; width: 100%; }
.gcel.fora input { border-color: var(--amber-300); }
/* o código de barras da peça mora na própria célula, encolhido: mostra
   os quatro últimos dígitos quando existe, e um "+ cód" quando não */
.gcel .gcod {
  border: 1px dashed var(--ink-200); background: none; border-radius: 5px;
  font-size: 10px; color: var(--ink-400); cursor: pointer; padding: 2px 3px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; line-height: 1.4;
}
.gcel .gcod:hover { border-color: var(--brand-400, #6366f1); color: var(--brand-600, #4f46e5); }
.gcel .gcod.tem { border-style: solid; border-color: var(--green-300, #86efac); color: var(--green-700, #15803d); }

.gfila { display: grid; grid-template-columns: repeat(auto-fit, minmax(62px, 1fr)); gap: 8px; }

.gmatriz { overflow-x: auto; border: 1px solid var(--ink-100); border-radius: 9px; }
.gmatriz table { width: 100%; border-collapse: collapse; }
.gmatriz th, .gmatriz td { padding: 5px 6px; border-bottom: 1px solid var(--ink-100); }
.gmatriz thead th { font-size: 11px; color: var(--ink-400); font-weight: 700; text-align: center; background: var(--ink-50); }
.gmatriz thead th.fora { color: var(--amber-600); }
.gmatriz th.cor {
  text-align: left; font-size: 12.5px; font-weight: 600; white-space: nowrap;
  position: sticky; left: 0; background: var(--surface, #fff); z-index: 1;
  display: table-cell;
}
.gmatriz th.cor .bola {
  display: inline-block; width: 11px; height: 11px; border-radius: 50%;
  border: 1px solid rgba(0,0,0,.15); margin-right: 6px; vertical-align: -1px;
}
.gmatriz td { min-width: 66px; }
.gmatriz .tot { text-align: right; font-weight: 700; font-size: 12.5px; color: var(--ink-700); min-width: 46px; }
.gmatriz tbody tr:last-child th, .gmatriz tbody tr:last-child td { border-bottom: 0; }

/* ====================================================================
   NUMERO DIGITAVEL DENTRO DE TABELA
   --------------------------------------------------------------------
   Grade de configuracao (taxa de cartao, contagem de inventario) precisa
   de campo numerico na celula. Sem isto o input herda a largura total da
   coluna e a tabela estoura de lado no celular.
   ==================================================================== */
.inp-num {
  width: 84px; text-align: right; font-variant-numeric: tabular-nums;
  border: 1px solid var(--ink-200); border-radius: var(--radius-sm);
  padding: 5px 8px; font-size: 13px; font-family: inherit; background: #fff; color: var(--ink-900);
}
.inp-num:focus { outline: 0; border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-50); }
.inp-num.lg { width: 108px; }

/* ====================================================================
   CURVA ABC  ·  C04 e C05
   --------------------------------------------------------------------
   A pilula de classe e a faixa de Pareto sao os dois desenhos que fazem
   a curva ser lida sem legenda. Cor com significado fixo em todo o
   sistema: A verde (quem sustenta), B neutro, C ambar (o que dorme) —
   nunca vermelho, porque classe C nao e erro, e escolha de sortimento.
   ==================================================================== */
.abc {
  display: inline-block; min-width: 22px; text-align: center;
  font-weight: 800; font-size: 11.5px; line-height: 18px; height: 18px;
  border-radius: 5px; letter-spacing: .02em;
}
.abc-A { background: var(--green-100); color: var(--green-600); }
.abc-B { background: var(--ink-100); color: var(--ink-600); }
.abc-C { background: var(--amber-100); color: var(--amber-600); }

.pareto { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pareto-item .pareto-top {
  display: flex; align-items: center; gap: 7px; margin-bottom: 7px;
  font-size: 14px; color: var(--ink-800);
}
.pareto-item .pareto-top b { font-size: 17px; font-weight: 700; }
.pareto-item .bar { margin-bottom: 5px; }
@media (max-width: 720px) { .pareto { grid-template-columns: 1fr; gap: 12px; } }

/* Linha que pede atenção sem gritar: um filete à esquerda e um fundo
   quase imperceptível. Numa tabela de 200 clientes, pintar a linha
   inteira de vermelho tornaria as outras invisíveis. */
tr.linha-alerta > td:first-child { box-shadow: inset 3px 0 0 var(--red-500); }
tr.linha-alerta > td { background: var(--red-50); }

.aviso-linha {
  display: flex; gap: 9px; align-items: flex-start;
  background: var(--amber-50); border: 1px solid var(--amber-100);
  color: var(--amber-700); border-radius: var(--radius-sm);
  padding: 10px 13px; font-size: 12.5px; line-height: 1.5; margin-bottom: 15px;
}
.aviso-linha svg { flex: 0 0 auto; margin-top: 1px; }

/* ====================================================================
   CAMPO DE ESCOLHA DENTRO DA BARRA DE AÇÕES
   --------------------------------------------------------------------
   A barra do shell é feita de botões. Quando a tela precisa de um
   PARÂMETRO (período, agrupador), ele mora ali junto — sair da barra
   para um bloco de filtros acima devolveria os ~70px de altura que o
   layout híbrido conquistou.
   ==================================================================== */
.barra-campo {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--ink-500); white-space: nowrap;
}
select.sel-barra {
  border: 1px solid var(--ink-200); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink-900); font-family: inherit;
  font-size: 12.5px; font-weight: 600; padding: 6px 8px; outline: 0;
}
select.sel-barra:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-50); }

/* ====================================================================
   ESCOLHA EXPLICADA  ·  C07
   --------------------------------------------------------------------
   Radio que carrega a consequência escrita ao lado. Onde a escolha muda
   para onde o dinheiro vai — devolver em crédito, em espécie ou abatendo
   parcela — três palavras num rótulo não bastam: a vendedora precisa ler
   o que acontece antes de clicar, não descobrir depois.
   ==================================================================== */
.escolhas { display: grid; gap: 8px; }
.escolha {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto;
  gap: 2px 10px; align-items: start; cursor: pointer;
  border: 1px solid var(--ink-200); border-radius: var(--radius-sm);
  padding: 11px 13px; transition: .12s; background: #fff;
}
.escolha:hover { border-color: var(--brand-300); }
.escolha.on { border-color: var(--brand-500); background: var(--brand-50); }
.escolha input { grid-row: 1 / span 2; margin-top: 3px; accent-color: var(--brand-600); }
.escolha .nm { font-weight: 600; font-size: 13.5px; color: var(--ink-900); }
.escolha .ds { font-size: 12px; line-height: 1.45; color: var(--ink-500); }
.escolha.off { opacity: .5; cursor: not-allowed; background: var(--ink-50); }
.escolha.off:hover { border-color: var(--ink-200); }

/* Linha de peça que voltou para a loja: some do peso visual sem sumir
   da tabela — a venda é documento e nenhuma linha dela desaparece. */
tr.linha-devolvida > td { opacity: .55; text-decoration-color: var(--ink-300); }

/* A linha do crédito da loja se distingue das outras formas: ela não é
   dinheiro novo entrando, é saldo da própria cliente sendo gasto — e o
   valor disponível fica escrito ali, porque é o teto. */
.pgv-forma.cred { border-color: var(--green-300); background: var(--green-100); }
.pgv-forma.cred .pgv-nome { flex-wrap: wrap; }
.pgv-forma.cred .saldo-cred {
  display: block; width: 100%; font-size: 11px; font-weight: 600;
  color: var(--green-700); margin-top: 1px;
}

/* Ação escrita dentro de uma frase — "perdoar os encargos" mora na
   mesma linha que explica de onde eles vieram, e não num botão solto
   que obrigaria a reler o aviso para saber o que ele perdoa. */
.linkinho {
  background: none; border: 0; padding: 0; font: inherit; cursor: pointer;
  color: var(--amber-700); font-weight: 700; text-decoration: underline;
}
.linkinho:hover { opacity: .8; }
