/**
 * Bogui Scraping - Minimalist Full-Screen CRM Styles
 * Matches the monochrome, clean card aesthetic of the Side Panel
 * With Collapsible Left Sidebar & Drag-and-Drop Kanban Pipeline
 */
:root {
  --bg-dark: #090d16;
  --bg-card: #111827;
  --bg-elevated: #1f2937;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);
  --text-main: #f9fafb;
  --text-secondary: #d1d5db;
  --text-muted: #9ca3af;
}

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

/* Custom Dark Minimal Scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  border: 1px solid transparent;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.crm-shell {
  display: flex;
  flex-direction: row;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* ============================================================================
   Collapsible Left Sidebar
   ============================================================================ */
.crm-sidebar {
  width: 228px;
  background: var(--bg-card);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  user-select: none;
}

.crm-sidebar.is-collapsed {
  width: 64px;
}

.sidebar-header {
  height: 60px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}

.crm-sidebar.is-collapsed .sidebar-header {
  justify-content: center;
  padding: 0 8px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.crm-sidebar.is-collapsed .brand-wrap {
  display: none;
}

.brand-logo-img {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.14);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  white-space: nowrap;
}

.brand-text h1 {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.2px;
  line-height: 1.1;
}

.brand-text span {
  font-size: 10.5px;
  color: var(--text-muted);
}

.btn-sidebar-toggle {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
}

.btn-sidebar-toggle:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-subtle);
}

.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

.sidebar-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 8px 4px;
}

.nav-item {
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 9px 11px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  transition: all 0.15s;
}

.nav-item svg {
  flex-shrink: 0;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 600;
}

.crm-sidebar.is-collapsed .nav-item {
  justify-content: center;
  padding: 10px 0;
}

.crm-sidebar.is-collapsed .nav-label {
  display: none;
}

.sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.btn-sidebar-primary {
  width: 100%;
  background: #f9fafb;
  color: #111827;
  border: none;
  padding: 9px 11px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.btn-sidebar-primary:hover {
  background: #e5e7eb;
}

.crm-sidebar.is-collapsed .btn-sidebar-primary {
  padding: 9px 0;
}

.btn-primary-light {
  background: #f9fafb;
  color: #111827;
  border: none;
  padding: 7px 13px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-primary-light:hover {
  background: #e5e7eb;
}

.btn-ghost {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 7px 12px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}

.btn-ghost:hover {
  color: #fff;
  border-color: var(--border-hover);
  background: var(--bg-elevated);
}

.btn-sm {
  padding: 5px 10px;
  font-size: 11.5px;
}

/* ============================================================================
   Main Container, KPI Strip & Toolbar
   ============================================================================ */
.crm-container {
  flex: 1;
  min-width: 0;
  padding: 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  flex-shrink: 0;
}

.kpi-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 11px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.kpi-val {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.kpi-lbl {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Filter Toolbar */
.toolbar-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.search-wrap {
  position: relative;
  width: 320px;
}

.search-svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 7.5px 12px 7.5px 32px;
  border-radius: 8px;
  font-size: 12px;
  outline: none;
}

.search-input:focus {
  border-color: rgba(255, 255, 255, 0.28);
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.filter-btn:hover {
  color: #fff;
  border-color: var(--border-hover);
}

.filter-btn.active {
  background: #f9fafb;
  border-color: #f9fafb;
  color: #111827;
  font-weight: 600;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ============================================================================
   Custom Dark-Styled Dropdown (100% CSS Custom Menu)
   ============================================================================ */
.custom-dropdown {
  position: relative;
  display: inline-block;
}

.custom-dropdown-btn {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: #f9fafb;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  outline: none;
  transition: all 0.15s ease;
  min-width: 150px;
}

.custom-dropdown-btn:hover {
  border-color: var(--border-hover);
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.05);
}

.custom-dropdown-btn:focus {
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.dropdown-chevron {
  transition: transform 0.2s ease;
  color: #9ca3af;
  flex-shrink: 0;
}

.custom-dropdown.open .dropdown-chevron {
  transform: rotate(180deg);
}

.custom-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  min-width: 165px;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  padding: 4px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: dropdownFadeIn 0.15s ease-out;
}

.custom-dropdown-menu.hidden {
  display: none !important;
}

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

.custom-dropdown-item {
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 12px;
  color: #d1d5db;
  cursor: pointer;
  transition: all 0.12s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.custom-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.custom-dropdown-item.active {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  font-weight: 600;
}

.custom-dropdown-modal {
  width: 100%;
}

.custom-dropdown-modal .custom-dropdown-btn {
  width: 100%;
  background: #0f172a;
  border-color: rgba(255, 255, 255, 0.12);
  padding: 8px 12px;
  font-size: 12.5px;
}

.custom-dropdown-modal .custom-dropdown-btn:disabled,
.custom-dropdown-modal .custom-dropdown-btn.is-disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.03);
}

.custom-dropdown-modal .custom-dropdown-menu {
  background: #0f172a;
  border-color: rgba(255, 255, 255, 0.18);
  max-height: 200px;
  overflow-y: auto;
}

.tag-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e5e7eb;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.tag-icon-badge:hover {
  transform: translateY(-1px);
}

.tag-icon-badge svg {
  width: 14px;
  height: 14px;
}

.tag-icon-whatsapp {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.tag-icon-whatsapp:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: #34d399;
  color: #10b981;
}

.tag-icon-instagram {
  background: rgba(236, 72, 153, 0.12);
  border-color: rgba(236, 72, 153, 0.3);
  color: #f472b6;
}

.tag-icon-instagram:hover {
  background: rgba(236, 72, 153, 0.22);
  border-color: #f472b6;
  color: #ec4899;
}

.tag-icon-facebook {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.3);
  color: #60a5fa;
}

.tag-icon-email {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.25);
  color: #cbd5e1;
}

.lead-card {
  cursor: pointer;
}

.lead-card a,
.lead-card button {
  cursor: pointer;
}

.minimal-select {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: #f9fafb;
  padding: 7px 30px 7px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  outline: none;
  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='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: all 0.15s ease;
}

.minimal-select:hover {
  border-color: var(--border-hover);
  color: #ffffff;
}

.minimal-select:focus {
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.minimal-select option,
.modal-input option {
  background-color: #111827;
  color: #f9fafb;
  padding: 8px;
}

.modal-input select,
select.modal-input {
  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='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

.btn-icon-only {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn-icon-only:hover {
  color: #fff;
  background: var(--bg-elevated);
}

.btn-icon-danger:hover {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.35);
}

/* ============================================================================
   Views & Minimalist Cards Grid (Matches Side Panel Cards!)
   ============================================================================ */
.crm-view {
  display: none;
  flex: 1;
  overflow-y: auto;
}

.crm-view.active {
  display: flex;
  flex-direction: column;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 10px;
  padding-bottom: 24px;
}

.lead-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s;
}

.lead-card:hover {
  border-color: var(--border-hover);
}

.lead-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.lead-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  line-height: 1.25;
}

.lead-title:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.lead-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lead-rating {
  font-size: 11px;
  color: #e5e7eb;
  font-weight: 600;
  white-space: nowrap;
}

.lead-links-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.lead-links-row a {
  color: #f9fafb;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
}

.lead-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}

.lead-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tag-badge {
  display: inline-flex;
  align-items: center;
  padding: 2.5px 7px;
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 500;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e5e7eb;
}

.tag-whatsapp {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

.tag-email {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.3);
  color: #7dd3fc;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
}

.btn-card-action {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 3.5px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.btn-card-action:hover {
  color: #fff;
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.05);
}

/* ============================================================================
   Kanban View (Drag & Drop Enabled)
   ============================================================================ */
.kanban-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  flex: 1;
  overflow: hidden;
  padding-bottom: 10px;
}

.kanban-column {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}

.kanban-column.is-drag-over {
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.kanban-header {
  padding: 11px 13px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
}

.stage-badge {
  background: rgba(255, 255, 255, 0.08);
  padding: 1.5px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  color: var(--text-secondary);
}

.kanban-list {
  flex: 1;
  overflow-y: auto;
  padding: 9px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 120px;
}

.kb-card {
  background: var(--bg-dark);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 10px 11px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: grab;
  user-select: none;
  transition: border-color 0.15s, transform 0.12s, opacity 0.15s;
}

.kb-card:hover {
  border-color: var(--border-hover);
}

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

.kb-card.is-dragging {
  opacity: 0.42;
  transform: scale(0.98);
  border-color: rgba(255, 255, 255, 0.35);
}

.kb-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
}

.kb-title:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.kb-meta {
  font-size: 11px;
  color: var(--text-muted);
}

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

.kb-empty-hint {
  color: rgba(156, 163, 175, 0.45);
  font-size: 11px;
  text-align: center;
  padding: 28px 10px;
  border: 1px dashed rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  pointer-events: none;
}

/* ============================================================================
   Analytics View
   ============================================================================ */
.analytics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.analytics-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 18px;
}

.analytics-card h3 {
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 14px;
}

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

.bar-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px 8px;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.bar-clickable {
  cursor: pointer;
  user-select: none;
}

.bar-clickable:hover {
  background: rgba(255, 255, 255, 0.06);
}

.bar-clickable:hover .bar-name {
  color: #ffffff;
}

.bar-clickable:hover .bar-arrow {
  opacity: 1;
  transform: translateX(3px);
}

.bar-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s;
}

.bar-arrow {
  font-size: 11px;
  opacity: 0;
  color: #38bdf8;
  transition: all 0.15s ease;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
}

.bar-track {
  height: 6px;
  background: var(--bg-dark);
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: #f9fafb;
  border-radius: 999px;
}

/* ============================================================================
   Centered Minimalist Modals
   ============================================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.hidden {
  display: none !important;
}

.modal-card {
  width: 500px;
  max-width: 100%;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.modal-header h2 {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.modal-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.btn-modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 15px;
  cursor: pointer;
}

.btn-modal-close:hover {
  color: #fff;
}

.modal-body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 70vh;
  overflow-y: auto;
}

.modal-quick-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

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

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

.modal-input, .modal-textarea {
  width: 100%;
  background: var(--bg-dark);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 8px 10px;
  border-radius: 7px;
  font-family: inherit;
  font-size: 12px;
  outline: none;
}

.modal-input:focus, .modal-textarea:focus {
  border-color: rgba(255, 255, 255, 0.28);
}

.validation-error {
  color: #fca5a5;
  font-size: 11px;
}

.modal-footer {
  padding: 13px 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-footer-right {
  display: flex;
  gap: 8px;
}

.btn-danger-ghost {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 6.5px 11px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
}

/* ============================================================================
   Map View & Zones Layout
   ============================================================================ */
.map-view-layout {
  display: flex;
  gap: 14px;
  height: calc(100vh - 165px);
  width: 100%;
  overflow: hidden;
}

.map-zones-panel {
  width: 250px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
}

.zones-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.zones-header h3 {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.zone-filter-search {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.zone-filter-search .search-input {
  padding: 6px 10px;
  font-size: 11.5px;
}

.zones-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.zone-pill {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 7.5px 10px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.15s;
}

.zone-pill:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.zone-pill.active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-weight: 600;
}

/* Accordion for Municipalities & Localities */
.zone-accordion-group {
  display: flex;
  flex-direction: column;
  border-radius: 7px;
  margin-bottom: 2px;
  flex-shrink: 0;
}

.zone-group-header {
  width: 100%;
  text-align: left;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  color: #f3f4f6;
  padding: 7.5px 10px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.15s;
}

.zone-group-header:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.zone-group-header.active {
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
}

.zone-group-title {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zone-group-chevron {
  transition: transform 0.2s ease;
  color: var(--text-muted);
  flex-shrink: 0;
}

.zone-accordion-group.is-open .zone-group-chevron {
  transform: rotate(90deg);
}

.zone-sub-list {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0 4px 14px;
  border-left: 2px solid rgba(255, 255, 255, 0.08);
  margin-left: 10px;
  margin-top: 4px;
  margin-bottom: 4px;
}

.zone-accordion-group.is-open .zone-sub-list {
  display: flex;
}

.zone-sub-pill {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.12s;
}

.zone-sub-pill:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.zone-sub-pill.active {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
  color: #93c5fd;
  font-weight: 600;
}

/* Map Legend Overlay */
.map-legend-overlay {
  position: absolute;
  top: 12px;
  left: 54px;
  background: rgba(17, 24, 39, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 8px 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11.5px;
  color: #f3f4f6;
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.legend-title {
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.5px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  border: 1.5px solid #111827;
}

.dot-blue {
  background: #38bdf8;
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.6);
}

.dot-white {
  background: #ffffff;
}

.map-wrapper {
  flex: 1;
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  overflow: hidden;
}

.crm-interactive-map {
  width: 100%;
  height: 100%;
  background: #0b0f19;
}

.map-floating-overlay {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(17, 24, 39, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 11.5px;
  color: #f9fafb;
  z-index: 1000;
  pointer-events: none;
}

/* Modal Mini Map */
.modal-mini-map {
  width: 100%;
  height: 150px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: #0b0f19;
  overflow: hidden;
  margin-top: 4px;
}

/* Leaflet Custom Dark Styling */
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
  background: #111827 !important;
  color: #f9fafb !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
  border-radius: 8px !important;
}

.leaflet-popup-content {
  margin: 10px 12px !important;
  font-family: inherit !important;
  font-size: 12px !important;
  line-height: 1.4 !important;
}

.leaflet-popup-close-button {
  color: #9ca3af !important;
}

.crm-toast {
  position: fixed;
  bottom: 22px;
  right: 24px;
  background: #1f2937;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  z-index: 200;
}

/* ============================================================================
   User Profile Pill & Logout (Sidebar)
   ============================================================================ */
.sidebar-user-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  margin-top: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}

.crm-sidebar.is-collapsed .sidebar-user-strip {
  justify-content: center;
  padding: 8px 4px;
}

.crm-sidebar.is-collapsed .sidebar-user-strip .user-info,
.crm-sidebar.is-collapsed .sidebar-user-strip .btn-icon-logout {
  display: none;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #3b82f6;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
}

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

.user-role-badge {
  font-size: 9.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-icon-logout {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.btn-icon-logout:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

/* ============================================================================
   Authentication / Login Screen Overlay
   ============================================================================ */
/* ============================================================================
   SaaS Plan & Credits Usage Strip (Sidebar)
   ============================================================================ */
.sidebar-plan-card {
  margin-top: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.crm-sidebar.is-collapsed .sidebar-plan-card {
  display: none;
}

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

.plan-card-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #38bdf8;
  letter-spacing: 0.5px;
}

.plan-card-credits {
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.plan-progress-bg {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
}

.plan-progress-fill {
  height: 100%;
  background: #38bdf8;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.btn-upgrade-plan {
  background: transparent;
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}

.btn-upgrade-plan:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: #38bdf8;
  color: #fff;
}

/* ============================================================================
   Onboarding Modal & Vonsel-Style Pricing Cards
   ============================================================================ */
.onboarding-card {
  max-width: 820px !important;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px 28px !important;
}

.auth-nav-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 20px;
  gap: 16px;
}

.auth-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px 4px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  transition: color 0.15s;
}

.auth-tab-btn:hover {
  color: #fff;
}

.auth-tab-btn.active {
  color: #fff;
}

.auth-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: #2563eb;
  border-radius: 2px;
}

.onboarding-sub {
  font-size: 12.5px;
  color: #94a3b8;
  margin-top: 4px;
}

.pricing-plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.pricing-plan-box {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  transition: all 0.2s ease;
}

.pricing-plan-box:hover {
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.pricing-plan-box.is-featured {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.06);
  box-shadow: 0 0 25px rgba(37, 99, 235, 0.15);
}

.plan-featured-tag {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: #2563eb;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.5px;
}

.plan-badge {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.plan-price {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.plan-price span {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}

.plan-desc {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.35;
  min-height: 32px;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 4px 0 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11.5px;
  color: #cbd5e1;
}

.plan-features li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-plan-select {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  margin-top: auto;
}

.btn-plan-select:hover {
  background: #fff;
  color: #0f172a;
}

.btn-plan-featured {
  background: #2563eb;
  border-color: #2563eb;
}

.btn-plan-featured:hover {
  background: #1d4ed8;
  color: #fff;
}

.plan-selected-pill {
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.3);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  color: #bfdbfe;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-link-action {
  background: transparent;
  border: none;
  color: #38bdf8;
  font-size: 11.5px;
  cursor: pointer;
  text-decoration: underline;
}

.install-step-card {
  text-align: center;
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.install-check-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #10b981;
  color: #fff;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  margin-bottom: 4px;
}

.install-step-card h2 {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.extension-install-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 14px 18px;
  width: 100%;
  max-width: 480px;
  margin-top: 10px;
}

.extension-box-icon {
  width: 36px;
  height: 36px;
}

.extension-box-text {
  text-align: left;
  flex: 1;
}

.extension-box-text h3 {
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
}

.extension-box-text span {
  font-size: 11.5px;
  color: var(--text-muted);
}

.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 10, 15, 0.94);
  backdrop-filter: blur(14px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-overlay.hidden {
  display: none;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 32px 28px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  animation: authFadeIn 0.25s ease-out;
}

@keyframes authFadeIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.auth-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.auth-header p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  text-align: center;
}

.auth-error.hidden {
  display: none;
}

.btn-auth-primary {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 4px;
}

.btn-auth-primary:hover {
  background: #1d4ed8;
}

.auth-quick-switch {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-quick-switch span {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
}

.quick-btns {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.btn-quick-user {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: #d1d5db;
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 11.5px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
}

.btn-quick-user:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.assigned-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.25);
  font-weight: 500;
}

/* ============================================================================
   Integrated WhatsApp Chat Modal / Drawer
   ============================================================================ */
.chat-modal-card {
  width: 500px;
  max-width: 95vw;
  height: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: #0f172a;
}

.chat-header {
  padding: 14px 18px;
  background: #1e293b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #22c55e;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.chat-header-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-header-title-row h2 {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.chat-status-indicator {
  font-size: 10px;
  color: #22c55e;
  font-weight: 500;
}

.chat-status-indicator.offline {
  color: #94a3b8;
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-body {
  flex: 1;
  background: #0b0f19;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.chat-messages-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

.chat-bubble {
  max-width: 78%;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.4;
  position: relative;
  word-break: break-word;
}

.chat-bubble-out {
  align-self: flex-end;
  background: #059669;
  color: #fff;
  border-bottom-right-radius: 2px;
}

.chat-bubble-in {
  align-self: flex-start;
  background: #1e293b;
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom-left-radius: 2px;
}

.chat-time {
  display: block;
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.6);
  text-align: right;
  margin-top: 4px;
}

.chat-footer {
  padding: 12px 16px;
  background: #1e293b;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-template-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
}

.btn-chat-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.btn-chat-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

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

.chat-textarea {
  flex: 1;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 8px 12px;
  color: #fff;
  font-family: inherit;
  font-size: 12.5px;
  resize: none;
  outline: none;
}

.chat-textarea:focus {
  border-color: #22c55e;
}

.btn-chat-send-action {
  width: 38px;
  height: 38px;
  background: #22c55e;
  border: none;
  border-radius: 8px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}

.btn-chat-send-action:hover {
  background: #16a34a;
}

.btn-contact-action {
  background: #10b981 !important;
  color: #fff !important;
  font-weight: 600;
  border: none !important;
}

.btn-contact-action:hover {
  background: #059669 !important;
}

/* ============================================================================
   Team Management View Styling (Admin Only)
   ============================================================================ */
.team-view-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 10px 0 30px;
}

.team-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 16px;
}

.team-header-row h2 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.15s;
}

.team-card:hover {
  border-color: var(--border-hover);
}

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

.team-user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.team-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
}

.team-user-text h3 {
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
}

.team-user-text span {
  font-size: 11.5px;
  color: var(--text-muted);
}

.team-metrics-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
}

.team-metric-box {
  display: flex;
  flex-direction: column;
}

.team-metric-val {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.team-metric-lbl {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.team-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 10px;
}

.team-status-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  cursor: pointer;
  color: var(--text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.active {
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.status-dot.paused {
  background: #f59e0b;
}
