/* ============================================================
   6Dois Burguer — Painel (admin) CSS
   Base clean clara; cabeçalho preto com a marca; texto preto;
   amarelo 6Dois só como destaque.
   ============================================================
   Filosofia: painel admin é FERRAMENTA, não vitrine.
   - Sidebar branca (não roxa dominante)
   - Topbar branca fina com info da loja
   - Cor do brand (roxo Bibi) aparece APENAS em elementos de
     destaque: item ativo do menu, botões primários, links.
   - Fonte Inter — padrão de CRMs profissionais (Linear, Stripe,
     Vercel, CardápioWeb etc). Difere da Nunito do cardápio
     público propositalmente: aqui é produtividade, lá é marca.
   - Ícones Heroicons outline monocromáticos (no PHP).
============================================================ */

:root {
  /* Marca 6Dois (brand book) */
  --chumbo: #0B0B0B;
  --textura: #1A1A1A;
  --amarelo: #F2C300;
  --amarelo-claro: #FFD84D;
  /* "roxo" era a cor de destaque do painel antigo: agora é preto */
  --roxo: #111111;
  --roxo-escuro: #000000;
  --roxo-claro: #333333;
  --verde: #2E9E5B;
  --verde-escuro: #237A46;
  --creme: #F5F5F5;
  --vermelho: #D8343A;
  --azul: #2563EB;

  /* NOVO: paleta neutra do admin — inspirada em CRMs modernos */
  --bg:            #F9FAFB;    /* fundo cinza off-white */
  --surface:       #FFFFFF;    /* cards, sidebar, topbar */
  --border:        #E5E7EB;    /* divisórias padrão */
  --border-strong: #D1D5DB;
  --text:          #111827;    /* texto principal */
  --text-muted:    #6B7280;    /* labels, captions */
  --text-soft:     #9CA3AF;    /* placeholders, estados inativos */
  --hover:         #F3F4F6;    /* hover de itens */

  /* Variáveis de layout (estilo CardápioWeb) */
  --topbar-height: 56px;
  --sidebar-width: 240px;

  /* Cor de destaque = roxo Bibi, usado só onde há significado */
  --accent:        var(--roxo);
  --accent-soft:   rgba(242, 195, 0, 0.14);   /* fundo de item ativo (amarelo suave) */

  /* Compatibilidade: telas admin antigas ainda usam estas vars */
  --preto: var(--text);
  --cinza: var(--text-muted);
  --cinza-claro: var(--border-strong);
  --cinza-muito-claro: var(--border);
  --branco: var(--surface);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-weight: 400;
  font-feature-settings: "cv11", "ss01";   /* Inter: micro-ajustes tipográficos */
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  letter-spacing: -0.01em;
}
h1 { font-size: 24px; margin-bottom: 14px; letter-spacing: -0.02em; }
h2 { font-size: 19px; margin-bottom: 12px; }
h3 { font-size: 16px; margin-bottom: 10px; }
h4 { font-size: 14px; margin-bottom: 8px; }

/* ============================================================
   LAYOUT ADMIN — topbar + sidebar + main
   Estrutura idêntica ao padrão CardápioWeb:
     - header fixo no topo (56px, z-index alto)
     - sidebar fixa à esquerda abaixo do header (240px)
     - main rola independente
============================================================ */

.app {
  min-height: 100vh;
}

/* ============================================================
   TOPBAR — faixa branca fina fixada no topo
============================================================ */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px 0 24px;
  z-index: 40;
  gap: 20px;
}

.topbar-left {
  width: calc(var(--sidebar-width) - 24px);
  flex-shrink: 0;
}

.brand-mark {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}
.brand-bibi {
  font-size: 20px;
  color: var(--accent);
}
.brand-acai {
  font-size: 14px;
  color: var(--verde-escuro);
  font-weight: 700;
}

.topbar-center {
  flex: 1;
  display: flex;
  justify-content: flex-start;
}

.store-info-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}
.store-info-pill svg { color: var(--text-soft); flex-shrink: 0; }
.store-name { color: var(--text); font-weight: 600; }
.store-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--verde);
  flex-shrink: 0;
}
.store-state { color: var(--text-muted); }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.topbar-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.topbar-icon-btn:hover {
  background: var(--hover);
  color: var(--text);
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 4px 4px;
  border-radius: 999px;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--surface);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0;
}

.user-text { line-height: 1.2; }
.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.user-role {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: capitalize;
  font-weight: 500;
}

/* ============================================================
   SIDEBAR — coluna branca fixa à esquerda
============================================================ */
.sidebar {
  position: fixed;
  top: var(--topbar-height);
  left: 0;
  width: var(--sidebar-width);
  height: calc(100vh - var(--topbar-height));
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;                   /* a nav interna rola */
  z-index: 30;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
}

/* Scrollbar discreta na nav */
.sidebar-nav::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 3px;
}
.sidebar-nav:hover::-webkit-scrollbar-thumb { background: var(--border); }

.sidebar-section {
  margin-bottom: 12px;
}
.sidebar-section-title {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-soft);
  font-weight: 600;
  padding: 10px 12px 6px;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  color: var(--text-muted);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.12s, color 0.12s;
  position: relative;
  margin-bottom: 1px;
  text-decoration: none;
}
.nav-item:hover {
  background: var(--hover);
  color: var(--text);
  text-decoration: none;
}
.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
/* Barra lateral fina à esquerda do item ativo (padrão CRM) */
.nav-item.active::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: inherit;
}
.nav-label { flex: 1; }

.nav-badge {
  background: var(--accent);
  color: var(--surface);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
  line-height: 1.4;
}

/* Rodapé da sidebar — botão de sair compacto */
.sidebar-footer {
  border-top: 1px solid var(--border);
  padding: 12px 10px;
  flex-shrink: 0;
  background: var(--surface);
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  color: var(--text-muted);
  border: none;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.btn-logout:hover {
  background: var(--hover);
  color: var(--text);
}
.btn-logout svg { flex-shrink: 0; color: inherit; }

/* ============================================================
   MAIN — conteúdo principal
============================================================ */
.main {
  margin-top: var(--topbar-height);
  margin-left: var(--sidebar-width);
  padding: 24px 32px 40px;
  max-width: none;
  min-height: calc(100vh - var(--topbar-height));
}


.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  gap: 20px;
}
.page-header h1 { margin-bottom: 4px; }
.page-header .subtitle { font-size: 13px; color: var(--cinza); }

/* ============================================================
   CARDS & CAIXAS
   ============================================================ */

.card {
  background: var(--branco);
  border-radius: 12px;
  padding: 24px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  margin-bottom: 16px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.card-header h3 { margin-bottom: 0; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .main { padding: 20px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ============================================================
   STAT CARDS (dashboard)
   ============================================================ */

.stat {
  background: var(--branco);
  border-radius: 12px;
  padding: 20px 22px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-left: 4px solid var(--amarelo);
}
.stat .label {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--cinza);
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.stat .value {
  font-size: 32px;
  font-weight: 900;
  color: var(--roxo);
  line-height: 1;
}
.stat .sub {
  font-size: 12px;
  color: var(--cinza);
  margin-top: 4px;
}

/* ============================================================
   FORMULÁRIOS
   ============================================================ */

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: var(--preto);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--cinza-claro);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  background: var(--branco);
  transition: border-color 0.15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--roxo);
}

.form-textarea {
  min-height: 80px;
  resize: vertical;
  font-weight: 400;
  line-height: 1.5;
}

.form-hint {
  font-size: 12px;
  color: var(--cinza);
  margin-top: 4px;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
  font-size: 14px;
}
.form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--roxo);
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin-top: 20px;
}

/* ============================================================
   BOTÕES
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}

.btn-primary { background: var(--roxo); color: var(--amarelo); }
.btn-primary:hover { background: var(--roxo-escuro); text-decoration: none; }

.btn-success { background: var(--verde); color: var(--branco); }
.btn-success:hover { background: var(--verde-escuro); text-decoration: none; }

.btn-secondary { background: var(--cinza-muito-claro); color: var(--preto); }
.btn-secondary:hover { background: var(--cinza-claro); text-decoration: none; }

.btn-danger { background: var(--vermelho); color: var(--branco); }
.btn-danger:hover { filter: brightness(0.9); text-decoration: none; }

.btn-small { padding: 6px 10px; font-size: 11px; }
.btn-block { width: 100%; }

/* ============================================================
   TABELAS
   ============================================================ */

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--branco);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
}
.table th {
  background: var(--roxo);
  color: var(--amarelo);
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.table td {
  padding: 12px 14px;
  font-size: 13px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: rgba(255, 217, 61, 0.05); }

.table .actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

/* ============================================================
   BADGES / STATUS
   ============================================================ */

.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  padding: 3px 8px;
  border-radius: 10px;
  text-transform: uppercase;
}
.badge-success { background: var(--verde); color: var(--branco); }
.badge-warning { background: var(--amarelo); color: var(--roxo); }
.badge-danger { background: var(--vermelho); color: var(--branco); }
.badge-neutral { background: var(--cinza-claro); color: var(--preto); }
.badge-admin { background: var(--roxo); color: var(--amarelo); }

/* ============================================================
   ALERTAS / FLASH MESSAGES
   ============================================================ */

.alert {
  padding: 12px 18px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-weight: 700;
  font-size: 14px;
  border-left: 4px solid;
}
.alert-success { background: rgba(127, 191, 63, 0.1); color: var(--verde-escuro); border-color: var(--verde); }
.alert-error { background: rgba(226, 75, 74, 0.08); color: var(--vermelho); border-color: var(--vermelho); }
.alert-warning { background: rgba(255, 217, 61, 0.15); color: #8B5A00; border-color: var(--amarelo); }
.alert-info { background: rgba(59, 130, 196, 0.08); color: var(--azul); border-color: var(--azul); }

/* ============================================================
   TELA DE LOGIN
   ============================================================ */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--roxo) 0%, var(--roxo-escuro) 100%);
  padding: 20px;
}

.login-box {
  background: var(--branco);
  border-radius: 20px;
  padding: 40px 32px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-brand {
  text-align: center;
  margin-bottom: 28px;
}
.login-brand .wordmark {
  font-weight: 900;
  font-size: 44px;
  color: var(--roxo);
  line-height: 0.9;
  letter-spacing: -0.04em;
}
.login-brand .sub {
  font-weight: 900;
  font-size: 18px;
  color: var(--verde-escuro);
  margin-top: 4px;
}
.login-brand .tag {
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--cinza);
  font-weight: 800;
  margin-top: 8px;
}

/* ============================================================
   CONFIGURAÇÕES — TABS
   ============================================================ */

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--cinza-claro);
  overflow-x: auto;
}
.tab {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 800;
  color: var(--cinza);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: inherit;
}
.tab.active {
  color: var(--roxo);
  border-bottom-color: var(--amarelo);
}

.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ============================================================
   IMAGEM DE PRODUTO
   ============================================================ */

.produto-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--cinza-muito-claro);
}

.img-preview {
  width: 140px;
  height: 140px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--cinza-muito-claro);
  display: block;
  margin-bottom: 12px;
  border: 2px solid var(--cinza-claro);
}

/* ============================================================
   PILULAS (toggles de estado, etc.)
   ============================================================ */

.pill-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  background: var(--cinza-muito-claro);
  color: var(--cinza);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  margin: 3px;
  border: 2px solid transparent;
  transition: all 0.15s;
}
.pill-check input { display: none; }
.pill-check.checked {
  background: var(--amarelo);
  color: var(--roxo);
  border-color: var(--roxo);
}

/* ============================================================
   UTILITÁRIOS
   ============================================================ */

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--cinza); }
.text-small { font-size: 12px; }
.text-mono { font-family: 'Courier New', monospace; }
.hidden { display: none !important; }
.full-width { width: 100%; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }

/* ============================================================
   Fatia 4.10 — KANBAN DE PEDIDOS (refatoração visual)
   
   Princípio: kanban é ferramenta de SCAN. O operador passa
   o olho pelas colunas rapidamente. Tudo deve ser legível,
   nada deve gritar. Cor só para comunicar significado real
   (novo pedido = atenção, cancelado = falha, fechado = ok).
   ============================================================ */

/* Barra de status da operação (loja aberta/fechada + ações) */
.ops-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.ops-bar-status {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.ops-bullet {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ops-bullet.on {
  background: var(--verde);
  box-shadow: 0 0 0 4px rgba(127, 191, 63, 0.15);
}
.ops-bullet.off {
  background: var(--vermelho);
  box-shadow: 0 0 0 4px rgba(226, 75, 74, 0.12);
}
.ops-bar-info { min-width: 0; }
.ops-bar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.ops-bar-title svg { color: var(--text-muted); flex-shrink: 0; }
.ops-bar-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.ops-bar-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* Botões primário e secundário padrão CRM */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  text-decoration: none;
  line-height: 1.3;
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--accent);
  color: var(--surface);
}
.btn-primary:hover {
  background: var(--roxo-claro);
  color: var(--surface);
  text-decoration: none;
}
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  background: var(--hover);
  color: var(--text);
  text-decoration: none;
}
.btn-primary svg, .btn-secondary svg { flex-shrink: 0; }

/* Alerta de pedidos órfãos — discreto, não alarmante desnecessariamente */
.orfaos-alert {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #991B1B;
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
  font-size: 13px;
  line-height: 1.4;
}
.orfaos-alert svg { flex-shrink: 0; margin-top: 1px; color: #DC2626; }
.orfaos-alert strong { color: #991B1B; font-weight: 600; display: block; }
.orfaos-alert-sub { color: #B91C1C; opacity: 0.85; margin-top: 2px; font-size: 12px; }

/* ============================================================
   KANBAN BOARD
   ============================================================ */
.kanban {
  display: grid;
  grid-template-columns: repeat(6, minmax(240px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 20px;
}
@media (max-width: 1400px) {
  .kanban { grid-template-columns: repeat(4, minmax(240px, 1fr)); }
}
@media (max-width: 1100px) {
  .kanban { grid-template-columns: repeat(3, minmax(240px, 1fr)); }
}
@media (max-width: 768px) {
  .kanban { grid-template-columns: repeat(2, minmax(240px, 1fr)); }
}
@media (max-width: 540px) {
  .kanban { grid-template-columns: 1fr; }
}

/* Coluna do kanban */
.k-col {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 200px;
}

.k-col-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 6px 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2px;
}
.k-col-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.k-col-count {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--border);
  color: var(--text-muted);
  min-width: 22px;
  text-align: center;
  line-height: 1.4;
}
/* Contador destacado em cores semânticas quando há algo a fazer */
.k-col-count.count--alert {
  background: #FEF3C7;
  color: #92400E;
}
.k-col-count.count--danger {
  background: #FEE2E2;
  color: #B91C1C;
}
.k-col-count.count--ok {
  background: #DCFCE7;
  color: #166534;
}

/* Estado vazio — discreto */
.k-col-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 28px 10px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 500;
}
.k-col-empty svg { color: var(--text-soft); }

/* ============================================================
   ORDER CARD — card individual de pedido
   ============================================================ */
.order-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.12s, box-shadow 0.12s, transform 0.05s;
}
.order-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
  text-decoration: none;
  color: inherit;
}
.order-card:active { transform: scale(0.997); }

/* Linha 1: número + chips */
.order-card-row1 {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.order-num {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* Linha cliente */
.order-cliente {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
  margin-top: 4px;
}
.order-cliente svg { color: var(--text-muted); flex-shrink: 0; }
.order-cliente span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

/* Meta (endereço, horário) */
.order-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.3;
}
.order-meta svg { color: var(--text-soft); flex-shrink: 0; }
.order-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

/* Rodapé: total + motoboy/solicitação */
.order-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.order-total {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.01em;
}

/* ============================================================
   CHIPS — pílulas pastel de status/origem
   Padrão: fundo claro, borda média, texto escuro da mesma família
   ============================================================ */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.5;
  white-space: nowrap;
  border: 1px solid transparent;
}
.chip svg { flex-shrink: 0; }

/* Balcão — laranja pastel */
.chip--balcao {
  background: #FFF7ED;
  color: #C2410C;
  border-color: #FED7AA;
}
/* Delivery — azul pastel */
.chip--delivery {
  background: #EFF6FF;
  color: #1D4ED8;
  border-color: #BFDBFE;
}
/* Alerta (dia anterior, urgência) — vermelho pastel */
.chip--alert {
  background: #FEF2F2;
  color: #B91C1C;
  border-color: #FECACA;
}
/* Motoboy atribuído — verde pastel */
.chip--moto {
  background: #F0FDF4;
  color: #166534;
  border-color: #BBF7D0;
  font-weight: 500;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chip--moto svg { color: #16A34A; }
/* Solicitação de motoboy (pulsando) — amarelo pastel */
.chip--solicitacao {
  background: #FEFCE8;
  color: #854D0E;
  border-color: #FEF08A;
  font-weight: 500;
  animation: pulse-solicitacao 2.2s ease-in-out infinite;
}
@keyframes pulse-solicitacao {
  0%, 100% { box-shadow: 0 0 0 0 rgba(202, 138, 4, 0.12); }
  50%      { box-shadow: 0 0 0 4px rgba(202, 138, 4, 0); }
}

/* Estados especiais do card */
.order-card.is-orfao {
  border-color: #FECACA;
  background: #FFFBFB;
}
.order-card.is-orfao:hover { border-color: #FCA5A5; }

.order-card.is-cancelado {
  opacity: 0.6;
}
.order-card.is-cancelado .order-total {
  color: var(--text-muted);
  text-decoration: line-through;
}

.order-card.is-fechado {
  opacity: 0.75;
}

/* ============================================================
   Polimento de page-header (title + subtitle padrão CRM)
   ============================================================ */
.page-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.page-header h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}
.page-header .subtitle {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
}

/* ============================================================
   Fatia 4.11 — CAIXA & PLANTÕES
   Stat cards, tabelas, chips de tipo de movimento, botões semânticos
   ============================================================ */

/* Stat cards — blocos de saldo estilo CRM profissional */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}
.stat-card .label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.stat-card .value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-top: 2px;
}
.stat-card .sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
/* Indicador de categoria (barra superior de 2px) */
.stat-card.is-neutral  { border-top: 2px solid var(--text-soft); }
.stat-card.is-success  { border-top: 2px solid var(--verde); }
.stat-card.is-info     { border-top: 2px solid #3B82F6; }
.stat-card.is-warning  { border-top: 2px solid #F59E0B; }
.stat-card.is-accent   { border-top: 2px solid var(--accent); }

/* ============================================================
   Card padrão (substitui .card antigo no novo visual)
   Mantém compat com .card antigo, mas a gente usa .panel
   ============================================================ */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 14px;
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.panel-header h2,
.panel-header h3 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.panel-header h3 svg { color: var(--text-muted); }
.panel-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  margin-top: -8px;
}

/* ============================================================
   Botões — sistema completo
   btn-primary / btn-secondary já existem (4.10)
   Adicionando: btn-success, btn-danger, btn-ghost, btn-small
   ============================================================ */
.btn-success {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  text-decoration: none;
  line-height: 1.3;
  white-space: nowrap;
  border: 1px solid transparent;
  background: var(--verde-escuro);
  color: var(--surface);
}
.btn-success:hover {
  background: #487922;
  color: var(--surface);
  text-decoration: none;
}
.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s;
  text-decoration: none;
  line-height: 1.3;
  white-space: nowrap;
  border: 1px solid transparent;
  background: #DC2626;
  color: var(--surface);
}
.btn-danger:hover {
  background: #B91C1C;
  color: var(--surface);
  text-decoration: none;
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: transparent;
  color: var(--text-muted);
  border: none;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}
.btn-ghost:hover { background: var(--hover); color: var(--text); text-decoration: none; }
.btn-small {
  padding: 4px 10px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
}
.btn-small:hover { background: var(--hover); text-decoration: none; color: var(--text); }

.btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ============================================================
   Tabelas — data-table padrão CRM
   ============================================================ */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.data-table thead th {
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.data-table thead th:first-child { border-top-left-radius: 8px; }
.data-table thead th:last-child  { border-top-right-radius: 8px; }
.data-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--bg); }
.data-table .t-num  { font-variant-numeric: tabular-nums; }
.data-table .t-right { text-align: right; }
.data-table .t-muted { color: var(--text-muted); }
.data-table .t-strong { font-weight: 600; color: var(--text); }

/* ============================================================
   Movement row — layout de linha de movimento de caixa
   ============================================================ */
.mov-list {
  display: flex;
  flex-direction: column;
}
.mov-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.mov-item:last-child { border-bottom: none; padding-bottom: 0; }
.mov-item:first-child { padding-top: 0; }
.mov-item-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}
.mov-item-desc { font-size: 13px; color: var(--text); font-weight: 500; }
.mov-item-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.mov-item-valor {
  font-weight: 700;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.mov-item-valor.is-entrada { color: var(--verde-escuro); }
.mov-item-valor.is-saida   { color: #DC2626; }
.mov-item-valor.is-neutral { color: var(--text-muted); }

/* Chips específicos de movimento de caixa */
.chip--mov-entrada    { background: #F0FDF4; color: #166534; border-color: #BBF7D0; }
.chip--mov-saida      { background: #FEF2F2; color: #991B1B; border-color: #FECACA; }
.chip--mov-suprimento { background: #F0FDF4; color: #166534; border-color: #BBF7D0; }
.chip--mov-sangria    { background: #FEF2F2; color: #991B1B; border-color: #FECACA; }
.chip--mov-estorno    { background: #F3F4F6; color: #4B5563; border-color: #E5E7EB; }
.chip--mov-ajuste     { background: #FFFBEB; color: #92400E; border-color: #FDE68A; }

/* Forma de pagamento — chips neutros */
.chip--forma-dinheiro { background: #F0FDF4; color: #166534; border-color: #BBF7D0; }
.chip--forma-credito  { background: #EFF6FF; color: #1D4ED8; border-color: #BFDBFE; }
.chip--forma-debito   { background: #EFF6FF; color: #1D4ED8; border-color: #BFDBFE; }
.chip--forma-pix      { background: #F5F3FF; color: #6D28D9; border-color: #DDD6FE; }

/* ============================================================
   Compare rows (tela de detalhe de caixa fechado)
   ============================================================ */
.compare-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
}
.compare-row:last-child { border-bottom: none; }
.compare-row.is-header {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 8px;
}
.compare-row .c-label { font-weight: 500; font-size: 14px; color: var(--text); }
.compare-row .c-val {
  font-weight: 600;
  font-size: 14px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.compare-row .c-diff.is-pos  { color: var(--verde-escuro); }
.compare-row .c-diff.is-neg  { color: #DC2626; }
.compare-row .c-diff.is-zero { color: var(--text-muted); }

/* ============================================================
   Plantão card — substituir .plantao-card antigo
   ============================================================ */
.shift-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.shift-card.is-pending {
  border-color: #FDE68A;
  background: #FFFBEB;
}
.shift-card-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}
.shift-card-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: -0.01em;
}
.shift-card-name svg { color: var(--text-muted); flex-shrink: 0; }
.shift-card-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.shift-card-money {
  font-size: 14px;
  font-weight: 600;
  color: var(--verde-escuro);
  margin-top: 2px;
}
.shift-card-money .breakdown {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 2px;
}
.shift-card-alert {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #B91C1C;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  padding: 4px 10px;
  border-radius: 6px;
  margin-top: 4px;
}

/* Receitas por canal (tela de fechar) */
.revenue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.revenue-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
}
.revenue-card .label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.revenue-card .label svg { color: var(--text-muted); }
.revenue-card .total {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-top: 8px;
}
.revenue-card .qtd {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.revenue-card .breakdown {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  font-size: 12px;
  color: var(--text-muted);
}
.revenue-card .breakdown .br-row {
  display: flex;
  justify-content: space-between;
}
.revenue-card .breakdown .br-val {
  color: var(--text);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   Inputs grandes (declarar valores no fechamento)
   ============================================================ */
.big-input {
  width: 100%;
  height: 56px;
  padding: 0 16px;
  border: 1.5px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.12s, box-shadow 0.12s;
  letter-spacing: -0.01em;
}
.big-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}
.big-input::placeholder { color: var(--text-soft); font-weight: 400; }

/* Form inputs gerais */
.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}
.form-input::placeholder { color: var(--text-soft); }
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.form-group { margin-bottom: 14px; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}
.full-width { width: 100%; justify-content: center; }

/* Observação — textarea específica */
textarea.form-input {
  min-height: 80px;
  resize: vertical;
  line-height: 1.5;
}


/* ============================================================
   Fatia 4.12 — Cadastros (Motoboys, Horários, Faixas)
   Classes reusáveis pra tabelas de cadastro, toolbar, toggles,
   formulários, estados vazios.
   ============================================================ */

/* ============================================================
   TOOLBAR — faixa no topo de listagens
   [título] .... [busca] [botão primário]
   ============================================================ */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.toolbar-left {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.toolbar-right {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* Campo de busca estilo CRM */
.search-input {
  position: relative;
  display: inline-block;
}
.search-input input {
  width: 260px;
  height: 36px;
  padding: 0 14px 0 36px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236B7280' stroke-width='2' viewBox='0 0 24 24'><circle cx='11' cy='11' r='8'/><path d='m21 21-4.35-4.35'/></svg>") no-repeat 10px center;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-input input::placeholder { color: var(--text-soft); }
.search-input input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}
@media (max-width: 640px) {
  .search-input input { width: 100%; }
  .search-input { width: 100%; }
}

/* ============================================================
   TOGGLE SWITCH — substituto bonito do checkbox feio
   Uso: <label class="toggle"><input type="checkbox"><span></span></label>
   ============================================================ */
.toggle {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
  cursor: pointer;
  vertical-align: middle;
}
.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.toggle-slider {
  position: absolute;
  inset: 0;
  background: #D1D5DB;
  border-radius: 999px;
  transition: background 0.2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  height: 16px;
  width: 16px;
  left: 2px;
  top: 2px;
  background: var(--surface);
  border-radius: 50%;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.toggle input:checked + .toggle-slider {
  background: var(--accent);
}
.toggle input:checked + .toggle-slider::before {
  transform: translateX(16px);
}
.toggle input:focus + .toggle-slider {
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12);
}
.toggle input:disabled + .toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Badge de status (ativo/inativo/em turno/fora) */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  flex-shrink: 0;
}
.badge-status.is-active  { background: #F0FDF4; color: #166534; border-color: #BBF7D0; }
.badge-status.is-inactive{ background: #F3F4F6; color: #6B7280; border-color: #E5E7EB; }
.badge-status.is-pending { background: #FFFBEB; color: #92400E; border-color: #FDE68A; }

/* ============================================================
   Actions column - botões inline na tabela
   ============================================================ */
.t-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: nowrap;
}
.t-actions .btn-small,
.t-actions form {
  margin: 0;
}
.t-actions form { display: inline-flex; }

.btn-small.is-danger {
  color: #B91C1C;
  border-color: #FECACA;
}
.btn-small.is-danger:hover {
  background: #FEF2F2;
  color: #991B1B;
}

/* ============================================================
   Form actions — rodapé de formulário (cancelar + salvar)
   ============================================================ */
.form-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.form-actions.sticky {
  position: sticky;
  bottom: 0;
  background: var(--bg);
  padding-bottom: 16px;
  margin-top: 24px;
}

/* ============================================================
   Empty state — quando uma listagem está vazia
   ============================================================ */
.empty-state {
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  padding: 48px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.empty-state svg {
  color: var(--text-soft);
  opacity: 0.6;
}
.empty-state-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-top: 4px;
}
.empty-state-desc {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 360px;
  line-height: 1.5;
}
.empty-state .btn-primary {
  margin-top: 12px;
}

/* ============================================================
   Form grid e colunas
   ============================================================ */
.form-grid {
  display: grid;
  gap: 14px;
}
.form-grid.grid-2 { grid-template-columns: 1fr 1fr; }
.form-grid.grid-3 { grid-template-columns: repeat(3, 1fr); }
.form-grid.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 768px) {
  .form-grid.grid-2,
  .form-grid.grid-3,
  .form-grid.grid-4 { grid-template-columns: 1fr; }
}

/* Diferença positiva/negativa em números (usado em faixas) */
.t-diff.is-pos  { color: var(--verde-escuro); font-weight: 600; }
.t-diff.is-neg  { color: #DC2626; font-weight: 600; }
.t-diff.is-zero { color: var(--text-muted); }

/* Célula de "range" estilo "0 – 5 km" */
.t-range {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Texto mono (usuário, código) */
.t-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  color: var(--text-muted);
}

/* Input menor pra tabelas inline (horários) */
.form-input.is-compact {
  padding: 7px 10px;
  font-size: 13px;
  width: auto;
  max-width: 130px;
}

/* ============================================================
   Fatia 4.13 — Pedido Detalhe + Balcão
   Telas de alto uso, refatoração total para padrão CRM
   ============================================================ */

/* ============================================================
   STATUS BADGE DE PEDIDO — pílulas de status no detalhe
   Padrão pastel: fundo claro, borda média, texto escuro
   ============================================================ */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.4;
  border: 1px solid transparent;
  white-space: nowrap;
}
.status-pill::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  flex-shrink: 0;
}
.status-pill--confirmado          { background: #FEF2F2; color: #B91C1C; border-color: #FECACA; }
.status-pill--em_preparo          { background: #FFFBEB; color: #92400E; border-color: #FDE68A; }
.status-pill--pronto              { background: #EFF6FF; color: #1D4ED8; border-color: #BFDBFE; }
.status-pill--em_rota             { background: #FFF8DB; color: #8A6D00; border-color: #F2C300; }
.status-pill--aguardando_retirada { background: #FFF7ED; color: #C2410C; border-color: #FED7AA; }
.status-pill--entregue            { background: #F0FDF4; color: #166534; border-color: #BBF7D0; }
.status-pill--fechado             { background: #F0FDF4; color: #166534; border-color: #86EFAC; }
.status-pill--cancelado           { background: #F3F4F6; color: #6B7280; border-color: #E5E7EB; }

/* ============================================================
   LAYOUT do detalhe: 2 colunas (resumo | ações)
   ============================================================ */
.pedido-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 1024px) {
  .pedido-layout { grid-template-columns: 1fr; }
}

.pedido-acoes-col {
  position: sticky;
  top: 72px;         /* abaixo da topbar fixa de 56px + margem */
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ============================================================
   ITEM do pedido (uma linha por item, estilo checkout)
   ============================================================ */
.p-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.p-item:first-child { padding-top: 0; }
.p-item:last-child { border-bottom: none; padding-bottom: 0; }

.p-item-qty {
  min-width: 32px;
  height: 26px;
  padding: 0 8px;
  background: #FEF3C7;
  color: #92400E;
  border-radius: 6px;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.p-item-body { min-width: 0; }
.p-item-nome {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  line-height: 1.35;
}
.p-item-comp {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.4;
}
.p-item-obs {
  font-size: 12px;
  color: #C2410C;
  background: #FFF7ED;
  border: 1px solid #FED7AA;
  border-radius: 6px;
  padding: 4px 8px;
  margin-top: 5px;
  display: inline-block;
}
.p-item-valor {
  font-weight: 700;
  font-size: 14px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  margin-top: 2px;
}

/* ============================================================
   TOTAIS do pedido (rodapé do card de itens)
   ============================================================ */
.p-totais {
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid var(--border);
}
.p-totais-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 13px;
  color: var(--text-muted);
}
.p-totais-row strong {
  color: var(--text);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.p-totais-row.is-discount { color: var(--verde-escuro); }
.p-totais-row.is-discount strong { color: var(--verde-escuro); font-weight: 600; }
.p-totais-row.is-total {
  padding-top: 10px;
  margin-top: 6px;
  border-top: 1px solid var(--border);
  font-size: 16px;
}
.p-totais-row.is-total span:first-child {
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 12px;
}
.p-totais-row.is-total strong {
  font-weight: 700;
  color: var(--accent);
  font-size: 18px;
  letter-spacing: -0.02em;
}

/* ============================================================
   INFO BLOCKS — linhas "label: valor" (cliente, endereço, pagamento)
   ============================================================ */
.info-line {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
}
.info-line.muted { color: var(--text-muted); }
.info-line strong { font-weight: 600; }

.info-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Alerta de troco */
.troco-alert {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  color: #92400E;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  margin-top: 10px;
  line-height: 1.45;
}
.troco-alert svg { flex-shrink: 0; margin-top: 1px; }
.troco-alert strong { color: #78350F; }

/* ============================================================
   BLOCO DE AÇÕES — transições de status
   ============================================================ */
.acao-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  text-decoration: none;
  line-height: 1.3;
  border: 1px solid transparent;
  text-align: left;
  justify-content: flex-start;
}
.acao-btn.is-primary {
  background: var(--verde-escuro);
  color: var(--surface);
}
.acao-btn.is-primary:hover { background: #487922; color: var(--surface); text-decoration: none; }
.acao-btn.is-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
.acao-btn.is-secondary:hover { background: var(--hover); color: var(--text); text-decoration: none; }
.acao-btn.is-danger {
  background: #DC2626;
  color: var(--surface);
}
.acao-btn.is-danger:hover { background: #B91C1C; color: var(--surface); text-decoration: none; }
.acao-btn.is-warn {
  background: #F59E0B;
  color: var(--surface);
}
.acao-btn.is-warn:hover { background: #D97706; color: var(--surface); text-decoration: none; }
.acao-btn.is-disabled {
  background: var(--bg);
  color: var(--text-soft);
  cursor: not-allowed;
  border-color: var(--border);
}
.acao-btn.is-disabled:hover { background: var(--bg); color: var(--text-soft); }
.acao-btn svg { flex-shrink: 0; }

.acao-lista {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ============================================================
   BALCÃO — layout específico
   ============================================================ */

/* Modo cards (esperando vs retorna) */
.modo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.modo-card {
  border: 1.5px solid var(--border-strong);
  border-radius: 10px;
  padding: 16px 12px;
  cursor: pointer;
  text-align: center;
  background: var(--surface);
  transition: border-color 0.12s, background 0.12s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.modo-card:hover { border-color: var(--accent); }
.modo-card.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.modo-card svg {
  color: var(--text-muted);
}
.modo-card.selected svg { color: var(--accent); }
.modo-card-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}
.modo-card-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Grade de produtos clicáveis no balcão */
.prod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.prod-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.prod-btn:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.prod-btn-nome {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  line-height: 1.3;
}
.prod-btn-preco {
  font-weight: 600;
  font-size: 14px;
  color: var(--accent);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.prod-categoria-titulo {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 16px 0 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}
.prod-categoria-titulo:first-child { padding-top: 0; }

/* Carrinho (linha do item no balcão — mais compacto) */
.cart-item {
  display: flex;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.cart-item:last-child { border-bottom: none; padding-bottom: 0; }
.cart-item:first-child { padding-top: 0; }
.cart-item-body { flex: 1; min-width: 0; }
.cart-item-nome {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  line-height: 1.3;
}
.cart-item-preco-unit {
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.cart-item-comp {
  font-size: 11px;
  color: var(--verde-escuro);
  margin-top: 2px;
}
.cart-item-obs {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 2px;
}
.cart-item-qty-ctrl {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cart-item-qty-ctrl button {
  width: 26px;
  height: 26px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  border-radius: 6px;
  cursor: pointer;
  color: var(--text);
  font-weight: 600;
  transition: background 0.12s;
}
.cart-item-qty-ctrl button:hover { background: var(--hover); }
.cart-item-qty-ctrl .qty-value {
  min-width: 24px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
}
.cart-item-subtotal {
  font-weight: 700;
  font-size: 13px;
  color: var(--accent);
  min-width: 70px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.cart-item-remove {
  background: transparent;
  border: none;
  color: var(--text-soft);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.12s, background 0.12s;
}
.cart-item-remove:hover {
  color: #DC2626;
  background: #FEF2F2;
}

.cart-vazio {
  padding: 32px 12px;
  text-align: center;
  color: var(--text-soft);
  font-size: 13px;
}

/* Opções de pagamento no balcão (grid 2x2) */
.pag-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.pag-opt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1.5px solid var(--border-strong);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  transition: all 0.12s;
}
.pag-opt:hover { border-color: var(--accent); }
.pag-opt.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.pag-opt input { display: none; }
.pag-opt svg { color: currentColor; flex-shrink: 0; }

/* Card de totais do balcão (lateral) */
.balcao-totais {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}
.balcao-totais-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  padding: 4px 0;
}
.balcao-totais-row.is-total {
  padding-top: 10px;
  margin-top: 6px;
  border-top: 1px solid var(--border);
  font-size: 14px;
}
.balcao-totais-row.is-total span:first-child {
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11px;
}
.balcao-totais-row.is-total strong {
  font-weight: 700;
  color: var(--accent);
  font-size: 20px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.balcao-totais-row strong {
  font-variant-numeric: tabular-nums;
  color: var(--text);
  font-weight: 500;
}

/* Wizard steps do modo "retorna" */
.wizard-step {
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 14px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
}
.wizard-step.is-success {
  background: #F0FDF4;
  border-color: #BBF7D0;
  color: #166534;
}
.wizard-step svg { flex-shrink: 0; margin-top: 1px; }
.wizard-step strong { font-weight: 600; }

/* Campo de código grande (validação WhatsApp) */
.code-input {
  width: 100%;
  height: 56px;
  border: 1.5px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  font-family: inherit;
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 12px;
  color: var(--text);
  padding: 0 16px;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.code-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

/* Bloqueio "valide o WhatsApp primeiro" */
.bloqueio-produtos {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  color: #92400E;
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.bloqueio-produtos svg { flex-shrink: 0; }

/* Ajuste de page-header pra comportar pill de status à direita */
.page-header-with-status {
  align-items: center;
  gap: 12px;
}

/* ============================================================
   Fatia Vagas — Candidatos (admin)
   Cards expansíveis com resumo + detalhe inline
   ============================================================ */

/* Tabs de filtro por status */
.candidatos-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  overflow-x: auto;
}
.candidatos-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color 0.12s, border-color 0.12s;
}
.candidatos-tabs a:hover {
  color: var(--text);
  text-decoration: none;
}
.candidatos-tabs a.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}
.candidatos-tabs a .n {
  background: var(--bg);
  color: var(--text-muted);
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  min-width: 20px;
  text-align: center;
}
.candidatos-tabs a.is-active .n {
  background: var(--accent-soft);
  color: var(--accent);
}

/* Card do candidato */
.cand-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.cand-card:hover { border-color: var(--border-strong); }
.cand-card.is-open {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Resumo — linha clicável */
.cand-summary {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 14px;
  padding: 14px 18px;
  align-items: center;
  cursor: pointer;
  user-select: none;
}
.cand-summary:hover { background: var(--bg); }
@media (max-width: 768px) {
  .cand-summary {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 8px;
  }
  .cand-summary-tags,
  .cand-summary-date {
    grid-column: 1 / -1;
  }
}

.cand-summary-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.cand-summary-nome {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.cand-summary-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.cand-summary-meta .dot-sep {
  color: var(--text-soft);
}

.cand-summary-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.cand-summary-date {
  font-size: 11px;
  color: var(--text-soft);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.cand-summary-chevron {
  color: var(--text-muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.cand-card.is-open .cand-summary-chevron {
  transform: rotate(180deg);
  color: var(--accent);
}

/* Detalhe expandido */
.cand-detail {
  display: none;
  border-top: 1px solid var(--border);
  padding: 18px;
  background: var(--bg);
}
.cand-card.is-open .cand-detail { display: block; }

.cand-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.cand-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
}
.cand-block-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.cand-block-value {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
  line-height: 1.5;
}
.cand-block-value.is-long {
  font-weight: 400;
  white-space: pre-wrap;
  color: var(--text);
}
.cand-block-value .muted {
  color: var(--text-muted);
  font-weight: 400;
  font-style: italic;
}
.cand-block.is-wide { grid-column: 1 / -1; }

/* Lista de tags de experiência */
.exp-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Score visual 0-10 (agilidade) */
.score-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}
.score-bar-track {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  min-width: 120px;
}
.score-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.3s;
}
.score-bar-fill.is-low    { background: #DC2626; }
.score-bar-fill.is-med    { background: #F59E0B; }
.score-bar-fill.is-high   { background: var(--verde-escuro); }
.score-bar-value {
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  min-width: 32px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Ações do candidato */
.cand-actions {
  display: flex;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  align-items: center;
}
.cand-actions .label-action {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-right: 6px;
}
.cand-actions form { display: inline-flex; }
.cand-actions .cand-whatsapp {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #25D366;
  color: #FFF;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.12s;
}
.cand-actions .cand-whatsapp:hover {
  background: #1EBE5B;
  color: #FFF;
  text-decoration: none;
}

/* Botões pequenos de mudar status */
.btn-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.12s;
}
.btn-status:hover {
  background: var(--hover);
  border-color: var(--accent);
}
.btn-status.is-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

/* Badges específicas de candidato */
.badge-cand-desloc-sim    { background: #F0FDF4; color: #166534; border-color: #BBF7D0; }
.badge-cand-desloc-nao    { background: #FEF2F2; color: #991B1B; border-color: #FECACA; }
.badge-cand-desloc-duvida { background: #FFFBEB; color: #92400E; border-color: #FDE68A; }

.badge-cand-status-novo       { background: #EFF6FF; color: #1D4ED8; border-color: #BFDBFE; }
.badge-cand-status-vendo      { background: #F5F3FF; color: #6D28D9; border-color: #DDD6FE; }
.badge-cand-status-contratado { background: #F0FDF4; color: #166534; border-color: #BBF7D0; }
.badge-cand-status-descartado { background: #F3F4F6; color: #6B7280; border-color: #E5E7EB; }

/* ============================================================
   Fatia 4.15 (catálogo) — Produtos + Categorias + Complementos
   Classes específicas pra gerenciamento de catálogo
   ============================================================ */

/* ==== THUMB DE PRODUTO (lista) ==== */
.produto-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--bg);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.produto-thumb-empty {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: linear-gradient(135deg, #F5F3FF 0%, #E0E7FF 100%);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.produto-row-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.produto-row-main .info {
  min-width: 0;
  flex: 1;
}
.produto-row-main .nome {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 2px;
}
.produto-row-main .desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}
.produto-row-volume {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ==== UPLOAD DE IMAGEM (form de produto) ==== */
.img-upload {
  position: relative;
  border: 2px dashed var(--border-strong);
  border-radius: 10px;
  background: var(--bg);
  padding: 18px;
  text-align: center;
  transition: all 0.15s;
  margin-bottom: 12px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.img-upload:hover {
  border-color: var(--accent);
  background: #F9F5FC;
}
.img-upload-hint {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 10px;
}
.img-upload-hint strong {
  color: var(--accent);
  font-weight: 700;
}
.img-upload svg {
  color: var(--accent);
  opacity: 0.6;
}
.img-upload input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.img-upload.has-image {
  padding: 0;
  min-height: auto;
  border-style: solid;
  border-color: var(--border);
  background: var(--surface);
}
.img-upload.has-image .img-upload-hint {
  display: none;
}
.img-upload.has-image .img-upload-icon {
  display: none;
}
.img-preview {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}
.img-upload-change {
  position: absolute;
  right: 8px;
  top: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  display: none;
  align-items: center;
  gap: 4px;
  z-index: 2;
  pointer-events: none;
}
.img-upload.has-image .img-upload-change {
  display: inline-flex;
}

/* ==== PILL CHECK (complementos em cards clicáveis) ==== */
.pill-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}
.pill-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1.5px solid var(--border-strong);
  border-radius: 8px;
  cursor: pointer;
  background: var(--surface);
  transition: all 0.12s;
  user-select: none;
  position: relative;
  font-size: 13px;
}
.pill-check:hover {
  border-color: var(--accent);
}
.pill-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.pill-check-box {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-strong);
  border-radius: 4px;
  background: var(--surface);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s;
}
.pill-check input:checked + .pill-check-box {
  background: var(--accent);
  border-color: var(--accent);
}
.pill-check input:checked + .pill-check-box::after {
  content: '';
  width: 8px;
  height: 5px;
  border-left: 2px solid #FFF;
  border-bottom: 2px solid #FFF;
  transform: rotate(-45deg) translateY(-1px);
}
.pill-check-label {
  flex: 1;
  min-width: 0;
  color: var(--text);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pill-check-price {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.pill-check:has(input:checked) {
  border-color: var(--accent);
  background: #FAF7FD;
}

/* ==== TABELA EDITÁVEL INLINE (categorias e complementos) ==== */
/* Mostra valores como texto, mas vira input ao clicar — sem mudança de layout */
.edit-table tbody tr {
  transition: background 0.12s;
}
.edit-table tbody tr:hover {
  background: #FAFAFA;
}

.edit-field {
  border: 1.5px solid transparent;
  background: transparent;
  padding: 7px 10px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  width: 100%;
  transition: all 0.12s;
}
.edit-field:hover {
  background: var(--surface);
  border-color: var(--border);
}
.edit-field:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}
.edit-field.is-num {
  font-variant-numeric: tabular-nums;
  text-align: right;
  max-width: 120px;
}
.edit-field.is-small {
  max-width: 80px;
  text-align: center;
  padding: 7px 8px;
}

/* Toggle switch (ativo/ativa) dentro da edit-table */
.edit-toggle {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  vertical-align: middle;
}
.edit-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.edit-toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s;
}
.edit-toggle-slider::before {
  content: '';
  position: absolute;
  height: 14px;
  width: 14px;
  left: 3px;
  top: 3px;
  background: var(--surface);
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.edit-toggle input:checked + .edit-toggle-slider {
  background: var(--verde-escuro);
}
.edit-toggle input:checked + .edit-toggle-slider::before {
  transform: translateX(16px);
}

/* Botão "Salvar" que só ativa quando form foi modificado */
.btn-save-row {
  background: var(--verde-escuro);
  color: #FFF;
  border: none;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.3;
  pointer-events: none;
  transition: opacity 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-save-row.is-dirty {
  opacity: 1;
  pointer-events: auto;
}
.btn-save-row:hover {
  background: #487922;
}

/* Card "criar novo" no topo */
.quick-add {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.quick-add-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}
.quick-add-header svg {
  color: var(--accent);
}

/* Badge de "inativa" sutil na tabela */
.row-inactive {
  opacity: 0.55;
}
.row-inactive:hover {
  opacity: 1;
}

/* Action buttons compactos na coluna de ações */
.row-actions {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  justify-content: flex-end;
}

/* Botão de excluir discreto */
.btn-delete-row {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s;
}
.btn-delete-row:hover {
  background: #FEF2F2;
  color: var(--danger);
}

/* ============================================================
   Fatia 4.16 (marketing) — Cupons + Posts
   ============================================================ */

/* ==== TABS (navegação por abas) ==== */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  padding: 0 2px;
}
.tab-btn {
  background: transparent;
  border: 0;
  padding: 10px 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px 8px 0 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.12s, border-color 0.12s;
}
.tab-btn:hover {
  color: var(--text);
}
.tab-btn.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.tab-btn-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 7px;
  border-radius: 10px;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.tab-btn.is-active .tab-btn-count {
  background: #F5EEFA;
  color: var(--accent);
}
.tab-btn-count.is-pending {
  background: #FFFBEB;
  color: #92400E;
}
.tab-content { display: none; }
.tab-content.is-active { display: block; }

/* ==== POSTS GRID E CARDS ==== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s, transform 0.15s;
}
.post-card:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}
.post-card-img {
  background: var(--bg);
  aspect-ratio: 9 / 16;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
}
.post-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}
.post-card-img:hover img {
  transform: scale(1.03);
}
.post-card-img-hint {
  position: absolute;
  inset: auto 0 0 0;
  padding: 8px;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
  color: #FFF;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s;
}
.post-card-img:hover .post-card-img-hint {
  opacity: 1;
}
.post-card-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.post-card-cliente {
  font-weight: 700;
  color: var(--text);
  font-size: 14px;
  line-height: 1.2;
}
.post-card-meta {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}
.post-card-meta svg {
  color: var(--text-soft);
  margin-right: 3px;
  vertical-align: -2px;
}
.post-card-obs {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
  color: #78350F;
  line-height: 1.4;
  display: flex;
  gap: 6px;
  align-items: flex-start;
}
.post-card-obs svg {
  color: #92400E;
  flex-shrink: 0;
  margin-top: 1px;
}
.post-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: auto;
  padding-top: 4px;
}
.post-card-actions button,
.post-card-actions .btn {
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
}
.post-card-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  align-self: flex-start;
}
.post-card-status.is-aprov {
  background: #F0FDF4;
  color: #166534;
  border: 1px solid #BBF7D0;
}
.post-card-status.is-reprov {
  background: #FEF2F2;
  color: #991B1B;
  border: 1px solid #FECACA;
}
.post-card-valor-credit {
  font-size: 14px;
  font-weight: 800;
  color: var(--verde-escuro);
  font-variant-numeric: tabular-nums;
}

/* ==== MODAL (usado em reprovar + lightbox) ==== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 10, 50, 0.55);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modal-fade 0.15s ease-out;
}
.modal-overlay.is-open {
  display: flex;
}
@keyframes modal-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal-card {
  background: var(--surface);
  border-radius: 14px;
  padding: 24px 28px 22px;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(30, 10, 50, 0.25);
  animation: modal-slide 0.18s ease-out;
}
@keyframes modal-slide {
  from { transform: translateY(-8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.modal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}
.modal-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.modal-icon.is-danger {
  background: #FEF2F2;
  color: #991B1B;
}
.modal-body {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 18px;
}
.modal-body strong {
  color: var(--text);
}
.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Modal de imagem (lightbox) — variante */
.modal-overlay.is-lightbox {
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: none;
  z-index: 1001;
}
.modal-overlay.is-lightbox img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.modal-overlay.is-lightbox .lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #FFF;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s;
}
.modal-overlay.is-lightbox .lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ==== CUPOM: código como chip monospace ==== */
.cupom-codigo {
  display: inline-block;
  font-family: ui-monospace, "SF Mono", Monaco, Menlo, monospace;
  font-weight: 700;
  font-size: 13px;
  color: var(--accent);
  background: #F5EEFA;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.cupom-desc-inline {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ==== FORM: Radio cards (pra tipo de desconto) ==== */
.radio-card-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.radio-card {
  position: relative;
  border: 1.5px solid var(--border-strong);
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 12px;
}
.radio-card:hover {
  border-color: var(--accent);
}
.radio-card input {
  position: absolute;
  opacity: 0;
}
.radio-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}
.radio-card-text {
  display: flex;
  flex-direction: column;
}
.radio-card-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}
.radio-card-sub {
  font-size: 12px;
  color: var(--text-muted);
}
.radio-card:has(input:checked) {
  border-color: var(--accent);
  background: #FAF7FD;
}
.radio-card:has(input:checked) .radio-card-icon {
  background: var(--accent);
  color: var(--amarelo);
}

/* ==== Rules card (regras automáticas) ==== */
.rules-card {
  background: #F5EEFA;
  border: 1px solid #E4D3EF;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 16px;
}
.rules-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--accent);
  font-size: 13px;
  margin-bottom: 8px;
}
.rules-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.rules-card li {
  padding: 4px 0 4px 20px;
  position: relative;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}
.rules-card li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 12px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.rules-card li strong {
  color: var(--accent);
  font-weight: 700;
}

/* ============================================================
   Fatia 4.17 (sistema) — Operadores + Configurações
   ============================================================ */

/* ==== INPUT COM TOGGLE DE SENHA ==== */
.input-with-toggle {
  position: relative;
}
.input-with-toggle .form-input {
  padding-right: 42px;
}
.input-toggle-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s;
}
.input-toggle-btn:hover {
  background: var(--bg);
  color: var(--accent);
}

/* ==== BADGE DE PAPEL (admin / operador) ==== */
.badge-papel {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}
.badge-papel.is-admin {
  background: #F5EEFA;
  color: var(--accent);
  border: 1px solid #E4D3EF;
}
.badge-papel.is-operador {
  background: var(--bg);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* ==== MENSAGEM CARD (templates Z-API) ==== */
.msg-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 14px;
  overflow: hidden;
  transition: border-color 0.12s;
}
.msg-card:hover {
  border-color: var(--border-strong);
}
.msg-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: #FAFBFC;
  border-bottom: 1px solid var(--border);
}
.msg-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.msg-card-icon.is-roxo {
  background: #F5EEFA;
  color: var(--accent);
}
.msg-card-icon.is-verde {
  background: #F0FDF4;
  color: var(--verde-escuro);
}
.msg-card-icon.is-laranja {
  background: #FFFBEB;
  color: #92400E;
}
.msg-card-icon.is-azul {
  background: #EFF6FF;
  color: #1D4ED8;
}
.msg-card-icon.is-cinza {
  background: var(--bg);
  color: var(--text-muted);
}
.msg-card-info {
  flex: 1;
  min-width: 0;
}
.msg-card-title {
  font-weight: 700;
  color: var(--text);
  font-size: 14px;
  margin-bottom: 2px;
}
.msg-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}
.msg-card-body {
  padding: 14px 16px;
}
.msg-card-body textarea {
  font-family: ui-monospace, "SF Mono", Monaco, Menlo, monospace;
  font-size: 13px;
  line-height: 1.5;
  width: 100%;
}

/* ==== ALERT (estilo usado em Z-API + Mensagens) ==== */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.5;
}
.alert svg {
  flex-shrink: 0;
  margin-top: 1px;
}
.alert strong {
  font-weight: 700;
}
.alert code {
  font-family: ui-monospace, monospace;
  background: rgba(0, 0, 0, 0.06);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 12px;
}
.alert-info {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  color: #1E3A8A;
}
.alert-info svg { color: #1D4ED8; }
.alert-warning {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  color: #78350F;
}
.alert-warning svg { color: #92400E; }

/* ==== PLACEHOLDER GRID (pros templates de mensagem) ==== */
.placeholder-grid {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 10px;
}
.placeholder-grid-header {
  font-size: 12px;
  font-weight: 700;
  color: #78350F;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.placeholder-grid-header svg {
  color: #92400E;
}
.placeholder-grid-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 6px;
  font-size: 12px;
  color: #78350F;
}
.placeholder-grid-items code {
  font-family: ui-monospace, monospace;
  background: #FFF;
  border: 1px solid #FDE68A;
  color: #92400E;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 11px;
  display: inline-block;
  margin-right: 4px;
}

/* ==== TESTE Z-API CARD ==== */
.test-card {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 16px;
}
.test-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--verde-escuro);
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
}
.test-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.test-card-form {
  display: flex;
  gap: 8px;
}
.test-card-form .form-input {
  flex: 1;
}

/* ============================================================
   Fatia 5.1 — Analytics Dashboard
   ============================================================ */

/* Switch de período */
.periodo-switcher {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.periodo-btn {
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 7px;
  transition: all 0.12s;
}
.periodo-btn:hover {
  color: var(--text);
  background: var(--bg);
}
.periodo-btn.is-active {
  background: var(--accent);
  color: #FFF;
}

/* Grid do funil (5 cards lado a lado) */
.funil-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
@media (max-width: 1100px) { .funil-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .funil-grid { grid-template-columns: 1fr; } }

.funil-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.funil-card-top {
  padding: 18px 18px 14px;
  flex: 1;
}
.funil-card-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 4px;
}
.funil-card-valor {
  font-size: 34px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}
.funil-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.3;
}
.funil-card-var {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 700;
}
.funil-card-var.is-up    { color: var(--verde-escuro); }
.funil-card-var.is-down  { color: var(--danger); }
.funil-card-var.is-neutral { color: var(--text-muted); }

/* Área do funil SVG — diagonal que liga os cards */
.funil-card-shape {
  height: 80px;
  position: relative;
  overflow: hidden;
  /* Compensa o espaçamento do grid pra diagonais parecerem contínuas */
  margin: 0 -1px;
}
.funil-card-shape svg {
  width: 100%;
  height: 100%;
  display: block;
}
.funil-card-bottom {
  padding: 8px 18px 12px;
  background: var(--accent);
  color: #FFF;
}
.funil-card-pct {
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.funil-card-pct-ant {
  font-size: 11px;
  opacity: 0.8;
  margin-top: 2px;
}

.tempos-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 16px 20px 20px;
}
@media (max-width: 900px) { .tempos-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .tempos-grid { grid-template-columns: 1fr; } }

.tempo-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  background: var(--bg);
  border-radius: 10px;
}
.tempo-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #F5EEFA;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tempo-card-body { flex: 1; min-width: 0; }
.tempo-card-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 4px;
}
.tempo-card-valor {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.01em;
}

.visitantes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 16px 20px 20px;
}
@media (max-width: 800px) { .visitantes-grid { grid-template-columns: 1fr; } }

.visitantes-card {
  padding: 14px 16px;
  background: var(--bg);
  border-radius: 10px;
}
.visitantes-card-label {
  font-weight: 700;
  color: var(--text);
  font-size: 14px;
  margin-bottom: 4px;
}
.visitantes-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 10px;
  min-height: 34px;
}
.visitantes-card-valor {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.02em;
}
.visitantes-card-pct {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 600;
}
/* ============================================================
   Fatia 5.2 — Permissões granulares + Filtro custom de período
   ============================================================
   Este arquivo é APPEND-ONLY: o aplicar-permissoes.sh acrescenta
   este conteúdo ao final do admin.css de produção.
*/

/* ============ PERMISSÕES: form de operador ============ */

.perm-painel {
  /* usa .panel base; só detalhes do conteúdo abaixo */
}

.perm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 20px 0;
  border-top: 1px solid var(--border-color);
  margin-top: 4px;
}

.perm-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: #F4EFFB;
  color: var(--accent);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}
.perm-action-btn:hover {
  background: #EBE0F5;
  border-color: #D9C5EB;
  text-decoration: none;
}

.perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  padding: 16px 20px;
}

.perm-secao {
  background: #FAFAFD;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 14px;
}

.perm-secao-titulo {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border-color);
}

.perm-secao-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.perm-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.12s;
  user-select: none;
}
.perm-item:hover {
  background: #F0EAF7;
}
.perm-item input[type="checkbox"] {
  margin: 0;
  cursor: pointer;
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
}
.perm-item-label {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
}

.perm-alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 20px 16px;
  padding: 10px 12px;
  background: #FFF8E1;
  border: 1px solid #FFE7A0;
  border-radius: 8px;
  color: #795400;
  font-size: 12px;
  line-height: 1.5;
}
.perm-alert svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #B8850D;
}

/* ============ FILTRO CUSTOM DE PERÍODO (Analytics) ============ */

.periodo-custom-wrap {
  position: relative;
}

.periodo-custom-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 100;
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.05);
  padding: 16px;
  width: 280px;
}

.periodo-custom-titulo {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.periodo-custom-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.periodo-custom-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
.periodo-custom-label > span {
  min-width: 30px;
}
.periodo-custom-label input[type="date"] {
  flex: 1;
  padding: 7px 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text-primary);
  background: #FFF;
}
.periodo-custom-label input[type="date"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.periodo-custom-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.periodo-custom-erro {
  margin-top: 10px;
  padding: 8px 10px;
  background: #FDEDED;
  color: #A33030;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

/* Botão "Personalizado" no switcher precisa ter posicionamento
   consistente com os outros .periodo-btn (já estilizados) */
#btn-periodo-custom {
  display: inline-flex;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
/* ============================================================
   FIX_5_2_1_BOTAO_CUSTOM — botão "Personalizado" estava invisível
   ============================================================
   Motivo do bug: o seletor #btn-periodo-custom tem especificidade
   maior que .periodo-btn (0,1,0,0 vs 0,0,1,0), e no CSS da 5.2
   eu tinha feito background:none + border:none sem redeclarar
   cor/padding/font, então o botão nativo do browser ficava
   invisível no fundo claro do switcher.

   Fix: redeclarar todas as propriedades visuais no seletor ID
   pra vencer a cascade e replicar o visual do .periodo-btn.
*/

#btn-periodo-custom {
  display: inline-flex;
  align-items: center;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  /* Replicado do .periodo-btn (todas as propriedades visuais) */
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 7px;
  transition: all 0.12s;
}
#btn-periodo-custom:hover {
  color: var(--text);
  background: var(--bg);
}
#btn-periodo-custom.is-active {
  background: var(--accent);
  color: #FFF;
}
/* ============================================================
   Fatia 5.4 — Integrações (Marketing e vendas)
   APPEND no admin.css
   ============================================================ */

.integracoes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 16px;
}

.int-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.int-card.is-connected {
  border-color: rgba(127, 191, 63, 0.4);
  box-shadow: 0 0 0 1px rgba(127, 191, 63, 0.1);
}

.int-card-wide {
  grid-column: 1 / -1;
}

.int-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid transparent;
}
.int-card.is-connected .int-card-head {
  border-bottom-color: rgba(127, 191, 63, 0.15);
}

.int-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.int-icon-facebook { background: #1877F2; }
.int-icon-ga       { background: #FFF; border: 1px solid var(--border-color); }
.int-icon-gtm      { background: #FFF; border: 1px solid var(--border-color); }

.int-card-head-text {
  flex: 1;
  min-width: 0;
}

.int-card-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 4px;
}

.int-card-status {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.int-card-status code {
  background: #F4EFFB;
  color: var(--accent);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-family: ui-monospace, monospace;
}

.int-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.int-status-on  { background: #7FBF3F; box-shadow: 0 0 0 3px rgba(127, 191, 63, 0.2); }
.int-status-off { background: #C0C0C0; }

.int-card-form {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, padding 0.25s ease;
}
.int-card-form.aberto {
  padding: 16px 20px 18px;
  max-height: 240px;
  border-top: 1px solid var(--border-color);
}

.int-card-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  gap: 8px;
}
.int-card-form-actions .btn-link {
  color: #A33030;
  font-size: 12px;
  font-weight: 600;
}
.int-card-form-actions > .btn-primary {
  margin-left: auto;
}

.int-card-body {
  padding: 16px 20px 20px;
}

.int-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 14px;
}

/* Alerta amarelo de configuração pendente */
.int-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
}
.int-alert svg {
  flex-shrink: 0;
  margin-top: 3px;
}
.int-alert-warn {
  background: #FFF8E1;
  border: 1px solid #FFE7A0;
  color: #795400;
}
.int-alert-warn svg { color: #B8850D; }
.int-alert strong { font-weight: 700; }

/* Info de origem (lat/lng/raio) */
.int-catalog-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  padding: 14px;
  background: #FAFAFD;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 14px;
}

.int-info-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.int-info-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.int-info-value {
  font-family: ui-monospace, monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}
.int-info-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Caixa da URL com copiar/abrir */
.int-catalog-url-box {
  background: #F4EFFB;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  padding: 14px;
}

.int-url-display {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.int-url-display code {
  flex: 1;
  min-width: 200px;
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: 6px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  color: var(--text-primary);
  word-break: break-all;
  line-height: 1.3;
}
.int-url-display .btn {
  display: inline-flex;
  align-items: center;
}
/* ============================================================
   Fatia 5.5 — Notificações de pedido novo
   APPEND no admin.css
   ============================================================ */

/* Linha de config (ícone + label + toggle à direita) */
.notif-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 0;
}

.notif-row-sub {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}

.notif-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #F4EFFB;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-info {
  flex: 1;
  min-width: 0;
}

.notif-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 2px;
}

.notif-title-sm {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 2px;
}

.notif-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Sub-configuração que aparece quando o toggle principal está ativo */
.notif-sub {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}

.notif-sub .form-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

/* Alerta pequeno (estado de permissão do navegador) */
.notif-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
}
.notif-alert > div {
  flex: 1;
}
.notif-alert svg { flex-shrink: 0; }

.notif-alert-ok {
  background: rgba(127, 191, 63, 0.1);
  border: 1px solid rgba(127, 191, 63, 0.3);
  color: #3E6A1D;
}
.notif-alert-ok svg { color: #5A9A2A; }

.notif-alert-warn {
  background: #FFF8E1;
  border: 1px solid #FFE7A0;
  color: #795400;
}
.notif-alert-warn svg { color: #B8850D; }

/* ============================================================
   BANNER STICKY no topo do admin quando tem pedidos pendentes
   ============================================================ */
.bibi-banner {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: #FFFFFF;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  animation: bibi-banner-in 0.25s ease-out;
}

@keyframes bibi-banner-in {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

@keyframes bibi-banner-pulse {
  0%, 100% { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); }
  50%      { box-shadow: 0 2px 16px rgba(255, 217, 61, 0.4); }
}

.bibi-banner.is-pulsing {
  animation: bibi-banner-in 0.25s ease-out, bibi-banner-pulse 1.5s ease-in-out infinite 0.25s;
}

.bibi-banner-icon {
  width: 32px;
  height: 32px;
  background: rgba(255, 217, 61, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFD93D;
  flex-shrink: 0;
}

.bibi-banner-text {
  flex: 1;
  min-width: 0;
}

.bibi-banner-title {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
}

.bibi-banner-sub {
  font-size: 12px;
  opacity: 0.85;
  margin-top: 2px;
}

.bibi-banner-actions {
  display: flex;
  gap: 8px;
}

.bibi-banner-btn {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-weight: 700;
  font-size: 12px;
  padding: 7px 14px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
  text-decoration: none;
}
.bibi-banner-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.bibi-banner-btn-primary {
  background: #FFD93D;
  color: var(--accent);
  border-color: #FFD93D;
}
.bibi-banner-btn-primary:hover {
  background: #FFE26B;
}

/* Aviso de interação necessária (autoplay policy) */
.bibi-autoplay-hint {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--accent);
  padding: 14px 18px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  font-size: 13px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 360px;
  z-index: 200;
  animation: bibi-banner-in 0.3s ease-out;
}

.bibi-autoplay-hint svg {
  color: var(--accent);
  flex-shrink: 0;
}

.bibi-autoplay-hint button {
  background: var(--accent);
  color: #FFFFFF;
  border: none;
  padding: 7px 14px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
}
/* ============================================================
   Fatia 5.8 — Campanhas WhatsApp (APPEND em admin.css)
   ============================================================ */

/* Status da campanha (pill) */
.campanha-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: #F3F4F6;
  color: #6B7280;
}
.campanha-status .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.campanha-status.status-rascunho   { background: #F3F4F6; color: #6B7280; }
.campanha-status.status-agendada   { background: #DBEAFE; color: #1E40AF; }
.campanha-status.status-andamento  { background: #D1FAE5; color: #065F46; }
.campanha-status.status-andamento .status-dot { animation: pulse-dot 1.5s infinite; }
.campanha-status.status-pausada    { background: #FEF3C7; color: #92400E; }
.campanha-status.status-concluida  { background: #E0E7FF; color: #3730A3; }
.campanha-status.status-cancelada  { background: #FEE2E2; color: #991B1B; }
.campanha-status.status-large {
  font-size: 14px;
  padding: 6px 14px;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Barra de progresso */
.progress-bar {
  width: 100%;
  height: 6px;
  background: #F3F4F6;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 4px;
}
.progress-bar-lg {
  height: 10px;
  border-radius: 5px;
  margin-bottom: 8px;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--verde) 0%, var(--verde-escuro) 100%);
  transition: width 0.5s ease;
  border-radius: 3px;
}
.progress-text {
  font-size: 12px;
  color: #374151;
  font-weight: 600;
}

/* Tabela de listagem (cores no nome/link) */
.campanhas-table a { color: var(--roxo); text-decoration: none; }
.campanhas-table a:hover { text-decoration: underline; }
.t-danger { color: var(--vermelho) !important; }
.t-success { color: var(--verde-escuro) !important; }

/* Form: grid dos filtros */
.grid-filtros {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (max-width: 640px) {
  .grid-filtros { grid-template-columns: 1fr; }
}
.form-field-full { grid-column: 1 / -1; }

.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 16px;
  padding: 12px 0;
  border-top: 1px solid #F3F4F6;
}
.chk, .chk-dia {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}
.chk input, .chk-dia input {
  width: 16px;
  height: 16px;
  accent-color: var(--roxo);
  cursor: pointer;
}

.dias-semana {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chk-dia {
  padding: 6px 14px;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  transition: all 0.2s;
}
.chk-dia:has(input:checked) {
  background: var(--roxo);
  border-color: var(--roxo);
  color: white;
}
.chk-dia input {
  display: none;
}

/* Preview de alvos */
.alvos-preview {
  margin-top: 20px;
  padding: 16px;
  background: linear-gradient(135deg, #F3F0FA 0%, #E9E2F7 100%);
  border-radius: 10px;
  border: 1px solid #D4C5EB;
}
.alvos-contagem {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}
.alvos-numero {
  font-size: 32px;
  font-weight: 800;
  color: var(--roxo);
  line-height: 1;
}
.alvos-label {
  font-size: 13px;
  color: var(--text);
}
.alvos-amostra {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 24px;
}
.alvo-chip {
  padding: 3px 10px;
  background: white;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--roxo);
  border: 1px solid #D4C5EB;
}

/* Variações */
.variacao-item {
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
}
.variacao-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.variacao-num {
  font-weight: 700;
  color: var(--roxo);
  font-size: 13px;
}
.variacao-item textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  background: white;
}
.variacao-item textarea:focus {
  outline: none;
  border-color: var(--roxo);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}
.btn-remover-variacao {
  background: transparent;
  border: none;
  color: #9CA3AF;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.15s;
}
.btn-remover-variacao:hover {
  background: #FEE2E2;
  color: var(--vermelho);
}

.hint-box {
  background: #FEF3C7;
  border-left: 3px solid #F59E0B;
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #78350F;
}
.hint-box code {
  background: rgba(0, 0, 0, 0.08);
  padding: 1px 6px;
  border-radius: 3px;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 12px;
}

/* Detalhe — status card */
.campanha-status-card {
  margin-bottom: 20px;
}
.status-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 8px;
}
.progress-wrap {
  margin-bottom: 20px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.stat-box {
  background: #F9FAFB;
  border-radius: 8px;
  padding: 12px 16px;
  border: 1px solid #F3F4F6;
}
.stat-label {
  font-size: 11px;
  font-weight: 600;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
}

.campanha-acoes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid #F3F4F6;
}

/* Grid 2 col para config + variações */
.grid-2-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
@media (max-width: 900px) {
  .grid-2-col { grid-template-columns: 1fr; }
}

.config-list {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 10px 16px;
  margin: 0;
  font-size: 14px;
}
.config-list dt {
  font-weight: 600;
  color: #6B7280;
}
.config-list dd {
  margin: 0;
  color: #111827;
}

.variacao-preview {
  background: #F9FAFB;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  border-left: 3px solid var(--roxo);
}
.variacao-preview:last-child { margin-bottom: 0; }
.variacao-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.variacao-texto {
  font-size: 13px;
  line-height: 1.5;
  color: #374151;
  white-space: pre-wrap;
}

/* Botões especiais */
.btn-warning {
  background: #F59E0B;
  color: white;
}
.btn-warning:hover { background: #D97706; }
.btn-danger-text {
  color: var(--vermelho);
}
.btn-danger-text:hover {
  background: #FEE2E2;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #F3F4F6;
}

/* ============================================================
   HOTFIX_58_FORM_FIELD
   Estilos base pra .form-field usado nas telas de campanhas
   ============================================================ */
.form-field {
  display: block;
  margin-bottom: 14px;
}
.form-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}
.form-field label .t-muted {
  font-weight: 400;
  color: #9CA3AF;
}
.form-field input[type="text"],
.form-field input[type="number"],
.form-field input[type="time"],
.form-field input[type="datetime-local"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
  font-family: inherit;
  color: #111827;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--roxo);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}
.form-field textarea {
  resize: vertical;
  min-height: 60px;
}
.form-field input::placeholder,
.form-field textarea::placeholder {
  color: #9CA3AF;
}


/* ============================================================
   TEMA 6DOIS — cabeçalho preto fixo com a marca; resto clean
============================================================ */
.topbar {
  background: var(--chumbo);
  border-bottom: 3px solid var(--amarelo);
}
.topbar .brand-mark { display: flex; align-items: center; }
.topbar .brand-mark img { height: 30px; width: auto; display: block; }
.topbar .store-info-pill {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  color: #CFCFCF;
}
.topbar .store-info-pill svg { color: var(--amarelo); }
.topbar .store-name { color: #fff; }
.topbar .store-state { color: #CFCFCF; }
.topbar .store-info-pill select { color: #fff; background: transparent; }
.topbar .store-info-pill select option { color: var(--text); }
.topbar .topbar-icon-btn { color: #CFCFCF; }
.topbar .topbar-icon-btn:hover { background: rgba(255,255,255,0.08); color: #fff; }
.topbar .user-name { color: #fff; }
.topbar .user-role { color: #BDBDBD; }
.topbar .avatar { background: var(--amarelo); color: var(--chumbo); font-weight: 800; }

/* Item ativo do menu: fundo amarelo suave, texto preto, barra amarela */
.nav-item.active { background: var(--accent-soft); color: var(--text); }
.nav-item.active .nav-icon { color: var(--text); }
.nav-item.active::before { background: var(--amarelo); }

/* Botões primários: preto com texto branco; hover levemente mais claro */
.btn-primary, .btn.btn-primary, button.btn-primary {
  background: var(--chumbo); border-color: var(--chumbo); color: #fff;
}
.btn-primary:hover, .btn.btn-primary:hover, button.btn-primary:hover { background: #2A2A2A; border-color: #2A2A2A; color: #fff; }

/* Links e títulos em preto */
a { color: var(--text); }
a:hover { color: #000; }
.page-header .subtitle a { text-decoration: underline; }

/* Login */
.login-page { background: var(--chumbo); }
.login-page::before {
  content: ''; position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 20% 0%, rgba(242,195,0,0.10), transparent 50%);
}
.login-box { border-radius: 14px; border-top: 4px solid var(--amarelo); }
.login-brand img { width: 150px; height: auto; display: block; margin: 0 auto 10px; }
.login-brand .tag { color: var(--text-muted); }


/* ============================================================
   KANBAN — arrastar e soltar, ações rápidas, impressão
============================================================ */
.order-card[draggable="true"] { cursor: grab; }
.order-card.is-dragging { opacity: 0.45; transform: rotate(1.5deg); cursor: grabbing; }
.order-card.is-moving { opacity: 0.5; pointer-events: none; }
.k-col.is-drop-ok { outline: 2px dashed rgba(0,0,0,0.18); outline-offset: -2px; }
.k-col.is-over { outline-color: var(--amarelo); background: rgba(242,195,0,0.10); }
.order-card.is-novo { border-left: 3px solid var(--amarelo); animation: k-novo 1.6s ease-in-out infinite; }
@keyframes k-novo { 0%, 100% { box-shadow: 0 0 0 0 rgba(242,195,0,0); } 50% { box-shadow: 0 0 0 4px rgba(242,195,0,0.35); } }
.order-card-row1 { display: flex; align-items: center; gap: 6px; }
.order-print {
  margin-left: auto; width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.order-print:hover { color: var(--text); border-color: var(--border-strong); }
.order-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.order-next {
  font: 600 12px 'Inter', sans-serif; padding: 5px 10px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
}
.order-next:hover { background: var(--hover); }
.order-next.is-accept { background: var(--chumbo); color: #fff; border-color: var(--chumbo); }
.order-next.is-accept:hover { background: #2A2A2A; }
.k-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: var(--chumbo); color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 14px;
  opacity: 0; transition: all .25s; z-index: 1000; border-left: 3px solid var(--amarelo);
}
.k-toast.is-erro { border-left-color: var(--vermelho); }
.k-toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Badge piscando no menu + banner */
.nav-badge.is-alert { background: var(--amarelo); color: var(--chumbo); animation: k-blink 1s steps(2, start) infinite; }
@keyframes k-blink { to { visibility: hidden; } }

.order-prints { margin-left: auto; display: inline-flex; gap: 4px; }
.order-prints .order-print { margin-left: 0; }

/* Impressões */
.order-print.is-done { background: var(--amarelo); border-color: var(--amarelo); color: var(--chumbo); }
.impressoes-lista { display: flex; flex-direction: column; gap: 6px; }
.impressao-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.impressao-tipo { font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; background: var(--hover); color: var(--text); }
.impressao-tipo.is-cozinha { background: rgba(242,195,0,0.18); }
.impressao-quando { color: var(--text); }
.impressao-quem { color: var(--text-muted); margin-left: auto; font-size: 12px; }

/* ===== Setores de impressão (produtos + aba Impressoras) ===== */
.imp-cell { min-width: 170px; }
.imp-opcoes { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; }
.imp-opcoes .form-check { gap: 5px; margin: 0; }
.imp-opcoes .form-check input { width: 14px; height: 14px; }
.imp-opcoes .imp-nenhum { color: var(--text-soft); }
.imp-badge-pendente { background: #D92D20; color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; margin-bottom: 5px; display: inline-block; }
.imp-cell.is-pendente { box-shadow: inset 3px 0 0 #D92D20; }
.imp-link { margin-left: 4px; text-decoration: none; opacity: .7; }
.imp-link:hover { opacity: 1; }
.imp-aviso { font-size: 11px; color: #8B5A00; margin-top: 2px; cursor: help; }
.data-table tr.row-warn > td { background: rgba(242, 195, 0, 0.13); }
.data-table tr.row-warn:hover > td { background: rgba(242, 195, 0, 0.22); }
.imp-cat summary::-webkit-details-marker { color: var(--text-soft); }
.setores-table td { vertical-align: middle; }
.setores-table tr.setor-novo td { background: var(--bg-soft, #FAFAFA); }
.setores-table tr.setor-caixa td { border-top: 2px solid var(--border); }

/* indicador do QZ Tray no cabeçalho */
.qz-indicador { position: relative; }
.qz-indicador .qz-dot { position: absolute; right: 6px; bottom: 6px; width: 9px; height: 9px; border-radius: 50%; background: #BBB; border: 2px solid #fff; }
.qz-indicador.is-on .qz-dot { background: var(--verde); }
.qz-indicador.is-off .qz-dot { background: #D92D20; animation: qz-pulse 1.6s ease-in-out infinite; }
.qz-indicador.is-off { color: #D92D20; }
@keyframes qz-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.35); opacity: .6; } }

/* modal "como resolver" */
.qz-modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 16px; }
.qz-modal-box { background: #fff; color: #111; border-radius: 12px; max-width: 560px; width: 100%; padding: 20px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.3); font-size: 14px; }
.qz-modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 16px; }
.qz-modal-x { background: none; border: 0; font-size: 22px; line-height: 1; cursor: pointer; color: #666; }
.qz-passos { padding-left: 20px; margin: 0 0 12px; }
.qz-passos li { margin: 8px 0; line-height: 1.45; }

/* abas da loja (Editar loja): cadastro + telas de configuração da loja */
.loja-tabs { flex-wrap: wrap; }
.loja-tabs .tab-btn { white-space: nowrap; }
