/* Admin Clovis Atacado: visual recriado no estilo Polaris (painel da Shopify), sem assets da Shopify. */
:root {
  --fundo: #f1f1f1;
  --superficie: #ffffff;
  --superficie-2: #f7f7f7;
  --superficie-3: #f1f1f1;
  --superficie-hover: #f7f7f7;
  --superficie-ativa: #f3f3f3;
  --borda: #e3e3e3;
  --borda-2: #ebebeb;
  --borda-campo: #8a8a8a;
  --texto: #303030;
  --texto-2: #616161;
  --texto-3: #8a8a8a;
  --texto-desab: #b5b5b5;
  --link: #005bd3;
  --foco: #005bd3;
  --topo: #1a1a1a;
  --lateral: #ebebeb;
  --lateral-ativo: #fafafa;
  --critico: #c70a24;
  --critico-forte: #e51c00;
  --sucesso: #29845a;
  --aviso: #b28400;
  --raio: 12px;
  --raio-p: 8px;
  --sombra-cartao: 0 1px 0 0 rgba(26, 26, 26, .07), 0 0 0 1px rgba(0, 0, 0, .06);
  --sombra-modal: 0 20px 20px -8px rgba(26, 26, 26, .28), 0 0 0 1px rgba(0, 0, 0, .08);
  --fonte: Inter, -apple-system, BlinkMacSystemFont, "San Francisco", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--fundo); color: var(--texto); font: 450 13px/20px var(--fonte); -webkit-font-smoothing: antialiased; letter-spacing: -.003em; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; }
p { margin: 0 0 8px; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
img { max-width: 100%; }
.sutil { color: var(--texto-2); }
.fraco { color: var(--texto-3); }
.direita { text-align: right; }
.negrito { font-weight: 650; }
.nowrap { white-space: nowrap; }
.ic { flex: none; display: block; }
kbd { font: 550 11px var(--fonte); }
[hidden] { display: none !important; }

/* ---------- barra superior */
.topo { position: fixed; inset: 0 0 auto 0; height: 56px; background: var(--topo); z-index: 50; color: #e3e3e3; }
.topo-normal, .topo-salvar { position: absolute; inset: 0; display: flex; align-items: center; padding: 0 12px 0 16px; gap: 12px; transition: opacity .15s; }
.topo-salvar { justify-content: space-between; opacity: 0; pointer-events: none; padding: 0 16px; }
.tem-alteracoes .topo-normal { opacity: 0; visibility: hidden; pointer-events: none; transition: none; }
.tem-alteracoes .topo-salvar { opacity: 1; pointer-events: auto; }
.bs-esq { display: flex; gap: 8px; align-items: center; color: #fff; font-weight: 650; font-size: 14px; margin-left: calc(240px - 16px); }
.bs-dir { display: flex; gap: 8px; }
.topo-marca { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none !important; width: 216px; min-width: 0; }
.marca-simbolo { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, #c9a46a, #8c6a35); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; letter-spacing: .02em; flex: none; }
.marca-nome { font-weight: 650; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topo-busca { flex: 1; display: flex; justify-content: center; position: relative; }
.busca-caixa { width: min(480px, 100%); height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 8px 0 12px; border-radius: 10px; background: #303030; border: 1px solid #4a4a4a; color: #b5b5b5; transition: background .1s; }
.busca-caixa:hover { background: #3a3a3a; }
.busca-caixa:focus-within { background: #fff; color: var(--texto-2); border-color: #fff; box-shadow: 0 0 0 2px var(--foco); }
.busca-caixa input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: #e3e3e3; height: 100%; }
.busca-caixa:focus-within input { color: var(--texto); }
.busca-caixa input::placeholder { color: #b5b5b5; }
.busca-caixa input::-webkit-search-cancel-button { display: none; }
.busca-caixa kbd { background: #4a4a4a; color: #cfcfcf; border-radius: 6px; padding: 1px 6px; }
.busca-caixa:focus-within kbd { display: none; }
.busca-resultados { position: absolute; top: 42px; width: min(560px, 100%); background: #fff; color: var(--texto); border-radius: var(--raio); box-shadow: var(--sombra-modal); padding: 6px; max-height: 70vh; overflow: auto; }
.br-titulo { font-size: 12px; font-weight: 650; color: var(--texto-2); padding: 8px 10px 4px; }
.br-item { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 8px; color: var(--texto); text-decoration: none !important; }
.br-item img { width: 24px; height: 24px; object-fit: cover; border-radius: 4px; }
.br-item span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.br-item:hover, .br-item.foco { background: var(--superficie-hover); }
.br-vazio { padding: 16px; color: var(--texto-2); text-align: center; }
.topo-dir { position: relative; }
.topo-conta { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px 0 4px; border-radius: 10px; border: 0; background: none; color: #e3e3e3; cursor: pointer; font-weight: 550; }
.topo-conta:hover { background: #303030; }
.avatar { width: 28px; height: 28px; border-radius: 8px; background: #36fba1; color: #0c5132; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.menu-conta { position: absolute; right: 0; top: 44px; width: 260px; background: #fff; color: var(--texto); border-radius: var(--raio); box-shadow: var(--sombra-modal); padding: 6px; }
.menu-conta a, .menu-conta button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 10px; border: 0; background: none; border-radius: 8px; color: var(--texto); cursor: pointer; text-align: left; text-decoration: none !important; }
.menu-conta a:hover, .menu-conta button:hover { background: var(--superficie-hover); }
.mc-topo { padding: 8px 10px 10px; border-bottom: 1px solid var(--borda-2); margin-bottom: 6px; display: grid; }
.mc-topo span { color: var(--texto-2); font-size: 12px; }
.topo-menu { display: none; color: #e3e3e3; }

/* ---------- barra lateral */
.corpo { display: flex; padding-top: 56px; min-height: 100vh; }
.lateral { position: fixed; top: 56px; bottom: 0; left: 0; width: 240px; background: var(--lateral); display: flex; flex-direction: column; padding: 12px 8px; overflow-y: auto; z-index: 30; }
.lateral-lista { flex: 1; }
.lateral-fim { padding-top: 8px; }
.nav-item { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px 0 10px; margin-bottom: 1px; border-radius: 8px; color: var(--texto); font-weight: 550; text-decoration: none !important; position: relative; }
.nav-item .ic { color: #4a4a4a; }
.nav-item:hover { background: #f1f1f1; }
.nav-item.ativo { background: var(--lateral-ativo); font-weight: 650; box-shadow: 0 1px 0 rgba(0, 0, 0, .05); }
.nav-item.ativo .ic, .nav-item.pai-ativo .ic { color: var(--texto); }
.nav-item.pai-ativo { font-weight: 650; }
.nav-sub { display: none; padding: 1px 0 4px; }
.nav-grupo.aberto .nav-sub { display: block; }
.nav-subitem { padding-left: 38px; height: 28px; font-weight: 450; color: var(--texto-2); }
.nav-subitem.ativo { color: var(--texto); }
.nav-subitem.ativo::before { content: ''; position: absolute; left: 19px; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: var(--texto); display: none; }
.nav-contador { margin-left: auto; background: #e3e3e3; border-radius: 8px; font-size: 12px; padding: 0 7px; line-height: 20px; font-weight: 550; }
.nav-item.ativo .nav-contador { background: #ebebeb; }
.nav-olho { margin-left: auto; opacity: 0; color: #4a4a4a; padding: 2px; border-radius: 6px; }
.nav-item:hover .nav-olho { opacity: 1; }
.nav-olho:hover { background: #e3e3e3; }
.nav-secao { font-size: 12px; font-weight: 650; color: var(--texto-2); padding: 16px 10px 4px; }
.lateral-fundo { display: none; }

/* ---------- área principal */
.principal { flex: 1; margin-left: 240px; min-width: 0; outline: none; }
.pagina { max-width: 998px; margin: 0 auto; padding: 24px 24px 64px; }
.pagina.estreita { max-width: 750px; }
.pagina.larga { max-width: 1200px; }
.pagina.cheia { max-width: none; }
.pagina-topo { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 16px; min-height: 32px; }
.pagina-topo .voltar { margin-top: 2px; }
.pagina-titulo { flex: 1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; padding-top: 3px; }
.pagina-titulo h1 { font-size: 20px; line-height: 24px; font-weight: 700; letter-spacing: -.02em; }
.pagina-sub { flex-basis: 100%; color: var(--texto-2); font-size: 13px; }
.pagina-acoes { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.layout > div { display: grid; gap: 16px; min-width: 0; }
.pilha { display: grid; gap: 16px; }
.rodape-pagina { display: flex; justify-content: space-between; gap: 8px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--borda); }
.rodape-pagina > div { display: flex; gap: 8px; }
.saiba { text-align: center; color: var(--texto-2); margin-top: 24px; }

/* ---------- cartões */
.cartao { background: var(--superficie); border-radius: var(--raio); box-shadow: var(--sombra-cartao); padding: 16px; min-width: 0; }
.cartao-topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; min-height: 20px; }
.cartao-topo h2, .cartao h2 { font-size: 14px; line-height: 20px; font-weight: 650; }
.cartao h3 { font-size: 13px; font-weight: 650; }
.cartao-secao { border-top: 1px solid var(--borda-2); margin: 16px -16px 0; padding: 16px 16px 0; }
.cartao-rodape { border-top: 1px solid var(--borda-2); margin: 16px -16px -16px; padding: 12px 16px; background: var(--superficie-2); border-radius: 0 0 var(--raio) var(--raio); display: flex; justify-content: flex-end; gap: 8px; }
.cartao-tabela { padding: 0; overflow: hidden; }
.cartao-cinza { background: var(--superficie-2); }
.grade-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grade-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grade-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.linha { display: flex; gap: 8px; align-items: center; }
.linha-entre { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.empilha > * + * { margin-top: 12px; }
.divisor { border: 0; border-top: 1px solid var(--borda-2); margin: 12px 0; }
.lista-def { display: grid; gap: 4px; }
.lista-def dt { color: var(--texto-2); }

/* ---------- botões (bisel do Polaris) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 28px; padding: 0 12px; border-radius: 8px; border: 0; background: #fff; color: var(--texto); font-weight: 550; cursor: pointer; white-space: nowrap; text-decoration: none !important; position: relative;
  box-shadow: inset 0 -1px 0 0 #b5b5b5, inset 0 0 0 1px rgba(0, 0, 0, .1), inset 0 .5px 0 1.5px #fff; }
.btn:hover { background: #fafafa; }
.btn:active { background: #f7f7f7; box-shadow: inset 0 2px 1px 0 rgba(26, 26, 26, .2); }
.btn:focus-visible, .btn-icone:focus-visible, .aba:focus-visible { outline: 2px solid var(--foco); outline-offset: 1px; }
.btn:disabled { color: var(--texto-desab); cursor: default; box-shadow: none; background: #f1f1f1; }
.btn-primario { background: #303030; color: #fff; box-shadow: inset 0 -1px 0 1px rgba(0, 0, 0, .8), inset 0 0 0 1px #303030, inset 0 .5px 0 1.5px rgba(255, 255, 255, .25); background-image: linear-gradient(180deg, rgba(48, 48, 48, 0) 63.53%, rgba(255, 255, 255, .15) 100%); }
.btn-primario:hover { background-color: #1a1a1a; }
.btn-primario:active { background: #1a1a1a; box-shadow: inset 0 3px 0 0 #000; }
.btn-primario:disabled { background: #b5b5b5; color: #fff; }
.btn-critico { background: var(--critico-forte); color: #fff; box-shadow: inset 0 -1px 0 1px #8e1f0b, inset 0 0 0 1px #c70a24, inset 0 .5px 0 1.5px rgba(255, 255, 255, .35); }
.btn-critico:hover { background: #c70a24; }
.btn-critico-txt { color: var(--critico); }
.btn-escuro { background: #303030; color: #e3e3e3; box-shadow: inset 0 0 0 1px #4a4a4a; }
.btn-escuro:hover { background: #3a3a3a; }
.btn-branco { background: #fff; color: #303030; box-shadow: none; }
.btn-branco:hover { background: #f1f1f1; }
.btn-plano { background: none; box-shadow: none; }
.btn-plano:hover { background: rgba(0, 0, 0, .05); }
.btn-peq { height: 24px; padding: 0 8px; font-size: 12px; }
.btn-grande { height: 36px; padding: 0 16px; font-size: 14px; }
.btn-link { border: 0; background: none; color: var(--link); cursor: pointer; padding: 0; font-weight: 450; }
.btn-link:hover { text-decoration: underline; }
.btn-link.critico { color: var(--critico); }
.btn-icone { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; border: 0; background: none; cursor: pointer; color: var(--texto-2); text-decoration: none !important; flex: none; }
.btn-icone:hover { background: rgba(0, 0, 0, .06); color: var(--texto); }
.btn-icone:disabled { opacity: .35; cursor: default; background: none; }
.voltar { color: var(--texto); }
.carregando { color: transparent !important; }
.carregando::after { content: ''; position: absolute; width: 14px; height: 14px; border: 2px solid currentColor; border-color: #8a8a8a transparent #8a8a8a #8a8a8a; border-radius: 50%; animation: gira .7s linear infinite; }
.btn-primario.carregando::after, .btn-critico.carregando::after { border-color: #fff transparent #fff #fff; }
@keyframes gira { to { transform: rotate(360deg); } }
.grupo-btn { display: inline-flex; }
.grupo-btn .btn:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.grupo-btn .btn:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; }
.menu-acoes { position: relative; display: inline-block; }
.menu-acoes-lista { position: absolute; right: 0; top: 32px; min-width: 200px; background: #fff; border-radius: var(--raio); box-shadow: var(--sombra-modal); padding: 6px; z-index: 20; }
.menu-acoes-lista button, .menu-acoes-lista a { display: flex; gap: 8px; align-items: center; width: 100%; text-align: left; border: 0; background: none; padding: 6px 10px; border-radius: 8px; cursor: pointer; color: var(--texto); text-decoration: none !important; }
.menu-acoes-lista button:hover, .menu-acoes-lista a:hover { background: var(--superficie-hover); }
.menu-acoes-lista .critico { color: var(--critico); }

/* ---------- selos */
.selo { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: 8px; font-size: 12px; font-weight: 550; white-space: nowrap; background: rgba(0, 0, 0, .06); color: #616161; }
.selo-neutro { background: #e3e3e3; color: #303030; }
.selo-sucesso { background: #affebf; color: #014b40; }
.selo-info { background: #e0f0ff; color: #00527c; }
.selo-atencao { background: #ffef9d; color: #4f4700; }
.selo-aviso { background: #ffd6a4; color: #5e4200; }
.selo-critico { background: #fedad9; color: #8e0b21; }
.selo-ponto { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid currentColor; flex: none; }
.selo-ponto.p-cheio { background: currentColor; }
.selo-ponto.p-meio { background: linear-gradient(90deg, currentColor 50%, transparent 50%); }

/* ---------- campos */
.campo { display: grid; gap: 4px; min-width: 0; }
.campo + .campo, .campo + .grade-2, .grade-2 + .campo, .grade-2 + .grade-2, .grade-3 + .campo, .campo + .grade-3 { margin-top: 12px; }
.grade-2 > .campo, .grade-3 > .campo, .grade-4 > .campo { margin-top: 0 !important; }
.linha + .campo, .cor + .campo, .campo + .linha { margin-top: 12px; }
.cartao > .campo + .campo { margin-top: 12px; }
.rotulo { font-weight: 450; color: var(--texto); }
.ajuda { color: var(--texto-2); font-size: 12px; line-height: 16px; }
.entrada { display: flex; align-items: center; min-height: 32px; background: #fdfdfd; border: 1px solid var(--borda-campo); border-top-color: #898f94; border-radius: 8px; overflow: hidden; }
.entrada:hover { border-color: #616161; background: #fafafa; }
.entrada:focus-within { outline: 2px solid var(--foco); outline-offset: 1px; border-color: #616161; }
.entrada input, .entrada textarea, .entrada select { flex: 1; min-width: 0; border: 0; background: none; outline: none; padding: 5px 12px; height: 30px; }
.entrada textarea { height: auto; min-height: 80px; resize: vertical; line-height: 20px; }
.entrada .prefixo, .entrada .sufixo { color: var(--texto-2); padding: 0 0 0 12px; white-space: nowrap; }
.entrada .sufixo { padding: 0 12px 0 0; }
.com-prefixo input { padding-left: 6px; }
.entrada-erro .entrada { border-color: var(--critico); background: #fff4f4; }
.erro-campo { color: var(--critico); font-size: 12px; }
select.sel, .sel { height: 32px; border: 1px solid var(--borda-campo); border-radius: 8px; background: #fdfdfd url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none' stroke='%23616161' stroke-width='1.5'%3E%3Cpath d='m7 8 3-3 3 3M7 12l3 3 3-3'/%3E%3C/svg%3E") no-repeat right 6px center; padding: 0 30px 0 12px; appearance: none; width: 100%; cursor: pointer; }
.sel:focus { outline: 2px solid var(--foco); outline-offset: 1px; }
.entrada-mini { height: 28px; border: 1px solid var(--borda-campo); border-radius: 8px; padding: 0 8px; background: #fdfdfd; width: 100%; min-width: 0; }
.entrada-mini:focus { outline: 2px solid var(--foco); outline-offset: 0; }
.entrada-mini.alterado { background: #fff8db; }
.caixa { display: inline-flex; align-items: center; cursor: pointer; position: relative; vertical-align: middle; }
.caixa input { position: absolute; opacity: 0; width: 18px; height: 18px; margin: 0; cursor: pointer; }
.caixa input + span { width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--borda-campo); background: #fdfdfd; display: grid; place-items: center; flex: none; }
.caixa input:checked + span { background: #303030; border-color: #303030; }
.caixa input:checked + span::after { content: ''; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.caixa input:indeterminate + span { background: #303030; border-color: #303030; }
.caixa input:focus-visible + span { outline: 2px solid var(--foco); outline-offset: 1px; }
.caixa-rotulo { gap: 8px; }
.caixa-rotulo + .caixa-rotulo { margin-top: 8px; }
.empilha-caixas { display: grid; gap: 8px; }
.radio { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.radio input { accent-color: #303030; margin: 3px 0 0; width: 16px; height: 16px; }
.radio + .radio { margin-top: 8px; }
.interruptor { appearance: none; width: 32px; height: 20px; border-radius: 10px; background: #b5b5b5; position: relative; cursor: pointer; transition: background .15s; flex: none; margin: 0; }
.interruptor::after { content: ''; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; }
.interruptor:checked { background: #303030; }
.interruptor:checked::after { transform: translateX(12px); }
.cor { display: flex; align-items: center; gap: 8px; }
.cor input[type=color] { width: 32px; height: 32px; border: 1px solid var(--borda-campo); border-radius: 8px; padding: 2px; background: #fff; cursor: pointer; }

/* ---------- tabela de índice */
.it-topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px; border-bottom: 1px solid var(--borda-2); }
.it-abas { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.aba { height: 28px; padding: 0 10px; border-radius: 8px; border: 0; background: none; font-weight: 550; color: var(--texto-2); cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.aba:hover { background: var(--superficie-hover); color: var(--texto); }
.aba-ativa { background: #e3e3e3; color: var(--texto); }
.aba-ativa:hover { background: #e3e3e3; }
.aba-n { font-size: 11px; color: var(--texto-2); font-weight: 550; }
.it-ferr { display: flex; gap: 6px; align-items: center; }
.campo-busca { display: flex; align-items: center; gap: 6px; height: 28px; border: 1px solid var(--borda-campo); border-radius: 8px; padding: 0 8px; color: var(--texto-2); width: 240px; background: #fdfdfd; }
.campo-busca:focus-within { outline: 2px solid var(--foco); outline-offset: 0; }
.campo-busca input { border: 0; outline: none; flex: 1; min-width: 0; background: none; }
.it-ordem { height: 28px; border: 0; border-radius: 8px; background: none; padding: 0 6px; cursor: pointer; color: var(--texto-2); font-weight: 550; }
.it-ordem:hover { background: var(--superficie-hover); }
.it-filtros { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 8px; border-bottom: 1px solid var(--borda-2); }
.filtro select { height: 24px; border: 1px dashed #b5b5b5; border-radius: 8px; padding: 0 24px 0 10px; font-size: 12px; font-weight: 550; color: var(--texto-2); cursor: pointer; appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20' fill='none' stroke='%23616161' stroke-width='1.6'%3E%3Cpath d='m6 8 4 4 4-4'/%3E%3C/svg%3E") no-repeat right 5px center; }
.filtro select:hover { background-color: #f7f7f7; }
.filtro-ativo select { border-style: solid; border-color: #c4c4c4; background: #f1f1f1; color: var(--texto); }
.it-lote { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--borda-2); background: var(--superficie-2); min-height: 45px; }
.it-qtd-sel { font-weight: 650; }
.it-lote-acoes { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.tabela-rolagem { overflow-x: auto; }
.tabela { width: 100%; border-collapse: collapse; }
.tabela th { background: var(--superficie-2); text-align: left; font-size: 12px; font-weight: 550; color: var(--texto-2); padding: 6px 12px; white-space: nowrap; border-bottom: 1px solid var(--borda-2); }
.tabela td { padding: 6px 12px; border-top: 1px solid var(--borda-2); vertical-align: middle; height: 40px; }
.tabela tbody tr:first-child td { border-top: 0; }
.tabela tbody tr[data-href] { cursor: pointer; }
.tabela tbody tr:hover td { background: var(--superficie-hover); }
.tabela tbody tr.sel td { background: #f1f1f1; }
.tabela .col-sel { width: 36px; padding-right: 0; }
.tabela .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tabela .forte { font-weight: 650; }
.tabela .celula-produto { display: flex; align-items: center; gap: 12px; font-weight: 650; min-width: 220px; }
.tabela-simples td { height: auto; padding: 8px 12px; }
.paginacao { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px; border-top: 1px solid var(--borda-2); color: var(--texto-2); background: var(--superficie-2); }
.opaco { opacity: .5; pointer-events: none; }
.it-corpo { min-height: 80px; }
.mini { display: inline-grid; place-items: center; border-radius: 8px; border: 1px solid var(--borda); overflow: hidden; background: #fff; flex: none; }
.mini img { width: 100%; height: 100%; object-fit: cover; }
.mini-vazia { background: var(--superficie-2); color: var(--texto-3); }
.estoque-zero { color: var(--critico); }

/* ---------- vazio e carregamento */
.vazio { text-align: center; padding: 48px 24px; color: var(--texto-2); display: grid; justify-items: center; gap: 8px; }
.vazio .ic { color: #b5b5b5; }
.vazio h3 { font-size: 16px; color: var(--texto); font-weight: 650; }
.carregando-bloco { height: 120px; border-radius: var(--raio); background: linear-gradient(90deg, #ebebeb 25%, #f5f5f5 50%, #ebebeb 75%); background-size: 200% 100%; animation: brilho 1.2s infinite; margin: 16px; }
.carregando-bloco.grande { height: 300px; margin: 0; }
@keyframes brilho { to { background-position: -200% 0; } }
.esqueleto .esq-titulo, .esqueleto .esq-linha { background: linear-gradient(90deg, #e3e3e3 25%, #ededed 50%, #e3e3e3 75%); background-size: 200% 100%; animation: brilho 1.2s infinite; border-radius: 6px; }
.esqueleto .esq-titulo { width: 180px; height: 24px; margin: 4px 0 20px; }
.esqueleto .esq-linha { height: 12px; margin: 10px 0; }
.esqueleto .cartao .esq-linha:first-child { height: 16px; margin-top: 0; }

/* ---------- faixas (banners do Polaris) */
.faixa { display: flex; gap: 10px; padding: 12px; border-radius: var(--raio-p); background: var(--superficie-2); }
.faixa p { margin: 2px 0 0; }
.faixa-info { background: #eaf4ff; } .faixa-info .ic { color: #00527c; }
.faixa-aviso { background: #fff1e3; } .faixa-aviso .ic { color: #b25b00; }
.faixa-critica { background: #fee9e8; } .faixa-critica .ic { color: var(--critico); }
.faixa-sucesso { background: #ebf9f0; } .faixa-sucesso .ic { color: var(--sucesso); }

/* ---------- avisos e modais */
#avisos { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 200; justify-items: center; }
.aviso { display: flex; align-items: center; gap: 12px; background: #1a1a1a; color: #fff; padding: 10px 10px 10px 16px; border-radius: 10px; box-shadow: var(--sombra-modal); font-weight: 550; animation: sobe .2s ease-out; max-width: 90vw; }
.aviso button { border: 0; background: none; color: #b5b5b5; cursor: pointer; display: grid; padding: 2px; border-radius: 6px; }
.aviso button:hover { background: #303030; color: #fff; }
.aviso-erro { background: #8e0b21; }
@keyframes sobe { from { transform: translateY(12px); opacity: 0; } }
.modal-fundo { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 100; display: grid; place-items: center; padding: 16px; animation: aparece .15s; }
@keyframes aparece { from { opacity: 0; } }
.modal { background: #fff; border-radius: 16px; box-shadow: var(--sombra-modal); width: min(620px, 100%); max-height: calc(100vh - 64px); display: flex; flex-direction: column; overflow: hidden; }
.modal-largo { width: min(980px, 100%); }
.modal-topo { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 12px 16px; background: var(--superficie-3); border-bottom: 1px solid var(--borda); }
.modal-topo h2 { font-size: 14px; font-weight: 650; }
.modal-corpo { padding: 16px; overflow: auto; }
.modal-rodape { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--borda); }

/* ---------- editor rico */
.editor { border: 1px solid var(--borda-campo); border-radius: 8px; overflow: hidden; background: #fdfdfd; }
.editor:focus-within { outline: 2px solid var(--foco); outline-offset: 1px; }
.editor-barra { display: flex; gap: 2px; align-items: center; padding: 4px 6px; border-bottom: 1px solid var(--borda); background: var(--superficie-2); flex-wrap: wrap; }
.editor-barra button, .editor-barra select { height: 28px; min-width: 28px; border: 0; background: none; border-radius: 6px; cursor: pointer; display: inline-grid; place-items: center; color: var(--texto); padding: 0 6px; }
.editor-barra select { padding: 0 6px; font-weight: 550; }
.editor-barra button:hover, .editor-barra select:hover, .editor-barra button.ativo { background: #e3e3e3; }
.editor-sep { width: 1px; height: 20px; background: var(--borda); margin: 0 4px; }
.editor-esp { flex: 1; }
.editor-area { min-height: 200px; padding: 12px; outline: none; overflow: auto; max-height: 520px; }
.editor-area img { max-width: 100%; }
.editor-area p { margin: 0 0 10px; }
.editor-html { width: 100%; min-height: 200px; border: 0; outline: none; padding: 12px; font: 12px/18px Consolas, monospace; resize: vertical; background: #fdfdfd; }

/* ---------- mídia */
.midia { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.midia.tem-capa .midia-item:first-child { grid-column: span 2; grid-row: span 2; }
.midia-item { position: relative; aspect-ratio: 1; border: 1px solid var(--borda); border-radius: 8px; overflow: hidden; background: #fff; cursor: grab; touch-action: none; }
.midia-item img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.midia-item.arrastando { opacity: .4; }
.midia-item .caixa { position: absolute; top: 6px; left: 6px; opacity: 0; }
.midia-item:hover .caixa, .midia-item .caixa:has(input:checked) { opacity: 1; }
.midia-item .alt-btn { position: absolute; bottom: 6px; right: 6px; height: 22px; padding: 0 6px; border-radius: 6px; border: 0; background: rgba(255, 255, 255, .95); font-size: 11px; font-weight: 650; cursor: pointer; opacity: 0; box-shadow: 0 0 0 1px rgba(0, 0, 0, .1); }
.midia-item:hover .alt-btn { opacity: 1; }
.midia-item .alt-btn.tem-alt { color: var(--sucesso); }
.midia-item .enviando { position: absolute; inset: 0; background: rgba(255, 255, 255, .7); display: grid; place-items: center; }
.soltar { border: 1px dashed #8a8a8a; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 24px 12px; cursor: pointer; color: var(--texto-2); text-align: center; background: #fff; }
.soltar:hover, .soltar.sobre { background: var(--superficie-2); border-color: #616161; }
.midia .soltar { aspect-ratio: 1; padding: 8px; }
.soltar b { color: var(--texto); }
.soltar .btn { pointer-events: none; }
.biblioteca .soltar { margin-bottom: 12px; }
.bib-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.bib-item { border: 1px solid var(--borda); border-radius: 8px; padding: 0; background: #fff; cursor: pointer; overflow: hidden; text-align: left; }
.bib-item img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.bib-item span { display: block; padding: 4px 6px; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--texto-2); }
.bib-item.sel { outline: 2px solid var(--foco); outline-offset: 1px; }

/* ---------- linhas ordenáveis */
.alca { cursor: grab; color: var(--texto-3); display: grid; place-items: center; touch-action: none; }
.alca:hover { color: var(--texto); }
.arrastando { opacity: .5; background: var(--superficie-2) !important; }
.lista-ordem { display: grid; }
.lista-ordem > [data-ordem] { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-top: 1px solid var(--borda-2); background: #fff; }
.lista-ordem > [data-ordem]:first-child { border-top: 0; }
.lista-ordem .nome { flex: 1; min-width: 0; }

/* ---------- variantes */
.opcao-bloco { border: 1px solid var(--borda); border-radius: 8px; padding: 12px; background: #fff; }
.opcao-bloco + .opcao-bloco { margin-top: 8px; }
.opcao-resumo { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.opcao-resumo .valores { display: flex; gap: 4px; flex-wrap: wrap; }
.valor-op { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.grade-var th, .grade-var td { padding: 6px 8px; }
.grade-var td { height: 48px; }
.grade-var .entrada-mini { width: 78px; min-width: 0; }
.grade-var [data-vc=sku] { width: 116px; }
.grade-var tr.grupo td { background: var(--superficie-2); font-weight: 650; }
.var-nome { font-weight: 550; min-width: 120px; }

/* ---------- prévia do Google */
.google { font-family: Arial, sans-serif; max-width: 600px; }
.google-loja { display: flex; align-items: center; gap: 6px; font-size: 14px; color: #202124; }
.google-url { color: #4d5156; font-size: 12px; line-height: 18px; word-break: break-all; }
.google-titulo { color: #1a0dab; font-size: 18px; line-height: 24px; margin: 2px 0; }
.google-desc { color: #4d5156; font-size: 13px; line-height: 20px; }

/* ---------- linha do tempo */
.tempo { position: relative; padding-left: 28px; }
.tempo::before { content: ''; position: absolute; left: 9px; top: 0; bottom: 0; width: 2px; background: #e3e3e3; }
.tempo-dia { font-size: 12px; font-weight: 650; color: var(--texto-2); margin: 16px 0 8px -28px; padding-left: 28px; background: var(--fundo); position: relative; }
.tempo-item { position: relative; display: flex; gap: 12px; justify-content: space-between; padding: 6px 0; }
.tempo-item::before { content: ''; position: absolute; left: -24px; top: 11px; width: 10px; height: 10px; border-radius: 50%; background: #b5b5b5; border: 2px solid var(--fundo); }
.tempo-item.comentario::before { background: #303030; }
.tempo-item .quando { color: var(--texto-2); font-size: 12px; white-space: nowrap; }
.tempo-item .quem { font-weight: 650; }
.comentar { background: #fff; border-radius: var(--raio); box-shadow: var(--sombra-cartao); overflow: hidden; margin-left: -28px; position: relative; }
.comentar-linha { display: flex; gap: 12px; padding: 12px; align-items: flex-start; }
.comentar textarea { flex: 1; border: 0; outline: none; resize: none; min-height: 24px; padding: 4px 0; background: none; }
.comentar-rodape { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background: var(--superficie-2); border-top: 1px solid var(--borda-2); color: var(--texto-2); font-size: 12px; }

/* ---------- pedido */
.itens-pedido { display: grid; }
.item-pedido { display: grid; grid-template-columns: 40px 1fr auto auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--borda-2); }
.item-pedido:first-child { border-top: 0; padding-top: 0; }
.item-pedido .titulo { font-weight: 550; }
.resumo-valores { display: grid; grid-template-columns: 1fr auto auto; gap: 6px 16px; }
.resumo-valores .total { font-weight: 650; }
.resumo-valores > :nth-child(3n) { text-align: right; font-variant-numeric: tabular-nums; }
.secao-cliente + .secao-cliente { border-top: 1px solid var(--borda-2); margin-top: 12px; padding-top: 12px; }
.secao-cliente h3 { margin-bottom: 4px; }
.cartao-status { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }

/* ---------- início */
.metricas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; padding: 0; overflow: hidden; }
.metrica { padding: 12px 16px; border-left: 1px solid var(--borda-2); }
.metrica:first-child { border-left: 0; }
.metrica .rot { color: var(--texto-2); font-weight: 550; border-bottom: 1px dashed #c4c4c4; display: inline-block; }
.metrica .val { font-size: 20px; font-weight: 700; line-height: 28px; margin-top: 2px; letter-spacing: -.02em; }
.metrica .var { font-size: 12px; font-weight: 550; }
.var-sobe { color: var(--sucesso); } .var-desce { color: var(--critico); }
.grafico { width: 100%; height: 220px; display: block; }
.grafico .eixo { stroke: #ebebeb; }
.grafico text { fill: #8a8a8a; font-size: 11px; }
.grafico .linha-v { fill: none; stroke: #0094d5; stroke-width: 2; }
.grafico .area-v { fill: url(#grad); }
.grafico .barra { fill: #0094d5; }
.grafico .barra:hover { fill: #005bd3; }
.tarefa { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; color: var(--texto); text-decoration: none !important; }
.tarefa:hover { background: var(--superficie-hover); }
.tarefa .ic { color: var(--texto-2); }
.tarefa .seta { margin-left: auto; }
.top-produto { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.top-produto .nome { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- menus em árvore */
.arvore { display: grid; gap: 0; }
.arvore ul { list-style: none; margin: 0; padding: 0; }
.arvore ul ul { padding-left: 28px; }
.no { border: 1px solid var(--borda); border-radius: 8px; background: #fff; margin-top: 6px; }
.no-linha { display: flex; align-items: center; gap: 8px; padding: 6px 8px; }
.no-linha .nome { flex: 1; min-width: 0; }
.no-linha .url { color: var(--texto-2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.no.arrastando { opacity: .4; }
.no.alvo-dentro > .no-linha { background: #eaf4ff; }
.marca-soltar { height: 3px; background: var(--foco); border-radius: 2px; margin: 2px 0; }

/* ---------- configurações */
.config-lista { display: grid; grid-template-columns: 240px 1fr; gap: 16px; align-items: start; }
.config-nav { background: #fff; border-radius: var(--raio); box-shadow: var(--sombra-cartao); padding: 6px; position: sticky; top: 72px; }
.config-nav a { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 8px; color: var(--texto); font-weight: 550; text-decoration: none !important; }
.config-nav a .ic { color: var(--texto-2); }
.config-nav a:hover { background: var(--superficie-hover); }
.config-nav a.ativo { background: #f1f1f1; font-weight: 650; }
.config-nav a.ativo .ic { color: var(--texto); }
.secao-config { display: grid; grid-template-columns: 1fr; gap: 16px; }

/* ---------- loja virtual */
.previa-loja { border-radius: var(--raio); overflow: hidden; box-shadow: var(--sombra-cartao); background: #fff; }
.previa-barra { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: #f1f1f1; border-bottom: 1px solid var(--borda); }
.previa-barra i { width: 10px; height: 10px; border-radius: 50%; background: #d4d4d4; display: block; }
.previa-barra span { margin-left: 8px; color: var(--texto-2); font-size: 12px; }
.previa-loja iframe { width: 100%; height: 520px; border: 0; display: block; }
.previa-aviso { text-align: center; padding: 8px; font-size: 13px; }
.tema-card { display: grid; grid-template-columns: 280px 1fr; gap: 16px; align-items: center; }
.tema-miniatura { aspect-ratio: 16/10; border-radius: 8px; overflow: hidden; border: 1px solid var(--borda); background: #fafafa; position: relative; }
.tema-miniatura iframe { width: 400%; height: 400%; transform: scale(.25); transform-origin: 0 0; border: 0; pointer-events: none; }

/* ---------- login */
.tela-entrar { background: radial-gradient(1200px 600px at 20% 0%, #2a2a2a, #111); min-height: 100vh; }
.entrar-caixa { width: min(400px, calc(100% - 32px)); margin: 10vh auto 0; background: #fff; border-radius: 16px; padding: 32px; box-shadow: 0 24px 48px rgba(0, 0, 0, .4); }
.entrar-caixa .marca-simbolo { width: 40px; height: 40px; font-size: 15px; border-radius: 10px; margin-bottom: 20px; }
.entrar-caixa h1 { font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: -.02em; }
.entrar-caixa .sub { color: var(--texto-2); margin: 4px 0 24px; }
.entrar-caixa .btn { width: 100%; margin-top: 20px; }
.entrar-erro { margin-top: 12px; }
.entrar-rodape { text-align: center; color: #8a8a8a; font-size: 12px; margin-top: 16px; }

/* ---------- responsivo */
@media (max-width: 1040px) {
  .layout { grid-template-columns: 1fr; }
  .metricas { grid-template-columns: 1fr 1fr; }
  .metrica:nth-child(3) { border-left: 0; }
  .metrica:nth-child(n+3) { border-top: 1px solid var(--borda-2); }
  .config-lista { grid-template-columns: 1fr; }
  .config-nav { position: static; display: flex; overflow-x: auto; }
  .config-nav a { white-space: nowrap; }
}
@media (max-width: 768px) {
  .lateral { transform: translateX(-100%); transition: transform .2s; visibility: hidden; }
  .nav-aberta .lateral { transform: none; visibility: visible; box-shadow: 0 0 24px rgba(0, 0, 0, .3); }
  .nav-aberta .lateral-fundo { display: block; position: fixed; inset: 56px 0 0 0; background: rgba(0, 0, 0, .3); z-index: 25; }
  .principal { margin-left: 0; }
  .topo-menu { display: inline-grid; }
  .topo-marca { width: auto; }
  .marca-nome, .conta-nome, .busca-caixa kbd { display: none; }
  .bs-esq { margin-left: 0; }
  .pagina { padding: 16px 16px 48px; }
  .grade-2, .grade-3, .grade-4, .tema-card { grid-template-columns: 1fr; }
  .it-topo { flex-direction: column; align-items: stretch; }
  .campo-busca { width: 100%; }
  .pagina-topo { flex-wrap: wrap; }
}

/* dados vindos da VTEX */
.lista-dados { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; font-size: 13px; }
.lista-dados dt { color: var(--texto-2); }
.lista-dados dd { margin: 0; word-break: break-word; }
.lista-dados code { font-size: 12px; }
.nf { padding: 8px 0; border-top: 1px solid var(--borda); }
.nf:first-of-type { border-top: 0; }
.registro-dados { font-size: 12px; color: var(--texto-2); white-space: pre-wrap; word-break: break-word; }
.metricas-vtex { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.metricas-vtex .metrica { background: var(--superficie-2); border-radius: 10px; padding: 12px; }
.metricas-vtex .val { font-size: 20px; font-weight: 650; }
