/*
 * WOOLLY CRM application theme
 * ----------------------------
 * Loaded last by every application shell. This file is the single colour
 * authority for the product. Legacy token names such as "blue", "navy" and
 * "orange" remain because existing screens consume them; they resolve to the
 * approved navy, charcoal, warm beige, soft gray, cream and white palette.
 */

:root {
  color-scheme: light;

  /* Core brand */
  --crm-brand-navy: #1d3557;
  --crm-brand-navy-deep: #14253c;
  --crm-brand-blue: #284b73;
  --crm-brand-blue-soft: #eef2f6;
  --crm-brand-orange: #b59670;
  --crm-brand-orange-soft: #fbf7ee;

  /* Application chrome */
  --crm-sidebar-bg: #1d3557;
  --crm-sidebar-bg-strong: #252525;
  --crm-sidebar-text: #ffffff;
  --crm-sidebar-muted: #d6c2a7;
  --crm-sidebar-active: #d6c2a7;
  --crm-border: #dde1e5;
  --crm-content-bg: #fbf7ee;
  --crm-surface: #ffffff;
  --crm-text: #252525;
  --crm-muted: #667085;

  /* Informational styling follows the brand; semantic success and warning
     tokens stay green/amber so users can still understand state instantly. */
  --crm-status-info: #284b73;
  --crm-status-info-bg: #eef2f6;
  --crm-status-info-border: #c7d1dc;
  --crm-status-critical: #9f1520;
  --crm-status-critical-bg: #fff0f1;
  --crm-status-critical-border: #efb7bd;

  /* Bootstrap */
  --bs-primary: #284b73;
  --bs-primary-rgb: 40, 75, 115;
  --bs-link-color: #284b73;
  --bs-link-color-rgb: 40, 75, 115;
  --bs-link-hover-color: #1d3557;
  --bs-link-hover-color-rgb: 29, 53, 87;

  /* Shared Woolly design system */
  --wds-border: #dde1e5;
  --wds-border-soft: #eceff1;
  --wds-surface: #ffffff;
  --wds-surface-muted: #f4f5f6;
  --wds-surface-hover: #fbf7ee;
  --wds-text: #3d3d3d;
  --wds-text-muted: #667085;
  --wds-heading: #1d3557;
  --wds-link: #284b73;
  --wds-accent: #9c7f5d;
  --wds-shadow: 0 4px 14px rgba(37, 37, 37, .06);

  /* Authentication and standalone error shells */
  --auth-navy: #1d3557;
  --auth-blue: #284b73;
  --auth-orange: #b59670;
  --auth-ink: #252525;
  --auth-muted: #667085;
  --auth-line: #dde1e5;
  --error-navy: #252525;
  --error-blue: #284b73;
  --error-orange: #9c7f5d;
  --error-border: #dde1e5;
  --error-muted: #667085;
}

html.crm-scroll-active {
  scrollbar-color: rgba(40, 75, 115, .58) transparent;
}

html.crm-scroll-active::-webkit-scrollbar-thumb {
  background: rgba(40, 75, 115, .58);
}

::selection {
  color: #fff;
  background: #284b73;
}

/* Navigation and shell */
.crm-sidebar {
  background: linear-gradient(180deg, #252525 0%, #1d3557 52%, #284b73 100%);
  box-shadow: 12px 0 30px rgba(37, 37, 37, .16);
}

.crm-sidebar-brand {
  border-bottom-color: rgba(214, 194, 167, .42);
  background: rgba(37, 37, 37, .95);
}

.crm-nav-link.active {
  background: linear-gradient(90deg, rgba(214, 194, 167, .22), rgba(40, 75, 115, .24));
}

.crm-nav-link.active i {
  color: #f0dfc8;
}

.crm-topbar {
  border-bottom-color: #dde1e5;
  box-shadow: 0 5px 18px rgba(37, 37, 37, .06);
}

.crm-body a:not(.btn):focus-visible,
.auth-body a:not(.btn):focus-visible,
.error-page a:not(.btn):focus-visible {
  border-radius: 4px;
  outline: 2px solid rgba(40, 75, 115, .32);
  outline-offset: 2px;
}

/* Controls and Bootstrap states */
.crm-body .form-control:focus,
.crm-body .form-select:focus,
.auth-body .form-control:focus,
.auth-body .form-select:focus {
  border-color: #8097af;
  box-shadow: 0 0 0 .2rem rgba(40, 75, 115, .13);
}

.form-check-input:checked {
  border-color: #284b73;
  background-color: #284b73;
}

.form-check-input:focus {
  border-color: #8097af;
  box-shadow: 0 0 0 .2rem rgba(40, 75, 115, .13);
}

.dropdown-item.active,
.dropdown-item:active,
.list-group-item.active {
  border-color: #284b73;
  background-color: #284b73;
}

.crm-body .btn-primary,
.auth-body .btn-primary,
.error-page .btn-primary,
body:not(.crm-body) .no-print.btn-primary {
  --bs-btn-bg: #284b73;
  --bs-btn-border-color: #284b73;
  --bs-btn-hover-bg: #1d3557;
  --bs-btn-hover-border-color: #1d3557;
  --bs-btn-active-bg: #14253c;
  --bs-btn-active-border-color: #14253c;
  --bs-btn-focus-shadow-rgb: 40, 75, 115;
}

.crm-body .btn-outline-primary,
.auth-body .btn-outline-primary,
.error-page .btn-outline-primary,
body:not(.crm-body) .no-print.btn-outline-primary {
  --bs-btn-color: #284b73;
  --bs-btn-border-color: #284b73;
  --bs-btn-hover-bg: #284b73;
  --bs-btn-hover-border-color: #284b73;
  --bs-btn-active-bg: #1d3557;
  --bs-btn-active-border-color: #1d3557;
  --bs-btn-focus-shadow-rgb: 40, 75, 115;
}

.crm-body .text-primary,
.auth-body .text-primary,
.error-page .text-primary {
  color: #284b73 !important;
}

.crm-body .bg-primary-subtle,
.auth-body .bg-primary-subtle {
  background-color: #eef2f6 !important;
}

.crm-body .text-bg-primary,
.auth-body .text-bg-primary {
  color: #fff !important;
  background-color: #284b73 !important;
}

.crm-body .page-link {
  color: #284b73;
}

.crm-body .active > .page-link,
.crm-body .page-link.active,
.crm-body .nav-pills .nav-link.active {
  border-color: #284b73;
  background-color: #284b73;
}

/* Shared page components */
.dashboard-page-actions .btn-primary,
.lead-form-action-buttons .btn-primary,
.quotation-create-action-buttons .btn-primary,
.lead-detail-primary-form .btn,
.quotation-builder-primary-action {
  border-color: #284b73;
  background: linear-gradient(115deg, #1d3557 0%, #284b73 100%);
  box-shadow: inset 0 -2px 0 #b59670, 0 5px 14px rgba(29, 53, 87, .16);
}

.dashboard-page-actions .btn-primary:hover,
.dashboard-page-actions .btn-primary:focus-visible,
.lead-form-action-buttons .btn-primary:hover,
.lead-form-action-buttons .btn-primary:focus-visible,
.quotation-create-action-buttons .btn-primary:hover,
.quotation-create-action-buttons .btn-primary:focus-visible {
  border-color: #14253c;
  background: linear-gradient(115deg, #252525 0%, #1d3557 100%);
  box-shadow: inset 0 -2px 0 #d6c2a7, 0 7px 18px rgba(37, 37, 37, .22);
}

.dashboard-page-actions .btn-primary .bi {
  color: #f0dfc8;
}

.dashboard-page-actions .btn-outline-primary:hover,
.dashboard-page-actions .btn-outline-primary:focus-visible,
.crm-icon-button:hover,
.crm-icon-button:focus {
  border-color: rgba(40, 75, 115, .42);
  color: #1d3557;
  background: #eef2f6;
}

.lead-form-tab--customer,
.lead-form-tab--services {
  --lead-tab-accent: #284b73;
  --lead-tab-soft: #eef2f6;
}

.lead-form-section-icon--blue {
  color: #284b73;
  background: #eef2f6;
}

.management-summary-card--blue {
  --management-summary-accent: #284b73;
  --management-summary-soft: #eef2f6;
  color: inherit;
  background: var(--crm-surface);
}

/* Loading feedback */
.crm-page-loader-bar {
  background: linear-gradient(90deg, #252525 0%, #284b73 72%, #b59670 100%);
  box-shadow: 0 0 9px rgba(40, 75, 115, .42);
}

/* Authentication */
.auth-body {
  background:
    radial-gradient(circle at 8% 8%, rgba(40, 75, 115, .14), transparent 28%),
    radial-gradient(circle at 92% 90%, rgba(214, 194, 167, .22), transparent 25%),
    #fbf7ee;
}

.login-brand-panel {
  background:
    radial-gradient(circle at 88% 6%, rgba(214, 194, 167, .3), transparent 23%),
    linear-gradient(145deg, #284b73 0%, #1d3557 46%, #252525 100%);
}

.login-brand-glow-one {
  background: rgba(214, 194, 167, .24);
}

.login-brand-glow-two {
  background: rgba(255, 248, 231, .14);
}

.login-control:focus {
  border-color: #8097af;
  box-shadow: 0 0 0 4px rgba(40, 75, 115, .11);
}

.login-submit-button {
  height: 52px;
  min-height: 52px;
  background: linear-gradient(120deg, #252525, #1d3557 48%, #284b73);
  box-shadow: inset 0 -3px 0 rgba(181, 150, 112, .9), 0 14px 28px rgba(37, 37, 37, .22);
}

.login-submit-button:hover,
.login-submit-button:focus-visible {
  box-shadow: inset 0 -3px 0 #d6c2a7, 0 17px 34px rgba(37, 37, 37, .27);
}

/* Standalone error page */
body.error-page {
  background:
    radial-gradient(circle at 12% 12%, rgba(40, 75, 115, .12), transparent 32rem),
    radial-gradient(circle at 90% 88%, rgba(214, 194, 167, .2), transparent 28rem),
    #fbf7ee;
}

.error-icon {
  color: #284b73;
  background: #eef2f6;
}

.error-actions .btn-primary {
  border-color: #284b73;
  background: #284b73;
}

@media print {
  :root {
    --bs-primary: #284b73;
    --bs-primary-rgb: 40, 75, 115;
  }
}

/* Theme picker */
.crm-language-picker .dropdown-menu {
  width: 224px;
  padding: 8px;
  border-color: var(--crm-border);
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(36, 20, 24, .14);
}

.crm-language-trigger {
  width: auto;
  min-width: 54px;
  gap: 5px;
  padding-inline: 9px;
}

.crm-language-code {
  min-width: 18px;
  font-size: .63rem;
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1;
}

.crm-language-menu-heading {
  display: block;
  padding: 5px 8px 8px;
  color: var(--crm-muted);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.crm-language-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--crm-text);
  background: transparent;
  text-align: left;
}

.crm-language-option:hover,
.crm-language-option:focus-visible {
  border-color: var(--crm-border);
  background: var(--crm-brand-blue-soft);
  outline: none;
}

.crm-language-option[aria-current="true"] {
  border-color: var(--crm-status-info-border);
  background: var(--crm-brand-blue-soft);
}

.crm-language-option .bi-check-lg {
  color: var(--crm-brand-blue);
  opacity: 0;
}

.crm-language-option[aria-current="true"] .bi-check-lg {
  opacity: 1;
}

.crm-language-native {
  font-size: .76rem;
  font-weight: 700;
}

.crm-language-region {
  color: var(--crm-muted);
  font-size: .65rem;
}

:lang(hi) body,
:lang(hi) button,
:lang(hi) input,
:lang(hi) select,
:lang(hi) textarea {
  font-family: "Noto Sans Devanagari", Montserrat, sans-serif;
}

:lang(bn) body,
:lang(bn) button,
:lang(bn) input,
:lang(bn) select,
:lang(bn) textarea {
  font-family: "Noto Sans Bengali", Montserrat, sans-serif;
}

/* Docked organisation chat — LinkedIn/Facebook-style persistent messenger. */
.crm-chat-trigger {
  overflow: visible;
}

.crm-chat-unread-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 2px solid var(--crm-surface);
  border-radius: 999px;
  color: #fff;
  background: #ef4444;
  font-size: .6rem;
  font-weight: 800;
  line-height: 1;
}

.crm-chat-unread-badge[hidden],
.crm-chat-window[hidden] {
  display: none !important;
}

.crm-chat-window {
  position: fixed;
  right: 22px;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(760px, calc(100vw - 44px));
  height: min(570px, calc(100vh - 92px));
  overflow: hidden;
  border: 1px solid var(--crm-border);
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  color: var(--crm-text);
  background: var(--crm-surface);
  box-shadow: 0 -4px 36px rgba(20, 37, 60, .2);
  z-index: 1085;
  transition: height 180ms ease, width 180ms ease;
}

.crm-chat-window.is-minimized {
  width: 330px;
  height: 58px;
}

.crm-chat-window.is-minimized .crm-chat-window-body {
  display: none;
}

.crm-chat-window-header {
  display: flex;
  flex: 0 0 58px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 8px 10px 8px 14px;
  border-bottom: 1px solid var(--crm-border);
  color: #fff;
  background: linear-gradient(115deg, var(--crm-brand-navy-deep), var(--crm-brand-blue));
}

.crm-chat-window-heading,
.crm-chat-window-heading > span:last-child {
  display: flex;
  align-items: center;
  min-width: 0;
}

.crm-chat-window-heading {
  gap: 10px;
}

.crm-chat-window-heading > span:last-child {
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.crm-chat-window-heading strong {
  font-size: .8rem;
  font-weight: 750;
}

.crm-chat-window-heading small {
  color: rgba(255, 255, 255, .72);
  font-size: .61rem;
}

.crm-chat-window-heading small.is-online {
  color: #bbf7d0;
}

.crm-chat-heading-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .14);
}

.crm-chat-window-controls {
  display: flex;
  gap: 2px;
}

.crm-chat-window-controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: transparent;
}

.crm-chat-window-controls button:hover,
.crm-chat-window-controls button:focus-visible {
  background: rgba(255, 255, 255, .14);
  outline: none;
}

.crm-chat-window-body {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 0;
}

.crm-chat-sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 12px 9px;
  border-right: 1px solid var(--crm-border);
  background: color-mix(in srgb, var(--crm-content-bg) 48%, var(--crm-surface));
}

.crm-chat-search {
  position: relative;
}

.crm-chat-search i {
  position: absolute;
  top: 50%;
  left: 11px;
  color: var(--crm-muted);
  font-size: .73rem;
  transform: translateY(-50%);
}

.crm-chat-search input {
  width: 100%;
  height: 36px;
  padding: 7px 10px 7px 31px;
  border: 1px solid var(--crm-border);
  border-radius: 10px;
  color: var(--crm-text);
  background:
    radial-gradient(circle at 10% 10%, color-mix(in srgb, var(--crm-brand-blue-soft) 50%, transparent), transparent 18rem),
    var(--crm-surface);
  font-size: .7rem;
  outline: none;
}

.crm-chat-search input:focus {
  border-color: var(--crm-brand-blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--crm-brand-blue) 14%, transparent);
}

.crm-chat-new-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  margin-top: 8px;
  border: 1px solid color-mix(in srgb, var(--crm-brand-blue) 48%, var(--crm-border));
  border-radius: 9px;
  color: var(--crm-brand-blue);
  background: var(--crm-surface);
  font-size: .7rem;
  font-weight: 700;
}

.crm-chat-new-button:hover,
.crm-chat-new-button:focus-visible {
  color: #fff;
  background: var(--crm-brand-blue);
  outline: none;
}

.crm-chat-people,
.crm-chat-conversations {
  min-height: 0;
  overflow-y: auto;
}

.crm-chat-people {
  flex: 0 1 44%;
  margin-top: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--crm-border);
}

.crm-chat-conversations {
  flex: 1 1 auto;
}

.crm-chat-list-label {
  padding: 12px 7px 6px;
  color: var(--crm-muted);
  font-size: .59rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.crm-chat-conversation-item,
.crm-chat-user-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 54px;
  padding: 7px;
  border: 0;
  border-radius: 10px;
  color: var(--crm-text);
  background: transparent;
  text-align: left;
}

.crm-chat-conversation-item:hover,
.crm-chat-conversation-item:focus-visible,
.crm-chat-user-item:hover,
.crm-chat-user-item:focus-visible {
  background: color-mix(in srgb, var(--crm-brand-blue-soft) 75%, var(--crm-surface));
  outline: none;
}

.crm-chat-conversation-item.is-active {
  background: var(--crm-brand-blue-soft);
  box-shadow: inset 3px 0 var(--crm-brand-blue);
}

.crm-chat-avatar {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid color-mix(in srgb, var(--crm-brand-blue) 26%, var(--crm-border));
  border-radius: 50%;
  color: var(--crm-brand-blue);
  background: var(--crm-brand-blue-soft);
  font-size: .72rem;
  font-weight: 800;
}

.crm-chat-presence-dot {
  position: absolute;
  right: -1px;
  bottom: 0;
  width: 10px;
  height: 10px;
  border: 2px solid var(--crm-surface);
  border-radius: 50%;
  background: #22c55e;
}

.crm-chat-conversation-copy,
.crm-chat-user-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.crm-chat-conversation-copy strong,
.crm-chat-user-copy strong {
  overflow: hidden;
  font-size: .69rem;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-chat-conversation-copy small,
.crm-chat-user-copy small {
  overflow: hidden;
  color: var(--crm-muted);
  font-size: .59rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-chat-conversation-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  color: #fff;
  background: #ef4444;
  font-size: .58rem;
  font-weight: 800;
}

.crm-chat-conversation-time {
  align-self: start;
  padding-top: 3px;
  color: var(--crm-muted);
  font-size: .55rem;
}

.crm-chat-list-empty,
.crm-chat-no-messages,
.crm-chat-loading {
  padding: 22px 10px;
  color: var(--crm-muted);
  font-size: .66rem;
  text-align: center;
}

.crm-chat-thread {
  min-width: 0;
  min-height: 0;
  background: var(--crm-surface);
}

.crm-chat-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  height: 100%;
  padding: 28px;
  color: var(--crm-muted);
  text-align: center;
}

.crm-chat-empty > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 14px;
  border-radius: 20px;
  color: var(--crm-brand-blue);
  background: var(--crm-brand-blue-soft);
  font-size: 1.6rem;
}

.crm-chat-empty strong {
  color: var(--crm-text);
  font-size: .82rem;
}

.crm-chat-empty p {
  max-width: 280px;
  margin: 7px 0 0;
  font-size: .66rem;
  line-height: 1.5;
}

.crm-chat-thread-active {
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr) auto auto auto;
  height: 100%;
  min-height: 0;
}

.crm-chat-thread-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--crm-border);
}

.crm-chat-thread-person {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.crm-chat-thread-person strong {
  overflow: hidden;
  color: var(--crm-text);
  font-size: .75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-chat-thread-person small {
  color: var(--crm-muted);
  font-size: .6rem;
}

.crm-chat-thread-person small.is-online {
  color: #15803d;
}

.crm-chat-message-list {
  min-height: 0;
  padding: 18px 15px 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--crm-surface);
}

.crm-chat-message {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  margin-bottom: 11px;
}

.crm-chat-message.is-own {
  justify-content: flex-end;
}

.crm-chat-message-avatar {
  display: inline-flex;
  flex: 0 0 26px;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: var(--crm-brand-blue);
  background: var(--crm-brand-blue-soft);
  font-size: .56rem;
  font-weight: 800;
}

.crm-chat-message-content {
  display: flex;
  flex-direction: column;
  max-width: min(78%, 430px);
}

.crm-chat-message.is-own .crm-chat-message-content {
  align-items: flex-end;
}

.crm-chat-message-sender {
  margin: 0 0 3px 8px;
  color: var(--crm-muted);
  font-size: .56rem;
  font-weight: 650;
}

.crm-chat-message-bubble {
  min-width: 52px;
  padding: 9px 11px;
  border: 1px solid var(--crm-border);
  border-radius: 14px 14px 14px 4px;
  color: var(--crm-text);
  background: color-mix(in srgb, var(--crm-brand-blue-soft) 58%, var(--crm-surface));
  font-size: .7rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.crm-chat-message.is-own .crm-chat-message-bubble {
  border-color: var(--crm-brand-blue);
  border-radius: 14px 14px 4px 14px;
  color: #fff;
  background: var(--crm-brand-blue);
}

.crm-chat-message-text {
  white-space: pre-wrap;
}

.crm-chat-message-quote {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 7px;
  padding: 6px 8px;
  border-left: 3px solid color-mix(in srgb, currentColor 52%, transparent);
  border-radius: 5px;
  background: color-mix(in srgb, currentColor 9%, transparent);
  font-size: .61rem;
  opacity: .9;
}

.crm-chat-message-quote span {
  overflow: hidden;
  max-width: 260px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-chat-message-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 20px;
  padding: 2px 5px 0;
  color: var(--crm-muted);
  font-size: .54rem;
}

.crm-chat-reply-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  color: var(--crm-muted);
  background: transparent;
  opacity: .35;
}

.crm-chat-message:hover .crm-chat-reply-button,
.crm-chat-reply-button:focus-visible {
  color: var(--crm-brand-blue);
  background: var(--crm-brand-blue-soft);
  opacity: 1;
  outline: none;
}

.crm-chat-typing {
  padding: 3px 17px 6px;
  color: var(--crm-muted);
  font-size: .59rem;
  font-style: italic;
}

.crm-chat-reply-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 12px;
  border-top: 1px solid var(--crm-border);
  border-left: 3px solid var(--crm-brand-blue);
  background: var(--crm-brand-blue-soft);
}

.crm-chat-reply-preview > span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.crm-chat-reply-preview small,
.crm-chat-reply-preview > span > span {
  overflow: hidden;
  font-size: .59rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-chat-reply-preview button {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  color: var(--crm-muted);
  background: transparent;
}

.crm-chat-composer {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--crm-border);
  background: var(--crm-surface);
}

.crm-chat-composer textarea {
  flex: 1 1 auto;
  min-height: 40px;
  max-height: 112px;
  padding: 10px 12px;
  resize: none;
  overflow-y: auto;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  color: var(--crm-text);
  background: color-mix(in srgb, var(--crm-content-bg) 42%, var(--crm-surface));
  font-size: .7rem;
  line-height: 1.4;
  outline: none;
}

.crm-chat-composer textarea:focus {
  border-color: var(--crm-brand-blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--crm-brand-blue) 13%, transparent);
}

.crm-chat-composer button {
  display: inline-flex;
  flex: 0 0 40px;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--crm-brand-blue);
  border-radius: 12px;
  color: #fff;
  background: var(--crm-brand-blue);
}

.crm-chat-composer button:hover,
.crm-chat-composer button:focus-visible {
  filter: brightness(1.12);
  outline: none;
}

.crm-chat-composer button:disabled {
  cursor: wait;
  opacity: .55;
}

:root[data-crm-theme="dark"] .crm-chat-window,
:root[data-crm-theme="dark"] .crm-chat-thread,
:root[data-crm-theme="dark"] .crm-chat-message-list,
:root[data-crm-theme="dark"] .crm-chat-composer,
:root[data-crm-theme="dark"] .crm-chat-search input,
:root[data-crm-theme="dark"] .crm-chat-new-button {
  color: var(--crm-text);
  background-color: var(--crm-surface);
}

:root[data-crm-theme="dark"] .crm-chat-message.is-other .crm-chat-message-bubble {
  background: #202d3d;
}

@media (max-width: 767.98px) {
  .crm-chat-window {
    right: 8px;
    width: calc(100vw - 16px);
    height: min(620px, calc(100vh - 76px));
  }

  .crm-chat-window.is-minimized {
    width: min(330px, calc(100vw - 16px));
  }

  .crm-chat-window-body {
    grid-template-columns: 176px minmax(0, 1fr);
  }

  .crm-chat-message-content {
    max-width: 88%;
  }
}

@media (max-width: 520px) {
  .crm-chat-window-body {
    grid-template-columns: 132px minmax(0, 1fr);
  }

  .crm-chat-sidebar {
    padding-inline: 6px;
  }

  .crm-chat-conversation-item,
  .crm-chat-user-item {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 6px;
    padding-inline: 4px;
  }

  .crm-chat-sidebar .crm-chat-avatar {
    width: 31px;
    height: 31px;
  }

  .crm-chat-conversation-badge,
  .crm-chat-conversation-time {
    display: none;
  }
}

/* Action-column headings are centered consistently across every list/grid. */
.crm-content-container .dashboard-table thead th.table-action-heading,
.crm-content-container table thead th.lead-action-column-heading {
  text-align: center;
}

.crm-theme-picker .dropdown-menu {
  width: 268px;
  padding: 8px;
  border-color: var(--crm-border);
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(36, 20, 24, .14);
}

.crm-theme-menu-heading {
  display: block;
  padding: 5px 8px 8px;
  color: var(--crm-muted);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.crm-theme-option {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--crm-text);
  background: transparent;
  text-align: left;
}

.crm-theme-option:hover,
.crm-theme-option:focus-visible {
  border-color: var(--crm-border);
  background: var(--crm-brand-blue-soft);
  outline: none;
}

.crm-theme-option[aria-pressed="true"] {
  border-color: var(--crm-status-info-border);
  background: var(--crm-brand-blue-soft);
}

.crm-theme-option-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.crm-theme-option-copy strong {
  font-size: .76rem;
  font-weight: 700;
}

.crm-theme-option-copy small {
  overflow: hidden;
  color: var(--crm-muted);
  font-size: .65rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-theme-option-check {
  color: var(--crm-brand-blue);
  opacity: 0;
}

.crm-theme-option[aria-pressed="true"] .crm-theme-option-check {
  opacity: 1;
}

.crm-theme-swatch {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  width: 34px;
  height: 28px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 8px;
}

.crm-theme-swatch span {
  display: block;
}

.crm-theme-swatch--classic span:nth-child(1) { background: #252525; }
.crm-theme-swatch--classic span:nth-child(2) { background: #1d3557; }
.crm-theme-swatch--classic span:nth-child(3) { background: #d6c2a7; }
.crm-theme-swatch--classic span:nth-child(4) { background: #fbf7ee; }
.crm-theme-swatch--light span:nth-child(1) { background: #ffffff; }
.crm-theme-swatch--light span:nth-child(2) { background: #edf2f7; }
.crm-theme-swatch--light span:nth-child(3) { background: #315f8d; }
.crm-theme-swatch--light span:nth-child(4) { background: #d6c2a7; }
.crm-theme-swatch--dark span:nth-child(1) { background: #0d1420; }
.crm-theme-swatch--dark span:nth-child(2) { background: #172130; }
.crm-theme-swatch--dark span:nth-child(3) { background: #315f8d; }
.crm-theme-swatch--dark span:nth-child(4) { background: #d6b28a; }
.crm-theme-swatch--multi span:nth-child(1) { background: #6d28d9; }
.crm-theme-swatch--multi span:nth-child(2) { background: #0f8b7a; }
.crm-theme-swatch--multi span:nth-child(3) { background: #ea6a14; }
.crm-theme-swatch--multi span:nth-child(4) { background: #db2777; }
.crm-theme-swatch--multi-one span:nth-child(1) { background: #000080; }
.crm-theme-swatch--multi-one span:nth-child(2) { background: #ff0000; }
.crm-theme-swatch--multi-one span:nth-child(3) { background: #9e2a3a; }
.crm-theme-swatch--multi-one span:nth-child(4) { background: #3a2525; }
.crm-theme-swatch--multi-two span:nth-child(1) { background: #81a6c6; }
.crm-theme-swatch--multi-two span:nth-child(2) { background: #aacddc; }
.crm-theme-swatch--multi-two span:nth-child(3) { background: #f3e3d0; }
.crm-theme-swatch--multi-two span:nth-child(4) { background: #d2c4b4; }
.crm-theme-swatch--evergreen span:nth-child(1) { background: #091413; }
.crm-theme-swatch--evergreen span:nth-child(2) { background: #285a48; }
.crm-theme-swatch--evergreen span:nth-child(3) { background: #408a71; }
.crm-theme-swatch--evergreen span:nth-child(4) { background: #b0e4cc; }

/* Optional multicolor theme. Violet owns primary actions, teal owns navigation
   and links, orange highlights attention, rose marks selection, and blue is
   reserved for informational states. */
:root[data-crm-theme="multicolor"] {
  --crm-brand-navy: #6d28d9;
  --crm-brand-navy-deep: #3b176f;
  --crm-brand-blue: #0f8b7a;
  --crm-brand-blue-soft: #eaf8f5;
  --crm-brand-orange: #ea6a14;
  --crm-brand-orange-soft: #fff3e8;
  --crm-sidebar-bg: #4c1d95;
  --crm-sidebar-bg-strong: #2e125b;
  --crm-sidebar-text: #f5f7ff;
  --crm-sidebar-muted: #ddd6fe;
  --crm-sidebar-active: #fb923c;
  --crm-border: #e0ddea;
  --crm-content-bg: #faf8fc;
  --crm-text: #253047;
  --crm-muted: #667085;
  --crm-status-info: #0284c7;
  --crm-status-info-bg: #eaf7fc;
  --crm-status-info-border: #acdceb;
  --bs-primary: #6d28d9;
  --bs-primary-rgb: 109, 40, 217;
  --bs-link-color: #0f766e;
  --bs-link-color-rgb: 15, 118, 110;
  --bs-link-hover-color: #6d28d9;
  --bs-link-hover-color-rgb: 109, 40, 217;
  --wds-border: #e0ddea;
  --wds-border-soft: #eeeaf2;
  --wds-surface-muted: #f8f5fa;
  --wds-surface-hover: #f1fbf8;
  --wds-heading: #4c1d95;
  --wds-link: #0f766e;
  --wds-accent: #ea6a14;
  --wds-shadow: 0 4px 14px rgba(76, 29, 149, .07);
  --auth-navy: #3b176f;
  --auth-blue: #0f8b7a;
  --auth-orange: #ea6a14;
  --auth-ink: #253047;
  --auth-muted: #667085;
  --auth-line: #e0ddea;
  --error-navy: #4c1d95;
  --error-blue: #0f8b7a;
  --error-orange: #ea6a14;
  --error-border: #e0ddea;
  --error-muted: #667085;
  --app-button-primary: #6d28d9;
  --app-button-primary-hover: #571bb8;
  --app-button-primary-active: #3b176f;
  --app-button-accent: #fb923c;
  --app-button-shadow: 0 4px 10px rgba(109, 40, 217, .2);
  --app-select-border-focus: #0f8b7a;
  --app-select-focus: rgba(15, 139, 122, .18);
}

:root[data-crm-theme="multicolor"] ::selection {
  background: #6d28d9;
}

:root[data-crm-theme="multicolor"] html.crm-scroll-active,
:root[data-crm-theme="multicolor"].crm-scroll-active {
  scrollbar-color: rgba(109, 40, 217, .6) transparent;
}

:root[data-crm-theme="multicolor"] .crm-sidebar {
  background: linear-gradient(180deg, #2e125b 0%, #4c1d95 42%, #0f766e 76%, #9a3412 100%);
  box-shadow: 12px 0 30px rgba(59, 23, 111, .18);
}

:root[data-crm-theme="multicolor"] .crm-sidebar-brand {
  border-bottom-color: rgba(251, 146, 60, .48);
  background: rgba(46, 18, 91, .95);
}

:root[data-crm-theme="multicolor"] .crm-nav-link.active {
  background: linear-gradient(90deg, rgba(251, 146, 60, .25), rgba(219, 39, 119, .18));
  box-shadow: inset 3px 0 0 #fb923c;
}

:root[data-crm-theme="multicolor"] .crm-nav-link.active i {
  color: #fdba74;
}

:root[data-crm-theme="multicolor"] .crm-body .form-control:focus,
:root[data-crm-theme="multicolor"] .crm-body .form-select:focus,
:root[data-crm-theme="multicolor"] .auth-body .form-control:focus,
:root[data-crm-theme="multicolor"] .auth-body .form-select:focus,
:root[data-crm-theme="multicolor"] .login-control:focus {
  border-color: #53aa9d;
  box-shadow: 0 0 0 .2rem rgba(15, 139, 122, .14);
}

:root[data-crm-theme="multicolor"] .form-check-input:checked,
:root[data-crm-theme="multicolor"] .dropdown-item.active,
:root[data-crm-theme="multicolor"] .dropdown-item:active,
:root[data-crm-theme="multicolor"] .list-group-item.active {
  border-color: #db2777;
  background-color: #db2777;
}

:root[data-crm-theme="multicolor"] .crm-body .btn-primary,
:root[data-crm-theme="multicolor"] .auth-body .btn-primary,
:root[data-crm-theme="multicolor"] .error-page .btn-primary,
:root[data-crm-theme="multicolor"] body:not(.crm-body) .no-print.btn-primary {
  --bs-btn-bg: #6d28d9;
  --bs-btn-border-color: #6d28d9;
  --bs-btn-hover-bg: #571bb8;
  --bs-btn-hover-border-color: #571bb8;
  --bs-btn-active-bg: #3b176f;
  --bs-btn-active-border-color: #3b176f;
  --bs-btn-focus-shadow-rgb: 109, 40, 217;
}

:root[data-crm-theme="multicolor"] .crm-body .btn-outline-primary,
:root[data-crm-theme="multicolor"] .auth-body .btn-outline-primary,
:root[data-crm-theme="multicolor"] .error-page .btn-outline-primary,
:root[data-crm-theme="multicolor"] body:not(.crm-body) .no-print.btn-outline-primary {
  --bs-btn-color: #0f766e;
  --bs-btn-border-color: #0f8b7a;
  --bs-btn-hover-bg: #0f8b7a;
  --bs-btn-hover-border-color: #0f8b7a;
  --bs-btn-active-bg: #0b6b5e;
  --bs-btn-active-border-color: #0b6b5e;
  --bs-btn-focus-shadow-rgb: 15, 139, 122;
}

:root[data-crm-theme="multicolor"] .crm-body .text-primary,
:root[data-crm-theme="multicolor"] .auth-body .text-primary,
:root[data-crm-theme="multicolor"] .error-page .text-primary {
  color: #6d28d9 !important;
}

:root[data-crm-theme="multicolor"] .crm-body .bg-primary-subtle,
:root[data-crm-theme="multicolor"] .auth-body .bg-primary-subtle,
:root[data-crm-theme="multicolor"] .crm-icon-button:hover,
:root[data-crm-theme="multicolor"] .crm-icon-button:focus {
  background-color: #f3edff !important;
}

:root[data-crm-theme="multicolor"] .crm-body .text-bg-primary,
:root[data-crm-theme="multicolor"] .auth-body .text-bg-primary,
:root[data-crm-theme="multicolor"] .crm-body .active > .page-link,
:root[data-crm-theme="multicolor"] .crm-body .page-link.active,
:root[data-crm-theme="multicolor"] .crm-body .nav-pills .nav-link.active {
  border-color: #db2777;
  background-color: #db2777 !important;
}

:root[data-crm-theme="multicolor"] .crm-body .page-link,
:root[data-crm-theme="multicolor"] .crm-theme-option-check {
  color: #0f766e;
}

:root[data-crm-theme="multicolor"] .dashboard-page-actions .btn-primary,
:root[data-crm-theme="multicolor"] .lead-form-action-buttons .btn-primary,
:root[data-crm-theme="multicolor"] .quotation-create-action-buttons .btn-primary,
:root[data-crm-theme="multicolor"] .lead-detail-primary-form .btn,
:root[data-crm-theme="multicolor"] .quotation-builder-primary-action {
  border-color: #6d28d9;
  background: linear-gradient(115deg, #6d28d9 0%, #db2777 100%);
  box-shadow: inset 0 -2px 0 #fb923c, 0 5px 14px rgba(109, 40, 217, .18);
}

:root[data-crm-theme="multicolor"] .dashboard-page-actions .btn-primary:hover,
:root[data-crm-theme="multicolor"] .dashboard-page-actions .btn-primary:focus-visible,
:root[data-crm-theme="multicolor"] .lead-form-action-buttons .btn-primary:hover,
:root[data-crm-theme="multicolor"] .lead-form-action-buttons .btn-primary:focus-visible,
:root[data-crm-theme="multicolor"] .quotation-create-action-buttons .btn-primary:hover,
:root[data-crm-theme="multicolor"] .quotation-create-action-buttons .btn-primary:focus-visible {
  border-color: #4c1d95;
  background: linear-gradient(115deg, #4c1d95 0%, #be185d 100%);
  box-shadow: inset 0 -2px 0 #fb923c, 0 7px 18px rgba(76, 29, 149, .24);
}

:root[data-crm-theme="multicolor"] .dashboard-page-actions .btn-primary .bi {
  color: #fed7aa;
}

:root[data-crm-theme="multicolor"] .lead-form-tab--customer {
  --lead-tab-accent: #0284c7;
  --lead-tab-soft: #eaf7fc;
}

:root[data-crm-theme="multicolor"] .lead-form-tab--services {
  --lead-tab-accent: #6d28d9;
  --lead-tab-soft: #f3edff;
}

:root[data-crm-theme="multicolor"] .lead-form-tab--assignment {
  --lead-tab-accent: #ea6a14;
  --lead-tab-soft: #fff3e8;
}

:root[data-crm-theme="multicolor"] .lead-form-tab--travel {
  --lead-tab-accent: #0f8b7a;
  --lead-tab-soft: #eaf9f5;
}

:root[data-crm-theme="multicolor"] .lead-form-section-icon--blue {
  color: #0284c7;
  background: #eaf7fc;
}

:root[data-crm-theme="multicolor"] .management-summary-card--blue {
  --management-summary-accent: #6d28d9;
  --management-summary-soft: #f3edff;
  color: inherit;
  background: #fff;
}

:root[data-crm-theme="multicolor"] .crm-page-loader-bar {
  background: linear-gradient(90deg, #6d28d9 0%, #db2777 32%, #ea6a14 62%, #0f8b7a 100%);
  box-shadow: 0 0 9px rgba(109, 40, 217, .38);
}

:root[data-crm-theme="multicolor"] .auth-body {
  background:
    radial-gradient(circle at 8% 8%, rgba(109, 40, 217, .13), transparent 28%),
    radial-gradient(circle at 92% 90%, rgba(234, 106, 20, .12), transparent 25%),
    #faf8fc;
}

:root[data-crm-theme="multicolor"] .login-brand-panel {
  background:
    radial-gradient(circle at 88% 6%, rgba(251, 146, 60, .34), transparent 23%),
    linear-gradient(145deg, #4c1d95 0%, #6d28d9 38%, #db2777 68%, #0f766e 100%);
}

:root[data-crm-theme="multicolor"] .login-brand-glow-one { background: rgba(251, 146, 60, .3); }
:root[data-crm-theme="multicolor"] .login-brand-glow-two { background: rgba(45, 212, 191, .2); }

:root[data-crm-theme="multicolor"] .login-submit-button {
  background: linear-gradient(120deg, #6d28d9, #db2777 70%, #ea6a14);
  box-shadow: inset 0 -3px 0 rgba(251, 146, 60, .9), 0 14px 28px rgba(76, 29, 149, .23);
}

:root[data-crm-theme="multicolor"] body.error-page {
  background:
    radial-gradient(circle at 12% 12%, rgba(109, 40, 217, .12), transparent 32rem),
    radial-gradient(circle at 90% 88%, rgba(234, 106, 20, .11), transparent 28rem),
    #faf8fc;
}

:root[data-crm-theme="multicolor"] .error-icon {
  color: #db2777;
  background: #fce7f3;
}

/* Permanent Lead workflow colours
 * -------------------------------
 * These tokens intentionally sit outside the selectable application themes.
 * A Lead status or priority therefore keeps exactly the same meaning and
 * colour in lists, cards, drawers, dashboards, WhatsApp and follow-ups.
 */
:root {
  --lead-status-new-fg: #075985;
  --lead-status-new-bg: #e0f2fe;
  --lead-status-new-border: #38bdf8;
  --lead-status-assigned-fg: #5b21b6;
  --lead-status-assigned-bg: #ede9fe;
  --lead-status-assigned-border: #a78bfa;
  --lead-status-contacted-fg: #0e7490;
  --lead-status-contacted-bg: #cffafe;
  --lead-status-contacted-border: #22d3ee;
  --lead-status-qualified-fg: #047857;
  --lead-status-qualified-bg: #d1fae5;
  --lead-status-qualified-border: #34d399;
  --lead-status-prepared-fg: #6b21a8;
  --lead-status-prepared-bg: #f3e8ff;
  --lead-status-prepared-border: #c084fc;
  --lead-status-sent-fg: #1d4ed8;
  --lead-status-sent-bg: #dbeafe;
  --lead-status-sent-border: #60a5fa;
  --lead-status-negotiation-fg: #92400e;
  --lead-status-negotiation-bg: #fef3c7;
  --lead-status-negotiation-border: #fbbf24;
  --lead-status-followup-fg: #9a3412;
  --lead-status-followup-bg: #ffedd5;
  --lead-status-followup-border: #fb923c;
  --lead-status-won-fg: #047857;
  --lead-status-won-bg: #d1fae5;
  --lead-status-won-border: #34d399;
  --lead-status-lost-fg: #b91c1c;
  --lead-status-lost-bg: #fee2e2;
  --lead-status-lost-border: #f87171;
  --lead-status-closed-fg: #334155;
  --lead-status-closed-bg: #e2e8f0;
  --lead-status-closed-border: #94a3b8;
  --lead-priority-low-fg: #475569;
  --lead-priority-low-bg: #f1f5f9;
  --lead-priority-low-border: #94a3b8;
  --lead-priority-normal-fg: #1e40af;
  --lead-priority-normal-bg: #dbeafe;
  --lead-priority-normal-border: #60a5fa;
  --lead-priority-high-fg: #92400e;
  --lead-priority-high-bg: #fef3c7;
  --lead-priority-high-border: #f59e0b;
  --lead-priority-urgent-fg: #b91c1c;
  --lead-priority-urgent-bg: #fee2e2;
  --lead-priority-urgent-border: #ef4444;
}

.status-badge:is(
  .status-badge--value-new,
  .status-badge--value-assigned,
  .status-badge--value-contacted,
  .status-badge--value-qualified,
  .status-badge--value-quotationprepared,
  .status-badge--value-quotationsent,
  .status-badge--value-negotiation,
  .status-badge--value-followup,
  .status-badge--value-won,
  .status-badge--value-lost,
  .status-badge--value-closed,
  .status-badge--value-low,
  .status-badge--value-normal,
  .status-badge--value-high,
  .status-badge--value-urgent
) {
  border-color: var(--lead-semantic-border, inherit) !important;
  color: var(--lead-semantic-fg, inherit) !important;
  background-color: var(--lead-semantic-bg, inherit) !important;
}

.status-badge--value-new {
  --lead-semantic-fg: var(--lead-status-new-fg);
  --lead-semantic-bg: var(--lead-status-new-bg);
  --lead-semantic-border: var(--lead-status-new-border);
}

.status-badge--value-assigned {
  --lead-semantic-fg: var(--lead-status-assigned-fg);
  --lead-semantic-bg: var(--lead-status-assigned-bg);
  --lead-semantic-border: var(--lead-status-assigned-border);
}

.status-badge--value-contacted {
  --lead-semantic-fg: var(--lead-status-contacted-fg);
  --lead-semantic-bg: var(--lead-status-contacted-bg);
  --lead-semantic-border: var(--lead-status-contacted-border);
}

.status-badge--value-qualified {
  --lead-semantic-fg: var(--lead-status-qualified-fg);
  --lead-semantic-bg: var(--lead-status-qualified-bg);
  --lead-semantic-border: var(--lead-status-qualified-border);
}

.status-badge--value-quotationprepared {
  --lead-semantic-fg: var(--lead-status-prepared-fg);
  --lead-semantic-bg: var(--lead-status-prepared-bg);
  --lead-semantic-border: var(--lead-status-prepared-border);
}

.status-badge--value-quotationsent {
  --lead-semantic-fg: var(--lead-status-sent-fg);
  --lead-semantic-bg: var(--lead-status-sent-bg);
  --lead-semantic-border: var(--lead-status-sent-border);
}

.status-badge--value-negotiation {
  --lead-semantic-fg: var(--lead-status-negotiation-fg);
  --lead-semantic-bg: var(--lead-status-negotiation-bg);
  --lead-semantic-border: var(--lead-status-negotiation-border);
}

.status-badge--value-followup {
  --lead-semantic-fg: var(--lead-status-followup-fg);
  --lead-semantic-bg: var(--lead-status-followup-bg);
  --lead-semantic-border: var(--lead-status-followup-border);
}

.status-badge--value-won {
  --lead-semantic-fg: var(--lead-status-won-fg);
  --lead-semantic-bg: var(--lead-status-won-bg);
  --lead-semantic-border: var(--lead-status-won-border);
}

.status-badge--value-lost {
  --lead-semantic-fg: var(--lead-status-lost-fg);
  --lead-semantic-bg: var(--lead-status-lost-bg);
  --lead-semantic-border: var(--lead-status-lost-border);
}

.status-badge--value-closed {
  --lead-semantic-fg: var(--lead-status-closed-fg);
  --lead-semantic-bg: var(--lead-status-closed-bg);
  --lead-semantic-border: var(--lead-status-closed-border);
}

.status-badge--value-low {
  --lead-semantic-fg: var(--lead-priority-low-fg);
  --lead-semantic-bg: var(--lead-priority-low-bg);
  --lead-semantic-border: var(--lead-priority-low-border);
}

.status-badge--value-normal {
  --lead-semantic-fg: var(--lead-priority-normal-fg);
  --lead-semantic-bg: var(--lead-priority-normal-bg);
  --lead-semantic-border: var(--lead-priority-normal-border);
}

.status-badge--value-high {
  --lead-semantic-fg: var(--lead-priority-high-fg);
  --lead-semantic-bg: var(--lead-priority-high-bg);
  --lead-semantic-border: var(--lead-priority-high-border);
}

.status-badge--value-urgent {
  --lead-semantic-fg: var(--lead-priority-urgent-fg);
  --lead-semantic-bg: var(--lead-priority-urgent-bg);
  --lead-semantic-border: var(--lead-priority-urgent-border);
}

.lead-semantic-select {
  border-left: 4px solid var(--lead-semantic-border, var(--crm-border));
  color: var(--lead-semantic-fg, var(--crm-text));
  background-color: var(--lead-semantic-bg, var(--crm-surface));
  font-weight: 600;
}

.lead-semantic-select[data-semantic-value="new"] { --lead-semantic-fg: var(--lead-status-new-fg); --lead-semantic-bg: var(--lead-status-new-bg); --lead-semantic-border: var(--lead-status-new-border); }
.lead-semantic-select[data-semantic-value="assigned"] { --lead-semantic-fg: var(--lead-status-assigned-fg); --lead-semantic-bg: var(--lead-status-assigned-bg); --lead-semantic-border: var(--lead-status-assigned-border); }
.lead-semantic-select[data-semantic-value="contacted"] { --lead-semantic-fg: var(--lead-status-contacted-fg); --lead-semantic-bg: var(--lead-status-contacted-bg); --lead-semantic-border: var(--lead-status-contacted-border); }
.lead-semantic-select[data-semantic-value="qualified"] { --lead-semantic-fg: var(--lead-status-qualified-fg); --lead-semantic-bg: var(--lead-status-qualified-bg); --lead-semantic-border: var(--lead-status-qualified-border); }
.lead-semantic-select[data-semantic-value="quotationprepared"] { --lead-semantic-fg: var(--lead-status-prepared-fg); --lead-semantic-bg: var(--lead-status-prepared-bg); --lead-semantic-border: var(--lead-status-prepared-border); }
.lead-semantic-select[data-semantic-value="quotationsent"] { --lead-semantic-fg: var(--lead-status-sent-fg); --lead-semantic-bg: var(--lead-status-sent-bg); --lead-semantic-border: var(--lead-status-sent-border); }
.lead-semantic-select[data-semantic-value="negotiation"] { --lead-semantic-fg: var(--lead-status-negotiation-fg); --lead-semantic-bg: var(--lead-status-negotiation-bg); --lead-semantic-border: var(--lead-status-negotiation-border); }
.lead-semantic-select[data-semantic-value="followup"] { --lead-semantic-fg: var(--lead-status-followup-fg); --lead-semantic-bg: var(--lead-status-followup-bg); --lead-semantic-border: var(--lead-status-followup-border); }
.lead-semantic-select[data-semantic-value="won"] { --lead-semantic-fg: var(--lead-status-won-fg); --lead-semantic-bg: var(--lead-status-won-bg); --lead-semantic-border: var(--lead-status-won-border); }
.lead-semantic-select[data-semantic-value="lost"] { --lead-semantic-fg: var(--lead-status-lost-fg); --lead-semantic-bg: var(--lead-status-lost-bg); --lead-semantic-border: var(--lead-status-lost-border); }
.lead-semantic-select[data-semantic-value="closed"] { --lead-semantic-fg: var(--lead-status-closed-fg); --lead-semantic-bg: var(--lead-status-closed-bg); --lead-semantic-border: var(--lead-status-closed-border); }
.lead-semantic-select[data-semantic-value="low"] { --lead-semantic-fg: var(--lead-priority-low-fg); --lead-semantic-bg: var(--lead-priority-low-bg); --lead-semantic-border: var(--lead-priority-low-border); }
.lead-semantic-select[data-semantic-value="normal"] { --lead-semantic-fg: var(--lead-priority-normal-fg); --lead-semantic-bg: var(--lead-priority-normal-bg); --lead-semantic-border: var(--lead-priority-normal-border); }
.lead-semantic-select[data-semantic-value="high"] { --lead-semantic-fg: var(--lead-priority-high-fg); --lead-semantic-bg: var(--lead-priority-high-bg); --lead-semantic-border: var(--lead-priority-high-border); }
.lead-semantic-select[data-semantic-value="urgent"] { --lead-semantic-fg: var(--lead-priority-urgent-fg); --lead-semantic-bg: var(--lead-priority-urgent-bg); --lead-semantic-border: var(--lead-priority-urgent-border); }

/* Informational Cruise and Package duration in Add/Edit Lead */
.lead-service-duration {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin: 0 .75rem .75rem;
  padding: .65rem .75rem;
  border: 1px solid #d6c2a7;
  border-radius: .65rem;
  color: #252525;
  background: #fbf7ee;
}

.lead-service-duration[hidden] {
  display: none;
}

.lead-service-duration-icon {
  display: grid;
  flex: 0 0 2.25rem;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border-radius: .6rem;
  color: #fff;
  background: #284b73;
}

.lead-service-duration-copy {
  display: grid;
  min-width: 0;
  gap: .12rem;
}

.lead-service-duration-copy > span {
  color: #667085;
  font-size: 8pt;
  font-weight: 650;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.lead-service-duration-copy strong {
  display: flex;
  align-items: center;
  gap: .4rem;
  color: #1d3557;
  font-size: 9.5pt;
}

.lead-service-duration-copy small {
  color: #526175;
  font-size: 8.5pt;
}

/* Permanent application button system
 * -----------------------------------
 * Matches the approved compact navy button reference. Page-level styles may
 * arrange buttons, but colour, shape, typography and interaction live here.
 */
:root {
  --app-button-primary: #1d3557;
  --app-button-primary-hover: #14253c;
  --app-button-primary-active: #252525;
  --app-button-accent: #b59670;
  --app-button-text: #ffffff;
  --app-button-height: 36px;
  --app-button-radius: 8px;
  --app-button-shadow: 0 4px 9px rgba(37, 37, 37, .16);
  --app-button-focus: rgba(40, 75, 115, .24);
}

.crm-body .btn,
.auth-body .btn,
.error-page .btn,
body:not(.crm-body) .no-print.btn {
  display: inline-flex;
  min-height: var(--app-button-height);
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--app-button-radius);
  font-family: "Montserrat", "Segoe UI", Arial, sans-serif;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .005em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease, color 140ms ease, transform 140ms ease;
}

.crm-body .btn-sm,
.auth-body .btn-sm,
.error-page .btn-sm {
  min-height: 32px;
  padding: 6px 11px;
  font-size: .7rem;
}

.crm-body .btn-lg,
.auth-body .btn-lg,
.error-page .btn-lg {
  min-height: 42px;
  padding: 10px 17px;
  font-size: .82rem;
}

.crm-body .btn .bi,
.auth-body .btn .bi,
.error-page .btn .bi,
body:not(.crm-body) .no-print.btn .bi {
  margin: 0 !important;
  color: currentColor !important;
  font-size: .82rem;
  font-weight: 400;
  line-height: 1;
}

.crm-body .btn.btn-primary,
.crm-body .dashboard-page-actions .btn.btn-primary,
.crm-body .lead-form-action-buttons .btn.btn-primary,
.crm-body .quotation-create-action-buttons .btn.btn-primary,
.crm-body .lead-detail-primary-form .btn,
.auth-body .btn.btn-primary,
.error-page .btn.btn-primary,
body:not(.crm-body) .no-print.btn.btn-primary {
  border-color: var(--app-button-primary) !important;
  color: var(--app-button-text) !important;
  background: var(--app-button-primary) !important;
  background-image: none !important;
  box-shadow: inset 0 -2px 0 var(--app-button-accent), var(--app-button-shadow) !important;
}

.crm-body .btn.btn-primary:hover,
.crm-body .btn.btn-primary:focus-visible,
.crm-body .dashboard-page-actions .btn.btn-primary:hover,
.crm-body .dashboard-page-actions .btn.btn-primary:focus-visible,
.auth-body .btn.btn-primary:hover,
.auth-body .btn.btn-primary:focus-visible,
.error-page .btn.btn-primary:hover,
.error-page .btn.btn-primary:focus-visible,
body:not(.crm-body) .no-print.btn.btn-primary:hover,
body:not(.crm-body) .no-print.btn.btn-primary:focus-visible {
  border-color: var(--app-button-primary-hover) !important;
  color: #fff !important;
  background: var(--app-button-primary-hover) !important;
  box-shadow: inset 0 -2px 0 #d6c2a7, 0 6px 13px rgba(37, 37, 37, .2) !important;
  transform: translateY(-1px);
}

.crm-body .btn.btn-primary:active,
.auth-body .btn.btn-primary:active,
.error-page .btn.btn-primary:active,
body:not(.crm-body) .no-print.btn.btn-primary:active {
  border-color: var(--app-button-primary-active) !important;
  background: var(--app-button-primary-active) !important;
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, .18), inset 0 -1px 0 var(--app-button-accent) !important;
  transform: translateY(0);
}

.crm-body .btn.btn-outline-primary,
.auth-body .btn.btn-outline-primary,
.error-page .btn.btn-outline-primary,
body:not(.crm-body) .no-print.btn.btn-outline-primary {
  border-color: #8093a8 !important;
  color: var(--app-button-primary) !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: inset 0 -2px 0 #eceff1, 0 2px 6px rgba(37, 37, 37, .08) !important;
}

.crm-body .btn.btn-outline-primary:hover,
.crm-body .btn.btn-outline-primary:focus-visible,
.auth-body .btn.btn-outline-primary:hover,
.auth-body .btn.btn-outline-primary:focus-visible,
.error-page .btn.btn-outline-primary:hover,
.error-page .btn.btn-outline-primary:focus-visible,
body:not(.crm-body) .no-print.btn.btn-outline-primary:hover,
body:not(.crm-body) .no-print.btn.btn-outline-primary:focus-visible {
  border-color: var(--app-button-primary) !important;
  color: #fff !important;
  background: var(--app-button-primary) !important;
  box-shadow: inset 0 -2px 0 var(--app-button-accent), var(--app-button-shadow) !important;
  transform: translateY(-1px);
}

.crm-body .btn.btn-secondary,
.crm-body .btn.btn-outline-secondary,
.auth-body .btn.btn-secondary,
.auth-body .btn.btn-outline-secondary,
.error-page .btn.btn-secondary,
.error-page .btn.btn-outline-secondary {
  border-color: #c8cdd2 !important;
  color: #3d3d3d !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: inset 0 -2px 0 #eceff1, 0 2px 6px rgba(37, 37, 37, .08) !important;
}

.crm-body .btn.btn-secondary:hover,
.crm-body .btn.btn-outline-secondary:hover,
.crm-body .btn.btn-secondary:focus-visible,
.crm-body .btn.btn-outline-secondary:focus-visible,
.auth-body .btn.btn-secondary:hover,
.auth-body .btn.btn-outline-secondary:hover,
.error-page .btn.btn-secondary:hover,
.error-page .btn.btn-outline-secondary:hover {
  border-color: #9da4aa !important;
  color: #252525 !important;
  background: #fbf7ee !important;
  box-shadow: inset 0 -2px 0 #d6c2a7, 0 4px 9px rgba(37, 37, 37, .1) !important;
  transform: translateY(-1px);
}

.crm-body .btn.btn-danger,
.crm-body .btn.btn-outline-danger,
.auth-body .btn.btn-danger,
.auth-body .btn.btn-outline-danger,
.error-page .btn.btn-danger,
.error-page .btn.btn-outline-danger {
  border-color: var(--crm-status-critical) !important;
  color: var(--crm-status-critical) !important;
  background: var(--crm-status-critical-bg) !important;
  background-image: none !important;
  box-shadow: inset 0 -2px 0 var(--crm-status-critical-border), 0 2px 6px rgba(37, 37, 37, .08) !important;
}

.crm-body .btn.btn-danger:hover,
.crm-body .btn.btn-outline-danger:hover,
.crm-body .btn.btn-danger:focus-visible,
.crm-body .btn.btn-outline-danger:focus-visible,
.auth-body .btn.btn-danger:hover,
.auth-body .btn.btn-outline-danger:hover,
.error-page .btn.btn-danger:hover,
.error-page .btn.btn-outline-danger:hover {
  border-color: var(--crm-status-critical) !important;
  color: #fff !important;
  background: var(--crm-status-critical) !important;
  box-shadow: inset 0 -2px 0 #e8a6a1, 0 4px 9px rgba(180, 35, 24, .18) !important;
  transform: translateY(-1px);
}

.crm-body .btn.btn-success,
.crm-body .btn.btn-outline-success {
  border-color: var(--crm-status-positive) !important;
  color: var(--crm-status-positive) !important;
  background: var(--crm-status-positive-bg) !important;
  background-image: none !important;
  box-shadow: inset 0 -2px 0 var(--crm-status-positive-border), 0 2px 6px rgba(37, 37, 37, .08) !important;
}

.crm-body .btn.btn-success:hover,
.crm-body .btn.btn-outline-success:hover,
.crm-body .btn.btn-success:focus-visible,
.crm-body .btn.btn-outline-success:focus-visible {
  color: #fff !important;
  background: var(--crm-status-positive) !important;
  box-shadow: inset 0 -2px 0 #9ed3b7, 0 4px 9px rgba(20, 122, 80, .17) !important;
  transform: translateY(-1px);
}

.crm-body .btn.btn-warning,
.crm-body .btn.btn-outline-warning {
  border-color: var(--crm-status-warning-border) !important;
  color: var(--crm-status-warning) !important;
  background: var(--crm-status-warning-bg) !important;
  background-image: none !important;
  box-shadow: inset 0 -2px 0 var(--crm-status-warning-border), 0 2px 6px rgba(37, 37, 37, .08) !important;
}

.crm-body .btn.btn-link {
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 3px;
  color: #284b73;
  background: transparent;
  box-shadow: none !important;
}

.crm-body .btn:focus-visible,
.auth-body .btn:focus-visible,
.error-page .btn:focus-visible,
body:not(.crm-body) .no-print.btn:focus-visible {
  outline: 3px solid var(--app-button-focus);
  outline-offset: 2px;
}

.crm-body .btn:disabled,
.crm-body .btn.disabled,
.auth-body .btn:disabled,
.auth-body .btn.disabled,
.error-page .btn:disabled,
.error-page .btn.disabled {
  box-shadow: none !important;
  transform: none !important;
}

/* Compact icon actions use the same radius, navy/white base and elevation. */
.crm-body .table-action-icon,
.crm-body .crm-icon-button {
  border-color: #d6dbe0;
  border-radius: var(--app-button-radius);
  color: #284b73;
  background: #fff;
  box-shadow: 0 2px 5px rgba(37, 37, 37, .08);
}

.crm-body .table-action-icon:hover,
.crm-body .table-action-icon:focus-visible,
.crm-body .crm-icon-button:hover,
.crm-body .crm-icon-button:focus-visible {
  border-color: #8093a8;
  color: #1d3557;
  background: #eef2f6;
  box-shadow: inset 0 -2px 0 #d6c2a7, 0 3px 7px rgba(37, 37, 37, .1);
  transform: translateY(-1px);
}

.crm-body .table-action-icon--positive {
  color: var(--crm-status-positive);
}

.crm-body .table-action-icon--critical {
  color: var(--crm-status-critical);
}

.crm-body .table-action-icon--neutral {
  color: var(--crm-status-neutral);
}

.crm-body .customer-detail-action,
.crm-body .quotation-add-customer-link,
.crm-body .lead-document-trigger,
.crm-body .crm-page-control {
  border-color: #c8cdd2;
  border-radius: var(--app-button-radius);
  color: #1d3557;
  background: #fff;
  box-shadow: inset 0 -2px 0 #eceff1, 0 2px 6px rgba(37, 37, 37, .08);
}

.crm-body .customer-detail-action:hover,
.crm-body .quotation-add-customer-link:hover,
.crm-body .lead-document-trigger:hover:not(:disabled),
.crm-body .lead-document-trigger:focus-visible:not(:disabled),
.crm-body .crm-page-control:hover {
  border-color: #8093a8;
  color: #1d3557;
  background: #fbf7ee;
  box-shadow: inset 0 -2px 0 #d6c2a7, 0 4px 9px rgba(37, 37, 37, .1);
  transform: translateY(-1px);
}

.crm-body .customer-detail-action--primary,
.crm-body .whatsapp-send-button {
  border-color: var(--app-button-primary);
  color: #fff;
  background: var(--app-button-primary);
  box-shadow: inset 0 -2px 0 var(--app-button-accent), var(--app-button-shadow);
}

.crm-body .customer-detail-action--primary:hover,
.crm-body .whatsapp-send-button:hover,
.crm-body .whatsapp-send-button:focus-visible {
  border-color: var(--app-button-primary-hover);
  color: #fff;
  background: var(--app-button-primary-hover);
  box-shadow: inset 0 -2px 0 #d6c2a7, 0 6px 13px rgba(37, 37, 37, .2);
  transform: translateY(-1px);
}

.crm-body .lead-view-switch-button.active {
  color: #fff;
  background: var(--app-button-primary);
  box-shadow: inset 0 -2px 0 var(--app-button-accent), 0 3px 7px rgba(37, 37, 37, .13);
}

.crm-body .lead-view-switch-button.active .bi {
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .crm-body .btn,
  .auth-body .btn,
  .error-page .btn,
  .crm-body .table-action-icon,
  .crm-body .crm-icon-button {
    transition: none;
  }
}

/* Permanent application dropdown system
 * -------------------------------------
 * All native and searchable selection controls share the approved compact
 * white surface, charcoal text, soft border and navy focus treatment.
 */
:root {
  --app-select-height: 2.5rem;
  --app-select-border: #cbd5df;
  --app-select-border-hover: #aebdcb;
  --app-select-border-focus: #7089a3;
  --app-select-bg: #ffffff;
  --app-select-text: #252525;
  --app-select-muted: #667085;
  --app-select-radius: 8px;
  --app-select-focus: rgba(40, 75, 115, .18);
}

.form-select {
  min-height: var(--app-select-height) !important;
  border-color: var(--app-select-border) !important;
  border-radius: var(--app-select-radius) !important;
  color: var(--app-select-text);
  background-color: var(--app-select-bg);
  font-size: 9pt !important;
  font-weight: 550;
  line-height: 1.35;
  box-shadow: none;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.form-select:not([multiple]):not([size]),
.form-select:not([multiple])[size="1"] {
  padding: .48rem 2.25rem .48rem .75rem !important;
  background-position: right .75rem center !important;
  background-size: 16px 12px !important;
}

.form-floating > .form-select:not([multiple]) {
  padding-top: 1.625rem !important;
  padding-bottom: .625rem !important;
}

.form-select:hover:not(:disabled) {
  border-color: var(--app-select-border-hover) !important;
}

.form-select:focus {
  border-color: var(--app-select-border-focus) !important;
  outline: 0;
  box-shadow: 0 0 0 .2rem var(--app-select-focus) !important;
}

.form-select:disabled {
  border-color: #dfe3e7 !important;
  color: var(--app-select-muted) !important;
  background-color: #f4f5f6 !important;
  opacity: 1;
  cursor: not-allowed;
}

.form-select.is-invalid,
.was-validated .form-select:invalid {
  border-color: var(--crm-status-critical) !important;
}

.form-select.is-invalid:focus,
.was-validated .form-select:invalid:focus {
  box-shadow: 0 0 0 .2rem rgba(159, 21, 32, .14) !important;
}

/* Preserve permanent Lead status/priority meaning within the shared shape. */
.form-select.lead-semantic-select {
  border-left-color: var(--lead-semantic-border, var(--app-select-border)) !important;
  color: var(--lead-semantic-fg, var(--app-select-text));
  background-color: var(--lead-semantic-bg, var(--app-select-bg));
}

.crm-searchable-select-trigger {
  min-height: var(--app-select-height) !important;
  border-color: var(--app-select-border) !important;
  border-radius: var(--app-select-radius) !important;
  color: var(--app-select-text) !important;
  background-color: var(--app-select-bg) !important;
  font-size: 9pt !important;
  font-weight: 550;
  box-shadow: none !important;
}

.crm-searchable-select-trigger:hover {
  border-color: var(--app-select-border-hover) !important;
}

.crm-searchable-select-trigger:focus-visible,
.crm-searchable-select-trigger[aria-expanded="true"] {
  border-color: var(--app-select-border-focus) !important;
  outline: 0;
  box-shadow: 0 0 0 .2rem var(--app-select-focus) !important;
}

.crm-searchable-select-panel {
  border-color: var(--app-select-border) !important;
  border-radius: var(--app-select-radius) !important;
  background: var(--app-select-bg) !important;
  box-shadow: 0 12px 28px rgba(29, 53, 87, .16) !important;
}

.crm-searchable-select-option {
  border-radius: 6px !important;
  color: var(--app-select-text) !important;
  font-size: 9pt !important;
}

.crm-searchable-select-option:hover,
.crm-searchable-select-option:focus,
.crm-searchable-select-option[aria-selected="true"] {
  color: #1d3557 !important;
  background: #eef2f6 !important;
}

/* Additional application themes
 * -----------------------------
 * Light keeps the workspace airy and moves navigation onto a white surface.
 * Dark changes the complete application shell and shared content primitives,
 * while permanent status and priority colours retain their business meaning.
 */
:root[data-crm-theme="light"] {
  color-scheme: light;
  --crm-brand-navy: #183b63;
  --crm-brand-navy-deep: #102a47;
  --crm-brand-blue: #315f8d;
  --crm-brand-blue-soft: #edf4fa;
  --crm-brand-orange: #b58b5d;
  --crm-brand-orange-soft: #fbf6ef;
  --crm-sidebar-bg: #ffffff;
  --crm-sidebar-bg-strong: #f7f9fc;
  --crm-sidebar-text: #31445a;
  --crm-sidebar-muted: #718096;
  --crm-sidebar-active: #315f8d;
  --crm-border: #dce3ea;
  --crm-content-bg: #f3f6f9;
  --crm-surface: #ffffff;
  --crm-text: #202b38;
  --crm-muted: #667085;
  --wds-border: #dce3ea;
  --wds-border-soft: #e9eef3;
  --wds-surface: #ffffff;
  --wds-surface-muted: #f5f7fa;
  --wds-surface-hover: #edf4fa;
  --wds-text: #31445a;
  --wds-text-muted: #667085;
  --wds-heading: #183b63;
  --wds-link: #315f8d;
  --app-button-primary: #183b63;
  --app-button-primary-hover: #102a47;
  --app-button-accent: #b58b5d;
  --app-select-border-focus: #6f8eac;
  --app-select-focus: rgba(49, 95, 141, .18);
}

:root[data-crm-theme="light"] .crm-sidebar {
  border-right: 1px solid #dce3ea;
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
  box-shadow: 8px 0 24px rgba(24, 59, 99, .07);
}

:root[data-crm-theme="light"] .crm-sidebar-brand {
  border-bottom-color: #dce3ea;
  background: rgba(255, 255, 255, .96);
}

:root[data-crm-theme="light"] .crm-brand-link,
:root[data-crm-theme="light"] .crm-brand-link:hover {
  color: #183b63;
}

:root[data-crm-theme="light"] .crm-brand-subtitle {
  color: #9a6f42;
}

:root[data-crm-theme="light"] .crm-nav-group-toggle {
  color: #718096;
}

:root[data-crm-theme="light"] .crm-nav-group-toggle:hover,
:root[data-crm-theme="light"] .crm-nav-group-toggle:focus {
  color: #183b63;
  background: #edf4fa;
}

:root[data-crm-theme="light"] .crm-nav-section-divider {
  background: #e1e7ed;
}

:root[data-crm-theme="light"] .crm-nav-link:hover,
:root[data-crm-theme="light"] .crm-nav-link:focus {
  color: #183b63;
  background: #edf4fa;
}

:root[data-crm-theme="light"] .crm-nav-link:hover i,
:root[data-crm-theme="light"] .crm-nav-link:focus i {
  color: #315f8d;
}

:root[data-crm-theme="light"] .crm-nav-link.active {
  color: #183b63;
  background: linear-gradient(90deg, #e6f0f8, #f3f7fb);
  box-shadow: inset 3px 0 0 #315f8d;
}

:root[data-crm-theme="light"] .crm-nav-link.active i {
  color: #315f8d;
}

:root[data-crm-theme="light"] .crm-nav-group.has-active-item > .crm-nav-group-toggle,
:root[data-crm-theme="light"] body.crm-sidebar-collapsed .crm-nav-group.has-active-item > .crm-nav-group-toggle {
  color: #183b63;
  background: #e6f0f8;
  box-shadow: inset 3px 0 0 #315f8d;
}

:root[data-crm-theme="light"] .crm-sidebar-settings {
  border-top-color: #dce3ea;
  background: #f5f7fa;
  box-shadow: 0 -5px 14px rgba(24, 59, 99, .04);
}

:root[data-crm-theme="light"] .crm-sidebar-settings .crm-nav-link {
  background: transparent;
}

:root[data-crm-theme="light"] .crm-sidebar-settings .crm-nav-link:hover,
:root[data-crm-theme="light"] .crm-sidebar-settings .crm-nav-link:focus,
:root[data-crm-theme="light"] .crm-sidebar-settings .crm-nav-link.active {
  background: #e8f0f7;
}

:root[data-crm-theme="light"] .crm-topbar {
  border-bottom-color: #dce3ea;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 5px 18px rgba(24, 59, 99, .055);
}

:root[data-crm-theme="dark"] {
  color-scheme: dark;
  --crm-brand-navy: #9ac3e8;
  --crm-brand-navy-deep: #e4eff9;
  --crm-brand-blue: #75a9d8;
  --crm-brand-blue-soft: #1c3145;
  --crm-brand-orange: #d6b28a;
  --crm-brand-orange-soft: #382e24;
  --crm-sidebar-bg: #111827;
  --crm-sidebar-bg-strong: #090e16;
  --crm-sidebar-text: #e7edf5;
  --crm-sidebar-muted: #9ba9bb;
  --crm-sidebar-active: #d6b28a;
  --crm-border: #344356;
  --crm-content-bg: #0d1420;
  --crm-surface: #172130;
  --crm-text: #e7edf5;
  --crm-muted: #9ba9bb;
  --crm-status-info: #8dbce7;
  --crm-status-info-bg: #1a3147;
  --crm-status-info-border: #355d7e;
  --bs-body-bg: #0d1420;
  --bs-body-color: #e7edf5;
  --bs-emphasis-color: #f5f8fc;
  --bs-secondary-color: #a9b5c4;
  --bs-tertiary-color: #8c9aac;
  --bs-border-color: #344356;
  --bs-link-color: #8dbce7;
  --bs-link-hover-color: #b8d5ee;
  --wds-border: #344356;
  --wds-border-soft: #29384a;
  --wds-surface: #172130;
  --wds-surface-muted: #121c29;
  --wds-surface-hover: #1c2b3c;
  --wds-text: #dbe4ee;
  --wds-text-muted: #9ba9bb;
  --wds-heading: #e4eff9;
  --wds-link: #8dbce7;
  --wds-accent: #d6b28a;
  --wds-shadow: 0 5px 18px rgba(0, 0, 0, .2);
  --app-button-primary: #315f8d;
  --app-button-primary-hover: #254c74;
  --app-button-accent: #d6b28a;
  --app-button-shadow: 0 4px 10px rgba(0, 0, 0, .28);
  --app-select-border: #435267;
  --app-select-border-hover: #60738b;
  --app-select-border-focus: #75a9d8;
  --app-select-bg: #131d2a;
  --app-select-text: #e7edf5;
  --app-select-muted: #8796a9;
  --app-select-focus: rgba(117, 169, 216, .2);
  --auth-navy: #9ac3e8;
  --auth-blue: #75a9d8;
  --auth-orange: #d6b28a;
  --auth-ink: #e7edf5;
  --auth-muted: #9ba9bb;
  --auth-line: #344356;
}

:root[data-crm-theme="dark"] .crm-body,
:root[data-crm-theme="dark"] .crm-shell,
:root[data-crm-theme="dark"] .crm-main-panel,
:root[data-crm-theme="dark"] .crm-content,
:root[data-crm-theme="dark"] .crm-content-container {
  color: var(--crm-text);
  background-color: var(--crm-content-bg);
}

:root[data-crm-theme="dark"] .crm-sidebar {
  border-right: 1px solid #29384a;
  background: linear-gradient(180deg, #090e16 0%, #111827 52%, #17283a 100%);
  box-shadow: 12px 0 30px rgba(0, 0, 0, .28);
}

:root[data-crm-theme="dark"] .crm-sidebar-brand {
  border-bottom-color: rgba(214, 178, 138, .28);
  background: rgba(9, 14, 22, .96);
}

:root[data-crm-theme="dark"] .crm-nav-link:hover,
:root[data-crm-theme="dark"] .crm-nav-link:focus {
  color: #fff;
  background: rgba(117, 169, 216, .13);
}

:root[data-crm-theme="dark"] .crm-nav-link.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(214, 178, 138, .18), rgba(117, 169, 216, .16));
  box-shadow: inset 3px 0 0 #d6b28a;
}

:root[data-crm-theme="dark"] .crm-nav-link.active i {
  color: #e7c9a6;
}

:root[data-crm-theme="dark"] .crm-topbar {
  border-bottom-color: #344356;
  background: rgba(18, 28, 41, .97);
  box-shadow: 0 5px 18px rgba(0, 0, 0, .22);
}

:root[data-crm-theme="dark"] .crm-topbar-search .form-control,
:root[data-crm-theme="dark"] .crm-topbar-search .form-control:focus {
  border-color: #435267;
  color: #e7edf5;
  background: #131d2a;
}

:root[data-crm-theme="dark"] .crm-icon-button {
  border-color: #435267;
  color: #cbd6e2;
  background: #172130;
}

:root[data-crm-theme="dark"] .crm-icon-button:hover,
:root[data-crm-theme="dark"] .crm-icon-button:focus {
  border-color: #60738b;
  color: #b8d5ee;
  background: #1c3145;
}

:root[data-crm-theme="dark"] .crm-footer {
  border-top-color: #29384a;
  color: #9ba9bb;
  background: #111a27;
}

:root[data-crm-theme="dark"] .card,
:root[data-crm-theme="dark"] .modal-content,
:root[data-crm-theme="dark"] .offcanvas,
:root[data-crm-theme="dark"] .dropdown-menu,
:root[data-crm-theme="dark"] .list-group-item,
:root[data-crm-theme="dark"] .dashboard-section-card,
:root[data-crm-theme="dark"] .dashboard-stat-card,
:root[data-crm-theme="dark"] .lead-form-section,
:root[data-crm-theme="dark"] .lead-service-card,
:root[data-crm-theme="dark"] .quotation-builder-form-section,
:root[data-crm-theme="dark"] .quotation-builder-item-card,
:root[data-crm-theme="dark"] .quotation-builder-empty-state,
:root[data-crm-theme="dark"] .quotation-builder-traveller-stat,
:root[data-crm-theme="dark"] .quotation-itinerary-workspace-panel,
:root[data-crm-theme="dark"] .department-details-field,
:root[data-crm-theme="dark"] .guide-copy-grid > div {
  border-color: #344356 !important;
  color: #e7edf5;
  background-color: #172130 !important;
  background-image: none !important;
}

:root[data-crm-theme="dark"] .dashboard-section-header,
:root[data-crm-theme="dark"] .lead-form-section-header,
:root[data-crm-theme="dark"] .lead-service-card-top,
:root[data-crm-theme="dark"] .quotation-builder-source-header,
:root[data-crm-theme="dark"] .quotation-builder-card-header,
:root[data-crm-theme="dark"] .quotation-builder-form-section-header,
:root[data-crm-theme="dark"] .quotation-builder-costing-heading,
:root[data-crm-theme="dark"] .modal-header,
:root[data-crm-theme="dark"] .modal-footer,
:root[data-crm-theme="dark"] .offcanvas-header {
  border-color: #344356 !important;
  background-color: #131d2a !important;
  background-image: none !important;
}

:root[data-crm-theme="dark"] .lead-filter-panel,
:root[data-crm-theme="dark"] .quotation-builder-hero,
:root[data-crm-theme="dark"] .quotation-builder-add-card > .dashboard-section-body,
:root[data-crm-theme="dark"] .quotation-builder-items-card > .dashboard-section-body {
  border-color: #344356 !important;
  background-color: #121c29 !important;
  background-image: none !important;
}

:root[data-crm-theme="dark"] .form-control,
:root[data-crm-theme="dark"] .form-select,
:root[data-crm-theme="dark"] .input-group-text,
:root[data-crm-theme="dark"] .lead-form-section .form-control,
:root[data-crm-theme="dark"] .lead-form-section .form-select {
  border-color: var(--app-select-border) !important;
  color: var(--app-select-text) !important;
  background-color: var(--app-select-bg) !important;
}

:root[data-crm-theme="dark"] .form-control::placeholder {
  color: #7f8ea1 !important;
}

:root[data-crm-theme="dark"] .form-select:not([multiple]):not([size]),
:root[data-crm-theme="dark"] .form-select:not([multiple])[size="1"] {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23cbd6e2' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
}

:root[data-crm-theme="dark"] .form-control:disabled,
:root[data-crm-theme="dark"] .form-control[readonly],
:root[data-crm-theme="dark"] .form-select:disabled,
:root[data-crm-theme="dark"] .quotation-builder-locked-input .form-control,
:root[data-crm-theme="dark"] .quotation-builder-locked-value,
:root[data-crm-theme="dark"] .quotation-builder-travellers-total {
  border-color: #344356 !important;
  color: #a9b5c4 !important;
  background-color: #101923 !important;
}

:root[data-crm-theme="dark"] .crm-searchable-select-option:hover,
:root[data-crm-theme="dark"] .crm-searchable-select-option:focus,
:root[data-crm-theme="dark"] .crm-searchable-select-option[aria-selected="true"] {
  color: #eaf3fb !important;
  background: #1c3145 !important;
}

:root[data-crm-theme="dark"] .dropdown-divider,
:root[data-crm-theme="dark"] .table > :not(caption) > * > *,
:root[data-crm-theme="dark"] hr {
  border-color: #344356;
}

:root[data-crm-theme="dark"] .dropdown-item {
  color: #dbe4ee;
}

:root[data-crm-theme="dark"] .dropdown-item:hover,
:root[data-crm-theme="dark"] .dropdown-item:focus {
  color: #f5f8fc;
  background-color: #1c2b3c;
}

:root[data-crm-theme="dark"] .table {
  --bs-table-color: #dbe4ee;
  --bs-table-bg: transparent;
  --bs-table-border-color: #344356;
  --bs-table-striped-color: #dbe4ee;
  --bs-table-striped-bg: rgba(255, 255, 255, .025);
  --bs-table-hover-color: #f5f8fc;
  --bs-table-hover-bg: rgba(117, 169, 216, .08);
}

:root[data-crm-theme="dark"] .table thead th,
:root[data-crm-theme="dark"] .table-light {
  --bs-table-color: #dbe4ee;
  --bs-table-bg: #131d2a;
  --bs-table-border-color: #344356;
  color: #dbe4ee;
  background-color: #131d2a !important;
}

:root[data-crm-theme="dark"] .text-muted,
:root[data-crm-theme="dark"] .form-text,
:root[data-crm-theme="dark"] .small.text-muted {
  color: #9ba9bb !important;
}

:root[data-crm-theme="dark"] .breadcrumb-item,
:root[data-crm-theme="dark"] .breadcrumb-item a,
:root[data-crm-theme="dark"] .page-link {
  color: #9fc6ea;
}

:root[data-crm-theme="dark"] .breadcrumb-item.active {
  color: #a9b5c4;
}

:root[data-crm-theme="dark"] .page-link {
  border-color: #344356;
  background-color: #172130;
}

:root[data-crm-theme="dark"] .page-link:hover {
  border-color: #52657c;
  background-color: #1c2b3c;
}

:root[data-crm-theme="dark"] .crm-body .btn-outline-primary,
:root[data-crm-theme="dark"] .crm-body .btn-outline-secondary,
:root[data-crm-theme="dark"] .crm-body .btn-secondary,
:root[data-crm-theme="dark"] .crm-body .customer-detail-action,
:root[data-crm-theme="dark"] .crm-body .quotation-add-customer-link,
:root[data-crm-theme="dark"] .crm-body .lead-document-trigger,
:root[data-crm-theme="dark"] .crm-body .crm-page-control {
  border-color: #52657c;
  color: #cfe2f3;
  background: #172130;
  box-shadow: inset 0 -2px 0 #26384a, 0 2px 6px rgba(0, 0, 0, .2);
}

:root[data-crm-theme="dark"] .crm-body .btn-outline-primary:hover,
:root[data-crm-theme="dark"] .crm-body .btn-outline-secondary:hover,
:root[data-crm-theme="dark"] .crm-body .btn-secondary:hover,
:root[data-crm-theme="dark"] .crm-body .customer-detail-action:hover,
:root[data-crm-theme="dark"] .crm-body .quotation-add-customer-link:hover,
:root[data-crm-theme="dark"] .crm-body .crm-page-control:hover {
  border-color: #75a9d8;
  color: #f4f8fc;
  background: #1c3145;
  box-shadow: inset 0 -2px 0 #d6b28a, 0 4px 9px rgba(0, 0, 0, .24);
}

:root[data-crm-theme="dark"] .auth-body {
  color: #e7edf5;
  background:
    radial-gradient(circle at 8% 8%, rgba(117, 169, 216, .12), transparent 28%),
    radial-gradient(circle at 92% 90%, rgba(214, 178, 138, .1), transparent 25%),
    #0d1420;
}

:root[data-crm-theme="dark"] .login-form-panel,
:root[data-crm-theme="dark"] .login-shell {
  border-color: #344356;
  color: #e7edf5;
  background-color: #172130;
}

:root[data-crm-theme="dark"] .login-brand-panel {
  background:
    radial-gradient(circle at 88% 6%, rgba(214, 178, 138, .18), transparent 23%),
    linear-gradient(145deg, #254c74 0%, #17283a 48%, #090e16 100%);
}

:root[data-crm-theme="dark"] body.error-page {
  color: #e7edf5;
  background:
    radial-gradient(circle at 12% 12%, rgba(117, 169, 216, .12), transparent 32rem),
    radial-gradient(circle at 90% 88%, rgba(214, 178, 138, .1), transparent 28rem),
    #0d1420;
}

:root[data-crm-theme="dark"] .error-card {
  border-color: #344356;
  color: #e7edf5;
  background: #172130;
}

/* Multicolor finishing layer. These rules intentionally follow the permanent
 * control systems so their neutral defaults do not pull the theme back to blue. */
:root[data-crm-theme="multicolor"] .crm-content {
  background:
    radial-gradient(circle at 8% 5%, rgba(109, 40, 217, .045), transparent 24rem),
    radial-gradient(circle at 92% 8%, rgba(15, 139, 122, .045), transparent 22rem),
    radial-gradient(circle at 75% 96%, rgba(234, 106, 20, .035), transparent 20rem),
    #faf8fc;
}

:root[data-crm-theme="multicolor"] .crm-topbar {
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, #6d28d9, #db2777, #ea6a14, #0f8b7a) 1;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 5px 18px rgba(76, 29, 149, .07);
}

:root[data-crm-theme="multicolor"] .crm-theme-trigger .bi {
  color: #db2777;
}

:root[data-crm-theme="multicolor"] .crm-icon-button:hover,
:root[data-crm-theme="multicolor"] .crm-icon-button:focus {
  border-color: #70bcb0;
  color: #0f766e;
  background: #eaf8f5 !important;
}

:root[data-crm-theme="multicolor"] .crm-body .btn.btn-primary:hover,
:root[data-crm-theme="multicolor"] .crm-body .btn.btn-primary:focus-visible,
:root[data-crm-theme="multicolor"] .auth-body .btn.btn-primary:hover,
:root[data-crm-theme="multicolor"] .auth-body .btn.btn-primary:focus-visible,
:root[data-crm-theme="multicolor"] .error-page .btn.btn-primary:hover,
:root[data-crm-theme="multicolor"] .error-page .btn.btn-primary:focus-visible {
  box-shadow: inset 0 -2px 0 #fb923c, 0 6px 13px rgba(109, 40, 217, .24) !important;
}

:root[data-crm-theme="multicolor"] .crm-body .btn.btn-outline-primary,
:root[data-crm-theme="multicolor"] .auth-body .btn.btn-outline-primary,
:root[data-crm-theme="multicolor"] .error-page .btn.btn-outline-primary,
:root[data-crm-theme="multicolor"] body:not(.crm-body) .no-print.btn.btn-outline-primary {
  border-color: #70bcb0 !important;
  color: #0f766e !important;
  background: #fff !important;
  box-shadow: inset 0 -2px 0 #d8f1ec, 0 2px 6px rgba(15, 118, 110, .09) !important;
}

:root[data-crm-theme="multicolor"] .crm-body .btn.btn-outline-primary:hover,
:root[data-crm-theme="multicolor"] .crm-body .btn.btn-outline-primary:focus-visible,
:root[data-crm-theme="multicolor"] .auth-body .btn.btn-outline-primary:hover,
:root[data-crm-theme="multicolor"] .auth-body .btn.btn-outline-primary:focus-visible,
:root[data-crm-theme="multicolor"] .error-page .btn.btn-outline-primary:hover,
:root[data-crm-theme="multicolor"] .error-page .btn.btn-outline-primary:focus-visible,
:root[data-crm-theme="multicolor"] body:not(.crm-body) .no-print.btn.btn-outline-primary:hover,
:root[data-crm-theme="multicolor"] body:not(.crm-body) .no-print.btn.btn-outline-primary:focus-visible {
  border-color: #0f8b7a !important;
  color: #fff !important;
  background: #0f8b7a !important;
  box-shadow: inset 0 -2px 0 #fb923c, 0 5px 11px rgba(15, 118, 110, .2) !important;
}

:root[data-crm-theme="multicolor"] .crm-body .customer-detail-action,
:root[data-crm-theme="multicolor"] .crm-body .quotation-add-customer-link,
:root[data-crm-theme="multicolor"] .crm-body .lead-document-trigger,
:root[data-crm-theme="multicolor"] .crm-body .crm-page-control {
  border-color: #d8c8ef;
  color: #6d28d9;
  background: #fff;
  box-shadow: inset 0 -2px 0 #f1e9fb, 0 2px 6px rgba(76, 29, 149, .08);
}

:root[data-crm-theme="multicolor"] .crm-body .customer-detail-action:hover,
:root[data-crm-theme="multicolor"] .crm-body .quotation-add-customer-link:hover,
:root[data-crm-theme="multicolor"] .crm-body .lead-document-trigger:hover:not(:disabled),
:root[data-crm-theme="multicolor"] .crm-body .crm-page-control:hover {
  border-color: #db2777;
  color: #a51658;
  background: #fff1f7;
  box-shadow: inset 0 -2px 0 #f9a8d4, 0 4px 9px rgba(219, 39, 119, .12);
}

:root[data-crm-theme="multicolor"] .crm-searchable-select-option:hover,
:root[data-crm-theme="multicolor"] .crm-searchable-select-option:focus,
:root[data-crm-theme="multicolor"] .crm-searchable-select-option[aria-selected="true"] {
  color: #0f766e !important;
  background: #eaf8f5 !important;
}

:root[data-crm-theme="multicolor"] .lead-form-section-icon--quotation {
  color: #be185d;
  background: #fce7f3;
}

:root[data-crm-theme="multicolor"] .lead-service-duration {
  border-color: #f2c08f;
  background: linear-gradient(100deg, #fff8ef, #fff1f7);
}

:root[data-crm-theme="multicolor"] .lead-service-duration-icon {
  color: #fff;
  background: linear-gradient(135deg, #ea6a14, #db2777);
}

:root[data-crm-theme="multicolor"] .quotation-builder-hero::before {
  background: linear-gradient(90deg, #6d28d9, #db2777 35%, #ea6a14 68%, #0f8b7a);
}

:root[data-crm-theme="multicolor"] .quotation-builder-add-actions .btn,
:root[data-crm-theme="multicolor"] .lead-service-add {
  border-color: #6d28d9;
  background: linear-gradient(110deg, #6d28d9, #db2777 58%, #ea6a14);
  box-shadow: inset 0 -2px 0 #fb923c, 0 4px 10px rgba(109, 40, 217, .18);
}

:root[data-crm-theme="multicolor"] .quotation-builder-add-actions .btn:hover,
:root[data-crm-theme="multicolor"] .lead-service-add:hover {
  border-color: #4c1d95;
  background: linear-gradient(110deg, #4c1d95, #be185d 62%, #c94f0c);
}

/* Multicolor 1: exact user-selected core palette.
 * Bright red is reserved for accents and focus markers so normal-sized text
 * continues to meet contrast requirements. */
:root[data-crm-theme="multicolor1"] {
  color-scheme: light;
  --crm-brand-navy: #000080;
  --crm-brand-navy-deep: #3a2525;
  --crm-brand-blue: #9e2a3a;
  --crm-brand-blue-soft: #f7eaec;
  --crm-brand-orange: #ff0000;
  --crm-brand-orange-soft: #fff0f0;
  --crm-sidebar-bg: #000080;
  --crm-sidebar-bg-strong: #3a2525;
  --crm-sidebar-text: #ffffff;
  --crm-sidebar-muted: #f1c7cd;
  --crm-sidebar-active: #ff0000;
  --crm-border: #dfd5d7;
  --crm-content-bg: #f8f6f6;
  --crm-surface: #ffffff;
  --crm-text: #3a2525;
  --crm-muted: #715f62;
  --bs-primary: #000080;
  --bs-primary-rgb: 0, 0, 128;
  --bs-link-color: #000080;
  --bs-link-color-rgb: 0, 0, 128;
  --bs-link-hover-color: #9e2a3a;
  --bs-link-hover-color-rgb: 158, 42, 58;
  --wds-border: #dfd5d7;
  --wds-border-soft: #eee7e8;
  --wds-surface: #ffffff;
  --wds-surface-muted: #f8f4f5;
  --wds-surface-hover: #fff0f0;
  --wds-text: #3a2525;
  --wds-text-muted: #715f62;
  --wds-heading: #000080;
  --wds-link: #000080;
  --wds-accent: #9e2a3a;
  --wds-shadow: 0 4px 14px rgba(58, 37, 37, .09);
  --app-button-primary: #000080;
  --app-button-primary-hover: #3a2525;
  --app-button-primary-active: #9e2a3a;
  --app-button-accent: #ff0000;
  --app-button-shadow: 0 4px 10px rgba(0, 0, 128, .2);
  --app-button-focus: rgba(158, 42, 58, .24);
  --app-select-border-focus: #9e2a3a;
  --app-select-focus: rgba(158, 42, 58, .17);
  --auth-navy: #000080;
  --auth-blue: #9e2a3a;
  --auth-orange: #ff0000;
  --auth-ink: #3a2525;
  --error-navy: #000080;
  --error-blue: #9e2a3a;
  --error-orange: #ff0000;
}

:root[data-crm-theme="multicolor1"] ::selection {
  color: #fff;
  background: #9e2a3a;
}

:root[data-crm-theme="multicolor1"] html.crm-scroll-active,
:root[data-crm-theme="multicolor1"].crm-scroll-active {
  scrollbar-color: rgba(158, 42, 58, .62) transparent;
}

:root[data-crm-theme="multicolor1"] .crm-sidebar {
  background: linear-gradient(180deg, #3a2525 0%, #000080 58%, #9e2a3a 100%);
  box-shadow: 12px 0 30px rgba(58, 37, 37, .2);
}

:root[data-crm-theme="multicolor1"] .crm-sidebar-brand {
  border-bottom-color: rgba(255, 0, 0, .42);
  background: rgba(58, 37, 37, .96);
}

:root[data-crm-theme="multicolor1"] .crm-nav-link:hover,
:root[data-crm-theme="multicolor1"] .crm-nav-link:focus {
  background: rgba(158, 42, 58, .3);
}

:root[data-crm-theme="multicolor1"] .crm-nav-link.active,
:root[data-crm-theme="multicolor1"] .crm-nav-group.has-active-item > .crm-nav-group-toggle,
:root[data-crm-theme="multicolor1"] body.crm-sidebar-collapsed .crm-nav-group.has-active-item > .crm-nav-group-toggle {
  color: #fff;
  background: linear-gradient(90deg, rgba(255, 0, 0, .22), rgba(0, 0, 128, .44));
  box-shadow: inset 3px 0 0 #ff0000;
}

:root[data-crm-theme="multicolor1"] .crm-nav-link.active i {
  color: #ffd6d6;
}

:root[data-crm-theme="multicolor1"] .crm-topbar {
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, #000080, #ff0000, #9e2a3a, #3a2525) 1;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 5px 18px rgba(58, 37, 37, .08);
}

:root[data-crm-theme="multicolor1"] .crm-theme-trigger .bi {
  color: #9e2a3a;
}

:root[data-crm-theme="multicolor1"] .crm-icon-button:hover,
:root[data-crm-theme="multicolor1"] .crm-icon-button:focus {
  border-color: #9e2a3a;
  color: #000080;
  background: #f7eaec !important;
}

:root[data-crm-theme="multicolor1"] .form-check-input:checked,
:root[data-crm-theme="multicolor1"] .dropdown-item.active,
:root[data-crm-theme="multicolor1"] .dropdown-item:active,
:root[data-crm-theme="multicolor1"] .list-group-item.active {
  border-color: #000080;
  background-color: #000080;
}

:root[data-crm-theme="multicolor1"] .crm-body .text-primary,
:root[data-crm-theme="multicolor1"] .auth-body .text-primary,
:root[data-crm-theme="multicolor1"] .error-page .text-primary,
:root[data-crm-theme="multicolor1"] .crm-body .page-link,
:root[data-crm-theme="multicolor1"] .crm-theme-option-check {
  color: #000080 !important;
}

:root[data-crm-theme="multicolor1"] .crm-body .bg-primary-subtle,
:root[data-crm-theme="multicolor1"] .auth-body .bg-primary-subtle,
:root[data-crm-theme="multicolor1"] .crm-icon-button:hover,
:root[data-crm-theme="multicolor1"] .crm-icon-button:focus,
:root[data-crm-theme="multicolor1"] .crm-searchable-select-option:hover,
:root[data-crm-theme="multicolor1"] .crm-searchable-select-option:focus,
:root[data-crm-theme="multicolor1"] .crm-searchable-select-option[aria-selected="true"] {
  color: #000080 !important;
  background: #f7eaec !important;
}

:root[data-crm-theme="multicolor1"] .crm-page-loader-bar {
  background: linear-gradient(90deg, #000080, #ff0000, #9e2a3a, #3a2525);
}

:root[data-crm-theme="multicolor1"] .auth-body {
  background:
    radial-gradient(circle at 8% 8%, rgba(255, 0, 0, .07), transparent 28%),
    radial-gradient(circle at 92% 90%, rgba(0, 0, 128, .08), transparent 25%),
    #f8f6f6;
}

:root[data-crm-theme="multicolor1"] .login-brand-panel {
  background:
    radial-gradient(circle at 88% 8%, rgba(255, 0, 0, .2), transparent 24%),
    linear-gradient(145deg, #9e2a3a 0%, #000080 52%, #3a2525 100%);
}

:root[data-crm-theme="multicolor1"] body.error-page {
  background:
    radial-gradient(circle at 12% 12%, rgba(158, 42, 58, .09), transparent 32rem),
    radial-gradient(circle at 90% 88%, rgba(0, 0, 128, .07), transparent 28rem),
    #f8f6f6;
}

/* Multicolor 2: dusty blue, powder blue, cream and taupe. Dark ink is used
 * on the pastel controls so labels and navigation remain comfortably legible. */
:root[data-crm-theme="multicolor2"] {
  color-scheme: light;
  --crm-brand-navy: #81a6c6;
  --crm-brand-navy-deep: #365773;
  --crm-brand-blue: #aacddc;
  --crm-brand-blue-soft: #eaf2f5;
  --crm-brand-orange: #d2c4b4;
  --crm-brand-orange-soft: #f3e3d0;
  --crm-sidebar-bg: #81a6c6;
  --crm-sidebar-bg-strong: #d2c4b4;
  --crm-sidebar-text: #20364b;
  --crm-sidebar-muted: #365773;
  --crm-sidebar-active: #f3e3d0;
  --crm-border: #c8d3d6;
  --crm-content-bg: #f8f2ea;
  --crm-surface: #fffdf9;
  --crm-text: #20364b;
  --crm-muted: #5e6f78;
  --crm-status-info: #466f91;
  --crm-status-info-bg: #eaf2f5;
  --crm-status-info-border: #aacddc;
  --bs-primary: #466f91;
  --bs-primary-rgb: 70, 111, 145;
  --bs-link-color: #365773;
  --bs-link-color-rgb: 54, 87, 115;
  --bs-link-hover-color: #20364b;
  --bs-link-hover-color-rgb: 32, 54, 75;
  --wds-border: #c8d3d6;
  --wds-border-soft: #e5e2dd;
  --wds-surface: #fffdf9;
  --wds-surface-muted: #f7efe6;
  --wds-surface-hover: #f3e3d0;
  --wds-text: #20364b;
  --wds-text-muted: #5e6f78;
  --wds-heading: #365773;
  --wds-link: #365773;
  --wds-accent: #81a6c6;
  --wds-shadow: 0 4px 14px rgba(54, 87, 115, .1);
  --app-button-primary: #81a6c6;
  --app-button-primary-hover: #aacddc;
  --app-button-primary-active: #d2c4b4;
  --app-button-accent: #f3e3d0;
  --app-button-text: #20364b;
  --app-button-shadow: 0 4px 10px rgba(54, 87, 115, .18);
  --app-button-focus: rgba(129, 166, 198, .28);
  --app-select-border-focus: #81a6c6;
  --app-select-focus: rgba(129, 166, 198, .2);
  --auth-navy: #365773;
  --auth-blue: #81a6c6;
  --auth-orange: #d2c4b4;
  --auth-ink: #20364b;
  --auth-muted: #5e6f78;
  --auth-line: #c8d3d6;
  --error-navy: #365773;
  --error-blue: #81a6c6;
  --error-orange: #d2c4b4;
  --error-border: #c8d3d6;
  --error-muted: #5e6f78;
}

:root[data-crm-theme="multicolor2"] ::selection {
  color: #20364b;
  background: #aacddc;
}

:root[data-crm-theme="multicolor2"] html.crm-scroll-active,
:root[data-crm-theme="multicolor2"].crm-scroll-active {
  scrollbar-color: rgba(70, 111, 145, .62) transparent;
}

:root[data-crm-theme="multicolor2"] .crm-sidebar {
  background: linear-gradient(180deg, #81a6c6 0%, #aacddc 56%, #d2c4b4 100%);
  box-shadow: 12px 0 30px rgba(54, 87, 115, .16);
}

:root[data-crm-theme="multicolor2"] .crm-sidebar-brand {
  border-bottom-color: rgba(54, 87, 115, .38);
  background: rgba(243, 227, 208, .5);
}

:root[data-crm-theme="multicolor2"] .crm-nav-link:hover,
:root[data-crm-theme="multicolor2"] .crm-nav-link:focus {
  background: rgba(243, 227, 208, .58);
}

:root[data-crm-theme="multicolor2"] .crm-nav-link.active,
:root[data-crm-theme="multicolor2"] .crm-nav-group.has-active-item > .crm-nav-group-toggle,
:root[data-crm-theme="multicolor2"] body.crm-sidebar-collapsed .crm-nav-group.has-active-item > .crm-nav-group-toggle {
  color: #20364b;
  background: linear-gradient(90deg, rgba(243, 227, 208, .94), rgba(210, 196, 180, .82));
  box-shadow: inset 3px 0 0 #365773;
}

:root[data-crm-theme="multicolor2"] .crm-nav-link.active i {
  color: #365773;
}

:root[data-crm-theme="multicolor2"] .crm-content {
  background:
    radial-gradient(circle at 8% 5%, rgba(170, 205, 220, .16), transparent 24rem),
    radial-gradient(circle at 92% 8%, rgba(243, 227, 208, .3), transparent 22rem),
    #f8f2ea;
}

:root[data-crm-theme="multicolor2"] .crm-topbar {
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, #81a6c6, #aacddc, #f3e3d0, #d2c4b4) 1;
  background: rgba(255, 253, 249, .97);
  box-shadow: 0 5px 18px rgba(54, 87, 115, .08);
}

:root[data-crm-theme="multicolor2"] .crm-theme-trigger .bi,
:root[data-crm-theme="multicolor2"] .crm-theme-option-check,
:root[data-crm-theme="multicolor2"] .crm-body .page-link {
  color: #365773;
}

:root[data-crm-theme="multicolor2"] .crm-icon-button:hover,
:root[data-crm-theme="multicolor2"] .crm-icon-button:focus,
:root[data-crm-theme="multicolor2"] .crm-searchable-select-option:hover,
:root[data-crm-theme="multicolor2"] .crm-searchable-select-option:focus,
:root[data-crm-theme="multicolor2"] .crm-searchable-select-option[aria-selected="true"] {
  border-color: #81a6c6;
  color: #365773 !important;
  background: #eaf2f5 !important;
}

:root[data-crm-theme="multicolor2"] .crm-body .form-control:focus,
:root[data-crm-theme="multicolor2"] .crm-body .form-select:focus,
:root[data-crm-theme="multicolor2"] .auth-body .form-control:focus,
:root[data-crm-theme="multicolor2"] .auth-body .form-select:focus,
:root[data-crm-theme="multicolor2"] .login-control:focus {
  border-color: #81a6c6;
  box-shadow: 0 0 0 .2rem rgba(129, 166, 198, .2);
}

:root[data-crm-theme="multicolor2"] .form-check-input:checked,
:root[data-crm-theme="multicolor2"] .dropdown-item.active,
:root[data-crm-theme="multicolor2"] .dropdown-item:active,
:root[data-crm-theme="multicolor2"] .list-group-item.active {
  border-color: #466f91;
  background-color: #466f91;
}

:root[data-crm-theme="multicolor2"] .crm-page-loader-bar {
  background: linear-gradient(90deg, #81a6c6, #aacddc 40%, #f3e3d0 72%, #d2c4b4);
}

:root[data-crm-theme="multicolor2"] .auth-body {
  background:
    radial-gradient(circle at 8% 8%, rgba(170, 205, 220, .2), transparent 28%),
    radial-gradient(circle at 92% 90%, rgba(210, 196, 180, .24), transparent 25%),
    #f8f2ea;
}

:root[data-crm-theme="multicolor2"] .login-brand-panel {
  background:
    radial-gradient(circle at 88% 8%, rgba(243, 227, 208, .28), transparent 24%),
    linear-gradient(145deg, #365773 0%, #466f91 52%, #81a6c6 100%);
}

:root[data-crm-theme="multicolor2"] .login-submit-button {
  color: #20364b;
  background: linear-gradient(120deg, #81a6c6, #aacddc 62%, #d2c4b4);
  box-shadow: inset 0 -3px 0 rgba(243, 227, 208, .95), 0 14px 28px rgba(54, 87, 115, .2);
}

:root[data-crm-theme="multicolor2"] body.error-page {
  background:
    radial-gradient(circle at 12% 12%, rgba(170, 205, 220, .18), transparent 32rem),
    radial-gradient(circle at 90% 88%, rgba(210, 196, 180, .2), transparent 28rem),
    #f8f2ea;
}

/* Evergreen: deep forest navigation, evergreen controls, jade highlights and
 * a fresh mint accent using the user-supplied palette exactly. */
:root[data-crm-theme="evergreen"] {
  color-scheme: light;
  --crm-brand-navy: #285a48;
  --crm-brand-navy-deep: #091413;
  --crm-brand-blue: #408a71;
  --crm-brand-blue-soft: #e7f4ef;
  --crm-brand-orange: #b0e4cc;
  --crm-brand-orange-soft: #effaf5;
  --crm-sidebar-bg: #285a48;
  --crm-sidebar-bg-strong: #091413;
  --crm-sidebar-text: #ffffff;
  --crm-sidebar-muted: #b0e4cc;
  --crm-sidebar-active: #b0e4cc;
  --crm-border: #cadbd4;
  --crm-content-bg: #f3f8f6;
  --crm-surface: #ffffff;
  --crm-text: #091413;
  --crm-muted: #526b62;
  --crm-status-info: #285a48;
  --crm-status-info-bg: #e7f4ef;
  --crm-status-info-border: #b6d6ca;
  --bs-primary: #285a48;
  --bs-primary-rgb: 40, 90, 72;
  --bs-link-color: #285a48;
  --bs-link-color-rgb: 40, 90, 72;
  --bs-link-hover-color: #091413;
  --bs-link-hover-color-rgb: 9, 20, 19;
  --wds-border: #cadbd4;
  --wds-border-soft: #deebe6;
  --wds-surface: #ffffff;
  --wds-surface-muted: #edf5f2;
  --wds-surface-hover: #e7f4ef;
  --wds-text: #19352c;
  --wds-text-muted: #526b62;
  --wds-heading: #091413;
  --wds-link: #285a48;
  --wds-accent: #408a71;
  --wds-shadow: 0 4px 14px rgba(9, 20, 19, .09);
  --app-button-primary: #285a48;
  --app-button-primary-hover: #091413;
  --app-button-primary-active: #408a71;
  --app-button-accent: #b0e4cc;
  --app-button-shadow: 0 4px 10px rgba(9, 20, 19, .2);
  --app-button-focus: rgba(64, 138, 113, .24);
  --app-select-border-focus: #408a71;
  --app-select-focus: rgba(64, 138, 113, .18);
  --auth-navy: #091413;
  --auth-blue: #285a48;
  --auth-orange: #b0e4cc;
  --auth-ink: #091413;
  --auth-muted: #526b62;
  --auth-line: #cadbd4;
  --error-navy: #091413;
  --error-blue: #285a48;
  --error-orange: #408a71;
  --error-border: #cadbd4;
  --error-muted: #526b62;
}

:root[data-crm-theme="evergreen"] ::selection {
  color: #ffffff;
  background: #408a71;
}

:root[data-crm-theme="evergreen"] html.crm-scroll-active,
:root[data-crm-theme="evergreen"].crm-scroll-active {
  scrollbar-color: rgba(64, 138, 113, .64) transparent;
}

:root[data-crm-theme="evergreen"] .crm-sidebar {
  background: linear-gradient(180deg, #091413 0%, #285a48 58%, #408a71 100%);
  box-shadow: 12px 0 30px rgba(9, 20, 19, .2);
}

:root[data-crm-theme="evergreen"] .crm-sidebar-brand {
  border-bottom-color: rgba(176, 228, 204, .5);
  background: rgba(9, 20, 19, .96);
}

:root[data-crm-theme="evergreen"] .crm-nav-link:hover,
:root[data-crm-theme="evergreen"] .crm-nav-link:focus {
  background: rgba(176, 228, 204, .14);
}

:root[data-crm-theme="evergreen"] .crm-nav-link.active,
:root[data-crm-theme="evergreen"] .crm-nav-group.has-active-item > .crm-nav-group-toggle,
:root[data-crm-theme="evergreen"] body.crm-sidebar-collapsed .crm-nav-group.has-active-item > .crm-nav-group-toggle {
  color: #ffffff;
  background: linear-gradient(90deg, rgba(176, 228, 204, .24), rgba(64, 138, 113, .34));
  box-shadow: inset 3px 0 0 #b0e4cc;
}

:root[data-crm-theme="evergreen"] .crm-nav-link.active i {
  color: #b0e4cc;
}

:root[data-crm-theme="evergreen"] .crm-content {
  background:
    radial-gradient(circle at 8% 5%, rgba(64, 138, 113, .055), transparent 24rem),
    radial-gradient(circle at 92% 8%, rgba(176, 228, 204, .12), transparent 22rem),
    #f3f8f6;
}

:root[data-crm-theme="evergreen"] .crm-topbar {
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, #091413, #285a48, #408a71, #b0e4cc) 1;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 5px 18px rgba(9, 20, 19, .08);
}

:root[data-crm-theme="evergreen"] .crm-theme-trigger .bi,
:root[data-crm-theme="evergreen"] .crm-theme-option-check,
:root[data-crm-theme="evergreen"] .crm-body .page-link {
  color: #285a48;
}

:root[data-crm-theme="evergreen"] .crm-icon-button:hover,
:root[data-crm-theme="evergreen"] .crm-icon-button:focus,
:root[data-crm-theme="evergreen"] .crm-searchable-select-option:hover,
:root[data-crm-theme="evergreen"] .crm-searchable-select-option:focus,
:root[data-crm-theme="evergreen"] .crm-searchable-select-option[aria-selected="true"] {
  border-color: #408a71;
  color: #285a48 !important;
  background: #e7f4ef !important;
}

:root[data-crm-theme="evergreen"] .crm-body .form-control:focus,
:root[data-crm-theme="evergreen"] .crm-body .form-select:focus,
:root[data-crm-theme="evergreen"] .auth-body .form-control:focus,
:root[data-crm-theme="evergreen"] .auth-body .form-select:focus,
:root[data-crm-theme="evergreen"] .login-control:focus {
  border-color: #408a71;
  box-shadow: 0 0 0 .2rem rgba(64, 138, 113, .16);
}

:root[data-crm-theme="evergreen"] .form-check-input:checked,
:root[data-crm-theme="evergreen"] .dropdown-item.active,
:root[data-crm-theme="evergreen"] .dropdown-item:active,
:root[data-crm-theme="evergreen"] .list-group-item.active {
  border-color: #285a48;
  background-color: #285a48;
}

:root[data-crm-theme="evergreen"] .crm-page-loader-bar {
  background: linear-gradient(90deg, #091413, #285a48 40%, #408a71 72%, #b0e4cc);
}

:root[data-crm-theme="evergreen"] .auth-body {
  background:
    radial-gradient(circle at 8% 8%, rgba(64, 138, 113, .1), transparent 28%),
    radial-gradient(circle at 92% 90%, rgba(176, 228, 204, .18), transparent 25%),
    #f3f8f6;
}

:root[data-crm-theme="evergreen"] .login-brand-panel {
  background:
    radial-gradient(circle at 88% 8%, rgba(176, 228, 204, .24), transparent 24%),
    linear-gradient(145deg, #408a71 0%, #285a48 52%, #091413 100%);
}

:root[data-crm-theme="evergreen"] .login-submit-button {
  background: linear-gradient(120deg, #091413, #285a48 58%, #408a71);
  box-shadow: inset 0 -3px 0 rgba(176, 228, 204, .9), 0 14px 28px rgba(9, 20, 19, .22);
}

:root[data-crm-theme="evergreen"] body.error-page {
  background:
    radial-gradient(circle at 12% 12%, rgba(64, 138, 113, .1), transparent 32rem),
    radial-gradient(circle at 90% 88%, rgba(176, 228, 204, .16), transparent 28rem),
    #f3f8f6;
}

/* Permanent summary-card surface consistency across every management screen.
 * Contextual modifiers colour the icon only; they never tint the full card. */
.dashboard-stat-card.management-summary-card {
  background-color: var(--crm-surface);
  background-image: none;
}

/* The primary sign-in action intentionally remains larger than application
 * toolbar buttons to match the approved authentication-screen reference. */
.auth-body .login-submit-button {
  width: 100%;
  height: 52px;
  min-height: 52px;
  padding: 10px 18px;
  border-radius: 14px;
  font-size: .84rem;
}

/* Dashboard customer birthdays and anniversaries */
.dashboard-occasion-intro {
  margin-bottom: 12px;
  color: var(--crm-muted);
  font-size: .72rem;
}

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

.dashboard-occasion-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--crm-border);
  border-left: 3px solid var(--crm-brand-blue);
  border-radius: 10px;
  background: var(--crm-surface);
  box-shadow: 0 3px 10px rgba(37, 37, 37, .035);
}

.dashboard-occasion-item--anniversary {
  border-left-color: var(--crm-brand-orange);
}

.dashboard-occasion-date,
.dashboard-occasion-person {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dashboard-occasion-date {
  position: relative;
  padding-left: 27px;
  color: var(--crm-text);
  font-size: .7rem;
  font-weight: 750;
}

.dashboard-occasion-date > i {
  position: absolute;
  top: 1px;
  left: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 21px;
  height: 21px;
  border-radius: 7px;
  color: var(--crm-brand-blue);
  background: var(--crm-brand-blue-soft);
}

.dashboard-occasion-item--anniversary .dashboard-occasion-date > i {
  color: var(--crm-brand-navy-deep);
  background: var(--crm-brand-orange-soft);
}

.dashboard-occasion-date small {
  margin-top: 2px;
  color: var(--crm-muted);
  font-size: .59rem;
  font-weight: 550;
}

.dashboard-occasion-person > a,
.dashboard-occasion-person > strong {
  overflow: hidden;
  color: var(--crm-brand-navy);
  font-size: .74rem;
  font-weight: 780;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-occasion-person > a:hover,
.dashboard-occasion-person > a:focus-visible {
  color: var(--crm-brand-blue);
  text-decoration: underline;
}

.dashboard-occasion-person > span {
  margin-top: 5px;
  overflow: hidden;
  color: var(--crm-muted);
  font-size: .61rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-occasion-badge {
  display: inline-flex;
  margin-right: 3px;
  padding: 2px 6px;
  border: 1px solid var(--crm-status-info-border);
  border-radius: 999px;
  color: var(--crm-status-info);
  background: var(--crm-status-info-bg);
  font-size: .55rem;
  font-weight: 750;
}

.dashboard-occasion-badge--anniversary {
  border-color: var(--crm-status-warning-border);
  color: var(--crm-status-warning);
  background: var(--crm-status-warning-bg);
}

.dashboard-occasion-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.dashboard-occasion-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 32px;
  padding: 6px 9px;
  border: 1px solid var(--crm-border);
  border-radius: 8px;
  color: var(--crm-text);
  background: var(--crm-surface);
  font-size: .61rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 140ms ease, border-color 140ms ease, background-color 140ms ease;
}

.dashboard-occasion-action:hover,
.dashboard-occasion-action:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.dashboard-occasion-action--whatsapp {
  border-color: #9dd8b5;
  color: #10753c;
  background: #effbf4;
}

.dashboard-occasion-action--whatsapp:hover,
.dashboard-occasion-action--whatsapp:focus-visible {
  border-color: #25a85b;
  color: #075b2b;
  background: #e1f8e9;
}

.dashboard-occasion-action--email {
  border-color: var(--crm-status-info-border);
  color: var(--crm-status-info);
  background: var(--crm-status-info-bg);
}

.dashboard-occasion-action--email:hover,
.dashboard-occasion-action--email:focus-visible {
  border-color: var(--crm-brand-blue);
}

.dashboard-occasion-action.is-disabled {
  cursor: not-allowed;
  opacity: .45;
}

.dashboard-workspace-empty {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 76px;
  padding: 18px;
  border: 1px dashed var(--crm-border);
  border-radius: 10px;
  color: var(--crm-muted);
  background: var(--wds-surface-muted);
  font-size: .7rem;
  text-align: center;
}

.dashboard-workspace-empty i {
  color: var(--crm-brand-blue);
  font-size: 1.1rem;
}

@media (max-width: 1199.98px) {
  .dashboard-occasion-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .dashboard-occasion-item {
    grid-template-columns: 1fr;
  }

  .dashboard-occasion-actions {
    flex-wrap: wrap;
  }
}

/* Theme controls and list headers
 * -------------------------------
 * Buttons and data-list headers consume these tokens so changing the active
 * theme updates controls consistently without screen-level colour declarations.
 */
:root {
  --app-button-outline-border: #8093a8;
  --app-button-outline-bg: #ffffff;
  --app-button-outline-text: #1d3557;
  --app-button-outline-hover-bg: #eef2f6;
  --app-button-secondary-border: #c8cdd2;
  --app-button-secondary-bg: #ffffff;
  --app-button-secondary-text: #3d3d3d;
  --app-button-secondary-hover-bg: #f4f5f6;
  --app-list-header-bg: #284b73;
  --app-list-header-text: #ffffff;
  --app-list-header-border: #1d3557;
  --app-shell-divider: #dde1e5;
}

:root[data-crm-theme="light"] {
  --app-button-outline-border: #7694b2;
  --app-button-outline-bg: #ffffff;
  --app-button-outline-text: #183b63;
  --app-button-outline-hover-bg: #edf4fa;
  --app-button-secondary-border: #c7d2dc;
  --app-button-secondary-bg: #ffffff;
  --app-button-secondary-text: #31445a;
  --app-button-secondary-hover-bg: #edf4fa;
  --app-list-header-bg: #315f8d;
  --app-list-header-text: #ffffff;
  --app-list-header-border: #183b63;
  --app-shell-divider: #dce3ea;
}

:root[data-crm-theme="dark"] {
  --app-button-outline-border: #60738b;
  --app-button-outline-bg: #172130;
  --app-button-outline-text: #b8d5ee;
  --app-button-outline-hover-bg: #1c3145;
  --app-button-secondary-border: #52657c;
  --app-button-secondary-bg: #172130;
  --app-button-secondary-text: #dbe4ee;
  --app-button-secondary-hover-bg: #1c2b3c;
  --app-list-header-bg: #254c74;
  --app-list-header-text: #f5f8fc;
  --app-list-header-border: #75a9d8;
  --app-shell-divider: #344356;
}

:root[data-crm-theme="multicolor"] {
  --app-button-outline-border: #8e6bd1;
  --app-button-outline-bg: #ffffff;
  --app-button-outline-text: #5b21b6;
  --app-button-outline-hover-bg: #f3effb;
  --app-button-secondary-border: #cabce0;
  --app-button-secondary-bg: #ffffff;
  --app-button-secondary-text: #4c1d95;
  --app-button-secondary-hover-bg: #f3effb;
  --app-list-header-bg: #0f766e;
  --app-list-header-text: #ffffff;
  --app-list-header-border: #0b5d57;
  --app-shell-divider: #db2777;
}

:root[data-crm-theme="multicolor1"] {
  --app-button-outline-border: #6666ad;
  --app-button-outline-bg: #ffffff;
  --app-button-outline-text: #000080;
  --app-button-outline-hover-bg: #f0f0fa;
  --app-button-secondary-border: #c9b9bc;
  --app-button-secondary-bg: #ffffff;
  --app-button-secondary-text: #3a2525;
  --app-button-secondary-hover-bg: #f7eaec;
  --app-list-header-bg: #9e2a3a;
  --app-list-header-text: #ffffff;
  --app-list-header-border: #3a2525;
  --app-shell-divider: #9e2a3a;
}

:root[data-crm-theme="multicolor2"] {
  --app-button-outline-border: #81a6c6;
  --app-button-outline-bg: #fffdf9;
  --app-button-outline-text: #365773;
  --app-button-outline-hover-bg: #eaf2f5;
  --app-button-secondary-border: #d2c4b4;
  --app-button-secondary-bg: #fffdf9;
  --app-button-secondary-text: #4a4037;
  --app-button-secondary-hover-bg: #f3e3d0;
  --app-list-header-bg: #81a6c6;
  --app-list-header-text: #20364b;
  --app-list-header-border: #5e839f;
  --app-shell-divider: #d2c4b4;
}

:root[data-crm-theme="evergreen"] {
  --app-button-outline-border: #76a592;
  --app-button-outline-bg: #ffffff;
  --app-button-outline-text: #285a48;
  --app-button-outline-hover-bg: #e7f4ef;
  --app-button-secondary-border: #b9cec5;
  --app-button-secondary-bg: #ffffff;
  --app-button-secondary-text: #19352c;
  --app-button-secondary-hover-bg: #edf5f2;
  --app-list-header-bg: #285a48;
  --app-list-header-text: #ffffff;
  --app-list-header-border: #091413;
  --app-shell-divider: #408a71;
}

.crm-sidebar {
  border-right: 1px solid var(--crm-border);
}

.crm-sidebar-brand,
.crm-topbar {
  border-bottom-color: var(--app-shell-divider) !important;
}

.crm-body .btn.btn-outline-primary,
.auth-body .btn.btn-outline-primary,
.error-page .btn.btn-outline-primary,
body:not(.crm-body) .no-print.btn.btn-outline-primary {
  border-color: var(--app-button-outline-border) !important;
  color: var(--app-button-outline-text) !important;
  background-color: var(--app-button-outline-bg) !important;
}

.crm-body .btn.btn-outline-primary:hover,
.crm-body .btn.btn-outline-primary:focus-visible,
.auth-body .btn.btn-outline-primary:hover,
.auth-body .btn.btn-outline-primary:focus-visible,
.error-page .btn.btn-outline-primary:hover,
.error-page .btn.btn-outline-primary:focus-visible,
body:not(.crm-body) .no-print.btn.btn-outline-primary:hover,
body:not(.crm-body) .no-print.btn.btn-outline-primary:focus-visible {
  border-color: var(--app-button-primary) !important;
  color: var(--app-button-text) !important;
  background-color: var(--app-button-primary) !important;
}

.crm-body .btn.btn-secondary,
.crm-body .btn.btn-outline-secondary,
.auth-body .btn.btn-secondary,
.auth-body .btn.btn-outline-secondary,
.error-page .btn.btn-secondary,
.error-page .btn.btn-outline-secondary {
  border-color: var(--app-button-secondary-border) !important;
  color: var(--app-button-secondary-text) !important;
  background-color: var(--app-button-secondary-bg) !important;
}

.crm-body .btn.btn-secondary:hover,
.crm-body .btn.btn-outline-secondary:hover,
.crm-body .btn.btn-secondary:focus-visible,
.crm-body .btn.btn-outline-secondary:focus-visible,
.auth-body .btn.btn-secondary:hover,
.auth-body .btn.btn-outline-secondary:hover,
.error-page .btn.btn-secondary:hover,
.error-page .btn.btn-outline-secondary:hover {
  border-color: var(--app-button-outline-border) !important;
  color: var(--app-button-outline-text) !important;
  background-color: var(--app-button-secondary-hover-bg) !important;
}

.crm-body .table-action-icon,
.crm-body .crm-icon-button {
  border-color: var(--app-button-secondary-border);
  color: var(--app-button-outline-text);
  background-color: var(--app-button-secondary-bg);
  background-image: none !important;
}

.crm-body .table-action-icon:hover,
.crm-body .table-action-icon:focus-visible,
.crm-body .crm-icon-button:hover,
.crm-body .crm-icon-button:focus-visible {
  border-color: var(--app-button-outline-border);
  color: var(--app-button-outline-text);
  background-color: var(--app-button-outline-hover-bg);
}

.crm-content-container table thead th,
.modal-content table thead th {
  --bs-table-bg: var(--app-list-header-bg);
  --bs-table-color: var(--app-list-header-text);
  --bs-table-border-color: var(--app-list-header-border);
  border-color: var(--app-list-header-border) !important;
  color: var(--app-list-header-text) !important;
  background-color: var(--app-list-header-bg) !important;
  background-image: none !important;
}

.crm-content-container table thead th a,
.crm-content-container table thead th button,
.crm-content-container table thead th .bi,
.modal-content table thead th a,
.modal-content table thead th button,
.modal-content table thead th .bi {
  color: var(--app-list-header-text) !important;
}

/* Dashboard snapshot tables use a quieter theme tint so their headers do not
   compete with the analytics cards around them. */
.crm-content-container .dashboard-recent-leads-card table thead th,
.crm-content-container .dashboard-recent-bookings-card table thead th {
  --dashboard-list-header-bg: color-mix(in srgb, var(--app-list-header-bg) 14%, var(--wds-surface));
  --dashboard-list-header-border: color-mix(in srgb, var(--app-list-header-bg) 24%, var(--wds-border));
  --bs-table-bg: var(--dashboard-list-header-bg);
  --bs-table-color: var(--wds-heading);
  --bs-table-border-color: var(--dashboard-list-header-border);
  border-color: var(--dashboard-list-header-border) !important;
  color: var(--wds-heading) !important;
  background-color: var(--dashboard-list-header-bg) !important;
}

.crm-content-container .dashboard-recent-leads-card table thead th a,
.crm-content-container .dashboard-recent-leads-card table thead th button,
.crm-content-container .dashboard-recent-leads-card table thead th .bi,
.crm-content-container .dashboard-recent-bookings-card table thead th a,
.crm-content-container .dashboard-recent-bookings-card table thead th button,
.crm-content-container .dashboard-recent-bookings-card table thead th .bi {
  color: var(--wds-heading) !important;
}
