/* Piloto aprovado: todo seletor fica dentro do Estoque. Não tematizar body,
   :root, PDV, atendimento ou modais compartilhados neste arquivo. */
#tab-estoque {
  --estoque-ink: #192a40;
  --estoque-muted: #526174;
  --estoque-line: #d8dfe7;
  --text-main: var(--estoque-ink);
  --text-muted: var(--estoque-muted);
  --text-dim: var(--estoque-muted);
  --accent-green: #226447;
  background: #f5f6f8;
  color: var(--estoque-ink);
}
#tab-estoque .view-container { padding: 24px 28px; gap: 20px; }
#tab-estoque .view-header { gap: 20px; align-items: center; flex-wrap: wrap; }
#tab-estoque .view-title-group h2 { font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: -.025em; }
#tab-estoque .view-title-group p { margin-top: 8px; font-size: 14px; line-height: 1.5; }
#tab-estoque .estoque-header-actions { gap: 10px; flex-wrap: wrap; }
#tab-estoque .btn-toolbar-estoque {
  min-height: 44px; height: auto; padding: 11px 16px; border-radius: 7px;
  border: 1px solid var(--estoque-line); background: #fff; color: var(--estoque-ink);
  box-shadow: none; font-size: 14px; font-weight: 600; transform: none;
}
#tab-estoque .btn-toolbar-estoque:hover { background: #edf1f5; transform: none; }
#tab-estoque .btn-toolbar-estoque.primary { background: var(--estoque-ink); border-color: var(--estoque-ink); color: #fff; }
#tab-estoque .btn-toolbar-estoque.primary:hover { background: #30475e; }
#tab-estoque .inventory-toolbar {
  padding: 0; border: 0; background: transparent; box-shadow: none;
  flex-shrink: 0; margin-bottom: 0 !important; align-items: end !important;
}
#tab-estoque .estoque-search-field { flex: 1 1 320px; min-width: 0; }
#tab-estoque .estoque-search-field label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--estoque-ink); }
#tab-estoque .search-input-custom {
  min-height: 44px; height: auto; padding: 11px 14px; border: 1px solid #aebbc9;
  border-radius: 7px; background: #fff; color: var(--estoque-ink); font-size: 14px;
  box-shadow: none; caret-color: #a4460d;
}
#tab-estoque .search-input-custom::placeholder { color: #657184; opacity: 1; }
#tab-estoque .cat-filter-btn,
#tab-estoque .filter-pill-btn { min-height: 40px; padding: 8px 12px; border-radius: 7px; box-shadow: none; font-size: 13px; line-height: 1.4; }
#tab-estoque .cat-filter-btn.active,
#tab-estoque .filter-pill-btn.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  font-weight: 800;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
#tab-estoque .cat-filter-btn:hover:not(.active),
#tab-estoque .filter-pill-btn:hover:not(.active) {
  background: #ffffff;
  color: #0f172a;
  border-color: #94a3b8;
}
#tab-estoque #estoque-filtros-validade-bar { margin-bottom: 0 !important; flex-shrink: 0; }
#tab-estoque .category-dropdown-menu { border: 1px solid var(--estoque-line); border-radius: 10px; box-shadow: 0 10px 28px #192a4020; max-width: min(360px, calc(100vw - 48px)); }
#tab-estoque .estoque-menu-item { min-height: 40px; font-size: 13px; line-height: 1.4; padding: 10px 14px; }
#tab-estoque .estoque-menu-grupo { color: var(--estoque-muted); font-size: 12px; }
#tab-estoque .data-table-card { border: 1px solid var(--estoque-line); border-radius: 12px; background: #fff; box-shadow: none; }
#tab-estoque .table-scroll-area { overflow: auto; scrollbar-color: #96a3b1 #edf0f4; scrollbar-width: thin; }
#tab-estoque .pdv-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
#tab-estoque .pdv-table th:nth-child(1),
#tab-estoque .pdv-table td:nth-child(1) { width: 170px !important; min-width: 170px !important; }
#tab-estoque .pdv-table th:nth-child(2),
#tab-estoque .pdv-table td:nth-child(2) { width: auto !important; min-width: 170px !important; }
#tab-estoque .pdv-table th:nth-child(2) .th-content,
#tab-estoque .pdv-table td:nth-child(2) strong {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; display: block;
}
#tab-estoque .pdv-table td:nth-child(2) > div { min-width: 0; overflow: hidden; }
#tab-estoque .pdv-table th:nth-child(3),
#tab-estoque .pdv-table td:nth-child(3) { width: 125px !important; min-width: 125px !important; text-align: center; }
#tab-estoque .pdv-table th:nth-child(4),
#tab-estoque .pdv-table td:nth-child(4) { width: 115px !important; min-width: 115px !important; text-align: center; }
#tab-estoque .pdv-table th:nth-child(5),
#tab-estoque .pdv-table td:nth-child(5) { width: 115px !important; min-width: 115px !important; text-align: center; }
#tab-estoque .pdv-table th:nth-child(6),
#tab-estoque .pdv-table td:nth-child(6) { width: 135px !important; min-width: 135px !important; text-align: center; }
#tab-estoque .pdv-table th:nth-child(7),
#tab-estoque .pdv-table td:nth-child(7) { width: 155px !important; min-width: 155px !important; text-align: center; }
#tab-estoque .pdv-table th:nth-child(8),
#tab-estoque .pdv-table td:nth-child(8) { width: 125px !important; min-width: 125px !important; text-align: right; }
#tab-estoque .pdv-table td:nth-child(7) .badge-stock {
  display: inline-flex; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#tab-estoque .pdv-table td:nth-child(8) > div { flex-wrap: nowrap; justify-content: flex-end; gap: 4px; }
#tab-estoque .pdv-table th { background: #eef2f6; color: var(--estoque-muted); font-size: 12px; font-weight: 600; padding: 15px 10px; border-bottom: 1px solid var(--estoque-line); }
#tab-estoque .pdv-table td { padding: 16px 10px; border-bottom: 1px solid #e5eaf0; font-size: 14px; line-height: 1.5; vertical-align: middle; }
#tab-estoque .pdv-table tbody tr:hover { background: #f5f7fa; }
#tab-estoque .pdv-table th:nth-child(4),
#tab-estoque .pdv-table th:nth-child(5),
#tab-estoque .pdv-table th:nth-child(6),
#tab-estoque .pdv-table td:nth-child(4),
#tab-estoque .pdv-table td:nth-child(5),
#tab-estoque .pdv-table td:nth-child(6) { text-align: center !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
#tab-estoque .pdv-table th:nth-child(4) .th-content,
#tab-estoque .pdv-table th:nth-child(5) .th-content,
#tab-estoque .pdv-table th:nth-child(6) .th-content { justify-content: center !important; }
#tab-estoque .pdv-table td:nth-child(5) > div { align-items: center !important; }
#tab-estoque .precos-especiais-cell { align-items: center; justify-content: center; }
#tab-estoque .category-tag { color: #46556a; background: #edf1f5; border-radius: 5px; font-size: 12px; }
#tab-estoque .badge-stock { border-radius: 6px; font-size: 12px; font-weight: 600; }
#tab-estoque .badge-stock.ok { background: #e5f2e9; color: #225b3d; border-color: #c8dfcf; }
#tab-estoque .badge-stock.low { background: #fff1d7; color: #7d500b; border-color: #ead4ae; }
#tab-estoque .badge-stock.zero { background: #fbe9ea; color: #a52b32; border-color: #edc8cd; }
#tab-estoque .btn-action-sm { min-width: 36px; min-height: 36px; border-radius: 6px; box-shadow: none; }
#tab-estoque .data-table-footer { background: #f8fafc; padding: 14px 16px; border-top: 1px solid var(--estoque-line); color: var(--estoque-muted); font-size: 12px; gap: 12px; flex-wrap: wrap; }
#tab-estoque :is(button, input, select, [tabindex]):focus-visible { outline: 3px solid #2466bd; outline-offset: 3px; }
#tab-estoque button:disabled { opacity: .65; cursor: not-allowed; transform: none; }
#tab-estoque ::selection { background: #ffcdac; color: #192a40; }
@media (max-width: 1100px) {
  #tab-estoque .view-container { padding: 20px; gap: 16px; }
  #tab-estoque .view-title-group h2 { font-size: 24px; }
}
@media (max-width: 680px), (max-height: 650px) {
  #tab-estoque { overflow: auto !important; }
  #tab-estoque .view-container { height: auto; min-height: 100%; overflow: visible; padding: 16px; }
  #tab-estoque .data-table-card { flex: none; min-height: 240px; }
  #tab-estoque .table-scroll-area { max-height: 60vh !important; flex: none; }
  #tab-estoque .view-header { align-items: flex-start; gap: 16px; }
  #tab-estoque .estoque-header-actions { width: 100%; justify-content: space-between; }
  #tab-estoque .inventory-toolbar { align-items: stretch !important; }
  #tab-estoque .estoque-search-field { flex: none; width: 100%; }
  #tab-estoque #estoque-category-bar { justify-content: flex-start; }
  #tab-estoque .btn-action-sm { min-width: 44px; min-height: 44px; }
}

/* Cadastro único do pacote Completo. */
.estoque-badge-combo { display:inline-block; margin-left:5px; padding:2px 4px; border:1px solid #f7c99f; border-radius:4px; background:#fff3e8; color:#934414; font-family:inherit; font-size:9px; font-weight:700; line-height:1.2; vertical-align:middle; }
.pdv-adicionais-campos { display:grid; grid-template-columns:2fr 1fr 1fr; gap:8px; }
.pdv-adicional-opcao { display:grid; grid-template-columns:2fr 1fr 1fr; gap:8px; padding:12px 0; border-top:1px solid #d8e1eb; }
#produto-adicionais-pdv fieldset { margin:12px 0; padding:12px; border:1px solid #d8e1eb; border-radius:6px; }
#produto-adicionais-pdv label { font-size:12px; }


#tab-estoque .catalogo-pdv-status { margin:4px 0 0; padding:0; background:none; color:#854415; font-size:11px; line-height:1.35; max-width:680px; }
#tab-estoque .catalogo-pdv-status[hidden] { display:none; }
#catalogo-pdv-ferramentas { border-bottom:1px solid #d8dfe7; padding-bottom:4px; margin-bottom:4px; }
#produto-adicionais-pdv button { border:1px solid #b7c8dd; border-radius:6px; padding:6px 10px; background:#fff; color:#192b40; font:600 12px/1.3 sans-serif; cursor:pointer; }
