/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ── mapeamento Ink & Gold → variáveis do CRM ── */
  --bg:           var(--warm-canvas);     /* #EAE7E1 */
  --surface:      var(--warm-surface);    /* #FFFFFF */
  --border:       var(--warm-border);     /* #DED9D0 */
  --text:         var(--ink-800);         /* #23232B */
  --text-muted:   var(--ink-500);         /* #5A5A62 */
  --primary:      var(--ink-800);         /* #23232B */
  --primary-hover:var(--ink-700);         /* #303039 */
  --danger:       var(--error);           /* #D64545 */
  --danger-hover: #B83A3A;
  --success:      var(--success);         /* #2FA36B */
  --warn:         var(--warning);         /* #E0912B */
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.08), 0 4px 6px rgba(0,0,0,.04);

  /* negócios */
  --cz: #16A34A;   /* Carbono Zero — verde médio */
  --tm: #D4A017;   /* Tarmac — amarelo dourado */
  --el: #60A5FA;   /* Elevator — azul bebê */
  /* texto sobre fundo de negócio (contraste) */
  --cz-fg: #fff;
  --tm-fg: #1C0F00;
  --el-fg: #0B1A3A;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── Buttons ─── */
.btn-primary, .btn-secondary, .btn-danger {
  padding: 7px 16px;
  border: none;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}
.btn-primary   { background: var(--btn-primary-bg, var(--primary)); color: var(--btn-primary-text, #fff); }
.btn-primary:hover   { background: var(--primary-hover); }
.btn-secondary { background: var(--surface-raised); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-danger    { background: var(--danger); color: #fff; }
.btn-danger:hover    { background: var(--danger-hover); }
.btn-sm { padding: 5px 12px; font-size: .8rem; }

.btn-icon {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 36px; height: 36px;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.btn-icon:hover { background: var(--bg); color: var(--text); border-color: var(--text-muted); }

.btn-link {
  background: none; border: none;
  color: var(--primary); font-size: .82rem; font-weight: 600;
  cursor: pointer; padding: 0;
}
.btn-link:hover { text-decoration: underline; }

/* ─── Filtros ─── */
.filtros { display: flex; gap: 8px; }
.filtros select, .filtros input {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .875rem;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color .15s;
}
.filtros select:focus, .filtros input:focus { border-color: var(--primary); }
.filtros input { width: 200px; }

/* ─── Forms ─── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group.full-width { grid-column: 1 / -1; }
.form-group label {
  font-size: .8rem; font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .04em;
}
.form-group input, .form-group select, .form-group textarea {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .9rem;
  background: var(--bg); color: var(--text);
  outline: none; transition: border-color .15s;
  font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--primary); }
.form-group textarea { resize: vertical; }
.form-actions {
  display: flex; justify-content: flex-end;
  gap: 8px; margin-top: 24px;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #a0aec0; }

/* ─── Lucide Icons ─── */
svg.lucide {
  display: inline-block; vertical-align: middle;
  flex-shrink: 0; stroke-width: 1.75;
  width: 16px; height: 16px;
}
.sidebar-nav-item svg.lucide { width:18px; height:18px; }
.bottom-nav-btn svg.lucide   { width:22px; height:22px; }
.dash-quick-btn svg.lucide   { width:26px; height:26px; }
.stat-card svg.lucide        { width:24px; height:24px; }
.drawer-main-acao svg.lucide { width:22px; height:22px; }
.btn-fechar svg.lucide       { width:18px; height:18px; }
.btn-fechar-sm svg.lucide    { width:14px; height:14px; }
.btn-acao svg.lucide         { width:14px; height:14px; }
.card-btn svg.lucide         { width:12px; height:12px; }
.chip svg.lucide             { width:12px; height:12px; }

/* ─── Migrado de style.css ─── */
.btn-link-sugestao {
  background: none; border: none; color: var(--primary); font-weight: 600;
  cursor: pointer; text-decoration: underline; font-size: inherit;
}

/* ─── Pill group (seleção rápida sem dropdown) ─── */
.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pill {
  padding: 6px 14px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .12s, background .12s, color .12s;
  white-space: nowrap;
  font-family: inherit;
}
.pill:hover {
  border-color: var(--primary);
  color: var(--text);
}
.pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}
