/* Incognito CRM Design System — Bug-free sticky columns, clean dark/light themes, IBM Plex Sans */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

:root {
  --crm-bg: #1e2229;
  --crm-surface: #262b34;
  --crm-card: #2a303b;
  --crm-elevated: #313845;
  --crm-hover: #353d4b;
  --crm-border: #384152;
  --crm-text: #e6ebf5;
  --crm-muted: #98a2b3;
  --crm-sidebar-bg: #262b34;
  --crm-sidebar-text: #9aa5b8;
  --crm-sidebar-active: #ffffff;
  --crm-topbar-bg: #262b34;
  --crm-primary: #556ee6;
  --crm-primary-hover: #485ec4;
  --crm-success: #34c38f;
  --crm-danger: #f46a6a;
  --crm-warning: #f1b44c;
  --crm-info: #50a5f1;
  --crm-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  --crm-radius: 6px;
}

body[data-theme-mode="light"] {
  --crm-bg: #f4f5f8;
  --crm-surface: #ffffff;
  --crm-card: #ffffff;
  --crm-elevated: #f8fafc;
  --crm-hover: #f1f5f9;
  --crm-border: #e2e8f0;
  --crm-text: #1e293b;
  --crm-muted: #64748b;
  --crm-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}

body[data-topbar="light"] {
  --crm-topbar-bg: #ffffff;
}

body[data-sidebar-color="light"] {
  --crm-sidebar-bg: #ffffff;
  --crm-sidebar-text: #475569;
  --crm-sidebar-active: #556ee6;
}

body[data-sidebar-color="brand"] {
  --crm-sidebar-bg: #3b4bb3;
  --crm-sidebar-text: #dbe4ff;
  --crm-sidebar-active: #ffffff;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13px;
  line-height: 1.45;
  background: var(--crm-bg);
  color: var(--crm-text);
  -webkit-font-smoothing: antialiased;
}

a {
  color: #7c93ff;
  text-decoration: none;
}
a:hover {
  color: #9cb0ff;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

/* App Shell */
.app-shell {
  display: flex;
  min-height: 100vh;
}

body[data-layout="horizontal"] .app-shell {
  flex-direction: column;
}

/* Sidebar */
.crm-sidebar {
  width: 248px;
  flex-shrink: 0;
  background: var(--crm-sidebar-bg);
  border-right: 1px solid var(--crm-border);
  display: flex;
  flex-direction: column;
  transition: width 0.2s ease;
  z-index: 40;
}

body[data-sidebar-size="compact"] .crm-sidebar {
  width: 190px;
}

body[data-sidebar-size="sm"] .crm-sidebar {
  width: 68px;
}

body[data-sidebar-size="sm"] .crm-sidebar .nav-label,
body[data-sidebar-size="sm"] .crm-sidebar .nav-section-title,
body[data-sidebar-size="sm"] .crm-sidebar .nav-chevron,
body[data-sidebar-size="sm"] .crm-sidebar .brand-text,
body[data-sidebar-size="sm"] .crm-sidebar .nav-submenu {
  display: none !important;
}

.sidebar-brand {
  height: 60px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--crm-border);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--crm-sidebar-active);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: block;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(85, 110, 230, 0.35);
}

.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px 24px;
}

.nav-section-title {
  padding: 10px 12px 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--crm-muted);
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  margin-bottom: 2px;
  border-radius: var(--crm-radius);
  color: var(--crm-sidebar-text);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-size: 13px;
}

.nav-item:hover {
  background: var(--crm-hover);
  color: var(--crm-sidebar-active);
}

.nav-item.active {
  background: rgba(85, 110, 230, 0.16);
  color: #8aa0ff;
  font-weight: 600;
}

.nav-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.nav-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.nav-submenu {
  padding-left: 26px;
  margin-bottom: 4px;
  display: none;
}

.nav-group.open > .nav-submenu {
  display: block;
}

.nav-subitem {
  display: block;
  padding: 7px 12px;
  border-radius: var(--crm-radius);
  color: var(--crm-sidebar-text);
  font-size: 12.5px;
  margin-bottom: 2px;
}

.nav-subitem:hover, .nav-subitem.active {
  color: var(--crm-sidebar-active);
  background: var(--crm-hover);
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.badge-danger {
  background: var(--crm-danger);
  color: #fff;
}
.badge-success {
  background: rgba(52, 195, 143, 0.18);
  color: var(--crm-success);
}
.badge-primary {
  background: rgba(85, 110, 230, 0.2);
  color: #8aa0ff;
}
.badge-warning {
  background: rgba(241, 180, 76, 0.18);
  color: var(--crm-warning);
}
.badge-muted {
  background: rgba(152, 162, 179, 0.16);
  color: var(--crm-muted);
}

/* Main Column */
.crm-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Topbar */
.crm-topbar {
  height: 60px;
  background: var(--crm-topbar-bg);
  border-bottom: 1px solid var(--crm-border);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 35;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--crm-radius);
  border: 1px solid var(--crm-border);
  background: var(--crm-elevated);
  color: var(--crm-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.icon-btn:hover {
  background: var(--crm-hover);
  border-color: var(--crm-primary);
}

.global-search-wrap {
  position: relative;
  width: 280px;
  max-width: 100%;
}

.global-search-input {
  width: 100%;
  height: 34px;
  padding: 0 12px 0 32px;
  border-radius: var(--crm-radius);
  border: 1px solid var(--crm-border);
  background: var(--crm-bg);
  color: var(--crm-text);
  font-size: 13px;
  outline: none;
}

.global-search-input:focus {
  border-color: var(--crm-primary);
}

.global-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--crm-muted);
  pointer-events: none;
}

.search-results-pop {
  position: absolute;
  top: 40px;
  left: 0;
  right: 0;
  background: var(--crm-card);
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  box-shadow: var(--crm-shadow);
  z-index: 60;
  display: none;
  max-height: 280px;
  overflow-y: auto;
}

.search-results-pop.open {
  display: block;
}

.search-result-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--crm-border);
  color: var(--crm-text);
}
.search-result-row:hover {
  background: var(--crm-hover);
}

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

.clock-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--crm-radius);
  background: var(--crm-elevated);
  border: 1px solid var(--crm-border);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.avatar-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--crm-primary);
  color: #fff;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

/* Dropdowns */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 190px;
  background: var(--crm-card);
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  box-shadow: var(--crm-shadow);
  padding: 6px;
  z-index: 70;
  display: none;
}

.dropdown.open > .dropdown-menu {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--crm-text);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.dropdown-item:hover {
  background: var(--crm-hover);
}

/* Page Content */
.crm-content {
  flex: 1;
  padding: 18px 20px;
}

body[data-layout-width="boxed"] .crm-content {
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.page-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

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

/* Cards */
.crm-card {
  background: var(--crm-card);
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  padding: 16px;
  margin-bottom: 16px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 13px;
  border-radius: var(--crm-radius);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

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

.btn-sm {
  height: 28px;
  padding: 0 9px;
  font-size: 12px;
}

.btn-square {
  width: 28px;
  height: 28px;
  padding: 0;
}

.btn-primary {
  background: var(--crm-primary);
  color: #fff;
}
.btn-primary:hover:not(:disabled) {
  background: var(--crm-primary-hover);
  color: #fff;
}

.btn-success {
  background: var(--crm-success);
  color: #0b2219;
  font-weight: 600;
}

.btn-danger {
  background: var(--crm-danger);
  color: #fff;
}

.btn-dark {
  background: var(--crm-elevated);
  border-color: var(--crm-border);
  color: var(--crm-text);
}
.btn-dark:hover:not(:disabled) {
  background: var(--crm-hover);
}

.btn-light-icon {
  background: #f1f5f9;
  color: #1e293b;
}

/* Forms */
.form-control, .form-select {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--crm-radius);
  border: 1px solid var(--crm-border);
  background: var(--crm-bg);
  color: var(--crm-text);
  font-family: inherit;
  font-size: 12.5px;
  outline: none;
}

.form-control:focus, .form-select:focus {
  border-color: var(--crm-primary);
}

textarea.form-control {
  height: auto;
  padding: 8px 10px;
}

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

@media (max-width: 900px) {
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
}

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--crm-muted);
  margin-bottom: 5px;
}

.req-star {
  color: var(--crm-danger);
}

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

@media (max-width: 1050px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.kpi-card {
  background: var(--crm-card);
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  padding: 16px;
}

.kpi-label {
  font-size: 12px;
  color: var(--crm-muted);
  margin-bottom: 8px;
}

.kpi-value {
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Bug-Free DataTable Container & Sticky Columns */
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.table-toolbar-left, .table-toolbar-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.length-select-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.length-select-wrap select {
  width: auto;
  min-width: 72px;
  height: 30px;
  padding: 0 8px;
}

.crm-table-scroll {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  background: var(--crm-card);
}

.crm-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
}

.crm-table th, .crm-table td {
  padding: 9px 11px;
  border-bottom: 1px solid var(--crm-border);
  border-right: 1px solid rgba(56, 65, 82, 0.55);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.crm-table thead tr.header-row th {
  background: var(--crm-elevated);
  font-weight: 600;
  color: var(--crm-text);
}

.crm-table thead tr.filter-row th {
  background: var(--crm-surface);
  padding: 6px 8px;
}

.crm-table tbody tr:nth-child(even) td {
  background: #2e3541;
}

body[data-theme-mode="light"] .crm-table tbody tr:nth-child(even) td {
  background: #f8fafc;
}

.crm-table tbody tr:hover td {
  background: var(--crm-hover);
}

/* Sticky left checkbox & Sticky right Options — 100% opaque, header+filter+body synced */
.crm-table thead tr.header-row th.sticky-left,
.crm-table thead tr.filter-row th.sticky-left,
.crm-table tbody tr td.sticky-left {
  position: sticky;
  left: 0;
  z-index: 20;
  width: 42px;
  min-width: 42px;
  text-align: center;
}

.crm-table tbody tr td.sticky-left {
  background: var(--crm-card);
}

.crm-table tbody tr:nth-child(even) td.sticky-left {
  background: #2e3541;
}

body[data-theme-mode="light"] .crm-table tbody tr:nth-child(even) td.sticky-left {
  background: #f8fafc;
}

.crm-table tbody tr:hover td.sticky-left {
  background: var(--crm-hover);
}

.crm-table thead tr.header-row th.sticky-left {
  background: var(--crm-elevated);
  z-index: 30;
}

.crm-table thead tr.filter-row th.sticky-left {
  background: var(--crm-surface);
  z-index: 30;
}

.crm-table thead tr.header-row th.sticky-right,
.crm-table thead tr.filter-row th.sticky-right,
.crm-table tbody tr td.sticky-right {
  position: sticky;
  right: 0;
  z-index: 20;
  box-shadow: -10px 0 16px rgba(0, 0, 0, 0.28);
  border-left: 1px solid var(--crm-border);
}

.crm-table tbody tr td.sticky-right {
  background: var(--crm-card);
}

.crm-table tbody tr:nth-child(even) td.sticky-right {
  background: #2e3541;
}

body[data-theme-mode="light"] .crm-table tbody tr:nth-child(even) td.sticky-right {
  background: #f8fafc;
}

.crm-table tbody tr:hover td.sticky-right {
  background: var(--crm-hover);
}

.crm-table thead tr.header-row th.sticky-right {
  background: var(--crm-elevated);
  z-index: 30;
}

.crm-table thead tr.filter-row th.sticky-right {
  background: var(--crm-surface);
  z-index: 30;
}

.col-hidden {
  display: none !important;
}

.options-group {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 12px;
}

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

.page-btn {
  height: 30px;
  min-width: 30px;
  padding: 0 10px;
  border-radius: 4px;
  border: 1px solid var(--crm-border);
  background: var(--crm-elevated);
  color: var(--crm-text);
  cursor: pointer;
}
.page-btn.active {
  background: var(--crm-primary);
  border-color: var(--crm-primary);
  color: #fff;
}
.page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Tabs */
.crm-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--crm-border);
  margin-bottom: 14px;
}

.crm-tab {
  padding: 8px 14px;
  border-radius: var(--crm-radius) var(--crm-radius) 0 0;
  color: var(--crm-muted);
  font-weight: 500;
  border: 1px solid transparent;
  border-bottom: none;
}

.crm-tab.active {
  background: var(--crm-card);
  color: var(--crm-text);
  border-color: var(--crm-border);
}

/* Modals */
.crm-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 90;
  padding: 16px;
}

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

.crm-modal {
  width: 100%;
  max-width: 540px;
  background: var(--crm-card);
  border: 1px solid var(--crm-border);
  border-radius: 8px;
  box-shadow: var(--crm-shadow);
  overflow: hidden;
}

.crm-modal-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--crm-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 14px;
}

.crm-modal-body {
  padding: 16px;
  max-height: 75vh;
  overflow-y: auto;
}

.crm-modal-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--crm-border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Right Theme Customizer Drawer */
.right-bar {
  position: fixed;
  top: 0;
  right: -300px;
  width: 290px;
  height: 100vh;
  background: var(--crm-card);
  border-left: 1px solid var(--crm-border);
  box-shadow: var(--crm-shadow);
  z-index: 95;
  transition: right 0.2s ease;
  display: flex;
  flex-direction: column;
}

.right-bar.open {
  right: 0;
}

/* Toast notifications */
#toast-container {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.crm-toast {
  padding: 10px 14px;
  border-radius: var(--crm-radius);
  background: var(--crm-elevated);
  border: 1px solid var(--crm-border);
  color: var(--crm-text);
  box-shadow: var(--crm-shadow);
  font-size: 12.5px;
  min-width: 220px;
}
.crm-toast.success { border-left: 4px solid var(--crm-success); }
.crm-toast.error { border-left: 4px solid var(--crm-danger); }
.crm-toast.info { border-left: 4px solid var(--crm-primary); }

/* Footer */
.crm-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--crm-border);
  color: var(--crm-muted);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
}

/* Click-to-copy */
.copyable {
  cursor: pointer;
  border-bottom: 1px dashed rgba(152, 162, 179, 0.4);
}
.copyable:hover {
  color: #8aa0ff;
}

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

/* Choices.js-style inline status pill & dropdown */
.status-picker {
  position: relative;
  display: inline-block;
  min-width: 150px;
}

.status-picker-btn {
  width: 100%;
  height: 28px;
  padding: 0 9px;
  border-radius: 4px;
  border: 1px solid var(--crm-border);
  background: var(--crm-elevated);
  color: var(--crm-text);
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.status-picker-btn:hover {
  border-color: var(--crm-primary);
}

.status-picker-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-picker-menu {
  position: fixed;
  min-width: 195px;
  max-height: 260px;
  overflow-y: auto;
  background: var(--crm-card);
  border: 1px solid var(--crm-border);
  border-radius: 6px;
  box-shadow: var(--crm-shadow);
  padding: 5px;
  z-index: 110;
  display: none;
}

.status-picker-menu.open {
  display: block;
}

.status-picker-search {
  width: 100%;
  height: 28px;
  padding: 0 8px;
  margin-bottom: 5px;
  border-radius: 4px;
  border: 1px solid var(--crm-border);
  background: var(--crm-bg);
  color: var(--crm-text);
  font-size: 12px;
  outline: none;
}

.status-picker-option {
  width: 100%;
  padding: 6px 8px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--crm-text);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.status-picker-option:hover,
.status-picker-option.selected {
  background: var(--crm-hover);
}

.status-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--crm-border);
  background: var(--crm-elevated);
  font-size: 12px;
  font-weight: 500;
}


/* Icons (Lucide sprite: static/img/icons.svg) */
.ic {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: -3px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ic.ic-sm { width: 13px; height: 13px; vertical-align: -2px; }
.btn-square .ic { width: 15px; height: 15px; }
.icon-btn .ic { width: 18px; height: 18px; }
.global-search-icon { display: inline-flex; }
.global-search-icon .ic { width: 15px; height: 15px; }
.clock-pill .ic { color: var(--crm-muted); }
.dropdown-item .ic { color: var(--crm-muted); }
body[data-theme-mode="light"] .ic-when-dark,
body:not([data-theme-mode="light"]) .ic-when-light { display: none; }
.lang-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid var(--crm-border);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--crm-muted);
}
.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* Clients table: drag-and-drop column reordering */
.crm-table th.col-draggable { cursor: grab; user-select: none; }
.crm-table th.col-draggable:active { cursor: grabbing; }
.col-head { display: inline-flex; align-items: center; gap: 4px; }
.col-grip { color: var(--crm-muted); opacity: 0; margin-left: -4px; transition: opacity 0.15s ease; }
.crm-table th.col-draggable:hover .col-grip { opacity: 1; }
.crm-table th.col-dragging { opacity: 0.4; }
.crm-table th.col-drop-before { box-shadow: inset 3px 0 0 var(--crm-primary); }
.crm-table th.col-drop-after { box-shadow: inset -3px 0 0 var(--crm-primary); }