:root {
  --crm-accent: #24716e;
  --crm-accent-dark: #155452;
  --crm-ink: #19212b;
  --crm-muted: #6d7a8a;
  --crm-soft: #eef4f5;
}

/* Customer profile 360. */
.dir-classic .crm-profile-360 {
  display: grid;
  gap: 16px;
}

.dir-classic .crm-profile-hero {
  margin-bottom: 0;
}

.dir-classic .crm-profile-hero-grid {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 220px auto;
}

.dir-classic .crm-profile-health,
.dir-classic .crm-profile-stat,
.dir-classic .crm-work-queue article,
.dir-classic .crm-decision-card,
.dir-classic .crm-opportunity-grid article {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.dir-classic .crm-profile-health {
  padding: 14px 16px;
}

.dir-classic .crm-profile-health span,
.dir-classic .crm-profile-stat span {
  color: var(--text-tertiary);
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.dir-classic .crm-profile-health strong {
  color: var(--text);
  display: block;
  font-size: 20px;
}

.dir-classic .crm-profile-health p,
.dir-classic .crm-profile-stat p {
  color: var(--text-secondary);
  margin: 4px 0 0;
}

.dir-classic .crm-profile-health.is-good {
  border-color: #86efac;
}

.dir-classic .crm-profile-health.is-warning {
  border-color: #facc15;
}

.dir-classic .crm-profile-health.is-risk {
  border-color: #fca5a5;
}

.dir-classic .crm-profile-summary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dir-classic .crm-profile-stat {
  padding: 16px;
}

.dir-classic .crm-profile-stat strong {
  color: var(--text);
  display: block;
  font-size: 18px;
  margin-top: 4px;
}

.dir-classic .crm-profile-layout {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) 360px;
}

.dir-classic .crm-profile-main,
.dir-classic .crm-profile-side {
  display: grid;
  gap: 16px;
}

.dir-classic .crm-profile-timeline {
  display: grid;
  gap: 0;
}

.dir-classic .crm-profile-timeline-row {
  display: grid;
  gap: 16px;
  grid-template-columns: 96px minmax(0, 1fr);
  padding: 0 0 18px;
  position: relative;
}

.dir-classic .crm-profile-timeline-row::before {
  background: var(--border);
  bottom: 0;
  content: "";
  left: 47px;
  position: absolute;
  top: 34px;
  width: 1px;
}

.dir-classic .crm-profile-timeline-row:last-child::before {
  display: none;
}

.dir-classic .crm-profile-timeline-date {
  align-items: center;
  color: var(--text-secondary);
  display: grid;
  gap: 2px;
  justify-items: center;
  position: relative;
  z-index: 1;
}

.dir-classic .crm-profile-timeline-date i {
  align-items: center;
  background: var(--accent);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.dir-classic .crm-profile-timeline-date strong {
  color: var(--text);
}

.dir-classic .crm-profile-timeline-content {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.dir-classic .crm-profile-timeline-content p {
  color: var(--text-secondary);
  margin: 8px 0 0;
}

.dir-classic .crm-next-step-line {
  color: var(--accent) !important;
  font-weight: 600;
}

.dir-classic .crm-work-queue {
  display: grid;
  gap: 14px;
}

.dir-classic .crm-work-queue-group {
  display: grid;
  gap: 8px;
}

.dir-classic .crm-work-queue-group > strong {
  color: var(--text);
  font-size: 13px;
}

.dir-classic .crm-work-queue article {
  padding: 10px;
}

.dir-classic .crm-work-queue article span {
  color: var(--accent);
  font-weight: 700;
}

.dir-classic .crm-work-queue article p {
  color: var(--text);
  margin: 2px 0 8px;
}

.dir-classic .crm-ai-note-stack {
  display: grid;
  gap: 8px;
}

.dir-classic .crm-ai-note-stack p {
  background: var(--bg-sunken);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  margin: 0;
  padding: 10px 12px;
}

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

.dir-classic .crm-opportunity-grid article {
  padding: 14px;
}

.dir-classic .crm-empty-illustrated {
  border-style: dashed;
  padding: 24px;
  text-align: left;
}

.dir-classic .crm-drawer-modal {
  padding-right: 0 !important;
}

.dir-classic .crm-drawer-dialog {
  height: auto;
  margin: 76px 24px 0 auto;
  max-width: 340px;
  width: calc(100% - 48px);
}

.dir-classic .crm-drawer-dialog .modal-content {
  border-radius: var(--radius-md);
  max-height: calc(100vh - 112px);
  min-height: 0;
  overflow: auto;
  box-shadow: var(--shadow-lg);
}

.dir-classic .crm-quick-drawer-body {
  align-content: start;
  display: grid;
  gap: 8px;
  padding: 12px 14px;
}

.dir-classic .crm-quick-action {
  align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  display: grid;
  gap: 1px 10px;
  grid-template-columns: 30px minmax(0, 1fr);
  min-height: 52px;
  padding: 8px 10px;
  text-align: left;
  width: 100%;
}

.dir-classic .crm-quick-action:hover {
  background: var(--bg-hover);
  color: var(--text);
  text-decoration: none;
}

.dir-classic .crm-quick-action i {
  align-items: center;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  color: var(--accent);
  display: inline-flex;
  grid-row: span 2;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.dir-classic .crm-quick-action span {
  font-size: 13px;
  font-weight: 700;
}

.dir-classic .crm-quick-action small {
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.25;
}

.dir-classic .crm-company-profile-shell {
  overflow: hidden;
}

.dir-classic .crm-company-profile-shell .card-body {
  padding: 0;
}

.dir-classic .crm-company-profile-head {
  align-items: center;
  background: #fff;
  display: grid;
  gap: 18px;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  padding: 24px 28px;
}

.dir-classic .crm-company-avatar {
  align-items: center;
  background: linear-gradient(135deg, #6d5dfc 0%, #8b5cf6 100%);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 24px;
  font-weight: 800;
  height: 68px;
  justify-content: center;
  letter-spacing: 0;
  width: 68px;
}

.dir-classic .crm-company-title-block {
  min-width: 0;
}

.dir-classic .crm-company-title-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dir-classic .crm-company-title-row .page-title {
  font-size: 28px;
  line-height: 1.15;
  margin: 0 6px 0 0;
}

.dir-classic .crm-company-profile-meta {
  gap: 14px;
  margin-top: 8px;
}

.dir-classic .crm-company-profile-meta span:not(.badge)::before {
  content: none;
}

.dir-classic .crm-company-profile-meta i,
.dir-classic .crm-company-owner-line i {
  color: var(--text-tertiary);
  font-size: 15px;
}

.dir-classic .crm-company-owner-line {
  align-items: center;
  color: var(--text-secondary);
  display: flex;
  font-size: 13px;
  gap: 6px;
  margin-top: 8px;
}

.dir-classic .crm-company-profile-metrics {
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.dir-classic .crm-company-profile-metrics article {
  border-right: 1px solid var(--border);
  min-width: 0;
  padding: 16px 20px;
}

.dir-classic .crm-company-profile-metrics article:last-child {
  border-right: 0;
}

.dir-classic .crm-company-profile-metrics span,
.dir-classic .crm-company-tabs button {
  color: var(--text-tertiary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.dir-classic .crm-company-profile-metrics strong {
  color: var(--text);
  display: block;
  font-size: 22px;
  line-height: 1.1;
  margin-top: 6px;
}

.dir-classic .crm-company-profile-metrics small {
  color: var(--text-secondary);
  display: block;
  margin-top: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dir-classic .crm-company-health-score strong {
  align-items: center;
  display: flex;
  gap: 8px;
}

.dir-classic .crm-company-health-score strong::after {
  border: 3px solid var(--success);
  border-left-color: var(--success-soft);
  border-radius: 50%;
  content: "";
  height: 24px;
  width: 24px;
}

.dir-classic .crm-customer-tabs-card {
  overflow: hidden;
}

.dir-classic .crm-company-tabs {
  align-items: center;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 0 18px;
}

.dir-classic .crm-company-tabs button {
  align-items: center;
  background: transparent;
  border-bottom: 2px solid transparent;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  gap: 6px;
  padding: 15px 10px 13px;
  text-decoration: none;
  text-transform: none;
  white-space: nowrap;
}

.dir-classic .crm-company-tabs button.is-active {
  border-bottom-color: var(--accent);
  color: var(--text);
}

.dir-classic .crm-company-tabs button.is-active span {
  background: rgba(79, 70, 229, 0.14);
  color: var(--accent);
}

.dir-classic .crm-company-tabs span {
  background: var(--bg-sunken);
  border-radius: 999px;
  color: var(--text-tertiary);
  font-size: 11px;
  font-weight: 800;
  min-width: 20px;
  padding: 2px 6px;
  text-align: center;
}

.dir-classic .crm-company-note-composer {
  align-items: center;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
  margin: 16px 18px 0;
  min-height: 56px;
  padding: 10px 12px;
}

.dir-classic .crm-company-note-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dir-classic .crm-company-note-tabs span {
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  padding: 7px 10px;
}

.dir-classic .crm-company-note-tabs span.is-active {
  background: #fff;
  box-shadow: var(--shadow-sm);
  color: var(--text);
}

.dir-classic .crm-customer-tabs-card .card-body {
  padding: 18px;
}

.dir-classic .crm-company-tab-panel[hidden] {
  display: none;
}

.dir-classic .crm-company-tab-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.dir-classic .crm-company-tab-header strong {
  color: var(--text);
  display: block;
  font-size: 15px;
}

.dir-classic .crm-company-tab-header p {
  color: var(--text-secondary);
  margin: 2px 0 0;
}

.dir-classic .crm-company-tab-actions {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 8px;
}

.dir-classic .crm-customer-tabs-card:not(.crm-action-company-tabs-card) .crm-offers-overview {
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 12px;
}

.dir-classic .crm-customer-tabs-card:not(.crm-action-company-tabs-card) .crm-offers-overview article {
  align-items: center;
  display: grid;
  gap: 7px;
  grid-template-columns: minmax(92px, auto) minmax(34px, auto) minmax(0, 1fr);
  min-height: 42px;
  padding: 7px 10px;
}

.dir-classic .crm-customer-tabs-card:not(.crm-action-company-tabs-card) .crm-offers-overview span {
  font-size: 10px;
  line-height: 1.2;
}

.dir-classic .crm-customer-tabs-card:not(.crm-action-company-tabs-card) .crm-offers-overview strong {
  font-size: 18px;
  line-height: 1;
  margin: 0;
  text-align: right;
}

.dir-classic .crm-customer-tabs-card:not(.crm-action-company-tabs-card) .crm-offers-overview small {
  font-size: 11px;
  line-height: 1.25;
}

.dir-classic .crm-profile-timeline-row {
  grid-template-columns: 42px minmax(0, 1fr);
  padding-bottom: 14px;
}

.dir-classic .crm-profile-timeline-row::before {
  left: 20px;
  top: 32px;
}

.dir-classic .crm-profile-timeline-date {
  align-content: start;
  gap: 6px;
}

.dir-classic .crm-profile-timeline-date i {
  background: var(--accent-soft);
  color: var(--accent);
  height: 32px;
  width: 32px;
}

.dir-classic .crm-profile-timeline-date strong,
.dir-classic .crm-profile-timeline-date span {
  display: none;
}

.dir-classic .crm-profile-timeline-content {
  background: var(--bg-sunken);
  border: 0;
  border-radius: var(--radius-md);
  padding: 13px 14px;
}

.dir-classic .crm-history-action-name {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.dir-classic .crm-history-heading {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dir-classic .crm-history-heading strong {
  color: var(--text);
}

.dir-classic .crm-history-heading span {
  color: var(--text-secondary);
}

.dir-classic .crm-history-badges {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.dir-classic .crm-company-deals-table {
  display: grid;
  gap: 0;
  padding: 0;
}

.dir-classic .crm-company-deals-table article {
  align-items: center;
  border-bottom: 1px solid var(--divider);
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) 160px 130px;
  padding: 14px 18px;
}

.dir-classic .crm-company-deals-table article:last-child {
  border-bottom: 0;
}

.dir-classic .crm-company-deals-table strong,
.dir-classic .crm-company-deals-table b {
  color: var(--text);
}

.dir-classic .crm-company-deals-table span {
  color: var(--text-secondary);
  display: block;
  font-size: 12px;
  margin-top: 4px;
}

.dir-classic .crm-company-about .card-body p {
  color: var(--text-secondary);
  margin: 0;
}

.crm-modal-saved {
  align-items: center;
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 42px 20px;
  text-align: center;
}

.crm-modal-saved-icon {
  align-items: center;
  background: #dcfce7;
  border-radius: 50%;
  color: #15803d;
  display: inline-flex;
  font-size: 28px;
  height: 58px;
  justify-content: center;
  width: 58px;
}

@media (max-width: 1199px) {
  .dir-classic .crm-customer-tabs-card:not(.crm-action-company-tabs-card) .crm-offers-overview article {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

  .dir-classic .crm-customer-tabs-card:not(.crm-action-company-tabs-card) .crm-offers-overview strong {
    text-align: left;
  }

  .dir-classic .crm-profile-hero-grid,
  .dir-classic .crm-profile-layout {
    grid-template-columns: 1fr;
  }

  .dir-classic .crm-profile-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dir-classic .crm-company-profile-head,
  .dir-classic .crm-company-profile-metrics {
    grid-template-columns: 1fr;
  }

  .dir-classic .crm-company-profile-metrics article {
    border-bottom: 1px solid var(--border);
    border-right: 0;
  }
}

@media (max-width: 767px) {
  .dir-classic .crm-profile-summary-grid,
  .dir-classic .crm-opportunity-grid,
  .dir-classic .crm-profile-timeline-row {
    grid-template-columns: 1fr;
  }

  .dir-classic .crm-profile-timeline-row::before {
    display: none;
  }

  .dir-classic .crm-profile-timeline-date {
    justify-items: start;
  }

  .dir-classic .crm-company-profile-head {
    padding: 18px;
  }

  .dir-classic .crm-company-actions,
  .dir-classic .crm-company-note-composer {
    align-items: stretch;
    display: grid;
    gap: 8px;
  }

  .dir-classic .crm-company-deals-table article {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   Claude redesign rollout: Classic refined
   Applied globally over the existing Symfony screens.
   ======================================== */

.dir-classic {
  --bg: #f7f8fa;
  --bg-elevated: #ffffff;
  --bg-sunken: #eef0f4;
  --bg-hover: #f1f3f7;
  --bg-active: #e7eaf1;
  --border: #e4e7ee;
  --border-strong: #d4d9e2;
  --divider: #eef0f4;
  --text: #14181f;
  --text-secondary: #4a5161;
  --text-tertiary: #7a8194;
  --text-quaternary: #a4abba;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: #eef0fe;
  --accent-text: #ffffff;
  --accent-fg: #4f46e5;
  --success: #10b981;
  --success-soft: #d1fae5;
  --warning: #f59e0b;
  --warning-soft: #fef3c7;
  --danger: #ef4444;
  --danger-soft: #fee2e2;
  --info: #0ea5e9;
  --info-soft: #e0f2fe;
  --stage-1: #94a3b8;
  --stage-2: #6366f1;
  --stage-3: #8b5cf6;
  --stage-4: #ec4899;
  --stage-5: #10b981;
  --radius-sm: 6px;
  --radius: 8px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(15, 18, 30, 0.04);
  --shadow: 0 1px 3px rgba(15, 18, 30, 0.06), 0 1px 2px rgba(15, 18, 30, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 18, 30, 0.06), 0 2px 4px rgba(15, 18, 30, 0.04);
  --font-sans: 'Inter Tight', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --crm-accent: var(--accent);
  --crm-accent-dark: var(--accent-hover);
  --crm-ink: var(--text);
  --crm-muted: var(--text-tertiary);
  --crm-soft: var(--bg-sunken);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
}

.dir-classic .wrapper,
.dir-classic .main-panel,
.dir-classic .content,
.dir-classic.crm-modal-page {
  background: var(--bg);
}

.dir-classic .main-header {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  box-shadow: none;
  min-height: 56px;
}

.dir-classic .main-header .logo-header {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--divider);
  border-right: 1px solid var(--border);
  height: 56px;
  padding: 0 18px;
}

.dir-classic .main-header .logo-header .logo {
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 700;
}

.dir-classic .crm-logo-mark {
  background: var(--accent);
  border-radius: var(--radius-sm);
  color: var(--accent-text);
  height: 28px;
  width: 28px;
}

.dir-classic .crm-logo-text {
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
}

.dir-classic .navbar-header {
  background: var(--bg-elevated);
  min-height: 56px;
  padding: 0 24px;
}

.dir-classic .navbar-header .container-fluid {
  align-items: center;
  gap: 16px;
}

.dir-classic .crm-topbar-workspace {
  align-items: center;
  display: grid;
  gap: 8px 18px;
  grid-template-columns: minmax(300px, max-content) minmax(360px, 560px);
  min-width: 0;
}

.dir-classic .crm-breadcrumbs {
  align-items: center;
  background: #fff;
  border: 1px solid #e6ebf2;
  border-radius: 8px;
  color: var(--text-tertiary);
  display: flex;
  flex-wrap: wrap;
  font-size: 11px;
  gap: 0;
  max-width: 520px;
  min-height: 34px;
  min-width: 300px;
  padding: 4px 8px;
}

.dir-classic .crm-breadcrumbs a,
.dir-classic .crm-breadcrumbs span {
  align-items: center;
  border-radius: 6px;
  color: var(--text-tertiary);
  display: inline-flex;
  font-weight: 750;
  letter-spacing: .01em;
  line-height: 1;
  max-width: 260px;
  overflow: hidden;
  padding: 6px 7px;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dir-classic .crm-breadcrumbs a:hover {
  background: #f4f6fb;
  color: var(--accent);
}

.dir-classic .crm-breadcrumbs a::after,
.dir-classic .crm-breadcrumbs span:not(:last-child)::after {
  color: #aeb8c6;
  content: "›";
  font-size: 15px;
  line-height: 1;
  margin-left: 10px;
  margin-right: 2px;
}

.dir-classic .crm-breadcrumbs span:last-child {
  background: #f4f6fb;
  color: var(--text);
  font-weight: 800;
}

@media (max-width: 991.98px) {
  .dir-classic .crm-topbar-workspace {
    grid-template-columns: 1fr;
  }

  .dir-classic .crm-breadcrumbs {
    max-width: 100%;
    min-width: 0;
  }

  .dir-classic .crm-breadcrumbs a,
  .dir-classic .crm-breadcrumbs span {
    max-width: 180px;
  }
}

.dir-classic .crm-global-search {
  margin: 0 !important;
  width: 100%;
}

.dir-classic .nav-search .input-group {
  align-items: center;
  background: var(--bg-sunken);
  border: 1px solid transparent;
  border-radius: var(--radius);
  min-height: 36px;
  overflow: hidden;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.dir-classic .crm-global-search .input-group {
  min-height: 44px;
}

.dir-classic .nav-search .input-group:focus-within,
.dir-classic .nav-search .input-group:hover {
  background: var(--bg-elevated);
  border-color: var(--accent);
}

.dir-classic .nav-search .form-control,
.dir-classic .nav-search .btn-search {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--text);
  font-size: 13px;
  height: 34px;
}

.dir-classic .crm-global-search .form-control,
.dir-classic .crm-global-search .btn-search {
  font-size: 14px;
  height: 42px;
}

.dir-classic .topbar-nav .nav-link {
  align-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--text-secondary) !important;
  display: inline-flex;
  min-height: 32px;
  padding: 6px 9px;
}

.dir-classic .topbar-nav .nav-link:hover,
.dir-classic .topbar-nav .dropdown.show .nav-link {
  background: var(--bg-hover);
  border-color: var(--border);
  color: var(--text) !important;
}

.dir-classic .notification {
  background: var(--danger);
  border: 2px solid var(--bg-elevated);
}

.dir-classic .sidebar {
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  box-shadow: none;
  color: var(--text);
}

.dir-classic .sidebar .scrollbar-inner,
.dir-classic .sidebar-wrapper {
  background: transparent;
}

.dir-classic .sidebar .user {
  border-bottom: 1px solid var(--divider);
  margin: 0 10px 6px;
  padding: 16px 8px 14px;
}

.dir-classic .sidebar .user .info a > span,
.dir-classic .sidebar .user .info .user-level {
  color: var(--text);
}

.dir-classic .sidebar .user .info .user-level {
  color: var(--text-tertiary);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.dir-classic .sidebar .nav {
  padding: 6px 8px 18px;
}

.dir-classic .sidebar .nav > .nav-item {
  margin: 1px 0;
}

.dir-classic .sidebar .nav > .nav-item a {
  align-items: center;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  display: flex;
  font-size: 13.5px;
  font-weight: 600;
  gap: 10px;
  min-height: 36px;
  padding: 7px 10px;
  transition: background 0.12s ease, color 0.12s ease;
}

.dir-classic .sidebar .nav > .nav-item a:hover,
.dir-classic .sidebar .nav > .nav-item.active > a {
  background: var(--bg-active);
  color: var(--text) !important;
}

.dir-classic .sidebar .nav > .nav-item a i {
  color: inherit;
  font-size: 17px;
  margin-right: 0;
  opacity: 0.86;
  text-align: center;
  width: 18px;
}

.dir-classic .sidebar .nav > .nav-item a p {
  color: inherit;
  font-size: inherit;
  line-height: 1.2;
  margin: 0;
}

.dir-classic .sidebar .badge-count {
  background: var(--accent);
  border-radius: 99px;
  color: var(--accent-text);
  font-size: 10px;
  margin-left: auto;
  padding: 2px 6px;
}

.dir-classic .crm-sidebar-subnav {
  margin: 4px 0 10px;
  padding-left: 34px !important;
}

.dir-classic .crm-sidebar-subnav li a {
  border-radius: var(--radius-sm);
  color: var(--text-tertiary) !important;
  font-size: 12.5px;
  min-height: 30px !important;
  padding: 6px 9px !important;
}

.dir-classic .crm-sidebar-subnav li.active a,
.dir-classic .crm-sidebar-subnav li a:hover {
  background: var(--accent-soft);
  color: var(--accent-fg) !important;
}

.dir-classic .sidebar .update-pro {
  margin-top: 12px;
  padding: 10px 8px;
}

.dir-classic .main-panel > .content {
  padding-top: 24px;
}

.dir-classic .container-fluid {
  max-width: 1480px;
}

.dir-classic .crm-page-header {
  align-items: flex-start;
  background: transparent;
  border: 0;
  gap: 18px;
  margin-bottom: 18px;
}

.dir-classic .crm-eyebrow {
  color: var(--accent-fg);
  font-size: 11px;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.dir-classic .page-title {
  color: var(--text);
  font-size: 30px;
  font-weight: 750;
  letter-spacing: 0;
  line-height: 1.12;
}

.dir-classic .page-subtitle {
  color: var(--text-tertiary);
  font-size: 14px;
  line-height: 1.45;
  max-width: 900px;
}

.dir-classic .card,
.dir-classic .modal-content,
.dir-classic .dropdown-menu {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  color: var(--text);
}

.dir-classic .card {
  margin-bottom: 18px;
  overflow: hidden;
}

.dir-classic .card-header {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--divider);
  padding: 14px 18px;
}

.dir-classic .card-body {
  padding: 18px;
}

.dir-classic .card-title {
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
}

.dir-classic .card-category {
  color: var(--text-tertiary);
  font-size: 12.5px;
  margin-top: 3px;
}

.dir-classic .card-stats {
  border-radius: var(--radius-lg);
}

.dir-classic .card-stats.card-primary,
.dir-classic .card-stats.card-success,
.dir-classic .card-stats.card-warning,
.dir-classic .card-stats.card-danger {
  background: var(--bg-elevated);
  color: var(--text);
}

.dir-classic .card-stats .icon-big {
  align-items: center;
  background: var(--accent-soft);
  border-radius: var(--radius);
  color: var(--accent-fg);
  display: inline-flex;
  font-size: 24px;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.dir-classic .card-stats.card-success .icon-big {
  background: var(--success-soft);
  color: #047857;
}

.dir-classic .card-stats.card-warning .icon-big {
  background: var(--warning-soft);
  color: #b45309;
}

.dir-classic .card-stats.card-danger .icon-big {
  background: var(--danger-soft);
  color: #b91c1c;
}

.dir-classic .card-stats .card-category,
.dir-classic .card-stats .card-title {
  color: var(--text);
}

.dir-classic .card-stats .card-category {
  color: var(--text-tertiary);
  font-weight: 600;
}

.dir-classic .btn {
  align-items: center;
  border-radius: var(--radius);
  display: inline-flex;
  font-size: 13px;
  font-weight: 650;
  gap: 6px;
  justify-content: center;
  line-height: 1.25;
  padding: 7px 12px;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
  white-space: nowrap;
}

.dir-classic .btn-primary,
.dir-classic .btn-success {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: var(--accent-text) !important;
}

.dir-classic .btn-primary:hover,
.dir-classic .btn-success:hover {
  background: var(--accent-hover) !important;
  border-color: var(--accent-hover) !important;
}

.dir-classic .btn-default,
.dir-classic .btn-secondary {
  background: var(--bg-elevated) !important;
  border-color: var(--border-strong) !important;
  color: var(--text) !important;
}

.dir-classic .btn-default:hover,
.dir-classic .btn-secondary:hover {
  background: var(--bg-hover) !important;
}

.dir-classic .btn-danger {
  background: var(--danger) !important;
  border-color: var(--danger) !important;
  color: #fff !important;
}

.dir-classic .btn-sm,
.dir-classic .btn-xs {
  border-radius: var(--radius-sm);
  font-size: 12px;
  padding: 5px 8px;
}

.dir-classic .form-control,
.dir-classic .custom-select,
.dir-classic select.form-control,
.dir-classic textarea.form-control {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: none;
  color: var(--text);
  font-size: 13.5px;
  min-height: 38px;
  padding: 8px 11px;
}

.dir-classic textarea.form-control {
  line-height: 1.5;
}

.dir-classic .form-control:focus,
.dir-classic select.form-control:focus,
.dir-classic textarea.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.dir-classic label,
.dir-classic .form-label {
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 650;
  margin-bottom: 6px;
}

.dir-classic .form-text,
.dir-classic .text-muted,
.dir-classic .crm-card-muted {
  color: var(--text-tertiary) !important;
}

.dir-classic .table-responsive {
  border-radius: var(--radius);
}

.dir-classic .table {
  color: var(--text);
  margin-bottom: 0;
}

.dir-classic .table thead th {
  background: var(--bg-sunken);
  border-bottom: 1px solid var(--border);
  color: var(--text-tertiary);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.05em;
  padding: 10px 12px;
  text-transform: uppercase;
}

.dir-classic .table tbody td {
  border-top: 1px solid var(--divider);
  color: var(--text-secondary);
  padding: 12px;
  vertical-align: middle;
}

.dir-classic .table-hover tbody tr:hover {
  background: var(--bg-hover);
}

.dir-classic .crm-row-link,
.dir-classic a {
  color: var(--accent-fg);
}

.dir-classic .crm-clickable-row {
  cursor: pointer;
}

.dir-classic .badge {
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  padding: 4px 8px;
}

.dir-classic .badge-info {
  background: var(--info-soft);
  color: #0369a1;
}

.dir-classic .badge-success {
  background: var(--success-soft);
  color: #047857;
}

.dir-classic .badge-warning {
  background: var(--warning-soft);
  color: #92400e;
}

.dir-classic .badge-danger {
  background: var(--danger-soft);
  color: #b91c1c;
}

.dir-classic .badge-default {
  background: var(--bg-active);
  color: var(--text-secondary);
}

.dir-classic .alert {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.dir-classic .alert-success {
  background: var(--success-soft);
  color: #065f46;
}

.dir-classic .alert-warning {
  background: var(--warning-soft);
  color: #92400e;
}

.dir-classic .alert-danger {
  background: var(--danger-soft);
  color: #991b1b;
}

.dir-classic .dropdown-menu {
  padding: 8px;
}

.dir-classic .dropdown-item {
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  padding: 8px 10px;
}

.dir-classic .dropdown-item:hover,
.dir-classic .dropdown-item.active {
  background: var(--bg-hover);
  color: var(--text);
}

.dir-classic .crm-action-row,
.dir-classic .crm-empty-state,
.dir-classic .crm-empty-mini,
.dir-classic .crm-ai-button,
.dir-classic .crm-step {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.dir-classic .crm-action-row:hover,
.dir-classic .crm-step:hover,
.dir-classic .card .card-body .crm-ai-button:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.dir-classic .crm-action-row.is-hot {
  border-color: var(--warning);
}

.dir-classic .crm-step-number {
  background: var(--accent);
  border-radius: var(--radius-sm);
}

.dir-classic .crm-company-hero {
  background: linear-gradient(180deg, #ffffff 0%, #f7f8ff 100%);
  border-color: var(--border);
}

.dir-classic .crm-company-meta {
  color: var(--text-tertiary);
}

.dir-classic .crm-warning-card {
  border-color: #f7d796;
}

.dir-classic .crm-detail-list article,
.dir-classic .crm-history-record,
.dir-classic .crm-contact-item,
.dir-classic .crm-calendar-list-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.dir-classic .crm-detail-list article,
.dir-classic .crm-calendar-list-item {
  margin-bottom: 10px;
  padding: 12px;
}

.dir-classic .crm-history-record {
  margin-bottom: 12px;
  padding: 12px;
}

.dir-classic .crm-history-date {
  background: var(--accent-soft);
  border-radius: var(--radius);
  color: var(--accent-fg);
}

.dir-classic .crm-action-stat-strip {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.dir-classic .crm-action-stat-item {
  background: transparent;
  border-color: var(--divider);
  color: var(--text);
}

.dir-classic .crm-action-stat-item:hover,
.dir-classic .crm-action-stat-item.is-active {
  background: var(--accent-soft);
  color: var(--accent-fg);
}

.dir-classic .crm-calendar-toolbar .card-body {
  padding: 14px 18px;
}

.dir-classic .crm-calendar-grid {
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  gap: 1px;
  overflow: hidden;
}

.dir-classic .crm-calendar-weekday {
  background: var(--bg-sunken);
  color: var(--text-tertiary);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.dir-classic .crm-calendar-day {
  background: var(--bg-elevated);
  border: 0;
  color: var(--text);
  min-height: 118px;
}

.dir-classic .crm-calendar-day:hover {
  background: var(--bg-hover);
}

.dir-classic .crm-calendar-day.is-today {
  box-shadow: inset 0 0 0 2px var(--accent);
}

.dir-classic .crm-calendar-pill {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  color: var(--accent-fg);
}

.dir-classic .crm-calendar-pill.is-event {
  background: var(--info-soft);
  color: #0369a1;
}

.dir-classic .modal-content {
  overflow: hidden;
}

.dir-classic .modal-header {
  border-bottom: 1px solid var(--divider);
  padding: 18px;
}

.dir-classic .modal-title {
  color: var(--text);
  font-size: 20px;
  font-weight: 750;
}

.dir-classic .modal-body,
.dir-classic .modal-footer {
  padding: 18px;
}

.dir-classic .crm-ai-status,
.dir-classic .crm-ai-note-panel,
.dir-classic .crm-ai-result-empty,
.dir-classic .crm-ai-placeholder,
.dir-classic .crm-ai-loading-card,
.dir-classic .crm-ai-warning-card,
.dir-classic .crm-ai-error-card {
  background: var(--bg-sunken);
  border-color: var(--border);
  border-radius: var(--radius);
}

.dir-classic .crm-ai-note-panel.is-error,
.dir-classic .crm-ai-status-error,
.dir-classic .crm-ai-error-card {
  background: #fff8f7;
  border-color: #f0c7c4;
  color: #991b1b;
}

.dir-classic .crm-modal-page-content {
  background: var(--bg);
  min-height: 100vh;
  padding: 18px;
}

.dir-classic .crm-form-card {
  margin-left: auto;
  margin-right: auto;
}

.dir-classic .flatpickr-calendar {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  font-family: var(--font-sans);
}

.dir-classic .footer {
  background: transparent;
  border-top: 1px solid var(--divider);
  color: var(--text-tertiary);
}

@media (max-width: 991px) {
  .dir-classic .crm-topbar-workspace {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .dir-classic .crm-breadcrumbs {
    display: none;
  }

  .dir-classic .navbar-header {
    padding: 0 12px;
  }

  .dir-classic .crm-page-header {
    display: block;
  }

  .dir-classic .crm-page-header > .btn,
  .dir-classic .crm-page-header > .btn-group,
  .dir-classic .crm-page-header > a.btn {
    margin-top: 12px;
  }

  .dir-classic .page-title {
    font-size: 24px;
  }

  .dir-classic .table thead {
    display: none;
  }

  .dir-classic .table,
  .dir-classic .table tbody,
  .dir-classic .table tr,
  .dir-classic .table td {
    display: block;
    width: 100%;
  }

  .dir-classic .table tbody tr {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 10px;
    overflow: hidden;
  }

  .dir-classic .table tbody td {
    border-top: 1px solid var(--divider);
  }
}

/* Calendar redesign: Classic refined week planner. */
.dir-classic .crm-calendar-page {
  padding-bottom: 24px;
}

.dir-classic .crm-calendar-shell-head {
  align-items: flex-start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.dir-classic .crm-calendar-head-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.dir-classic .crm-calendar-view-tabs {
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: inline-flex;
  gap: 2px;
  padding: 3px;
}

.dir-classic .crm-calendar-view-tabs a,
.dir-classic .crm-calendar-view-tabs span,
.dir-classic .crm-calendar-view-tabs strong {
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  display: inline-flex;
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  padding: 7px 9px;
  text-decoration: none;
}

.dir-classic .crm-calendar-view-tabs a.is-active,
.dir-classic .crm-calendar-view-tabs strong {
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
  color: var(--text);
}

.dir-classic .crm-calendar-toolbar {
  margin-bottom: 14px;
}

.dir-classic .crm-calendar-toolbar .card-body {
  align-items: center;
  display: flex;
  justify-content: flex-end;
  padding: 12px 14px;
}

.dir-classic .crm-calendar-filter {
  margin: 0;
}

.dir-classic .crm-calendar-workspace {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 360px;
}

.dir-classic .crm-week-planner-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: auto;
}

.dir-classic .crm-week-planner {
  display: grid;
  grid-template-columns: 58px repeat(7, minmax(118px, 1fr));
  min-width: 980px;
}

.dir-classic .crm-week-corner,
.dir-classic .crm-week-day-head {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  min-height: 72px;
  position: sticky;
  top: 0;
  z-index: 2;
}

.dir-classic .crm-week-corner {
  border-right: 1px solid var(--border);
  left: 0;
  z-index: 3;
}

.dir-classic .crm-week-day-head {
  appearance: none;
  border-left: 0;
  border-right: 1px solid var(--border);
  border-top: 0;
  color: var(--text);
  cursor: pointer;
  display: grid;
  gap: 4px;
  padding: 13px 10px 11px;
  text-align: center;
}

.dir-classic .crm-week-day-head span {
  color: var(--text-tertiary);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.dir-classic .crm-week-day-head strong {
  color: var(--text);
  font-size: 19px;
  font-weight: 750;
}

.dir-classic .crm-week-day-head.is-today strong {
  align-items: center;
  background: var(--accent);
  border-radius: 99px;
  color: var(--accent-text);
  display: inline-flex;
  height: 30px;
  justify-content: center;
  justify-self: center;
  min-width: 30px;
  padding: 0 8px;
}

.dir-classic .crm-week-hours {
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  color: var(--text-tertiary);
  display: grid;
  font-size: 11px;
  font-weight: 650;
  grid-template-rows: repeat(var(--work-hour-rows, 10), 64px);
  position: sticky;
  left: 0;
  z-index: 1;
}

.dir-classic .crm-week-hours > div {
  border-bottom: 1px solid var(--divider);
  padding: 7px 8px 0 0;
  text-align: right;
}

.dir-classic .crm-week-day-column {
  appearance: none;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 31px,
      var(--divider) 32px,
      transparent 33px,
      transparent 63px,
      var(--border) 64px
    ),
    var(--bg-elevated);
  border: 0;
  border-right: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  display: grid;
  gap: 4px;
  grid-template-rows: repeat(var(--work-slot-rows, 20), 32px);
  min-height: var(--work-calendar-height, 640px);
  padding: 0 5px;
  position: relative;
  text-align: left;
}

.dir-classic .crm-week-day-column:hover {
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 31px,
      var(--divider) 32px,
      transparent 33px,
      transparent 63px,
      var(--border) 64px
    ),
    #fbfbff;
}

.dir-classic .crm-week-day-column.is-today {
  box-shadow: inset 0 0 0 2px rgba(79, 70, 229, 0.18);
}

.dir-classic .crm-week-event {
  --event-color: var(--accent);
  align-self: stretch;
  background: var(--event-color);
  border: 0;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 18px rgba(15, 18, 30, 0.12);
  color: #fff;
  display: block;
  line-height: 1.2;
  margin: 3px 0;
  min-height: 28px;
  overflow: hidden;
  padding: 8px;
  pointer-events: none;
}

.dir-classic .crm-week-event strong,
.dir-classic .crm-week-event small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dir-classic .crm-week-event strong {
  font-size: 12px;
  font-weight: 800;
}

.dir-classic .crm-week-event small {
  color: rgba(255, 255, 255, 0.92);
  font-size: 10.5px;
  font-weight: 700;
  margin-top: 2px;
}

.dir-classic .crm-week-event.is-activity {
  --event-color: #4f46e5;
}

.dir-classic .crm-week-event.is-calendar-event {
  --event-color: #0ea5e9;
}

.dir-classic .is-draggable-calendar-event {
  cursor: grab;
}

.dir-classic .is-draggable-calendar-event.is-dragging {
  cursor: grabbing;
  opacity: 0.55;
}

.dir-classic .is-draggable-calendar-event.is-moving {
  opacity: 0.7;
  pointer-events: none;
}

.dir-classic [data-calendar-drop-day].is-drop-target {
  outline: 2px solid rgba(79, 70, 229, 0.55);
  outline-offset: -2px;
}

.dir-classic .crm-week-event.is-all-day {
  background: #7a8194;
  grid-row: 1 / span 1;
}

.dir-classic .crm-calendar-agenda {
  position: sticky;
  top: 74px;
}

.dir-classic .crm-calendar-agenda .card-body {
  max-height: 710px;
  overflow: auto;
}

.dir-classic .crm-calendar-list-item {
  grid-template-columns: 74px minmax(0, 1fr) auto;
}

@media (max-width: 1199px) {
  .dir-classic .crm-calendar-workspace {
    grid-template-columns: 1fr;
  }

  .dir-classic .crm-calendar-agenda {
    position: static;
  }
}

@media (max-width: 767px) {
  .dir-classic .crm-calendar-shell-head {
    display: block;
  }

  .dir-classic .crm-calendar-head-actions {
    justify-content: flex-start;
    margin-top: 12px;
  }

  .dir-classic .crm-calendar-toolbar .card-body {
    display: block;
  }

  .dir-classic .crm-week-planner {
    min-width: 840px;
  }

  .dir-classic .crm-calendar-list-item {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575px) {
  .dir-classic .main-panel > .content {
    padding-top: 16px;
  }

  .dir-classic .container-fluid {
    padding-left: 12px;
    padding-right: 12px;
  }

  .dir-classic .card-body,
  .dir-classic .card-header {
    padding: 14px;
  }

  .dir-classic .btn {
    white-space: normal;
  }
}

body {
  color: var(--crm-ink);
}

.wrapper,
.main-panel,
.content {
  background: #f1f4f8;
}

.main-header .logo-header {
  border-right: 1px solid #edf0f4;
}

.main-header .logo-header .logo {
  align-items: center;
  display: inline-flex;
  overflow: hidden;
}

.crm-logo-mark {
  align-items: center;
  background: #ffd45d;
  border-radius: 6px;
  color: #14202b;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  margin-right: 8px;
  width: 34px;
}

.crm-logo-text {
  color: #26364d;
  font-weight: 800;
}

.crm-avatar {
  align-items: center;
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  height: 32px;
  justify-content: center;
  line-height: 1;
  margin-right: 8px;
  width: 32px;
}

.crm-avatar-lg {
  font-size: 14px;
  height: 42px;
  margin-right: 0;
  width: 42px;
}

.crm-avatar-xl {
  font-size: 20px;
  height: 82px;
  margin-right: 0;
  width: 82px;
}

.crm-avatar-sm {
  font-size: 10px;
  height: 24px;
  margin-right: 8px;
  width: 24px;
}

.crm-avatar-image {
  border-radius: 50%;
  display: inline-block;
  height: 32px;
  margin-right: 8px;
  object-fit: cover;
  vertical-align: middle;
  width: 32px;
}

.crm-avatar-image.crm-avatar-lg {
  height: 42px;
  margin-right: 0;
  width: 42px;
}

.crm-avatar-image.crm-avatar-xl {
  height: 82px;
  margin-right: 0;
  width: 82px;
}

.crm-avatar-image.crm-avatar-sm {
  height: 24px;
  margin-right: 8px;
  width: 24px;
}

.crm-color-picker-row,
.crm-avatar-preview,
.crm-avatar-upload {
  align-items: center;
  display: flex;
  gap: 12px;
}

.crm-avatar-upload {
  align-items: flex-start;
  background: #f8fafb;
  border: 1px solid #dce3e8;
  border-radius: 6px;
  padding: 12px;
}

.crm-color-picker {
  max-width: 110px;
  padding: 4px;
}

.crm-rich-editor-toolbar {
  background: #f8fafb;
  border: 1px solid #dce3e8;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
}

.crm-editor-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.crm-variable-chip-row {
  align-items: center;
  background: #fbfcfe;
  border: 1px solid #dce3e8;
  border-top: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
}

.crm-variable-chip-label {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.crm-rich-editor {
  background: #fff;
  border: 1px solid #dce3e8;
  border-radius: 0 0 6px 6px;
  min-height: 150px;
  padding: 14px;
}

.crm-variable-chip-row + .crm-rich-editor {
  border-top: 0;
}

.crm-rich-editor-lg {
  min-height: 360px;
}

.crm-rich-editor:focus {
  border-color: var(--crm-accent);
  box-shadow: 0 0 0 3px rgba(36, 113, 110, 0.12);
  outline: 0;
}

.crm-rich-editor img {
  display: block;
  height: auto;
  max-width: 100%;
}

.crm-html-source-textarea {
  border-radius: 0 0 6px 6px;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 13px;
  min-height: 180px;
}

.crm-rich-preview {
  background: #fff;
  border: 1px solid #dce3e8;
  border-radius: 6px;
  margin-top: 12px;
  max-height: 360px;
  overflow: auto;
  padding: 18px;
}

.crm-rich-preview-mail {
  margin-top: 0;
  max-height: 280px;
  min-height: 140px;
  padding: 16px;
}

.crm-editor-fullscreen-active {
  overflow: hidden;
}

.crm-offer-html-editor.is-fullscreen {
  background: #f8fafc;
  bottom: 18px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24);
  display: flex;
  flex-direction: column;
  left: 18px;
  padding: 18px;
  position: fixed;
  right: 18px;
  top: 18px;
  z-index: 2050;
}

.crm-offer-html-editor.is-fullscreen .crm-rich-editor {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.crm-offer-html-editor.is-fullscreen .crm-variable-chip-row {
  flex: 0 0 auto;
}

.crm-offer-html-editor.is-fullscreen .crm-rich-preview {
  flex: 0 0 35%;
  max-height: none;
}

.crm-signature-preview {
  background: #f8fafb;
  border: 1px solid #dce3e8;
  border-radius: 6px;
  margin-top: 12px;
  padding: 14px;
}

.crm-signature-preview > strong {
  display: block;
  margin-bottom: 10px;
}

.crm-user-dropdown .dropdown-menu {
  left: auto !important;
  max-height: min(72vh, 620px);
  min-width: 360px;
  overflow-y: auto;
  padding-bottom: 8px;
  right: 0;
  width: 360px;
}

.crm-user-menu form {
  margin: 0;
}

.crm-user-menu .dropdown-item {
  align-items: center;
  border: 0;
  display: flex;
  gap: 10px;
  line-height: 1.25;
  min-height: 46px;
  padding: 8px 16px;
  text-align: left;
  white-space: normal;
  width: 100%;
}

.crm-user-menu .dropdown-item.active {
  background: #edf7f6;
  color: var(--crm-accent);
  font-weight: 800;
}

.crm-user-menu .dropdown-item small {
  color: #8a96a6;
  display: block;
  font-size: 11px;
  line-height: 1.25;
  margin-top: 2px;
}

.crm-user-menu .dropdown-item > span:last-child {
  display: block;
  min-width: 0;
}

.crm-user-dropdown .user-box {
  align-items: center;
  display: flex;
}

.crm-user-dropdown .u-text {
  min-width: 0;
}

.crm-user-dropdown .u-text h4,
.crm-user-dropdown .u-text p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-sidebar-subnav {
  margin: 4px 0 8px 0;
  padding-left: 42px !important;
}

.crm-sidebar-subnav li a {
  color: #6f7d8d !important;
  font-size: 13px;
  min-height: 32px !important;
  padding: 7px 10px !important;
}

.crm-sidebar-subnav li.active a,
.crm-sidebar-subnav li a:hover {
  color: var(--crm-accent) !important;
  font-weight: 800;
}

.crm-sidebar-subnav li.disabled a {
  cursor: default;
  opacity: 0.45;
  pointer-events: none;
}

@media (max-width: 575px) {
  .crm-user-dropdown .dropdown-menu {
    left: 12px !important;
    min-width: 0;
    right: 12px;
    width: auto;
  }
}

.sidebar .user .info a > span,
.sidebar .user .info .user-level {
  opacity: 1;
}

.content {
  padding-top: 26px;
}

.alert {
  border: 0;
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(35, 45, 66, 0.08);
  margin-bottom: 18px;
  padding: 13px 44px 13px 18px;
}

.alert .close {
  background: transparent;
  border: 0;
  color: inherit;
  font-size: 20px;
  height: 42px;
  opacity: 0.7;
  padding: 0;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
}

.page-title {
  color: var(--crm-ink);
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 6px;
}

.page-subtitle {
  color: var(--crm-muted);
  font-size: 15px;
  margin-bottom: 0;
}

.crm-page-header {
  align-items: flex-start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 22px;
}

.crm-eyebrow {
  color: var(--crm-accent);
  font-size: 12px;
  font-weight: 800;
  margin: 0 0 4px;
  text-transform: uppercase;
}

.btn-primary,
.btn-success {
  background: var(--crm-accent) !important;
  border-color: var(--crm-accent) !important;
}

.btn-primary:hover,
.btn-success:hover {
  background: var(--crm-accent-dark) !important;
  border-color: var(--crm-accent-dark) !important;
}

.card {
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(35, 45, 66, 0.06);
}

.card-stats {
  min-height: 98px;
}

.card-stats .icon-big {
  font-size: 38px;
  line-height: 1;
}

.card-stats .numbers {
  text-align: right;
  width: 100%;
}

.card-stats .card-category {
  font-size: 13px;
  margin-bottom: 4px;
  white-space: normal;
}

.card-stats .card-title {
  font-size: 24px;
  font-weight: 800;
  margin: 0;
}

.crm-action-row {
  align-items: center;
  background: var(--crm-soft);
  border: 1px solid transparent;
  border-radius: 6px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 14px;
}

.crm-action-row.is-hot {
  border-color: #f0b68f;
}

.crm-action-row p,
.crm-card-muted {
  color: var(--crm-muted);
  margin: 3px 0 0;
}

.card .card-body .crm-ai-button {
  appearance: none;
  background: #f8fafb;
  border: 1px solid #dce3e8;
  border-radius: 6px;
  color: var(--crm-ink);
  cursor: pointer;
  display: block;
  font: inherit;
  line-height: 1.35;
  margin-bottom: 10px;
  padding: 13px 14px;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
}

.card .card-body .crm-ai-button:hover {
  border-color: var(--crm-accent);
  box-shadow: 0 4px 12px rgba(36, 113, 110, 0.12);
}

.crm-ai-button i {
  color: var(--crm-accent);
  font-size: 16px;
  margin-right: 6px;
}

.crm-step {
  background: #fff;
  border: 1px solid #e2e8ee !important;
  border-radius: 6px;
  color: var(--crm-ink);
  display: block;
  min-height: 132px;
  padding: 18px;
  text-decoration: none !important;
}

.crm-step:hover {
  border-color: var(--crm-accent);
  color: var(--crm-ink);
  text-decoration: none;
}

.crm-step-number {
  align-items: center;
  background: var(--crm-accent);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  font-weight: 800;
  height: 30px;
  justify-content: center;
  margin-bottom: 12px;
  width: 30px;
}

.crm-footer-nav .nav-link {
  color: #7d8794 !important;
  padding-left: 0;
}

.crm-private-mode-indicator {
  align-items: center;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 50%;
  color: #047857;
  display: inline-flex;
  height: 30px;
  justify-content: center;
  line-height: 1;
  margin-right: 10px;
  padding: 0;
  width: 30px;
}

.crm-private-mode-indicator i {
  font-size: 16px;
}

.crm-company-hero {
  margin-bottom: 20px;
}

.crm-company-meta {
  align-items: center;
  color: var(--crm-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 8px;
}

.crm-company-meta span:not(.badge)::before {
  color: #c2ccd6;
  content: "•";
  margin-right: 14px;
}

.crm-company-actions .btn {
  min-width: 118px;
}

.crm-section-card .card-body {
  min-height: 118px;
}

.crm-empty-mini {
  background: #f8fbfc;
  border: 1px dashed #cfdbe4;
  border-radius: 6px;
  padding: 15px;
}

.crm-empty-mini p {
  color: var(--crm-muted);
  margin: 5px 0 13px;
}

.crm-empty-state {
  background: var(--crm-soft);
  border: 1px solid #dce3e8;
  border-radius: 6px;
  padding: 18px;
}

.crm-form-card {
  max-width: 980px;
}

.crm-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.crm-label-action-row {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 6px;
}

.crm-label-action-row label {
  margin-bottom: 0;
}

.crm-ai-note-panel {
  background: #f8fbfc;
  border: 1px solid #d7e2ea;
  border-radius: 6px;
  margin-top: 10px;
  padding: 12px;
}

.crm-ai-note-panel.is-error {
  background: #fff8f7;
  border-color: #f0c7c4;
}

.crm-ai-note-panel-head {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  margin-bottom: 8px;
}

.crm-ai-note-panel-head span {
  color: #6b7c8f;
  font-size: 12px;
}

.crm-ai-note-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 10px;
}

.crm-ai-summary-dialog {
  max-width: min(780px, calc(100vw - 48px));
}

.crm-ai-status {
  align-items: center;
  background: #f8fbfc;
  border: 1px solid #d7e2ea;
  border-radius: 6px;
  color: #526173;
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
}

.crm-ai-status-error {
  background: #fff8f2;
  border-color: #f2c7a5;
  color: #8a4a1f;
}

.crm-ai-spinner {
  animation: crmAiSpin 0.8s linear infinite;
  border: 3px solid #d7e2ea;
  border-top-color: var(--crm-accent);
  border-radius: 50%;
  flex: 0 0 auto;
  height: 18px;
  width: 18px;
}

@keyframes crmAiSpin {
  to {
    transform: rotate(360deg);
  }
}

.crm-ai-result {
  color: var(--crm-ink);
  line-height: 1.55;
  min-height: 120px;
}

.crm-ai-result p {
  margin-bottom: 10px;
}

.crm-ai-result-empty {
  align-items: center;
  background: #fbfcfd;
  border: 1px dashed #d7e2ea;
  border-radius: 6px;
  display: flex;
  justify-content: center;
  padding: 18px;
}

.crm-ai-placeholder,
.crm-ai-loading-card,
.crm-ai-error-card {
  color: #6b7c8f;
  text-align: center;
}

.crm-ai-loading-card strong,
.crm-ai-loading-card span {
  display: block;
}

.crm-ai-loading-card strong {
  color: var(--crm-ink);
  margin-bottom: 4px;
}

.crm-ai-warning-card {
  background: #fff8e8;
  border: 1px solid #f3d28a;
  border-radius: 6px;
  color: #7a4b00;
  margin-bottom: 14px;
  padding: 10px 12px;
}

.crm-ai-warning-card strong,
.crm-ai-warning-card span {
  display: block;
}

.crm-ai-warning-card strong {
  color: #5f3b00;
  margin-bottom: 3px;
}

.crm-ai-error-card {
  color: #8a4a1f;
}

.crm-ai-heading {
  border-top: 1px solid #e6edf2;
  color: var(--crm-ink);
  font-size: 15px;
  font-weight: 700;
  margin: 18px 0 8px;
  padding-top: 14px;
}

.crm-ai-heading:first-child {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.crm-ai-list {
  margin: 0 0 12px 18px;
  padding: 0;
}

.crm-ai-list li {
  margin-bottom: 6px;
}

.crm-ai-table {
  border-collapse: collapse;
  font-size: 13px;
  margin: 10px 0 14px;
  width: 100%;
}

.crm-ai-table th,
.crm-ai-table td {
  border: 1px solid #e1e8ee;
  padding: 8px;
  vertical-align: top;
}

.crm-ai-table th {
  background: #f8fbfc;
  font-weight: 700;
}

.crm-ai-ask-more {
  border-top: 1px solid #e6edf2;
  margin-top: 16px;
  padding-top: 14px;
}

.crm-ai-ask-row {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.crm-ai-question-history {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.crm-ai-question-chip {
  background: #f8fafc;
  border: 1px solid #dce3ec;
  border-radius: 6px;
  color: var(--crm-ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 8px;
}

.crm-ai-question-chip:hover,
.crm-ai-question-chip:focus {
  border-color: var(--crm-accent);
  color: var(--crm-accent-dark);
  outline: none;
}

.crm-code-textarea {
  font-family: Consolas, Monaco, monospace;
  font-size: 13px;
}

.crm-audit-details {
  color: #526173;
  font-size: 13px;
  max-width: 360px;
  white-space: normal;
}

.crm-company-search-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.crm-company-search-actions .btn {
  margin: 0;
}

.crm-filter-panel {
  background: #f8fafb;
  border: 1px solid #dce3e8;
  border-radius: 6px;
  margin-top: 16px;
  padding: 16px 16px 6px;
}

.crm-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.crm-bulk-toolbar {
  align-items: center;
  background: #f8fafb;
  border: 1px solid #dce3e8;
  border-radius: 6px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 12px;
}

.crm-dashboard-filter {
  margin-bottom: 18px;
}

.crm-dashboard-filter .card-body,
.crm-calendar-filter {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
}

.crm-checkbox-filter {
  align-items: center;
  color: var(--crm-ink);
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  gap: 10px;
  margin: 0;
}

.crm-visible-checkbox {
  align-items: center;
  color: var(--crm-ink);
  cursor: pointer;
  display: inline-flex;
  gap: 10px;
  margin: 0;
  user-select: none;
}

.crm-visible-checkbox input {
  opacity: 0;
  position: absolute;
}

.crm-visible-checkbox > span {
  align-items: center;
  background: #fff;
  border: 2px solid #b8c5d1;
  border-radius: 4px;
  display: inline-flex;
  flex: 0 0 auto;
  height: 22px;
  justify-content: center;
  width: 22px;
}

.crm-visible-checkbox > span::after {
  color: #fff;
  content: "\2713";
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  opacity: 0;
}

.crm-visible-checkbox input:checked + span {
  background: var(--crm-accent);
  border-color: var(--crm-accent);
}

.crm-visible-checkbox input:checked + span::after {
  opacity: 1;
}

.crm-visible-checkbox-sm {
  justify-content: center;
  width: 28px;
}

.crm-visible-checkbox-sm > span {
  height: 20px;
  width: 20px;
}

.switch {
  display: inline-block;
  height: 24px;
  position: relative;
  width: 46px;
}

.switch input {
  height: 0;
  opacity: 0;
  width: 0;
}

.slider {
  background-color: #c8d2dc;
  bottom: 0;
  cursor: pointer;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  transition: 0.2s;
}

.slider::before {
  background-color: #fff;
  bottom: 3px;
  content: "";
  height: 18px;
  left: 3px;
  position: absolute;
  transition: 0.2s;
  width: 18px;
}

.switch input:checked + .slider {
  background-color: var(--crm-accent);
}

.switch input:focus + .slider {
  box-shadow: 0 0 0 3px rgba(36, 113, 110, 0.15);
}

.switch input:checked + .slider::before {
  transform: translateX(22px);
}

.slider.round {
  border-radius: 999px;
}

.slider.round::before {
  border-radius: 50%;
}

.crm-switch-label {
  align-items: center;
  color: var(--crm-ink);
  display: inline-flex;
  font-size: 13px;
  gap: 10px;
  margin: 0;
  white-space: nowrap;
}

.crm-history-filter-form {
  margin: 0;
}

.crm-calendar-toolbar {
  margin-bottom: 18px;
}

.crm-calendar-month {
  color: var(--crm-ink);
  font-size: 20px;
  font-weight: 800;
}

.crm-calendar-owner-select {
  align-items: center;
  display: flex;
  gap: 10px;
}

.crm-calendar-owner-select label {
  color: var(--crm-muted);
  font-size: 12px;
  font-weight: 800;
  margin: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.crm-calendar-owner-select .form-control {
  min-width: 260px;
}

.crm-calendar-grid {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  overflow: hidden;
}

.crm-calendar-weekday {
  background: #f8fafb;
  color: var(--crm-muted);
  font-size: 12px;
  font-weight: 800;
  padding: 10px;
  text-transform: uppercase;
}

.crm-calendar-day {
  background: #fff;
  border: 1px solid #e2e8ee;
  color: var(--crm-ink);
  display: block;
  font: inherit;
  min-height: 132px;
  padding: 9px;
  text-align: left;
  text-decoration: none !important;
  width: 100%;
}

.crm-calendar-day:hover {
  border-color: var(--crm-accent);
  color: var(--crm-ink);
}

.crm-calendar-day.is-muted {
  background: #f8fafb;
  color: #a2adba;
}

.crm-calendar-day.is-today {
  box-shadow: inset 0 0 0 2px var(--crm-accent);
}

.crm-calendar-day-number {
  display: block;
  font-weight: 800;
  margin-bottom: 8px;
}

.crm-calendar-pill {
  background: #edf7f6;
  border-left: 3px solid var(--crm-accent);
  border-radius: 4px;
  color: var(--crm-ink);
  display: block;
  font-size: 12px;
  line-height: 1.25;
  margin-bottom: 5px;
  overflow: hidden;
  padding: 5px 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-calendar-pill.is-event {
  background: #f8fafb;
}

.crm-calendar-more {
  color: var(--crm-muted);
  display: block;
  font-size: 12px;
  font-weight: 700;
}

.crm-calendar-list-item {
  border-bottom: 1px solid #edf0f4;
  display: grid;
  gap: 12px;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  padding: 13px 0;
}

.crm-calendar-list-item:first-child {
  padding-top: 0;
}

.crm-calendar-list-time {
  color: var(--crm-accent);
  font-weight: 800;
}

.crm-calendar-list-item p {
  color: var(--crm-muted);
  margin: 4px 0;
}

.crm-calendar-list-note {
  color: var(--crm-ink) !important;
}

.crm-inline-delete {
  align-self: start;
  margin: 0;
}

.crm-mini-calendar {
  background: #f8fafb;
  border: 1px solid #dce3e8;
  border-radius: 6px;
  margin: -4px 0 18px;
  padding: 14px;
}

.crm-mini-calendar-title {
  color: var(--crm-ink);
  font-weight: 800;
  margin-bottom: 10px;
}

.crm-mini-calendar-header {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.crm-mini-calendar-header p {
  color: var(--crm-muted);
  margin: 3px 0 0;
}

.crm-mini-calendar-controls {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.crm-mini-calendar-controls .form-control {
  min-width: 138px;
}

.crm-mini-calendar-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.crm-mini-calendar-day {
  background: #fff;
  border: 1px solid #e2e8ee;
  border-radius: 6px;
  padding: 8px;
}

.crm-mini-calendar-day > strong,
.crm-mini-calendar-day > span {
  display: block;
  line-height: 1.2;
}

.crm-mini-calendar-day > span {
  color: var(--crm-muted);
  font-size: 11px;
  margin-bottom: 8px;
}

.crm-slot-button,
.crm-range-slot-button {
  background: #edf7f6;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--crm-accent-dark);
  cursor: pointer;
  display: block;
  font-weight: 800;
  margin-top: 5px;
  padding: 6px 4px;
  text-align: center;
  width: 100%;
}

.crm-slot-button:hover,
.crm-range-slot-button:hover {
  border-color: var(--crm-accent);
}

.crm-slot-button.is-selected {
  background: #eef2ff;
  border-color: var(--crm-primary);
  color: var(--crm-primary);
  box-shadow: inset 0 0 0 2px rgba(91, 76, 241, .28), 0 4px 10px rgba(91, 76, 241, .12);
}

.crm-slot-button.is-busy,
.crm-range-slot-button.is-busy {
  background: #fff7ed;
  color: #9a5a2b;
}

.crm-range-slot-button.is-in-range {
  background: #dff3f1;
  border-color: rgba(36, 113, 110, 0.35);
  color: var(--crm-accent-dark);
}

.crm-range-slot-button.is-range-start,
.crm-range-slot-button.is-range-end {
  background: var(--crm-accent);
  border-color: var(--crm-accent-dark);
  color: #fff;
}

.crm-calendar-event-form.is-range-invalid .crm-mini-calendar {
  border-color: #f59e9e;
}

.crm-calendar-event-form.is-range-invalid input[name="end_at"],
.crm-calendar-event-form.is-range-invalid input[name="end_date"] {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .12);
}

.crm-slot-button small,
.crm-range-slot-button small {
  background: rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  display: inline-block;
  font-size: 10px;
  margin-left: 3px;
  min-width: 16px;
  padding: 1px 4px;
}

.crm-all-day-toggle {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #dbe4ec;
  border-radius: 6px;
  color: var(--crm-ink);
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  max-width: 380px;
  min-height: 48px;
  padding: 10px 12px;
}

.crm-all-day-toggle strong,
.crm-all-day-toggle small {
  display: block;
  line-height: 1.25;
}

.crm-all-day-toggle small {
  color: var(--crm-muted);
  font-weight: 600;
  margin-top: 2px;
}

.crm-check-toggle {
  cursor: pointer;
  font-weight: 700;
}

.crm-check-toggle input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.crm-check-toggle-box {
  align-items: center;
  background: #fff;
  border: 2px solid #b8c5d1;
  border-radius: 4px;
  display: inline-flex;
  flex: 0 0 auto;
  height: 22px;
  justify-content: center;
  width: 22px;
}

.crm-all-day-toggle .crm-check-toggle-box {
  border-radius: 999px;
  height: 24px;
  justify-content: flex-start;
  padding: 2px;
  transition: background .15s ease, border-color .15s ease;
  width: 46px;
}

.crm-all-day-toggle .crm-check-toggle-box::after {
  background: #b8c5d1;
  border-radius: 50%;
  color: transparent;
  content: "";
  display: block;
  height: 16px;
  opacity: 1;
  transform: translateX(0);
  transition: background .15s ease, transform .15s ease;
  width: 16px;
}

.crm-check-toggle-box::after {
  color: #fff;
  content: "\2713";
  font-size: 15px;
  font-weight: 900;
  opacity: 0;
}

.crm-check-toggle input:checked + .crm-check-toggle-box {
  background: var(--crm-accent);
  border-color: var(--crm-accent);
}

.crm-check-toggle input:checked + .crm-check-toggle-box::after {
  opacity: 1;
}

.crm-all-day-toggle input:checked + .crm-check-toggle-box::after {
  background: #fff;
  transform: translateX(20px);
}

.crm-all-day-fields[hidden],
.crm-timed-fields[hidden] {
  display: none !important;
}

.crm-range-toggle {
  align-items: center;
  background: #fff;
  border: 1px solid #dce3e8;
  border-radius: 4px;
  display: inline-flex;
  overflow: hidden;
}

.crm-range-toggle label {
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  margin: 0;
  padding: 7px 10px;
}

.crm-range-toggle input {
  margin-right: 4px;
}

.crm-conflict-box {
  background: #fff7ed;
  border: 1px solid #f0b68f;
  border-radius: 6px;
  margin-bottom: 16px;
  padding: 14px;
}

.crm-conflict-box ul {
  margin: 8px 0;
  padding-left: 18px;
}

.crm-conflict-box p {
  color: var(--crm-muted);
  margin: 0 0 12px;
}

.flatpickr-calendar {
  z-index: 2200 !important;
}

.flatpickr-input.form-control[readonly] {
  background: #fff;
}

.crm-search-result {
  align-items: center;
  border-bottom: 1px solid #edf0f4;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 0;
}

.crm-search-result.is-contact {
  padding-left: 18px;
}

.crm-search-result p {
  color: var(--crm-muted);
  margin: 3px 0 0;
}

.crm-readonly-field {
  background: #f8fafb;
  border: 1px solid #dce3e8;
  border-radius: 4px;
  color: var(--crm-ink);
  font-weight: 700;
  min-height: 40px;
  padding: 10px 12px;
}

.crm-detail-list article {
  background: var(--crm-soft);
  border: 1px solid #dce3e8;
  border-radius: 6px;
  margin-bottom: 10px;
  padding: 13px;
}

.crm-detail-header {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.crm-row-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.crm-row-actions form,
.crm-company-actions form {
  margin: 0;
}

.crm-muted-divider {
  border-top: 1px solid #e6edf2;
  color: #6b7c8f;
  font-size: 12px;
  font-weight: 700;
  margin: 12px 0 8px;
  padding-top: 12px;
  text-transform: uppercase;
}

.crm-offers-overview {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}

.crm-offers-overview article {
  background: #f8fafc;
  border: 1px solid #dce6ef;
  border-radius: 10px;
  padding: 12px 14px;
}

.crm-offers-overview span,
.crm-offers-overview small {
  color: var(--crm-muted);
  display: block;
  line-height: 1.35;
}

.crm-offers-overview span {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.crm-offers-overview strong {
  color: var(--crm-ink);
  display: block;
  font-size: 26px;
  line-height: 1.1;
  margin: 8px 0 4px;
}

.crm-offer-record-list article.crm-offer-record-card {
  background: #fbfdff;
  border: 1px solid #dbe6f0;
  border-radius: 10px;
  padding: 14px 15px;
}

.crm-offer-record-top {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.crm-offer-record-statuses {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.crm-offer-record-meta {
  color: var(--crm-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 4px;
}

.crm-offer-record-meta span {
  position: relative;
}

.crm-offer-record-meta span:not(:last-child)::after {
  color: #bfd0dd;
  content: '•';
  position: absolute;
  right: -9px;
}

.crm-offer-record-subject {
  color: var(--crm-ink);
  font-size: 14px;
  line-height: 1.5;
  margin: 10px 0 0;
}

.crm-offer-record-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.crm-offer-record-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.crm-offer-record-actions form {
  margin: 0;
}

.crm-offer-record-tag {
  background: #eef4ff;
  border: 1px solid #d7e5ff;
  border-radius: 999px;
  color: #38568c;
  display: inline-flex;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  padding: 5px 10px;
}

.crm-offer-record-card-manual {
  background: #fcfdfd;
}

.crm-offer-record-meta span:not(:last-child)::after {
  content: '|';
}

.crm-topic-record-list article.crm-topic-record-card {
  background: #fcfdff;
  border: 1px solid #dbe6f0;
  border-radius: 10px;
  padding: 14px 15px;
}

.crm-topic-record-top {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.crm-topic-record-meta {
  color: var(--crm-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 4px;
}

.crm-topic-record-meta span {
  position: relative;
}

.crm-topic-record-meta span:not(:last-child)::after {
  color: #bfd0dd;
  content: '|';
  position: absolute;
  right: -9px;
}

.crm-topic-record-owner {
  color: var(--crm-ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  margin: 10px 0 6px;
}

.crm-contact-record-list article.crm-contact-record-card {
  background: #fcfdff;
  border: 1px solid #dbe6f0;
  border-radius: 10px;
  padding: 14px 15px;
}

.crm-contact-record-top {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.crm-contact-record-meta {
  color: var(--crm-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 4px;
}

.crm-contact-record-meta span {
  position: relative;
}

.crm-contact-record-meta span:not(:last-child)::after {
  color: #bfd0dd;
  content: '|';
  position: absolute;
  right: -9px;
}

.crm-contact-record-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 10px;
}

.crm-contact-record-links a,
.crm-contact-record-links span {
  color: var(--crm-muted);
  font-size: 13px;
  line-height: 1.4;
}

.crm-contact-record-links a {
  color: #38568c;
  text-decoration: none;
}

.crm-contact-record-links a:hover {
  text-decoration: underline;
}

.crm-contact-communication {
  border-top: 1px solid #e8eef5;
  margin-top: 12px;
  padding-top: 12px;
}

.crm-contact-communication-top {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.crm-contact-communication-meta {
  color: var(--crm-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 8px;
}

.crm-contact-communication-meta span {
  position: relative;
}

.crm-contact-communication-meta span:not(:last-child)::after {
  color: #bfd0dd;
  content: '|';
  position: absolute;
  right: -9px;
}

.crm-contact-communication-subject {
  color: #22304a;
  font-size: 13px;
  font-weight: 600;
  margin: 8px 0 0;
}

.crm-contact-communication-details {
  border-top: 1px dashed #dbe6f0;
  margin-top: 10px;
  padding-top: 10px;
}

.crm-contact-communication-details summary {
  color: var(--crm-accent-dark);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  list-style: none;
}

.crm-contact-communication-details summary::-webkit-details-marker {
  display: none;
}

.crm-contact-communication-detail-grid {
  display: grid;
  gap: 8px 12px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin-top: 10px;
}

.crm-contact-communication-detail-grid span,
.crm-contact-communication-error span {
  color: var(--crm-muted);
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.crm-contact-communication-detail-grid strong,
.crm-contact-communication-error strong {
  color: #22304a;
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.crm-contact-communication-error {
  background: #fff7f7;
  border: 1px solid #f6d4d4;
  border-radius: 8px;
  margin-top: 10px;
  padding: 10px 12px;
}

.crm-contact-record-card-archived {
  opacity: 0.85;
}

.crm-archived-row {
  opacity: 0.78;
}

.crm-row-muted {
  opacity: 0.74;
}

.crm-contact-table .crm-row-actions {
  justify-content: flex-end;
  min-width: 220px;
}

.crm-work-list {
  display: grid;
  gap: 14px;
}

.crm-work-card {
  border-left: 4px solid #24716e;
}

.crm-work-card.is-warning {
  border-left-color: #ffad46;
}

.crm-work-card.is-blocked {
  border-left-color: #e95555;
}

.crm-work-main {
  align-items: flex-start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.crm-work-main h3 {
  font-size: 21px;
  margin: 0 0 8px;
}

.crm-work-statuses {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  min-width: 250px;
}

.crm-work-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.crm-work-actions form {
  margin: 0;
}

.crm-action-hero .card-body {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.crm-action-hero h3 {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 4px;
}

.crm-action-stat-strip {
  background: #fff;
  border-radius: 3px;
  box-shadow: 0 6px 18px rgba(31, 45, 61, .06);
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 18px;
}

.crm-action-stat-item {
  align-items: center;
  border-right: 1px solid #edf1f5;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-height: 46px;
  padding: 10px 14px;
}

.crm-action-stat-item:last-child {
  border-right: 0;
}

.crm-action-stat-item span {
  color: var(--crm-muted);
  font-size: 12px;
  font-weight: 700;
}

.crm-action-stat-item strong {
  color: var(--crm-ink);
  font-size: 18px;
  font-weight: 800;
}

.crm-action-stat-strip-opportunities {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.crm-action-stat-strip-opportunities .crm-action-stat-item {
  align-items: center;
  background: #fff;
  border-right: 1px solid #edf1f5;
  border-bottom: 0;
  border-left: 0;
  border-top: 0;
  cursor: pointer;
  flex-direction: row;
  gap: 8px;
  justify-content: space-between;
  min-height: 58px;
  text-align: left;
}

.crm-action-stat-strip-opportunities .crm-action-stat-item:first-child {
  cursor: default;
}

.crm-action-stat-strip-opportunities .crm-action-stat-item.is-active {
  background: #e8f5f3;
  box-shadow: inset 0 -3px 0 var(--crm-accent);
}

.crm-action-stat-strip-opportunities small {
  color: var(--crm-muted);
  font-size: 11px;
  white-space: nowrap;
}

.crm-action-stat-strip-opportunities .crm-action-stat-item:focus {
  outline: none;
}

.crm-action-stat-strip-opportunities .crm-action-stat-item:hover {
  background: #f8fbfc;
}

.crm-action-stat-strip-opportunities .crm-action-stat-item strong {
  white-space: nowrap;
}

.crm-action-context {
  background: #fff;
  border: 1px solid #dce3e8;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(35, 45, 66, 0.06);
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding: 16px;
}

.crm-action-context-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.crm-action-context-grid strong,
.crm-action-context-grid span {
  display: block;
}

.crm-action-context-grid strong {
  color: var(--crm-muted);
  font-size: 12px;
  text-transform: uppercase;
}

.crm-action-context-top,
.crm-action-status-row,
.crm-card-header-actions,
.crm-contact-action-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.crm-action-context-top,
.crm-card-header-actions {
  justify-content: space-between;
}

.crm-action-context-clean {
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  padding: 14px 20px;
}

.crm-action-company-meta,
.crm-action-owner-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.crm-action-owner-summary {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.crm-action-owner-label {
  color: var(--text-tertiary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.crm-action-company-meta span:not(.badge)::before {
  color: #c2ccd6;
  content: "·";
  margin-right: 8px;
}

.crm-action-context-clean .crm-action-company-meta span:not(.badge)::before {
  content: "/";
}

.crm-action-owner-meta form {
  margin: 0;
}

.crm-square-btn {
  align-items: center;
  display: inline-flex;
  height: 32px;
  justify-content: center;
  padding: 0;
  width: 32px;
}

.crm-outcome-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.crm-outcome-option {
  margin: 0;
}

.crm-outcome-option input {
  opacity: 0;
  position: absolute;
}

.crm-outcome-option span {
  align-items: center;
  background: #f8fafb;
  border: 1px solid #dce3e8;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  font-weight: 800;
  justify-content: center;
  min-height: 48px;
  padding: 10px;
  text-align: center;
}

.crm-outcome-option input:checked + span,
.crm-outcome-option span:hover {
  background: #edf7f6;
  border-color: var(--crm-accent);
  color: var(--crm-accent-dark);
}

.crm-timeline-list {
  display: grid;
  gap: 10px;
}

.crm-timeline-item {
  background: #f8fafb;
  border: 1px solid #dce3e8;
  border-radius: 6px;
  padding: 12px;
}

.crm-timeline-item p {
  color: var(--crm-muted);
  margin: 4px 0 0;
}

.crm-history-record {
  align-items: flex-start;
  background: #f8fafb;
  border: 1px solid #dce3e8;
  border-radius: 6px;
  display: grid;
  gap: 12px;
  grid-template-columns: 74px minmax(0, 1fr);
  padding: 12px;
}

.crm-history-date {
  color: var(--crm-accent-dark);
  font-weight: 800;
  line-height: 1.2;
}

.crm-history-date strong,
.crm-history-date span,
.crm-history-date small {
  display: block;
}

.crm-history-date small {
  color: var(--crm-muted);
  font-size: 11px;
  margin-top: 3px;
}

.crm-history-heading {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

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

.crm-history-heading span,
.crm-history-content p {
  color: var(--crm-muted);
}

.crm-history-action-name {
  color: var(--crm-accent-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.crm-history-badges {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  margin-left: auto;
  margin-top: 0;
  max-width: 45%;
}

.crm-history-badges .badge {
  float: none;
  margin: 0;
  white-space: normal;
}

.crm-history-content p {
  margin: 7px 0 0;
}

.btn-danger {
  background: #e95555 !important;
  border-color: #e95555 !important;
  color: #fff !important;
}

.btn-danger:hover {
  background: #c93434 !important;
  border-color: #c93434 !important;
}

.crm-warning-card {
  background: #fff7ed;
  border-color: #f0b68f;
}

.table td,
.table th {
  vertical-align: middle;
}

.crm-clickable-row {
  cursor: pointer;
}

.crm-clickable-row:hover td {
  background: #f7fbfc;
}

.crm-row-link {
  color: var(--crm-ink);
  text-decoration: none;
}

.crm-row-link:hover {
  color: var(--crm-accent);
  text-decoration: none;
}

.crm-muted-block {
  color: var(--crm-muted);
  display: block;
  font-size: 12px;
  margin-top: 2px;
}

.crm-progress-cell {
  min-width: 230px;
}

.crm-action-progress {
  background: #e6edf2;
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
  width: 100%;
}

.crm-action-progress span {
  background: linear-gradient(90deg, #24716e, #55c858);
  display: block;
  height: 100%;
}

.crm-progress-meta {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin-top: 6px;
}

.crm-progress-meta span {
  color: var(--crm-muted);
  font-size: 12px;
  text-align: right;
}

.crm-opportunity-summary-cell {
  color: var(--crm-muted);
  font-size: 12px;
  min-width: 230px;
}

.crm-opportunity-summary-cell div + div {
  margin-top: 4px;
}

.crm-opportunity-summary-cell strong {
  color: var(--crm-ink);
}

.crm-sales-action-table th,
.crm-sales-action-table td {
  vertical-align: middle;
}

.crm-sales-action-table {
  margin-bottom: 0;
}

.crm-sales-action-table th {
  padding-bottom: 10px;
  padding-top: 10px;
}

.crm-sales-action-table td {
  padding-bottom: 12px;
  padding-top: 12px;
}

.crm-sales-action-primary,
.crm-sales-action-secondary {
  display: grid;
  gap: 3px;
}

.crm-sales-action-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
}

.crm-sales-action-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.crm-sales-action-chip {
  background: #f3f6fb;
  border: 1px solid #dde6ef;
  border-radius: 999px;
  color: #5a6980;
  display: inline-flex;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  padding: 5px 8px;
  text-transform: uppercase;
}

.crm-sales-action-muted {
  color: var(--crm-muted);
  font-size: 12px;
  line-height: 1.4;
}

.crm-action-progress--large {
  height: 10px;
}

.crm-sales-action-progress-note {
  color: var(--crm-muted);
  font-size: 12px;
  margin-top: 4px;
}

.crm-sales-opportunity-stack {
  display: grid;
  gap: 5px;
}

.crm-sales-opportunity-line {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e3eaf1;
  border-radius: 8px;
  display: grid;
  gap: 7px;
  grid-template-columns: minmax(58px, auto) minmax(92px, 1fr) 24px;
  min-height: 28px;
  padding: 5px 8px;
}

.crm-sales-opportunity-line span,
.crm-sales-opportunity-line small {
  color: var(--crm-muted);
  font-size: 12px;
  line-height: 1.2;
}

.crm-sales-opportunity-line small {
  font-weight: 700;
  text-align: right;
}

.crm-sales-opportunity-line strong {
  color: var(--crm-ink);
  font-size: 12px;
  line-height: 1.2;
}

.crm-sales-opportunity-line.is-open {
  border-left: 4px solid #4f46e5;
}

.crm-sales-opportunity-line.is-lost {
  border-left: 4px solid #ef4444;
}

.crm-sales-opportunity-line.is-won {
  border-left: 4px solid #10b981;
}

.crm-sales-action-table .crm-progress-cell {
  min-width: 260px;
}

.crm-sales-action-table .crm-opportunity-summary-cell {
  min-width: 290px;
}

.crm-opportunity-lines {
  color: var(--crm-muted);
  display: grid;
  font-size: 12px;
  gap: 4px;
  min-width: 220px;
}

.crm-opportunity-lines strong {
  color: var(--crm-ink);
  margin-right: 6px;
}

.crm-opportunity-summary-card .card-body {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(220px, .7fr) minmax(0, 1.3fr);
}

.crm-opportunity-summary-card h4 {
  font-size: 16px;
  margin: 0;
}

.crm-opportunity-summary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.crm-opportunity-summary-grid div {
  background: #f8fafb;
  border: 1px solid #dce3e8;
  border-radius: 6px;
  padding: 10px 12px;
}

.crm-opportunity-summary-grid span,
.crm-opportunity-summary-grid small {
  color: var(--crm-muted);
  display: block;
}

.crm-opportunity-summary-grid strong {
  color: var(--crm-ink);
  display: block;
  font-size: 16px;
  margin: 3px 0;
}

.crm-row-menu {
  display: inline-block;
}

.crm-row-menu form {
  margin: 0;
}

.crm-row-menu .dropdown-item {
  background: transparent;
  border: 0;
  color: #526173;
  cursor: pointer;
  display: block;
  font-size: 13px;
  padding: 8px 16px;
  text-align: left;
  width: 100%;
}

.crm-row-menu .dropdown-item:hover {
  background: #f3f7f8;
  color: var(--crm-accent);
  text-decoration: none;
}

.crm-row-menu .dropdown-item.text-danger {
  color: #d9534f !important;
}

.crm-conditional-panel {
  background: #f8fafb;
  border: 1px solid #dce3e8;
  border-radius: 6px;
  display: none;
  margin: 14px 0;
  padding: 14px;
}

.crm-conditional-panel.is-visible {
  display: block;
}

.crm-offer-mail-panel {
  background: #f8fbfc;
  border: 1px solid #d9e3ec;
  border-radius: 6px;
  margin: 16px 0;
  padding: 14px;
}

.crm-offer-mail-panel .crm-panel-title-row small {
  color: #6b7c8f;
  font-size: 12px;
  text-align: right;
}

.crm-switch-field {
  align-items: center;
  background: #fff;
  border: 1px solid #d6e0ea;
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
  cursor: pointer;
  display: flex;
  gap: 12px;
  margin: 0;
  padding: 8px 12px 8px 8px;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.crm-switch-field:hover {
  border-color: #8fb3d9;
  box-shadow: 0 0 0 3px rgba(78, 70, 229, .08);
}

.crm-switch-field input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.crm-switch-control {
  background: #cbd5e1;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px #94a3b8;
  flex: 0 0 54px;
  height: 30px;
  position: relative;
  transition: background .16s ease, box-shadow .16s ease;
}

.crm-switch-control::after {
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 2px 5px rgba(15, 23, 42, .28);
  content: "";
  height: 24px;
  left: 3px;
  position: absolute;
  top: 3px;
  transition: transform .16s ease;
  width: 24px;
}

.crm-switch-field input:checked + .crm-switch-control {
  background: #5b52e8;
  box-shadow: inset 0 0 0 1px #5b52e8;
}

.crm-switch-field input:checked + .crm-switch-control::after {
  transform: translateX(24px);
}

.crm-switch-field input:disabled + .crm-switch-control {
  background: #edf2f7;
  box-shadow: inset 0 0 0 1px #d9e3ec;
}

.crm-switch-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.crm-switch-copy strong {
  color: #243447;
  font-size: 14px;
}

.crm-switch-copy small {
  text-align: left !important;
}

.crm-offer-compose-editor {
  margin-top: 10px;
}

.crm-offer-mail-editor {
  min-height: 180px;
}

.crm-rich-editor.is-disabled {
  background: #f8fafc;
  color: #94a3b8;
}

.crm-offer-products-preview {
  background: #f8fafc;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  margin-top: 12px;
  padding: 12px;
}

.crm-offer-products-preview strong {
  display: block;
  margin-bottom: 8px;
}

.crm-offer-products-preview pre {
  color: #334155;
  font-family: inherit;
  font-size: 13px;
  margin: 0;
  white-space: pre-wrap;
}

.crm-offer-compose-preview {
  margin-top: 14px;
}

.crm-offer-compose-preview-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 12px;
}

.crm-offer-compose-preview-grid article,
.crm-offer-compose-preview-card {
  background: #fff;
  border: 1px solid #dbe4ee;
  border-radius: 10px;
  padding: 12px 14px;
}

.crm-offer-compose-preview-grid span,
.crm-offer-compose-preview-card strong {
  color: #64748b;
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.crm-offer-compose-preview-grid strong {
  color: #0f172a;
  display: block;
  font-size: 18px;
  line-height: 1.2;
}

.crm-offer-compose-preview-grid small {
  color: #64748b;
  display: block;
  line-height: 1.45;
  margin-top: 4px;
}

.crm-offer-compose-preview-card + .crm-offer-compose-preview-card {
  margin-top: 12px;
}

.crm-spinner {
  animation: crm-spin 0.8s linear infinite;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: currentColor;
  border-radius: 999px;
  display: inline-block;
  height: 14px;
  margin-right: 6px;
  vertical-align: -2px;
  width: 14px;
}

@keyframes crm-spin {
  to {
    transform: rotate(360deg);
  }
}

.crm-panel-title-row {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.crm-panel-title-row .crm-checkbox-inline {
  margin: 0;
}

.crm-line-table {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.crm-line-row {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 140px auto;
}

.crm-checkbox-inline {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  font-weight: 700;
}

.crm-checkbox-inline input {
  appearance: auto;
  accent-color: var(--crm-accent);
  flex: 0 0 auto;
  height: 18px;
  opacity: 1;
  position: static;
  width: 18px;
}

.crm-admin-flag-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.crm-admin-flag {
  align-items: center;
  background: #f8fafb;
  border: 1px solid #dce3e8;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 12px;
}

.crm-admin-flag input {
  opacity: 0;
  position: absolute;
}

.crm-admin-flag span {
  align-items: center;
  background: #fff;
  border: 2px solid #b8c5d1;
  border-radius: 4px;
  display: inline-flex;
  flex: 0 0 auto;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.crm-admin-flag span::after {
  color: #fff;
  content: "\2713";
  font-size: 16px;
  font-weight: 800;
  opacity: 0;
}

.crm-admin-flag input:checked + span {
  background: var(--crm-accent);
  border-color: var(--crm-accent);
}

.crm-admin-flag input:checked + span::after {
  opacity: 1;
}

.crm-admin-flag:hover {
  border-color: var(--crm-accent);
}

.crm-next-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.crm-probability-row {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) 56px;
}

.crm-probability-row strong {
  color: var(--crm-accent-dark);
  text-align: right;
}

.crm-contact-list {
  display: grid;
  gap: 10px;
}

.crm-contact-list-compact {
  gap: 8px;
}

.crm-action-company-contact-list .crm-contact-item {
  align-items: flex-start;
  grid-template-columns: minmax(0, 1fr);
}

.crm-action-company-tabs-card .card-body {
  padding: 0;
}

.crm-action-company-tabs-card .crm-company-tab-panel {
  padding: 18px;
}

.crm-action-company-tabs-card .crm-company-tabs {
  border-bottom: 1px solid var(--border);
}

.crm-contact-item-compact {
  gap: 12px;
  grid-template-columns: minmax(280px, 1.55fr) auto;
  padding: 14px 16px !important;
}

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

.crm-contact-summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.crm-contact-summary-pill {
  align-items: baseline;
  background: #f8fafc;
  border: 1px solid #e5eaf0;
  border-radius: 999px;
  color: var(--crm-ink);
  display: inline-flex;
  gap: 8px;
  max-width: 100%;
  min-height: 32px;
  padding: 6px 12px;
}

.crm-contact-summary-pill strong,
.crm-contact-summary-pill em {
  font-size: 12px;
  line-height: 1.3;
  margin: 0;
}

.crm-contact-summary-pill strong {
  color: var(--crm-muted);
  font-style: normal;
  font-weight: 700;
  text-transform: uppercase;
}

.crm-contact-summary-pill em {
  color: var(--crm-ink);
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-contact-summary-pill-muted {
  background: #fbfcfe;
}

.crm-contact-action-compact {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 120px;
}

.crm-contact-action-statuses {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.crm-contact-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.crm-contact-result-value-compact {
  color: var(--crm-muted);
  font-size: 12px;
  line-height: 1.35;
  max-width: 180px;
  text-align: right;
}

.crm-history-badges-compact .badge {
  font-size: 11px;
  padding: 4px 8px;
}

.crm-action-company-contact-list .crm-contact-main {
  min-width: 0;
}

.crm-action-company-contact-list .crm-contact-opportunity,
.crm-action-company-contact-list .crm-contact-next {
  background: #f8fafc;
  border: 1px solid #e3e8ef;
  border-radius: 6px;
  padding: 8px 10px;
  width: 100%;
}

.crm-action-company-contact-list .crm-contact-action {
  align-items: center;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
  text-align: left;
}

.crm-action-company-contact-list .crm-colored-badge {
  margin-top: 8px;
}

.crm-contact-item {
  align-items: center;
  background: #f8fafb;
  border: 1px solid #dce3e8;
  border-radius: 6px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1.1fr) minmax(110px, .42fr) minmax(130px, .48fr) auto;
  padding: 12px;
}

.crm-contact-list-compact .crm-contact-item {
  padding: 10px;
}

.crm-contact-item p {
  color: var(--crm-muted);
  margin: 3px 0 0;
}

.crm-action-company-meta span:not(.badge)::before {
  content: "/";
}

.crm-contact-main,
.crm-contact-opportunity,
.crm-contact-next,
.crm-contact-action {
  min-width: 0;
}

.crm-contact-name {
  color: var(--crm-ink);
  display: block;
  margin-bottom: 4px;
}

.crm-contact-subline,
.crm-contact-links,
.crm-history-meta {
  align-items: center;
  color: var(--crm-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 3px 0;
}

.crm-contact-links a {
  color: #526173;
}

.crm-contact-links a:hover {
  color: var(--crm-accent);
  text-decoration: none;
}

.crm-contact-opportunity,
.crm-contact-next {
  color: var(--crm-muted);
  display: grid;
  gap: 2px;
}

.crm-contact-opportunity strong,
.crm-contact-next strong {
  color: var(--crm-ink);
}

.crm-inline-status {
  color: var(--crm-accent-dark);
  font-size: 12px;
  font-weight: 800;
}

.crm-contact-result-value {
  color: var(--crm-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.crm-contact-action {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: right;
}

.crm-colored-badge {
  color: #fff !important;
}

.crm-modal-frame-body {
  height: 82vh;
  padding: 0;
}

.crm-modal-frame {
  border: 0;
  height: 100%;
  width: 100%;
}

.crm-activity-modal-dialog {
  max-width: min(1180px, calc(100vw - 48px));
  width: min(1180px, calc(100vw - 48px));
}

.crm-modal-page {
  background: #f1f4f8;
  min-height: 100vh;
}

.crm-modal-page-content {
  padding: 18px;
}

.crm-modal-form {
  box-shadow: none;
  margin: 0;
  max-width: none;
}

.crm-email-link {
  color: #526173;
  font-size: 13px;
  white-space: nowrap;
}

.crm-email-link:hover {
  color: var(--crm-accent);
  text-decoration: none;
}

@media (max-width: 991px) {
  .crm-page-header {
    display: block;
  }

  .crm-page-header .btn,
  .crm-page-header .btn-group {
    margin-top: 14px;
    width: 100%;
  }

  .crm-company-actions {
    display: grid;
    gap: 8px;
  }

  .crm-company-actions .btn {
    width: 100%;
  }

  .crm-editor-header-actions {
    display: grid;
  }

  .crm-offer-compose-preview-grid {
    grid-template-columns: 1fr;
  }

  .crm-action-row {
    align-items: stretch;
    display: block;
  }

  .crm-action-row .btn {
    margin-top: 12px;
    width: 100%;
  }

  .crm-calendar-grid {
    display: block;
  }

  .crm-calendar-weekday {
    display: none;
  }

  .crm-calendar-day {
    min-height: 0;
  }

  .crm-calendar-day.is-muted {
    display: none;
  }

  .crm-calendar-list-item {
    grid-template-columns: 1fr;
  }

  .crm-calendar-owner-select,
  .crm-calendar-owner-select .form-control {
    width: 100%;
  }

  .crm-mini-calendar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-mini-calendar-header,
  .crm-mini-calendar-controls {
    display: block;
  }

  .crm-mini-calendar-controls .btn-group,
  .crm-mini-calendar-controls .form-control {
    margin-top: 8px;
    width: 100%;
  }

  .crm-form-actions .btn {
    width: 100%;
  }

  .crm-detail-header {
    display: block;
  }

  .crm-row-actions {
    justify-content: flex-start;
    margin-top: 10px;
  }

  .crm-company-search-actions {
    grid-template-columns: 1fr;
  }

  .crm-filter-actions,
  .crm-filter-actions .btn {
    width: 100%;
  }

  .crm-bulk-toolbar {
    align-items: stretch;
    display: block;
  }

  .crm-bulk-toolbar .btn {
    margin-top: 10px;
    width: 100%;
  }

  .crm-work-main {
    display: block;
  }

  .crm-work-statuses {
    justify-content: flex-start;
    margin-top: 12px;
    min-width: 0;
  }

  .crm-work-actions .btn,
  .crm-work-actions form,
  .crm-work-actions button {
    width: 100%;
  }

  .crm-action-hero .card-body {
    align-items: stretch;
    display: block;
  }

  .crm-action-hero .btn {
    margin-top: 12px;
    width: 100%;
  }

  .crm-action-stat-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-action-stat-item:nth-child(2n) {
    border-right: 0;
  }

  .crm-opportunity-summary-card .card-body,
  .crm-opportunity-summary-grid {
    grid-template-columns: 1fr;
  }

  .crm-action-context-grid,
  .crm-outcome-grid {
    grid-template-columns: 1fr;
  }

  .crm-admin-flag-grid {
    grid-template-columns: 1fr;
  }

  .crm-ai-ask-row {
    grid-template-columns: 1fr;
  }

  .crm-ai-summary-dialog {
    margin: 8px;
    max-width: calc(100vw - 16px);
  }

  .crm-contact-item {
    grid-template-columns: 1fr;
  }

  .crm-history-record {
    grid-template-columns: 1fr;
  }

  .crm-history-top {
    display: block;
  }

  .crm-history-badges {
    justify-content: flex-start;
    margin-left: 0;
    margin-top: 8px;
    max-width: none;
  }

  .crm-contact-action {
    align-items: flex-start;
    text-align: left;
  }

  .crm-activity-modal-dialog {
    margin: 8px;
    max-width: calc(100vw - 16px);
    width: calc(100vw - 16px);
  }

  .crm-modal-frame-body {
    height: 86vh;
  }
}

/* Final redesign overrides: keep this block last. */
.dir-classic {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
}

.dir-classic .wrapper,
.dir-classic .main-panel,
.dir-classic .content,
.dir-classic.crm-modal-page {
  background: var(--bg) !important;
}

.dir-classic .main-header,
.dir-classic .main-header .logo-header,
.dir-classic .navbar-header,
.dir-classic .sidebar {
  background: var(--bg-elevated) !important;
  box-shadow: none !important;
}

.dir-classic .main-header {
  border-bottom: 1px solid var(--border);
}

.dir-classic .main-header .logo-header,
.dir-classic .sidebar {
  border-right: 1px solid var(--border);
}

.dir-classic .crm-logo-mark {
  background: var(--accent) !important;
  border-radius: var(--radius-sm);
  color: var(--accent-text);
  height: 28px;
  width: 28px;
}

.dir-classic .crm-logo-text,
.dir-classic .page-title,
.dir-classic .card-title {
  color: var(--text) !important;
}

.dir-classic .navbar-header {
  min-height: 56px;
  padding: 0 24px;
}

.dir-classic .nav-search .input-group {
  background: var(--bg-sunken);
  border: 1px solid transparent;
  border-radius: var(--radius);
}

.dir-classic .nav-search .input-group:hover,
.dir-classic .nav-search .input-group:focus-within {
  background: var(--bg-elevated);
  border-color: var(--accent);
}

.dir-classic .nav-search .form-control,
.dir-classic .nav-search .btn-search {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.dir-classic .crm-topbar-workspace {
  flex: 1 1 auto;
}

.dir-classic .crm-global-search .input-group {
  min-height: 44px;
}

.dir-classic .crm-global-search .form-control,
.dir-classic .crm-global-search .btn-search {
  height: 42px;
}

.dir-classic .topbar-nav .nav-link {
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--text-secondary) !important;
}

.dir-classic .topbar-nav .nav-link:hover {
  background: var(--bg-hover);
  border-color: var(--border);
  color: var(--text) !important;
}

.dir-classic .sidebar .user {
  border-bottom: 1px solid var(--divider);
  margin: 0 10px 6px;
  padding: 16px 8px 14px;
}

.dir-classic .sidebar .nav {
  padding: 6px 8px 18px;
}

.dir-classic .sidebar .nav > .nav-item {
  margin: 1px 0;
}

.dir-classic .sidebar .nav > .nav-item a {
  align-items: center;
  border-radius: var(--radius-sm);
  color: var(--text-secondary) !important;
  display: flex;
  font-size: 13.5px;
  font-weight: 650;
  gap: 10px;
  min-height: 36px;
  padding: 7px 10px;
}

.dir-classic .sidebar .nav > .nav-item a:hover,
.dir-classic .sidebar .nav > .nav-item.active > a {
  background: var(--bg-active) !important;
  color: var(--text) !important;
}

.dir-classic .sidebar .nav > .nav-item a i {
  color: inherit !important;
  font-size: 17px;
  margin-right: 0;
  width: 18px;
}

.dir-classic .sidebar .nav > .nav-item a p {
  color: inherit !important;
  font-size: inherit;
  margin: 0;
}

.dir-classic .sidebar .badge-count {
  background: var(--accent) !important;
  border-radius: 99px;
  color: var(--accent-text);
  margin-left: auto;
}

.dir-classic .crm-sidebar-subnav li a {
  border-radius: var(--radius-sm);
  color: var(--text-tertiary) !important;
}

.dir-classic .crm-sidebar-subnav li.active a,
.dir-classic .crm-sidebar-subnav li a:hover {
  background: var(--accent-soft);
  color: var(--accent-fg) !important;
}

.dir-classic .main-panel > .content {
  padding-top: 24px;
}

.dir-classic .container-fluid {
  max-width: 1480px;
}

.dir-classic .crm-page-header {
  gap: 18px;
  margin-bottom: 18px;
}

.dir-classic .crm-eyebrow {
  color: var(--accent-fg) !important;
  font-size: 11px;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.dir-classic .page-title {
  font-size: 30px;
  font-weight: 750;
  line-height: 1.12;
}

.dir-classic .page-subtitle {
  color: var(--text-tertiary) !important;
  font-size: 14px;
}

.dir-classic .card,
.dir-classic .modal-content,
.dir-classic .dropdown-menu {
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow) !important;
  color: var(--text);
}

.dir-classic .card {
  margin-bottom: 18px;
  overflow: hidden;
}

.dir-classic .card-header {
  background: var(--bg-elevated) !important;
  border-bottom: 1px solid var(--divider) !important;
  padding: 14px 18px;
}

.dir-classic .card-body {
  padding: 18px;
}

.dir-classic .card-title {
  font-size: 15px;
  font-weight: 750;
}

.dir-classic .card-category {
  color: var(--text-tertiary) !important;
  font-size: 12.5px;
}

.dir-classic .card-stats.card-primary,
.dir-classic .card-stats.card-success,
.dir-classic .card-stats.card-warning,
.dir-classic .card-stats.card-danger {
  background: var(--bg-elevated) !important;
  color: var(--text) !important;
}

.dir-classic .card-stats .icon-big {
  align-items: center;
  background: var(--accent-soft);
  border-radius: var(--radius);
  color: var(--accent-fg) !important;
  display: inline-flex;
  font-size: 24px;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.dir-classic .btn {
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 650;
  gap: 6px;
  line-height: 1.25;
  padding: 7px 12px;
}

.dir-classic .btn-primary,
.dir-classic .btn-success {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: var(--accent-text) !important;
}

.dir-classic .btn-primary:hover,
.dir-classic .btn-success:hover {
  background: var(--accent-hover) !important;
  border-color: var(--accent-hover) !important;
}

.dir-classic .btn-default,
.dir-classic .btn-secondary {
  background: var(--bg-elevated) !important;
  border-color: var(--border-strong) !important;
  color: var(--text) !important;
}

.dir-classic .btn-default:hover,
.dir-classic .btn-secondary:hover {
  background: var(--bg-hover) !important;
}

.dir-classic .btn-danger {
  background: var(--danger) !important;
  border-color: var(--danger) !important;
  color: #fff !important;
}

.dir-classic .btn-sm,
.dir-classic .btn-xs {
  border-radius: var(--radius-sm);
  font-size: 12px;
  padding: 5px 8px;
}

.dir-classic .form-control,
.dir-classic select.form-control,
.dir-classic textarea.form-control {
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: var(--radius) !important;
  box-shadow: none !important;
  color: var(--text) !important;
  font-size: 13.5px;
  min-height: 38px;
}

.dir-classic .form-control:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12) !important;
}

.dir-classic label,
.dir-classic .form-label {
  color: var(--text-secondary) !important;
  font-size: 12.5px;
  font-weight: 650;
}

.dir-classic .text-muted,
.dir-classic .form-text,
.dir-classic .crm-card-muted {
  color: var(--text-tertiary) !important;
}

.dir-classic .table thead th {
  background: var(--bg-sunken) !important;
  border-bottom: 1px solid var(--border) !important;
  color: var(--text-tertiary) !important;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.05em;
  padding: 10px 12px;
  text-transform: uppercase;
}

.dir-classic .table tbody td {
  border-top: 1px solid var(--divider) !important;
  color: var(--text-secondary);
  padding: 12px;
}

.dir-classic .table-hover tbody tr:hover {
  background: var(--bg-hover);
}

.dir-classic .badge {
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
}

.dir-classic .badge-info {
  background: var(--info-soft);
  color: #0369a1;
}

.dir-classic .badge-success {
  background: var(--success-soft);
  color: #047857;
}

.dir-classic .badge-warning {
  background: var(--warning-soft);
  color: #92400e;
}

.dir-classic .badge-danger {
  background: var(--danger-soft);
  color: #b91c1c;
}

.dir-classic .badge-default {
  background: var(--bg-active);
  color: var(--text-secondary);
}

.dir-classic .crm-action-row,
.dir-classic .crm-empty-state,
.dir-classic .crm-empty-mini,
.dir-classic .crm-ai-button,
.dir-classic .crm-step,
.dir-classic .crm-detail-list article,
.dir-classic .crm-history-record,
.dir-classic .crm-calendar-list-item {
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-sm);
}

.dir-classic .crm-action-row:hover,
.dir-classic .crm-step:hover,
.dir-classic .card .card-body .crm-ai-button:hover {
  border-color: var(--accent) !important;
  box-shadow: var(--shadow-md);
}

.dir-classic .crm-company-hero {
  background: linear-gradient(180deg, #ffffff 0%, #f7f8ff 100%) !important;
}

.dir-classic .crm-action-stat-strip {
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow) !important;
  overflow: hidden;
}

.dir-classic .crm-action-stat-item {
  background: transparent !important;
  border-color: var(--divider) !important;
  color: var(--text) !important;
}

.dir-classic .crm-action-stat-item:hover,
.dir-classic .crm-action-stat-item.is-active {
  background: var(--accent-soft) !important;
  color: var(--accent-fg) !important;
}

.dir-classic .crm-calendar-grid {
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  gap: 1px;
  overflow: hidden;
}

.dir-classic .crm-calendar-weekday {
  background: var(--bg-sunken);
  color: var(--text-tertiary);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.dir-classic .crm-calendar-day {
  background: var(--bg-elevated);
  border: 0;
  color: var(--text);
  min-height: 118px;
}

.dir-classic .crm-calendar-day:hover {
  background: var(--bg-hover);
}

.dir-classic .crm-calendar-day.is-today {
  box-shadow: inset 0 0 0 2px var(--accent);
}

.dir-classic .crm-calendar-pill {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  color: var(--accent-fg);
}

.dir-classic .crm-calendar-pill.is-event {
  background: var(--info-soft);
  color: #0369a1;
}

.dir-classic .crm-ai-status,
.dir-classic .crm-ai-note-panel,
.dir-classic .crm-ai-result-empty,
.dir-classic .crm-ai-placeholder,
.dir-classic .crm-ai-loading-card,
.dir-classic .crm-ai-warning-card,
.dir-classic .crm-ai-error-card {
  background: var(--bg-sunken) !important;
  border-color: var(--border) !important;
  border-radius: var(--radius) !important;
}

.dir-classic .crm-ai-note-panel.is-error,
.dir-classic .crm-ai-status-error,
.dir-classic .crm-ai-error-card {
  background: #fff8f7 !important;
  border-color: #f0c7c4 !important;
  color: #991b1b;
}

.dir-classic .crm-ai-warning-card {
  background: #fff8e8 !important;
  border-color: #f3d28a !important;
  color: #7a4b00;
}

.dir-classic .modal-header {
  border-bottom: 1px solid var(--divider) !important;
  padding: 18px;
}

.dir-classic .modal-title {
  color: var(--text);
  font-size: 20px;
  font-weight: 750;
}

.dir-classic .modal-body,
.dir-classic .modal-footer {
  padding: 18px;
}

.dir-classic .footer {
  background: transparent;
  border-top: 1px solid var(--divider);
  color: var(--text-tertiary);
}

@media (max-width: 991px) {
  .dir-classic .page-title {
    font-size: 24px;
  }

  .dir-classic .table thead {
    display: none;
  }

  .dir-classic .table,
  .dir-classic .table tbody,
  .dir-classic .table tr,
  .dir-classic .table td {
    display: block;
    width: 100%;
  }

  .dir-classic .table tbody tr {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 10px;
    overflow: hidden;
  }
}

/* Final calendar week planner guard: must stay after all legacy calendar CSS. */
.dir-classic .crm-week-planner-card {
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow) !important;
  overflow: auto !important;
}

.dir-classic .crm-week-planner {
  display: grid !important;
  grid-template-columns: 58px repeat(7, minmax(118px, 1fr)) !important;
  min-width: 980px;
}

.dir-classic .crm-week-planner.is-day-view {
  grid-template-columns: 58px minmax(320px, 1fr) !important;
  min-width: 520px;
}

.dir-classic .crm-calendar-month-grid {
  display: grid !important;
  grid-template-columns: repeat(7, minmax(118px, 1fr)) !important;
}

.dir-classic .crm-calendar-month-grid .crm-calendar-day {
  align-content: start;
  background: #fff !important;
  border: 0 !important;
  border-right: 1px solid var(--border) !important;
  border-bottom: 1px solid var(--border) !important;
  display: grid !important;
  gap: 6px;
  min-height: 150px;
  padding: 10px !important;
}

.dir-classic [data-calendar-create-url] {
  cursor: pointer;
}

.dir-classic .crm-calendar-month-grid .crm-calendar-day[data-calendar-create-url]:hover,
.dir-classic .crm-week-day-column[data-calendar-create-url]:hover {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 36%, transparent);
}

.dir-classic .crm-calendar-month-grid .crm-calendar-day.is-muted {
  background: #fafbfc !important;
  opacity: 0.62;
}

.dir-classic .crm-calendar-month-grid .crm-calendar-day-number {
  align-items: center;
  color: var(--text-tertiary);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  height: 24px;
  justify-content: center;
  margin: 0 0 3px;
  width: 24px;
}

.dir-classic .crm-calendar-month-grid .crm-calendar-day.is-today .crm-calendar-day-number {
  background: var(--accent);
  border-radius: 99px;
  color: var(--accent-text);
}

.dir-classic .crm-month-event {
  --event-color: var(--accent);
  background: color-mix(in srgb, var(--event-color) 12%, #ffffff);
  border: 1px solid color-mix(in srgb, var(--event-color) 28%, var(--border));
  border-left: 4px solid var(--event-color);
  border-radius: var(--radius-sm);
  color: var(--text);
  display: grid;
  gap: 1px;
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 42px;
  padding: 7px 8px;
  cursor: pointer;
  text-align: left;
}

.dir-classic .crm-month-event.is-calendar-event {
  --event-color: #0ea5e9;
}

.dir-classic .crm-month-event.is-activity {
  --event-color: #4f46e5;
}

.dir-classic .crm-month-event-time {
  color: var(--event-color);
  font-size: 10.5px;
  font-weight: 850;
  grid-row: 1 / span 2;
  min-width: 34px;
  padding-top: 1px;
}

.dir-classic .crm-month-event strong,
.dir-classic .crm-month-event small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dir-classic .crm-month-event strong {
  color: var(--text);
  font-size: 11.5px;
  font-weight: 800;
}

.dir-classic .crm-month-event small {
  color: var(--text-tertiary);
  font-size: 10.5px;
  font-weight: 650;
}

.dir-classic .crm-calendar-month-grid .crm-calendar-more {
  align-self: start;
  background: var(--bg-sunken);
  border-radius: 99px;
  color: var(--text-secondary);
  display: inline-flex;
  font-size: 11px;
  font-weight: 750;
  justify-self: start;
  padding: 4px 8px;
}

.dir-classic .crm-month-week-row {
  display: grid;
  grid-column: 1 / -1;
  min-height: 178px;
  position: relative;
}

.dir-classic .crm-month-week-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(118px, 1fr));
}

.dir-classic .crm-month-week-days .crm-calendar-day {
  padding-top: 106px !important;
}

.dir-classic .crm-month-segment-layer {
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(7, minmax(118px, 1fr));
  grid-template-rows: repeat(4, 24px);
  left: 0;
  padding: 34px 8px 0;
  pointer-events: none;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 2;
}

.dir-classic .crm-month-event-segment {
  --event-color: #0ea5e9;
  align-items: center;
  background: var(--event-color);
  border-radius: var(--radius-sm);
  box-shadow: 0 6px 14px rgba(15, 18, 30, 0.12);
  color: #fff;
  display: grid;
  gap: 6px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-width: 0;
  overflow: hidden;
  padding: 5px 8px;
  pointer-events: auto;
}

.dir-classic .crm-month-event-segment span,
.dir-classic .crm-month-event-segment strong,
.dir-classic .crm-month-event-segment small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dir-classic .crm-month-event-segment span,
.dir-classic .crm-month-event-segment small {
  color: rgba(255, 255, 255, 0.88);
  font-size: 10.5px;
  font-weight: 750;
}

.dir-classic .crm-month-event-segment strong {
  color: #fff;
  font-size: 11.5px;
  font-weight: 850;
}

.dir-classic .crm-calendar-view-tabs a {
  border-radius: var(--radius-sm);
  color: var(--text-secondary) !important;
  display: inline-flex;
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  padding: 7px 9px;
  text-decoration: none !important;
}

.dir-classic .crm-calendar-view-tabs a.is-active,
.dir-classic .crm-calendar-view-tabs a:hover {
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
  color: var(--text) !important;
}

.dir-classic .crm-week-corner,
.dir-classic .crm-week-day-head {
  background: var(--bg-elevated) !important;
  border-bottom: 1px solid var(--border) !important;
  min-height: 72px;
}

.dir-classic .crm-week-day-head {
  appearance: none;
  border-left: 0 !important;
  border-right: 1px solid var(--border) !important;
  border-top: 0 !important;
  display: grid !important;
  gap: 4px;
  padding: 13px 10px 11px !important;
  text-align: center;
}

.dir-classic .crm-week-hours {
  display: grid !important;
  grid-template-rows: repeat(var(--work-hour-rows, 20), 32px) !important;
}

.dir-classic .crm-week-day-column {
  display: grid !important;
  grid-template-rows: repeat(var(--work-slot-rows, 20), 32px) !important;
  min-height: var(--work-calendar-height, 640px);
}

.dir-classic .crm-week-offhours {
  align-items: center;
  background: repeating-linear-gradient(
    -45deg,
    rgba(148, 163, 184, 0.08),
    rgba(148, 163, 184, 0.08) 8px,
    rgba(148, 163, 184, 0.14) 8px,
    rgba(148, 163, 184, 0.14) 16px
  );
  color: var(--text-tertiary);
  display: flex;
  font-size: 11px;
  font-weight: 700;
  justify-content: center;
  pointer-events: none;
  z-index: 0;
}

.dir-classic .crm-week-event {
  grid-column: 1;
  z-index: 2;
}

.dir-classic .crm-week-offhours {
  grid-column: 1;
}

.dir-classic .crm-work-schedule-table .table th,
.dir-classic .crm-work-schedule-table .table td {
  vertical-align: middle;
}

.dir-classic .crm-work-schedule-table .form-control {
  min-width: 118px;
}

.dir-classic .crm-work-day-switch {
  align-items: center;
  display: inline-flex;
  gap: 10px;
  font-weight: 800;
  margin: 0;
  min-width: 122px;
}

.dir-classic .crm-work-day-switch .switch {
  flex: 0 0 auto;
}

.dir-classic .crm-work-schedule-table tr.is-day-off td {
  background: #f8fafc;
  color: var(--text-muted);
}

.dir-classic .crm-work-schedule-table tr.is-day-off input[type='time'] {
  opacity: 0.55;
}

.dir-classic .crm-index-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.dir-classic .crm-index-toolbar {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(150px, auto) auto auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  margin-bottom: 14px;
  border-radius: 8px;
}

.dir-classic .crm-index-toolbar .btn {
  height: 42px;
  white-space: nowrap;
}

.dir-classic .crm-index-toolbar > .btn {
  min-width: 92px;
}

.dir-classic .crm-index-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  background: #f7f8fb;
  border: 1px solid #dbe2ec;
  border-radius: 8px;
}

.dir-classic .crm-index-search i {
  color: #64748b;
  font-size: 18px;
}

.dir-classic .crm-index-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #111827;
}

.dir-classic .crm-index-inline-select {
  width: 170px;
  min-height: 42px;
}

.dir-classic .crm-index-filter-collapse {
  grid-column: 1 / -1;
}

.dir-classic .crm-index-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 0 0 12px;
}

.dir-classic .crm-index-tabs a,
.dir-classic .crm-index-tabs span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid #d8e0ea;
  border-radius: 5px;
  background: #fbfcfe;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.2;
}

.dir-classic .crm-index-tabs a.active {
  background: #f8faff;
  border-color: #c9d5f8;
  color: #4338ca;
}

.dir-classic .crm-index-tabs span {
  color: #64748b;
}

.dir-classic .crm-index-tabs strong,
.dir-classic .crm-index-tabs a span {
  background: transparent;
  border: 0;
  color: #4f46e5;
  font: inherit;
  font-weight: 700;
  line-height: inherit;
  min-height: auto;
  padding: 0;
}

.dir-classic .crm-index-card {
  overflow: hidden;
}

.dir-classic .crm-index-card .table-responsive {
  overflow-x: auto;
}

.dir-classic .crm-offer-attachments {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.dir-classic .crm-offer-attachment-row {
  align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding: 9px 10px;
}

.dir-classic .crm-offer-attachment-row span {
  display: grid;
  gap: 2px;
}

.dir-classic .crm-offer-attachment-row small {
  color: var(--text-muted);
}

.dir-classic .crm-directory-table {
  margin-bottom: 0;
  min-width: 1060px;
}

.dir-classic .crm-directory-table thead th {
  white-space: nowrap;
}

.dir-classic .crm-directory-table tbody td {
  vertical-align: middle;
}

.dir-classic .crm-directory-primary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 260px;
}

.dir-classic .crm-directory-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #4f46e5;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.dir-classic .crm-directory-avatar.is-person {
  border-radius: 50%;
  background: #ec4899;
}

.dir-classic .crm-directory-title {
  display: inline-block;
  color: #111827;
  font-weight: 700;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dir-classic .crm-directory-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.dir-classic .crm-directory-meta span {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dir-classic .crm-health-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 999px;
  background: #94a3b8;
}

.dir-classic .crm-health-dot.is-active {
  background: #10b981;
}

.dir-classic .crm-health-dot.is-planned {
  background: #0ea5e9;
}

.dir-classic .crm-health-dot.is-risk {
  background: #f59e0b;
}

.dir-classic .crm-health-dot.is-cold {
  background: #ef4444;
}

.dir-classic .crm-contact-directory-table .crm-row-actions {
  justify-content: flex-end;
}

.dir-classic .crm-action-directory-card .card-body {
  padding-top: 14px;
}

.dir-classic .crm-action-analytics-card {
  margin-bottom: 16px;
}

.dir-classic .crm-action-analytics-card.collapse:not(.show) {
  display: none;
}

.dir-classic .crm-action-chart-summary {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.dir-classic .crm-action-chart-summary-title {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 10px;
}

.dir-classic .crm-action-chart-summary-title strong {
  color: var(--text);
  font-size: 14px;
}

.dir-classic .crm-action-chart-summary-title span {
  color: var(--text-secondary);
  font-size: 12px;
}

.dir-classic .crm-action-chart-summary div {
  background: #f8fbff;
  border: 1px solid #bfd5ff;
  border-left: 6px solid #2563eb;
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.dir-classic .crm-action-chart-summary div.is-won {
  background: #f0fdf4;
  border-color: #bbf7d0;
  border-left-color: #16a34a;
}

.dir-classic .crm-action-chart-summary div.is-lost {
  background: #fef2f2;
  border-color: #fecaca;
  border-left-color: #dc2626;
}

.dir-classic .crm-action-chart-summary span {
  align-items: center;
  color: var(--text);
  display: flex;
  font-size: 12px;
  font-weight: 800;
  gap: 7px;
  text-transform: uppercase;
}

.dir-classic .crm-action-chart-summary span i {
  background: #2563eb;
  border-radius: 999px;
  display: inline-block;
  height: 10px;
  width: 10px;
}

.dir-classic .crm-action-chart-summary .is-won span i {
  background: #16a34a;
}

.dir-classic .crm-action-chart-summary .is-lost span i {
  background: #dc2626;
}

.dir-classic .crm-action-chart-summary em,
.dir-classic .crm-action-chart-summary small {
  color: var(--text-secondary);
  display: block;
  font-size: 12px;
  font-style: normal;
}

.dir-classic .crm-action-chart-summary em {
  margin-top: 7px;
}

.dir-classic .crm-action-chart-summary strong {
  color: var(--text);
  display: block;
  font-size: 22px;
  line-height: 1.25;
  margin: 4px 0;
}

.dir-classic .crm-action-line-chart {
  border-bottom: 1px solid #eef2f7;
  margin-bottom: 18px;
  min-height: 280px;
}

.dir-classic .crm-action-line-chart .ct-grid {
  stroke: #e5e7eb;
  stroke-dasharray: 0;
}

.dir-classic .crm-action-line-chart .ct-label {
  color: #64748b;
  fill: #64748b;
  font-size: 11px;
}

.dir-classic .crm-action-line-chart .ct-series-a .ct-line,
.dir-classic .crm-action-line-chart .ct-series-a .ct-point {
  stroke: #2563eb;
}

.dir-classic .crm-action-line-chart .ct-series-b .ct-line,
.dir-classic .crm-action-line-chart .ct-series-b .ct-point {
  stroke: #16a34a;
}

.dir-classic .crm-action-line-chart .ct-series-c .ct-line,
.dir-classic .crm-action-line-chart .ct-series-c .ct-point {
  stroke: #dc2626;
}

.dir-classic .crm-action-line-chart .ct-line {
  stroke-width: 3px;
}

.dir-classic .crm-action-line-chart .ct-point {
  stroke-width: 7px;
}

.dir-classic .crm-action-line-chart .ct-series-b .ct-line,
.dir-classic .crm-action-line-chart .ct-series-c .ct-line {
  stroke-width: 4px;
}

.dir-classic .crm-action-line-chart .crm-action-chart-end-label {
  font-size: 12px;
  font-weight: 800;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 4px;
}

.dir-classic .crm-action-line-chart .crm-action-chart-end-label-0 {
  fill: #2563eb;
}

.dir-classic .crm-action-line-chart .crm-action-chart-end-label-1 {
  fill: #16a34a;
}

.dir-classic .crm-action-line-chart .crm-action-chart-end-label-2 {
  fill: #dc2626;
}

.dir-classic .crm-action-manager-table-wrap {
  margin-top: 4px;
}

.dir-classic .crm-action-manager-table {
  margin-bottom: 0;
}

.dir-classic .crm-action-manager-table tfoot th {
  background: #f8fafc;
  border-top: 1px solid #dbe3ee;
  color: #111827;
}

.dir-classic .crm-action-directory-table {
  min-width: 1120px;
}

.dir-classic .crm-action-directory-table .crm-directory-primary {
  min-width: 320px;
}

.dir-classic .crm-action-contact-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  margin-top: 8px;
  color: #475569;
  font-size: 12px;
}

.dir-classic .crm-action-contact-line strong {
  color: #111827;
}

.dir-classic .crm-action-contact-line span {
  color: #64748b;
}

.dir-classic .crm-action-assignment-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
  color: #64748b;
  font-size: 12px;
}

.dir-classic .crm-action-owner-line {
  margin-top: 6px;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.dir-classic .crm-assignment-badge,
.dir-classic .crm-work-badge {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  min-height: 22px;
  padding: 5px 9px;
  white-space: nowrap;
}

.dir-classic .crm-assignment-badge {
  background: #dbeafe;
  color: #1d4ed8;
}

.dir-classic .crm-assignment-badge.is-mine {
  background: #e0e7ff;
  color: #3730a3;
}

.dir-classic .crm-assignment-badge.is-current_owner {
  background: #fef3c7;
  color: #92400e;
}

.dir-classic .crm-assignment-badge.is-pool,
.dir-classic .crm-assignment-badge.is-to_assign {
  background: #f1f5f9;
  color: #334155;
}

.dir-classic .crm-work-badge {
  background: #eef2ff;
  color: #4338ca;
}

.dir-classic .crm-work-badge.is-won {
  background: #d1fae5;
  color: #047857;
}

.dir-classic .crm-work-badge.is-lost,
.dir-classic .crm-work-badge.is-not_interested,
.dir-classic .crm-work-badge.is-bad_contact {
  background: #fee2e2;
  color: #b91c1c;
}

.dir-classic .crm-work-badge.is-open,
.dir-classic .crm-work-badge.is-in_progress,
.dir-classic .crm-work-badge.is-contacted,
.dir-classic .crm-work-badge.is-opportunity_created {
  background: #e0f2fe;
  color: #0369a1;
}

.dir-classic .crm-availability-dot {
  display: inline-flex;
  width: 13px;
  height: 13px;
  border: 2px solid #fff;
  border-radius: 999px;
  box-shadow: 0 0 0 3px #e2e8f0;
  vertical-align: middle;
}

.dir-classic .crm-availability-dot.is-none {
  background: #10b981;
  box-shadow: 0 0 0 3px #d1fae5;
}

.dir-classic .crm-availability-dot.is-warning {
  background: #f59e0b;
  box-shadow: 0 0 0 3px #fef3c7;
}

.dir-classic .crm-availability-dot.is-approval_required,
.dir-classic .crm-availability-dot.is-blocked {
  background: #ef4444;
  box-shadow: 0 0 0 3px #fee2e2;
}

.dir-classic .crm-action-directory-table td:nth-child(5) {
  max-width: 420px;
}

.dir-classic .crm-action-next-step {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: max-content minmax(0, 1fr);
  color: #111827;
  line-height: 1.35;
}

.dir-classic .crm-action-next-step strong {
  color: #111827;
  display: block;
  font-size: 13px;
  font-weight: 800;
}

.dir-classic .crm-action-next-step div > span {
  color: #64748b;
  display: block;
  font-size: 12px;
  margin-top: 2px;
}

.dir-classic .crm-action-next-note {
  color: #64748b;
  display: -webkit-box;
  font-size: 12px;
  line-height: 1.35;
  margin-top: 6px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .dir-classic .crm-directory-table thead {
    display: table-header-group;
  }

  .dir-classic .crm-directory-table,
  .dir-classic .crm-directory-table tbody {
    display: table;
    width: 100%;
  }

  .dir-classic .crm-directory-table tr {
    display: table-row;
    width: auto;
    border: 0;
    border-radius: 0;
    margin-bottom: 0;
    overflow: visible;
  }

  .dir-classic .crm-directory-table th,
  .dir-classic .crm-directory-table td {
    display: table-cell;
    width: auto;
    border-top: 1px solid var(--divider);
  }
}

@media (max-width: 991.98px) {
  .dir-classic .crm-index-toolbar {
    grid-template-columns: 1fr;
  }

  .dir-classic .crm-index-inline-select {
    width: 100%;
  }

  .dir-classic .crm-directory-primary {
    min-width: 0;
  }

  .dir-classic .crm-directory-title {
    max-width: 230px;
  }
}

@media (max-width: 767.98px) {
  .dir-classic .crm-index-header {
    display: block;
  }

  .dir-classic .crm-directory-table {
    min-width: 0;
  }
}

.dir-classic .crm-section-title-row {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 8px;
}

.dir-classic .crm-section-title-row label {
  margin: 0;
}

.dir-classic #monthly-goals {
  scroll-margin-top: 96px;
}

.dir-classic .crm-quota-year-table .table th,
.dir-classic .crm-quota-year-table .table td {
  vertical-align: middle;
}

.dir-classic .crm-quota-year-table .form-control {
  max-width: 180px;
}

/* Classic dashboard end-to-end view. */
.dir-classic .crm-dashboard {
  display: grid;
  gap: 18px;
  margin: 0;
  max-width: none;
}

.dir-classic .crm-dashboard-topbar,
.dir-classic .crm-dashboard-actions,
.dir-classic .crm-card-header-row,
.dir-classic .crm-focus-row,
.dir-classic .crm-activity-feed-row,
.dir-classic .crm-schedule-row,
.dir-classic .crm-quota-card .card-body,
.dir-classic .crm-stage-row {
  align-items: center;
  display: flex;
}

.dir-classic .crm-dashboard-topbar {
  align-items: flex-start;
  justify-content: space-between;
}

.dir-classic .crm-dashboard-actions {
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dir-classic .crm-dashboard-scope {
  margin: 0;
}

.dir-classic .crm-kpi-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.dir-classic .crm-kpi-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  min-height: 118px;
  padding: 18px;
}

.dir-classic .crm-kpi-card span,
.dir-classic .crm-kpi-card p,
.dir-classic .crm-kpi-card small {
  display: block;
}

.dir-classic .crm-kpi-card span {
  color: var(--text-tertiary);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

.dir-classic .crm-kpi-card strong {
  color: var(--text);
  display: block;
  font-size: 27px;
  line-height: 1.15;
  margin-top: 10px;
}

.dir-classic .crm-kpi-card small {
  color: #047857;
  font-size: 12px;
  font-weight: 700;
  margin-top: 8px;
}

.dir-classic .crm-kpi-card p {
  color: var(--text-tertiary);
  font-size: 12px;
  margin: 3px 0 0;
}

.dir-classic .crm-dashboard-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 340px;
}

.dir-classic .crm-dashboard-main,
.dir-classic .crm-dashboard-side {
  display: grid;
  gap: 18px;
  align-content: start;
}

.dir-classic .crm-card-header-row {
  justify-content: space-between;
}

.dir-classic .crm-focus-card .card-body,
.dir-classic .crm-activity-card .card-body,
.dir-classic .crm-schedule-card .card-body,
.dir-classic .crm-pipeline-card .card-body {
  padding: 0;
}

.dir-classic .crm-focus-row {
  border-bottom: 1px solid var(--divider);
  gap: 12px;
  min-height: 64px;
  padding: 12px 18px;
}

.dir-classic .crm-focus-row:last-child,
.dir-classic .crm-activity-feed-row:last-child,
.dir-classic .crm-schedule-row:last-child {
  border-bottom: 0;
}

.dir-classic .crm-focus-copy {
  min-width: 0;
  flex: 1;
}

.dir-classic .crm-focus-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.dir-classic .crm-focus-actions form {
  margin: 0;
}

.dir-classic .crm-focus-copy strong,
.dir-classic .crm-focus-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dir-classic .crm-focus-copy strong {
  color: var(--text);
  font-size: 13px;
}

.dir-classic .crm-focus-copy span,
.dir-classic .crm-focus-row time,
.dir-classic .crm-schedule-row small,
.dir-classic .crm-stage-row span {
  color: var(--text-tertiary);
  font-size: 12px;
}

.dir-classic .crm-priority-pill {
  border-radius: 99px;
  font-size: 11px;
  font-weight: 750;
  padding: 4px 8px;
  text-transform: lowercase;
}

.dir-classic .crm-priority-pill.is-high {
  background: var(--danger-soft);
  color: #b91c1c;
}

.dir-classic .crm-priority-pill.is-medium {
  background: var(--warning-soft);
  color: #92400e;
}

.dir-classic .crm-activity-feed-row {
  align-items: flex-start;
  border-bottom: 1px solid var(--divider);
  gap: 12px;
  padding: 16px 18px;
}

.dir-classic .crm-feed-icon {
  align-items: center;
  background: var(--accent-soft);
  border-radius: 99px;
  color: var(--accent-fg);
  display: flex;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.dir-classic .crm-feed-avatar {
  align-items: center;
  background: var(--crm-avatar-color, var(--accent-fg));
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  flex: 0 0 32px;
  font-size: 12px;
  font-weight: 800;
  height: 32px;
  justify-content: center;
  line-height: 1;
  margin-right: 0;
  overflow: hidden;
  text-align: center;
  text-indent: 0;
  white-space: nowrap;
  width: 32px;
}

.dir-classic img.crm-feed-avatar {
  object-fit: cover;
}

.dir-classic .crm-activity-feed-row .crm-activity-feed-copy {
  flex: 1;
  min-width: 0;
}

.dir-classic .crm-activity-feed-row .crm-activity-feed-copy strong,
.dir-classic .crm-activity-feed-row .crm-activity-feed-copy span,
.dir-classic .crm-activity-feed-row p {
  display: block;
}

.dir-classic .crm-activity-feed-row .crm-feed-avatar {
  display: inline-flex;
  place-content: center;
  place-items: center;
}

.dir-classic .crm-activity-feed-row strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.2;
}

.dir-classic .crm-activity-feed-row strong a {
  color: inherit;
  text-decoration: none;
}

.dir-classic .crm-activity-feed-row strong a:hover {
  color: var(--accent);
}

.dir-classic .crm-activity-feed-row span,
.dir-classic .crm-activity-feed-row time {
  color: var(--text-tertiary);
  font-size: 12px;
}

.dir-classic .crm-activity-feed-row p {
  background: var(--bg-sunken);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.45;
  margin: 8px 0 0;
  padding: 9px 11px;
}

.dir-classic .crm-schedule-row {
  align-items: flex-start;
  border-bottom: 1px solid var(--divider);
  gap: 10px;
  padding: 13px 18px;
}

.dir-classic .crm-schedule-dot {
  background: var(--event-color, var(--accent));
  border-radius: 99px;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--event-color, var(--accent)) 16%, #fff);
  height: 8px;
  margin-top: 6px;
  width: 8px;
}

.dir-classic .crm-schedule-row div {
  min-width: 0;
}

.dir-classic .crm-schedule-row strong,
.dir-classic .crm-schedule-row p,
.dir-classic .crm-schedule-row small {
  display: block;
}

.dir-classic .crm-schedule-row strong {
  color: var(--accent-fg);
  font-size: 11px;
  text-transform: uppercase;
}

.dir-classic .crm-schedule-row p {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  margin: 3px 0;
}

.dir-classic .crm-quota-card .card-body {
  display: grid;
  gap: 14px;
}

.dir-classic .crm-quota-summary {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: 74px minmax(0, 1fr);
}

.dir-classic .crm-quota-ring {
  align-items: center;
  background: conic-gradient(var(--accent) var(--quota-progress, 0deg), var(--bg-active) 0);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  height: 74px;
  justify-content: center;
  position: relative;
  width: 74px;
}

.dir-classic .crm-quota-ring::after {
  background: var(--bg-elevated);
  border-radius: 50%;
  content: "";
  inset: 9px;
  position: absolute;
}

.dir-classic .crm-quota-ring strong,
.dir-classic .crm-quota-ring span {
  position: relative;
  z-index: 1;
}

.dir-classic .crm-quota-ring strong {
  color: var(--text);
  font-size: 18px;
  line-height: 1;
}

.dir-classic .crm-quota-ring span {
  color: var(--text-tertiary);
  font-size: 9px;
  margin-top: 3px;
  text-transform: uppercase;
}

.dir-classic .crm-quota-stats {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.dir-classic .crm-quota-stats span,
.dir-classic .crm-quota-stats strong {
  display: block;
}

.dir-classic .crm-quota-stats span {
  color: var(--text-tertiary);
  font-size: 12px;
}

.dir-classic .crm-quota-stats strong {
  color: var(--text);
  font-size: 13px;
  margin-top: 2px;
}

.dir-classic .crm-year-quota-label {
  align-items: baseline;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-width: 0;
}

.dir-classic .crm-year-quota-label span {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.dir-classic .crm-year-quota-label small {
  color: var(--text-tertiary);
  font-size: 10px;
  text-align: right;
}

.dir-classic .crm-stage-row {
  align-items: center;
  border-bottom: 1px solid var(--divider);
  gap: 12px;
  padding: 12px 18px;
}

.dir-classic .crm-stage-row > div:first-child {
  min-width: 112px;
}

.dir-classic .crm-stage-row strong {
  align-items: center;
  color: var(--text);
  display: inline-flex;
  font-size: 12px;
  gap: 7px;
}

.dir-classic .crm-stage-row strong i {
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
  height: 7px;
  width: 7px;
}

.dir-classic .crm-stage-bar {
  align-self: center;
  background: var(--bg-active);
  border-radius: 99px;
  flex: 1;
  height: 7px;
  overflow: hidden;
}

.dir-classic .crm-stage-bar span {
  background: var(--accent);
  border-radius: inherit;
  display: block;
  height: 100%;
}

.dir-classic .crm-stage-row.is-won .crm-stage-bar span {
  background: #16a34a;
}

.dir-classic .crm-stage-row.is-won strong i {
  background: #16a34a;
}

.dir-classic .crm-stage-row.is-lost .crm-stage-bar span {
  background: #dc2626;
}

.dir-classic .crm-stage-row.is-lost strong i {
  background: #dc2626;
}

@media (max-width: 1199px) {
  .dir-classic .crm-kpi-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .dir-classic .crm-dashboard-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .dir-classic .crm-dashboard-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .dir-classic .crm-dashboard-actions {
    justify-content: flex-start;
  }

  .dir-classic .crm-kpi-grid {
    grid-template-columns: 1fr;
  }

  .dir-classic .crm-focus-row,
  .dir-classic .crm-activity-feed-row {
    align-items: flex-start;
  }

  .dir-classic .crm-priority-pill,
  .dir-classic .crm-focus-row time {
    display: none;
  }

  .dir-classic .crm-focus-actions {
    width: 100%;
  }
}

.dir-classic .crm-dashboard-work-queue .card-body,
.dir-classic .crm-dashboard-queue-group {
  display: grid;
}

.dir-classic .crm-dashboard-work-queue .card-body {
  gap: 14px;
  padding: 14px 16px 16px;
}

.dir-classic .crm-dashboard-queue-group {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  gap: 0;
  overflow: hidden;
}

.dir-classic .crm-dashboard-queue-group > strong {
  background: #f8fafc;
  border-bottom: 1px solid var(--divider);
  color: var(--text);
  display: block;
  font-size: 12px;
  padding: 10px 14px;
  text-transform: uppercase;
}

.dir-classic .crm-dashboard-queue-group .crm-empty-mini {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 16px 14px;
}

.dir-classic .crm-dashboard-queue-group .crm-focus-row {
  padding-left: 14px;
  padding-right: 14px;
}

.dir-classic .crm-free-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  margin-bottom: 18px;
  padding: 14px 16px;
}

.dir-classic .crm-free-box strong {
  color: #166534;
}

.dir-classic .crm-free-box p {
  color: var(--text-secondary);
  margin: 4px 0 0;
}

.dir-classic .crm-range-slot-button.is-free small {
  color: #15803d;
}

.dir-classic .crm-range-slot-button.is-busy small {
  color: #b45309;
}

.dir-classic .crm-week-event,
.dir-classic button.crm-month-event-segment {
  border: 0;
  cursor: pointer;
  text-align: left;
}

.dir-classic a.crm-week-event:hover,
.dir-classic button.crm-week-event:hover,
.dir-classic button.crm-month-event-segment:hover {
  filter: brightness(0.96);
  text-decoration: none;
}

.dir-classic .crm-calendar-day-number {
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: 800;
  padding: 0;
  text-align: left;
}

.dir-classic .crm-calendar-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dir-classic .crm-calendar-agenda .crm-calendar-list-item {
  align-items: start;
  grid-template-columns: 76px minmax(0, 1fr);
}

.dir-classic .crm-calendar-agenda .crm-calendar-list-content,
.dir-classic .crm-calendar-agenda .crm-calendar-list-item > div:nth-child(2) {
  min-width: 0;
}

.dir-classic .crm-calendar-agenda .crm-calendar-list-content strong,
.dir-classic .crm-calendar-agenda .crm-calendar-list-item > div:nth-child(2) > strong {
  display: block;
  overflow-wrap: anywhere;
  white-space: normal;
}

.dir-classic .crm-calendar-agenda .crm-calendar-actions,
.dir-classic .crm-calendar-agenda .crm-calendar-list-item > .crm-inline-delete {
  grid-column: 2;
  justify-content: flex-start;
}

.dir-classic .crm-calendar-agenda .crm-inline-delete {
  align-self: center;
}

.dir-classic .crm-calendar-list-item.is-agenda-selected {
  background: color-mix(in srgb, var(--accent) 9%, #ffffff) !important;
  border-color: color-mix(in srgb, var(--accent) 38%, var(--border)) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent), var(--shadow-sm);
}

.dir-classic .crm-week-event.is-calendar-source-selected,
.dir-classic .crm-month-event.is-calendar-source-selected,
.dir-classic .crm-month-event-segment.is-calendar-source-selected {
  outline: 3px solid color-mix(in srgb, var(--accent) 30%, transparent);
  outline-offset: 2px;
}

.dir-classic .crm-event-detail-body {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dir-classic .crm-event-detail-body span {
  color: var(--text-tertiary);
  display: block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.dir-classic .crm-event-detail-body strong {
  color: var(--text);
  display: block;
  font-size: 18px;
}

.dir-classic .crm-event-detail-body .is-wide {
  grid-column: 1 / -1;
}

.dir-classic .crm-operational-tiles {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dir-classic .crm-operational-tile {
  align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  display: grid;
  gap: 8px 12px;
  grid-template-columns: minmax(84px, .55fr) auto minmax(0, 1fr);
  min-height: 42px;
  padding: 8px 12px;
}

.dir-classic .crm-operational-tile:hover {
  background: var(--bg-hover);
  color: var(--text);
  text-decoration: none;
}

.dir-classic .crm-operational-tile span,
.dir-classic .crm-operational-tile small {
  color: var(--text-secondary);
  display: block;
}

.dir-classic .crm-operational-tile span {
  font-size: 12px;
  line-height: 1.15;
}

.dir-classic .crm-operational-tile small {
  font-size: 11px;
  line-height: 1.2;
  min-width: 0;
}

.dir-classic .crm-operational-tile strong {
  display: block;
  font-size: 20px;
  line-height: 1.1;
  margin: 0;
}

.dir-classic .crm-year-quota-chart {
  align-items: end;
  display: grid;
  gap: 6px;
  grid-column: 1 / -1;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  margin-top: 4px;
  min-height: 92px;
  min-width: 0;
}

.dir-classic .crm-year-quota-chart span {
  align-items: center;
  display: grid;
  gap: 5px;
  grid-template-rows: 70px auto;
}

.dir-classic .crm-year-quota-chart i {
  align-self: end;
  background: #c7d2fe;
  border-radius: 4px 4px 0 0;
  display: block;
  height: max(4px, var(--quota-bar));
  width: 100%;
}

.dir-classic .crm-year-quota-chart span.is-current i {
  background: var(--accent);
}

.dir-classic .crm-year-quota-chart span.is-current small {
  color: var(--accent);
  font-weight: 700;
}

.dir-classic .crm-year-quota-chart small {
  color: var(--text-tertiary);
  font-size: 10px;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

@media (max-width: 767px) {
  .dir-classic .crm-operational-tiles,
  .dir-classic .crm-event-detail-body {
    grid-template-columns: 1fr;
  }
}

/* Final width guard: dashboards live inside the sidebar shell, never beside it. */
.dir-classic .main-panel,
.dir-classic .main-panel > .content,
.dir-classic .main-panel .container-fluid,
.dir-classic .crm-dashboard,
.dir-classic .crm-dashboard-main,
.dir-classic .crm-dashboard-side,
.dir-classic .crm-kpi-card,
.dir-classic .crm-operational-tile,
.dir-classic .crm-focus-copy,
.dir-classic .crm-schedule-row > div,
.dir-classic .crm-stage-row > div {
  min-width: 0;
}

.dir-classic .main-panel {
  max-width: calc(100vw - 280px);
  overflow-x: hidden;
}

.dir-classic .main-panel .container-fluid {
  max-width: 1480px !important;
  width: 100%;
}

.dir-classic .content .container-fluid {
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 1600px) {
  .dir-classic .main-panel > .content {
    padding-left: 24px;
    padding-right: 24px;
  }

  .dir-classic .main-panel .container-fluid {
    max-width: none !important;
  }
}

.dir-classic .crm-dashboard {
  max-width: 100%;
  overflow-x: hidden;
}

.dir-classic .crm-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dir-classic .crm-dashboard-layout {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 330px);
}

.dir-classic .crm-focus-copy,
.dir-classic .crm-activity-feed-row .crm-activity-feed-copy,
.dir-classic .crm-schedule-row div,
.dir-classic .crm-stage-row div {
  overflow: hidden;
}

.dir-classic .crm-focus-copy strong,
.dir-classic .crm-focus-copy span,
.dir-classic .crm-schedule-row p,
.dir-classic .crm-schedule-row small,
.dir-classic .crm-stage-row strong,
.dir-classic .crm-stage-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-muted-panel {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px;
}

.crm-model-option {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  min-height: 110px;
  padding: 12px;
}

.crm-model-option code {
  display: block;
  margin-top: 4px;
  white-space: normal;
  word-break: break-word;
}

@media (max-width: 1199px) {
  .dir-classic .main-panel {
    max-width: 100vw;
  }

  .dir-classic .crm-kpi-grid,
  .dir-classic .crm-operational-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dir-classic .crm-dashboard-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .dir-classic .crm-kpi-grid,
  .dir-classic .crm-operational-tiles {
    grid-template-columns: 1fr;
  }
}

/* Dense CRM polish: keep operational views readable on smaller desktop widths. */
.dir-classic .crm-contact-item {
  grid-template-columns: minmax(220px, 1.1fr) minmax(150px, .55fr) minmax(150px, .55fr) auto;
}

.dir-classic .crm-action-company-contact-list .crm-contact-item {
  grid-template-columns: minmax(0, 1fr);
}

.dir-classic .crm-contact-main {
  min-width: 220px;
}

.dir-classic .crm-contact-name,
.dir-classic .crm-contact-subline span,
.dir-classic .crm-contact-links span,
.dir-classic .crm-contact-links a {
  hyphens: none;
  overflow-wrap: normal;
  word-break: normal;
}

.dir-classic .crm-history-record {
  display: block;
  padding: 10px 12px;
}

.dir-classic .crm-history-date {
  display: none;
}

.dir-classic .crm-history-top {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.dir-classic .crm-history-heading {
  min-width: 0;
}

.dir-classic .crm-history-time {
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.dir-classic .crm-history-badges {
  max-width: 48%;
}

.dir-classic .crm-history-content p {
  margin: 6px 0 0;
}

.dir-classic .crm-action-stat-strip-opportunities .crm-action-stat-item,
.dir-classic .crm-action-stat-strip-opportunities button.crm-action-stat-item {
  border: 0;
  border-right: 1px solid #edf1f5;
  border-radius: 0;
  box-shadow: none;
}

.dir-classic .crm-action-stat-strip-opportunities .crm-action-stat-item:focus,
.dir-classic .crm-action-stat-strip-opportunities .crm-action-stat-item:focus-visible {
  outline: 2px solid rgba(81, 66, 230, .28);
  outline-offset: -2px;
}

.dir-classic .crm-calendar-agenda .crm-calendar-list-item {
  column-gap: 12px;
  grid-template-columns: 78px minmax(0, 1fr);
}

.dir-classic .crm-calendar-list-time {
  white-space: nowrap;
}

.dir-classic .crm-calendar-list-time strong,
.dir-classic .crm-calendar-list-time span {
  display: block;
}

.dir-classic .crm-calendar-agenda .crm-calendar-list-content strong,
.dir-classic .crm-calendar-agenda .crm-calendar-list-item > div:nth-child(2) > strong {
  overflow-wrap: normal;
  word-break: normal;
}

.dir-classic .crm-calendar-list-note {
  overflow-wrap: break-word;
}

.dir-classic .crm-ai-audit-modal {
  display: grid;
  gap: 14px;
}

.dir-classic .crm-ai-audit-meta {
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  padding: 12px;
}

.dir-classic .crm-ai-audit-block {
  display: grid;
  gap: 8px;
}

.dir-classic .crm-ai-audit-block pre {
  background: #f8fafb;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
  max-height: 280px;
  overflow: auto;
  padding: 12px;
  white-space: pre-wrap;
}

.dir-classic .crm-ai-audit-response {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  max-height: 360px;
  overflow: auto;
  padding: 14px;
}

.dir-classic .crm-ai-audit-response p {
  margin: 0 0 10px;
}

.dir-classic .crm-ai-audit-context {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
}

.dir-classic .crm-ai-audit-context summary {
  cursor: pointer;
  font-weight: 700;
  padding: 10px 12px;
}

.dir-classic .crm-ai-audit-context pre {
  background: #f8fafb;
  border-top: 1px solid var(--border);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Consolas, 'Liberation Mono', monospace;
  font-size: 12px;
  line-height: 1.45;
  margin: 0;
  max-height: 320px;
  overflow: auto;
  padding: 12px;
  white-space: pre-wrap;
}

.dir-classic .crm-week-event,
.dir-classic .crm-month-event-segment {
  background: #f8fafb;
  background: color-mix(in srgb, var(--event-color, var(--accent)) 14%, #fff);
  border: 1px solid #dce3e8;
  border-left: 4px solid var(--event-color, var(--accent));
  box-shadow: none;
  color: var(--text);
}

.dir-classic .crm-week-event.is-all-day {
  background: #fef2f2;
  background: color-mix(in srgb, var(--event-color, #ef4444) 14%, #fff);
}

.dir-classic .crm-week-event strong,
.dir-classic .crm-month-event-segment strong {
  color: var(--text);
}

.dir-classic .crm-week-event small,
.dir-classic .crm-month-event-segment span,
.dir-classic .crm-month-event-segment small {
  color: var(--text-secondary);
}

.crm-company-data-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.crm-company-data-grid div {
  background: #f8fafc;
  border: 1px solid #e5eaf0;
  border-radius: 8px;
  padding: 10px 12px;
}

.crm-company-data-grid span {
  color: var(--text-secondary);
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.crm-company-data-grid strong {
  color: var(--text);
  display: block;
  font-size: 14px;
  line-height: 1.35;
}

.crm-form-check-row {
  align-items: flex-start;
  background: #f8fafc;
  border: 1px solid #e5eaf0;
  border-radius: 8px;
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px 16px;
}

.crm-form-check-row p {
  color: var(--text-secondary);
  margin: 4px 0 0;
}

.crm-admin-metric-strip {
  border-bottom: 1px solid #e5eaf0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 16px;
}

.crm-admin-metric-strip span {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #dce3ec;
  border-radius: 6px;
  color: var(--text-secondary);
  display: inline-flex;
  font-size: 13px;
  gap: 8px;
  min-height: 34px;
  padding: 7px 10px;
}

.crm-admin-metric-strip strong {
  color: var(--accent);
  font-weight: 800;
}

@media (max-width: 1500px) {
  .dir-classic .crm-contact-item {
    align-items: center;
    grid-template-columns: minmax(230px, 1fr) minmax(150px, .65fr) minmax(110px, auto);
  }

  .dir-classic .crm-contact-main {
    grid-row: 1 / span 2;
  }

  .dir-classic .crm-contact-opportunity,
  .dir-classic .crm-contact-next {
    grid-column: 2;
  }

  .dir-classic .crm-contact-action {
    align-self: center;
    grid-column: 3;
    grid-row: 1 / span 2;
  }
}

@media (max-width: 1199px) {
  .crm-sales-action-title {
    font-size: 18px;
  }

  .crm-sales-opportunity-line {
    grid-template-columns: 1fr;
  }

  .crm-sales-opportunity-line small {
    text-align: left;
  }

  .crm-contact-item-compact {
    grid-template-columns: 1fr;
  }

  .crm-contact-summary-pill {
    border-radius: 10px;
    width: 100%;
  }

  .crm-contact-summary-pill em {
    white-space: normal;
  }

  .crm-offers-overview {
    grid-template-columns: 1fr;
  }

  .crm-offer-record-top {
    flex-direction: column;
  }

  .crm-offer-record-statuses,
  .crm-offer-record-actions {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .crm-topic-record-top {
    flex-direction: column;
  }

  .crm-contact-record-top {
    flex-direction: column;
  }

  .crm-contact-action-compact {
    align-items: flex-start;
  }

  .crm-contact-action-statuses {
    align-items: flex-start;
  }

  .crm-contact-action-buttons {
    justify-content: flex-start;
  }

  .crm-contact-result-value-compact {
    max-width: none;
    text-align: left;
  }

  .dir-classic .crm-contact-item {
    grid-template-columns: 1fr;
  }

  .dir-classic .crm-contact-main,
  .dir-classic .crm-contact-opportunity,
  .dir-classic .crm-contact-next,
  .dir-classic .crm-contact-action {
    grid-column: auto;
    grid-row: auto;
  }

  .dir-classic .crm-history-top {
    display: grid;
  }

  .dir-classic .crm-history-badges {
    justify-content: flex-start;
    max-width: none;
  }
}

/* Final overrides: sales-action company detail compact tabs */
.dir-classic .crm-action-contacts-overview {
  margin-bottom: 14px;
}

.dir-classic .crm-action-company-tabs-card {
  overflow: hidden;
}

.dir-classic .crm-action-company-tabs-card .crm-company-tabs {
  align-items: center;
  background: #fff;
  gap: 6px;
  padding: 14px 18px 0;
}

.dir-classic .crm-action-company-tabs-card .crm-company-tabs button {
  border-bottom-width: 2px;
  border-radius: 10px 10px 0 0;
  padding: 10px 14px 12px;
}

.dir-classic .crm-action-company-tabs-card .crm-company-tab-panel {
  background: transparent;
  padding: 20px 24px 24px;
}

.dir-classic .crm-action-tab-toolbar {
  align-items: center;
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.dir-classic .crm-action-tab-toolbar-right {
  margin-bottom: 14px;
}

.dir-classic .crm-action-company-contact-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dir-classic .crm-action-company-contact-list .crm-contact-item-compact {
  align-items: center;
  background: #fcfdff;
  border: 1px solid #e4ebf3;
  border-radius: 12px;
  box-shadow: none;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(220px, 0.8fr) minmax(300px, 1fr) auto;
  padding: 12px 16px !important;
}

.dir-classic .crm-action-company-contact-list .crm-contact-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.dir-classic .crm-action-company-contact-list .crm-contact-main-head {
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
  margin-bottom: 0;
}

.dir-classic .crm-action-contact-title {
  min-width: 0;
}

.dir-classic .crm-action-company-contact-list .crm-contact-name {
  font-size: 15px;
  line-height: 1.25;
}

.dir-classic .crm-action-company-contact-list .crm-colored-badge {
  flex: 0 0 auto;
  margin-top: 0;
}

.dir-classic .crm-action-company-contact-list .crm-contact-subline,
.dir-classic .crm-action-company-contact-list .crm-contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}

.dir-classic .crm-action-company-contact-list .crm-contact-subline span,
.dir-classic .crm-action-company-contact-list .crm-contact-links a,
.dir-classic .crm-action-company-contact-list .crm-contact-links span {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.4;
}

.dir-classic .crm-action-company-contact-list .crm-contact-links {
  margin-top: 0;
}

.dir-classic .crm-contact-summary-strip-compact {
  gap: 8px;
  margin-top: 10px;
}

.dir-classic .crm-contact-summary-strip-compact .crm-contact-summary-pill {
  align-items: center;
  background: #f8fafc;
  border-color: #e5ebf3;
  border-radius: 8px;
  gap: 8px;
  min-height: 0;
  padding: 6px 10px;
}

.dir-classic .crm-contact-summary-strip-compact .crm-contact-summary-pill strong {
  color: var(--text-tertiary);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.dir-classic .crm-contact-summary-strip-compact .crm-contact-summary-pill em {
  align-items: center;
  color: var(--text);
  display: inline-flex;
  flex-wrap: wrap;
  font-size: 12px;
  font-style: normal;
  font-weight: 650;
  gap: 6px;
  line-height: 1.35;
}

.dir-classic .crm-contact-summary-strip-compact .crm-contact-summary-pill em span {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
}

.dir-classic .crm-action-contact-summary-strip {
  border-left: 1px solid #edf2f7;
  border-top: 0;
  margin-top: 0;
  padding-left: 16px;
  padding-top: 0;
}

.dir-classic .crm-action-company-contact-list .crm-contact-action-compact {
  align-items: flex-end;
  background: transparent;
  border: 0;
  border-left: 1px solid #edf2f7;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: flex-start;
  min-width: 250px;
  padding: 2px 0 2px 16px;
}

.dir-classic .crm-action-company-contact-list .crm-contact-action-statuses {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: right;
  width: auto;
}

.dir-classic .crm-inline-status-chip {
  background: #eef5ff;
  border: 1px solid #d7e5ff;
  border-radius: 999px;
  color: var(--accent);
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  padding: 6px 10px;
}

.dir-classic .crm-contact-last-touch {
  color: var(--text-tertiary);
  font-size: 12px;
  line-height: 1.35;
}

.dir-classic .crm-action-company-contact-list .crm-contact-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  margin-top: 0;
  width: auto;
}

.dir-classic .crm-action-company-contact-list .crm-contact-action-buttons .btn {
  align-items: center;
  display: inline-flex;
  gap: 5px;
  white-space: nowrap;
}

.dir-classic .crm-action-contacts-overview-compact {
  gap: 10px;
  margin-bottom: 14px;
}

.dir-classic .crm-action-contacts-overview-compact article {
  align-items: center;
  background: #fcfdff;
  border: 1px solid #e4ebf3;
  border-radius: 10px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  min-height: 0;
  padding: 8px 12px;
}

.dir-classic .crm-action-contacts-overview-compact article span {
  color: var(--text-tertiary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.dir-classic .crm-action-overview-value {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  min-width: 0;
}

.dir-classic .crm-action-contacts-overview-compact article strong {
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  margin-top: 0;
}

.dir-classic .crm-action-contacts-overview-compact article small {
  color: var(--text-secondary);
  font-size: 12px;
  margin-top: 0;
}

.dir-classic .crm-timeline-list-compact {
  gap: 8px;
}

.dir-classic .crm-action-history-record {
  background: #fcfdff;
  border: 1px solid #e4ebf3;
  border-radius: 10px;
  box-shadow: none;
}

.dir-classic .crm-timeline-list-compact .crm-history-record {
  padding: 12px 14px;
}

.dir-classic .crm-action-history-topline {
  align-items: flex-start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.dir-classic .crm-action-history-title {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  min-width: 0;
}

.dir-classic .crm-action-history-title strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
}

.dir-classic .crm-action-history-title > span:not(.crm-history-action-name) {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.35;
}

.dir-classic .crm-action-history-meta {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.dir-classic .crm-action-history-record .crm-history-top {
  align-items: flex-start;
  gap: 12px;
}

.dir-classic .crm-action-history-record .crm-history-time {
  background: #f1f5f9;
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
}

.dir-classic .crm-timeline-list-compact .crm-history-action-name {
  color: var(--accent);
  flex-basis: 100%;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  line-height: 1.25;
  margin-bottom: 0;
  text-transform: uppercase;
}

.dir-classic .crm-timeline-list-compact .crm-history-heading span,
.dir-classic .crm-timeline-list-compact .crm-history-content p,
.dir-classic .crm-action-history-facts {
  font-size: 12px;
}

.dir-classic .crm-action-history-value-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.dir-classic .crm-history-value-pill {
  background: #eaf5ff;
  border: 1px solid #d7eaff;
  border-radius: 999px;
  color: #1d5d88;
  display: inline-flex;
  font-size: 11px;
  font-weight: 750;
  line-height: 1;
  padding: 5px 8px;
}

.dir-classic .crm-history-value-pill-success {
  background: #e8fbf1;
  border-color: #c9f0da;
  color: #087a3d;
}

.dir-classic .crm-action-history-facts {
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  line-height: 1.5;
  margin-top: 8px;
}

.dir-classic .crm-action-history-facts strong {
  color: var(--text);
}

.dir-classic .crm-action-history-note {
  background: #fff;
  border: 1px solid #edf2f7;
  border-radius: 8px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.55;
  margin-top: 8px;
  padding: 9px 11px;
}

.dir-classic .crm-action-context-clean {
  border-radius: 12px;
  gap: 16px;
  padding: 14px 18px;
}

.dir-classic .crm-action-company-meta {
  gap: 8px 12px;
}

.dir-classic .crm-action-company-meta span:not(.badge) {
  color: var(--text-secondary);
  font-size: 13px;
}

.dir-classic .crm-action-owner-meta {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e8edf5;
  border-radius: 12px;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 12px;
}

.dir-classic .crm-action-owner-label {
  color: var(--text-tertiary);
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .05em;
  margin-bottom: 2px;
  text-transform: uppercase;
}

.dir-classic .crm-action-owner-summary strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.25;
}

.dir-classic .crm-history-record.crm-action-history-record .crm-history-heading {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.dir-classic .crm-action-history-facts {
  gap: 8px 16px;
  margin-top: 10px;
}

.dir-classic .crm-action-history-note {
  background: #f8fafc;
  border: 1px solid #edf2f7;
  border-radius: 8px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-top: 8px;
  padding: 9px 11px;
}

@media (max-width: 1199px) {
  .dir-classic .crm-action-company-contact-list .crm-contact-item-compact {
    align-items: flex-start;
    gap: 12px;
    grid-template-columns: 1fr;
  }

  .dir-classic .crm-action-contact-summary-strip {
    border-left: 0;
    border-top: 1px solid #edf2f7;
    padding-left: 0;
    padding-top: 10px;
  }

  .dir-classic .crm-action-company-contact-list .crm-contact-action-compact {
    align-items: flex-start;
    border-left: 0;
    border-top: 1px solid #edf2f7;
    flex-direction: column;
    min-width: 0;
    padding: 12px 0 0;
  }

  .dir-classic .crm-action-company-contact-list .crm-contact-action-statuses,
  .dir-classic .crm-action-company-contact-list .crm-contact-action-buttons {
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
  }

  .dir-classic .crm-action-company-contact-list .crm-contact-action-buttons {
    width: 100%;
  }

  .dir-classic .crm-action-contacts-overview-compact article {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .dir-classic .crm-action-overview-value {
    justify-content: flex-start;
  }

  .dir-classic .crm-action-history-record .crm-history-top {
    flex-direction: column;
  }

  .dir-classic .crm-action-history-topline,
  .dir-classic .crm-action-history-meta {
    align-items: flex-start;
    flex-direction: column;
    justify-content: flex-start;
  }
}

/* Company profile: refine deals and tasks tabs */
.dir-classic .crm-company-deals-overview,
.dir-classic .crm-company-tasks-overview {
  margin-bottom: 14px;
}

.dir-classic .crm-company-deals-table {
  gap: 10px;
}

.dir-classic .crm-company-deals-table article.crm-company-deal-card {
  align-items: center;
  background: #fcfdff;
  border: 1px solid #dbe6f0;
  border-radius: 10px;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.35fr) 120px 160px;
  padding: 14px 16px;
}

.dir-classic .crm-company-deal-main strong,
.dir-classic .crm-company-deal-value strong {
  display: block;
}

.dir-classic .crm-company-deal-main span,
.dir-classic .crm-company-deal-stage span,
.dir-classic .crm-company-deal-value small {
  color: var(--text-secondary);
  display: block;
  font-size: 12px;
  margin-top: 4px;
}

.dir-classic .crm-company-deal-stage {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dir-classic .crm-company-deal-stage b {
  color: var(--accent);
  font-size: 18px;
  font-weight: 800;
}

.dir-classic .crm-company-deal-value {
  text-align: right;
}

.dir-classic .crm-company-deal-value strong {
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
}

.dir-classic .crm-company-tasks-overview article strong {
  color: var(--text);
}

.dir-classic .crm-work-queue-group > strong {
  margin-bottom: 4px;
}

.dir-classic .crm-company-task-card {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.dir-classic .crm-company-task-main {
  min-width: 0;
}

.dir-classic .crm-company-task-main span {
  color: var(--accent);
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 2px;
}

.dir-classic .crm-company-task-main p {
  color: var(--text);
  font-weight: 700;
  margin: 0 0 4px;
}

.dir-classic .crm-company-task-main small {
  color: var(--text-secondary);
  display: block;
  font-size: 12px;
  line-height: 1.4;
}

@media (max-width: 1199px) {
  .dir-classic .crm-company-deals-table article.crm-company-deal-card {
    grid-template-columns: 1fr;
  }

  .dir-classic .crm-company-deal-value {
    text-align: left;
  }

  .dir-classic .crm-company-task-card {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Company profile: refine activity tab */
.dir-classic .crm-company-activity-overview {
  margin-bottom: 14px;
}

.dir-classic .crm-activity-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.dir-classic .crm-activity-filter-bar button {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 12px;
}

.dir-classic .crm-filter-count {
  background: #eef2ff;
  border-radius: 999px;
  color: var(--accent);
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  margin-left: 6px;
  min-width: 20px;
  padding: 4px 6px;
  justify-content: center;
}

.dir-classic .crm-activity-filter-bar button.is-active {
  background: var(--accent-soft);
  border-color: rgba(79, 70, 229, 0.22);
  color: var(--accent);
}

.dir-classic .crm-activity-filter-bar button.is-active .crm-filter-count {
  background: rgba(79, 70, 229, 0.14);
}

.dir-classic .crm-company-tab-panel[data-company-tab-panel="activity"] .crm-profile-timeline {
  gap: 10px;
}

.dir-classic .crm-company-tab-panel[data-company-tab-panel="activity"] .crm-profile-timeline-row {
  padding-bottom: 0;
}

.dir-classic .crm-company-tab-panel[data-company-tab-panel="activity"] .crm-profile-timeline-row::before {
  display: none;
}

.dir-classic .crm-company-tab-panel[data-company-tab-panel="activity"] .crm-profile-timeline-content {
  background: #fcfdff;
  border: 1px solid #dbe6f0;
  border-radius: 10px;
  padding: 14px 16px;
}

.dir-classic .crm-history-top-rich {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.dir-classic .crm-history-side-meta {
  display: flex;
  flex: 0 0 auto;
  justify-content: flex-end;
}

.dir-classic .crm-history-time-chip {
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-secondary);
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 9px;
  white-space: nowrap;
}

.dir-classic .crm-company-tab-panel[data-company-tab-panel="activity"] .crm-history-badges {
  gap: 5px;
  margin-top: 10px;
}

.dir-classic .crm-history-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 10px;
}

.dir-classic .crm-history-facts span {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.4;
}

.dir-classic .crm-history-facts strong {
  color: var(--text-tertiary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.dir-classic .crm-company-tab-panel[data-company-tab-panel="activity"] .crm-history-content p strong {
  color: var(--text);
}

.dir-classic .crm-activity-filter-empty {
  margin-top: 6px;
}

.dir-classic .crm-offer-filter-empty {
  margin-top: 6px;
}

.dir-classic .crm-topic-filter-empty {
  margin-top: 6px;
}

.dir-classic .crm-contact-filter-empty {
  margin-top: 6px;
}

.dir-classic .crm-deal-filter-empty {
  margin-top: 6px;
}

.dir-classic .crm-danger-zone {
  border-color: #fecaca;
}

.dir-classic .crm-cleanup-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, .8fr);
}

.dir-classic .crm-cleanup-panel {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}

.dir-classic .crm-cleanup-panel h3 {
  font-size: 14px;
  font-weight: 800;
  margin: 0 0 12px;
}

.dir-classic .crm-cleanup-panel-danger {
  background: #fff7f7;
  border-color: #fecaca;
}

.dir-classic .crm-muted-block {
  color: var(--text-tertiary);
  display: block;
  font-size: 12px;
  margin-top: 2px;
}

.dir-classic .crm-check-list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.dir-classic .crm-check-list li {
  align-items: center;
  color: var(--text-secondary);
  display: flex;
  gap: 8px;
  font-weight: 600;
}

.dir-classic .crm-check-list li::before {
  background: #dcfce7;
  border-radius: 999px;
  color: #047857;
  content: "OK";
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  padding: 4px 5px;
}

.dir-classic .crm-cleanup-confirm {
  align-items: flex-end;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 14px;
  grid-template-columns: max-content minmax(220px, 320px) max-content;
  margin-top: 18px;
  padding-top: 18px;
}

.dir-classic .crm-confirm-code {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 10px;
  color: #9f1239;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
}

.dir-classic .crm-confirm-code span {
  font-size: 12px;
  font-weight: 700;
}

.dir-classic .crm-confirm-code strong {
  color: #7f1d1d;
  font-family: "JetBrains Mono", monospace;
  font-size: 20px;
  letter-spacing: .12em;
}

.dir-classic .crm-confirm-input {
  font-family: "JetBrains Mono", monospace;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

@media (max-width: 1199px) {
  .dir-classic .crm-history-top-rich {
    flex-direction: column;
  }

  .dir-classic .crm-history-side-meta {
    justify-content: flex-start;
  }

  .dir-classic .crm-cleanup-grid,
  .dir-classic .crm-cleanup-confirm {
    grid-template-columns: 1fr;
  }
}

/* Dark mode: Classic refined. */
[data-crm-theme="dark"] .dir-classic {
  --bg: #0d0f14;
  --bg-elevated: #15181f;
  --bg-sunken: #090b0f;
  --bg-hover: #1c1f28;
  --bg-active: #232732;
  --border: #232732;
  --border-strong: #2e3340;
  --divider: #1c1f28;
  --text: #f0f2f7;
  --text-secondary: #b4bac8;
  --text-tertiary: #858ca0;
  --text-quaternary: #596071;
  --accent: #818cf8;
  --accent-hover: #a5b4fc;
  --accent-soft: #1e1b4b;
  --accent-text: #ffffff;
  --accent-fg: #a5b4fc;
  --success: #34d399;
  --success-soft: #064e3b;
  --warning: #fbbf24;
  --warning-soft: #451a03;
  --danger: #f87171;
  --danger-soft: #450a0a;
  --info: #38bdf8;
  --info-soft: #0c4a6e;
  --crm-accent: var(--accent);
  --crm-accent-dark: var(--accent-hover);
  --crm-ink: var(--text);
  --crm-muted: var(--text-tertiary);
  --crm-soft: var(--bg-sunken);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.30);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.30);
  --shadow-md: 0 8px 22px rgba(0, 0, 0, 0.38);
}

[data-crm-theme="dark"] body,
[data-crm-theme="dark"] .wrapper,
[data-crm-theme="dark"] .main-panel,
[data-crm-theme="dark"] .content,
[data-crm-theme="dark"] .dir-classic.crm-modal-page {
  background: var(--bg);
  color: var(--text);
}

.dir-classic .crm-theme-toggle {
  align-items: center;
  appearance: none;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  box-shadow: none;
  color: var(--text-secondary) !important;
  cursor: pointer;
  display: inline-flex;
  font-size: 18px;
  height: 38px;
  justify-content: center;
  min-height: 38px;
  padding: 0;
  width: 38px;
}

.dir-classic .crm-theme-toggle:hover,
.dir-classic .crm-theme-toggle:focus,
.dir-classic .crm-theme-toggle.is-active {
  background: var(--bg-sunken);
  border-color: var(--border);
  box-shadow: none;
  color: var(--text) !important;
}

[data-crm-theme="dark"] .dir-classic .main-header,
[data-crm-theme="dark"] .dir-classic .main-header .logo-header,
[data-crm-theme="dark"] .dir-classic .navbar-header,
[data-crm-theme="dark"] .dir-classic .sidebar,
[data-crm-theme="dark"] .dir-classic .card,
[data-crm-theme="dark"] .dir-classic .card-header,
[data-crm-theme="dark"] .dir-classic .modal-content,
[data-crm-theme="dark"] .dir-classic .dropdown-menu,
[data-crm-theme="dark"] .dir-classic .crm-company-profile-head,
[data-crm-theme="dark"] .dir-classic .crm-breadcrumbs,
[data-crm-theme="dark"] .dir-classic .crm-rich-editor,
[data-crm-theme="dark"] .dir-classic .crm-rich-preview,
[data-crm-theme="dark"] .dir-classic .crm-signature-preview,
[data-crm-theme="dark"] .dir-classic .crm-cleanup-panel,
[data-crm-theme="dark"] .dir-classic .crm-activity-filter-bar button,
[data-crm-theme="dark"] .dir-classic .crm-company-tab-panel[data-company-tab-panel="activity"] .crm-profile-timeline-content {
  background: var(--bg-elevated);
  border-color: var(--border);
  color: var(--text);
}

[data-crm-theme="dark"] .dir-classic .crm-global-search .input-group,
[data-crm-theme="dark"] .dir-classic .nav-search .input-group,
[data-crm-theme="dark"] .dir-classic .crm-company-note-composer,
[data-crm-theme="dark"] .dir-classic .crm-rich-editor-toolbar,
[data-crm-theme="dark"] .dir-classic .crm-variable-chip-row,
[data-crm-theme="dark"] .dir-classic .crm-avatar-upload,
[data-crm-theme="dark"] .dir-classic .crm-company-note-tabs span.is-active,
[data-crm-theme="dark"] .dir-classic .crm-calendar-view-tabs a.is-active,
[data-crm-theme="dark"] .dir-classic .crm-calendar-view-tabs strong,
[data-crm-theme="dark"] .dir-classic .crm-week-day-column:hover,
[data-crm-theme="dark"] .dir-classic .crm-cleanup-panel-danger {
  background: var(--bg-hover);
  border-color: var(--border);
  color: var(--text);
}

[data-crm-theme="dark"] .dir-classic .crm-breadcrumbs a:hover,
[data-crm-theme="dark"] .dir-classic .crm-breadcrumbs span:last-child,
[data-crm-theme="dark"] .dir-classic .crm-company-hero,
[data-crm-theme="dark"] .dir-classic .crm-ai-note-panel.is-error,
[data-crm-theme="dark"] .dir-classic .crm-ai-status-error,
[data-crm-theme="dark"] .dir-classic .crm-ai-error-card,
[data-crm-theme="dark"] .dir-classic .crm-confirm-code {
  background: var(--bg-active);
  border-color: var(--border-strong);
  color: var(--text);
}

[data-crm-theme="dark"] .dir-classic .form-control,
[data-crm-theme="dark"] .dir-classic .custom-select,
[data-crm-theme="dark"] .dir-classic select.form-control,
[data-crm-theme="dark"] .dir-classic textarea.form-control,
[data-crm-theme="dark"] .dir-classic .crm-html-source-textarea {
  background: var(--bg-sunken);
  border-color: var(--border-strong);
  color: var(--text);
}

[data-crm-theme="dark"] .dir-classic .form-control::placeholder,
[data-crm-theme="dark"] .dir-classic textarea.form-control::placeholder,
[data-crm-theme="dark"] .dir-classic .nav-search .form-control::placeholder {
  color: var(--text-quaternary);
}

[data-crm-theme="dark"] .dir-classic .table thead th,
[data-crm-theme="dark"] .dir-classic .crm-calendar-weekday,
[data-crm-theme="dark"] .dir-classic .crm-week-corner,
[data-crm-theme="dark"] .dir-classic .crm-week-day-head,
[data-crm-theme="dark"] .dir-classic .crm-week-hours {
  background: var(--bg-sunken);
  border-color: var(--border);
}

[data-crm-theme="dark"] .dir-classic .table tbody td,
[data-crm-theme="dark"] .dir-classic .crm-company-profile-metrics article,
[data-crm-theme="dark"] .dir-classic .crm-company-tabs,
[data-crm-theme="dark"] .dir-classic .crm-profile-timeline-content,
[data-crm-theme="dark"] .dir-classic .crm-detail-list article,
[data-crm-theme="dark"] .dir-classic .crm-history-record,
[data-crm-theme="dark"] .dir-classic .crm-contact-item,
[data-crm-theme="dark"] .dir-classic .crm-calendar-list-item,
[data-crm-theme="dark"] .dir-classic .crm-action-stat-strip {
  border-color: var(--border);
}

[data-crm-theme="dark"] .dir-classic .crm-calendar-grid,
[data-crm-theme="dark"] .dir-classic .crm-week-planner-card {
  background: var(--border);
  border-color: var(--border);
}

[data-crm-theme="dark"] .dir-classic .crm-calendar-day,
[data-crm-theme="dark"] .dir-classic .crm-week-day-column {
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 31px,
      var(--divider) 32px,
      transparent 33px,
      transparent 63px,
      var(--border) 64px
    ),
    var(--bg-elevated);
  color: var(--text);
}

[data-crm-theme="dark"] .dir-classic .crm-calendar-day {
  background: var(--bg-elevated);
}

[data-crm-theme="dark"] .dir-classic .crm-calendar-day:hover,
[data-crm-theme="dark"] .dir-classic .table-hover tbody tr:hover,
[data-crm-theme="dark"] .dir-classic .crm-action-row:hover,
[data-crm-theme="dark"] .dir-classic .crm-step:hover,
[data-crm-theme="dark"] .dir-classic .card .card-body .crm-ai-button:hover {
  background: var(--bg-hover);
}

[data-crm-theme="dark"] .dir-classic .badge-info {
  background: var(--info-soft);
  color: #bae6fd;
}

[data-crm-theme="dark"] .dir-classic .badge-success {
  background: var(--success-soft);
  color: #bbf7d0;
}

[data-crm-theme="dark"] .dir-classic .badge-warning {
  background: var(--warning-soft);
  color: #fde68a;
}

[data-crm-theme="dark"] .dir-classic .badge-danger {
  background: var(--danger-soft);
  color: #fecaca;
}

[data-crm-theme="dark"] .dir-classic .badge-default {
  background: var(--bg-active);
  color: var(--text-secondary);
}

[data-crm-theme="dark"] .dir-classic .alert-success {
  background: var(--success-soft);
  color: #bbf7d0;
}

[data-crm-theme="dark"] .dir-classic .alert-warning {
  background: var(--warning-soft);
  color: #fde68a;
}

[data-crm-theme="dark"] .dir-classic .alert-danger {
  background: var(--danger-soft);
  color: #fecaca;
}

[data-crm-theme="dark"] .dir-classic .crm-logo-text,
[data-crm-theme="dark"] .dir-classic .main-header .logo-header .logo,
[data-crm-theme="dark"] .dir-classic .page-title,
[data-crm-theme="dark"] .dir-classic .card-title,
[data-crm-theme="dark"] .dir-classic .modal-title,
[data-crm-theme="dark"] .dir-classic .crm-company-title-row .page-title,
[data-crm-theme="dark"] .dir-classic .crm-company-deals-table strong,
[data-crm-theme="dark"] .dir-classic .crm-company-deals-table b,
[data-crm-theme="dark"] .dir-classic .crm-history-heading strong {
  color: var(--text);
}

[data-crm-theme="dark"] .dir-classic .crm-company-meta,
[data-crm-theme="dark"] .dir-classic .crm-company-profile-meta i,
[data-crm-theme="dark"] .dir-classic .crm-company-owner-line i,
[data-crm-theme="dark"] .dir-classic .card-category,
[data-crm-theme="dark"] .dir-classic .page-subtitle,
[data-crm-theme="dark"] .dir-classic .crm-history-facts span,
[data-crm-theme="dark"] .dir-classic .crm-company-deals-table span {
  color: var(--text-secondary);
}

[data-crm-theme="dark"] .dir-classic .crm-week-event {
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
}

[data-crm-theme="dark"] .dir-classic .flatpickr-calendar {
  background: var(--bg-elevated);
  border-color: var(--border);
  color: var(--text);
}

[data-crm-theme="dark"] .dir-classic .crm-theme-toggle {
  background: #1b2130;
  border-color: #2a3447;
  box-shadow: none;
  color: #c7d2fe !important;
}

[data-crm-theme="dark"] .dir-classic .crm-theme-toggle:hover,
[data-crm-theme="dark"] .dir-classic .crm-theme-toggle:focus,
[data-crm-theme="dark"] .dir-classic .crm-theme-toggle.is-active {
  background: #222a3b;
  border-color: var(--accent);
  box-shadow: none;
  color: #c7d2fe !important;
}

[data-crm-theme="dark"] .dir-classic .topbar-nav .nav-link:hover,
[data-crm-theme="dark"] .dir-classic .topbar-nav .dropdown.show .nav-link,
[data-crm-theme="dark"] .dir-classic .btn-default:hover,
[data-crm-theme="dark"] .dir-classic .btn-default:focus,
[data-crm-theme="dark"] .dir-classic .dropdown-item:hover,
[data-crm-theme="dark"] .dir-classic .dropdown-item:focus {
  background: var(--bg-hover);
  border-color: var(--border-strong);
  color: var(--text) !important;
}

[data-crm-theme="dark"] .dir-classic .crm-private-mode-indicator {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(52, 211, 153, 0.38);
  color: #86efac;
}

[data-crm-theme="dark"] .dir-classic .crm-user-dropdown .dropdown-menu,
[data-crm-theme="dark"] .dir-classic .crm-user-dropdown .user-box,
[data-crm-theme="dark"] .dir-classic .crm-user-menu .dropdown-item {
  background: var(--bg-elevated);
  color: var(--text);
}

[data-crm-theme="dark"] .dir-classic .crm-user-menu .dropdown-item:hover,
[data-crm-theme="dark"] .dir-classic .crm-user-menu .dropdown-item:focus {
  background: var(--bg-hover);
  color: var(--text) !important;
}

[data-crm-theme="dark"] .dir-classic .crm-user-menu .dropdown-item.active {
  background: var(--accent-soft);
  color: #c7d2fe !important;
}

[data-crm-theme="dark"] .dir-classic .crm-user-menu .dropdown-item small,
[data-crm-theme="dark"] .dir-classic .dropdown-menu .text-muted {
  color: var(--text-tertiary) !important;
}

[data-crm-theme="dark"] .dir-classic .crm-dashboard-queue-group,
[data-crm-theme="dark"] .dir-classic .crm-empty-mini,
[data-crm-theme="dark"] .dir-classic .crm-kpi-card,
[data-crm-theme="dark"] .dir-classic .crm-operational-tile,
[data-crm-theme="dark"] .dir-classic .crm-dashboard-side-card,
[data-crm-theme="dark"] .dir-classic .crm-focus-row,
[data-crm-theme="dark"] .dir-classic .crm-activity-feed-row,
[data-crm-theme="dark"] .dir-classic .crm-activity-feed-note,
[data-crm-theme="dark"] .dir-classic .crm-filter-shell,
[data-crm-theme="dark"] .dir-classic .crm-company-profile-metrics article,
[data-crm-theme="dark"] .dir-classic .crm-customer-tabs-card,
[data-crm-theme="dark"] .dir-classic .crm-company-tab-panel,
[data-crm-theme="dark"] .dir-classic .crm-profile-main,
[data-crm-theme="dark"] .dir-classic .crm-profile-side,
[data-crm-theme="dark"] .dir-classic .crm-profile-stat,
[data-crm-theme="dark"] .dir-classic .crm-profile-health,
[data-crm-theme="dark"] .dir-classic .crm-detail-list article,
[data-crm-theme="dark"] .dir-classic .crm-contact-record-card,
[data-crm-theme="dark"] .dir-classic .crm-contact-item,
[data-crm-theme="dark"] .dir-classic .crm-contact-item-compact,
[data-crm-theme="dark"] .dir-classic .crm-contact-action-compact,
[data-crm-theme="dark"] .dir-classic .crm-contact-summary-pill,
[data-crm-theme="dark"] .dir-classic .crm-action-context,
[data-crm-theme="dark"] .dir-classic .crm-action-context-clean,
[data-crm-theme="dark"] .dir-classic .crm-action-owner-meta,
[data-crm-theme="dark"] .dir-classic .crm-action-contacts-overview-compact article,
[data-crm-theme="dark"] .dir-classic .crm-action-history-record,
[data-crm-theme="dark"] .dir-classic .crm-action-history-note,
[data-crm-theme="dark"] .dir-classic .crm-company-deals-table article.crm-company-deal-card,
[data-crm-theme="dark"] .dir-classic .crm-company-data-grid div,
[data-crm-theme="dark"] .dir-classic .crm-form-check-row,
[data-crm-theme="dark"] .dir-classic .crm-ai-audit-block pre,
[data-crm-theme="dark"] .dir-classic .crm-ai-audit-response,
[data-crm-theme="dark"] .dir-classic .crm-ai-audit-context,
[data-crm-theme="dark"] .dir-classic .crm-ai-audit-context pre {
  background: var(--bg-elevated);
  border-color: var(--border);
  color: var(--text);
}

[data-crm-theme="dark"] .dir-classic .crm-dashboard-queue-group > strong,
[data-crm-theme="dark"] .dir-classic .crm-table-toolbar,
[data-crm-theme="dark"] .dir-classic .crm-company-tabs,
[data-crm-theme="dark"] .dir-classic .crm-company-note-tabs,
[data-crm-theme="dark"] .dir-classic .crm-customer-tab-nav,
[data-crm-theme="dark"] .dir-classic .crm-rich-editor-toolbar,
[data-crm-theme="dark"] .dir-classic .crm-action-history-record .crm-history-time,
[data-crm-theme="dark"] .dir-classic .crm-history-time-chip,
[data-crm-theme="dark"] .dir-classic .crm-filter-count,
[data-crm-theme="dark"] .dir-classic .crm-admin-metric-strip span {
  background: var(--bg-sunken);
  border-color: var(--border);
  color: var(--text-secondary);
}

[data-crm-theme="dark"] .dir-classic .crm-empty-mini,
[data-crm-theme="dark"] .dir-classic .crm-activity-filter-empty,
[data-crm-theme="dark"] .dir-classic .crm-contact-filter-empty,
[data-crm-theme="dark"] .dir-classic .crm-deal-filter-empty,
[data-crm-theme="dark"] .dir-classic .crm-offer-filter-empty,
[data-crm-theme="dark"] .dir-classic .crm-topic-filter-empty {
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

[data-crm-theme="dark"] .dir-classic .crm-directory-table,
[data-crm-theme="dark"] .dir-classic .table,
[data-crm-theme="dark"] .dir-classic .table tbody tr,
[data-crm-theme="dark"] .dir-classic .table tbody td,
[data-crm-theme="dark"] .dir-classic .crm-directory-table tbody tr,
[data-crm-theme="dark"] .dir-classic .crm-directory-table tbody td {
  background: var(--bg-elevated);
  border-color: var(--border);
  color: var(--text);
}

[data-crm-theme="dark"] .dir-classic .table-striped tbody tr:nth-of-type(odd),
[data-crm-theme="dark"] .dir-classic .table-hover tbody tr:hover,
[data-crm-theme="dark"] .dir-classic .crm-directory-table tbody tr:hover,
[data-crm-theme="dark"] .dir-classic .crm-directory-table tbody tr:focus-within,
[data-crm-theme="dark"] .dir-classic .crm-contact-record-card:hover,
[data-crm-theme="dark"] .dir-classic .crm-contact-item:hover,
[data-crm-theme="dark"] .dir-classic .crm-contact-item-compact:hover,
[data-crm-theme="dark"] .dir-classic .crm-calendar-list-item:hover {
  background: var(--bg-hover);
  color: var(--text);
}

[data-crm-theme="dark"] .dir-classic .crm-directory-table tbody tr:hover td,
[data-crm-theme="dark"] .dir-classic .crm-directory-table tbody tr:focus-within td {
  background: transparent;
}

[data-crm-theme="dark"] .dir-classic .crm-row-link,
[data-crm-theme="dark"] .dir-classic .crm-directory-title,
[data-crm-theme="dark"] .dir-classic .crm-contact-main strong,
[data-crm-theme="dark"] .dir-classic .crm-contact-record-name,
[data-crm-theme="dark"] .dir-classic .crm-action-history-title strong,
[data-crm-theme="dark"] .dir-classic .crm-action-history-facts strong,
[data-crm-theme="dark"] .dir-classic .crm-company-task-main p,
[data-crm-theme="dark"] .dir-classic .crm-company-deal-value strong {
  color: var(--text);
}

[data-crm-theme="dark"] .dir-classic .crm-directory-meta,
[data-crm-theme="dark"] .dir-classic .crm-directory-meta span,
[data-crm-theme="dark"] .dir-classic .crm-contact-main small,
[data-crm-theme="dark"] .dir-classic .crm-contact-record-meta,
[data-crm-theme="dark"] .dir-classic .crm-action-history-title > span:not(.crm-history-action-name),
[data-crm-theme="dark"] .dir-classic .crm-action-history-note,
[data-crm-theme="dark"] .dir-classic .crm-company-task-main small,
[data-crm-theme="dark"] .dir-classic .crm-company-deal-main span,
[data-crm-theme="dark"] .dir-classic .crm-company-deal-stage span,
[data-crm-theme="dark"] .dir-classic .crm-company-deal-value small {
  color: var(--text-secondary);
}

[data-crm-theme="dark"] .dir-classic .crm-calendar-toolbar,
[data-crm-theme="dark"] .dir-classic .crm-calendar-toolbar .card-body,
[data-crm-theme="dark"] .dir-classic .crm-calendar-workspace,
[data-crm-theme="dark"] .dir-classic .crm-calendar-agenda,
[data-crm-theme="dark"] .dir-classic .crm-calendar-agenda .card-body,
[data-crm-theme="dark"] .dir-classic .crm-month-week-row,
[data-crm-theme="dark"] .dir-classic .crm-month-week-days,
[data-crm-theme="dark"] .dir-classic .crm-month-segment-layer {
  background: var(--bg-elevated);
  border-color: var(--border);
  color: var(--text);
}

[data-crm-theme="dark"] .dir-classic .crm-calendar-day,
[data-crm-theme="dark"] .dir-classic .crm-calendar-day.is-muted {
  background: var(--bg-elevated);
  border-color: var(--border);
  color: var(--text-secondary);
}

[data-crm-theme="dark"] .dir-classic .crm-calendar-day.is-muted {
  background: #10131a;
  color: var(--text-tertiary);
}

[data-crm-theme="dark"] .dir-classic .crm-calendar-day.is-today {
  box-shadow: inset 0 0 0 2px var(--accent);
}

[data-crm-theme="dark"] .dir-classic .crm-calendar-day-number {
  color: inherit;
}

[data-crm-theme="dark"] .dir-classic .crm-month-event,
[data-crm-theme="dark"] .dir-classic .crm-week-event,
[data-crm-theme="dark"] .dir-classic .crm-month-event-segment {
  background: color-mix(in srgb, var(--event-color, var(--accent)) 22%, var(--bg-elevated));
  border-color: color-mix(in srgb, var(--event-color, var(--accent)) 50%, var(--border));
  color: var(--text);
}

[data-crm-theme="dark"] .dir-classic .crm-week-event.is-all-day,
[data-crm-theme="dark"] .dir-classic .crm-month-event-segment.is-all-day {
  background: color-mix(in srgb, var(--event-color, #ef4444) 24%, var(--bg-elevated));
}

[data-crm-theme="dark"] .dir-classic .crm-calendar-pill,
[data-crm-theme="dark"] .dir-classic .crm-calendar-pill.is-event,
[data-crm-theme="dark"] .dir-classic .crm-calendar-more,
[data-crm-theme="dark"] .dir-classic .crm-month-event-time,
[data-crm-theme="dark"] .dir-classic .crm-week-event small,
[data-crm-theme="dark"] .dir-classic .crm-month-event-segment span,
[data-crm-theme="dark"] .dir-classic .crm-month-event-segment small {
  color: var(--text-secondary);
}

[data-crm-theme="dark"] .dir-classic .crm-mini-calendar,
[data-crm-theme="dark"] .dir-classic .crm-mini-calendar-day,
[data-crm-theme="dark"] .dir-classic .crm-slot-button,
[data-crm-theme="dark"] .dir-classic .crm-range-slot-button {
  background: var(--bg-elevated);
  border-color: var(--border);
  color: var(--text);
}

[data-crm-theme="dark"] .dir-classic .crm-range-slot-button.is-selected,
[data-crm-theme="dark"] .dir-classic .crm-slot-button.is-selected,
[data-crm-theme="dark"] .dir-classic .crm-range-slot-button:hover,
[data-crm-theme="dark"] .dir-classic .crm-slot-button:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: #c7d2fe;
}

[data-crm-theme="dark"] .dir-classic .crm-calendar-month-grid,
[data-crm-theme="dark"] .dir-classic .crm-week-grid {
  background: var(--border) !important;
  border-color: var(--border) !important;
}

[data-crm-theme="dark"] .dir-classic .crm-calendar-month-grid .crm-calendar-day {
  background: var(--bg-elevated) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

[data-crm-theme="dark"] .dir-classic .crm-calendar-month-grid .crm-calendar-day.is-muted {
  background: #111827 !important;
  color: var(--text-tertiary) !important;
  opacity: 0.78;
}

[data-crm-theme="dark"] .dir-classic .crm-calendar-month-grid .crm-calendar-day:hover,
[data-crm-theme="dark"] .dir-classic .crm-calendar-month-grid .crm-calendar-day:focus-within {
  background: var(--bg-hover) !important;
}

[data-crm-theme="dark"] .dir-classic .crm-week-corner,
[data-crm-theme="dark"] .dir-classic .crm-week-day-head,
[data-crm-theme="dark"] .dir-classic .crm-week-hours,
[data-crm-theme="dark"] .dir-classic .crm-week-hour-label {
  background: var(--bg-sunken) !important;
  border-color: var(--border) !important;
  color: var(--text-secondary) !important;
}

[data-crm-theme="dark"] .dir-classic .crm-week-day-column,
[data-crm-theme="dark"] .dir-classic .crm-week-day-body {
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 31px,
      rgba(148, 163, 184, 0.10) 32px,
      transparent 33px,
      transparent 63px,
      rgba(148, 163, 184, 0.16) 64px
    ),
    var(--bg-elevated) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

[data-crm-theme="dark"] .dir-classic .crm-week-offhours,
[data-crm-theme="dark"] .dir-classic .crm-week-day-column.is-day-off {
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(148, 163, 184, 0.08),
      rgba(148, 163, 184, 0.08) 8px,
      rgba(148, 163, 184, 0.03) 8px,
      rgba(148, 163, 184, 0.03) 16px
    ),
    #10131a !important;
  color: var(--text-secondary) !important;
}

[data-crm-theme="dark"] .dir-classic .crm-month-event,
[data-crm-theme="dark"] .dir-classic .crm-week-event,
[data-crm-theme="dark"] .dir-classic .crm-month-event-segment {
  background: color-mix(in srgb, var(--event-color, var(--accent)) 22%, var(--bg-elevated)) !important;
  border-color: color-mix(in srgb, var(--event-color, var(--accent)) 52%, var(--border)) !important;
  color: var(--text) !important;
}

[data-crm-theme="dark"] .dir-classic .crm-month-event strong,
[data-crm-theme="dark"] .dir-classic .crm-week-event strong,
[data-crm-theme="dark"] .dir-classic .crm-month-event-segment strong {
  color: var(--text) !important;
}

[data-crm-theme="dark"] .dir-classic .crm-month-event small,
[data-crm-theme="dark"] .dir-classic .crm-week-event small,
[data-crm-theme="dark"] .dir-classic .crm-month-event-segment small,
[data-crm-theme="dark"] .dir-classic .crm-month-event-time {
  color: var(--text-secondary) !important;
}

[data-crm-theme="dark"] .dir-classic .btn-default,
[data-crm-theme="dark"] .dir-classic .btn-outline-secondary,
[data-crm-theme="dark"] .dir-classic .crm-filter-pills a,
[data-crm-theme="dark"] .dir-classic .crm-activity-filter-bar button,
[data-crm-theme="dark"] .dir-classic .crm-square-btn,
[data-crm-theme="dark"] .dir-classic .crm-check-toggle,
[data-crm-theme="dark"] .dir-classic .crm-switch-field {
  background: var(--bg-elevated);
  border-color: var(--border);
  color: var(--text-secondary);
}

[data-crm-theme="dark"] .dir-classic .btn-default.active,
[data-crm-theme="dark"] .dir-classic .crm-filter-pills a.is-active,
[data-crm-theme="dark"] .dir-classic .crm-activity-filter-bar button.is-active,
[data-crm-theme="dark"] .dir-classic .crm-company-tabs button.is-active,
[data-crm-theme="dark"] .dir-classic .crm-customer-tab-nav button.is-active {
  background: var(--accent-soft);
  border-color: rgba(129, 140, 248, 0.36);
  color: #c7d2fe;
}

[data-crm-theme="dark"] .dir-classic .crm-filter-panel,
[data-crm-theme="dark"] .dir-classic .crm-bulk-toolbar,
[data-crm-theme="dark"] .dir-classic .crm-all-day-toggle,
[data-crm-theme="dark"] .dir-classic .crm-range-toggle,
[data-crm-theme="dark"] .dir-classic .crm-readonly-field,
[data-crm-theme="dark"] .dir-classic .crm-offers-overview article,
[data-crm-theme="dark"] .dir-classic .crm-offer-record-card,
[data-crm-theme="dark"] .dir-classic .crm-topic-record-card,
[data-crm-theme="dark"] .dir-classic .crm-offer-mail-panel,
[data-crm-theme="dark"] .dir-classic .crm-offer-products-preview,
[data-crm-theme="dark"] .dir-classic .crm-rich-editor.is-disabled,
[data-crm-theme="dark"] .dir-classic .crm-card,
[data-crm-theme="dark"] .dir-classic .crm-card-muted,
[data-crm-theme="dark"] .dir-classic .crm-danger-zone,
[data-crm-theme="dark"] .dir-classic .crm-admin-metric-strip,
[data-crm-theme="dark"] .dir-classic .crm-admin-metric-strip span,
[data-crm-theme="dark"] .dir-classic .crm-model-recommendation-card,
[data-crm-theme="dark"] .dir-classic .crm-conditional-panel,
[data-crm-theme="dark"] .dir-classic .crm-upload-card,
[data-crm-theme="dark"] .dir-classic .crm-attachment-card,
[data-crm-theme="dark"] .dir-classic .crm-conflict-box {
  background: var(--bg-elevated) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

[data-crm-theme="dark"] .dir-classic .crm-check-toggle-box,
[data-crm-theme="dark"] .dir-classic input[type="file"],
[data-crm-theme="dark"] .dir-classic input[type="file"]::file-selector-button {
  background: var(--bg-sunken) !important;
  border-color: var(--border-strong) !important;
  color: var(--text) !important;
}

[data-crm-theme="dark"] .dir-classic input:disabled,
[data-crm-theme="dark"] .dir-classic select:disabled,
[data-crm-theme="dark"] .dir-classic textarea:disabled,
[data-crm-theme="dark"] .dir-classic .form-control:disabled,
[data-crm-theme="dark"] .dir-classic .form-control[readonly],
[data-crm-theme="dark"] .dir-classic .flatpickr-input.form-control[readonly] {
  background: #111827 !important;
  border-color: var(--border) !important;
  color: var(--text-tertiary) !important;
  opacity: 1;
}

[data-crm-theme="dark"] .dir-classic .crm-switch-copy strong,
[data-crm-theme="dark"] .dir-classic .crm-offer-mail-panel strong,
[data-crm-theme="dark"] .dir-classic .crm-offer-record-card strong,
[data-crm-theme="dark"] .dir-classic .crm-topic-record-card strong,
[data-crm-theme="dark"] .dir-classic .crm-contact-record-card strong,
[data-crm-theme="dark"] .dir-classic .crm-card strong {
  color: var(--text) !important;
}

[data-crm-theme="dark"] .dir-classic .text-muted,
[data-crm-theme="dark"] .dir-classic label,
[data-crm-theme="dark"] .dir-classic .crm-switch-copy,
[data-crm-theme="dark"] .dir-classic .crm-help-text,
[data-crm-theme="dark"] .dir-classic .crm-offer-products-preview,
[data-crm-theme="dark"] .dir-classic .crm-offer-record-card small,
[data-crm-theme="dark"] .dir-classic .crm-topic-record-card small,
[data-crm-theme="dark"] .dir-classic .crm-contact-record-card small {
  color: var(--text-secondary) !important;
}

[data-crm-theme="dark"] .dir-classic .crm-directory-table tbody tr:hover,
[data-crm-theme="dark"] .dir-classic .crm-directory-table tbody tr:focus-within,
[data-crm-theme="dark"] .dir-classic .crm-clickable-row:hover,
[data-crm-theme="dark"] .dir-classic .crm-clickable-row:focus,
[data-crm-theme="dark"] .dir-classic tr.is-selected,
[data-crm-theme="dark"] .dir-classic tr.table-active,
[data-crm-theme="dark"] .dir-classic .table-active,
[data-crm-theme="dark"] .dir-classic .table-active > td {
  background: var(--bg-hover) !important;
  color: var(--text) !important;
}

[data-crm-theme="dark"] .dir-classic .crm-directory-table tbody tr:hover td,
[data-crm-theme="dark"] .dir-classic .crm-directory-table tbody tr:focus-within td,
[data-crm-theme="dark"] .dir-classic tr.is-selected td,
[data-crm-theme="dark"] .dir-classic tr.table-active td {
  background: transparent !important;
  color: inherit !important;
}

[data-crm-theme="dark"] .dir-classic .crm-theme-toggle i {
  font-size: 19px;
  line-height: 1;
}

[data-crm-theme="dark"] .dir-classic .crm-action-hero .card-body,
[data-crm-theme="dark"] .dir-classic .crm-action-list-card,
[data-crm-theme="dark"] .dir-classic .crm-action-list-table,
[data-crm-theme="dark"] .dir-classic .crm-action-row,
[data-crm-theme="dark"] .dir-classic .crm-action-row td,
[data-crm-theme="dark"] .dir-classic .crm-action-company-tabs-card,
[data-crm-theme="dark"] .dir-classic .crm-action-company-tabs-card .crm-company-tabs,
[data-crm-theme="dark"] .dir-classic .crm-action-company-tabs-card .crm-company-tab-panel,
[data-crm-theme="dark"] .dir-classic .crm-action-tab-toolbar,
[data-crm-theme="dark"] .dir-classic .crm-action-company-contact-list,
[data-crm-theme="dark"] .dir-classic .crm-action-company-contact-list .crm-contact-item,
[data-crm-theme="dark"] .dir-classic .crm-action-company-contact-list .crm-contact-item-compact,
[data-crm-theme="dark"] .dir-classic .crm-action-company-contact-list .crm-contact-opportunity,
[data-crm-theme="dark"] .dir-classic .crm-action-company-contact-list .crm-contact-next,
[data-crm-theme="dark"] .dir-classic .crm-action-contact-summary-strip,
[data-crm-theme="dark"] .dir-classic .crm-action-contact-summary-strip article,
[data-crm-theme="dark"] .dir-classic .crm-contact-summary-pill,
[data-crm-theme="dark"] .dir-classic .crm-contact-summary-pill-muted,
[data-crm-theme="dark"] .dir-classic .crm-action-company-contact-list .crm-contact-action-compact,
[data-crm-theme="dark"] .dir-classic .crm-action-progress--large,
[data-crm-theme="dark"] .dir-classic .crm-action-progress,
[data-crm-theme="dark"] .dir-classic .crm-action-progress span,
[data-crm-theme="dark"] .dir-classic .crm-action-stat-strip-opportunities .crm-action-stat-item,
[data-crm-theme="dark"] .dir-classic button.crm-action-stat-item,
[data-crm-theme="dark"] .dir-classic .crm-action-history-facts,
[data-crm-theme="dark"] .dir-classic .crm-action-history-value-row,
[data-crm-theme="dark"] .dir-classic .crm-profile-timeline,
[data-crm-theme="dark"] .dir-classic .crm-profile-timeline-row,
[data-crm-theme="dark"] .dir-classic .crm-company-tab-panel[data-company-tab-panel="activity"] .crm-profile-timeline-row,
[data-crm-theme="dark"] .dir-classic .crm-company-tab-panel[data-company-tab-panel="activity"] .crm-profile-timeline-content,
[data-crm-theme="dark"] .dir-classic .crm-company-task-card,
[data-crm-theme="dark"] .dir-classic .crm-company-deal-card,
[data-crm-theme="dark"] .dir-classic .crm-company-topic-card,
[data-crm-theme="dark"] .dir-classic .crm-company-offer-card,
[data-crm-theme="dark"] .dir-classic .crm-quick-add-drawer,
[data-crm-theme="dark"] .dir-classic .crm-quick-add-option,
[data-crm-theme="dark"] .dir-classic .crm-admin-form-card,
[data-crm-theme="dark"] .dir-classic .crm-form-card,
[data-crm-theme="dark"] .dir-classic .crm-mail-compose-card,
[data-crm-theme="dark"] .dir-classic .crm-mail-offer-preview,
[data-crm-theme="dark"] .dir-classic .crm-mail-offer-summary,
[data-crm-theme="dark"] .dir-classic .crm-mail-history-card,
[data-crm-theme="dark"] .dir-classic .crm-ai-prompt-help,
[data-crm-theme="dark"] .dir-classic .crm-ai-prompt-recommendations,
[data-crm-theme="dark"] .dir-classic .crm-ai-prompt-recommendation,
[data-crm-theme="dark"] .dir-classic .crm-ai-audit-summary,
[data-crm-theme="dark"] .dir-classic .crm-ai-audit-summary article,
[data-crm-theme="dark"] .dir-classic .crm-ai-audit-row,
[data-crm-theme="dark"] .dir-classic .crm-ai-audit-modal-meta,
[data-crm-theme="dark"] .dir-classic .crm-ai-audit-modal-box,
[data-crm-theme="dark"] .dir-classic .crm-ai-audit-context-box,
[data-crm-theme="dark"] .dir-classic .crm-cleanup-confirm-box,
[data-crm-theme="dark"] .dir-classic .crm-system-note,
[data-crm-theme="dark"] .dir-classic .crm-checkbox-card,
[data-crm-theme="dark"] .dir-classic .crm-check-card,
[data-crm-theme="dark"] .dir-classic .crm-toggle-card {
  background: var(--bg-elevated) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

[data-crm-theme="dark"] .dir-classic .crm-calendar-month-grid,
[data-crm-theme="dark"] .dir-classic .crm-calendar-grid,
[data-crm-theme="dark"] .dir-classic .crm-week-planner,
[data-crm-theme="dark"] .dir-classic .crm-week-grid,
[data-crm-theme="dark"] .dir-classic .crm-month-week-row,
[data-crm-theme="dark"] .dir-classic .crm-month-week-days {
  background-color: var(--border) !important;
}

[data-crm-theme="dark"] .dir-classic .crm-calendar-day,
[data-crm-theme="dark"] .dir-classic .crm-calendar-month-grid .crm-calendar-day,
[data-crm-theme="dark"] .dir-classic button.crm-calendar-day,
[data-crm-theme="dark"] .dir-classic a.crm-calendar-day,
[data-crm-theme="dark"] .dir-classic .crm-month-day,
[data-crm-theme="dark"] .dir-classic .crm-month-week-days > *,
[data-crm-theme="dark"] .dir-classic .crm-week-day-column,
[data-crm-theme="dark"] .dir-classic .crm-week-day-body {
  background-color: var(--bg-elevated) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

[data-crm-theme="dark"] .dir-classic .crm-calendar-day.is-muted,
[data-crm-theme="dark"] .dir-classic .crm-calendar-month-grid .crm-calendar-day.is-muted,
[data-crm-theme="dark"] .dir-classic .crm-month-day.is-muted,
[data-crm-theme="dark"] .dir-classic .crm-month-week-days > .is-muted {
  background-color: #111827 !important;
  color: var(--text-tertiary) !important;
}

[data-crm-theme="dark"] .dir-classic .crm-calendar-day:hover,
[data-crm-theme="dark"] .dir-classic .crm-calendar-day:focus,
[data-crm-theme="dark"] .dir-classic .crm-calendar-day:focus-visible,
[data-crm-theme="dark"] .dir-classic .crm-month-day:hover,
[data-crm-theme="dark"] .dir-classic .crm-month-day:focus {
  background-color: var(--bg-hover) !important;
  border-color: var(--accent) !important;
  color: var(--text) !important;
}

[data-crm-theme="dark"] .dir-classic .table-active > th,
[data-crm-theme="dark"] .dir-classic .table-active > td,
[data-crm-theme="dark"] .dir-classic .table-hover .table-active:hover > th,
[data-crm-theme="dark"] .dir-classic .table-hover .table-active:hover > td,
[data-crm-theme="dark"] .dir-classic .crm-directory-table tbody tr.is-selected,
[data-crm-theme="dark"] .dir-classic .crm-directory-table tbody tr.is-selected td {
  background: var(--bg-hover) !important;
  color: var(--text) !important;
}

[data-crm-theme="dark"] .dir-classic .crm-action-row:hover td,
[data-crm-theme="dark"] .dir-classic .crm-action-company-contact-list .crm-contact-item:hover,
[data-crm-theme="dark"] .dir-classic .crm-action-company-contact-list .crm-contact-item-compact:hover,
[data-crm-theme="dark"] .dir-classic .crm-quick-add-option:hover,
[data-crm-theme="dark"] .dir-classic .crm-quick-add-option:focus,
[data-crm-theme="dark"] .dir-classic .crm-check-card:hover,
[data-crm-theme="dark"] .dir-classic .crm-checkbox-card:hover,
[data-crm-theme="dark"] .dir-classic .crm-toggle-card:hover {
  background: var(--bg-hover) !important;
  color: var(--text) !important;
}

[data-crm-theme="dark"] .dir-classic .crm-contact-summary-pill strong,
[data-crm-theme="dark"] .dir-classic .crm-action-company-contact-list .crm-contact-subline,
[data-crm-theme="dark"] .dir-classic .crm-action-company-contact-list .crm-contact-links,
[data-crm-theme="dark"] .dir-classic .crm-contact-result-value-compact,
[data-crm-theme="dark"] .dir-classic .crm-action-history-meta,
[data-crm-theme="dark"] .dir-classic .crm-action-history-facts span,
[data-crm-theme="dark"] .dir-classic .crm-action-history-note,
[data-crm-theme="dark"] .dir-classic .crm-mail-offer-preview small,
[data-crm-theme="dark"] .dir-classic .crm-ai-prompt-help p,
[data-crm-theme="dark"] .dir-classic .crm-ai-prompt-recommendation p,
[data-crm-theme="dark"] .dir-classic .crm-ai-audit-modal-box,
[data-crm-theme="dark"] .dir-classic .crm-system-note,
[data-crm-theme="dark"] .dir-classic .crm-cleanup-confirm-box {
  color: var(--text-secondary) !important;
}

[data-crm-theme="dark"] .dir-classic .crm-contact-summary-pill em,
[data-crm-theme="dark"] .dir-classic .crm-action-contact-title,
[data-crm-theme="dark"] .dir-classic .crm-action-company-contact-list .crm-contact-name,
[data-crm-theme="dark"] .dir-classic .crm-action-history-title strong,
[data-crm-theme="dark"] .dir-classic .crm-action-history-facts strong,
[data-crm-theme="dark"] .dir-classic .crm-mail-offer-preview strong,
[data-crm-theme="dark"] .dir-classic .crm-ai-prompt-recommendation strong {
  color: var(--text) !important;
}

[data-crm-theme="dark"] .dir-classic .crm-upload-card,
[data-crm-theme="dark"] .dir-classic .crm-attachment-card,
[data-crm-theme="dark"] .dir-classic .crm-conditional-panel,
[data-crm-theme="dark"] .dir-classic .crm-check-toggle-box {
  box-shadow: none !important;
}

/* Dark mode final sweep for legacy CRM surfaces with hard-coded light fills. */
[data-crm-theme="dark"] .dir-classic .crm-theme-toggle {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #171a23 !important;
  border: 1px solid #293142 !important;
  border-radius: 8px !important;
  color: #c7d2fe !important;
  box-shadow: none !important;
}

[data-crm-theme="dark"] .dir-classic .crm-theme-toggle:hover,
[data-crm-theme="dark"] .dir-classic .crm-theme-toggle:focus {
  background: #20263a !important;
  border-color: #818cf8 !important;
  color: #eef2ff !important;
}

[data-crm-theme="dark"] .dir-classic .crm-theme-toggle i {
  font-size: 18px;
  line-height: 1;
}

[data-crm-theme="dark"] .dir-classic .crm-calendar-month-grid,
[data-crm-theme="dark"] .dir-classic .crm-calendar-grid,
[data-crm-theme="dark"] .dir-classic .crm-week-grid,
[data-crm-theme="dark"] .dir-classic .crm-month-week-row,
[data-crm-theme="dark"] .dir-classic .crm-month-week-days,
[data-crm-theme="dark"] .dir-classic .crm-month-segment-layer {
  background: var(--border) !important;
  background-color: var(--border) !important;
}

[data-crm-theme="dark"] .dir-classic .crm-calendar-month-grid .crm-calendar-day,
[data-crm-theme="dark"] .dir-classic .crm-calendar-grid .crm-calendar-day,
[data-crm-theme="dark"] .dir-classic .crm-calendar-day,
[data-crm-theme="dark"] .dir-classic button.crm-calendar-day,
[data-crm-theme="dark"] .dir-classic a.crm-calendar-day,
[data-crm-theme="dark"] .dir-classic .crm-month-day,
[data-crm-theme="dark"] .dir-classic .crm-month-week-days > *,
[data-crm-theme="dark"] .dir-classic .crm-calendar-cell,
[data-crm-theme="dark"] .dir-classic .crm-week-day-column,
[data-crm-theme="dark"] .dir-classic .crm-week-day-body {
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 31px,
      rgba(148, 163, 184, 0.10) 32px,
      transparent 33px,
      transparent 63px,
      rgba(148, 163, 184, 0.14) 64px
    ),
    var(--bg-elevated) !important;
  background-color: var(--bg-elevated) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

[data-crm-theme="dark"] .dir-classic .crm-calendar-month-grid .crm-calendar-day,
[data-crm-theme="dark"] .dir-classic .crm-calendar-grid .crm-calendar-day,
[data-crm-theme="dark"] .dir-classic .crm-month-day,
[data-crm-theme="dark"] .dir-classic .crm-month-week-days > * {
  background-image: none !important;
}

[data-crm-theme="dark"] .dir-classic .crm-calendar-month-grid .crm-calendar-day.is-muted,
[data-crm-theme="dark"] .dir-classic .crm-calendar-grid .crm-calendar-day.is-muted,
[data-crm-theme="dark"] .dir-classic .crm-calendar-day.is-muted,
[data-crm-theme="dark"] .dir-classic .crm-month-day.is-muted,
[data-crm-theme="dark"] .dir-classic .crm-month-week-days > .is-muted {
  background: #111827 !important;
  background-color: #111827 !important;
  color: var(--text-tertiary) !important;
}

[data-crm-theme="dark"] .dir-classic .crm-calendar-list,
[data-crm-theme="dark"] .dir-classic .crm-calendar-list-item,
[data-crm-theme="dark"] .dir-classic .crm-calendar-side-card,
[data-crm-theme="dark"] .dir-classic .crm-calendar-controls-card,
[data-crm-theme="dark"] .dir-classic .crm-calendar-empty,
[data-crm-theme="dark"] .dir-classic .crm-calendar-detail-card,
[data-crm-theme="dark"] .dir-classic .crm-calendar-event-modal,
[data-crm-theme="dark"] .dir-classic .crm-calendar-event-details,
[data-crm-theme="dark"] .dir-classic .crm-calendar-event-card,
[data-crm-theme="dark"] .dir-classic .crm-quick-slot-panel,
[data-crm-theme="dark"] .dir-classic .crm-quick-slot-day,
[data-crm-theme="dark"] .dir-classic .crm-quick-slot,
[data-crm-theme="dark"] .dir-classic .crm-free-busy-card,
[data-crm-theme="dark"] .dir-classic .crm-event-summary,
[data-crm-theme="dark"] .dir-classic .crm-event-conflict-box {
  background: var(--bg-elevated) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

[data-crm-theme="dark"] .dir-classic .crm-quick-slot:hover,
[data-crm-theme="dark"] .dir-classic .crm-quick-slot:focus,
[data-crm-theme="dark"] .dir-classic .crm-quick-slot.is-selected,
[data-crm-theme="dark"] .dir-classic .crm-calendar-list-item:hover,
[data-crm-theme="dark"] .dir-classic .crm-calendar-event-card:hover {
  background: var(--bg-hover) !important;
  border-color: var(--accent) !important;
  color: var(--text) !important;
}

[data-crm-theme="dark"] .dir-classic .crm-quick-slot.is-selected {
  box-shadow: inset 0 0 0 1px var(--accent) !important;
}

[data-crm-theme="dark"] .dir-classic .crm-card,
[data-crm-theme="dark"] .dir-classic .crm-card-flat,
[data-crm-theme="dark"] .dir-classic .crm-panel,
[data-crm-theme="dark"] .dir-classic .crm-section-card,
[data-crm-theme="dark"] .dir-classic .crm-stat-card,
[data-crm-theme="dark"] .dir-classic .crm-metric-card,
[data-crm-theme="dark"] .dir-classic .crm-filter-card,
[data-crm-theme="dark"] .dir-classic .crm-directory-shell,
[data-crm-theme="dark"] .dir-classic .crm-directory-row,
[data-crm-theme="dark"] .dir-classic .crm-directory-table,
[data-crm-theme="dark"] .dir-classic .crm-empty-state,
[data-crm-theme="dark"] .dir-classic .crm-form-section,
[data-crm-theme="dark"] .dir-classic .crm-form-panel,
[data-crm-theme="dark"] .dir-classic .crm-upload-zone,
[data-crm-theme="dark"] .dir-classic .crm-rich-editor,
[data-crm-theme="dark"] .dir-classic .crm-rich-editor-body,
[data-crm-theme="dark"] .dir-classic .crm-rich-editor-preview,
[data-crm-theme="dark"] .dir-classic .crm-preview-panel,
[data-crm-theme="dark"] .dir-classic .crm-attachment-list,
[data-crm-theme="dark"] .dir-classic .crm-ai-modal-answer,
[data-crm-theme="dark"] .dir-classic .crm-ai-answer,
[data-crm-theme="dark"] .dir-classic .crm-json-context,
[data-crm-theme="dark"] .dir-classic details,
[data-crm-theme="dark"] .dir-classic summary {
  background: var(--bg-elevated) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

[data-crm-theme="dark"] .dir-classic .crm-rich-editor-toolbar,
[data-crm-theme="dark"] .dir-classic .crm-rich-editor-variable-row,
[data-crm-theme="dark"] .dir-classic .crm-variable-chip-row,
[data-crm-theme="dark"] .dir-classic .crm-table-header,
[data-crm-theme="dark"] .dir-classic .crm-directory-table thead th,
[data-crm-theme="dark"] .dir-classic .crm-tabs,
[data-crm-theme="dark"] .dir-classic .crm-tab-list,
[data-crm-theme="dark"] .dir-classic .crm-tab-header,
[data-crm-theme="dark"] .dir-classic .crm-admin-card-highlight {
  background: var(--bg-sunken) !important;
  border-color: var(--border) !important;
  color: var(--text-secondary) !important;
}

[data-crm-theme="dark"] .dir-classic .form-check,
[data-crm-theme="dark"] .dir-classic .custom-control,
[data-crm-theme="dark"] .dir-classic .custom-checkbox,
[data-crm-theme="dark"] .dir-classic .crm-checkbox-row,
[data-crm-theme="dark"] .dir-classic .crm-switch-row,
[data-crm-theme="dark"] .dir-classic .crm-admin-flag,
[data-crm-theme="dark"] .dir-classic .crm-admin-flag span,
[data-crm-theme="dark"] .dir-classic .crm-setting-box,
[data-crm-theme="dark"] .dir-classic .crm-setting-panel,
[data-crm-theme="dark"] .dir-classic .crm-help-card,
[data-crm-theme="dark"] .dir-classic .crm-warning-card,
[data-crm-theme="dark"] .dir-classic .crm-danger-card,
[data-crm-theme="dark"] .dir-classic .crm-info-card {
  background: var(--bg-elevated) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

[data-crm-theme="dark"] .dir-classic input[type="file"],
[data-crm-theme="dark"] .dir-classic input[type="color"] {
  background: var(--bg-sunken) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

[data-crm-theme="dark"] .dir-classic input[type="file"]::file-selector-button {
  background: var(--bg-hover) !important;
  border: 0 !important;
  color: var(--text) !important;
}

[data-crm-theme="dark"] .dir-classic .btn-light,
[data-crm-theme="dark"] .dir-classic .btn-outline-secondary,
[data-crm-theme="dark"] .dir-classic .btn-outline-dark,
[data-crm-theme="dark"] .dir-classic .dropdown-item,
[data-crm-theme="dark"] .dir-classic .page-link {
  background: var(--bg-elevated) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

[data-crm-theme="dark"] .dir-classic .btn-light:hover,
[data-crm-theme="dark"] .dir-classic .btn-outline-secondary:hover,
[data-crm-theme="dark"] .dir-classic .btn-outline-dark:hover,
[data-crm-theme="dark"] .dir-classic .dropdown-item:hover,
[data-crm-theme="dark"] .dir-classic .dropdown-item:focus,
[data-crm-theme="dark"] .dir-classic .page-link:hover {
  background: var(--bg-hover) !important;
  border-color: var(--border-strong) !important;
  color: var(--text) !important;
}

[data-crm-theme="dark"] .dir-classic .text-muted,
[data-crm-theme="dark"] .dir-classic .small,
[data-crm-theme="dark"] .dir-classic small,
[data-crm-theme="dark"] .dir-classic .help-text,
[data-crm-theme="dark"] .dir-classic .form-text,
[data-crm-theme="dark"] .dir-classic .crm-muted,
[data-crm-theme="dark"] .dir-classic .crm-subtitle,
[data-crm-theme="dark"] .dir-classic .crm-meta,
[data-crm-theme="dark"] .dir-classic .crm-card-subtitle,
[data-crm-theme="dark"] .dir-classic .crm-list-note {
  color: var(--text-secondary) !important;
}

[data-crm-theme="dark"] .dir-classic .badge-light,
[data-crm-theme="dark"] .dir-classic .badge-secondary,
[data-crm-theme="dark"] .dir-classic .crm-badge-muted {
  background: var(--bg-hover) !important;
  color: var(--text-secondary) !important;
}

[data-crm-theme="dark"] .dir-classic .crm-alert-soft-danger,
[data-crm-theme="dark"] .dir-classic .crm-alert-soft-warning,
[data-crm-theme="dark"] .dir-classic .alert-warning,
[data-crm-theme="dark"] .dir-classic .alert-danger {
  background: rgba(127, 29, 29, 0.18) !important;
  border-color: rgba(248, 113, 113, 0.32) !important;
  color: #fecaca !important;
}

[data-crm-theme="dark"] .dir-classic .alert-success,
[data-crm-theme="dark"] .dir-classic .crm-alert-soft-success {
  background: rgba(6, 78, 59, 0.25) !important;
  border-color: rgba(52, 211, 153, 0.3) !important;
  color: #bbf7d0 !important;
}

/* Dark mode pass for framework cards/tables and remaining light CRM blocks. */
[data-crm-theme="dark"] .dir-classic .card,
[data-crm-theme="dark"] .dir-classic .card-body,
[data-crm-theme="dark"] .dir-classic .card-header,
[data-crm-theme="dark"] .dir-classic .card-action,
[data-crm-theme="dark"] .dir-classic .table-responsive,
[data-crm-theme="dark"] .dir-classic .modal-content,
[data-crm-theme="dark"] .dir-classic .modal-header,
[data-crm-theme="dark"] .dir-classic .modal-body,
[data-crm-theme="dark"] .dir-classic .modal-footer,
[data-crm-theme="dark"] .dir-classic .crm-modal-shell,
[data-crm-theme="dark"] .dir-classic .crm-modal-card {
  background: var(--bg-elevated) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

[data-crm-theme="dark"] .dir-classic .table,
[data-crm-theme="dark"] .dir-classic .table th,
[data-crm-theme="dark"] .dir-classic .table td,
[data-crm-theme="dark"] .dir-classic .crm-table,
[data-crm-theme="dark"] .dir-classic .crm-table th,
[data-crm-theme="dark"] .dir-classic .crm-table td {
  background: transparent !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

[data-crm-theme="dark"] .dir-classic .table thead th,
[data-crm-theme="dark"] .dir-classic .crm-table thead th,
[data-crm-theme="dark"] .dir-classic .table-light th,
[data-crm-theme="dark"] .dir-classic .table-light td {
  background: var(--bg-sunken) !important;
  color: var(--text-secondary) !important;
}

[data-crm-theme="dark"] .dir-classic .table-hover tbody tr:hover,
[data-crm-theme="dark"] .dir-classic .table-hover tbody tr:hover td,
[data-crm-theme="dark"] .dir-classic .crm-directory-table tbody tr:hover,
[data-crm-theme="dark"] .dir-classic .crm-directory-table tbody tr:hover td {
  background: var(--bg-hover) !important;
  color: var(--text) !important;
}

[data-crm-theme="dark"] .dir-classic .crm-theme-toggle {
  width: 36px !important;
  height: 36px !important;
  background: #171a23 !important;
  border-color: #2f3a52 !important;
  color: #c7d2fe !important;
}

[data-crm-theme="dark"] .dir-classic .crm-theme-toggle.is-active,
[data-crm-theme="dark"] .dir-classic .crm-theme-toggle:hover,
[data-crm-theme="dark"] .dir-classic .crm-theme-toggle:focus {
  background: #1f2440 !important;
  border-color: #818cf8 !important;
  color: #eef2ff !important;
}

[data-crm-theme="dark"] .dir-classic .crm-calendar-weekday,
[data-crm-theme="dark"] .dir-classic .crm-calendar-day,
[data-crm-theme="dark"] .dir-classic .crm-calendar-day.is-muted,
[data-crm-theme="dark"] .dir-classic .crm-week-header,
[data-crm-theme="dark"] .dir-classic .crm-week-time-column,
[data-crm-theme="dark"] .dir-classic .crm-week-hour-label,
[data-crm-theme="dark"] .dir-classic .crm-week-time-label,
[data-crm-theme="dark"] .dir-classic .crm-week-all-day-row,
[data-crm-theme="dark"] .dir-classic .crm-week-all-day-cell,
[data-crm-theme="dark"] .dir-classic .crm-month-week-header,
[data-crm-theme="dark"] .dir-classic .crm-month-week-day-header,
[data-crm-theme="dark"] .dir-classic .crm-calendar-header-cell {
  background: var(--bg-sunken) !important;
  border-color: var(--border) !important;
  color: var(--text-secondary) !important;
}

[data-crm-theme="dark"] .dir-classic .crm-calendar-day:not(.is-muted),
[data-crm-theme="dark"] .dir-classic .crm-week-day-column,
[data-crm-theme="dark"] .dir-classic .crm-week-slot,
[data-crm-theme="dark"] .dir-classic .crm-week-hour-row {
  background: var(--bg-elevated) !important;
}

[data-crm-theme="dark"] .dir-classic .crm-calendar-day:hover,
[data-crm-theme="dark"] .dir-classic .crm-week-slot:hover,
[data-crm-theme="dark"] .dir-classic .crm-week-hour-row:hover {
  background: var(--bg-hover) !important;
}

[data-crm-theme="dark"] .dir-classic .crm-dashboard-queue-group,
[data-crm-theme="dark"] .dir-classic .crm-dashboard-queue-group > strong,
[data-crm-theme="dark"] .dir-classic .crm-muted-panel,
[data-crm-theme="dark"] .dir-classic .crm-model-option,
[data-crm-theme="dark"] .dir-classic .crm-ai-audit-response,
[data-crm-theme="dark"] .dir-classic .crm-ai-audit-context,
[data-crm-theme="dark"] .dir-classic .crm-ai-audit-context pre,
[data-crm-theme="dark"] .dir-classic .crm-action-stat-strip,
[data-crm-theme="dark"] .dir-classic .crm-action-stat-item,
[data-crm-theme="dark"] .dir-classic .crm-action-company-tabs-card .crm-company-tabs,
[data-crm-theme="dark"] .dir-classic .crm-action-history-note,
[data-crm-theme="dark"] .dir-classic .crm-switch-field,
[data-crm-theme="dark"] .dir-classic .crm-visible-checkbox > span,
[data-crm-theme="dark"] .dir-classic .crm-ai-question-chip,
[data-crm-theme="dark"] .dir-classic .crm-variable-chip-row,
[data-crm-theme="dark"] .dir-classic .crm-editor-toolbar,
[data-crm-theme="dark"] .dir-classic .crm-editor-toolbar button,
[data-crm-theme="dark"] .dir-classic .crm-editor-header-actions,
[data-crm-theme="dark"] .dir-classic .crm-work-schedule-table tr.is-day-off td {
  background: var(--bg-elevated) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
  box-shadow: none !important;
}

[data-crm-theme="dark"] .dir-classic .crm-dashboard-queue-group > strong,
[data-crm-theme="dark"] .dir-classic .crm-ai-audit-context pre,
[data-crm-theme="dark"] .dir-classic .crm-variable-chip-row,
[data-crm-theme="dark"] .dir-classic .crm-editor-toolbar,
[data-crm-theme="dark"] .dir-classic .crm-editor-toolbar button,
[data-crm-theme="dark"] .dir-classic .crm-work-schedule-table tr.is-day-off td {
  background: var(--bg-sunken) !important;
  color: var(--text-secondary) !important;
}

[data-crm-theme="dark"] .dir-classic .crm-switch-field:hover,
[data-crm-theme="dark"] .dir-classic .crm-ai-question-chip:hover,
[data-crm-theme="dark"] .dir-classic .crm-ai-question-chip:focus,
[data-crm-theme="dark"] .dir-classic .crm-editor-toolbar button:hover,
[data-crm-theme="dark"] .dir-classic .crm-editor-toolbar button:focus {
  background: var(--bg-hover) !important;
  border-color: var(--accent) !important;
  color: var(--text) !important;
}

[data-crm-theme="dark"] .dir-classic .crm-visible-checkbox input:checked + span {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: var(--accent-text) !important;
}

[data-crm-theme="dark"] .dir-classic .form-control,
[data-crm-theme="dark"] .dir-classic .custom-select,
[data-crm-theme="dark"] .dir-classic select,
[data-crm-theme="dark"] .dir-classic textarea,
[data-crm-theme="dark"] .dir-classic input[type="text"],
[data-crm-theme="dark"] .dir-classic input[type="email"],
[data-crm-theme="dark"] .dir-classic input[type="number"],
[data-crm-theme="dark"] .dir-classic input[type="password"],
[data-crm-theme="dark"] .dir-classic input[type="search"],
[data-crm-theme="dark"] .dir-classic input[type="tel"],
[data-crm-theme="dark"] .dir-classic input[type="url"],
[data-crm-theme="dark"] .dir-classic input[type="date"],
[data-crm-theme="dark"] .dir-classic input[type="datetime-local"],
[data-crm-theme="dark"] .dir-classic input[type="time"] {
  background: var(--bg-sunken) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

[data-crm-theme="dark"] .dir-classic .form-control:focus,
[data-crm-theme="dark"] .dir-classic .custom-select:focus,
[data-crm-theme="dark"] .dir-classic select:focus,
[data-crm-theme="dark"] .dir-classic textarea:focus,
[data-crm-theme="dark"] .dir-classic input:focus {
  background: var(--bg-elevated) !important;
  border-color: var(--accent) !important;
  color: var(--text) !important;
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.16) !important;
}

[data-crm-theme="dark"] .dir-classic .form-control::placeholder,
[data-crm-theme="dark"] .dir-classic input::placeholder,
[data-crm-theme="dark"] .dir-classic textarea::placeholder {
  color: var(--text-tertiary) !important;
}

[data-crm-theme="dark"] .dir-classic .form-control:disabled,
[data-crm-theme="dark"] .dir-classic .form-control[readonly],
[data-crm-theme="dark"] .dir-classic input:disabled,
[data-crm-theme="dark"] .dir-classic input[readonly],
[data-crm-theme="dark"] .dir-classic select:disabled,
[data-crm-theme="dark"] .dir-classic textarea:disabled,
[data-crm-theme="dark"] .dir-classic textarea[readonly] {
  background: #111827 !important;
  color: var(--text-tertiary) !important;
  opacity: 1 !important;
}

[data-crm-theme="dark"] .dir-classic .alert,
[data-crm-theme="dark"] .dir-classic .alert-info,
[data-crm-theme="dark"] .dir-classic .alert-light,
[data-crm-theme="dark"] .dir-classic .alert-secondary {
  background: var(--bg-elevated) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

[data-crm-theme="dark"] .dir-classic .dropdown-menu,
[data-crm-theme="dark"] .dir-classic .notif-box,
[data-crm-theme="dark"] .dir-classic .quick-actions,
[data-crm-theme="dark"] .dir-classic .user-switcher-menu {
  background: var(--bg-elevated) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.32) !important;
}

[data-crm-theme="dark"] .dir-classic .dropdown-divider {
  border-color: var(--border) !important;
}

[data-crm-theme="dark"] .dir-classic .user-box,
[data-crm-theme="dark"] .dir-classic .user-box:hover,
[data-crm-theme="dark"] .dir-classic .user-box:focus,
[data-crm-theme="dark"] .dir-classic .dropdown-item.active,
[data-crm-theme="dark"] .dir-classic .dropdown-item:active {
  background: var(--bg-hover) !important;
  color: var(--text) !important;
}

/* Final dark-mode hardening for legacy Ready/Bootstrap surfaces. */
html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle {
  align-items: center !important;
  background: #171a23 !important;
  border: 1px solid #3f4a66 !important;
  border-radius: 8px !important;
  color: #c7d2fe !important;
  display: inline-flex !important;
  height: 36px !important;
  justify-content: center !important;
  padding: 0 !important;
  width: 36px !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle.is-active,
html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle:focus {
  background: #1f2440 !important;
  border-color: #818cf8 !important;
  color: #eef2ff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle i {
  font-size: 18px !important;
  line-height: 1 !important;
}

html[data-crm-theme="dark"] body.dir-classic .table,
html[data-crm-theme="dark"] body.dir-classic .table > :not(caption) > * > *,
html[data-crm-theme="dark"] body.dir-classic .crm-directory-table,
html[data-crm-theme="dark"] body.dir-classic .crm-directory-table th,
html[data-crm-theme="dark"] body.dir-classic .crm-directory-table td,
html[data-crm-theme="dark"] body.dir-classic .crm-action-list-table,
html[data-crm-theme="dark"] body.dir-classic .crm-action-list-table th,
html[data-crm-theme="dark"] body.dir-classic .crm-action-list-table td {
  background-color: #15181f !important;
  border-color: #2a3140 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .table thead th,
html[data-crm-theme="dark"] body.dir-classic .crm-directory-table thead th,
html[data-crm-theme="dark"] body.dir-classic .crm-action-list-table thead th,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-weekday,
html[data-crm-theme="dark"] body.dir-classic .crm-week-corner,
html[data-crm-theme="dark"] body.dir-classic .crm-week-day-head,
html[data-crm-theme="dark"] body.dir-classic .crm-week-hours {
  background-color: #090b0f !important;
  color: #9ca3af !important;
}

html[data-crm-theme="dark"] body.dir-classic .table tbody tr:hover > *,
html[data-crm-theme="dark"] body.dir-classic .crm-directory-table tbody tr:hover > *,
html[data-crm-theme="dark"] body.dir-classic .crm-action-list-table tbody tr:hover > * {
  background-color: #1d2430 !important;
  color: #f8fafc !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-grid,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-row,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days,
html[data-crm-theme="dark"] body.dir-classic .crm-week-planner,
html[data-crm-theme="dark"] body.dir-classic .crm-week-planner-card,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-workspace {
  background: #2a3140 !important;
  border-color: #2a3140 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-grid .crm-calendar-day,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-cell,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days > *,
html[data-crm-theme="dark"] body.dir-classic .crm-week-day-column,
html[data-crm-theme="dark"] body.dir-classic .crm-week-day-body {
  background: #15181f !important;
  border-color: #2a3140 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day.is-muted,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-grid .crm-calendar-day.is-muted,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-muted {
  background: #10131a !important;
  color: #6b7280 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-week-day-column {
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 31px,
      rgba(148, 163, 184, 0.10) 32px,
      transparent 33px,
      transparent 63px,
      rgba(148, 163, 184, 0.14) 64px
    ),
    #15181f !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day:focus-within,
html[data-crm-theme="dark"] body.dir-classic .crm-week-day-column:hover {
  background: #1d2430 !important;
  box-shadow: inset 0 0 0 1px rgba(129, 140, 248, 0.62) !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-week-offhours,
html[data-crm-theme="dark"] body.dir-classic .crm-week-day-column.is-day-off {
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(148, 163, 184, 0.10),
      rgba(148, 163, 184, 0.10) 8px,
      rgba(148, 163, 184, 0.03) 8px,
      rgba(148, 163, 184, 0.03) 16px
    ),
    #10131a !important;
  color: #9ca3af !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-form-card,
html[data-crm-theme="dark"] body.dir-classic .crm-form-section,
html[data-crm-theme="dark"] body.dir-classic .crm-admin-card,
html[data-crm-theme="dark"] body.dir-classic .crm-settings-panel,
html[data-crm-theme="dark"] body.dir-classic .crm-switch-field,
html[data-crm-theme="dark"] body.dir-classic .crm-attachment-card,
html[data-crm-theme="dark"] body.dir-classic .crm-rich-editor,
html[data-crm-theme="dark"] body.dir-classic .crm-rich-editor [contenteditable],
html[data-crm-theme="dark"] body.dir-classic .crm-rich-editor textarea,
html[data-crm-theme="dark"] body.dir-classic .crm-action-company-tabs-card,
html[data-crm-theme="dark"] body.dir-classic .crm-action-company-tabs-card .crm-company-tabs,
html[data-crm-theme="dark"] body.dir-classic .crm-action-company-card,
html[data-crm-theme="dark"] body.dir-classic .crm-company-tab-panel,
html[data-crm-theme="dark"] body.dir-classic .crm-company-tab-card,
html[data-crm-theme="dark"] body.dir-classic .crm-company-tab-section,
html[data-crm-theme="dark"] body.dir-classic .crm-dashboard-queue-group,
html[data-crm-theme="dark"] body.dir-classic .crm-dashboard-queue-group > strong,
html[data-crm-theme="dark"] body.dir-classic .crm-muted-panel,
html[data-crm-theme="dark"] body.dir-classic .crm-model-option,
html[data-crm-theme="dark"] body.dir-classic .crm-ai-audit-response,
html[data-crm-theme="dark"] body.dir-classic .crm-ai-audit-context,
html[data-crm-theme="dark"] body.dir-classic .crm-ai-audit-context pre {
  background: #15181f !important;
  border-color: #2a3140 !important;
  color: #e5e7eb !important;
  box-shadow: none !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-dashboard-queue-group > strong,
html[data-crm-theme="dark"] body.dir-classic .crm-rich-editor-toolbar,
html[data-crm-theme="dark"] body.dir-classic .crm-editor-toolbar,
html[data-crm-theme="dark"] body.dir-classic .crm-variable-chip-row {
  background: #090b0f !important;
  border-color: #2a3140 !important;
  color: #9ca3af !important;
}

html[data-crm-theme="dark"] body.dir-classic input[type="file"] {
  background: #090b0f !important;
  border-color: #2a3140 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic input[type="file"]::file-selector-button {
  background: #1d2430 !important;
  border: 1px solid #2a3140 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle i,
body.dir-classic .crm-theme-toggle i {
  color: currentColor !important;
  display: inline-block !important;
  font-size: 18px !important;
  line-height: 1 !important;
  opacity: 1 !important;
}

body.dir-classic .crm-theme-toggle [data-crm-theme-icon]::before {
  content: "\263E" !important;
  font-family: Arial, sans-serif !important;
  font-size: 18px !important;
  font-weight: 700 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle [data-crm-theme-icon]::before {
  content: "\2600" !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-index-search {
  background: #15181f !important;
  border: 1px solid #2a3140 !important;
  box-shadow: none !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-index-search:focus-within {
  border-color: #818cf8 !important;
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.16) !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-index-search input,
html[data-crm-theme="dark"] body.dir-classic .crm-index-search .form-control {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-index-search input::placeholder,
html[data-crm-theme="dark"] body.dir-classic .crm-index-search .form-control::placeholder {
  color: #94a3b8 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day-number,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day-number {
  align-items: center !important;
  background: transparent !important;
  border: 0 !important;
  color: #cbd5e1 !important;
  display: inline-flex !important;
  height: 26px !important;
  justify-content: center !important;
  min-width: 26px !important;
  opacity: 1 !important;
  overflow: visible !important;
  padding: 0 !important;
  position: relative !important;
  text-indent: 0 !important;
  z-index: 4 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day.is-muted .crm-calendar-day-number,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-muted .crm-calendar-day-number {
  color: #64748b !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day.is-today .crm-calendar-day-number,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-today .crm-calendar-day-number {
  background: #818cf8 !important;
  border-radius: 999px !important;
  box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.16) !important;
  color: #ffffff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day.is-today {
  box-shadow: inset 0 0 0 2px rgba(129, 140, 248, 0.9) !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-month-segment-layer {
  z-index: 2 !important;
}

html[data-crm-theme="dark"] body.dir-classic .modal-content,
html[data-crm-theme="dark"] body.dir-classic .modal-header,
html[data-crm-theme="dark"] body.dir-classic .modal-body,
html[data-crm-theme="dark"] body.dir-classic .modal-footer {
  background: #15181f !important;
  border-color: #2a3140 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .modal .card,
html[data-crm-theme="dark"] body.dir-classic .modal .crm-form-section,
html[data-crm-theme="dark"] body.dir-classic .modal .crm-muted-panel,
html[data-crm-theme="dark"] body.dir-classic .modal .crm-offer-mail-panel {
  background: #171a23 !important;
  border-color: #2a3140 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .modal .crm-offer-mail-details[hidden] {
  display: none !important;
}

body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon {
  align-items: center !important;
  color: currentColor !important;
  display: inline-flex !important;
  font-family: Arial, sans-serif !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  height: 20px !important;
  justify-content: center !important;
  line-height: 1 !important;
  width: 20px !important;
}

body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon-light {
  display: none !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon-dark {
  display: none !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon-light {
  display: inline-flex !important;
}

body.dir-classic .crm-theme-toggle [data-crm-theme-icon]::before,
html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle [data-crm-theme-icon]::before {
  content: none !important;
  display: none !important;
}

body.dir-classic .crm-month-segment-layer {
  pointer-events: none !important;
}

body.dir-classic .crm-month-segment-layer .is-calendar-event,
body.dir-classic .is-calendar-event {
  pointer-events: auto !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-week {
  background: #15181f !important;
  border-color: #2a3140 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day.is-muted {
  background: #202530 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day-number,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day > .crm-calendar-day-number {
  color: #dbeafe !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 26px !important;
  opacity: 1 !important;
  text-shadow: none !important;
  visibility: visible !important;
  z-index: 12 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day-number::before,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day-number::after,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day > .crm-calendar-day-number::before,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day > .crm-calendar-day-number::after {
  content: none !important;
  display: none !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day.is-muted .crm-calendar-day-number {
  color: #94a3b8 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-offer-attachments,
html[data-crm-theme="dark"] body.dir-classic .crm-help-panel,
html[data-crm-theme="dark"] body.dir-classic .crm-checkbox-card,
html[data-crm-theme="dark"] body.dir-classic .crm-form-hint-card {
  background: #15181f !important;
  border-color: #2a3140 !important;
  color: #e5e7eb !important;
  box-shadow: none !important;
}

html[data-crm-theme="dark"] body.dir-classic input::selection,
html[data-crm-theme="dark"] body.dir-classic textarea::selection,
html[data-crm-theme="dark"] body.dir-classic [contenteditable]::selection {
  background: #4338ca !important;
  color: #ffffff !important;
}

body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon svg {
  display: block !important;
  fill: none !important;
  height: 18px !important;
  stroke: currentColor !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  stroke-width: 2 !important;
  width: 18px !important;
}

body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon-light {
  display: none !important;
}

body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon-dark {
  display: inline-flex !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon-dark {
  display: none !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon-light {
  display: inline-flex !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-week,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day {
  background: #15181f !important;
  border-color: #2a3140 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day.is-muted {
  background: #202530 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-month-week-row,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days,
html[data-crm-theme="dark"] body.dir-classic .crm-month-segment-layer {
  background: transparent !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day-number,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day .crm-calendar-day-number,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day > .crm-calendar-day-number {
  background: transparent !important;
  color: #e5e7eb !important;
  -webkit-text-fill-color: #e5e7eb !important;
  opacity: 1 !important;
  position: relative !important;
  visibility: visible !important;
  z-index: 20 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day.is-muted .crm-calendar-day-number,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-muted .crm-calendar-day-number {
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day.is-today .crm-calendar-day-number,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-today .crm-calendar-day-number {
  background: #818cf8 !important;
  border-radius: 999px !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-index-search input,
html[data-crm-theme="dark"] body.dir-classic .crm-index-search .form-control,
html[data-crm-theme="dark"] body.dir-classic input.form-control,
html[data-crm-theme="dark"] body.dir-classic textarea.form-control,
html[data-crm-theme="dark"] body.dir-classic select.form-control,
html[data-crm-theme="dark"] body.dir-classic .custom-select {
  background-color: #090b0f !important;
  border-color: #303848 !important;
  color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc !important;
}

html[data-crm-theme="dark"] body.dir-classic input.form-control::placeholder,
html[data-crm-theme="dark"] body.dir-classic textarea.form-control::placeholder {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
}

/* Final dark-mode hardening: keep this block last. */
body.dir-classic .crm-theme-toggle {
  align-items: center !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  height: 42px !important;
  justify-content: center !important;
  min-height: 42px !important;
  min-width: 42px !important;
  padding: 0 !important;
  width: 42px !important;
}

body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon {
  display: none !important;
}

body.dir-classic .crm-theme-toggle::before {
  color: #24324a !important;
  content: "\263E" !important;
  display: block !important;
  font-family: Arial, sans-serif !important;
  font-size: 22px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle::before {
  color: #c7d2fe !important;
  content: "\2600" !important;
}

body.dir-classic .crm-calendar-day,
body.dir-classic .crm-week-day-column {
  cursor: pointer;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid {
  background: #15181f !important;
  border-color: #2a3140 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-week,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-row,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days {
  background: transparent !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day {
  background: #15181f !important;
  border-color: #2a3140 !important;
  color: #e5e7eb !important;
  overflow: hidden !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day.is-muted,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-muted {
  background: #202530 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day::before,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day::after,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day::before,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day::after {
  content: none !important;
  display: none !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day-number,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day .crm-calendar-day-number,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day > .crm-calendar-day-number {
  align-items: center !important;
  background: transparent !important;
  border: 0 !important;
  color: #e5e7eb !important;
  display: inline-flex !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  height: 26px !important;
  justify-content: center !important;
  line-height: 26px !important;
  min-width: 26px !important;
  opacity: 1 !important;
  overflow: visible !important;
  position: relative !important;
  text-indent: 0 !important;
  visibility: visible !important;
  -webkit-text-fill-color: #e5e7eb !important;
  z-index: 40 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day.is-muted .crm-calendar-day-number,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-muted .crm-calendar-day-number {
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day.is-today .crm-calendar-day-number,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-today .crm-calendar-day-number {
  background: #818cf8 !important;
  border-radius: 999px !important;
  box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.18) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day.is-today {
  box-shadow: inset 0 0 0 2px rgba(129, 140, 248, 0.9) !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-month-segment-layer {
  background: transparent !important;
  pointer-events: none !important;
}

/* Dark-mode stability pass: final overrides after historical emergency blocks. */
body.dir-classic .crm-theme-toggle::before,
html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle::before {
  content: none !important;
  display: none !important;
}

body.dir-classic .crm-theme-toggle {
  background: #f8fafc !important;
  border: 1px solid #d8dee9 !important;
  box-shadow: none !important;
  color: #334155 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle {
  background: #1d1b4f !important;
  border-color: #6366f1 !important;
  color: #c7d2fe !important;
}

body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon {
  align-items: center !important;
  color: inherit !important;
  display: none !important;
  height: 18px !important;
  justify-content: center !important;
  width: 18px !important;
}

body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon svg {
  display: block !important;
  fill: none !important;
  height: 18px !important;
  stroke: currentColor !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  stroke-width: 2 !important;
  width: 18px !important;
}

body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon-dark {
  display: inline-flex !important;
}

body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon-light {
  display: none !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon-dark {
  display: none !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon-light {
  display: inline-flex !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-index-search,
html[data-crm-theme="dark"] body.dir-classic .crm-filter-panel,
html[data-crm-theme="dark"] body.dir-classic .crm-table-wrap,
html[data-crm-theme="dark"] body.dir-classic .crm-table,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-toolbar,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-filter,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-agenda,
html[data-crm-theme="dark"] body.dir-classic .crm-week-planner-card,
html[data-crm-theme="dark"] body.dir-classic .crm-modal-shell,
html[data-crm-theme="dark"] body.dir-classic .modal-content,
html[data-crm-theme="dark"] body.dir-classic .modal-body,
html[data-crm-theme="dark"] body.dir-classic .modal-footer {
  background: #15181f !important;
  border-color: #2a3140 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-index-search .input-group,
html[data-crm-theme="dark"] body.dir-classic .input-group,
html[data-crm-theme="dark"] body.dir-classic .input-group-text {
  background: #090b0f !important;
  border-color: #303848 !important;
  color: #94a3b8 !important;
}

html[data-crm-theme="dark"] body.dir-classic input,
html[data-crm-theme="dark"] body.dir-classic textarea,
html[data-crm-theme="dark"] body.dir-classic select,
html[data-crm-theme="dark"] body.dir-classic .form-control,
html[data-crm-theme="dark"] body.dir-classic .custom-select {
  background-color: #090b0f !important;
  border-color: #303848 !important;
  color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc !important;
}

html[data-crm-theme="dark"] body.dir-classic input::placeholder,
html[data-crm-theme="dark"] body.dir-classic textarea::placeholder {
  color: #94a3b8 !important;
  opacity: 1 !important;
  -webkit-text-fill-color: #94a3b8 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-kpi-card,
html[data-crm-theme="dark"] body.dir-classic .crm-stat-card,
html[data-crm-theme="dark"] body.dir-classic .crm-metric-card,
html[data-crm-theme="dark"] body.dir-classic .crm-tab-metric,
html[data-crm-theme="dark"] body.dir-classic .crm-dashboard-queue-section,
html[data-crm-theme="dark"] body.dir-classic .crm-empty-state {
  background: #15181f !important;
  border-color: #2a3140 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-table thead th,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-weekday,
html[data-crm-theme="dark"] body.dir-classic .crm-week-day-head {
  background: #090b0f !important;
  border-color: #2a3140 !important;
  color: #a5b4fc !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day {
  background: #15181f !important;
  border-color: #2a3140 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day.is-muted,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-muted {
  background: #202530 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day-number,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day .crm-calendar-day-number,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day > .crm-calendar-day-number {
  color: #f8fafc !important;
  display: inline-flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  -webkit-text-fill-color: #f8fafc !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day.is-today .crm-calendar-day-number,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-today .crm-calendar-day-number {
  background: #818cf8 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Dark mode correction pass 2026-05-08. Keep this block last. */
body.dir-classic .crm-theme-toggle {
  align-items: center !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  height: 38px !important;
  justify-content: center !important;
  line-height: 1 !important;
  min-width: 38px !important;
  padding: 0 !important;
  width: 38px !important;
}

body.dir-classic .crm-theme-toggle::before,
body.dir-classic .crm-theme-toggle::after {
  content: none !important;
  display: none !important;
}

body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon {
  align-items: center !important;
  color: inherit !important;
  height: 18px !important;
  justify-content: center !important;
  opacity: 1 !important;
  visibility: visible !important;
  width: 18px !important;
}

body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon svg {
  display: block !important;
  height: 18px !important;
  overflow: visible !important;
  width: 18px !important;
}

body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon-dark svg path {
  fill: currentColor !important;
  stroke: none !important;
}

body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon-light svg circle,
body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon-light svg path {
  fill: none !important;
  stroke: currentColor !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  stroke-width: 2 !important;
}

body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon-dark {
  display: inline-flex !important;
}

body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon-light,
html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon-dark {
  display: none !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon-light {
  display: inline-flex !important;
}

body.dir-classic .crm-theme-toggle {
  background: #f8fafc !important;
  border: 1px solid #d8dee9 !important;
  color: #334155 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle {
  background: #15181f !important;
  border-color: #6366f1 !important;
  color: #c7d2fe !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle:focus {
  background: #1f2440 !important;
  border-color: #818cf8 !important;
  color: #eef2ff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days,
html[data-crm-theme="dark"] body.dir-classic .crm-month-segment-layer {
  background: transparent !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid {
  background-color: #2a3140 !important;
  border: 1px solid #2a3140 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-month-week-row {
  background: #2a3140 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day {
  background: #15181f !important;
  border-color: #2a3140 !important;
  color: #e5e7eb !important;
  min-height: 150px !important;
  overflow: hidden !important;
  position: relative !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day.is-muted,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-muted {
  background: #10131a !important;
  color: #94a3b8 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days .crm-calendar-day {
  padding: 106px 10px 10px !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day-number,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day .crm-calendar-day-number,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day > .crm-calendar-day-number {
  align-items: center !important;
  background: rgba(15, 23, 42, 0.02) !important;
  border: 0 !important;
  border-radius: 999px !important;
  color: #dbeafe !important;
  display: inline-flex !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  height: 26px !important;
  justify-content: center !important;
  left: 10px !important;
  line-height: 26px !important;
  min-width: 26px !important;
  opacity: 1 !important;
  padding: 0 7px !important;
  position: absolute !important;
  text-indent: 0 !important;
  top: 10px !important;
  visibility: visible !important;
  -webkit-text-fill-color: #dbeafe !important;
  z-index: 70 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days .crm-calendar-day .crm-calendar-day-number {
  top: 10px !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day.is-muted .crm-calendar-day-number,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-muted .crm-calendar-day-number {
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day.is-today .crm-calendar-day-number,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-today .crm-calendar-day-number {
  background: #818cf8 !important;
  box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.18) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day:focus-within {
  background: #1d2430 !important;
  box-shadow: inset 0 0 0 1px rgba(129, 140, 248, 0.65) !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-week-planner-card,
html[data-crm-theme="dark"] body.dir-classic .crm-week-planner,
html[data-crm-theme="dark"] body.dir-classic .crm-week-day-column,
html[data-crm-theme="dark"] body.dir-classic .crm-week-hours,
html[data-crm-theme="dark"] body.dir-classic .crm-week-time-column {
  background: #15181f !important;
  border-color: #2a3140 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-week-corner,
html[data-crm-theme="dark"] body.dir-classic .crm-week-day-head,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-weekday {
  background: #090b0f !important;
  border-color: #2a3140 !important;
  color: #a5b4fc !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-week-hour-label,
html[data-crm-theme="dark"] body.dir-classic .crm-week-time-label {
  background: #15181f !important;
  border-color: #2a3140 !important;
  color: #94a3b8 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-dashboard-queue-group > strong {
  background: #15181f !important;
  border-bottom: 1px solid #2a3140 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-dashboard-queue-group .crm-empty-mini,
html[data-crm-theme="dark"] body.dir-classic .crm-empty-mini,
html[data-crm-theme="dark"] body.dir-classic .crm-table tbody tr,
html[data-crm-theme="dark"] body.dir-classic .crm-table tbody td,
html[data-crm-theme="dark"] body.dir-classic .crm-directory-table tbody tr,
html[data-crm-theme="dark"] body.dir-classic .crm-directory-table tbody td,
html[data-crm-theme="dark"] body.dir-classic .crm-action-list-table tbody tr,
html[data-crm-theme="dark"] body.dir-classic .crm-action-list-table tbody td {
  background: #15181f !important;
  border-color: #2a3140 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-table tbody tr:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-table tbody tr:hover td,
html[data-crm-theme="dark"] body.dir-classic .crm-directory-table tbody tr:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-directory-table tbody tr:hover td,
html[data-crm-theme="dark"] body.dir-classic .crm-action-list-table tbody tr:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-action-list-table tbody tr:hover td {
  background: #1d2430 !important;
  color: #f8fafc !important;
}

html[data-crm-theme="dark"] body.dir-classic input,
html[data-crm-theme="dark"] body.dir-classic select,
html[data-crm-theme="dark"] body.dir-classic textarea,
html[data-crm-theme="dark"] body.dir-classic .form-control,
html[data-crm-theme="dark"] body.dir-classic .form-select,
html[data-crm-theme="dark"] body.dir-classic .custom-select {
  background-color: #10131a !important;
  border-color: #2a3140 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic input::placeholder,
html[data-crm-theme="dark"] body.dir-classic textarea::placeholder,
html[data-crm-theme="dark"] body.dir-classic .form-control::placeholder {
  color: #64748b !important;
  opacity: 1 !important;
}

html[data-crm-theme="dark"] body.dir-classic input:focus,
html[data-crm-theme="dark"] body.dir-classic select:focus,
html[data-crm-theme="dark"] body.dir-classic textarea:focus,
html[data-crm-theme="dark"] body.dir-classic .form-control:focus,
html[data-crm-theme="dark"] body.dir-classic .form-select:focus,
html[data-crm-theme="dark"] body.dir-classic .custom-select:focus {
  background-color: #10131a !important;
  border-color: #818cf8 !important;
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.18) !important;
  color: #f8fafc !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-card,
html[data-crm-theme="dark"] body.dir-classic .card,
html[data-crm-theme="dark"] body.dir-classic .crm-panel,
html[data-crm-theme="dark"] body.dir-classic .crm-form-card,
html[data-crm-theme="dark"] body.dir-classic .crm-modal-card,
html[data-crm-theme="dark"] body.dir-classic .crm-offer-editor,
html[data-crm-theme="dark"] body.dir-classic .crm-offer-preview,
html[data-crm-theme="dark"] body.dir-classic .crm-toolbar,
html[data-crm-theme="dark"] body.dir-classic .crm-summary-tile {
  background-color: #15181f !important;
  border-color: #2a3140 !important;
  color: #e5e7eb !important;
}

/* Dark mode final polish pass 2026-05-08. Keep this block last. */
body.dir-classic .crm-theme-toggle {
  align-items: center !important;
  background: #f8fafc !important;
  border: 1px solid #dbe3ef !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  color: #334155 !important;
  display: inline-flex !important;
  height: 38px !important;
  justify-content: center !important;
  min-width: 38px !important;
  padding: 0 !important;
  width: 38px !important;
}

body.dir-classic .crm-theme-toggle:hover,
body.dir-classic .crm-theme-toggle:focus {
  background: #eef2ff !important;
  border-color: #c7d2fe !important;
  color: #4338ca !important;
}

body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon {
  align-items: center !important;
  display: none !important;
  height: 100% !important;
  justify-content: center !important;
  width: 100% !important;
}

body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon i {
  color: currentColor !important;
  display: block !important;
  font-size: 18px !important;
  line-height: 1 !important;
}

body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon svg {
  display: none !important;
}

body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon-dark {
  display: inline-flex !important;
}

body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon-light {
  display: none !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle {
  background: #1b1f2a !important;
  border-color: #6366f1 !important;
  color: #c7d2fe !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle:focus {
  background: #26215f !important;
  border-color: #818cf8 !important;
  color: #ffffff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon-dark {
  display: none !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon-light {
  display: inline-flex !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-index-search,
html[data-crm-theme="dark"] body.dir-classic .crm-filter-panel,
html[data-crm-theme="dark"] body.dir-classic .crm-filter-card,
html[data-crm-theme="dark"] body.dir-classic .crm-table-wrap,
html[data-crm-theme="dark"] body.dir-classic .crm-table-shell,
html[data-crm-theme="dark"] body.dir-classic .crm-form-card,
html[data-crm-theme="dark"] body.dir-classic .crm-inline-panel,
html[data-crm-theme="dark"] body.dir-classic .crm-modal-form,
html[data-crm-theme="dark"] body.dir-classic .crm-rich-editor,
html[data-crm-theme="dark"] body.dir-classic .crm-editable-html,
html[data-crm-theme="dark"] body.dir-classic .crm-tab-metric,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-empty,
html[data-crm-theme="dark"] body.dir-classic .crm-empty-state,
html[data-crm-theme="dark"] body.dir-classic .crm-empty-mini,
html[data-crm-theme="dark"] body.dir-classic .crm-dashboard-queue-group,
html[data-crm-theme="dark"] body.dir-classic .crm-dashboard-queue-group > strong {
  background: #15181f !important;
  border-color: #2a3140 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-index-search input,
html[data-crm-theme="dark"] body.dir-classic .crm-index-search .input-group,
html[data-crm-theme="dark"] body.dir-classic .crm-index-search .input-group-text,
html[data-crm-theme="dark"] body.dir-classic .crm-index-search .btn,
html[data-crm-theme="dark"] body.dir-classic .crm-global-search,
html[data-crm-theme="dark"] body.dir-classic .crm-global-search .input-group,
html[data-crm-theme="dark"] body.dir-classic .crm-global-search .input-group-text,
html[data-crm-theme="dark"] body.dir-classic .crm-global-search .btn,
html[data-crm-theme="dark"] body.dir-classic .crm-global-search .form-control,
html[data-crm-theme="dark"] body.dir-classic input.form-control,
html[data-crm-theme="dark"] body.dir-classic textarea.form-control,
html[data-crm-theme="dark"] body.dir-classic select.form-control,
html[data-crm-theme="dark"] body.dir-classic .form-control {
  background-color: #0b0f16 !important;
  border-color: #334155 !important;
  color: #e5e7eb !important;
  -webkit-text-fill-color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic input::selection,
html[data-crm-theme="dark"] body.dir-classic textarea::selection,
html[data-crm-theme="dark"] body.dir-classic .form-control::selection,
html[data-crm-theme="dark"] body.dir-classic .crm-rich-editor [contenteditable]::selection {
  background: #312e81 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

html[data-crm-theme="dark"] body.dir-classic input.form-control::placeholder,
html[data-crm-theme="dark"] body.dir-classic textarea.form-control::placeholder,
html[data-crm-theme="dark"] body.dir-classic .crm-global-search .form-control::placeholder {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
}

html[data-crm-theme="dark"] body.dir-classic .btn-outline-secondary,
html[data-crm-theme="dark"] body.dir-classic .btn-light,
html[data-crm-theme="dark"] body.dir-classic .crm-btn-soft,
html[data-crm-theme="dark"] body.dir-classic .crm-chip,
html[data-crm-theme="dark"] body.dir-classic .crm-filter-chip,
html[data-crm-theme="dark"] body.dir-classic .crm-tab-pill {
  background: #15181f !important;
  border-color: #334155 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .btn-outline-secondary:hover,
html[data-crm-theme="dark"] body.dir-classic .btn-light:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-btn-soft:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-chip:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-filter-chip:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-tab-pill:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-filter-chip.is-active,
html[data-crm-theme="dark"] body.dir-classic .crm-tab-pill.is-active {
  background: #26215f !important;
  border-color: #6366f1 !important;
  color: #ffffff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-table tbody tr:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-table tbody tr:hover td,
html[data-crm-theme="dark"] body.dir-classic .crm-directory-table tbody tr:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-directory-table tbody tr:hover td,
html[data-crm-theme="dark"] body.dir-classic .crm-action-list-table tbody tr:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-action-list-table tbody tr:hover td {
  background: #1b2130 !important;
  color: #f8fafc !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-row,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days {
  background: #252b36 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-weekday,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-weekday,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-hours,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-time-label {
  background: #0b0f16 !important;
  border-color: #2a3140 !important;
  color: #a5b4fc !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-month-segment-layer {
  background: transparent !important;
  pointer-events: none !important;
  z-index: 30 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days .crm-calendar-day,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day {
  background: #15181f !important;
  border-color: #2a3140 !important;
  color: #cbd5e1 !important;
  min-height: 136px !important;
  overflow: hidden !important;
  padding: 38px 10px 10px !important;
  position: relative !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-muted {
  background: #111827 !important;
  color: #94a3b8 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day-number,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day > .crm-calendar-day-number {
  align-items: center !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 999px !important;
  color: #e5e7eb !important;
  display: inline-flex !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  height: 26px !important;
  justify-content: center !important;
  left: 10px !important;
  line-height: 26px !important;
  min-width: 26px !important;
  opacity: 1 !important;
  padding: 0 7px !important;
  position: absolute !important;
  text-indent: 0 !important;
  top: 10px !important;
  visibility: visible !important;
  -webkit-text-fill-color: #e5e7eb !important;
  z-index: 90 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-muted .crm-calendar-day-number {
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-today .crm-calendar-day-number,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-selected .crm-calendar-day-number {
  background: #6366f1 !important;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-month-segment,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-event,
html[data-crm-theme="dark"] body.dir-classic .crm-event-pill {
  color: #ffffff !important;
  z-index: 60 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-global-search,
html[data-crm-theme="dark"] body.dir-classic .crm-global-search .input-group,
html[data-crm-theme="dark"] body.dir-classic .crm-global-search .input-group-text,
html[data-crm-theme="dark"] body.dir-classic .crm-index-search .input-group,
html[data-crm-theme="dark"] body.dir-classic .crm-index-search .input-group-text,
html[data-crm-theme="dark"] body.dir-classic .crm-filter-panel .input-group,
html[data-crm-theme="dark"] body.dir-classic .crm-filter-panel .input-group-text,
html[data-crm-theme="dark"] body.dir-classic .nav-search .input-group,
html[data-crm-theme="dark"] body.dir-classic .nav-search .input-group-text {
  background: #1b1f2a !important;
  border-color: #334155 !important;
  color: #94a3b8 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-global-search input,
html[data-crm-theme="dark"] body.dir-classic .crm-index-search input,
html[data-crm-theme="dark"] body.dir-classic .crm-filter-panel input,
html[data-crm-theme="dark"] body.dir-classic .nav-search input {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  color: #e5e7eb !important;
  -webkit-text-fill-color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-global-search:focus-within,
html[data-crm-theme="dark"] body.dir-classic .crm-index-search:focus-within,
html[data-crm-theme="dark"] body.dir-classic .crm-filter-panel:focus-within {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18) !important;
}

html[data-crm-theme="dark"] body.dir-classic .btn-outline-primary,
html[data-crm-theme="dark"] body.dir-classic .crm-segmented-control,
html[data-crm-theme="dark"] body.dir-classic .crm-segmented-control a,
html[data-crm-theme="dark"] body.dir-classic .crm-segmented-control button,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-view-switch a,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-view-switch button {
  background: #111827 !important;
  border-color: #334155 !important;
  color: #dbeafe !important;
}

html[data-crm-theme="dark"] body.dir-classic .btn-outline-primary:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-segmented-control a:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-segmented-control button:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-view-switch a:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-view-switch button:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-view-switch .active,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-view-switch [aria-current="page"] {
  background: #26215f !important;
  border-color: #6366f1 !important;
  color: #ffffff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-stat-card,
html[data-crm-theme="dark"] body.dir-classic .crm-dashboard-card,
html[data-crm-theme="dark"] body.dir-classic .crm-action-card,
html[data-crm-theme="dark"] body.dir-classic .crm-company-hero,
html[data-crm-theme="dark"] body.dir-classic .crm-company-profile-card,
html[data-crm-theme="dark"] body.dir-classic .crm-directory-empty,
html[data-crm-theme="dark"] body.dir-classic .crm-tab-content,
html[data-crm-theme="dark"] body.dir-classic .crm-tab-pane,
html[data-crm-theme="dark"] body.dir-classic .crm-action-company-card,
html[data-crm-theme="dark"] body.dir-classic .crm-quick-add-card,
html[data-crm-theme="dark"] body.dir-classic .crm-offer-send-panel,
html[data-crm-theme="dark"] body.dir-classic .crm-settings-panel,
html[data-crm-theme="dark"] body.dir-classic .crm-help-panel {
  background: #15181f !important;
  border-color: #2a3140 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-dashboard-queue-group > strong,
html[data-crm-theme="dark"] body.dir-classic .crm-dashboard-queue-group .crm-empty-mini,
html[data-crm-theme="dark"] body.dir-classic .crm-empty-mini,
html[data-crm-theme="dark"] body.dir-classic .crm-empty-state,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-empty {
  background: #15181f !important;
  border-color: #2a3140 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-card:hover,
html[data-crm-theme="dark"] body.dir-classic .card:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-action-company-card:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-contact-card:hover {
  background-color: #1b2130 !important;
  border-color: #3b4558 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-table tbody tr:nth-child(even),
html[data-crm-theme="dark"] body.dir-classic .crm-table tbody tr:nth-child(odd),
html[data-crm-theme="dark"] body.dir-classic .crm-directory-table tbody tr:nth-child(even),
html[data-crm-theme="dark"] body.dir-classic .crm-directory-table tbody tr:nth-child(odd),
html[data-crm-theme="dark"] body.dir-classic .crm-action-list-table tbody tr:nth-child(even),
html[data-crm-theme="dark"] body.dir-classic .crm-action-list-table tbody tr:nth-child(odd) {
  background-color: #15181f !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day *,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day a,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day button {
  -webkit-text-fill-color: currentColor;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day .crm-calendar-day-number,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day-number span,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day-number a,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day-number button {
  color: #e5e7eb !important;
  opacity: 1 !important;
  text-shadow: none !important;
  visibility: visible !important;
  -webkit-text-fill-color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-today,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-selected {
  background: #1a2030 !important;
  outline-color: #6366f1 !important;
}

/* Final dark-mode contrast pass for controls and calendar surfaces. */
body.dir-classic .crm-theme-toggle {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  padding: 0 !important;
  border-radius: 8px;
  overflow: visible;
}

body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: currentColor !important;
  opacity: 1 !important;
  visibility: visible !important;
}

body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon i {
  display: block !important;
  font-size: 20px !important;
  line-height: 1 !important;
  color: currentColor !important;
  opacity: 1 !important;
  visibility: visible !important;
}

body.dir-classic .crm-theme-toggle:not(.is-active) .crm-theme-toggle-icon-dark {
  display: inline-flex !important;
}

body.dir-classic .crm-theme-toggle:not(.is-active) .crm-theme-toggle-icon-light {
  display: none !important;
}

body.dir-classic .crm-theme-toggle.is-active .crm-theme-toggle-icon-dark {
  display: none !important;
}

body.dir-classic .crm-theme-toggle.is-active .crm-theme-toggle-icon-light {
  display: inline-flex !important;
}

html:not([data-crm-theme="dark"]) body.dir-classic .crm-theme-toggle {
  background: #f8fafc !important;
  border: 1px solid #d8dee8 !important;
  color: #1d2540 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle {
  background: #211b63 !important;
  border: 1px solid #6366f1 !important;
  box-shadow: none !important;
  color: #dbe4ff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle:focus {
  background: #2a2473 !important;
  border-color: #818cf8 !important;
  color: #fff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-index-search,
html[data-crm-theme="dark"] body.dir-classic .crm-global-search,
html[data-crm-theme="dark"] body.dir-classic .nav-search {
  background: #151a24 !important;
  border-color: #2a3140 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-index-search .form-control,
html[data-crm-theme="dark"] body.dir-classic .crm-global-search .form-control,
html[data-crm-theme="dark"] body.dir-classic .nav-search .form-control {
  background: #151a24 !important;
  caret-color: #e5e7eb !important;
  color: #e5e7eb !important;
  -webkit-text-fill-color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-index-search .form-control::placeholder,
html[data-crm-theme="dark"] body.dir-classic .crm-global-search .form-control::placeholder,
html[data-crm-theme="dark"] body.dir-classic .nav-search .form-control::placeholder {
  color: #7f8aa3 !important;
  -webkit-text-fill-color: #7f8aa3 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-row,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days {
  background: #11161f !important;
  border-color: #2a3140 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days .crm-calendar-day,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day {
  background: #151a24 !important;
  border-color: #2a3140 !important;
  color: #dbe4ff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-muted {
  background: #242a35 !important;
  color: #94a3b8 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day-number {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 24px !important;
  min-height: 24px !important;
  color: #dbe4ff !important;
  opacity: 1 !important;
  position: absolute !important;
  visibility: visible !important;
  z-index: 100 !important;
  -webkit-text-fill-color: #dbe4ff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-muted .crm-calendar-day-number {
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-today .crm-calendar-day-number,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-selected .crm-calendar-day-number {
  background: #6366f1 !important;
  border-radius: 999px !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-weekday,
html[data-crm-theme="dark"] body.dir-classic .crm-week-day-head,
html[data-crm-theme="dark"] body.dir-classic .crm-week-corner,
html[data-crm-theme="dark"] body.dir-classic .crm-week-hours {
  background: #0b0f16 !important;
  border-color: #2a3140 !important;
  color: #a5b4fc !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-dashboard-queue-group > strong {
    background: #10151e !important;
    border-color: #2a3140 !important;
    color: #a5b4fc !important;
}

/* Dark mode stabilization pass. Keep this block last. */
body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon i {
    display: none !important;
}

body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon::before {
    display: block;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}

body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon-dark::before {
    content: "\263e";
}

body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon-light::before {
    content: "\2600";
}

body.dir-classic .crm-theme-toggle {
    align-items: center !important;
    background: #f8fafc !important;
    border: 1px solid #d8dee8 !important;
    border-radius: 8px !important;
    color: #1f2a44 !important;
    display: inline-flex !important;
    height: 38px !important;
    justify-content: center !important;
    min-width: 38px !important;
    padding: 0 !important;
}

body.dir-classic .crm-theme-toggle:hover,
body.dir-classic .crm-theme-toggle:focus {
    background: #eef2ff !important;
    border-color: #a5b4fc !important;
    color: #4f46e5 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle {
    background: #151a24 !important;
    border-color: #3f4c68 !important;
    color: #c7d2fe !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle:focus {
    background: #211b63 !important;
    border-color: #818cf8 !important;
    color: #ffffff !important;
}

html[data-crm-theme="dark"] body.dir-classic input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
html[data-crm-theme="dark"] body.dir-classic select,
html[data-crm-theme="dark"] body.dir-classic textarea,
html[data-crm-theme="dark"] body.dir-classic .form-control,
html[data-crm-theme="dark"] body.dir-classic .custom-select {
    background: #111827 !important;
    border-color: #2a3140 !important;
    color: #e5e7eb !important;
    -webkit-text-fill-color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic input::placeholder,
html[data-crm-theme="dark"] body.dir-classic textarea::placeholder,
html[data-crm-theme="dark"] body.dir-classic .form-control::placeholder {
    color: #7d89a3 !important;
    -webkit-text-fill-color: #7d89a3 !important;
}

html[data-crm-theme="dark"] body.dir-classic input:disabled,
html[data-crm-theme="dark"] body.dir-classic select:disabled,
html[data-crm-theme="dark"] body.dir-classic textarea:disabled,
html[data-crm-theme="dark"] body.dir-classic .form-control:disabled {
    background: #0f141d !important;
    border-color: #252c3a !important;
    color: #65728a !important;
    -webkit-text-fill-color: #65728a !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-index-search,
html[data-crm-theme="dark"] body.dir-classic .crm-global-search,
html[data-crm-theme="dark"] body.dir-classic .nav-search,
html[data-crm-theme="dark"] body.dir-classic .crm-filter-panel,
html[data-crm-theme="dark"] body.dir-classic .crm-filter-row {
    background: #151a24 !important;
    border-color: #2a3140 !important;
    color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-index-search input,
html[data-crm-theme="dark"] body.dir-classic .crm-global-search input,
html[data-crm-theme="dark"] body.dir-classic .nav-search input {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

html[data-crm-theme="dark"] body.dir-classic .modal-content,
html[data-crm-theme="dark"] body.dir-classic .modal-header,
html[data-crm-theme="dark"] body.dir-classic .modal-body,
html[data-crm-theme="dark"] body.dir-classic .modal-footer,
html[data-crm-theme="dark"] body.dir-classic .crm-modal-card,
html[data-crm-theme="dark"] body.dir-classic .crm-drawer-dialog .modal-content {
    background: #151a24 !important;
    border-color: #2a3140 !important;
    color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-card,
html[data-crm-theme="dark"] body.dir-classic .crm-panel,
html[data-crm-theme="dark"] body.dir-classic .crm-form-card,
html[data-crm-theme="dark"] body.dir-classic .crm-form-section,
html[data-crm-theme="dark"] body.dir-classic .crm-settings-panel,
html[data-crm-theme="dark"] body.dir-classic .crm-help-panel,
html[data-crm-theme="dark"] body.dir-classic .crm-info-box,
html[data-crm-theme="dark"] body.dir-classic .crm-switch-panel,
html[data-crm-theme="dark"] body.dir-classic .crm-offer-send-panel,
html[data-crm-theme="dark"] body.dir-classic .crm-attachment-panel,
html[data-crm-theme="dark"] body.dir-classic .crm-recommendation-card,
html[data-crm-theme="dark"] body.dir-classic .crm-ai-table,
html[data-crm-theme="dark"] body.dir-classic .crm-empty-mini,
html[data-crm-theme="dark"] body.dir-classic .crm-empty-state {
    background: #151a24 !important;
    border-color: #2a3140 !important;
    color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-editor,
html[data-crm-theme="dark"] body.dir-classic .crm-editor-toolbar,
html[data-crm-theme="dark"] body.dir-classic .crm-editor-variable-bar,
html[data-crm-theme="dark"] body.dir-classic .crm-editor-surface {
    background: #111827 !important;
    border-color: #2a3140 !important;
    color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .table,
html[data-crm-theme="dark"] body.dir-classic .crm-table,
html[data-crm-theme="dark"] body.dir-classic .crm-directory-table,
html[data-crm-theme="dark"] body.dir-classic .crm-action-list-table {
    background: #151a24 !important;
    color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .table thead th,
html[data-crm-theme="dark"] body.dir-classic .crm-table thead th,
html[data-crm-theme="dark"] body.dir-classic .crm-directory-table thead th,
html[data-crm-theme="dark"] body.dir-classic .crm-action-list-table thead th {
    background: #0b0f16 !important;
    border-color: #2a3140 !important;
    color: #9aa7c7 !important;
}

html[data-crm-theme="dark"] body.dir-classic .table tbody tr,
html[data-crm-theme="dark"] body.dir-classic .table tbody td,
html[data-crm-theme="dark"] body.dir-classic .crm-table tbody tr,
html[data-crm-theme="dark"] body.dir-classic .crm-table tbody td,
html[data-crm-theme="dark"] body.dir-classic .crm-directory-table tbody tr,
html[data-crm-theme="dark"] body.dir-classic .crm-directory-table tbody td,
html[data-crm-theme="dark"] body.dir-classic .crm-action-list-table tbody tr,
html[data-crm-theme="dark"] body.dir-classic .crm-action-list-table tbody td {
    background: #151a24 !important;
    border-color: #242b39 !important;
    color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .table tbody tr:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-table tbody tr:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-directory-table tbody tr:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-action-list-table tbody tr:hover {
    background: #1b2230 !important;
}

html[data-crm-theme="dark"] body.dir-classic .dropdown-menu,
html[data-crm-theme="dark"] body.dir-classic .list-group-item,
html[data-crm-theme="dark"] body.dir-classic .bg-light,
html[data-crm-theme="dark"] body.dir-classic .alert-light {
    background: #151a24 !important;
    border-color: #2a3140 !important;
    color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .dropdown-item,
html[data-crm-theme="dark"] body.dir-classic .dropdown-item-text {
    color: #dbe4ff !important;
}

html[data-crm-theme="dark"] body.dir-classic .dropdown-item:hover,
html[data-crm-theme="dark"] body.dir-classic .dropdown-item:focus,
html[data-crm-theme="dark"] body.dir-classic .dropdown-item.active {
    background: #1f2540 !important;
    color: #ffffff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-filter-chip,
html[data-crm-theme="dark"] body.dir-classic .crm-metric-card,
html[data-crm-theme="dark"] body.dir-classic .crm-dashboard-queue-group,
html[data-crm-theme="dark"] body.dir-classic .crm-dashboard-queue-group > strong {
    background: #151a24 !important;
    border-color: #2a3140 !important;
    color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-dashboard-queue-group > strong {
    color: #a5b4fc !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-grid,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-row,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days,
html[data-crm-theme="dark"] body.dir-classic .crm-week-planner,
html[data-crm-theme="dark"] body.dir-classic .crm-week-planner-card {
    background: #0b0f16 !important;
    border-color: #293244 !important;
    color: #dbe4ff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days .crm-calendar-day,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day {
    background: #151a24 !important;
    border: 1px solid #293244 !important;
    color: #dbe4ff !important;
    opacity: 1 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-muted {
    background: #202734 !important;
    color: #9aa7c7 !important;
    opacity: 1 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day-number {
    align-items: center !important;
    background: transparent !important;
    border: 0 !important;
    color: #dbe4ff !important;
    display: inline-flex !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    height: 26px !important;
    justify-content: center !important;
    left: 10px !important;
    line-height: 1 !important;
    min-width: 26px !important;
    opacity: 1 !important;
    position: absolute !important;
    top: 10px !important;
    visibility: visible !important;
    z-index: 40 !important;
    -webkit-text-fill-color: #dbe4ff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-today .crm-calendar-day-number {
    background: #6366f1 !important;
    border-radius: 999px !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-selected {
    box-shadow: inset 0 0 0 2px #818cf8 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-month-segment-layer,
html[data-crm-theme="dark"] body.dir-classic .crm-month-event-layer,
html[data-crm-theme="dark"] body.dir-classic .crm-month-segment-row,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-events {
    background: transparent !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-week-day-column,
html[data-crm-theme="dark"] body.dir-classic .crm-week-slot,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-list-item,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-agenda {
    background: #151a24 !important;
    border-color: #293244 !important;
    color: #dbe4ff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-week-offhours {
    background: rgba(148, 163, 184, 0.08) !important;
}

/* Dark-mode hardening pass. Keep this as the last block. */
body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon i {
  display: none !important;
}

body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon::before {
  display: block;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon-dark::before {
  content: "\263E";
}

body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon-light::before {
  content: "\2600";
}

body.dir-classic .crm-theme-toggle {
  border-radius: 8px !important;
  height: 38px !important;
  width: 38px !important;
}

html:not([data-crm-theme="dark"]) body.dir-classic .crm-theme-toggle {
  background: #f8fafc !important;
  border-color: #d8dee8 !important;
  color: #334155 !important;
}

html:not([data-crm-theme="dark"]) body.dir-classic .crm-theme-toggle:hover,
html:not([data-crm-theme="dark"]) body.dir-classic .crm-theme-toggle:focus {
  background: #eef2ff !important;
  border-color: #c7d2fe !important;
  color: #4f46e5 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle {
  background: #151a24 !important;
  border-color: #4f46e5 !important;
  color: #c7d2fe !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle:focus {
  background: #211b63 !important;
  border-color: #818cf8 !important;
  color: #ffffff !important;
}

html[data-crm-theme="dark"] body.dir-classic input,
html[data-crm-theme="dark"] body.dir-classic select,
html[data-crm-theme="dark"] body.dir-classic textarea,
html[data-crm-theme="dark"] body.dir-classic .form-control,
html[data-crm-theme="dark"] body.dir-classic .custom-select,
html[data-crm-theme="dark"] body.dir-classic .crm-editor-surface,
html[data-crm-theme="dark"] body.dir-classic .crm-rich-editor,
html[data-crm-theme="dark"] body.dir-classic .crm-html-editor {
  background: #111827 !important;
  border-color: #2a3140 !important;
  box-shadow: none !important;
  color: #e5e7eb !important;
  -webkit-text-fill-color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic input::placeholder,
html[data-crm-theme="dark"] body.dir-classic textarea::placeholder,
html[data-crm-theme="dark"] body.dir-classic .form-control::placeholder {
  color: #7f8aa3 !important;
  -webkit-text-fill-color: #7f8aa3 !important;
}

html[data-crm-theme="dark"] body.dir-classic input:disabled,
html[data-crm-theme="dark"] body.dir-classic select:disabled,
html[data-crm-theme="dark"] body.dir-classic textarea:disabled,
html[data-crm-theme="dark"] body.dir-classic .form-control:disabled {
  background: #1b2130 !important;
  border-color: #2a3140 !important;
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-index-search,
html[data-crm-theme="dark"] body.dir-classic .crm-index-search .input-group,
html[data-crm-theme="dark"] body.dir-classic .crm-index-search .input-group-text,
html[data-crm-theme="dark"] body.dir-classic .crm-global-search,
html[data-crm-theme="dark"] body.dir-classic .crm-global-search .input-group,
html[data-crm-theme="dark"] body.dir-classic .crm-global-search .input-group-text,
html[data-crm-theme="dark"] body.dir-classic .nav-search,
html[data-crm-theme="dark"] body.dir-classic .nav-search .input-group,
html[data-crm-theme="dark"] body.dir-classic .nav-search .input-group-text {
  background: #151a24 !important;
  border-color: #2a3140 !important;
  color: #94a3b8 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-index-search input,
html[data-crm-theme="dark"] body.dir-classic .crm-global-search input,
html[data-crm-theme="dark"] body.dir-classic .nav-search input {
  background: transparent !important;
  border-color: transparent !important;
}

html[data-crm-theme="dark"] body.dir-classic .card,
html[data-crm-theme="dark"] body.dir-classic .modal-content,
html[data-crm-theme="dark"] body.dir-classic .modal-header,
html[data-crm-theme="dark"] body.dir-classic .modal-body,
html[data-crm-theme="dark"] body.dir-classic .modal-footer,
html[data-crm-theme="dark"] body.dir-classic .dropdown-menu,
html[data-crm-theme="dark"] body.dir-classic .list-group-item,
html[data-crm-theme="dark"] body.dir-classic .crm-card,
html[data-crm-theme="dark"] body.dir-classic .crm-form-section,
html[data-crm-theme="dark"] body.dir-classic .crm-form-panel,
html[data-crm-theme="dark"] body.dir-classic .crm-settings-panel,
html[data-crm-theme="dark"] body.dir-classic .crm-help-panel,
html[data-crm-theme="dark"] body.dir-classic .crm-info-box,
html[data-crm-theme="dark"] body.dir-classic .crm-switch-card,
html[data-crm-theme="dark"] body.dir-classic .crm-switch-panel,
html[data-crm-theme="dark"] body.dir-classic .crm-editor,
html[data-crm-theme="dark"] body.dir-classic .crm-editor-toolbar,
html[data-crm-theme="dark"] body.dir-classic .crm-editor-variable-bar,
html[data-crm-theme="dark"] body.dir-classic .crm-attachment-panel,
html[data-crm-theme="dark"] body.dir-classic .crm-offer-send-panel,
html[data-crm-theme="dark"] body.dir-classic .crm-email-card,
html[data-crm-theme="dark"] body.dir-classic .crm-admin-card,
html[data-crm-theme="dark"] body.dir-classic .crm-recommendation-card,
html[data-crm-theme="dark"] body.dir-classic .crm-ai-table {
  background: #151a24 !important;
  border-color: #2a3140 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .bg-light,
html[data-crm-theme="dark"] body.dir-classic .alert-light,
html[data-crm-theme="dark"] body.dir-classic .crm-dashboard-queue-group,
html[data-crm-theme="dark"] body.dir-classic .crm-dashboard-queue-group > strong,
html[data-crm-theme="dark"] body.dir-classic .crm-empty-mini,
html[data-crm-theme="dark"] body.dir-classic .crm-empty-state,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-empty {
  background: #111827 !important;
  border-color: #2a3140 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .table,
html[data-crm-theme="dark"] body.dir-classic .crm-table,
html[data-crm-theme="dark"] body.dir-classic .crm-directory-table,
html[data-crm-theme="dark"] body.dir-classic .crm-action-list-table {
  background: #151a24 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .table thead th,
html[data-crm-theme="dark"] body.dir-classic .crm-table thead th,
html[data-crm-theme="dark"] body.dir-classic .crm-directory-table thead th,
html[data-crm-theme="dark"] body.dir-classic .crm-action-list-table thead th {
  background: #0b0f16 !important;
  border-color: #2a3140 !important;
  color: #9fb0c9 !important;
}

html[data-crm-theme="dark"] body.dir-classic .table tbody tr,
html[data-crm-theme="dark"] body.dir-classic .table tbody td,
html[data-crm-theme="dark"] body.dir-classic .crm-table tbody tr,
html[data-crm-theme="dark"] body.dir-classic .crm-table tbody td,
html[data-crm-theme="dark"] body.dir-classic .crm-directory-table tbody tr,
html[data-crm-theme="dark"] body.dir-classic .crm-directory-table tbody td,
html[data-crm-theme="dark"] body.dir-classic .crm-action-list-table tbody tr,
html[data-crm-theme="dark"] body.dir-classic .crm-action-list-table tbody td {
  background: #151a24 !important;
  border-color: #242b3a !important;
  color: #cbd5e1 !important;
}

html[data-crm-theme="dark"] body.dir-classic .table-hover tbody tr:hover,
html[data-crm-theme="dark"] body.dir-classic .table-hover tbody tr:hover td,
html[data-crm-theme="dark"] body.dir-classic .crm-directory-table tbody tr:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-directory-table tbody tr:hover td,
html[data-crm-theme="dark"] body.dir-classic .crm-action-list-table tbody tr:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-action-list-table tbody tr:hover td,
html[data-crm-theme="dark"] body.dir-classic .dropdown-item:hover,
html[data-crm-theme="dark"] body.dir-classic .dropdown-item:focus {
  background: #1b2130 !important;
  color: #ffffff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-grid,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-row,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days,
html[data-crm-theme="dark"] body.dir-classic .crm-week-planner,
html[data-crm-theme="dark"] body.dir-classic .crm-week-planner-card {
  background: #0b0f16 !important;
  border-color: #293244 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-weekday,
html[data-crm-theme="dark"] body.dir-classic .crm-week-day-head,
html[data-crm-theme="dark"] body.dir-classic .crm-week-corner,
html[data-crm-theme="dark"] body.dir-classic .crm-week-hours {
  background: #0b0f16 !important;
  border-color: #293244 !important;
  color: #a5b4fc !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days .crm-calendar-day,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day,
html[data-crm-theme="dark"] body.dir-classic .crm-week-day-column {
  background: #151a24 !important;
  border-color: #293244 !important;
  color: #dbe4ff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-muted {
  background: #202733 !important;
  opacity: 1 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-week-day-column:hover {
  background: #1b2130 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day-number,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day > .crm-calendar-day-number {
  align-items: center !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 999px !important;
  color: #dbe4ff !important;
  display: inline-flex !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  height: 26px !important;
  justify-content: center !important;
  left: 10px !important;
  min-height: 26px !important;
  min-width: 26px !important;
  opacity: 1 !important;
  padding: 0 7px !important;
  position: absolute !important;
  text-shadow: none !important;
  top: 10px !important;
  visibility: visible !important;
  width: auto !important;
  z-index: 25 !important;
  -webkit-text-fill-color: #dbe4ff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-muted .crm-calendar-day-number {
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-today .crm-calendar-day-number,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-selected .crm-calendar-day-number {
  background: #6366f1 !important;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.18) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-month-segment-layer,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-events,
html[data-crm-theme="dark"] body.dir-classic .crm-month-event-layer,
html[data-crm-theme="dark"] body.dir-classic .crm-month-event-rail,
html[data-crm-theme="dark"] body.dir-classic .crm-month-segment-row {
  background: transparent !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-more {
  background: #1b2130 !important;
  border-color: #334155 !important;
  color: #c7d2fe !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-agenda,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-agenda .card,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-list-item {
  background: #151a24 !important;
  border-color: #2a3140 !important;
  color: #e5e7eb !important;
}

/* Dark-mode final override 2026-05-08. Keep at EOF. */
body.dir-classic .crm-theme-toggle {
  align-items: center !important;
  display: inline-flex !important;
  justify-content: center !important;
  overflow: hidden !important;
  position: relative !important;
}

body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon {
  align-items: center !important;
  display: none !important;
  height: 100% !important;
  justify-content: center !important;
  width: 100% !important;
}

body.dir-classic .crm-theme-toggle:not(.is-active) .crm-theme-toggle-icon-dark,
body.dir-classic .crm-theme-toggle.is-active .crm-theme-toggle-icon-light {
  display: inline-flex !important;
}

body.dir-classic .crm-theme-toggle:not(.is-active) .crm-theme-toggle-icon-light,
body.dir-classic .crm-theme-toggle.is-active .crm-theme-toggle-icon-dark {
  display: none !important;
}

body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon i {
  display: none !important;
}

body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon::before {
  color: currentColor !important;
  display: block !important;
  font-family: Arial, sans-serif !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}

body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon-dark::before {
  content: "\263E" !important;
}

body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon-light::before {
  content: "\2600" !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-index-search,
html[data-crm-theme="dark"] body.dir-classic .crm-global-search,
html[data-crm-theme="dark"] body.dir-classic .nav-search {
  background: #151a24 !important;
  border: 1px solid #2a3140 !important;
  box-shadow: none !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-index-search input,
html[data-crm-theme="dark"] body.dir-classic .crm-global-search input,
html[data-crm-theme="dark"] body.dir-classic .nav-search input {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #e5e7eb !important;
  outline: 0 !important;
  -webkit-text-fill-color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-index-search:focus-within,
html[data-crm-theme="dark"] body.dir-classic .crm-global-search:focus-within,
html[data-crm-theme="dark"] body.dir-classic .nav-search:focus-within {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-row,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-events,
html[data-crm-theme="dark"] body.dir-classic .crm-month-segment-layer,
html[data-crm-theme="dark"] body.dir-classic .crm-month-event-layer,
html[data-crm-theme="dark"] body.dir-classic .crm-month-event-rail,
html[data-crm-theme="dark"] body.dir-classic .crm-month-segment-row {
  background: #0b0f16 !important;
  border-color: #293244 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days .crm-calendar-day,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day {
  background: #151a24 !important;
  border-color: #293244 !important;
  color: #dbe4ff !important;
  opacity: 1 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-muted {
  background: #202733 !important;
  color: #94a3b8 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day-number,
html[data-crm-theme="dark"] body.dir-classic button.crm-calendar-day-number {
  align-items: center !important;
  appearance: none !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 999px !important;
  color: #dbe4ff !important;
  display: inline-flex !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  height: 26px !important;
  justify-content: center !important;
  left: 10px !important;
  line-height: 1 !important;
  min-height: 26px !important;
  min-width: 26px !important;
  opacity: 1 !important;
  padding: 0 7px !important;
  position: absolute !important;
  text-shadow: none !important;
  top: 10px !important;
  visibility: visible !important;
  width: auto !important;
  z-index: 80 !important;
  -webkit-text-fill-color: #dbe4ff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-today .crm-calendar-day-number,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-selected .crm-calendar-day-number {
  background: #6366f1 !important;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.22) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-muted .crm-calendar-day-number {
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-muted.is-today .crm-calendar-day-number {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Dark-mode modal form override 2026-05-08. Keep at EOF. */
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-modal-page-content,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-modal-dialog,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-modal-dialog .modal-content,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-modal-dialog .modal-header,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-modal-dialog .modal-body,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-modal-dialog .modal-footer,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-modal-dialog .crm-modal-frame-body,
html[data-crm-theme="dark"] body.dir-classic .crm-modal-form,
html[data-crm-theme="dark"] body.dir-classic .crm-modal-form > .card-body,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form > .card-body,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .card-body,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .crm-conditional-panel,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .crm-offer-mail-panel,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .crm-mini-calendar,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .crm-line-row,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .crm-switch-field,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .crm-ai-note-panel,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .bg-light {
  background: #151a24 !important;
  border-color: #2a3140 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .crm-conditional-panel,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .crm-offer-mail-panel,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .crm-mini-calendar,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .crm-line-row,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .crm-switch-field,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .crm-ai-note-panel {
  box-shadow: none !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-activity-form label,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .form-label,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .crm-panel-title-row,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .crm-panel-title-row strong,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .crm-mini-calendar-title,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .crm-switch-copy strong,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .crm-probability-row strong {
  color: #e5e7eb !important;
  -webkit-text-fill-color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-activity-form small,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .text-muted,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .crm-help-text,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .crm-switch-copy span,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .crm-mini-calendar-header span,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .crm-panel-title-row small {
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .form-control,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form input,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form select,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form textarea,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .crm-rich-editor,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .crm-rich-editor [contenteditable],
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .crm-rich-editor textarea {
  background: #0b0f16 !important;
  border-color: #334155 !important;
  color: #e5e7eb !important;
  -webkit-text-fill-color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .form-control::placeholder,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form input::placeholder,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form textarea::placeholder {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .crm-outcome-option span,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .crm-slot-button,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .crm-range-slot-button,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .crm-mini-calendar-day,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .crm-rich-editor-toolbar,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .crm-rich-editor-variable-row,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .crm-variable-chip,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .btn-outline-secondary,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .btn-light {
  background: #111827 !important;
  border-color: #334155 !important;
  color: #dbe4ff !important;
  -webkit-text-fill-color: #dbe4ff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .crm-outcome-option input:checked + span,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .crm-outcome-option span:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .crm-slot-button.is-selected,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .crm-range-slot-button.is-selected,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-form .crm-range-slot-button.is-in-range {
  background: rgba(99, 102, 241, 0.2) !important;
  border-color: #818cf8 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Dark-mode stabilization pass 2026-05-08. Keep this block last. */
body.dir-classic .crm-theme-toggle {
  align-items: center !important;
  border: 1px solid #d8e0ec !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  height: 38px !important;
  justify-content: center !important;
  line-height: 1 !important;
  padding: 0 !important;
  width: 38px !important;
}

body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon::before {
  content: none !important;
  display: none !important;
}

body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon i {
  display: none !important;
}

body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon svg {
  display: block !important;
  fill: none !important;
  height: 18px !important;
  stroke: currentColor !important;
  width: 18px !important;
}

html:not([data-crm-theme="dark"]) body.dir-classic .crm-theme-toggle {
  background: #f8fafc !important;
  border-color: #d8e0ec !important;
  color: #24324a !important;
}

html:not([data-crm-theme="dark"]) body.dir-classic .crm-theme-toggle:hover,
html:not([data-crm-theme="dark"]) body.dir-classic .crm-theme-toggle:focus {
  background: #eef2ff !important;
  border-color: #a5b4fc !important;
  color: #4f46e5 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle {
  background: #211b63 !important;
  border-color: #6366f1 !important;
  color: #c7d2fe !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle:focus {
  background: #312e81 !important;
  border-color: #818cf8 !important;
  color: #ffffff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-index-search,
html[data-crm-theme="dark"] body.dir-classic .crm-global-search,
html[data-crm-theme="dark"] body.dir-classic .nav-search,
html[data-crm-theme="dark"] body.dir-classic .crm-filter-card,
html[data-crm-theme="dark"] body.dir-classic .crm-table-card,
html[data-crm-theme="dark"] body.dir-classic .crm-index-panel,
html[data-crm-theme="dark"] body.dir-classic .crm-tabs-shell,
html[data-crm-theme="dark"] body.dir-classic .crm-tab-panel,
html[data-crm-theme="dark"] body.dir-classic .crm-card,
html[data-crm-theme="dark"] body.dir-classic .crm-metric-card,
html[data-crm-theme="dark"] body.dir-classic .crm-stat-card,
html[data-crm-theme="dark"] body.dir-classic .crm-empty-state {
  background: #151a24 !important;
  border-color: #2a3140 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic input,
html[data-crm-theme="dark"] body.dir-classic select,
html[data-crm-theme="dark"] body.dir-classic textarea,
html[data-crm-theme="dark"] body.dir-classic .form-control,
html[data-crm-theme="dark"] body.dir-classic .custom-select,
html[data-crm-theme="dark"] body.dir-classic .crm-rich-editor,
html[data-crm-theme="dark"] body.dir-classic .crm-rich-editor [contenteditable] {
  background: #0b0f16 !important;
  border-color: #334155 !important;
  color: #e5e7eb !important;
  -webkit-text-fill-color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic input::placeholder,
html[data-crm-theme="dark"] body.dir-classic textarea::placeholder {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
}

html[data-crm-theme="dark"] body.dir-classic input::selection,
html[data-crm-theme="dark"] body.dir-classic textarea::selection,
html[data-crm-theme="dark"] body.dir-classic .crm-rich-editor::selection,
html[data-crm-theme="dark"] body.dir-classic .crm-rich-editor [contenteditable]::selection {
  background: #4f46e5 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

html[data-crm-theme="dark"] body.dir-classic.crm-modal-page,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-modal-page-content,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .container,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .container-fluid,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .card,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .card-body,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-modal-form,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-activity-form,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-conditional-panel,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-offer-mail-panel,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-mini-calendar,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-line-row,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-switch-field,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-ai-note-panel {
  background: #151a24 !important;
  border-color: #2a3140 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-outcome-option span,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-rich-editor-toolbar,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-rich-editor-variable-row,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-variable-chip,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-slot-button,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-range-slot-button,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-mini-calendar-day,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .btn-light,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .btn-outline-secondary {
  background: #111827 !important;
  border-color: #334155 !important;
  color: #dbe4ff !important;
  -webkit-text-fill-color: #dbe4ff !important;
}

html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-outcome-option input:checked + span,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-outcome-option span:hover,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-slot-button.is-selected,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-range-slot-button.is-selected,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-range-slot-button.is-in-range {
  background: rgba(99, 102, 241, 0.2) !important;
  border-color: #818cf8 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-row,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-events,
html[data-crm-theme="dark"] body.dir-classic .crm-month-segment-layer,
html[data-crm-theme="dark"] body.dir-classic .crm-month-event-layer,
html[data-crm-theme="dark"] body.dir-classic .crm-month-event-rail,
html[data-crm-theme="dark"] body.dir-classic .crm-month-segment-row,
html[data-crm-theme="dark"] body.dir-classic .crm-week-grid,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-list-panel {
  background: #151a24 !important;
  border-color: #293244 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days .crm-calendar-day,
html[data-crm-theme="dark"] body.dir-classic .crm-week-day-column,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day {
  background: #151a24 !important;
  border-color: #293244 !important;
  color: #e5e7eb !important;
  opacity: 1 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-muted {
  background: #202733 !important;
  color: #94a3b8 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day-number,
html[data-crm-theme="dark"] body.dir-classic button.crm-calendar-day-number {
  align-items: center !important;
  appearance: none !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 999px !important;
  color: #e5e7eb !important;
  display: inline-flex !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  height: 26px !important;
  justify-content: center !important;
  left: 10px !important;
  line-height: 1 !important;
  min-height: 26px !important;
  min-width: 26px !important;
  opacity: 1 !important;
  padding: 0 7px !important;
  position: absolute !important;
  text-shadow: none !important;
  top: 10px !important;
  visibility: visible !important;
  width: auto !important;
  z-index: 120 !important;
  -webkit-text-fill-color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-today .crm-calendar-day-number,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-selected .crm-calendar-day-number {
  background: #6366f1 !important;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.22) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-muted .crm-calendar-day-number {
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-month-week-row::before,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-row::after,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-events::before,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-events::after,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid::before,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid::after {
  background: transparent !important;
  content: none !important;
  display: none !important;
}

/* Dark-mode hardening pass 2026-05-08. Keep this block last. */
html[data-crm-theme="dark"] body.dir-classic {
  color-scheme: dark;
  --bg: #0b0f16;
  --bg-elevated: #151a24;
  --bg-sunken: #0f141d;
  --bg-hover: #1b2130;
  --bg-active: #20283a;
  --border: #293244;
  --border-strong: #334155;
  --divider: #242b3a;
  --text: #e5e7eb;
  --text-secondary: #cbd5e1;
  --text-tertiary: #94a3b8;
}

body.dir-classic .crm-theme-toggle,
body.dir-classic .topbar .crm-theme-toggle {
  align-items: center !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  flex: 0 0 38px !important;
  height: 38px !important;
  justify-content: center !important;
  line-height: 1 !important;
  min-height: 38px !important;
  min-width: 38px !important;
  overflow: visible !important;
  padding: 0 !important;
  width: 38px !important;
}

body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon {
  align-items: center !important;
  display: none !important;
  height: 18px !important;
  justify-content: center !important;
  width: 18px !important;
}

body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon::before,
body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon::after {
  content: none !important;
  display: none !important;
}

body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon svg {
  display: block !important;
  fill: none !important;
  height: 18px !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  width: 18px !important;
}

body.dir-classic .crm-theme-toggle:not(.is-active) .crm-theme-toggle-icon-dark,
body.dir-classic .crm-theme-toggle.is-active .crm-theme-toggle-icon-light {
  display: inline-flex !important;
}

html:not([data-crm-theme="dark"]) body.dir-classic .crm-theme-toggle {
  background: #f8fafc !important;
  border: 1px solid #d8e0ec !important;
  color: #24324a !important;
}

html:not([data-crm-theme="dark"]) body.dir-classic .crm-theme-toggle:hover,
html:not([data-crm-theme="dark"]) body.dir-classic .crm-theme-toggle:focus-visible {
  background: #eef2ff !important;
  border-color: #a5b4fc !important;
  color: #4f46e5 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle {
  background: #1e1b4b !important;
  border: 1px solid #6366f1 !important;
  box-shadow: none !important;
  color: #c7d2fe !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle:focus-visible {
  background: #312e81 !important;
  border-color: #818cf8 !important;
  color: #ffffff !important;
}

html[data-crm-theme="dark"] body.dir-classic .topbar,
html[data-crm-theme="dark"] body.dir-classic .sidebar,
html[data-crm-theme="dark"] body.dir-classic .app-shell,
html[data-crm-theme="dark"] body.dir-classic .main-content,
html[data-crm-theme="dark"] body.dir-classic .page-content,
html[data-crm-theme="dark"] body.dir-classic .crm-page,
html[data-crm-theme="dark"] body.dir-classic .crm-page-main {
  background: #0b0f16 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-card,
html[data-crm-theme="dark"] body.dir-classic .card,
html[data-crm-theme="dark"] body.dir-classic .modal-content,
html[data-crm-theme="dark"] body.dir-classic .dropdown-menu,
html[data-crm-theme="dark"] body.dir-classic .crm-index-panel,
html[data-crm-theme="dark"] body.dir-classic .crm-filter-card,
html[data-crm-theme="dark"] body.dir-classic .crm-table-card,
html[data-crm-theme="dark"] body.dir-classic .crm-tabs-shell,
html[data-crm-theme="dark"] body.dir-classic .crm-tab-panel,
html[data-crm-theme="dark"] body.dir-classic .crm-metric-card,
html[data-crm-theme="dark"] body.dir-classic .crm-stat-card,
html[data-crm-theme="dark"] body.dir-classic .crm-empty-state,
html[data-crm-theme="dark"] body.dir-classic .crm-side-card,
html[data-crm-theme="dark"] body.dir-classic .crm-quick-add-drawer,
html[data-crm-theme="dark"] body.dir-classic .crm-rich-editor,
html[data-crm-theme="dark"] body.dir-classic .crm-signature-preview,
html[data-crm-theme="dark"] body.dir-classic .crm-offer-mail-panel,
html[data-crm-theme="dark"] body.dir-classic .crm-ai-note-panel,
html[data-crm-theme="dark"] body.dir-classic .crm-conditional-panel,
html[data-crm-theme="dark"] body.dir-classic .crm-mini-calendar,
html[data-crm-theme="dark"] body.dir-classic .crm-dashboard-card,
html[data-crm-theme="dark"] body.dir-classic .crm-company-card,
html[data-crm-theme="dark"] body.dir-classic .crm-action-company-card {
  background: #151a24 !important;
  border-color: #293244 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-panel,
html[data-crm-theme="dark"] body.dir-classic .crm-subpanel,
html[data-crm-theme="dark"] body.dir-classic .crm-line-row,
html[data-crm-theme="dark"] body.dir-classic .crm-row,
html[data-crm-theme="dark"] body.dir-classic .crm-list-row,
html[data-crm-theme="dark"] body.dir-classic .crm-table-row,
html[data-crm-theme="dark"] body.dir-classic .crm-rich-editor-toolbar,
html[data-crm-theme="dark"] body.dir-classic .crm-rich-editor-variable-row,
html[data-crm-theme="dark"] body.dir-classic .crm-variable-chip-row,
html[data-crm-theme="dark"] body.dir-classic .crm-switch-field,
html[data-crm-theme="dark"] body.dir-classic .crm-pill,
html[data-crm-theme="dark"] body.dir-classic .crm-pill-filter,
html[data-crm-theme="dark"] body.dir-classic .crm-tab-content,
html[data-crm-theme="dark"] body.dir-classic .crm-dropdown-list,
html[data-crm-theme="dark"] body.dir-classic .crm-user-menu,
html[data-crm-theme="dark"] body.dir-classic .crm-offer-summary,
html[data-crm-theme="dark"] body.dir-classic .crm-offer-attachment,
html[data-crm-theme="dark"] body.dir-classic .bg-light {
  background: #111827 !important;
  border-color: #293244 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .table,
html[data-crm-theme="dark"] body.dir-classic table,
html[data-crm-theme="dark"] body.dir-classic thead,
html[data-crm-theme="dark"] body.dir-classic tbody,
html[data-crm-theme="dark"] body.dir-classic tr,
html[data-crm-theme="dark"] body.dir-classic td,
html[data-crm-theme="dark"] body.dir-classic th {
  background: transparent !important;
  border-color: #293244 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic thead th,
html[data-crm-theme="dark"] body.dir-classic .table thead th,
html[data-crm-theme="dark"] body.dir-classic .crm-table-header {
  background: #0b0f16 !important;
  color: #94a3b8 !important;
}

html[data-crm-theme="dark"] body.dir-classic tr:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-list-row:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-table-row:hover,
html[data-crm-theme="dark"] body.dir-classic .dropdown-item:hover,
html[data-crm-theme="dark"] body.dir-classic .dropdown-item:focus {
  background: #1b2130 !important;
  color: #ffffff !important;
}

html[data-crm-theme="dark"] body.dir-classic input,
html[data-crm-theme="dark"] body.dir-classic select,
html[data-crm-theme="dark"] body.dir-classic textarea,
html[data-crm-theme="dark"] body.dir-classic .form-control,
html[data-crm-theme="dark"] body.dir-classic .custom-select,
html[data-crm-theme="dark"] body.dir-classic .crm-rich-editor [contenteditable],
html[data-crm-theme="dark"] body.dir-classic .crm-rich-editor textarea,
html[data-crm-theme="dark"] body.dir-classic .crm-html-editor,
html[data-crm-theme="dark"] body.dir-classic .crm-index-search-input,
html[data-crm-theme="dark"] body.dir-classic .crm-global-search input,
html[data-crm-theme="dark"] body.dir-classic .nav-search input {
  background: #0b0f16 !important;
  border-color: #334155 !important;
  color: #e5e7eb !important;
  -webkit-text-fill-color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic input::placeholder,
html[data-crm-theme="dark"] body.dir-classic textarea::placeholder,
html[data-crm-theme="dark"] body.dir-classic .crm-rich-editor [contenteditable]:empty::before {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
}

html[data-crm-theme="dark"] body.dir-classic input:disabled,
html[data-crm-theme="dark"] body.dir-classic select:disabled,
html[data-crm-theme="dark"] body.dir-classic textarea:disabled,
html[data-crm-theme="dark"] body.dir-classic .form-control:disabled,
html[data-crm-theme="dark"] body.dir-classic .form-control[readonly] {
  background: #1b2130 !important;
  border-color: #293244 !important;
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
}

html[data-crm-theme="dark"] body.dir-classic .btn-light,
html[data-crm-theme="dark"] body.dir-classic .btn-outline-secondary,
html[data-crm-theme="dark"] body.dir-classic .btn-outline-primary,
html[data-crm-theme="dark"] body.dir-classic .crm-icon-button,
html[data-crm-theme="dark"] body.dir-classic .crm-editor-button,
html[data-crm-theme="dark"] body.dir-classic .crm-toolbar-button {
  background: #111827 !important;
  border-color: #334155 !important;
  color: #dbe4ff !important;
}

html[data-crm-theme="dark"] body.dir-classic .btn-light:hover,
html[data-crm-theme="dark"] body.dir-classic .btn-outline-secondary:hover,
html[data-crm-theme="dark"] body.dir-classic .btn-outline-primary:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-icon-button:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-editor-button:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-toolbar-button:hover {
  background: #20283a !important;
  border-color: #818cf8 !important;
  color: #ffffff !important;
}

html[data-crm-theme="dark"] body.dir-classic .text-muted,
html[data-crm-theme="dark"] body.dir-classic .small,
html[data-crm-theme="dark"] body.dir-classic small,
html[data-crm-theme="dark"] body.dir-classic .crm-help-text,
html[data-crm-theme="dark"] body.dir-classic .crm-subtitle,
html[data-crm-theme="dark"] body.dir-classic .crm-meta,
html[data-crm-theme="dark"] body.dir-classic .crm-secondary-text {
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
}

html[data-crm-theme="dark"] body.dir-classic.crm-modal-page,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .modal-body,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-modal-page-content,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .container,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .container-fluid,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .card,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .card-body,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-modal-form,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-activity-form {
  background: #0b0f16 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-activity-form > *,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-conditional-panel,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-offer-mail-panel,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-ai-note-panel,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-mini-calendar,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-switch-field {
  background: #151a24 !important;
  border-color: #293244 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-outcome-option span,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-slot-button,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-range-slot-button,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-mini-calendar-day,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-rich-editor-toolbar,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-rich-editor-variable-row,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-variable-chip {
  background: #111827 !important;
  border-color: #334155 !important;
  color: #dbe4ff !important;
  -webkit-text-fill-color: #dbe4ff !important;
}

html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-outcome-option input:checked + span,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-outcome-option span:hover,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-slot-button.is-selected,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-range-slot-button.is-selected,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-range-slot-button.is-in-range {
  background: rgba(99, 102, 241, 0.22) !important;
  border-color: #818cf8 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-index-search,
html[data-crm-theme="dark"] body.dir-classic .crm-global-search,
html[data-crm-theme="dark"] body.dir-classic .nav-search,
html[data-crm-theme="dark"] body.dir-classic .crm-search-box {
  background: #151a24 !important;
  border-color: #2a3140 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-index-search input,
html[data-crm-theme="dark"] body.dir-classic .crm-global-search input,
html[data-crm-theme="dark"] body.dir-classic .nav-search input,
html[data-crm-theme="dark"] body.dir-classic .crm-search-box input {
  background: transparent !important;
  border-color: transparent !important;
  color: #e5e7eb !important;
  outline: none !important;
  -webkit-text-fill-color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-board,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-grid,
html[data-crm-theme="dark"] body.dir-classic .crm-week-grid,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-list-panel {
  background: #151a24 !important;
  border-color: #293244 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-month-week-row,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-events,
html[data-crm-theme="dark"] body.dir-classic .crm-month-segment-layer,
html[data-crm-theme="dark"] body.dir-classic .crm-month-event-layer,
html[data-crm-theme="dark"] body.dir-classic .crm-month-event-rail,
html[data-crm-theme="dark"] body.dir-classic .crm-month-segment-row {
  background: transparent !important;
  border-color: #293244 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days .crm-calendar-day,
html[data-crm-theme="dark"] body.dir-classic .crm-week-day-column,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day {
  background: #151a24 !important;
  border-color: #293244 !important;
  color: #e5e7eb !important;
  cursor: pointer !important;
  opacity: 1 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-week-day-column:hover {
  background: #1b2130 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-muted {
  background: #202733 !important;
  color: #94a3b8 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day-number,
html[data-crm-theme="dark"] body.dir-classic button.crm-calendar-day-number {
  align-items: center !important;
  appearance: none !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 999px !important;
  color: #e5e7eb !important;
  display: inline-flex !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  height: 26px !important;
  justify-content: center !important;
  left: 10px !important;
  line-height: 1 !important;
  min-height: 26px !important;
  min-width: 26px !important;
  opacity: 1 !important;
  padding: 0 7px !important;
  pointer-events: auto !important;
  position: absolute !important;
  text-shadow: none !important;
  top: 10px !important;
  visibility: visible !important;
  width: auto !important;
  z-index: 200 !important;
  -webkit-text-fill-color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-today .crm-calendar-day-number,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-selected .crm-calendar-day-number {
  background: #6366f1 !important;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.22) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-muted .crm-calendar-day-number {
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-month-week-row::before,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-row::after,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days::before,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days::after,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-events::before,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-events::after,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid::before,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid::after {
  background: transparent !important;
  content: none !important;
  display: none !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-month-event,
html[data-crm-theme="dark"] body.dir-classic .crm-month-event-segment,
html[data-crm-theme="dark"] body.dir-classic .crm-week-event,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-list-item {
  box-shadow: none !important;
  opacity: 1 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-rich-editor-toolbar,
html[data-crm-theme="dark"] body.dir-classic .crm-rich-editor-variable-row,
html[data-crm-theme="dark"] body.dir-classic .crm-variable-chip,
html[data-crm-theme="dark"] body.dir-classic .crm-rich-preview,
html[data-crm-theme="dark"] body.dir-classic .crm-offer-html-editor.is-fullscreen,
html[data-crm-theme="dark"] body.dir-classic .crm-html-preview,
html[data-crm-theme="dark"] body.dir-classic .crm-mail-compose-panel {
  background: #111827 !important;
  border-color: #293244 !important;
  color: #e5e7eb !important;
}

/* Dark-mode final corrections 2026-05-08. Keep this block last. */
body.dir-classic .crm-theme-toggle {
  position: relative !important;
}

body.dir-classic .crm-theme-toggle svg {
  display: block !important;
  width: 18px !important;
  height: 18px !important;
  opacity: 1 !important;
  visibility: visible !important;
  fill: none !important;
  stroke: currentColor !important;
}

html:not([data-crm-theme="dark"]) body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon-dark,
html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon-light {
  display: inline-flex !important;
}

html:not([data-crm-theme="dark"]) body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon-light,
html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon-dark {
  display: none !important;
}

html:not([data-crm-theme="dark"]) body.dir-classic .crm-theme-toggle {
  background: #f8fafc !important;
  border: 1px solid #d8e0ec !important;
  color: #334155 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle {
  background: #1e1b4b !important;
  border: 1px solid #6366f1 !important;
  color: #c7d2fe !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-index-search,
html[data-crm-theme="dark"] body.dir-classic .crm-index-search .input-group,
html[data-crm-theme="dark"] body.dir-classic .crm-index-search .input-group-prepend,
html[data-crm-theme="dark"] body.dir-classic .crm-index-search .input-group-text,
html[data-crm-theme="dark"] body.dir-classic .crm-global-search,
html[data-crm-theme="dark"] body.dir-classic .crm-search-box,
html[data-crm-theme="dark"] body.dir-classic .crm-search-shell {
  background: #151a24 !important;
  border-color: #2a3140 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-index-search input,
html[data-crm-theme="dark"] body.dir-classic .crm-global-search input,
html[data-crm-theme="dark"] body.dir-classic .crm-search-box input,
html[data-crm-theme="dark"] body.dir-classic .crm-search-shell input {
  background: #0b0f16 !important;
  border-color: transparent !important;
  color: #e5e7eb !important;
  -webkit-text-fill-color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-index-search input::selection,
html[data-crm-theme="dark"] body.dir-classic .crm-global-search input::selection,
html[data-crm-theme="dark"] body.dir-classic .crm-search-box input::selection,
html[data-crm-theme="dark"] body.dir-classic .crm-search-shell input::selection {
  background: #4f46e5 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-board,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid > *,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-row,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-events,
html[data-crm-theme="dark"] body.dir-classic .crm-month-segment-layer,
html[data-crm-theme="dark"] body.dir-classic .crm-month-event-layer,
html[data-crm-theme="dark"] body.dir-classic .crm-week-grid {
  background: #151a24 !important;
  border-color: #293244 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-weekday,
html[data-crm-theme="dark"] body.dir-classic .crm-week-header,
html[data-crm-theme="dark"] body.dir-classic .crm-week-time-column {
  background: #0b0f16 !important;
  border-color: #293244 !important;
  color: #cbd5e1 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day,
html[data-crm-theme="dark"] body.dir-classic .crm-week-day-column {
  background: #151a24 !important;
  border-color: #293244 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-muted {
  background: #202733 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day-number,
html[data-crm-theme="dark"] body.dir-classic button.crm-calendar-day-number {
  display: inline-flex !important;
  color: #e5e7eb !important;
  opacity: 1 !important;
  visibility: visible !important;
  z-index: 250 !important;
  -webkit-text-fill-color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-today .crm-calendar-day-number {
  background: #6366f1 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-month-week-events,
html[data-crm-theme="dark"] body.dir-classic .crm-month-segment-layer,
html[data-crm-theme="dark"] body.dir-classic .crm-month-event-layer,
html[data-crm-theme="dark"] body.dir-classic .crm-month-event-rail,
html[data-crm-theme="dark"] body.dir-classic .crm-month-segment-row {
  pointer-events: none !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-month-event,
html[data-crm-theme="dark"] body.dir-classic .crm-month-event-segment,
html[data-crm-theme="dark"] body.dir-classic .crm-week-event,
html[data-crm-theme="dark"] body.dir-classic [data-calendar-agenda-key] {
  pointer-events: auto !important;
}

html[data-crm-theme="dark"] body.dir-classic .modal,
html[data-crm-theme="dark"] body.dir-classic .modal-dialog,
html[data-crm-theme="dark"] body.dir-classic .modal-content,
html[data-crm-theme="dark"] body.dir-classic .modal-header,
html[data-crm-theme="dark"] body.dir-classic .modal-body,
html[data-crm-theme="dark"] body.dir-classic .modal-footer {
  background: #111827 !important;
  border-color: #293244 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .modal iframe,
html[data-crm-theme="dark"] body.dir-classic .crm-modal-iframe,
html[data-crm-theme="dark"] body.dir-classic .modal .crm-modal-page-content,
html[data-crm-theme="dark"] body.dir-classic .modal .crm-activity-form,
html[data-crm-theme="dark"] body.dir-classic .modal .card,
html[data-crm-theme="dark"] body.dir-classic .modal .card-body,
html[data-crm-theme="dark"] body.dir-classic .modal .crm-conditional-panel,
html[data-crm-theme="dark"] body.dir-classic .modal .crm-offer-mail-panel,
html[data-crm-theme="dark"] body.dir-classic .modal .crm-ai-note-panel {
  background: #151a24 !important;
  border-color: #293244 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .modal input,
html[data-crm-theme="dark"] body.dir-classic .modal select,
html[data-crm-theme="dark"] body.dir-classic .modal textarea,
html[data-crm-theme="dark"] body.dir-classic .modal .form-control,
html[data-crm-theme="dark"] body.dir-classic .modal .custom-select {
  background: #0b0f16 !important;
  border-color: #334155 !important;
  color: #e5e7eb !important;
  -webkit-text-fill-color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-outcome-option span,
html[data-crm-theme="dark"] body.dir-classic .crm-slot-button,
html[data-crm-theme="dark"] body.dir-classic .crm-range-slot-button,
html[data-crm-theme="dark"] body.dir-classic .crm-mini-calendar-day {
  background: #111827 !important;
  border-color: #334155 !important;
  color: #dbe4ff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-outcome-option input:checked + span,
html[data-crm-theme="dark"] body.dir-classic .crm-slot-button.is-selected,
html[data-crm-theme="dark"] body.dir-classic .crm-range-slot-button.is-selected,
html[data-crm-theme="dark"] body.dir-classic .crm-range-slot-button.is-in-range {
  background: rgba(99, 102, 241, .22) !important;
  border-color: #818cf8 !important;
  color: #ffffff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-metric-card,
html[data-crm-theme="dark"] body.dir-classic .crm-stat-card,
html[data-crm-theme="dark"] body.dir-classic .crm-kpi-card {
  background: #151a24 !important;
  border-color: #293244 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-metric-card:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-stat-card:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-kpi-card:hover {
  background: #1b2130 !important;
}

html[data-crm-theme="dark"] body.dir-classic.crm-modal-page,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-modal-page-content {
  background: #0b0f16 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-form-card,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-modal-form,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .card,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .card-body,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .card-action,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-conditional-panel,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-offer-mail-panel,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-ai-note-panel,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-mini-calendar,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-mini-calendar-day,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-offer-products-preview,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-rich-editor,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-rich-editor-toolbar {
  background: #151a24 !important;
  border-color: #293244 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic.crm-modal-page label,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-mini-calendar-title,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-panel-title-row strong,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-switch-copy strong {
  color: #f8fafc !important;
}

html[data-crm-theme="dark"] body.dir-classic.crm-modal-page small,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-card-muted,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-mini-calendar p,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-switch-copy small,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page [data-offer-send-note] {
  color: #94a3b8 !important;
}

html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .form-control,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .custom-select,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page input,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page select,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page textarea {
  background: #0b0f16 !important;
  border-color: #334155 !important;
  color: #e5e7eb !important;
  -webkit-text-fill-color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .btn-default {
  background: #111827 !important;
  border-color: #334155 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .btn-default:hover {
  background: #1b2130 !important;
}

html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-outcome-option span,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-slot-button,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-range-slot-button {
  background: #111827 !important;
  border-color: #334155 !important;
  color: #dbe4ff !important;
}

html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-outcome-option input:checked + span,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-slot-button.is-selected,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-range-slot-button.is-selected,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-range-slot-button.is-in-range {
  background: rgba(99, 102, 241, .22) !important;
  border-color: #818cf8 !important;
  color: #ffffff !important;
}

/* Dark-mode polish pass 2026-05-08. Keep this block last. */
body.dir-classic .crm-theme-toggle {
  align-items: center !important;
  display: inline-flex !important;
  height: 38px !important;
  justify-content: center !important;
  min-width: 38px !important;
  overflow: visible !important;
  padding: 0 !important;
  width: 38px !important;
}

body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon {
  align-items: center !important;
  color: currentColor !important;
  height: 20px !important;
  justify-content: center !important;
  line-height: 1 !important;
  opacity: 1 !important;
  visibility: visible !important;
  width: 20px !important;
}

body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon svg {
  display: block !important;
  height: 20px !important;
  overflow: visible !important;
  stroke: currentColor !important;
  width: 20px !important;
}

body.dir-classic .crm-theme-toggle:not(.is-active) .crm-theme-toggle-icon-dark,
html:not([data-crm-theme="dark"]) body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon-dark,
html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle.is-active .crm-theme-toggle-icon-light,
html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon-light {
  display: inline-flex !important;
}

body.dir-classic .crm-theme-toggle:not(.is-active) .crm-theme-toggle-icon-light,
body.dir-classic .crm-theme-toggle.is-active .crm-theme-toggle-icon-dark,
html:not([data-crm-theme="dark"]) body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon-light,
html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle .crm-theme-toggle-icon-dark {
  display: none !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-theme-toggle:focus {
  background: #312e81 !important;
  color: #ffffff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-board {
  overflow: visible !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day {
  position: relative !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day-number,
html[data-crm-theme="dark"] body.dir-classic button.crm-calendar-day-number {
  color: #dbeafe !important;
  display: inline-flex !important;
  min-height: 28px !important;
  min-width: 28px !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  position: relative !important;
  visibility: visible !important;
  z-index: 300 !important;
  -webkit-text-fill-color: #dbeafe !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-muted .crm-calendar-day-number {
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-today .crm-calendar-day-number,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-selected .crm-calendar-day-number {
  background: #6366f1 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

html[data-crm-theme="dark"] body.dir-classic input,
html[data-crm-theme="dark"] body.dir-classic select,
html[data-crm-theme="dark"] body.dir-classic textarea,
html[data-crm-theme="dark"] body.dir-classic .form-control,
html[data-crm-theme="dark"] body.dir-classic .custom-select {
  background: #0b0f16 !important;
  border-color: #334155 !important;
  color: #e5e7eb !important;
  caret-color: #e5e7eb !important;
  -webkit-text-fill-color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic input::placeholder,
html[data-crm-theme="dark"] body.dir-classic textarea::placeholder {
  color: #94a3b8 !important;
  opacity: 1 !important;
  -webkit-text-fill-color: #94a3b8 !important;
}

html[data-crm-theme="dark"] body.dir-classic input:focus,
html[data-crm-theme="dark"] body.dir-classic select:focus,
html[data-crm-theme="dark"] body.dir-classic textarea:focus,
html[data-crm-theme="dark"] body.dir-classic .form-control:focus,
html[data-crm-theme="dark"] body.dir-classic .custom-select:focus {
  background: #0b0f16 !important;
  border-color: #818cf8 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .24) !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-filter-card,
html[data-crm-theme="dark"] body.dir-classic .crm-filter-bar,
html[data-crm-theme="dark"] body.dir-classic .crm-filter-shell,
html[data-crm-theme="dark"] body.dir-classic .crm-search-field,
html[data-crm-theme="dark"] body.dir-classic .crm-search-control,
html[data-crm-theme="dark"] body.dir-classic .crm-index-search,
html[data-crm-theme="dark"] body.dir-classic .crm-index-search .input-group {
  background: #151a24 !important;
  border-color: #293244 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .table tbody tr:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-table tbody tr:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-list-row:hover {
  background: #1b2130 !important;
}

/* Calendar dark-mode month layout: explicit grid, visible dates and lighter empty cells. */
html[data-crm-theme="dark"] body.dir-classic .crm-week-planner-card,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-workspace,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid {
  background: #0b0f16 !important;
  border-color: #293244 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid {
  border: 1px solid #293244 !important;
  border-radius: 10px !important;
  overflow: hidden !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-weekday {
  background: #0f1724 !important;
  border-color: #293244 !important;
  color: #a8b5d8 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-month-week-row {
  background: transparent !important;
  border-color: #293244 !important;
  min-height: 168px !important;
  position: relative !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days {
  background: transparent !important;
  display: grid !important;
  grid-template-columns: repeat(7, minmax(118px, 1fr)) !important;
  height: 100% !important;
  position: relative !important;
  z-index: 1 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days .crm-calendar-day,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day {
  background: #151a24 !important;
  border-bottom: 1px solid #293244 !important;
  border-color: #293244 !important;
  border-right: 1px solid #293244 !important;
  color: #e5e7eb !important;
  min-height: 168px !important;
  padding: 42px 10px 10px !important;
  position: relative !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days .crm-calendar-day.is-muted,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day.is-muted {
  background: #111827 !important;
  color: #94a3b8 !important;
  opacity: 1 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days .crm-calendar-day:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day:hover {
  background: #1b2130 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day-number,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days button.crm-calendar-day-number {
  align-items: center !important;
  background: transparent !important;
  border: 0 !important;
  color: #cbd5e1 !important;
  display: inline-flex !important;
  font-weight: 700 !important;
  height: 28px !important;
  justify-content: center !important;
  left: 10px !important;
  line-height: 28px !important;
  margin: 0 !important;
  min-height: 28px !important;
  min-width: 28px !important;
  padding: 0 !important;
  position: absolute !important;
  top: 9px !important;
  width: 28px !important;
  z-index: 5 !important;
  -webkit-text-fill-color: #cbd5e1 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days .crm-calendar-day > .crm-month-event,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day > .crm-month-event,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-more {
  position: relative !important;
  z-index: 6 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day.is-muted .crm-calendar-day-number,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days .crm-calendar-day.is-muted .crm-calendar-day-number {
  color: #7f8ca8 !important;
  -webkit-text-fill-color: #7f8ca8 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day.is-today .crm-calendar-day-number,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days .crm-calendar-day.is-today .crm-calendar-day-number,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day.is-selected .crm-calendar-day-number,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days .crm-calendar-day.is-selected .crm-calendar-day-number {
  background: #6366f1 !important;
  border-radius: 999px !important;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, .22) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-month-segment-layer,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-events,
html[data-crm-theme="dark"] body.dir-classic .crm-month-event-layer,
html[data-crm-theme="dark"] body.dir-classic .crm-month-event-rail,
html[data-crm-theme="dark"] body.dir-classic .crm-month-segment-row {
  background: transparent !important;
  border-color: transparent !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-month-segment-layer {
  padding: 38px 8px 0 !important;
  z-index: 4 !important;
}

/* Dark-mode calendar and modal hardening 2026-05-08. Keep after prior WIP blocks. */
html[data-crm-theme="dark"] body.dir-classic .crm-week-planner-card,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-agenda,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-agenda .card-body {
  background: #0b0f16 !important;
  border-color: #293244 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-row,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days {
  background: #0b0f16 !important;
  border-color: #293244 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid {
  min-width: 826px !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days,
html[data-crm-theme="dark"] body.dir-classic .crm-month-segment-layer {
  grid-template-columns: repeat(7, minmax(118px, 1fr)) !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days .crm-calendar-day {
  align-content: start !important;
  background: #151a24 !important;
  border-color: #293244 !important;
  color: #e5e7eb !important;
  cursor: pointer !important;
  min-height: 168px !important;
  padding: 42px 10px 10px !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day.is-muted,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days .crm-calendar-day.is-muted {
  background: #111827 !important;
  color: #94a3b8 !important;
  opacity: 1 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day:focus-within,
html[data-crm-theme="dark"] body.dir-classic .crm-week-day-column:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-week-day-column:focus-within {
  background-color: #1b2130 !important;
  box-shadow: inset 0 0 0 1px rgba(129, 140, 248, .36) !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-weekday,
html[data-crm-theme="dark"] body.dir-classic .crm-week-corner,
html[data-crm-theme="dark"] body.dir-classic .crm-week-day-head,
html[data-crm-theme="dark"] body.dir-classic .crm-week-hours {
  background: #0f1724 !important;
  border-color: #293244 !important;
  color: #cbd5e1 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-week-day-column {
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 31px,
      rgba(148, 163, 184, .12) 32px,
      transparent 33px,
      transparent 63px,
      rgba(148, 163, 184, .18) 64px
    ),
    #151a24 !important;
  border-color: #293244 !important;
  color: #e5e7eb !important;
  cursor: pointer !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-week-day-column.is-today,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-day.is-today {
  box-shadow: inset 0 0 0 2px rgba(129, 140, 248, .56) !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-week-offhours {
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(148, 163, 184, .10),
      rgba(148, 163, 184, .10) 8px,
      rgba(148, 163, 184, .04) 8px,
      rgba(148, 163, 184, .04) 16px
    ),
    #10131a !important;
  color: #94a3b8 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-list-item {
  background: #151a24 !important;
  border-color: #293244 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-list-item:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-list-item.is-agenda-selected {
  background: #1b2130 !important;
  border-color: #818cf8 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-list-content strong,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-list-time strong {
  color: #f8fafc !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-list-content p,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-list-note,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-list-time span {
  color: #94a3b8 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-month-event,
html[data-crm-theme="dark"] body.dir-classic .crm-week-event,
html[data-crm-theme="dark"] body.dir-classic .crm-month-event-segment {
  box-shadow: none !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-month-event strong,
html[data-crm-theme="dark"] body.dir-classic .crm-week-event strong,
html[data-crm-theme="dark"] body.dir-classic .crm-month-event-segment strong {
  color: #f8fafc !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-month-event small,
html[data-crm-theme="dark"] body.dir-classic .crm-week-event small,
html[data-crm-theme="dark"] body.dir-classic .crm-month-event-segment span,
html[data-crm-theme="dark"] body.dir-classic .crm-month-event-segment small,
html[data-crm-theme="dark"] body.dir-classic .crm-month-event-time {
  color: #cbd5e1 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-iframe-modal .modal-content,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-modal .modal-content,
html[data-crm-theme="dark"] body.dir-classic .crm-drawer-modal .modal-content {
  background: #111827 !important;
  border-color: #293244 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-iframe-modal .modal-header,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-modal .modal-header,
html[data-crm-theme="dark"] body.dir-classic .crm-drawer-modal .modal-header,
html[data-crm-theme="dark"] body.dir-classic .crm-iframe-modal .modal-body,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-modal .modal-body,
html[data-crm-theme="dark"] body.dir-classic .crm-drawer-modal .modal-body {
  background: #111827 !important;
  border-color: #293244 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .card-action,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-form-actions {
  background: #151a24 !important;
  border-color: #293244 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-line-table,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-line-row,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-offer-products-preview pre {
  background: #0b0f16 !important;
  border-color: #334155 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-switch-control {
  background: #0b0f16 !important;
  border-color: #475569 !important;
}

html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-switch-field input:checked + .crm-switch-control {
  background: #4f46e5 !important;
  border-color: #818cf8 !important;
}

html[data-crm-theme="dark"] body.dir-classic.crm-modal-page input[type="range"] {
  accent-color: #818cf8 !important;
  -webkit-text-fill-color: initial !important;
}

/* Dark calendar readability fix 2026-05-08. This intentionally overrides older dark-mode patches. */
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-page {
  background: #070b12 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-toolbar,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-toolbar .card-body {
  background: #111827 !important;
  border-color: #263244 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-workspace {
  background: #070b12 !important;
  gap: 20px !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-week-planner-card {
  background: #0d131f !important;
  border: 1px solid #263244 !important;
  border-radius: 12px !important;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .28) !important;
  overflow: auto !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid {
  background: #263244 !important;
  border: 1px solid #263244 !important;
  border-radius: 12px !important;
  display: grid !important;
  grid-template-columns: repeat(7, minmax(118px, 1fr)) !important;
  min-width: 826px !important;
  overflow: hidden !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid::before,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid::after,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-row::before,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-row::after,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days::before,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days::after {
  content: none !important;
  display: none !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-weekday {
  background: #111827 !important;
  border: 0 !important;
  border-bottom: 1px solid #263244 !important;
  color: #a5b4fc !important;
  font-size: 11px !important;
  font-weight: 850 !important;
  letter-spacing: 0 !important;
  min-height: 38px !important;
  padding: 12px 14px !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-month-week-row {
  background: #263244 !important;
  border: 0 !important;
  display: grid !important;
  grid-column: 1 / -1 !important;
  min-height: 156px !important;
  position: relative !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days {
  background: #263244 !important;
  display: grid !important;
  grid-template-columns: repeat(7, minmax(118px, 1fr)) !important;
  min-height: 156px !important;
  position: relative !important;
  z-index: 1 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days .crm-calendar-day {
  align-content: start !important;
  background: #121a28 !important;
  border: 0 !important;
  border-right: 1px solid #263244 !important;
  border-bottom: 1px solid #263244 !important;
  box-shadow: none !important;
  color: #e5e7eb !important;
  cursor: pointer !important;
  display: block !important;
  min-height: 156px !important;
  opacity: 1 !important;
  padding: 44px 10px 10px !important;
  position: relative !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days .crm-calendar-day:nth-child(6),
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days .crm-calendar-day:nth-child(7) {
  background: #101827 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day.is-muted,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days .crm-calendar-day.is-muted {
  background: #0c111b !important;
  color: #7f8ca8 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day:focus-within,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days .crm-calendar-day:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days .crm-calendar-day:focus-within {
  background: #182235 !important;
  box-shadow: inset 0 0 0 1px rgba(129, 140, 248, .42) !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day-number,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days .crm-calendar-day-number,
html[data-crm-theme="dark"] body.dir-classic button.crm-calendar-day-number {
  align-items: center !important;
  appearance: none !important;
  background: rgba(15, 23, 36, .92) !important;
  border: 1px solid rgba(148, 163, 184, .28) !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  color: #f8fafc !important;
  display: inline-flex !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  height: 26px !important;
  justify-content: center !important;
  left: 10px !important;
  line-height: 1 !important;
  margin: 0 !important;
  min-height: 26px !important;
  min-width: 26px !important;
  opacity: 1 !important;
  padding: 0 8px !important;
  pointer-events: auto !important;
  position: absolute !important;
  text-shadow: none !important;
  top: 10px !important;
  visibility: visible !important;
  width: auto !important;
  z-index: 1000 !important;
  -webkit-text-fill-color: #f8fafc !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day.is-muted .crm-calendar-day-number,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days .crm-calendar-day.is-muted .crm-calendar-day-number {
  background: rgba(8, 13, 22, .92) !important;
  border-color: rgba(100, 116, 139, .22) !important;
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day.is-today,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days .crm-calendar-day.is-today {
  background: #172033 !important;
  box-shadow: inset 0 0 0 2px #6366f1 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day.is-today .crm-calendar-day-number,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days .crm-calendar-day.is-today .crm-calendar-day-number {
  background: #6366f1 !important;
  border-color: #a5b4fc !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-month-segment-layer {
  background: transparent !important;
  border: 0 !important;
  display: grid !important;
  gap: 5px !important;
  grid-template-columns: repeat(7, minmax(118px, 1fr)) !important;
  grid-template-rows: repeat(4, 24px) !important;
  left: 0 !important;
  padding: 44px 8px 0 !important;
  pointer-events: none !important;
  position: absolute !important;
  right: 0 !important;
  top: 0 !important;
  z-index: 20 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-month-event,
html[data-crm-theme="dark"] body.dir-classic .crm-month-event-segment {
  background: color-mix(in srgb, var(--event-color, #818cf8) 32%, #111827) !important;
  border: 1px solid color-mix(in srgb, var(--event-color, #818cf8) 62%, #263244) !important;
  color: #f8fafc !important;
  pointer-events: auto !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-more {
  background: #0b1020 !important;
  border: 1px solid #263244 !important;
  color: #cbd5e1 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-agenda {
  background: #111827 !important;
  border: 1px solid #263244 !important;
  border-radius: 12px !important;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .28) !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-agenda .card-header,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-agenda .card-body {
  background: #111827 !important;
  border-color: #263244 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-agenda .crm-empty-state {
  background: #0d131f !important;
  border: 1px solid #263244 !important;
  color: #e5e7eb !important;
}

/* Dark modal alert fix 2026-05-08: Bootstrap alerts inside iframe modals. */
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .alert,
html[data-crm-theme="dark"] body.dir-classic .crm-iframe-modal .alert,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-modal .alert {
  border-width: 1px !important;
  box-shadow: none !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .alert-success,
html[data-crm-theme="dark"] body.dir-classic .crm-iframe-modal .alert-success,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-modal .alert-success {
  background: rgba(6, 78, 59, .82) !important;
  border-color: rgba(52, 211, 153, .42) !important;
  color: #bbf7d0 !important;
}

html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .alert-success strong,
html[data-crm-theme="dark"] body.dir-classic .crm-iframe-modal .alert-success strong,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-modal .alert-success strong {
  color: #dcfce7 !important;
}

html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .alert-warning,
html[data-crm-theme="dark"] body.dir-classic .crm-iframe-modal .alert-warning,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-modal .alert-warning {
  background: rgba(69, 26, 3, .86) !important;
  border-color: rgba(251, 191, 36, .42) !important;
  color: #fde68a !important;
}

html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .alert-danger,
html[data-crm-theme="dark"] body.dir-classic .crm-iframe-modal .alert-danger,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-modal .alert-danger {
  background: rgba(69, 10, 10, .86) !important;
  border-color: rgba(248, 113, 113, .42) !important;
  color: #fecaca !important;
}

html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .alert-info,
html[data-crm-theme="dark"] body.dir-classic .crm-iframe-modal .alert-info,
html[data-crm-theme="dark"] body.dir-classic .crm-activity-modal .alert-info {
  background: rgba(12, 74, 110, .84) !important;
  border-color: rgba(56, 189, 248, .42) !important;
  color: #bae6fd !important;
}

/* Dark mode completion pass 2026-05-08: calendar forms, mail compose and modal controls. */
html[data-crm-theme="dark"] body.dir-classic .crm-offer-mail-panel,
html[data-crm-theme="dark"] body.dir-classic .crm-offer-compose-preview,
html[data-crm-theme="dark"] body.dir-classic .crm-offer-compose-preview-grid article,
html[data-crm-theme="dark"] body.dir-classic .crm-offer-compose-preview-card,
html[data-crm-theme="dark"] body.dir-classic .crm-offer-products-preview,
html[data-crm-theme="dark"] body.dir-classic .crm-muted-panel,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-event-form .crm-free-box,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-event-form .crm-conflict-box,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-event-form .crm-mini-calendar,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-event-form .crm-mini-calendar-day,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-event-form .crm-range-toggle,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-event-form .crm-check-toggle,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-free-box,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-conflict-box,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-mini-calendar,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-mini-calendar-day,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-range-toggle,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-check-toggle {
  background: #111827 !important;
  border-color: #263244 !important;
  color: #e5e7eb !important;
  box-shadow: none !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-offer-mail-panel strong,
html[data-crm-theme="dark"] body.dir-classic .crm-offer-compose-preview-card strong,
html[data-crm-theme="dark"] body.dir-classic .crm-offer-compose-preview-grid strong,
html[data-crm-theme="dark"] body.dir-classic .crm-muted-panel strong,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-event-form .crm-free-box strong,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-event-form .crm-conflict-box strong,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-event-form .crm-mini-calendar-title,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-event-form .crm-mini-calendar-day > strong,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-event-form .crm-range-toggle label strong,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-event-form .crm-check-toggle strong,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-free-box strong,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-conflict-box strong,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-mini-calendar-title,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-mini-calendar-day > strong,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-range-toggle label strong,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-check-toggle strong {
  color: #f8fafc !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-offer-mail-panel p,
html[data-crm-theme="dark"] body.dir-classic .crm-offer-mail-panel small,
html[data-crm-theme="dark"] body.dir-classic .crm-offer-compose-preview-grid span,
html[data-crm-theme="dark"] body.dir-classic .crm-offer-compose-preview-grid small,
html[data-crm-theme="dark"] body.dir-classic .crm-muted-panel p,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-event-form .crm-free-box p,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-event-form .crm-conflict-box p,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-event-form .crm-mini-calendar-header p,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-event-form .crm-mini-calendar-day > span,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-event-form .crm-check-toggle small,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-free-box p,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-conflict-box p,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-mini-calendar-header p,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-mini-calendar-day > span,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-check-toggle small,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .form-text,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .text-muted {
  color: #cbd5e1 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-event-form .crm-free-box,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-free-box {
  background: rgba(6, 78, 59, .28) !important;
  border-color: rgba(52, 211, 153, .38) !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-event-form .crm-free-box strong,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-free-box strong {
  color: #bbf7d0 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-event-form .crm-conflict-box,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-conflict-box {
  background: rgba(69, 10, 10, .35) !important;
  border-color: rgba(248, 113, 113, .38) !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-calendar-event-form .crm-conflict-box strong,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-conflict-box strong {
  color: #fecaca !important;
}

html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-range-slot-button,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-slot-button,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-range-toggle label,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-mini-calendar-controls .btn,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-mini-calendar-controls .form-control,
html[data-crm-theme="dark"] body.dir-classic .crm-offer-mail-panel .form-control,
html[data-crm-theme="dark"] body.dir-classic .crm-offer-html-editor,
html[data-crm-theme="dark"] body.dir-classic .crm-offer-mail-editor,
html[data-crm-theme="dark"] body.dir-classic .crm-html-source-textarea {
  background: #0b1220 !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-range-slot-button small,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-slot-button small {
  color: #94a3b8 !important;
}

html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-range-slot-button.is-free {
  background: rgba(6, 78, 59, .28) !important;
  border-color: rgba(52, 211, 153, .34) !important;
}

html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-range-slot-button.is-busy {
  background: rgba(69, 10, 10, .3) !important;
  border-color: rgba(248, 113, 113, .34) !important;
}

html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-range-slot-button.is-selected,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-range-slot-button.is-in-range,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-range-toggle input:checked + span,
html[data-crm-theme="dark"] body.dir-classic.crm-modal-page .crm-check-toggle input:checked + .crm-check-toggle-box {
  background: #4f46e5 !important;
  border-color: #a5b4fc !important;
  color: #ffffff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-editor-toolbar,
html[data-crm-theme="dark"] body.dir-classic .crm-rich-editor-toolbar {
  background: #0b1220 !important;
  border-color: #334155 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-editor-toolbar .btn,
html[data-crm-theme="dark"] body.dir-classic .crm-rich-editor-toolbar .btn {
  background: #111827 !important;
  border-color: #334155 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-editor-toolbar .btn:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-rich-editor-toolbar .btn:hover {
  background: #1f2937 !important;
  border-color: #818cf8 !important;
  color: #ffffff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-ai-audit-meta,
html[data-crm-theme="dark"] body.dir-classic .crm-ai-audit-block,
html[data-crm-theme="dark"] body.dir-classic .crm-ai-audit-context,
html[data-crm-theme="dark"] body.dir-classic .crm-ai-audit-context pre,
html[data-crm-theme="dark"] body.dir-classic .crm-ai-audit-rules ul {
  background: #111827 !important;
  border-color: #263244 !important;
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-ai-audit-context summary,
html[data-crm-theme="dark"] body.dir-classic .crm-ai-audit-rules li,
html[data-crm-theme="dark"] body.dir-classic .crm-ai-audit-block strong {
  color: #f8fafc !important;
}

/* Calendar dark layout hardening 2026-05-08: keep all seven month columns visible. */
.dir-classic .crm-calendar-workspace {
  min-width: 0;
}

.dir-classic .crm-calendar-workspace > .crm-week-planner-card,
.dir-classic .crm-calendar-workspace > .crm-calendar-agenda {
  min-width: 0;
}

.dir-classic .crm-calendar-month-grid,
.dir-classic .crm-month-week-days,
.dir-classic .crm-month-segment-layer,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days,
html[data-crm-theme="dark"] body.dir-classic .crm-month-segment-layer {
  grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
}

.dir-classic .crm-calendar-month-grid .crm-calendar-day,
.dir-classic .crm-month-week-days .crm-calendar-day,
html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day,
html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days .crm-calendar-day {
  min-width: 0 !important;
}

@media (max-width: 1480px) {
  .dir-classic .crm-calendar-workspace {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .dir-classic .crm-calendar-agenda {
    width: 100%;
  }
}

@media (max-width: 1100px) {
  .dir-classic .crm-calendar-month-grid .crm-calendar-day,
  .dir-classic .crm-month-week-days .crm-calendar-day,
  html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day,
  html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days .crm-calendar-day {
    min-height: 128px !important;
    padding-left: 7px !important;
    padding-right: 7px !important;
  }

  html[data-crm-theme="dark"] body.dir-classic .crm-calendar-month-grid .crm-calendar-day-number,
  html[data-crm-theme="dark"] body.dir-classic .crm-month-week-days .crm-calendar-day-number,
  html[data-crm-theme="dark"] body.dir-classic button.crm-calendar-day-number {
    left: 7px !important;
    top: 8px !important;
  }
}

/* Topbar layout hardening 2026-05-12: keep profile compact and page titles below the fixed header. */
.dir-classic .navbar-header .container-fluid {
  display: flex !important;
  flex-wrap: nowrap !important;
  min-width: 0 !important;
}

.dir-classic .crm-topbar-workspace {
  flex: 1 1 auto !important;
  grid-template-columns: minmax(220px, 300px) minmax(260px, 1fr) !important;
  min-width: 0 !important;
}

.dir-classic .topbar-nav {
  flex: 0 0 auto !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  min-width: 0 !important;
}

.dir-classic .crm-user-dropdown .profile-pic {
  align-items: center !important;
  display: inline-flex !important;
  gap: 8px !important;
  max-width: 174px !important;
  min-width: 0 !important;
  white-space: nowrap !important;
}

.dir-classic .crm-user-dropdown .profile-pic .crm-avatar,
.dir-classic .crm-user-dropdown .profile-pic .crm-avatar-image {
  flex: 0 0 auto !important;
  margin-right: 0 !important;
}

.dir-classic .crm-user-dropdown .profile-pic > span:not(.crm-avatar) {
  display: inline-block !important;
  max-width: 118px !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.dir-classic .main-panel > .content {
  padding-top: 42px !important;
}

@media (max-width: 1200px) {
  .dir-classic .crm-topbar-workspace {
    grid-template-columns: minmax(180px, 260px) minmax(220px, 1fr) !important;
  }

  .dir-classic .crm-user-dropdown .profile-pic {
    max-width: 138px !important;
  }

  .dir-classic .crm-user-dropdown .profile-pic > span:not(.crm-avatar) {
    max-width: 84px !important;
  }
}

/* UI audit polish 2026-05-12: repeated list tabs, selects, file inputs and compact topbar controls. */
.dir-classic select.form-control,
.dir-classic select.custom-select {
  appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 7.5 10 12.5 15 7.5' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-position: right 12px center !important;
  background-repeat: no-repeat !important;
  background-size: 14px 14px !important;
  padding-right: 38px !important;
}

.dir-classic input[type="file"].form-control,
.dir-classic input[type="file"] {
  min-height: 42px;
}

.dir-classic input[type="file"]::file-selector-button {
  background: #eef2ff;
  border: 0;
  border-right: 1px solid #d8e0ec;
  color: #3730a3;
  font-weight: 700;
  height: 100%;
  margin: -7px 12px -7px -12px;
  padding: 9px 14px;
}

.dir-classic .crm-index-tabs a,
.dir-classic .crm-index-tabs span {
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.dir-classic .crm-index-tabs a:focus-visible,
.dir-classic .crm-index-tabs span:focus-visible,
.dir-classic .btn:focus-visible,
.dir-classic .form-control:focus-visible {
  outline: 2px solid rgba(99, 102, 241, .42);
  outline-offset: 2px;
}

html[data-crm-theme="dark"] body.dir-classic .btn-default,
html[data-crm-theme="dark"] body.dir-classic .dropdown-toggle.btn-default,
html[data-crm-theme="dark"] body.dir-classic .btn-outline-secondary,
html[data-crm-theme="dark"] body.dir-classic .btn-light {
  background: #111827 !important;
  border-color: #334155 !important;
  box-shadow: none !important;
  color: #dbe4ff !important;
  -webkit-text-fill-color: #dbe4ff !important;
}

html[data-crm-theme="dark"] body.dir-classic .btn-default:hover,
html[data-crm-theme="dark"] body.dir-classic .btn-default:focus,
html[data-crm-theme="dark"] body.dir-classic .dropdown-toggle.btn-default:hover,
html[data-crm-theme="dark"] body.dir-classic .dropdown-toggle.btn-default:focus,
html[data-crm-theme="dark"] body.dir-classic .btn-outline-secondary:hover,
html[data-crm-theme="dark"] body.dir-classic .btn-outline-secondary:focus,
html[data-crm-theme="dark"] body.dir-classic .btn-light:hover,
html[data-crm-theme="dark"] body.dir-classic .btn-light:focus {
  background: #20283a !important;
  border-color: #818cf8 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-index-tabs a,
html[data-crm-theme="dark"] body.dir-classic .crm-index-tabs span {
  background: #111827 !important;
  border-color: #334155 !important;
  box-shadow: none !important;
  color: #dbe4ff !important;
  -webkit-text-fill-color: #dbe4ff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-index-tabs a:hover,
html[data-crm-theme="dark"] body.dir-classic .crm-index-tabs a:focus,
html[data-crm-theme="dark"] body.dir-classic .crm-index-tabs a.active {
  background: #312e81 !important;
  border-color: #818cf8 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-index-tabs strong,
html[data-crm-theme="dark"] body.dir-classic .crm-index-tabs a span {
  background: transparent !important;
  border: 0 !important;
  color: #a5b4fc !important;
  -webkit-text-fill-color: #a5b4fc !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-index-tabs a:hover span,
html[data-crm-theme="dark"] body.dir-classic .crm-index-tabs a.active span {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

html[data-crm-theme="dark"] body.dir-classic select.form-control,
html[data-crm-theme="dark"] body.dir-classic select.custom-select {
  background-color: #0b0f16 !important;
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 7.5 10 12.5 15 7.5' fill='none' stroke='%23cbd5e1' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-position: right 12px center !important;
  background-repeat: no-repeat !important;
  background-size: 14px 14px !important;
}

html[data-crm-theme="dark"] body.dir-classic input[type="file"]::file-selector-button {
  background: #111827;
  border-right: 1px solid #334155;
  color: #dbe4ff;
}

/* Monthly reports module. */
.dir-classic .crm-reports {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dir-classic .crm-reports-topbar {
  align-items: flex-start;
  gap: 16px;
}

.dir-classic .crm-report-month-form .form-control {
  min-height: 34px;
  min-width: 150px;
}

.dir-classic .crm-report-tabs {
  align-items: center;
  background: #eef2f7;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  display: inline-flex;
  padding: 3px;
}

.dir-classic .crm-report-tabs a {
  border-radius: 6px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 12px;
}

.dir-classic .crm-report-tabs a.active {
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .12);
  color: #111827;
}

.dir-classic .crm-report-kpis .crm-kpi-card p {
  margin-bottom: 0;
}

.dir-classic .crm-report-chart-card,
.dir-classic .crm-report-table-card,
.dir-classic .crm-report-team-card,
.dir-classic .crm-report-summary-card {
  border: 1px solid #dce3ee;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .05);
}

.dir-classic .crm-report-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 12px;
  font-weight: 700;
}

.dir-classic .crm-report-legend span,
.dir-classic .crm-report-card-head,
.dir-classic .crm-report-person,
.dir-classic .crm-report-members div {
  align-items: center;
  display: flex;
  gap: 8px;
}

.dir-classic .crm-report-legend i {
  border-radius: 999px;
  display: inline-block;
  height: 3px;
  width: 24px;
}

.dir-classic .crm-report-legend .is-plan,
.dir-classic .crm-report-bars .is-plan {
  background: #6366f1;
}

.dir-classic .crm-report-legend .is-won,
.dir-classic .crm-report-bars .is-won {
  background: #16a34a;
}

.dir-classic .crm-report-legend .is-forecast {
  background: repeating-linear-gradient(to right, #f59e0b 0 8px, transparent 8px 13px);
}

.dir-classic .crm-report-bars {
  align-items: end;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(6, minmax(70px, 1fr));
  min-height: 250px;
}

.dir-classic .crm-report-bar-group {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dir-classic .crm-report-bar-pair {
  align-items: end;
  background: linear-gradient(to top, #e5e7eb 1px, transparent 1px);
  background-size: 100% 25%;
  border-bottom: 1px solid #cbd5e1;
  display: flex;
  gap: 8px;
  height: 210px;
  justify-content: center;
  width: 100%;
}

.dir-classic .crm-report-bar-pair span {
  border-radius: 8px 8px 0 0;
  display: block;
  min-height: 3px;
  width: 18px;
}

.dir-classic .crm-report-bar-group small {
  color: #64748b;
  font-weight: 700;
}

.dir-classic .crm-report-line-chart {
  display: grid;
  gap: 12px;
  grid-template-columns: 64px minmax(0, 1fr);
  position: relative;
}

.dir-classic .crm-report-line-chart svg {
  display: block;
  height: 330px;
  width: 100%;
}

.dir-classic .crm-report-line-chart line {
  stroke: #dbe3ee;
  stroke-dasharray: 2.5 3.5;
  stroke-width: .35;
}

.dir-classic .crm-report-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.15;
  vector-effect: non-scaling-stroke;
}

.dir-classic .crm-report-line.is-plan,
.dir-classic .crm-report-dot.is-plan {
  stroke: #6366f1;
}

.dir-classic .crm-report-line.is-won,
.dir-classic .crm-report-dot.is-won {
  stroke: #16a34a;
}

.dir-classic .crm-report-line.is-forecast,
.dir-classic .crm-report-dot.is-forecast {
  stroke: #f59e0b;
}

.dir-classic .crm-report-line.is-forecast {
  stroke-dasharray: 8 6;
  stroke-width: 2;
}

.dir-classic .crm-report-dot {
  fill: #ffffff;
  stroke-width: 1.35;
  vector-effect: non-scaling-stroke;
}

.dir-classic .crm-report-area.is-forecast {
  fill: rgba(245, 158, 11, .12);
  stroke: none;
}

.dir-classic .crm-report-chart-scale {
  color: #64748b;
  display: flex;
  flex-direction: column;
  font-size: 11px;
  font-weight: 700;
  grid-row: 1 / span 1;
  justify-content: space-between;
  padding: 50px 0 34px;
  text-align: right;
}

.dir-classic .crm-report-chart-labels {
  display: grid;
  font-size: 11px;
  font-weight: 800;
  gap: 10px;
  grid-column: 2;
  grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
  min-width: 0;
}

.dir-classic .crm-report-chart-labels span {
  color: #64748b;
  min-width: 0;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dir-classic .crm-report-line-label {
  background: #ffffff;
  border: 1px solid #bae6fd;
  border-radius: 999px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .10);
  color: #0369a1;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  max-width: 132px;
  overflow: hidden;
  padding: 6px 8px;
  position: absolute;
  right: 8px;
  text-overflow: ellipsis;
  transform: translateY(-50%);
  white-space: nowrap;
  z-index: 2;
}

.dir-classic .crm-report-line-label.is-forecast {
  border-color: #fed7aa;
  color: #b45309;
}

.dir-classic .crm-report-layout {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 320px;
}

.dir-classic .crm-report-table {
  color: #1f2937;
  font-size: 13px;
}

.dir-classic .crm-report-table thead th {
  background: #f1f5f9;
  border-bottom: 1px solid #dbe3ee;
  color: #64748b;
  font-size: 11px;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.dir-classic .crm-report-table td,
.dir-classic .crm-report-table th {
  border-color: #e2e8f0;
  vertical-align: middle;
}

.dir-classic .crm-avatar-sm {
  font-size: 10px;
  height: 26px;
  line-height: 26px;
  width: 26px;
}

.dir-classic .crm-report-percent {
  display: inline-block;
  font-weight: 800;
  min-width: 42px;
}

.dir-classic .crm-report-mini-bar,
.dir-classic .crm-report-progress {
  background: #e5e7eb;
  border-radius: 999px;
  height: 7px;
  overflow: hidden;
}

.dir-classic .crm-report-mini-bar {
  margin-top: 5px;
  width: 110px;
}

.dir-classic .crm-report-mini-bar span,
.dir-classic .crm-report-progress span {
  background: linear-gradient(90deg, #6366f1, #14b8a6);
  border-radius: inherit;
  display: block;
  height: 100%;
}

.dir-classic .crm-report-summary-card {
  background: #ffffff;
  border-radius: 8px;
  padding: 20px;
  position: sticky;
  top: 92px;
}

.dir-classic .crm-report-summary-card > span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.dir-classic .crm-report-summary-card > strong {
  color: #111827;
  display: block;
  font-size: 44px;
  line-height: 1;
  margin: 10px 0 14px;
}

.dir-classic .crm-report-summary-card dl,
.dir-classic .crm-report-stats {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
}

.dir-classic .crm-report-summary-card dl div,
.dir-classic .crm-report-stats div {
  display: flex;
  justify-content: space-between;
}

.dir-classic .crm-report-summary-card dt,
.dir-classic .crm-report-stats dt {
  color: #64748b;
  font-weight: 700;
}

.dir-classic .crm-report-summary-card dd,
.dir-classic .crm-report-stats dd {
  color: #111827;
  font-weight: 800;
  margin: 0;
}

.dir-classic .crm-report-team-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.dir-classic .crm-report-team-card {
  background: #ffffff;
  border-radius: 8px;
  padding: 18px;
}

.dir-classic .crm-report-card-head {
  justify-content: space-between;
}

.dir-classic .crm-report-card-head span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.dir-classic .crm-report-card-head strong {
  color: #111827;
  display: block;
  font-size: 19px;
}

.dir-classic .crm-report-ring {
  align-items: center;
  background: conic-gradient(#6366f1 var(--report-progress), #e5e7eb 0);
  border-radius: 50%;
  display: flex;
  height: 58px;
  justify-content: center;
  position: relative;
  width: 58px;
}

.dir-classic .crm-report-ring::before {
  background: #ffffff;
  border-radius: 50%;
  content: "";
  height: 42px;
  position: absolute;
  width: 42px;
}

.dir-classic .crm-report-ring b {
  color: #111827;
  font-size: 13px;
  position: relative;
}

.dir-classic .crm-report-members {
  border-top: 1px solid #e2e8f0;
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
}

.dir-classic .crm-report-members div {
  justify-content: space-between;
}

.dir-classic .crm-report-members strong {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-crm-theme="dark"] body.dir-classic .crm-report-tabs {
  background: #0b0f16 !important;
  border-color: #263244 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-report-tabs a {
  color: #cbd5e1 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-report-tabs a.active {
  background: #20283a !important;
  box-shadow: none !important;
  color: #ffffff !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-report-chart-card,
html[data-crm-theme="dark"] body.dir-classic .crm-report-table-card,
html[data-crm-theme="dark"] body.dir-classic .crm-report-team-card,
html[data-crm-theme="dark"] body.dir-classic .crm-report-summary-card {
  background: #111827 !important;
  border-color: #263244 !important;
  box-shadow: none !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-report-table {
  color: #e5e7eb !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-report-table thead th {
  background: #0b0f16 !important;
  border-color: #263244 !important;
  color: #a5b4fc !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-report-table td,
html[data-crm-theme="dark"] body.dir-classic .crm-report-table th {
  border-color: #263244 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-report-bar-pair {
  background: linear-gradient(to top, rgba(71, 85, 105, .45) 1px, transparent 1px) !important;
  background-size: 100% 25% !important;
  border-bottom-color: #334155 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-report-line-chart line {
  stroke: #263244 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-report-dot {
  fill: #111827 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-report-area.is-forecast {
  fill: rgba(245, 158, 11, .13) !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-report-line-label {
  background: #0b0f16 !important;
  border-color: #f59e0b !important;
  box-shadow: none !important;
  color: #fde68a !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-report-line-label.is-forecast {
  border-color: #f59e0b !important;
  color: #fde68a !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-report-mini-bar,
html[data-crm-theme="dark"] body.dir-classic .crm-report-progress {
  background: #263244 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-report-summary-card > strong,
html[data-crm-theme="dark"] body.dir-classic .crm-report-summary-card dd,
html[data-crm-theme="dark"] body.dir-classic .crm-report-stats dd,
html[data-crm-theme="dark"] body.dir-classic .crm-report-card-head strong,
html[data-crm-theme="dark"] body.dir-classic .crm-report-ring b,
html[data-crm-theme="dark"] body.dir-classic .crm-report-members strong {
  color: #f8fafc !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-report-summary-card dt,
html[data-crm-theme="dark"] body.dir-classic .crm-report-stats dt,
html[data-crm-theme="dark"] body.dir-classic .crm-report-card-head span,
html[data-crm-theme="dark"] body.dir-classic .crm-report-bar-group small,
html[data-crm-theme="dark"] body.dir-classic .crm-report-chart-labels span,
html[data-crm-theme="dark"] body.dir-classic .crm-report-chart-scale,
html[data-crm-theme="dark"] body.dir-classic .crm-report-summary-card > span {
  color: #cbd5e1 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-report-ring::before {
  background: #111827 !important;
}

html[data-crm-theme="dark"] body.dir-classic .crm-report-members {
  border-color: #263244 !important;
}

@media (max-width: 1100px) {
  .dir-classic .crm-report-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .dir-classic .crm-report-summary-card {
    position: static;
  }
}

@media (max-width: 760px) {
  .dir-classic .crm-reports-topbar,
  .dir-classic .crm-reports-topbar .crm-dashboard-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .dir-classic .crm-report-bars {
    gap: 10px;
    grid-template-columns: repeat(6, minmax(42px, 1fr));
  }

  .dir-classic .crm-report-bar-pair span {
    width: 12px;
  }

  .dir-classic .crm-report-line-chart {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .dir-classic .crm-report-line-chart svg {
    height: 220px;
  }

  .dir-classic .crm-report-chart-labels {
    font-size: 10px;
    grid-template-columns: repeat(auto-fit, minmax(52px, 1fr));
  }
}

@media (max-width: 1500px) {
  .dir-classic .crm-user-dropdown .profile-pic {
    max-width: 54px !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
  }

  .dir-classic .crm-user-dropdown .profile-pic > span:not(.crm-avatar) {
    display: none !important;
  }
}

/* Topbar width guard 2026-05-14: page containers can be capped, but header controls must span the full content shell. */
.dir-classic .navbar-header > .container-fluid {
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: none !important;
  width: 100% !important;
}

.crm-login-page {
  background: #f3f6fb;
  min-height: 100vh;
}

.crm-login-shell {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 16px;
}

.crm-login-card {
  background: #fff;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
  max-width: 440px;
  padding: 32px;
  width: 100%;
}

.crm-login-brand {
  align-items: center;
  display: flex;
  gap: 14px;
  margin-bottom: 24px;
}

.crm-login-brand h1 {
  color: #07111f;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
  margin: 0;
}

.crm-login-form .form-control {
  min-height: 44px;
}

html[data-crm-theme="dark"] .crm-login-page {
  background: #080e17;
}

html[data-crm-theme="dark"] .crm-login-card {
  background: #111827;
  border-color: #2b3648;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

html[data-crm-theme="dark"] .crm-login-brand h1 {
  color: #f8fafc;
}
