.local-preview-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  background: var(--card-bg);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
}

/* Rustige werkassistent: hulpmiddel in de workflow, geen marketingbadge. */
.ai-fab {
  background: var(--text-main) !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.18) !important;
  letter-spacing: 0 !important;
  font-size: 12px !important;
}

.ai-fab:hover {
  background: var(--primary) !important;
  transform: translateY(-1px) !important;
}

.ai-fab-pulse {
  display: none !important;
}

.ai-drawer-header h2,
.lead-ai-side-header h3 {
  letter-spacing: -0.02em;
}

.ai-drawer-header h2::first-letter,
.lead-ai-side-header h3::first-letter {
  color: var(--primary);
}

.ai-preset-chip {
  background: var(--input-bg) !important;
  border-color: var(--card-border) !important;
  color: var(--text-main) !important;
  font-weight: 600 !important;
}

.ai-preset-chip:hover {
  background: var(--primary-subtle) !important;
  border-color: var(--primary) !important;
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.workflow-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.workflow-field-wide {
  grid-column: 1 / -1;
}

.workflow-field label {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.workflow-input {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--input-border);
  border-radius: 9px;
  background: var(--input-bg);
  color: var(--text-main);
  font: 600 12px var(--font-sans);
  box-sizing: border-box;
}

.workflow-input:focus {
  outline: 2px solid color-mix(in srgb, var(--primary) 25%, transparent);
  border-color: var(--primary);
}

.next-action-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  padding: 6px 8px;
  border-radius: 7px;
  background: var(--primary-subtle);
  color: var(--primary);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.3;
}

.next-action-chip.is-overdue {
  background: var(--red-subtle);
  color: var(--red);
}

.ai-presets-wrap {
  align-items: center;
  min-width: 0;
  scrollbar-width: none;
}

.ai-presets-wrap::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.ai-main-panel {
  min-width: 0;
}

.ai-drawer {
  min-width: 0;
  box-sizing: border-box;
}

.ai-preset-chip {
  min-height: 34px;
}

@media (max-width: 820px) {
  .container {
    width: 100%;
    padding: 12px;
    box-sizing: border-box;
  }

  header {
    align-items: flex-start;
    gap: 10px;
  }

  .header-actions {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .header-actions::-webkit-scrollbar,
  .segmented-tabs::-webkit-scrollbar,
  .filter-pills-row::-webkit-scrollbar,
  .ai-presets-wrap::-webkit-scrollbar {
    display: none;
  }

  .hud-strip {
    align-items: stretch;
    gap: 8px;
  }

  .hud-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 6px;
  }

  .hud-divider {
    display: none;
  }

  .hud-item {
    min-width: 0;
    padding: 6px;
    border-radius: 8px;
    background: var(--input-bg);
  }

  .controls-panel {
    padding: 10px;
  }

  .search-row {
    align-items: stretch;
  }

  .search-wrapper {
    width: 100%;
    min-width: 0;
  }

  .segmented-tabs,
  .filter-pills-row,
  .ai-presets-wrap {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    overscroll-behavior-inline: contain;
  }

  .seg-tab,
  .pill-filter,
  .ai-preset-chip {
    flex: 0 0 auto;
  }

  .lead-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .lead-card {
    min-width: 0;
  }

  .card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-actions .act-btn {
    width: 100%;
    box-sizing: border-box;
  }

  .lead-modal-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .workflow-grid {
    grid-template-columns: 1fr;
  }

  .workflow-field-wide {
    grid-column: auto;
  }

  .ai-drawer {
    width: 100%;
    max-width: none;
  }
}
