/* ==========================================================================
   ERRO ZERØ CRM — Design System PlanIQ Bento UI + Identidade Oficial errozero.site
   Paleta Oficial errozero.site:
   --olive-700: #495235 | --olive-600: #5b6742 | --olive-500: #718052
   --olive-100: #eaede3 | --mineral:   #f5f4f0 | --ink:       #1e2022
   Tipografia Oficial: Work Sans & Source Sans 3
   ========================================================================== */

:root {
  --olive-700: #495235;
  --olive-600: #5b6742;
  --olive-500: #718052;
  --olive-200: #d5dcc7;
  --olive-100: #eaede3;
  --mineral: #f5f4f0;

  --bg-canvas: #f5f4f0;
  --bg-card: #ffffff;
  --bg-subtle: #f2f3ee;
  --bg-dark-card: #1e2219;

  /* Mapeamento para manter todos os componentes do Bento Layout com as cores do site */
  --mint-primary: #5b6742;
  --mint-hover: #495235;
  --mint-soft: #eaede3;
  --mint-dark: #384028;
  --emerald-text: #495235;

  --ink-900: #1e2022;
  --ink-700: #2c3029;
  --ink-500: #60655c;
  --ink-400: #858b80;

  --border-light: #e2e4dc;
  --border-medium: #d2d5ca;

  --radius-pill: 9999px;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;

  --shadow-card: 0 6px 22px rgba(30, 32, 34, 0.045), 0 1px 3px rgba(30, 32, 34, 0.025);
  --shadow-hover: 0 14px 32px rgba(44, 48, 41, 0.085);
  --shadow-dark: 0 18px 38px rgba(24, 28, 20, 0.24);
  --transition: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html, body {
  min-height: 100vh;
  font-family: 'Source Sans 3', 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-canvas);
  color: var(--ink-900);
  font-size: 14px;
  line-height: 1.48;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .brand-title, .kpi-huge-number, .bento-card-title, .top-nav-pill, .btn-pill {
  font-family: 'Work Sans', 'Source Sans 3', sans-serif;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Scrollbar minimalista nos tons minerais/oliva */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #c7cbbd;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--olive-600);
}

/* ==========================================================================
   CONTAINER GERAL E TOPBAR EM PÍLULA (LAYOUT PLANIQ + CORES ERROZERO.SITE)
   ========================================================================== */

.app-shell {
  max-width: 1560px;
  margin: 0 auto;
  padding: 18px 28px 36px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.top-pill-navbar {
  background: var(--bg-card);
  border-radius: var(--radius-pill);
  padding: 10px 18px 10px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-light);
  position: sticky;
  top: 14px;
  z-index: 50;
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  flex-shrink: 0;
}

.brand-logo-img {
  height: 32px;
  width: auto;
  object-fit: contain;
  display: block;
}

.brand-icon-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--olive-600);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: -0.03em;
  box-shadow: 0 4px 12px rgba(73, 82, 53, 0.28);
}

.brand-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink-900);
}

.nav-pills-group {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.top-nav-pill {
  border: none;
  background: transparent;
  color: var(--ink-500);
  font-weight: 600;
  font-size: 13.5px;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.top-nav-pill:hover {
  color: var(--ink-900);
  background: var(--olive-100);
}

.top-nav-pill.active {
  background: var(--olive-600);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(73, 82, 53, 0.28);
}

.pill-count {
  font-size: 11px;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  background: rgba(73, 82, 53, 0.12);
  color: inherit;
}

.top-nav-pill.active .pill-count {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

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

.search-pill-box {
  position: relative;
  width: 230px;
}

.search-pill-box input {
  width: 100%;
  padding: 9px 14px 9px 36px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-light);
  background: var(--bg-subtle);
  font-size: 13px;
  color: var(--ink-900);
  transition: var(--transition);
}

.search-pill-box input:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--olive-600);
  box-shadow: 0 0 0 3px rgba(91, 103, 66, 0.15);
}

.search-pill-box svg {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--ink-400);
}

.icon-circle-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  background: var(--bg-subtle);
  color: var(--ink-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.icon-circle-btn:hover {
  background: var(--olive-100);
  border-color: var(--olive-600);
  color: var(--olive-700);
}

.profile-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 4px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
}

.profile-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--olive-700);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12.5px;
}

.profile-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.profile-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-900);
}

.profile-email {
  font-size: 11px;
  color: var(--ink-500);
}

/* ==========================================================================
   HERO GREETING (BEM-VINDO DE VOLTA)
   ========================================================================== */

.hero-greeting-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 4px 6px;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-sub {
  font-size: 15px;
  color: var(--ink-500);
  font-weight: 500;
  margin-bottom: 4px;
}

.hero-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink-900);
}

.hero-quick-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Botões Modernos na paleta errozero.site */
.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-mint {
  background: var(--olive-600);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(73, 82, 53, 0.25);
}
.btn-mint:hover {
  background: var(--olive-700);
  transform: translateY(-1px);
}

.btn-dark {
  background: var(--ink-900);
  color: #ffffff;
}
.btn-dark:hover {
  background: #2c3029;
  transform: translateY(-1px);
}

.btn-white {
  background: #ffffff;
  color: var(--ink-900);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-card);
}
.btn-white:hover {
  background: var(--olive-100);
  border-color: var(--olive-500);
}

.btn-sm {
  padding: 6px 13px;
  font-size: 12px;
}

/* ==========================================================================
   VIEWS CONTAINER
   ========================================================================== */

.crm-view {
  display: none;
  animation: fadeInView 0.22s ease;
}

.crm-view.active {
  display: block;
}

@keyframes fadeInView {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   VIEW 1: DASHBOARD BENTO GRID (LAYOUT PLANIQ + CORES ERROZERO.SITE)
   ========================================================================== */

.bento-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
  align-items: start;
}

.bento-left-area {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.bento-right-area {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.bento-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 22px 24px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-light);
  position: relative;
}

.bento-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.bento-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-900);
}

.bento-card-subtitle {
  font-size: 13px;
  color: var(--ink-500);
  font-weight: 600;
}

.corner-arrow-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  background: var(--bg-subtle);
  color: var(--ink-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: var(--transition);
}

.corner-arrow-btn:hover {
  background: var(--olive-600);
  border-color: var(--olive-600);
  color: #ffffff;
}

/* Linha 1: 3 Cards KPI Superiores */
.bento-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.kpi-bento-body {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-top: 8px;
}

.kpi-huge-number {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ink-900);
}

/* Visualizadores gráficos internos dos 3 KPIs */
.viz-barcode {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 32px;
  padding: 4px 8px;
  background: var(--olive-100);
  border-radius: 6px;
  flex: 1;
  max-width: 150px;
}

.viz-barcode span {
  flex: 1;
  height: 100%;
  background: var(--olive-700);
  border-radius: 1px;
  opacity: 0.75;
}

.viz-equalizer {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 34px;
  flex: 1;
  max-width: 150px;
  justify-content: flex-end;
}

.viz-equalizer .eq-col {
  width: 6px;
  border-radius: 99px;
  background: var(--olive-500);
}

.viz-slider-bar {
  display: flex;
  align-items: center;
  height: 28px;
  flex: 1;
  max-width: 155px;
  background: var(--olive-100);
  border-radius: 8px;
  padding: 4px;
  gap: 4px;
}

.viz-slider-fill {
  height: 100%;
  width: 55%;
  background: var(--olive-600);
  border-radius: 5px;
}

.viz-slider-thumb {
  width: 7px;
  height: 22px;
  background: var(--ink-900);
  border-radius: 3px;
}

/* Linha 2: Gráfico de Barras do Funil + Estatísticas de Atendimento */
.bento-middle-row {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 20px;
}

.overview-bars-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 220px;
  padding-top: 24px;
  gap: 14px;
}

.overview-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  gap: 10px;
  cursor: pointer;
}

.overview-bar-outer {
  width: 100%;
  max-width: 54px;
  background: var(--bg-subtle);
  border-radius: 14px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  transition: var(--transition);
}

.overview-bar-inner {
  width: 100%;
  background: #d9ddd0;
  border-radius: 14px;
  transition: var(--transition);
}

.overview-bar-col.highlight .overview-bar-inner {
  background: repeating-linear-gradient(
    -45deg,
    var(--olive-600),
    var(--olive-600) 6px,
    var(--olive-500) 6px,
    var(--olive-500) 12px
  );
  box-shadow: 0 6px 18px rgba(73, 82, 53, 0.3);
}

.overview-bar-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-500);
  text-align: center;
}

/* Coluna do meio: Estatísticas de Atendimento + 2 Mini Cards */
.middle-stats-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tick-strip {
  display: flex;
  gap: 3px;
  height: 26px;
  margin-top: 14px;
}

.tick-strip span {
  flex: 1;
  border-radius: 2px;
}

.mini-progress-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.file-progress-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.file-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.green-doc-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--olive-100);
  color: var(--olive-700);
  border: 1px solid var(--olive-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
}

.thin-progress-track {
  height: 6px;
  background: var(--olive-100);
  border-radius: 99px;
  overflow: hidden;
}

.thin-progress-fill {
  height: 100%;
  background: var(--olive-600);
  border-radius: 99px;
}

/* Linha 3: Lista de Chamadas (Task List) + Prioridades do Atendimento */
.bento-bottom-row {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 20px;
}

.planiq-table {
  width: 100%;
  border-collapse: collapse;
}

.planiq-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-500);
  padding: 8px 10px 12px;
  border-bottom: 1px solid var(--border-light);
}

.planiq-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
  font-size: 13px;
}

.planiq-table tr:last-child td {
  border-bottom: none;
}

.planiq-table tr:hover td {
  background: var(--bg-subtle);
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar-sm {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--olive-100);
  color: var(--olive-700);
  border: 1px solid var(--olive-200);
  font-weight: 800;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.action-green-pill {
  background: var(--olive-600);
  color: #ffffff;
  font-weight: 700;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
}

.action-green-pill:hover {
  background: var(--olive-700);
}

/* Cards numerados de prioridades (estilo PlanIQ com cores errozero.site) */
.priority-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.priority-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: var(--transition);
}

.priority-item:hover {
  transform: translateX(3px);
  border-color: var(--olive-500);
}

.priority-item.featured {
  background: var(--olive-600);
  color: #ffffff;
  border-color: var(--olive-700);
  box-shadow: 0 8px 20px rgba(73, 82, 53, 0.25);
}

.prio-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.prio-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--olive-700);
  font-weight: 800;
  font-size: 11.5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Coluna Direita: Card Escuro "Atendimento em Destaque" + Assistente IA */
.dark-spotlight-card {
  background: linear-gradient(155deg, #272d1f 0%, #191d14 100%);
  color: #ffffff;
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow-dark);
  margin-top: 8px;
  position: relative;
  border: 1px solid rgba(113, 128, 82, 0.3);
}

.dark-spotlight-title {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 8px;
}

.dark-spotlight-sub {
  font-size: 13px;
  color: #c8cebe;
  margin-bottom: 18px;
}

.start-meeting-btn {
  width: 100%;
  background: var(--olive-500);
  color: #ffffff;
  border: none;
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}

.start-meeting-btn:hover {
  background: var(--olive-600);
  transform: translateY(-1px);
}

/* Card Assistente IA (Agente ZERØ) */
.ai-assistant-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}

.ai-orb {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #98a876, #5b6742 62%, #353d26 100%);
  box-shadow: 0 10px 25px rgba(73, 82, 53, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #ffffff;
}

.ai-prompt-box {
  width: 100%;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 12px;
  text-align: left;
}

.ai-prompt-box textarea {
  width: 100%;
  border: none;
  background: transparent;
  resize: none;
  height: 54px;
  font-size: 13px;
  color: var(--ink-900);
}

.ai-prompt-box textarea:focus {
  outline: none;
}

.ai-prompt-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

.ai-mini-Send {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--olive-600);
  color: #ffffff;
  border: none;
  font-weight: 800;
  cursor: pointer;
}

.ai-quick-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
}

.ai-tile {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 10px 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-700);
  cursor: pointer;
  transition: var(--transition);
}

.ai-tile:hover {
  background: var(--olive-100);
  border-color: var(--olive-500);
  color: var(--olive-700);
}

/* ==========================================================================
   ETIQUETAS / TAG BADGES CLEAN
   ========================================================================== */

.tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.tag-badge .remove-tag {
  cursor: pointer;
  margin-left: 3px;
  opacity: 0.65;
}
.tag-badge .remove-tag:hover {
  opacity: 1;
}

/* ==========================================================================
   VIEW 2: ATENDIMENTO LIVE (INBOX WHATSAPP + FICHA DE ATENDIMENTO)
   ========================================================================== */

.clean-inbox-grid {
  display: grid;
  grid-template-columns: 330px 1fr 360px;
  gap: 18px;
  height: calc(100vh - 190px);
  min-height: 600px;
}

.clean-panel {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

.panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.filter-tabs-row {
  display: flex;
  gap: 6px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-subtle);
}

.mini-tab {
  border: none;
  background: transparent;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-500);
  cursor: pointer;
}

.mini-tab.active {
  background: var(--olive-600);
  color: #ffffff;
  font-weight: 700;
}

.call-list-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.call-card-item {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 4px;
  border: 1px solid transparent;
}

.call-card-item:hover {
  background: var(--bg-subtle);
}

.call-card-item.active {
  background: var(--olive-100);
  border-color: var(--olive-500);
}

/* Área de Mensagens do Chat */
.chat-messages-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: var(--mineral);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-bubble {
  max-width: 76%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 13.5px;
  line-height: 1.48;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.chat-bubble.client {
  align-self: flex-start;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-bottom-left-radius: 4px;
}

.chat-bubble.ai {
  align-self: flex-end;
  background: var(--olive-100);
  border: 1px solid var(--olive-200);
  color: var(--ink-900);
  border-bottom-right-radius: 4px;
}

.chat-bubble.human {
  align-self: flex-end;
  background: var(--olive-700);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.chat-composer-bar {
  padding: 14px 18px;
  border-top: 1px solid var(--border-light);
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.macro-pills-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.macro-pill-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  padding: 5px 11px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-700);
  cursor: pointer;
  white-space: nowrap;
}

.macro-pill-btn:hover {
  background: var(--olive-100);
  border-color: var(--olive-500);
}

/* ==========================================================================
   VIEW 3: FUNIL KANBAN DE ATENDIMENTO
   ========================================================================== */

.kanban-scroll-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(265px, 1fr));
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
}

.kanban-stage-col {
  background: #eceee6;
  border-radius: var(--radius-xl);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 620px;
  border: 1px solid var(--border-light);
}

.kanban-stage-col.drag-over {
  background: var(--olive-100);
  outline: 2px dashed var(--olive-600);
}

.kanban-lead-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-light);
  cursor: grab;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kanban-lead-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--olive-500);
}

/* ==========================================================================
   INPUTS E MODAIS CLEAN
   ========================================================================== */

.clean-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.clean-field label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-500);
}

.clean-field input,
.clean-field select,
.clean-field textarea {
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-medium);
  background: var(--bg-subtle);
  font-size: 13px;
}

.clean-field input:focus,
.clean-field select:focus,
.clean-field textarea:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--olive-600);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(30, 32, 34, 0.45);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-box {
  background: #ffffff;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 540px;
  padding: 24px;
  box-shadow: var(--shadow-dark);
}

.toast-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast-pill {
  background: var(--ink-900);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 13px;
  box-shadow: var(--shadow-dark);
  border-left: 4px solid var(--olive-500);
}

@media (max-width: 1240px) {
  .bento-dashboard-grid {
    grid-template-columns: 1fr;
  }
  .clean-inbox-grid {
    grid-template-columns: 280px 1fr;
  }
}
