/**
 * GAIAI V3 — CRM Pipeline, Kanban & Lead Dossier Drawer
 * Standard: Zinc-950 Dark Theme (Linear / Vercel Enterprise Standard)
 */


/* ==========================================================================
   0. Retina & Hardware-Accelerated SVG Icon Design System (Linear / Raycast Standard)
   ========================================================================== */
.crm-pipeline-container svg,
.crm-view svg,
#crm-view svg,
.crm-datagrid svg,
.dossier-drawer svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  shape-rendering: geometricPrecision;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  vertical-align: middle;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  transition: color 0.18s ease, stroke 0.18s ease, fill 0.18s ease, transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), filter 0.18s ease;
}

/* ==========================================================================
   CRM Pipeline Container
   ========================================================================== */
.crm-pipeline-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  overflow: hidden;
  background-color: var(--bg-canvas);
  position: relative;
}

/* ==========================================================================
   CRM Header & Top Actions
   ========================================================================== */
.crm-header {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.crm-title-area {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px 12px;
  gap: 16px;
}

.crm-main-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-white);
  line-height: 1.2;
}

.crm-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

.crm-actions-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* View Mode Switcher */
.view-mode-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2px;
  gap: 2px;
  margin-right: 4px;
}

.view-mode-btn {
  height: 30px;
  padding: 0 12px;
  border-radius: calc(var(--radius-md) - 2px);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--trans-fast);
  white-space: nowrap;
}

.view-mode-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.view-mode-btn.active {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.btn-primary {
  height: 34px;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 0 14px;
  font-size: 12px;
  font-weight: 600;
  gap: 6px;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.35);
  transition: all var(--trans-fast);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  height: 34px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 500;
  gap: 6px;
  transition: all var(--trans-fast);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-muted);
}

/* ==========================================================================
   KPI Metric Summary Cards
   ========================================================================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  padding: 0 24px 14px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: hidden;
  transition: all var(--trans-normal);
}

.kpi-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-muted);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.kpi-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-label {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.kpi-icon-wrap {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
}

.kpi-value {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-white);
  line-height: 1.2;
}

.kpi-footer {
  font-size: 10.5px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   Comprehensive Search & Filter Toolbar
   ========================================================================== */
.crm-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 24px 14px;
}

.toolbar-search-box {
  position: relative;
  flex: 1;
  max-width: 440px;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-dim);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  height: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0 14px 0 34px;
  font-size: 12px;
  color: var(--text-primary);
  transition: all var(--trans-fast);
}

.search-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px var(--accent-primary-glow);
  background: var(--bg-card-hover);
}

.search-input::placeholder {
  color: var(--text-dim);
}

.toolbar-search-box {
  position: relative;
  flex: 1;
  max-width: 380px;
  min-width: 240px;
  display: flex;
  align-items: center;
}

.btn-search-clear {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  border-radius: 50%;
  transition: all var(--trans-fast);
}

.btn-search-clear:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.toolbar-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-control-wrap {
  display: inline-flex;
  align-items: center;
}

.filter-select {
  height: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0 28px 0 11px;
  font-size: 11.5px;
  color: var(--text-secondary);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  transition: all var(--trans-fast);
}

.filter-select:hover,
.filter-select:focus {
  border-color: var(--border-muted);
  color: var(--text-primary);
}

.filter-select.filter-active {
  border-color: rgba(99, 102, 241, 0.55);
  background-color: rgba(99, 102, 241, 0.1);
  color: #e0e7ff;
}

.btn-clear-filters {
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  font-size: 11.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--trans-fast);
  white-space: nowrap;
}

.btn-clear-filters:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.btn-clear-filters.active {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.btn-clear-filters:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: color 0.18s ease, stroke 0.18s ease, background 0.18s ease, border-color 0.18s ease, transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), filter 0.18s ease, box-shadow 0.18s ease;
}

.btn-icon:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-muted);
  color: var(--text-primary);
  filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.45));
}

.btn-icon svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  shape-rendering: geometricPrecision;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-icon:hover svg {
  transform: scale(1.06);
}

/* ==========================================================================
   High-Density DataGrid Table (Linear / Vercel Enterprise Standard)
   ========================================================================== */
.crm-datagrid-wrapper {
  flex: 1;
  min-height: 0;
  overflow-x: auto;
  overflow-y: auto;
  padding: 0 24px 20px;
  position: relative;
}

.crm-datagrid {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
  table-layout: auto;
  min-width: 980px;
}

/* Sticky Header */
.crm-datagrid thead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #0d0d12;
}

.crm-datagrid thead th {
  background: #111116;
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-medium);
  border-top: 1px solid var(--border-subtle);
  white-space: nowrap;
  user-select: none;
  text-align: left;
}

.crm-datagrid thead th:first-child {
  border-top-left-radius: var(--radius-md);
  border-left: 1px solid var(--border-subtle);
}

.crm-datagrid thead th:last-child {
  border-top-right-radius: var(--radius-md);
  border-right: 1px solid var(--border-subtle);
}

.crm-datagrid th .th-content {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.crm-datagrid th .th-content.justify-end {
  justify-content: flex-end;
}

.crm-datagrid th.sortable {
  cursor: pointer;
  transition: color var(--trans-fast);
}

.crm-datagrid th.sortable:hover {
  color: var(--text-primary);
}

.crm-datagrid th.sort-active {
  color: #818cf8;
}

.sort-icon-idle {
  color: var(--text-dim);
  opacity: 0.45;
  transition: opacity var(--trans-fast);
}

.crm-datagrid th.sortable:hover .sort-icon-idle {
  opacity: 0.9;
  color: var(--text-muted);
}

.sort-icon-active {
  color: #818cf8;
}

/* Table Body & Rows */
.crm-datagrid tbody tr.crm-row {
  background: var(--bg-card);
  transition: background-color 120ms ease, border-color 120ms ease;
  cursor: pointer;
}

.crm-datagrid tbody tr.crm-row:nth-child(even) {
  background: rgba(18, 18, 24, 0.65);
}

.crm-datagrid tbody tr.crm-row:hover {
  background: var(--bg-card-hover);
}

.crm-datagrid tbody tr.crm-row.selected {
  background: rgba(99, 102, 241, 0.12) !important;
}

.crm-datagrid td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font-size: 12px;
  vertical-align: middle;
  white-space: nowrap;
}

.crm-datagrid tbody tr:last-child td {
  border-bottom: 1px solid var(--border-subtle);
}

.crm-datagrid tbody tr:last-child td:first-child {
  border-bottom-left-radius: var(--radius-md);
  border-left: 1px solid var(--border-subtle);
}

.crm-datagrid tbody tr:last-child td:last-child {
  border-bottom-right-radius: var(--radius-md);
  border-right: 1px solid var(--border-subtle);
}

.crm-datagrid tbody tr td:first-child {
  border-left: 1px solid var(--border-subtle);
}

.crm-datagrid tbody tr td:last-child {
  border-right: 1px solid var(--border-subtle);
}

/* Checkbox Column */
.th-checkbox, .td-checkbox {
  width: 38px;
  text-align: center;
  padding-left: 14px !important;
  padding-right: 8px !important;
}

.crm-checkbox {
  width: 15px;
  height: 15px;
  accent-color: #6366f1;
  cursor: pointer;
  border-radius: 3px;
  vertical-align: middle;
  margin: 0;
}

/* Index Column */
.th-index, .td-index {
  width: 44px;
  text-align: center;
  font-size: 11px;
}

/* Name Column */
.lead-name-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 240px;
}

.lead-primary-name {
  font-weight: 600;
  color: var(--text-white);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-web-link-icon {
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border-radius: 3px;
  transition: color var(--trans-fast);
  flex-shrink: 0;
}

.lead-web-link-icon:hover {
  color: var(--accent-primary);
}

/* Category Pill in Table */
.category-pill-table {
  font-size: 10.5px;
  font-weight: 500;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.22);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Phone */
.lead-phone-text {
  font-size: 11.5px;
  color: var(--text-secondary);
}

/* Rating Cell */
.rating-cell {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.rating-val {
  color: #fbbf24;
  font-size: 12px;
}

/* Reviews Count Badge */
.reviews-count-badge {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Address Cell */
.address-cell-text {
  display: inline-block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
  font-size: 11.5px;
}

/* Status Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.status-badge .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-badge.blue {
  background: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.28);
}
.status-badge.blue .status-dot {
  background: #3b82f6;
  box-shadow: 0 0 6px rgba(59, 130, 246, 0.7);
}

.status-badge.amber {
  background: rgba(245, 158, 11, 0.12);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.28);
}
.status-badge.amber .status-dot {
  background: #f59e0b;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.7);
}

.status-badge.purple {
  background: rgba(139, 92, 246, 0.12);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.28);
}
.status-badge.purple .status-dot {
  background: #8b5cf6;
  box-shadow: 0 0 6px rgba(139, 92, 246, 0.7);
}

.status-badge.emerald {
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.28);
}
.status-badge.emerald .status-dot {
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.7);
}

.status-badge.green {
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.28);
}
.status-badge.green .status-dot {
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.7);
}

/* Mini Proof Badge in Table */
.mini-proof-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
}

.mini-proof-badge.email-proof {
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.mini-proof-badge.meet-proof {
  background: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.28);
}

.mini-proof-badge.call-proof {
  background: rgba(139, 92, 246, 0.12);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.28);
}

.mini-proof-badge.pending-proof {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
  border: 1px solid var(--border-subtle);
}

.proof-badges-cell {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.phone-cell-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Inline Interactive Stage Selector Dropdown */
.inline-stage-select {
  height: 26px;
  padding: 0 22px 0 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  transition: all var(--trans-fast);
  white-space: nowrap;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
}

.inline-stage-select:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
}

.inline-stage-select:focus {
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.4);
}

.inline-stage-select option {
  background: #18181b;
  color: #f4f4f5;
  font-size: 12px;
}

.inline-stage-select.stage-yeni {
  background-color: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.32);
}

.inline-stage-select.stage-aranacak {
  background-color: rgba(245, 158, 11, 0.12);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.32);
}

.inline-stage-select.stage-arandi {
  background-color: rgba(139, 92, 246, 0.12);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.32);
}

.inline-stage-select.stage-onaylandi {
  background-color: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.32);
}

.inline-stage-select.stage-kazanildi {
  background-color: rgba(34, 197, 94, 0.14);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

/* Row Action Buttons */
.row-actions-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}

.btn-table-action {
  height: 27px;
  padding: 0 9px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.btn-table-call {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #c7d2fe;
}

.btn-table-call:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.45);
}

.btn-table-detail {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.btn-table-detail:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--border-muted);
  color: var(--text-primary);
}

/* Empty Table State */
.empty-table-cell {
  padding: 60px 20px !important;
  text-align: center;
  background: transparent !important;
}

.empty-state-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.empty-state-icon {
  margin-bottom: 4px;
}

.empty-state-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.empty-state-desc {
  font-size: 12px;
  color: var(--text-dim);
}

/* ==========================================================================
   DataGrid Pagination Bar (Linear / Apollo.io Standard)
   ========================================================================== */
.crm-pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  gap: 16px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.pagination-info {
  font-size: 11.5px;
  color: var(--text-muted);
}

.pagination-info strong {
  color: var(--text-primary);
  font-weight: 600;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-page-nav {
  height: 28px;
  padding: 0 9px;
  font-size: 11.5px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.btn-page-nav:hover:not(:disabled) {
  background: var(--bg-card-hover);
  border-color: var(--border-muted);
  color: var(--text-primary);
}

.btn-page-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pagination-pages {
  display: flex;
  align-items: center;
  gap: 3px;
  margin: 0 4px;
}

.btn-page-num {
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  font-size: 11.5px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--trans-fast);
}

.btn-page-num:hover:not(.active) {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.btn-page-num.active {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.35);
  border-color: rgba(255, 255, 255, 0.12);
}

.pagination-ellipsis {
  padding: 0 4px;
  color: var(--text-dim);
  font-size: 12px;
  user-select: none;
}

.pagination-size-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-size-label {
  font-size: 11.5px;
  color: var(--text-muted);
}

.pagination-select {
  height: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0 24px 0 8px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  transition: all var(--trans-fast);
}

.pagination-select:hover,
.pagination-select:focus {
  border-color: var(--border-muted);
  color: var(--text-primary);
}

/* ==========================================================================
   Floating Batch Action Bar
   ========================================================================== */
.batch-action-bar {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(18, 18, 24, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(99, 102, 241, 0.3);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-full);
  padding: 8px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 50;
  animation: batchSlideUp 220ms cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

@keyframes batchSlideUp {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.batch-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
}

.batch-count-badge {
  background: var(--accent-primary);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.batch-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-batch {
  height: 28px;
  padding: 0 11px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.btn-batch-csv {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
}

.btn-batch-csv:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.28);
}

.batch-status-group {
  display: flex;
  align-items: center;
  gap: 5px;
  padding-left: 10px;
  border-left: 1px solid var(--border-medium);
}

.batch-sublabel {
  font-size: 11px;
  color: var(--text-muted);
  margin-right: 3px;
}

.btn-batch-status {
  height: 25px;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--trans-fast);
}

.btn-batch-status:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.45);
  color: #ffffff;
}

.btn-batch-clear {
  height: 25px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 4px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: color var(--trans-fast);
}

.btn-batch-clear:hover {
  color: var(--text-primary);
}

/* ==========================================================================
   5-Column Kanban Board & B2B Sales Pipeline
   ========================================================================== */
.kanban-board {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(260px, 1fr));
  gap: 14px;
  padding: 16px 24px 20px;
  overflow-x: auto;
  overflow-y: hidden;
  align-items: stretch;
}

.kanban-column {
  background: rgba(18, 18, 24, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color var(--trans-fast), background-color var(--trans-fast), box-shadow var(--trans-fast);
}

.kanban-column.drag-over {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.08);
  box-shadow: 0 0 24px rgba(99, 102, 241, 0.22), inset 0 0 16px rgba(99, 102, 241, 0.1);
}

.column-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
  flex-shrink: 0;
  gap: 8px;
}

.column-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.status-indicator-pill {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.status-indicator-pill.blue {
  background-color: #3b82f6;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
}

.status-indicator-pill.amber {
  background-color: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
}

.status-indicator-pill.purple {
  background-color: #8b5cf6;
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.6);
}

.status-indicator-pill.emerald {
  background-color: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.status-indicator-pill.green {
  background-color: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

.column-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.column-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.column-count-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  padding: 1px 7px;
  border-radius: var(--radius-full);
}

.btn-col-search {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.btn-col-search:hover,
.btn-col-search.active {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(99, 102, 241, 0.4);
  color: #c7d2fe;
}

/* Inline Column Search Bar */
.column-search-bar {
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 6px;
  animation: colSearchSlideDown 150ms ease-out;
}

@keyframes colSearchSlideDown {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.col-search-input {
  flex: 1;
  height: 28px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0 8px;
  font-size: 11px;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--trans-fast), box-shadow var(--trans-fast);
}

.col-search-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 1px var(--accent-primary-glow);
}

.col-search-input::placeholder {
  color: var(--text-dim);
}

.btn-col-search-clear {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  border-radius: 3px;
  transition: color var(--trans-fast);
}

.btn-col-search-clear:hover {
  color: var(--text-primary);
}

/* "Aranacak" Kolonuna Özel Otonom Arama Bannerı */
.column-banner-action {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(245, 158, 11, 0.2);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.08) 0%, rgba(245, 158, 11, 0.02) 100%);
}

.btn-autonomous-call {
  width: 100%;
  height: 32px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.92) 0%, rgba(217, 119, 6, 0.95) 100%);
  border: 1px solid rgba(251, 191, 36, 0.5);
  color: #0b0b0f;
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--trans-fast);
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.28);
}

.btn-autonomous-call:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.45);
}

.btn-autonomous-call:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.25);
}

.autonomous-call-icon {
  display: inline-flex;
  align-items: center;
  animation: zapPulse 2s ease-in-out infinite;
}

@keyframes zapPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.18);
    opacity: 1;
  }
}

.autonomous-call-count {
  font-size: 10px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.25);
  color: #000000;
  padding: 1px 5px;
  border-radius: var(--radius-full);
}

.column-cards-container {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: background-color var(--trans-fast);
}

.empty-column-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 14px;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.12);
  margin: auto 0;
  gap: 6px;
}

.empty-col-icon {
  display: inline-flex;
  align-items: center;
  margin-bottom: 2px;
  opacity: 0.7;
}

.empty-col-text {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  margin: 0;
}

.empty-col-hint {
  font-size: 9.5px;
  color: var(--text-dim);
}

/* ==========================================================================
   Rich B2B Lead Cards & Drag-and-Drop
   ========================================================================== */
.lead-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: grab;
  user-select: none;
  transition: background-color var(--trans-fast), border-color var(--trans-fast), box-shadow var(--trans-fast), transform var(--trans-fast);
  position: relative;
}

.lead-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}

.lead-card:active {
  cursor: grabbing;
}

.lead-card.dragging {
  opacity: 0.45;
  transform: scale(0.98);
  border: 1px dashed var(--accent-primary);
  background: rgba(99, 102, 241, 0.08);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

.lead-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.lead-title-box {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.category-tag {
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.24);
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  align-self: flex-start;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lead-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

.review-sub {
  font-size: 9.5px;
  color: var(--text-dim);
  font-weight: 500;
}

.lead-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
}

.lead-phone-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.lead-phone {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-secondary);
  font-size: 11px;
  text-decoration: none;
  transition: color var(--trans-fast);
}

.lead-phone:hover {
  color: #818cf8;
  text-decoration: underline;
}

.phone-type-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 1px 5px;
  border-radius: 3px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.phone-type-badge.gsm {
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.phone-type-badge.landline {
  background: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.28);
}

.lead-web-link {
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border-radius: 4px;
  transition: color var(--trans-fast);
  flex-shrink: 0;
}

.lead-web-link:hover {
  color: var(--accent-primary);
}

.lead-address-line {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 4px;
}

.address-pin-icon {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

/* Proof Badges */
.lead-proof-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}

.proof-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
}

.proof-badge.email-proof {
  background: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.28);
}

.proof-badge.meet-proof {
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.28);
}

/* Kart Aksiyon Barı (Ara, 360°, Düzenle, Sil) */
.lead-card-footer {
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.card-action-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  width: 100%;
}

.btn-card-action {
  height: 27px;
  padding: 0 6px;
  border-radius: var(--radius-sm);
  font-size: 10.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: all var(--trans-fast);
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  white-space: nowrap;
}

.btn-card-action:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: var(--border-muted);
}

.btn-card-action.btn-card-call {
  background: rgba(99, 102, 241, 0.14);
  border-color: rgba(99, 102, 241, 0.32);
  color: #c7d2fe;
}

.btn-card-action.btn-card-call:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.45);
}

.btn-card-action.btn-card-dossier {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-subtle);
  color: var(--text-secondary);
}

.btn-card-action.btn-card-dossier:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-muted);
  color: var(--text-white);
}

.btn-card-action.btn-card-edit {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.22);
  color: #fcd34d;
}

.btn-card-action.btn-card-edit:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.45);
  color: #ffffff;
}

.btn-card-action.btn-card-delete {
  background: rgba(244, 63, 94, 0.08);
  border-color: rgba(244, 63, 94, 0.22);
  color: #fda4af;
}

.btn-card-action.btn-card-delete:hover {
  background: rgba(244, 63, 94, 0.22);
  border-color: rgba(244, 63, 94, 0.45);
  color: #ffffff;
}

/* ==========================================================================
   Slide-over Lead Detail Drawer (#lead-detail-drawer)
   ========================================================================== */
.lead-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  display: flex;
  justify-content: flex-end;
}

.lead-drawer.hidden {
  display: none;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 280ms ease;
  pointer-events: none;
}

.lead-drawer.visible .drawer-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.drawer-content {
  position: relative;
  width: 460px;
  max-width: 90vw;
  height: 100%;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-medium);
  box-shadow: var(--shadow-drawer);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 24px;
  gap: 20px;
  transform: translateX(100%);
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
  z-index: 10;
}

.lead-drawer.visible .drawer-content {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-header-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-pill {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.14);
  border: 1px solid rgba(99, 102, 241, 0.28);
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.btn-drawer-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--trans-fast);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.btn-drawer-close:hover {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.45);
  transform: scale(1.05);
}

.btn-drawer-close:active {
  transform: scale(0.95);
}

.drawer-title-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.drawer-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: -0.02em;
}

.drawer-address {
  font-size: 12px;
  color: var(--text-muted);
}

/* Quick Action Bar */
.drawer-actions-bar {
  display: flex;
  gap: 8px;
}

.btn-action-primary {
  flex: 1.2;
  height: 38px;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-md);
  gap: 6px;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.35);
  transition: all var(--trans-fast);
}

.btn-action-primary:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  transform: translateY(-1px);
}

.btn-action-secondary {
  flex: 1;
  height: 38px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-md);
  gap: 6px;
  transition: all var(--trans-fast);
}

.btn-action-secondary:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-muted);
}

/* Drawer Sections */
.drawer-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* Stage Selector */
.stage-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.stage-pill {
  padding: 5px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 500;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  transition: all var(--trans-fast);
}

.stage-pill:hover {
  color: var(--text-primary);
  border-color: var(--border-muted);
}

.stage-pill.active {
  background: rgba(99, 102, 241, 0.16);
  color: #c7d2fe;
  border-color: rgba(99, 102, 241, 0.4);
  font-weight: 600;
}

/* Contact Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.info-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-key {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 5px;
}

.info-val {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  word-break: break-all;
}

.info-link {
  color: var(--accent-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Notes Textarea */
.section-header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.save-status-indicator {
  font-size: 10px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.notes-textarea {
  width: 100%;
  min-height: 84px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text-primary);
  line-height: 1.5;
  resize: vertical;
  transition: all var(--trans-fast);
}

.notes-textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px var(--accent-primary-glow);
}

/* Call Activity & History Timeline */
.activity-timeline {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  padding-left: 18px;
  border-left: 1px solid var(--border-subtle);
  margin-left: 6px;
}

.timeline-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timeline-dot {
  position: absolute;
  left: -23px;
  top: 4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-muted);
  border: 2px solid var(--bg-surface);
}

.timeline-dot.success {
  background: var(--accent-success);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.7);
}

.timeline-dot.pending {
  background: var(--accent-warning);
}

.timeline-dot.neutral {
  background: var(--text-dim);
}

.timeline-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.timeline-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.timeline-time {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
}

.timeline-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ==========================================================================
   GAIAI V3 Multi-View Sub-Nav Tabs & Subviews Mimarisi
   ========================================================================== */
.crm-subnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  gap: 12px;
}

.crm-subnav-items {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.crm-subnav-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--trans-fast);
  white-space: nowrap;
}

.crm-subnav-tab:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: var(--border-muted);
}

.crm-subnav-tab.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.16) 0%, rgba(79, 70, 229, 0.28) 100%);
  border-color: rgba(99, 102, 241, 0.65);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.22);
}

.subnav-badge-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

.crm-subnav-tab.active .subnav-badge-num {
  background: rgba(99, 102, 241, 0.4);
  color: #c7d2fe;
}

.subnav-pill-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 600;
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.subnav-pill-count.total {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
}

.subnav-selected-indicator {
  display: inline-block;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.crm-subview-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  height: calc(100% - 55px);
  overflow: hidden;
}

.crm-subview-panel:not(.active) {
  display: none !important;
}

.crm-subview-panel.active {
  display: flex !important;
}

.crm-subview-panel[style*="display: none"] {
  display: none !important;
}

/* ==========================================================================
   Subview 1: Kazıma & Ayıklama (Harvesting & Quarantine)
   ========================================================================== */
.harvest-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px 24px;
  overflow-y: auto;
  height: 100%;
}

.harvest-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.harvest-hero-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.harvest-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 8px;
}

.harvest-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.harvest-form-grid {
  display: grid;
  grid-template-columns: 2fr 2fr 1fr auto;
  gap: 12px;
  align-items: flex-end;
}

.form-group-harvest {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label-harvest {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-input-harvest {
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-muted);
  color: var(--text-primary);
  font-size: 12.5px;
  outline: none;
  transition: all var(--trans-fast);
}

.form-input-harvest:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.harvest-kpi-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.harvest-kpi-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.harvest-kpi-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.harvest-kpi-val {
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-white);
}

.harvest-table-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.harvest-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.015);
}

.harvest-table-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.harvest-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quarantine-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 10.5px;
  font-weight: 600;
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* ==========================================================================
   Subview 3: Müşteri 360° Detay (Dossier View)
   ========================================================================== */
.dossier-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px 24px;
  overflow-y: auto;
  height: 100%;
}

.dossier-hero {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.dossier-lead-title-area {
  display: flex;
  align-items: center;
  gap: 16px;
}

.dossier-lead-avatar {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(79, 70, 229, 0.4) 100%);
  border: 1px solid rgba(99, 102, 241, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: #a5b4fc;
}

.dossier-lead-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-white);
  line-height: 1.2;
}

.dossier-lead-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 5px;
}

.dossier-controls-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dossier-lead-select {
  height: 34px;
  padding: 0 10px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-muted);
  color: var(--text-primary);
  font-size: 12px;
  max-width: 220px;
}

.dossier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.dossier-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dossier-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.dossier-info-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dossier-info-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dossier-info-label {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dossier-info-val {
  font-size: 13px;
  color: var(--text-primary);
  word-break: break-word;
}

.dossier-notes-textarea {
  width: 100%;
  min-height: 120px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-muted);
  color: var(--text-primary);
  padding: 10px 12px;
  font-size: 12px;
  resize: vertical;
  line-height: 1.5;
  outline: none;
}

.dossier-notes-textarea:focus {
  border-color: var(--accent-primary);
}

/* ==========================================================================
   Subview 4: Excel & CSV Senkronizasyon (Sync View)
   ========================================================================== */
.sync-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
  overflow-y: auto;
  height: 100%;
}

.sync-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.sync-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sync-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.sync-icon-box {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sync-icon-box.import {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.sync-icon-box.export {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.sync-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-white);
}

.sync-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

.upload-dropzone {
  border: 2px dashed var(--border-muted);
  border-radius: var(--radius-lg);
  padding: 28px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.015);
  cursor: pointer;
  transition: all var(--trans-fast);
  text-align: center;
}

.upload-dropzone:hover, .upload-dropzone.dragover {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.06);
}

.mapping-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}

.mapping-table th {
  text-align: left;
  padding: 6px 10px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-subtle);
  font-weight: 600;
}

.mapping-table td {
  padding: 6px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
}

.mapping-code {
  font-family: var(--font-mono);
  color: #a5b4fc;
}

.sync-result-box {
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sync-result-box.success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.sync-result-box.error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

@media (max-width: 1100px) {
  .dossier-grid {
    grid-template-columns: 1fr;
  }
  .sync-grid {
    grid-template-columns: 1fr;
  }
  .harvest-form-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   GAIAI V3 — Specialized Sub-Pages: Harvester, Lead Dossier & Sync Hub
   Design Standard: Datadog / Linear High-Density Zinc-950 Monochrome Theme
   ========================================================================== */

/* Sub-Navigation Tabs Bar */
.crm-subnav-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #09090b;
  border-bottom: 1px solid #27272a;
  position: sticky;
  top: 0;
  z-index: 20;
}

.crm-subnav-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #a1a1aa;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.crm-subnav-tab:hover {
  color: #f4f4f5;
  background: #18181b;
  border-color: #27272a;
}

.crm-subnav-tab.active {
  color: #ffffff;
  background: #27272a;
  border-color: #3f3f46;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* --------------------------------------------------------------------------
   CrmHarvester.js Workspace Styles
   -------------------------------------------------------------------------- */
.harvester-workspace {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 18px;
  background: #09090b;
  height: 100%;
  box-sizing: border-box;
  overflow-y: auto;
}

.harvester-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid #1f1f23;
  flex-shrink: 0;
}

.harvester-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.harvester-title {
  font-size: 15px;
  font-weight: 700;
  color: #fafafa;
  margin: 0;
  letter-spacing: -0.01em;
}

.harvester-desc {
  font-size: 11px;
  color: #71717a;
  margin-top: 1px;
  max-width: 650px;
}

.btn-toggle-telemetry {
  height: 30px;
  padding: 0 10px;
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 6px;
  color: #a1a1aa;
  font-size: 11px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-toggle-telemetry:hover {
  background: #27272a;
  color: #fafafa;
  border-color: #3f3f46;
}

.btn-toggle-telemetry.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
}

.hud-pill-tag {
  font-size: 9px;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 1px 5px;
  border-radius: 3px;
  background: #27272a;
  color: #71717a;
}

.hud-pill-tag.active {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.harvester-live-ticker {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: #121215;
  border: 1px solid #27272a;
  border-radius: 6px;
  flex-shrink: 0;
}

.btn-ticker-open {
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.harvester-control-card {
  background: #121215;
  border: 1px solid #27272a;
  border-radius: 8px;
  padding: 10px 14px;
  flex-shrink: 0;
}

.control-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.8fr 1fr 1.1fr 1.3fr;
  gap: 12px;
  align-items: start;
}

.control-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.control-field.flex-end-col {
  justify-content: flex-start;
  padding-top: 18px;
}

.control-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #a1a1aa;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.control-input, .control-select {
  width: 100%;
  box-sizing: border-box;
  height: 36px;
  padding: 0 12px;
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 6px;
  color: #fafafa;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s ease;
}

.control-input:focus, .control-select:focus {
  border-color: #6366f1;
}

.control-slider {
  width: 100%;
  accent-color: #6366f1;
  cursor: pointer;
}

.control-val-badge {
  font-size: 11px;
  color: #818cf8;
  background: rgba(99, 102, 241, 0.1);
  padding: 1px 6px;
  border-radius: 4px;
}

.harvester-industry-field {
  position: relative;
}

.harvester-quick-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  margin-top: 6px;
}

.quick-preset-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #71717a;
  font-weight: 600;
  margin-right: 2px;
}

.preset-chip-btn {
  padding: 2px 8px;
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 9999px;
  color: #a1a1aa;
  font-size: 10.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  line-height: 1.4;
}

.preset-chip-btn:hover {
  background: #27272a;
  color: #ffffff;
  border-color: #6366f1;
}

.preset-chip-btn.active {
  background: rgba(99, 102, 241, 0.18);
  border-color: #6366f1;
  color: #a5b4fc;
}

.btn-primary-harvester {
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  background: #4f46e5;
  color: #ffffff;
  border: 1px solid #6366f1;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
}

.btn-primary-harvester:hover:not(:disabled) {
  background: #4338ca;
}

.btn-primary-harvester:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Abort Button */
.btn-abort-harvest {
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 14px;
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-abort-harvest:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #ffffff;
}

.btn-abort-harvest:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Telemetry & Stream Row */
.harvester-telemetry-row {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 16px;
}

.telemetry-log-panel {
  background: #0d0d10;
  border: 1px solid #27272a;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 140px;
}

.telemetry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #141418;
  border-bottom: 1px solid #27272a;
}

.telemetry-title {
  font-size: 10.5px;
  font-weight: 600;
  color: #a1a1aa;
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
}

.telemetry-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #71717a;
}

.telemetry-dot.active {
  background: #34d399;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.6);
  animation: pulse 1.5s infinite;
}

.telemetry-terminal {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  line-height: 1.45;
}

.log-line {
  display: flex;
  gap: 8px;
}

.log-time {
  color: #71717a;
  flex-shrink: 0;
}

.log-info .log-text { color: #d4d4d8; }
.log-warn .log-text { color: #fbbf24; }
.log-success .log-text { color: #34d399; }

/* Scraper HUD & Telemetry Card */
.telemetry-metrics-card {
  background: #121215;
  border: 1px solid #27272a;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  height: 140px;
}

.telemetry-hud-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 6px;
  border-bottom: 1px solid #1f1f23;
}

.hud-title {
  font-size: 10.5px;
  font-weight: 600;
  color: #a1a1aa;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hud-status {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
}

.hud-status.active {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  animation: pulse 1.5s infinite;
}

.hud-status.idle {
  background: #18181b;
  color: #71717a;
  border: 1px solid #27272a;
}

.hud-item-url {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hud-sub-label {
  font-size: 9.5px;
  color: #71717a;
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.telemetry-url-link {
  font-size: 11px;
  color: #818cf8;
  display: flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  background: #18181b;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #27272a;
  max-width: 100%;
  overflow: hidden;
}

.telemetry-url-link:hover {
  text-decoration: underline;
  border-color: #6366f1;
}

.progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: #18181b;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid #27272a;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #4f46e5, #06b6d4, #10b981);
  transition: width 0.3s ease;
}

.hud-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.hud-stat-box {
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 6px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hud-stat-val {
  font-size: 13px;
  font-weight: 700;
}

.quarantine-kpi-panel {
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  gap: 8px;
}

.q-kpi-item {
  background: #121215;
  border: 1px solid #27272a;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.q-kpi-label {
  font-size: 10.5px;
  color: #71717a;
  font-weight: 500;
  text-transform: uppercase;
}

.q-kpi-val {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.q-kpi-sub {
  font-size: 10px;
  color: #52525b;
}

/* Quarantine Table Card */
.quarantine-table-card {
  background: #121215;
  border: 1px solid #27272a;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
  min-height: 480px;
}

.quarantine-table-card.hero-table {
  flex: 1;
  min-height: 520px;
}

.quarantine-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #27272a;
  flex-wrap: wrap;
  gap: 10px;
  flex-shrink: 0;
}

.q-table-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.q-table-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #fafafa;
}

.q-table-counter {
  font-size: 11px;
  color: #a1a1aa;
  background: #1f1f23;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #27272a;
}

.q-table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-action-harvest {
  height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-transfer {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.btn-transfer:hover:not(:disabled) {
  background: rgba(16, 185, 129, 0.25);
  border-color: #34d399;
}

.btn-transfer:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-dedup {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.btn-dedup:hover {
  background: rgba(245, 158, 11, 0.22);
}

.btn-export-raw {
  background: #18181b;
  border: 1px solid #27272a;
  color: #d4d4d8;
}

.btn-export-raw:hover {
  background: #27272a;
  color: #ffffff;
}

.quarantine-table-wrap {
  overflow-x: auto;
  overflow-y: auto;
  flex: 1;
  min-height: 420px;
  max-height: none;
}

.quarantine-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.quarantine-table th {
  position: sticky;
  top: 0;
  background: #18181b;
  border-bottom: 1px solid #27272a;
  padding: 8px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: #a1a1aa;
  letter-spacing: 0.03em;
  z-index: 10;
}

.quarantine-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #1f1f23;
  color: #d4d4d8;
  vertical-align: middle;
}

.q-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.q-row.is-dup-row {
  background: rgba(245, 158, 11, 0.03);
}

.badge-e164-valid {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-family: var(--font-mono);
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-e164-invalid {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-family: var(--font-mono);
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.badge-dup {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
  font-weight: 500;
}

.badge-clean {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.1);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.25);
  font-weight: 500;
}

.badge-gsm {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-weight: 600;
}

.badge-landline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
  font-weight: 500;
}

.badge-invalid {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
  font-weight: 500;
}

.badge-web {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.1);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.2);
  text-decoration: none;
}

.badge-web:hover {
  text-decoration: underline;
  border-color: #818cf8;
}

.badge-email {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(236, 72, 153, 0.1);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.2);
}

.badge-geo-exact {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-weight: 500;
}

.badge-geo-partial {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
  font-weight: 500;
}

.badge-geo-mismatch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  font-weight: 600;
}

.btn-action-harvest.btn-mismatch {
  background: rgba(245, 158, 11, 0.08);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.btn-action-harvest.btn-mismatch:hover:not(:disabled) {
  background: rgba(245, 158, 11, 0.18);
  border-color: #fbbf24;
  color: #fef3c7;
}

.badge-new-stream {
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 3px;
  background: #10b981;
  color: #000000;
  font-weight: 700;
  animation: pulse 1s infinite;
}

.row-highlight-new {
  animation: row-flash-green 2.5s ease-out;
}

@keyframes row-flash-green {
  0% { background: rgba(16, 185, 129, 0.25); }
  100% { background: transparent; }
}

/* Table Controls & Filters */
.q-table-left-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.q-filter-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #18181b;
  padding: 2px;
  border-radius: 6px;
  border: 1px solid #27272a;
}

.q-filter-tab {
  height: 26px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 500;
  color: #71717a;
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.q-filter-tab:hover {
  color: #d4d4d8;
}

.q-filter-tab.active {
  background: #27272a;
  color: #ffffff;
  font-weight: 600;
}

.q-search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 6px;
  padding: 0 10px;
  height: 32px;
}

.q-search-box input {
  background: transparent;
  border: none;
  outline: none;
  font-size: 12px;
  color: #fafafa;
  width: 140px;
}

.btn-invalid {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #f87171;
}

.btn-invalid:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.2);
}

.btn-invalid:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-dedup:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Toast Notifications */
.harvester-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.harvester-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 12.5px;
  color: #fafafa;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6);
  animation: slide-in-toast 0.25s ease-out;
  transition: opacity 0.3s ease;
}

.toast-success { border-color: rgba(16, 185, 129, 0.4); }
.toast-error { border-color: rgba(239, 68, 68, 0.4); }
.toast-fadeout { opacity: 0; }

@keyframes slide-in-toast {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.btn-row-add, .btn-row-delete {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #18181b;
  border: 1px solid #27272a;
  color: #a1a1aa;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-row-add:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: #34d399;
  color: #34d399;
}

.btn-row-delete:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: #f87171;
  color: #f87171;
}

/* --------------------------------------------------------------------------
   CrmLeadDossier.js 360° View Styles
   -------------------------------------------------------------------------- */
.dossier-workspace {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  background: #09090b;
  min-height: 100%;
}

.dossier-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid #27272a;
  flex-wrap: wrap;
  gap: 12px;
}

.dossier-nav-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dossier-lead-picker {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dossier-select {
  height: 32px;
  padding: 0 10px;
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 6px;
  color: #fafafa;
  font-size: 12px;
  max-width: 280px;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dossier-select:hover {
  border-color: #3f3f46;
}

.dossier-select:focus {
  border-color: #6366f1;
}

.dossier-nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dossier-pager {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #18181b;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #27272a;
}

.pager-btn {
  background: transparent;
  border: none;
  color: #a1a1aa;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  transition: all 0.15s ease;
}

.pager-btn:hover:not(:disabled) {
  color: #ffffff;
  background: #27272a;
}

.pager-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pager-text {
  font-size: 11px;
  color: #a1a1aa;
  padding: 0 4px;
}

.pager-hint {
  user-select: none;
}

.save-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.save-status-pill.status-saved {
  color: #34d399;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.save-status-pill.status-saving {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.dossier-grid {
  display: grid;
  grid-template-columns: 340px 1fr 330px;
  gap: 16px;
  align-items: start;
}

.dossier-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dossier-card {
  background: #121215;
  border: 1px solid #27272a;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid #1f1f23;
}

.card-tag {
  font-size: 10px;
  font-weight: 700;
  color: #a1a1aa;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.business-profile-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.business-name {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  outline: none;
  border-radius: 4px;
  padding: 2px 4px;
  margin: -2px -4px;
  transition: background 0.15s ease, box-shadow 0.15s ease;
  flex: 1;
}

.business-name:focus {
  background: #18181b;
  box-shadow: 0 0 0 1px #6366f1;
}

.btn-icon-ghost {
  background: transparent;
  border: none;
  color: #71717a;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.18s ease, stroke 0.18s ease, background 0.18s ease, transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), filter 0.18s ease;
}

.btn-icon-ghost:hover {
  color: #ffffff;
  background: #27272a;
  filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.45));
}

.btn-icon-ghost svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  shape-rendering: geometricPrecision;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-icon-ghost:hover svg {
  transform: scale(1.06);
}

.category-pill-sm {
  font-size: 10.5px;
  font-weight: 500;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
}

.discovery-source-tag {
  color: #71717a;
  font-size: 10.5px;
  letter-spacing: 0.02em;
}

.dossier-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 10.5px;
  font-weight: 600;
  color: #71717a;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stage-button-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stage-btn {
  height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #18181b;
  border: 1px solid #27272a;
  color: #a1a1aa;
  cursor: pointer;
  transition: all 0.15s ease;
}

.stage-btn:hover {
  background: #27272a;
  color: #ffffff;
}

.stage-indicator-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-blue { background: #3b82f6; box-shadow: 0 0 6px rgba(59, 130, 246, 0.4); }
.dot-amber { background: #f59e0b; box-shadow: 0 0 6px rgba(245, 158, 11, 0.4); }
.dot-purple { background: #a855f7; box-shadow: 0 0 6px rgba(168, 85, 247, 0.4); }
.dot-emerald { background: #10b981; box-shadow: 0 0 6px rgba(16, 185, 129, 0.4); }
.dot-green { background: #22c55e; box-shadow: 0 0 6px rgba(34, 197, 94, 0.4); }

.stage-label-text {
  flex: 1;
  text-align: left;
}

.stage-active-badge {
  font-size: 10px;
  font-family: var(--font-mono);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
}

.stage-btn.active.stage-blue {
  background: rgba(59, 130, 246, 0.15);
  border-color: #3b82f6;
  color: #60a5fa;
}

.stage-btn.active.stage-amber {
  background: rgba(245, 158, 11, 0.15);
  border-color: #f59e0b;
  color: #fbbf24;
}

.stage-btn.active.stage-purple {
  background: rgba(168, 85, 247, 0.15);
  border-color: #a855f7;
  color: #c084fc;
}

.stage-btn.active.stage-emerald {
  background: rgba(16, 185, 129, 0.15);
  border-color: #10b981;
  color: #34d399;
}

.stage-btn.active.stage-green {
  background: rgba(34, 197, 94, 0.15);
  border-color: #22c55e;
  color: #4ade80;
}

.badge-tel {
  font-size: 10px;
  font-family: var(--font-mono);
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-gsm {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-landline {
  background: rgba(14, 165, 233, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.25);
}

.badge-e164 {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.input-with-icon {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 6px;
  padding: 0 8px 0 10px;
  height: 32px;
  transition: border-color 0.15s ease;
}

.input-with-icon:focus-within {
  border-color: #6366f1;
}

.input-addon-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 6px;
  border-radius: 4px;
  color: #a1a1aa;
  text-decoration: none;
  transition: all 0.15s ease;
}

.input-addon-action:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.input-addon-action.disabled {
  opacity: 0.35;
  pointer-events: none;
}

.dossier-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fafafa;
  font-size: 12px;
  min-width: 0;
}

.dossier-textarea {
  width: 100%;
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 6px;
  padding: 8px 10px;
  color: #fafafa;
  font-size: 12px;
  outline: none;
  resize: vertical;
  line-height: 1.45;
  transition: border-color 0.15s ease;
}

.dossier-textarea:focus {
  border-color: #6366f1;
}

.btn-save-notes {
  height: 26px;
  padding: 0 10px;
  font-size: 11px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #34d399;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-save-notes:hover {
  background: rgba(16, 185, 129, 0.22);
  color: #ffffff;
}

/* Omnichannel Feed */
.feed-filters {
  display: flex;
  align-items: center;
  gap: 4px;
}

.feed-tab {
  background: transparent;
  border: 1px solid transparent;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  color: #71717a;
  cursor: pointer;
  transition: all 0.15s ease;
}

.feed-tab:hover {
  color: #ffffff;
  background: #1f1f23;
}

.feed-tab.active {
  background: #27272a;
  color: #ffffff;
  border-color: #3f3f46;
}

.omnichannel-timeline {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 600px;
  overflow-y: auto;
  padding-right: 4px;
}

.timeline-item {
  display: flex;
  gap: 12px;
  position: relative;
}

.timeline-dot-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dot-call { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }
.dot-email { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.dot-meeting { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.dot-discovery { background: #1f1f23; color: #a1a1aa; border: 1px solid #27272a; }

.timeline-body {
  flex: 1;
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 6px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.timeline-title {
  font-size: 13px;
  font-weight: 600;
  color: #fafafa;
}

.timeline-time {
  font-size: 11px;
  color: #71717a;
}

.timeline-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.meta-badge {
  font-size: 10.5px;
  padding: 2px 6px;
  background: #27272a;
  color: #a1a1aa;
  border-radius: 4px;
}

.meta-badge.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.transcript-box {
  background: #0d0d10;
  border: 1px solid #27272a;
  border-radius: 6px;
  padding: 10px;
  margin-top: 4px;
}

.transcript-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: #71717a;
  font-family: var(--font-mono);
  padding-bottom: 6px;
  border-bottom: 1px solid #1f1f23;
  margin-bottom: 8px;
}

.transcript-turns {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11.5px;
}

.transcript-turn {
  line-height: 1.4;
}

.turn-ajan .turn-speaker { color: #818cf8; }
.turn-müşteri .turn-speaker { color: #34d399; }
.turn-text { color: #d4d4d8; }

.email-proof-card, .meet-proof-card {
  background: #0d0d10;
  border: 1px solid #27272a;
  border-radius: 6px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11.5px;
}

.email-proof-line {
  display: flex;
  gap: 8px;
}

.proof-code {
  color: #818cf8;
}

.badge-proof-verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  color: #34d399;
  background: rgba(16, 185, 129, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.meet-link-box {
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 4px;
  padding: 4px 8px;
  color: #a5b4fc;
  font-size: 11px;
}

.meet-join-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
  text-decoration: none;
}

.meet-join-btn:hover {
  background: rgba(16, 185, 129, 0.25);
}

/* Call Audio Waveform Player */
.call-audio-player {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #09090b;
  border: 1px solid #27272a;
  border-radius: 6px;
  padding: 8px 12px;
  margin-top: 4px;
}

.audio-play-toggle-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #27272a;
  border: 1px solid #3f3f46;
  color: #fafafa;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.audio-play-toggle-btn:hover {
  background: #3f3f46;
  color: #60a5fa;
  border-color: #60a5fa;
}

.call-audio-player.is-playing .audio-play-toggle-btn {
  background: #3b82f6;
  border-color: #60a5fa;
}

.audio-waveform-track {
  flex: 1;
  display: flex;
  align-items: center;
  height: 24px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 4px;
  padding: 0 6px;
}

.audio-waveform-bars {
  display: flex;
  align-items: center;
  gap: 3px;
  width: 100%;
  height: 100%;
}

.waveform-bar {
  flex: 1;
  background: #3f3f46;
  border-radius: 1px;
  height: 6px;
  transition: height 0.2s ease, background-color 0.2s ease;
}

.waveform-bar.wb-1 { height: 8px; }
.waveform-bar.wb-2 { height: 14px; }
.waveform-bar.wb-3 { height: 10px; }
.waveform-bar.wb-4 { height: 18px; }
.waveform-bar.wb-5 { height: 12px; }
.waveform-bar.wb-6 { height: 20px; }
.waveform-bar.wb-7 { height: 16px; }
.waveform-bar.wb-8 { height: 9px; }
.waveform-bar.wb-9 { height: 15px; }
.waveform-bar.wb-10 { height: 19px; }
.waveform-bar.wb-11 { height: 11px; }
.waveform-bar.wb-12 { height: 17px; }
.waveform-bar.wb-13 { height: 13px; }
.waveform-bar.wb-14 { height: 18px; }
.waveform-bar.wb-15 { height: 10px; }
.waveform-bar.wb-16 { height: 7px; }

.call-audio-player.is-playing .waveform-bar {
  background: #60a5fa;
  animation: pulse-wave 1s ease-in-out infinite alternate;
}

.call-audio-player.is-playing .waveform-bar.wb-2 { animation-delay: 0.1s; }
.call-audio-player.is-playing .waveform-bar.wb-4 { animation-delay: 0.2s; }
.call-audio-player.is-playing .waveform-bar.wb-6 { animation-delay: 0.3s; }
.call-audio-player.is-playing .waveform-bar.wb-8 { animation-delay: 0.4s; }
.call-audio-player.is-playing .waveform-bar.wb-10 { animation-delay: 0.25s; }
.call-audio-player.is-playing .waveform-bar.wb-12 { animation-delay: 0.35s; }
.call-audio-player.is-playing .waveform-bar.wb-14 { animation-delay: 0.15s; }

@keyframes pulse-wave {
  0% { transform: scaleY(0.4); }
  100% { transform: scaleY(1.3); }
}

.audio-timer {
  font-size: 11px;
  color: #a1a1aa;
  flex-shrink: 0;
}

/* Email Preview Box */
.email-preview-box {
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 5px;
  padding: 8px 10px;
  margin-top: 2px;
}

.email-preview-text {
  line-height: 1.45;
  color: #d4d4d8;
}

/* Discovery Proof Card */
.discovery-proof-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.discovery-meta-line {
  display: flex;
  align-items: center;
  gap: 4px;
}

.discovery-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.discovery-field-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #09090b;
  border: 1px solid #27272a;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
}

.badge-check-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Status Indicator Dot */
.status-indicator-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #71717a;
  display: inline-block;
  flex-shrink: 0;
}

.status-indicator-dot.online {
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

/* Action Console Stack */
.action-buttons-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-dossier-action {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  background: #18181b;
  border: 1px solid #27272a;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.btn-dossier-action:hover {
  border-color: #3f3f46;
  background: #1f1f23;
}

.btn-dossier-call:hover {
  border-color: #a855f7;
  background: rgba(168, 85, 247, 0.08);
}

.btn-dossier-email:hover {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.08);
}

.btn-dossier-meet:hover {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.08);
}

.action-btn-icon {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #27272a;
  transition: color 0.18s ease, stroke 0.18s ease, background 0.18s ease, transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), filter 0.18s ease;
}

.action-btn-icon svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  shape-rendering: geometricPrecision;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-dossier-action:hover .action-btn-icon svg {
  transform: scale(1.08);
}

.btn-dossier-call .action-btn-icon { color: #c084fc; background: rgba(168, 85, 247, 0.15); }
.btn-dossier-email .action-btn-icon { color: #60a5fa; background: rgba(59, 130, 246, 0.15); }
.btn-dossier-meet .action-btn-icon { color: #34d399; background: rgba(16, 185, 129, 0.15); }

.btn-dossier-call:hover .action-btn-icon { filter: drop-shadow(0 0 6px rgba(168, 85, 247, 0.45)); }
.btn-dossier-email:hover .action-btn-icon { filter: drop-shadow(0 0 6px rgba(59, 130, 246, 0.45)); }
.btn-dossier-meet:hover .action-btn-icon { filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.45)); }

.action-btn-texts {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.action-btn-title {
  font-size: 13px;
  font-weight: 600;
  color: #fafafa;
}

.action-btn-sub {
  font-size: 11px;
  color: #71717a;
}

.deal-intelligence-box {
  background: #0d0d10;
  border: 1px solid #27272a;
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.summary-label {
  font-size: 10px;
  font-weight: 600;
  color: #71717a;
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
}

.deal-progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: #27272a;
  border-radius: 3px;
  overflow: hidden;
}

.deal-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.deal-metric-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.deal-metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  padding: 2px 0;
}

.deal-metric-label {
  color: #a1a1aa;
}

.deal-metric-val {
  color: #fafafa;
}

.deal-next-action-card {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 6px;
  padding: 10px;
}

.status-summary-box {
  background: #0d0d10;
  border: 1px solid #27272a;
  border-radius: 6px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* --------------------------------------------------------------------------
   CrmSyncHub.js Excel / CSV Sync Hub Styles
   -------------------------------------------------------------------------- */
.sync-hub-workspace {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  background: #09090b;
  min-height: 100%;
}

.sync-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid #27272a;
}

.sync-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.sync-top-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
}

.sync-drop-card, .sync-sheets-card {
  background: #121215;
  border: 1px solid #27272a;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.drop-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid #1f1f23;
}

.dropzone-area {
  border: 2px dashed #27272a;
  border-radius: 8px;
  padding: 28px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #0d0d10;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 140px;
}

.dropzone-area:hover, .dropzone-area.drag-active {
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.05);
}

.dropzone-area.has-file {
  border-style: solid;
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.04);
}

.dropzone-file-info {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.file-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.file-name {
  font-size: 13px;
  font-weight: 600;
  color: #fafafa;
}

.file-size {
  font-size: 11px;
}

.dropzone-empty-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.upload-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #18181b;
  border: 1px solid #27272a;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.dropzone-main-text {
  font-size: 13px;
  color: #d4d4d8;
}

.browse-link {
  color: #818cf8;
  text-decoration: underline;
}

.dropzone-sub-text {
  font-size: 11px;
  color: #71717a;
}

.sync-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #18181b;
  border-radius: 6px;
  border: 1px solid #27272a;
}

.radio-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: #d4d4d8;
  cursor: pointer;
}

.sync-radio {
  accent-color: #6366f1;
}

/* Sheets & Export Desk */
.sheets-integration-box {
  background: #0d0d10;
  border: 1px solid #27272a;
  border-radius: 6px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sheets-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sheets-title {
  font-size: 13px;
  font-weight: 600;
  color: #fafafa;
}

.sheets-meta-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #141418;
  padding: 8px 10px;
  border-radius: 4px;
}

.sheets-meta-item {
  display: flex;
  justify-content: space-between;
}

.btn-sheets-sync {
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-sheets-sync:hover {
  background: rgba(16, 185, 129, 0.25);
}

.export-desk-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
}

.export-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.export-btn-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-export-file {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-export-file:hover {
  border-color: #3f3f46;
  background: #1f1f23;
}

/* Mapping Card */
.mapping-card {
  background: #121215;
  border: 1px solid #27272a;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mapping-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.mapping-title {
  font-size: 15px;
  font-weight: 600;
  color: #fafafa;
}

.mapping-subtitle {
  font-size: 12px;
  color: #71717a;
  margin-top: 2px;
}

.btn-primary-import {
  height: 36px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #4f46e5;
  border: 1px solid #6366f1;
  color: #ffffff;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-primary-import:hover:not(:disabled) {
  background: #4338ca;
}

.import-progress-bar-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.progress-track {
  height: 6px;
  background: #27272a;
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #34d399);
  transition: width 0.3s ease;
}

.column-mapping-select {
  height: 30px;
  padding: 0 8px;
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 4px;
  color: #fafafa;
  font-size: 11.5px;
  width: 100%;
}

.badge-mapped {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  color: #34d399;
  background: rgba(16, 185, 129, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.badge-unmapped-req {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.badge-unmapped {
  font-size: 10.5px;
  color: #71717a;
}

.raw-preview-box {
  background: #0d0d10;
  border: 1px solid #27272a;
  border-radius: 6px;
  overflow: hidden;
}

.raw-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #141418;
  border-bottom: 1px solid #27272a;
}

.raw-preview-table-wrap {
  overflow-x: auto;
}

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

.raw-preview-table th {
  padding: 6px 10px;
  text-align: left;
  font-size: 11px;
  color: #71717a;
  background: #18181b;
  border-bottom: 1px solid #27272a;
}

.raw-preview-table td {
  padding: 6px 10px;
  border-bottom: 1px solid #1f1f23;
}

.import-result-card {
  border-radius: 8px;
  padding: 16px;
  display: flex;
  align-items: center;
}

.import-result-card.success {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.import-result-card.error {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.result-stats-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.stat-pill {
  font-size: 11.5px;
  background: #18181b;
  border: 1px solid #27272a;
  padding: 3px 10px;
  border-radius: 4px;
}

/* ==========================================================================
   Add Lead Modal & Table Action Button Refinements
   ========================================================================== */
.crm-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.crm-modal {
  background: #141417;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  width: 90%;
  max-width: 480px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  animation: modalFadeIn 0.15s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.crm-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.crm-modal-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
}

.crm-modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.crm-modal-body .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.crm-modal-body label {
  font-size: 12px;
  font-weight: 500;
  color: #a1a1aa;
}

.crm-modal-body input.crm-input,
.crm-modal-body select.crm-select {
  height: 38px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 0 12px;
  color: #ffffff;
  font-size: 13px;
  outline: none;
  transition: border-color var(--trans-fast);
}

.crm-modal-body input.crm-input:focus,
.crm-modal-body select.crm-select:focus {
  border-color: var(--accent-primary, #6366f1);
}

.btn-table-edit,
.btn-edit-lead,
.btn-drawer-edit,
.btn-dossier-edit {
  background: rgba(245, 158, 11, 0.08) !important;
  border: 1px solid rgba(245, 158, 11, 0.25) !important;
  color: #fde68a !important;
}

.btn-table-edit:hover,
.btn-edit-lead:hover,
.btn-drawer-edit:hover,
.btn-dossier-edit:hover {
  background: rgba(245, 158, 11, 0.18) !important;
  border-color: rgba(245, 158, 11, 0.45) !important;
  color: #ffffff !important;
}

.btn-table-delete,
.btn-delete-lead,
.btn-drawer-delete,
.btn-dossier-delete {
  background: rgba(239, 68, 68, 0.08) !important;
  border: 1px solid rgba(239, 68, 68, 0.25) !important;
  color: #fca5a5 !important;
}

.btn-table-delete:hover,
.btn-delete-lead:hover,
.btn-drawer-delete:hover,
.btn-dossier-delete:hover {
  background: rgba(239, 68, 68, 0.22) !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
  color: #ffffff !important;
}

#btn-batch-delete,
.btn-batch-delete {
  background: rgba(239, 68, 68, 0.12) !important;
  border: 1px solid rgba(239, 68, 68, 0.35) !important;
  color: #fca5a5 !important;
  font-weight: 600;
}

#btn-batch-delete:hover,
.btn-batch-delete:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: rgba(239, 68, 68, 0.6) !important;
  color: #ffffff !important;
}

#btn-add-lead,
.btn-add-lead {
  background: var(--accent-primary, #6366f1) !important;
  border: 1px solid rgba(99, 102, 241, 0.4) !important;
  color: #ffffff !important;
  font-weight: 600;
}

#btn-add-lead:hover,
.btn-add-lead:hover {
  background: #4f46e5 !important;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.35);
}

/* ==========================================================================
   Lead Edit & Create High-Density Modal
   ========================================================================== */
.lead-modal-root {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.lead-modal-root.visible {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.lead-modal-root.hidden,
.lead-modal-root:not(.visible) {
  display: none !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

.lead-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lead-modal-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
  background: #09090b;
  border: 1px solid #27272a;
  border-radius: 12px;
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

.lead-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #18181b;
  background: #0d0d10;
}

.lead-modal-title-area {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lead-modal-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #818cf8;
  text-transform: uppercase;
}

.lead-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #fafafa;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.lead-modal-subtitle {
  font-size: 11px;
  color: #71717a;
  margin: 0;
}

.btn-modal-close {
  background: transparent;
  border: none;
  color: #71717a;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-modal-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.lead-modal-form {
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.col-span-2 {
  grid-column: span 2;
}

.lead-modal-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lead-modal-form .form-label {
  font-size: 11px;
  font-weight: 600;
  color: #a1a1aa;
  display: flex;
  align-items: center;
  gap: 4px;
}

.lead-modal-form .form-input,
.lead-modal-form .form-select,
.lead-modal-form .form-textarea {
  background: #121215;
  border: 1px solid #27272a;
  border-radius: 6px;
  color: #fafafa;
  font-size: 12.5px;
  padding: 8px 12px;
  outline: none;
  box-sizing: border-box;
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.lead-modal-form .form-input:focus,
.lead-modal-form .form-select:focus,
.lead-modal-form .form-textarea:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.4);
}

.lead-modal-form .form-textarea {
  resize: vertical;
  min-height: 60px;
  line-height: 1.4;
}

.modal-error-banner {
  padding: 8px 12px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 6px;
  font-size: 12px;
  color: #fca5a5;
}

.lead-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid #18181b;
  background: #0d0d10;
}

.lead-modal-footer-right {
  display: flex;
  align-items: center;
  gap: 10px;
}



/* ==========================================================================
   GAIAI V3 — Executive Chat Cockpit Styles (840px Simetrik & Kompakt)
   ========================================================================== */
.founder-cockpit-container {
  display: flex;
  height: 100%;
  width: 100%;
  background-color: #09090b;
  color: #f4f4f5;
  overflow: hidden;
  position: relative;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.cockpit-sidebar {
  width: 260px;
  min-width: 260px;
  max-width: 260px;
  height: 100%;
  background-color: #0d0e13;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-direction: column;
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), margin-left 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  z-index: 50;
  box-sizing: border-box;
}

.cockpit-sidebar.collapsed {
  margin-left: -260px;
}

.sidebar-header-box {
  padding: 12px 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.btn-new-chat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 38px;
  padding: 0 12px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.16) 0%, rgba(79, 70, 229, 0.28) 100%);
  border: 1px solid rgba(99, 102, 241, 0.38);
  border-radius: 8px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  outline: none;
}

.btn-new-chat:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.24) 0%, rgba(79, 70, 229, 0.40) 100%);
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 0 0 14px rgba(99, 102, 241, 0.3);
}

.btn-new-chat-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shortcut-kbd {
  font-size: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  padding: 2px 6px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  color: #a1a1aa;
}

.sidebar-search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.sidebar-search-input {
  width: 100%;
  height: 32px;
  background: #14151c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 0 10px 0 30px;
  color: #e4e4e7;
  font-size: 12px;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
  box-sizing: border-box;
}

.sidebar-search-input:focus {
  border-color: rgba(99, 102, 241, 0.5);
  background: #171822;
}

.search-icon-inside {
  position: absolute;
  left: 9px;
  color: #71717a;
  pointer-events: none;
  display: flex;
  align-items: center;
}

.sidebar-tree-container {
  flex: 1;
  overflow-y: auto;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sidebar-tree-container::-webkit-scrollbar {
  width: 4px;
}
.sidebar-tree-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.session-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.session-group-header {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #71717a;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.session-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 34px;
  padding: 0 8px;
  border-radius: 6px;
  cursor: pointer;
  color: #a1a1aa;
  font-size: 12.5px;
  transition: all 0.12s ease;
  position: relative;
  border: 1px solid transparent;
  gap: 6px;
}

.session-item-row:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #f4f4f5;
}

.session-item-row.active {
  background: rgba(99, 102, 241, 0.14);
  color: #ffffff;
  font-weight: 500;
  border-color: rgba(99, 102, 241, 0.28);
}

.session-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.session-item-icon {
  flex-shrink: 0;
  color: #71717a;
}
.session-item-row.active .session-item-icon {
  color: #818cf8;
}

.session-item-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
}

.session-pin-indicator {
  flex-shrink: 0;
  color: #fbbf24;
  display: inline-flex;
}

.session-item-actions {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  opacity: 0;
  pointer-events: none;
  z-index: 10;
}

.session-item-row:hover .session-item-actions,
.session-item-row.menu-open .session-item-actions {
  opacity: 1;
  pointer-events: auto;
}

.session-action-btn {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #71717a;
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
}

.session-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #f4f4f5;
}

.session-context-dropdown {
  position: absolute;
  right: 6px;
  top: 32px;
  background: #181922;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.65);
  z-index: 100;
  min-width: 148px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  backdrop-filter: blur(12px);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  font-size: 11.5px;
  color: #d4d4d8;
  border-radius: 5px;
  cursor: pointer;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  transition: all 0.1s ease;
}

.dropdown-item:hover {
  background: rgba(99, 102, 241, 0.15);
  color: #ffffff;
}

.dropdown-item.danger:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.sidebar-footer-box {
  padding: 10px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #0d0e13;
  flex-shrink: 0;
}

.btn-purge-chats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 28px;
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #71717a;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.btn-purge-chats:hover {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.founder-identity-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.founder-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.founder-meta {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.founder-name {
  font-size: 11.5px;
  font-weight: 600;
  color: #e4e4e7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.founder-role {
  font-size: 9.5px;
  color: #71717a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.cockpit-main-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  position: relative;
  overflow: hidden;
  background: #09090b;
}

.cockpit-top-bar {
  height: 48px;
  min-height: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(13, 14, 18, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
  z-index: 30;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.sidebar-toggle-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: #a1a1aa;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sidebar-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.active-session-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.active-session-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 380px;
  cursor: pointer;
  border-radius: 4px;
  padding: 2px 4px;
  transition: background 0.12s ease;
}

.active-session-title:hover {
  background: rgba(255, 255, 255, 0.06);
}

.model-pill-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
}

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

.voice-status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 6px;
  font-size: 11px;
  color: #34d399;
  font-weight: 500;
  white-space: nowrap;
}

.pulsing-emerald-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
  animation: emeraldPulse 2s infinite ease-in-out;
}

.header-action-button {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: #a1a1aa;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.header-action-button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.16);
}

.header-action-button.danger:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #ef4444;
}

.conversation-scroll-wrapper {
  flex: 1;
  overflow-y: auto;
  position: relative;
  scroll-behavior: smooth;
  display: flex;
  flex-direction: column;
}

.conversation-scroll-wrapper::-webkit-scrollbar {
  width: 6px;
}
.conversation-scroll-wrapper::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.conversation-canvas {
  width: 100%;
  max-width: 840px;
  margin: 0 auto;
  padding: 24px 20px 140px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-sizing: border-box;
  flex: 1;
}

.welcome-screen-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 50px 16px 30px;
  margin: auto 0;
  animation: fadeIn 0.3s ease;
}

.welcome-emblem {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.25) 100%);
  border: 1px solid rgba(99, 102, 241, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a5b4fc;
  box-shadow: 0 0 24px rgba(99, 102, 241, 0.25);
  margin-bottom: 18px;
}

.welcome-title {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.welcome-subtitle {
  font-size: 13.5px;
  color: #71717a;
  max-width: 480px;
  line-height: 1.5;
}

.quick-starters-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 720px;
  margin-top: 32px;
}

.starter-action-card {
  background: rgba(18, 19, 25, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
  transition: all 0.16s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.starter-action-card:hover {
  background: rgba(24, 25, 34, 0.95);
  border-color: rgba(99, 102, 241, 0.38);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4), 0 0 12px rgba(99, 102, 241, 0.15);
  transform: translateY(-1px);
}

.starter-card-title {
  font-size: 13px;
  font-weight: 600;
  color: #f4f4f5;
  display: flex;
  align-items: center;
  gap: 8px;
}

.starter-card-desc {
  font-size: 11.5px;
  color: #71717a;
  line-height: 1.4;
}

.chat-message-row {
  display: flex;
  gap: 14px;
  width: 100%;
}

.chat-message-row.animate-in {
  animation: messageSlideIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-message-row.user-row {
  justify-content: flex-end;
}

.chat-message-row.user-row .message-bubble-body {
  background: #181920;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px 16px 4px 16px;
  padding: 12px 16px;
  max-width: 80%;
  color: #f4f4f5;
  font-size: 13.5px;
  line-height: 1.55;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.chat-message-row.agent-row {
  justify-content: flex-start;
}

.agent-avatar-col {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
  margin-top: 2px;
}

.agent-content-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.agent-header-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: #71717a;
}

.agent-author-name {
  font-weight: 600;
  color: #e4e4e7;
}

.agent-subagent-tag {
  font-size: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.28);
  color: #a5b4fc;
}

.message-bubble-body {
  font-size: 13.5px;
  line-height: 1.6;
  color: #e4e4e7;
}

.message-bubble-body p {
  margin: 0 0 10px 0;
}
.message-bubble-body p:last-child {
  margin-bottom: 0;
}

.message-bubble-body strong {
  color: #ffffff;
  font-weight: 600;
}

.message-bubble-body ul, .message-bubble-body ol {
  margin: 6px 0 12px 20px;
  padding: 0;
}

.message-bubble-body li {
  margin-bottom: 4px;
}

.markdown-data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 12.5px;
  background: #111218;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
}

.markdown-data-table th, .markdown-data-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.markdown-data-table th {
  background: rgba(255, 255, 255, 0.03);
  font-weight: 600;
  color: #ffffff;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

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

.markdown-data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.code-block-card {
  margin: 12px 0;
  background: #0d0e14;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  overflow: hidden;
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #71717a;
}

.btn-code-copy {
  display: flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: #a1a1aa;
  cursor: pointer;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.1s ease;
}

.btn-code-copy:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.code-block-content {
  padding: 12px 14px;
  margin: 0;
  overflow-x: auto;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.5;
  color: #e4e4e7;
}

.tool-accordion-card {
  margin: 10px 0;
  background: #111219;
  border: 1px solid rgba(99, 102, 241, 0.22);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.tool-accordion-card:hover {
  border-color: rgba(99, 102, 241, 0.45);
}

.tool-accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(99, 102, 241, 0.06);
  cursor: pointer;
  user-select: none;
}

.tool-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #e4e4e7;
}

.tool-status-pill {
  font-family: ui-monospace, monospace;
  font-size: 9.5px;
  padding: 1.5px 6px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
  color: #34d399;
}

.tool-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #818cf8;
}

.tool-accordion-body {
  padding: 10px 12px;
  background: #090a0f;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  line-height: 1.45;
  color: #a1a1aa;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 240px;
  overflow-y: auto;
}

.message-actions-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  opacity: 0.75;
  transition: opacity 0.15s ease;
}

.chat-message-row:hover .message-actions-bar {
  opacity: 1;
}

.msg-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 8px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #71717a;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.msg-action-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #e4e4e7;
  border-color: rgba(255, 255, 255, 0.1);
}

.floating-capsule-wrapper {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  padding: 0 16px;
  pointer-events: none;
  z-index: 40;
}

.floating-capsule {
  pointer-events: auto;
  width: 100%;
  max-width: 840px;
  background: rgba(18, 19, 26, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 1px rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  overflow: visible;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}

.floating-capsule:focus-within {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.75), 0 0 20px rgba(99, 102, 241, 0.2);
}

.capsule-attachment-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
  background: rgba(99, 102, 241, 0.12);
  border-bottom: 1px solid rgba(99, 102, 241, 0.2);
  font-size: 11px;
  color: #a5b4fc;
  border-radius: 20px 20px 0 0;
}

.capsule-input-row {
  display: flex;
  align-items: flex-end;
  padding: 8px 12px;
  gap: 8px;
}

.capsule-left-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-bottom: 2px;
}

.capsule-icon-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #71717a;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.capsule-icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.capsule-textarea-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}

.capsule-textarea {
  width: 100%;
  min-height: 24px;
  max-height: 140px;
  resize: none;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 13.5px;
  line-height: 1.5;
  font-family: inherit;
  padding: 5px 0;
  box-sizing: border-box;
}

.capsule-textarea::placeholder {
  color: #52525b;
}

.capsule-right-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 2px;
}

.capsule-mic-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #a1a1aa;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.capsule-mic-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.capsule-mic-btn.recording {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.6);
  color: #ef4444;
  animation: micGlow 1.5s infinite;
}

.capsule-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #4f46e5;
  border: none;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 10px rgba(79, 70, 229, 0.4);
}

.capsule-send-btn:hover {
  background: #6366f1;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.5);
  transform: scale(1.04);
}

.capsule-send-btn:disabled {
  background: rgba(255, 255, 255, 0.08);
  color: #52525b;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.slash-dropdown-menu {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 12px;
  background: #161720;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7);
  z-index: 100;
  min-width: 280px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.slash-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.12s ease;
}

.slash-item:hover, .slash-item.selected {
  background: rgba(99, 102, 241, 0.18);
}

.slash-cmd {
  font-family: ui-monospace, monospace;
  font-weight: 700;
  font-size: 12px;
  color: #a5b4fc;
}

.slash-desc {
  font-size: 11.5px;
  color: #71717a;
}

@media (max-width: 768px) {
  .cockpit-sidebar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 200;
    transform: translateX(-100%);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.8);
  }

  .cockpit-sidebar.open {
    transform: translateX(0);
  }

  .mobile-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 150;
  }

  .quick-starters-grid {
    grid-template-columns: 1fr;
  }

  .active-session-title {
    max-width: 180px;
  }

  .floating-capsule-wrapper {
    bottom: max(10px, env(keyboard-inset-height, 0px));
    padding: 0 8px;
  }

  .conversation-canvas {
    padding: 16px 12px 140px;
  }
}

/* Düşünme / Yükleniyor Göstergesi (Real API Thinking State) */
.thinking-row {
  opacity: 0.95;
  animation: messageSlideIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.thinking-bubble {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 12px;
  width: fit-content;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.thinking-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #818cf8;
  animation: thinkingPulse 1.4s infinite ease-in-out both;
}

.thinking-dot:nth-child(1) { animation-delay: -0.32s; }
.thinking-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes thinkingPulse {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1.1); opacity: 1; }
}

.chat-message-row.error-row .message-bubble-body {
  border-color: rgba(239, 68, 68, 0.4) !important;
  background: rgba(239, 68, 68, 0.08) !important;
  color: #fca5a5 !important;
}


/* ==========================================================================
   GAIAI V3 — Dynamic Swarm Agents & Creator Modal Styles
   ========================================================================== */

/* Top header button in Swarm Panel */
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.panel-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-create-agent-header {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-xs);
  color: #a5b4fc;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.btn-create-agent-header:hover {
  background: rgba(99, 102, 241, 0.22);
  border-color: rgba(99, 102, 241, 0.5);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.25);
  transform: translateY(-1px);
}

/* Agent cards container & cards */
.agent-badges-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.agent-model-pill {
  font-size: 8px;
  font-weight: 600;
  padding: 1px 5px;
  background: rgba(129, 140, 248, 0.12);
  color: #c7d2fe;
  border: 1px solid rgba(129, 140, 248, 0.25);
  border-radius: 4px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.agent-actions-row {
  display: flex;
  align-items: center;
  gap: 5px;
  padding-top: 6px;
  border-top: 1px dashed rgba(255, 255, 255, 0.06);
}

.btn-agent-action {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 22px;
  padding: 0 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 9.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--trans-fast);
  white-space: nowrap;
}

.btn-agent-action:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: var(--border-muted);
}

.btn-agent-action.btn-quick-task-toggle {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
}

.btn-agent-action.btn-quick-task-toggle:hover,
.btn-agent-action.btn-quick-task-toggle.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.45);
  color: #ffffff;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.2);
}

.btn-agent-action.danger:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

/* Inline quick task form */
.agent-inline-task-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding: 4px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 6px;
  animation: fadeIn 0.15s ease-out;
}

.agent-inline-task-input {
  flex: 1;
  height: 24px;
  background: transparent;
  border: none;
  outline: none;
  font-size: 10px;
  color: var(--text-white);
  padding: 0 4px;
}

.agent-inline-task-input::placeholder {
  color: #71717a;
}

.btn-inline-task-send {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #4f46e5;
  border: none;
  border-radius: 4px;
  color: #ffffff;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.btn-inline-task-send:hover {
  background: #6366f1;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.5);
}

.agent-cards-empty {
  padding: 20px 10px;
  text-align: center;
  color: var(--text-dim);
  font-size: 11px;
}

.btn-create-agent-empty {
  margin-top: 8px;
  padding: 6px 12px;
  background: #4f46e5;
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

/* ==========================================================================
   Modern Modal (Dialog) Styles
   ========================================================================== */
.agent-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: modalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.agent-modal-dialog {
  width: 100%;
  max-width: 520px;
  background: #111217;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScaleIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalScaleIn {
  from { transform: scale(0.95) translateY(8px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.agent-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.agent-modal-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.agent-modal-icon-badge {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}

.agent-modal-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.agent-modal-close {
  background: transparent;
  border: none;
  color: #71717a;
  font-size: 16px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.agent-modal-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.agent-modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(85vh - 130px);
  overflow-y: auto;
}

.agent-modal-intro {
  font-size: 12px;
  color: #a1a1aa;
  line-height: 1.5;
  padding: 10px 12px;
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 8px;
}

.agent-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.agent-form-label {
  font-size: 11.5px;
  font-weight: 600;
  color: #e4e4e7;
  display: flex;
  align-items: center;
  gap: 4px;
}

.required-star {
  color: #f43f5e;
}

.agent-form-input,
.agent-form-textarea,
.agent-form-select {
  width: 100%;
  background: #181920;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 12px;
  color: #ffffff;
  font-family: inherit;
  transition: all var(--trans-fast);
  box-sizing: border-box;
}

.agent-form-input:focus,
.agent-form-textarea:focus,
.agent-form-select:focus {
  border-color: #6366f1;
  background: #1c1d25;
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.agent-form-input::placeholder,
.agent-form-textarea::placeholder {
  color: #52525b;
}

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

.select-wrapper {
  position: relative;
}

.agent-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.01);
}

.btn-modal-cancel {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #a1a1aa;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.btn-modal-cancel:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-modal-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: 8px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--trans-fast);
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.35);
}

.btn-modal-submit:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.5);
  transform: translateY(-1px);
}
