/* =================================================================
   IMBEL — estilos específicos do módulo Controle de Facas
   ================================================================= */

/* topbar accent for IMBEL module */
.topbar-modules .mod.accent-mod.active {
  color: var(--amber-300);
  border-bottom-color: var(--amber-500);
  background: rgba(229, 161, 40, 0.08);
}

.imbel-dot-large {
  width: 10px;
  height: 10px;
  background: var(--copper);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(184, 101, 31, 0.18);
}

/* garante que o container filho preencha o wrapper .controleimbel-subtab */
.controleimbel-subtab > div { height: 100%; }

/* =================================================================
   ESQUELETO CANÔNICO — compartilhado pelas 5 sub-abas
   ================================================================= */

.imbel-subtab {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface, #fff);
}

/* 0. params card (só Tabela de Preços) */
.imbel-params {
  flex-shrink: 0;
  border-bottom: 1px solid var(--border, #e2e8f0);
  background: #fff;
}

/* 1. command bar — SEMPRE, 52px */
.imbel-cmdbar {
  height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  background: #fff;
  border-bottom: 1px solid var(--border, #e2e8f0);
  overflow-x: auto;
  overflow-y: hidden;
}
.imbel-cmdbar::-webkit-scrollbar { height: 0; }

/* 2. type bar (pills) — Movimentação / Cadastro / Auditoria, 40px */
.imbel-typebar {
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  background: #fff;
  border-bottom: 1px solid var(--border, #e2e8f0);
  overflow-x: auto;
  overflow-y: hidden;
}
.imbel-typebar::-webkit-scrollbar { height: 0; }
.imbel-typebar-lbl {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted, #94a3b8);
  white-space: nowrap;
  flex-shrink: 0;
}

/* 3. KPI strip — SEMPRE */
.imbel-kpis {
  flex-shrink: 0;
  display: flex;
  background: #fff;
  border-bottom: 1px solid var(--border, #e2e8f0);
}
.imbel-kpis .kpi {
  flex: 1;
  padding: 10px 16px;
  border-right: 1px solid var(--border, #e2e8f0);
  min-width: 0;
}
.imbel-kpis .kpi:last-child { border-right: none; }
.imbel-kpis .kpi-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3, #64748b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.imbel-kpis .kpi-value {
  font-family: 'IBM Plex Mono', var(--tv-font-mono, monospace);
  font-size: 22px;
  font-weight: 600;
  color: var(--text-1, #0f1e31);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  margin: 1px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.imbel-kpis .kpi-value.accent { color: var(--tv-amber-400, #e5a128); }
.imbel-kpis .kpi-value.pos    { color: #16a34a; }
.imbel-kpis .kpi-value.neg    { color: #dc2626; }
.imbel-kpis .kpi-sub {
  font-size: 11px;
  color: var(--text-3, #64748b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.imbel-kpis .kpi-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--navy-100, #dbeafe);
  color: var(--navy-700, #1e3a5f);
  margin-left: 4px;
  vertical-align: middle;
}
.imbel-kpis .kpi-unit {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted, #94a3b8);
}

/* 4. body */
.imbel-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

/* =================================================================
   TABELA DE MOVIMENTAÇÃO IMBEL — grid com bordas visíveis
   Usa attribute selector para garantir máxima especificidade
   ================================================================= */
table[class~="imbel-mov-grid"],
.imbel-body table.imbel-mov-grid {
  border-collapse: collapse !important;
  border-spacing: 0 !important;
}

.imbel-body table.imbel-mov-grid td,
.imbel-body table.imbel-mov-grid th,
table[class~="imbel-mov-grid"] td,
table[class~="imbel-mov-grid"] th {
  border-top: 1px solid #d1d5db !important;
  border-right: 1px solid #d1d5db !important;
  border-bottom: 1px solid #d1d5db !important;
  border-left: 1px solid #d1d5db !important;
  padding: 5px 10px !important;
  vertical-align: middle !important;
}

/* cabeçalho: bordas mais sutis sobre fundo escuro */
.imbel-body table.imbel-mov-grid thead th,
table[class~="imbel-mov-grid"] thead th {
  border-color: rgba(255,255,255,0.15) !important;
}

/* linhas alternadas */
table[class~="imbel-mov-grid"] tbody tr:nth-child(even) td {
  background-color: #f8fafc !important;
}
table[class~="imbel-mov-grid"] tbody tr:nth-child(odd) td {
  background-color: #ffffff !important;
}
table[class~="imbel-mov-grid"] tbody tr:hover td {
  background-color: #eff6ff !important;
}

/* 5. footbar — SEMPRE, 28px */
.imbel-footbar {
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  background: #0a1828;
  color: #c4d1e1;
  font-family: 'IBM Plex Mono', var(--tv-font-mono, monospace);
  font-size: 11px;
  overflow: hidden;
}
.imbel-footbar .seg {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.imbel-footbar .seg .lbl {
  color: #647d99;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.imbel-footbar .seg .val { font-weight: 600; }
.imbel-footbar .seg .val.accent { color: var(--tv-amber-400, #e5a128); }
.imbel-footbar .divider {
  width: 1px;
  height: 14px;
  background: #1e3a5f;
  flex-shrink: 0;
}
.imbel-footbar .right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.imbel-footbar .keys {
  display: flex;
  gap: 10px;
  color: #647d99;
  font-size: 10px;
}
.imbel-footbar .keys b {
  color: #e5a128;
  font-size: 9px;
  border: 1px solid #1e3a5f;
  border-radius: 2px;
  padding: 0 3px;
}

/* =================================================================
   COMPONENTES COMUNS DAS CMDBAR
   ================================================================= */

.imbel-cmdbar .search {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  padding: 0 10px;
  height: 32px;
  min-width: 200px;
  max-width: 300px;
}
.imbel-cmdbar .search input {
  background: none;
  border: none;
  outline: none;
  font-size: 12px;
  color: #1e293b;
  font-family: var(--tv-font-sans, inherit);
  flex: 1;
  min-width: 0;
}
.imbel-cmdbar .search input::placeholder { color: #94a3b8; }
.imbel-cmdbar .search svg { color: #94a3b8; flex-shrink: 0; }

.imbel-cmdbar .divider {
  width: 1px;
  height: 22px;
  background: #e2e8f0;
  flex-shrink: 0;
}

.imbel-cmdbar .seg {
  display: flex;
  height: 30px;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  overflow: hidden;
  flex-shrink: 0;
}
.imbel-cmdbar .seg button {
  padding: 0 10px;
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  background: #fff;
  border: none;
  border-right: 1px solid #e2e8f0;
  cursor: pointer;
  white-space: nowrap;
  font-family: 'IBM Plex Mono', monospace;
}
.imbel-cmdbar .seg button:last-child { border-right: none; }
.imbel-cmdbar .seg button.active { background: #0f1e31; color: #e5a128; font-weight: 600; }
.imbel-cmdbar .seg button:hover:not(.active) { background: #f8fafc; }

.imbel-cmdbar .actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}

.imbel-cmdbar .btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 5px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #374151;
  cursor: pointer;
  white-space: nowrap;
  font-family: var(--tv-font-sans, inherit);
  transition: background 0.12s, border-color 0.12s;
}
.imbel-cmdbar .btn:hover { background: #f8fafc; border-color: #cbd5e1; }
.imbel-cmdbar .btn.accent { background: #0f1e31; color: #e5a128; border-color: #0f1e31; }
.imbel-cmdbar .btn.accent:hover { background: #162235; }
.imbel-cmdbar .btn.icon { padding: 0 8px; min-width: 32px; justify-content: center; }
.imbel-cmdbar .btn svg { width: 14px; height: 14px; flex-shrink: 0; }

.imbel-cmdbar select {
  height: 30px;
  padding: 0 8px;
  font-size: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  background: #fff;
  color: #374151;
  cursor: pointer;
}
.imbel-cmdbar .filter-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
  white-space: nowrap;
}
.imbel-cmdbar .edits-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 500;
  background: #fefce8;
  border: 1px solid #fde047;
  border-radius: 5px;
  color: #92400e;
  white-space: nowrap;
}
.imbel-cmdbar .edits-badge .cnt {
  background: #e5a128;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.imbel-cmdbar .btn.small {
  height: 26px;
  padding: 0 8px;
  font-size: 11px;
}
.imbel-cmdbar .btn.ghost {
  background: transparent;
  border-color: transparent;
  color: #64748b;
}
.imbel-cmdbar .btn.ghost:hover { background: #f8fafc; border-color: #e2e8f0; }

/* pills na typebar */
.imbel-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid #e2e8f0;
  border-radius: 13px;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s, border-color 0.12s;
}
.imbel-pill:hover { background: #f8fafc; border-color: #cbd5e1; }
.imbel-pill.on { font-weight: 600; }
.imbel-pill.empty { opacity: 0.4; }
.imbel-pill-cnt {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 1px 5px;
  color: #64748b;
}
.imbel-pill.on .imbel-pill-cnt { background: rgba(255,255,255,0.25); color: inherit; }

/* =================================================================
   DASHBOARD
   ================================================================= */
.imbel-dash-grid {
  flex: 1;
  overflow: auto;
  padding: 12px 16px;
  background: var(--bg-app, #f6f8fa);
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}
.imbel-dash-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.imbel-card {
  background: #fff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 4px;
  padding: 14px 16px 16px;
}
.imbel-card.alert { border-color: rgba(220, 38, 38, 0.25); }

.imbel-card-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
  gap: 10px;
}
.imbel-card-ttl {
  font-family: var(--tv-font-display, inherit);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #0f1e31;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.imbel-card-sub {
  font-size: 10px;
  color: #94a3b8;
  letter-spacing: 0.3px;
  font-family: 'IBM Plex Mono', monospace;
}
.imbel-card-legend {
  display: flex; gap: 12px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: #64748b;
}
.imbel-card-legend span { display: inline-flex; align-items: center; gap: 4px; }
.imbel-card-legend i {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 2px;
}

/* Mini bar chart */
.imbel-bars {
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  gap: 4px;
  height: 160px;
  margin-top: 8px;
}
.imbel-bar {
  display: flex; flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.imbel-bar-stack {
  flex: 1;
  width: 100%;
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  padding: 0 1px;
}
.imbel-bar-e, .imbel-bar-s {
  width: 50%;
  border-radius: 2px 2px 0 0;
  transition: opacity .12s;
  min-height: 2px;
}
.imbel-bar-e { background: #16a34a; }
.imbel-bar-s { background: #dc2626; }
.imbel-bar:hover .imbel-bar-e,
.imbel-bar:hover .imbel-bar-s { opacity: 0.75; }
.imbel-bar-lbl {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  color: #94a3b8;
  letter-spacing: -0.3px;
}

/* Top giro list */
.imbel-top-list { display: flex; flex-direction: column; gap: 6px; }
.imbel-top-row {
  display: grid;
  grid-template-columns: 30px 1fr 100px 70px;
  gap: 10px;
  align-items: center;
  padding: 4px 0;
}
.imbel-top-rank {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-align: center;
}
.imbel-top-row:first-child .imbel-top-rank { color: #d97706; font-size: 13px; }
.imbel-top-row:nth-child(2) .imbel-top-rank { color: #64748b; }
.imbel-top-row:nth-child(3) .imbel-top-rank { color: #b8651f; }

.imbel-top-name {
  font-size: 12px;
  font-weight: 600;
  color: #0f1e31;
}
.imbel-top-meta {
  display: flex; gap: 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: #94a3b8;
  margin-top: 2px;
}
.imbel-top-bar {
  height: 8px;
  background: #f1f5f9;
  border-radius: 4px;
  overflow: hidden;
}
.imbel-top-bar .fill {
  height: 100%;
  background: linear-gradient(90deg, #e5a128, #b8651f);
  border-radius: 4px;
}
.imbel-top-val {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: #0f1e31;
  text-align: right;
}
.imbel-top-val span { font-size: 10px; color: #94a3b8; font-weight: 500; }

/* Categoria list */
.imbel-cat-list { display: flex; flex-direction: column; gap: 8px; }
.imbel-cat-row {
  display: grid;
  grid-template-columns: 1fr 130px;
  gap: 10px;
  align-items: center;
}
.imbel-cat-head {
  display: flex; justify-content: space-between; align-items: baseline;
  grid-column: 1 / 3;
  margin-bottom: 4px;
}
.imbel-cat-nm { font-weight: 600; font-size: 12px; color: #0f1e31; }
.imbel-cat-vl {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: #0f1e31;
  display: flex; gap: 6px; align-items: baseline;
}
.imbel-cat-vl .unit { font-size: 10px; color: #94a3b8; font-weight: 500; }
.imbel-cat-vl .skus {
  font-size: 10px; color: #9ca3af; font-weight: 500;
  border-left: 1px solid #e5e7eb;
  padding-left: 6px;
}
.imbel-cat-bar {
  height: 8px;
  background: #f1f5f9;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  grid-column: 1 / 2;
}
.imbel-cat-bar .fill {
  height: 100%;
  background: linear-gradient(90deg, #1e3a5f, #3b6090);
  border-radius: 4px;
}
.imbel-cat-bar .pct {
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  color: #374151;
}
.imbel-cat-vl-money {
  grid-column: 2 / 3;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: #64748b;
  text-align: right;
}

/* Alerta list */
.imbel-alert-list { display: flex; flex-direction: column; gap: 6px; }
.imbel-alert-row {
  display: grid;
  grid-template-columns: 60px 1fr 80px;
  gap: 10px;
  padding: 6px 8px;
  background: rgba(220, 38, 38, 0.03);
  border-left: 3px solid #f87171;
  border-radius: 2px;
  align-items: center;
}
.imbel-alert-id {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: #0f1e31;
}
.imbel-alert-nm {
  font-size: 12px;
  font-weight: 500;
  color: #0f1e31;
  margin-bottom: 4px;
}
.imbel-alert-bar {
  height: 6px;
  background: #f1f5f9;
  border-radius: 3px;
  overflow: hidden;
}
.imbel-alert-bar .fill { height: 100%; border-radius: 3px; }
.imbel-alert-val { text-align: right; }
.imbel-alert-val .cur {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  font-weight: 700;
}
.imbel-alert-val .min {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: #94a3b8;
}

/* Rep compare list */
.imbel-rep-list { display: flex; flex-direction: column; gap: 4px; }
.imbel-rep-row {
  display: grid;
  grid-template-columns: 80px 1fr 100px;
  gap: 10px;
  align-items: center;
  padding: 4px 0;
}
.imbel-rep-name {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  color: #0f1e31;
  border-left: 3px solid transparent;
  padding-left: 8px;
}
.imbel-rep-name .rep-badge {
  background: #e5a128;
  color: #050e1a;
  padding: 1px 5px;
  border-radius: 2px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-left: 6px;
}
.imbel-rep-bar {
  height: 14px;
  background: #f1f5f9;
  border-radius: 2px;
  overflow: hidden;
}
.imbel-rep-bar .fill { height: 100%; border-radius: 2px; }
.imbel-rep-val { text-align: right; font-family: 'IBM Plex Mono', monospace; }
.imbel-rep-val div { font-size: 13px; font-weight: 700; color: #0f1e31; }
.imbel-rep-val .sub { font-size: 10px; color: #94a3b8; font-weight: 500; }

/* =================================================================
   MOVIMENTAÇÃO
   ================================================================= */
.imbel-mov-table { width: max-content; min-width: 100%; }
.imbel-mov-table tbody tr.editing {
  background: rgba(229, 161, 40, 0.08);
}
.imbel-mov-table tbody tr.editing td { border-bottom-color: #e5a128; }

.imbel-edit-bar {
  background: #fef3c7;
  border-top: 2px solid #e5a128;
  border-bottom: 1px solid #fcd34d;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.imbel-edit-ttl { font-size: 12px; color: #92400e; font-weight: 500; }
.imbel-edit-ttl b { font-family: 'IBM Plex Mono', monospace; color: #0f1e31; }
.imbel-edit-input {
  flex: 1;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #e5a128;
  border-radius: 3px;
  font-size: 12px;
  background: #fff;
}
.imbel-edit-input:focus { outline: none; box-shadow: 0 0 0 3px rgba(229, 161, 40, 0.15); }

/* =================================================================
   IMPORT MODAL
   ================================================================= */
.imbel-imp-modal {
  background: #fff;
  border-radius: 4px;
  width: 720px;
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  overflow: hidden;
}
.imbel-imp-head {
  padding: 14px 18px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: #f8fafc;
}
.imbel-imp-ttl {
  font-family: var(--tv-font-display, inherit);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #0f1e31;
}
.imbel-imp-sub { font-size: 11px; color: #94a3b8; font-family: 'IBM Plex Mono', monospace; margin-top: 4px; }
.imbel-imp-body { flex: 1; overflow: auto; padding: 24px; }
.imbel-imp-dropzone {
  border: 2px dashed #93c5fd;
  border-radius: 6px;
  padding: 36px;
  text-align: center;
  background: #f0f9ff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.imbel-imp-dz-ttl { font-size: 14px; font-weight: 600; color: #0f1e31; margin-top: 4px; }
.imbel-imp-dz-sub { font-size: 11px; color: #94a3b8; }

/* =================================================================
   CADASTRO
   ================================================================= */
.imbel-cad-table { width: max-content; min-width: 100%; }
.imbel-group-row {
  background: #f0f4f9;
  cursor: pointer;
  user-select: none;
}
.imbel-group-row td {
  background: #f0f4f9;
  border-bottom: 1px solid #c3cfe0;
}
.imbel-group-row:hover td { background: #e2eaf5; }
.imbel-group-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
}
.imbel-group-collapse { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: #1e3a5f; width: 12px; }
.imbel-group-name {
  font-family: var(--tv-font-display, inherit);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #0f1e31;
}
.imbel-group-cnt {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: #94a3b8;
  background: #fff;
  padding: 2px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}
.imbel-group-stat {
  font-size: 11px;
  color: #64748b;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  margin-left: 14px;
}
.imbel-group-stat .l { font-size: 9px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; color: #94a3b8; }
.imbel-group-stat b { font-family: 'IBM Plex Mono', monospace; color: #0f1e31; font-weight: 700; }

.imbel-cad-input {
  width: 100%;
  border: 1px solid #e5a128;
  border-radius: 2px;
  padding: 3px 6px;
  font-size: 11px;
  font-family: inherit;
  background: #fff;
}
.imbel-cad-input:focus { outline: none; box-shadow: 0 0 0 2px rgba(229, 161, 40, 0.15); }

.imbel-status {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
  display: inline-block;
}
.imbel-status.ativo  { background: #dcfce7; color: #16a34a; }
.imbel-status.inativo { background: #f1f5f9; color: #64748b; }

/* =================================================================
   TABELA DE PREÇOS — params card + what-if
   ================================================================= */
.imbel-params {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.imbel-params .group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.imbel-params .lbl {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}
.imbel-params .val {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: #0f1e31;
}
.imbel-params .val.accent { color: #e5a128; }
.imbel-params .pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #0f1e31;
  color: #e5a128;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 3px;
}
.imbel-params .pill .dot {
  width: 6px; height: 6px;
  background: #e5a128;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(229,161,40,0.25);
}

.imbel-preco-main {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.imbel-preco-workspace {
  flex: 1;
  min-width: 0;
  overflow: auto;
}
.imbel-preco-main.with-panel .imbel-preco-workspace { /* narrowed by panel */ }

.imbel-whatif {
  width: 300px;
  flex-shrink: 0;
  border-left: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
}
.imbel-whatif-head {
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
}
.imbel-whatif-head .ttl {
  font-family: var(--tv-font-display, inherit);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #0f1e31;
}
.imbel-whatif-head .live {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: #16a34a;
  font-family: 'IBM Plex Mono', monospace;
}
.imbel-whatif-head .live .dot {
  width: 6px; height: 6px;
  background: #16a34a;
  border-radius: 50%;
  animation: pulse-dot 1.5s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; } 50% { opacity: 0.3; }
}
.imbel-whatif-body { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 14px; }
.imbel-whatif-foot {
  padding: 10px 16px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 8px;
  background: #f8fafc;
}

.imbel-param-row { display: flex; flex-direction: column; gap: 4px; }
.imbel-param-row .top { display: flex; justify-content: space-between; align-items: baseline; }
.imbel-param-row .name { font-size: 11px; font-weight: 600; color: #374151; }
.imbel-param-row .hint { font-size: 9px; color: #94a3b8; margin-left: 4px; }
.imbel-param-row .value {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: #0f1e31;
}
.imbel-param-row .unit { font-size: 11px; color: #94a3b8; }
.imbel-param-row .delta {
  font-size: 10px;
  font-family: 'IBM Plex Mono', monospace;
  margin-left: 4px;
}
.imbel-param-row .delta.pos { color: #16a34a; }
.imbel-param-row .delta.neg { color: #dc2626; }
.imbel-param-row .ticks {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: #94a3b8;
  font-family: 'IBM Plex Mono', monospace;
  margin-top: -2px;
}

/* range input — amber thumb */
.imbel-param-row input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #e5a128 var(--p, 0%), #e2e8f0 var(--p, 0%));
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.imbel-param-row input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  background: #e5a128;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.imbel-sec-ttl {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.imbel-sec-ttl .reset {
  font-size: 10px;
  color: #e5a128;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'IBM Plex Mono', monospace;
}

.imbel-impact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.imbel-impact-cell {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 8px 10px;
}
.imbel-impact-cell .l { font-size: 9px; color: #94a3b8; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.imbel-impact-cell .v { font-family: 'IBM Plex Mono', monospace; font-size: 13px; font-weight: 700; color: #0f1e31; margin: 2px 0; }
.imbel-impact-cell .d { font-size: 10px; color: #94a3b8; }
.imbel-impact-cell .d.pos { color: #16a34a; }
.imbel-impact-cell .d.neg { color: #dc2626; }

/* =================================================================
   AUDITORIA — timeline
   ================================================================= */
.imbel-audit-main {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.imbel-timeline {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 8px 0;
}
.imbel-day { }
.imbel-day-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px 6px;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
  border-bottom: 1px solid #f1f5f9;
}
.imbel-day-date { display: flex; align-items: baseline; gap: 4px; }
.imbel-day-d {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 24px;
  font-weight: 700;
  color: #0f1e31;
  line-height: 1;
}
.imbel-day-m {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.imbel-day-y { font-size: 9px; color: #94a3b8; }
.imbel-day-meta {
  font-size: 12px;
  color: #374151;
}
.imbel-day-cnt {
  margin-left: 6px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 1px 6px;
  color: #64748b;
}
.imbel-entries { padding: 4px 0; }
.imbel-entry {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 0;
  padding: 8px 16px;
  border-bottom: 1px solid #f8fafc;
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: background 0.1s;
}
.imbel-entry:hover { background: #f8fafc; }
.imbel-entry.active { background: #f0f4f9; }
.imbel-entry-time {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: #94a3b8;
  padding-top: 2px;
  white-space: nowrap;
}
.imbel-entry-row1 { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.imbel-entry-tipo {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 2px;
}
.imbel-entry-user { font-size: 10px; color: #64748b; }
.imbel-entry-target { font-size: 12px; font-weight: 600; color: #0f1e31; }
.imbel-entry-diff {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: #94a3b8;
  margin-top: 2px;
}
.imbel-entry-diff .before { color: #64748b; }
.imbel-entry-diff .after  { color: #0f1e31; font-weight: 600; }
.imbel-entry-diff .impact { font-size: 10px; font-weight: 700; border-radius: 2px; padding: 0 4px; }
.imbel-entry-diff .impact.pos { color: #16a34a; background: #dcfce7; }
.imbel-entry-diff .impact.neg { color: #dc2626; background: #fee2e2; }

.imbel-detail {
  width: 300px;
  flex-shrink: 0;
  border-left: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.imbel-detail-head {
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}
.imbel-detail-target {
  font-size: 13px;
  font-weight: 700;
  color: #0f1e31;
  margin: 6px 0 4px;
}
.imbel-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 10px;
  color: #64748b;
  font-family: 'IBM Plex Mono', monospace;
}
.imbel-detail-meta span { display: inline-flex; align-items: center; gap: 3px; }
.imbel-detail-body { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 14px; }
.imbel-detail-section-ttl {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 8px;
}
.imbel-change-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}
.imbel-rcc-row { display: flex; padding: 10px 12px; }
.imbel-rcc-l { font-size: 10px; font-weight: 600; text-transform: uppercase; color: #94a3b8; width: 48px; flex-shrink: 0; }
.imbel-rcc-v { font-family: 'IBM Plex Mono', monospace; font-size: 13px; font-weight: 700; }
.imbel-rcc-v.before { color: #dc2626; text-decoration: line-through; opacity: 0.7; }
.imbel-rcc-v.after  { color: #16a34a; }
.imbel-rcc-arrow { display: flex; justify-content: center; color: #94a3b8; padding: 4px 0; border-top: 1px dashed #e2e8f0; border-bottom: 1px dashed #e2e8f0; }
.imbel-rcc-impact {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}
.imbel-tech {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
}
.imbel-tech > div { display: flex; gap: 8px; }
.imbel-tech .l { color: #94a3b8; font-weight: 600; min-width: 60px; }
.imbel-tech .v { font-family: 'IBM Plex Mono', monospace; color: #374151; }

/* Histórico de períodos */
.imbel-periodo-row {
  display: grid;
  grid-template-columns: 8px 1fr 240px;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  align-items: center;
}
.imbel-periodo-row:hover { background: #f0f4f9; }
.imbel-phr-mark { width: 8px; min-height: 36px; border-radius: 2px; }
.imbel-phr-id {
  font-family: var(--tv-font-display, inherit);
  font-size: 15px;
  font-weight: 700;
  color: #0f1e31;
  letter-spacing: -0.3px;
}
.imbel-phr-active {
  background: #e5a128;
  color: #050e1a;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.6px;
  padding: 1px 6px;
  border-radius: 2px;
}
.imbel-phr-meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: #94a3b8;
  margin-top: 4px;
}
.imbel-phr-params {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.imbel-phr-params > div {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 2px;
  padding: 4px 8px;
  text-align: center;
}
.imbel-phr-params .l { display: block; font-size: 9px; font-weight: 600; letter-spacing: 0.4px; text-transform: uppercase; color: #94a3b8; }
.imbel-phr-params .v { display: block; font-family: 'IBM Plex Mono', monospace; font-size: 12px; font-weight: 700; color: #0f1e31; margin-top: 2px; }
