:root {
  --crm-sidebar-width: 260px;
  --crm-sidebar-collapsed-width: 84px;
  --crm-brand-navy: #082d5d;
  --crm-brand-navy-deep: #041a38;
  --crm-brand-blue: #0d4c8f;
  --crm-brand-blue-soft: #eaf2fb;
  --crm-brand-orange: #ff6500;
  --crm-brand-orange-soft: #fff1e8;
  --crm-sidebar-bg: #082d5d;
  --crm-sidebar-bg-strong: #041a38;
  --crm-sidebar-text: #e8f0fb;
  --crm-sidebar-muted: #a9bdd8;
  --crm-sidebar-active: #ff6500;
  --crm-border: #dce4ee;
  --crm-content-bg: #f4f7fb;
  --crm-surface: #ffffff;
  --crm-text: #13233d;
  --crm-muted: #64748b;
  --crm-font-xs: 0.75rem;
  --crm-font-sm: 0.8125rem;
  --crm-font-body: 0.875rem;
  --crm-font-md: 1rem;
  --crm-font-lg: 1.25rem;
  --crm-font-xl: 1.5rem;
  --crm-status-positive: #147a50;
  --crm-status-positive-bg: #eaf7f0;
  --crm-status-positive-border: #b9e3cd;
  --crm-status-info: #0d4c8f;
  --crm-status-info-bg: #eaf2fb;
  --crm-status-info-border: #bfd6ee;
  --crm-status-warning: #a94708;
  --crm-status-warning-bg: #fff1e8;
  --crm-status-warning-border: #ffd0ad;
  --crm-status-critical: #b42318;
  --crm-status-critical-bg: #fef3f2;
  --crm-status-critical-border: #f4c7c3;
  --crm-status-neutral: #526175;
  --crm-status-neutral-bg: #eef2f6;
  --crm-status-neutral-border: #d7dfe8;
  --bs-primary: #0d4c8f;
  --bs-primary-rgb: 13, 76, 143;
  --bs-link-color: #0d4c8f;
  --bs-link-hover-color: #082d5d;
}

html {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

html.crm-scroll-active {
  scrollbar-color: rgba(13, 76, 143, .62) transparent;
}

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

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

html::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: transparent;
}

html.crm-scroll-active::-webkit-scrollbar-thumb {
  background: rgba(13, 76, 143, .62);
}

.whatsapp-inbox-grid {
  align-items: stretch;
}

.whatsapp-thread {
  min-height: 460px;
  max-height: 62vh;
  overflow-y: auto;
  padding-right: .25rem;
}

.whatsapp-bubble {
  max-width: min(78%, 560px);
  border-radius: .5rem;
  padding: .75rem .9rem;
  overflow-wrap: anywhere;
}

.whatsapp-bubble-in {
  background: #f1f5f9;
  color: #0f172a;
}

.whatsapp-bubble-out {
  background: #dcfce7;
  color: #052e16;
}

@media (max-width: 991.98px) {
  .whatsapp-thread {
    min-height: 360px;
    max-height: none;
  }

  .whatsapp-bubble {
    max-width: 90%;
  }
}

.crm-body {
  min-height: 100vh;
  margin: 0;
  background: var(--crm-content-bg);
  color: var(--crm-text);
  font-family: "Montserrat", "Segoe UI", Arial, sans-serif;
}

.crm-body .btn-primary {
  --bs-btn-bg: var(--crm-brand-blue);
  --bs-btn-border-color: var(--crm-brand-blue);
  --bs-btn-hover-bg: var(--crm-brand-navy);
  --bs-btn-hover-border-color: var(--crm-brand-navy);
  --bs-btn-active-bg: var(--crm-brand-navy-deep);
  --bs-btn-active-border-color: var(--crm-brand-navy-deep);
}

.crm-body .btn-outline-primary {
  --bs-btn-color: var(--crm-brand-blue);
  --bs-btn-border-color: var(--crm-brand-blue);
  --bs-btn-hover-bg: var(--crm-brand-blue);
  --bs-btn-hover-border-color: var(--crm-brand-blue);
  --bs-btn-active-bg: var(--crm-brand-navy);
  --bs-btn-active-border-color: var(--crm-brand-navy);
}

.crm-body .text-primary {
  color: var(--crm-brand-blue) !important;
}

.crm-body .bg-primary-subtle {
  background-color: var(--crm-brand-blue-soft) !important;
}

.crm-body .text-bg-primary {
  color: #ffffff !important;
  background-color: var(--crm-brand-blue) !important;
}

.status-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  padding: 3px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: var(--crm-font-xs);
  font-weight: 650;
  line-height: 1.25;
  white-space: nowrap;
}

.status-badge--positive,
.crm-body .text-bg-success {
  border-color: var(--crm-status-positive-border) !important;
  color: var(--crm-status-positive) !important;
  background-color: var(--crm-status-positive-bg) !important;
}

.status-badge--info,
.crm-body .text-bg-info {
  border-color: var(--crm-status-info-border) !important;
  color: var(--crm-status-info) !important;
  background-color: var(--crm-status-info-bg) !important;
}

.status-badge--warning,
.crm-body .text-bg-warning {
  border-color: var(--crm-status-warning-border) !important;
  color: var(--crm-status-warning) !important;
  background-color: var(--crm-status-warning-bg) !important;
}

.status-badge--critical,
.crm-body .text-bg-danger {
  border-color: var(--crm-status-critical-border) !important;
  color: var(--crm-status-critical) !important;
  background-color: var(--crm-status-critical-bg) !important;
}

.status-badge--neutral,
.crm-body .text-bg-secondary,
.crm-body .text-bg-light {
  border-color: var(--crm-status-neutral-border) !important;
  color: var(--crm-status-neutral) !important;
  background-color: var(--crm-status-neutral-bg) !important;
}

.crm-body .badge[class*="text-bg-"] {
  border-style: solid;
  border-width: 1px;
  font-size: var(--crm-font-xs);
  font-weight: 650;
}

.crm-body .page-link {
  color: var(--crm-brand-blue);
}

.crm-body .active > .page-link,
.crm-body .page-link.active,
.crm-body .nav-pills .nav-link.active {
  border-color: var(--crm-brand-blue);
  background-color: var(--crm-brand-blue);
}

.crm-body .form-control:focus,
.crm-body .form-select:focus {
  border-color: #8bb2dc;
  box-shadow: 0 0 0 .2rem rgba(13, 76, 143, .12);
}

.crm-shell {
  display: flex;
  min-height: 100vh;
  background: var(--crm-content-bg);
}

.crm-shell,
.crm-sidebar,
.crm-main-panel {
  transition: width 180ms ease, flex-basis 180ms ease, margin 180ms ease;
}

.crm-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex: 0 0 var(--crm-sidebar-width);
  flex-direction: column;
  width: var(--crm-sidebar-width);
  height: 100vh;
  overflow: hidden;
  background: linear-gradient(180deg, var(--crm-sidebar-bg-strong) 0%, var(--crm-sidebar-bg) 46%, #0a386e 100%);
  color: var(--crm-sidebar-text);
  box-shadow: 12px 0 30px rgba(15, 23, 42, 0.12);
  z-index: 1040;
}

body.crm-sidebar-collapsed .crm-sidebar {
  flex-basis: var(--crm-sidebar-collapsed-width);
  width: var(--crm-sidebar-collapsed-width);
}

.crm-sidebar-brand {
  position: sticky;
  top: 0;
  padding: 18px 18px 16px;
  background: rgba(4, 26, 56, .94);
  border-bottom: 1px solid rgba(255, 101, 0, .42);
  z-index: 1;
}

.crm-brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  text-decoration: none;
}

.crm-brand-link:hover {
  color: #ffffff;
}

.crm-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  overflow: hidden;
  border-radius: 11px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .18);
}

.crm-brand-mark img {
  display: block;
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.crm-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

body.crm-sidebar-collapsed .crm-brand-text {
  display: none;
}

.crm-brand-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .035em;
}

.crm-brand-subtitle {
  color: #ff9c5c;
  font-size: var(--crm-font-xs);
  font-weight: 700;
  letter-spacing: .16em;
}

.crm-sidebar-nav {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 12px 24px;
  scrollbar-color: transparent transparent;
  scrollbar-width: thin;
}

.crm-sidebar-nav:hover,
.crm-sidebar-nav:focus-within {
  scrollbar-color: rgba(255, 255, 255, .38) transparent;
}

.crm-sidebar-nav::-webkit-scrollbar,
.crm-notification-list::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar,
.whatsapp-thread::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.crm-sidebar-nav::-webkit-scrollbar-track,
.crm-notification-list::-webkit-scrollbar-track,
.table-responsive::-webkit-scrollbar-track,
.whatsapp-thread::-webkit-scrollbar-track {
  background: transparent;
}

.crm-sidebar-nav::-webkit-scrollbar-thumb,
.crm-notification-list::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb,
.whatsapp-thread::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: transparent;
}

.crm-sidebar-nav:hover::-webkit-scrollbar-thumb,
.crm-sidebar-nav:focus-within::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .38);
}

.crm-notification-list:hover::-webkit-scrollbar-thumb,
.crm-notification-list:focus-within::-webkit-scrollbar-thumb,
.table-responsive:hover::-webkit-scrollbar-thumb,
.table-responsive:focus-within::-webkit-scrollbar-thumb,
.whatsapp-thread:hover::-webkit-scrollbar-thumb,
.whatsapp-thread:focus-within::-webkit-scrollbar-thumb {
  background: rgba(13, 76, 143, .45);
}

.table-responsive {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-color: rgba(13, 76, 143, .24) transparent;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: rgba(13, 76, 143, .24);
}

.table-responsive:hover,
.table-responsive:focus,
.table-responsive:focus-within {
  scrollbar-color: rgba(13, 76, 143, .52) transparent;
}

.table-responsive:focus::-webkit-scrollbar-thumb,
.table-responsive:hover::-webkit-scrollbar-thumb,
.table-responsive:focus-within::-webkit-scrollbar-thumb {
  background: rgba(13, 76, 143, .52);
}

.table-responsive:focus-visible {
  border-radius: 6px;
  outline: 2px solid rgba(13, 76, 143, .24);
  outline-offset: 2px;
}

.crm-nav-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.crm-nav-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  margin: 14px 8px 4px;
  padding: 5px 7px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--crm-sidebar-muted);
  font-size: var(--crm-font-xs);
  font-weight: 700;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
  transition: background-color 160ms ease, color 160ms ease;
}

.crm-nav-group-toggle:hover,
.crm-nav-group-toggle:focus {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.crm-nav-group-toggle .bi-chevron-down {
  font-size: 0.76rem;
  transition: transform 160ms ease;
}

.crm-nav-group.collapsed .crm-nav-group-toggle .bi-chevron-down {
  transform: rotate(-90deg);
}

.crm-nav-group-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.crm-nav-group.collapsed .crm-nav-group-items {
  display: none;
}

body.crm-sidebar-collapsed .crm-nav-group-toggle {
  justify-content: center;
  margin: 12px 8px 4px;
  padding: 7px;
}

body.crm-sidebar-collapsed .crm-nav-group-label,
body.crm-sidebar-collapsed .crm-nav-group-toggle .bi-chevron-down,
body.crm-sidebar-collapsed .crm-nav-text {
  display: none;
}

body.crm-sidebar-collapsed .crm-nav-group-items {
  display: flex;
}

.crm-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--crm-sidebar-text);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

body.crm-sidebar-collapsed .crm-nav-link {
  justify-content: center;
  padding-inline: 10px;
}

.crm-nav-link i {
  width: 20px;
  color: var(--crm-sidebar-muted);
  font-size: 1rem;
  transition: color 160ms ease;
}

body.crm-sidebar-collapsed .crm-nav-link i {
  width: auto;
}

.crm-nav-link:hover,
.crm-nav-link:focus {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transform: translateX(2px);
}

body.crm-sidebar-collapsed .crm-nav-link:hover,
body.crm-sidebar-collapsed .crm-nav-link:focus {
  transform: none;
}

.crm-nav-link:hover i,
.crm-nav-link:focus i {
  color: #ffffff;
}

.crm-nav-link.active {
  background: linear-gradient(90deg, rgba(255, 101, 0, .2), rgba(24, 100, 180, .18));
  color: #ffffff;
  box-shadow: inset 3px 0 0 var(--crm-sidebar-active);
}

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

.crm-main-panel {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}

.crm-topbar {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 68px;
  padding: 11px 24px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #d6e1ee;
  box-shadow: 0 5px 18px rgba(4, 26, 56, .055);
  backdrop-filter: blur(10px);
  z-index: 1030;
}

.crm-topbar-start,
.crm-topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.crm-topbar-start {
  flex: 0 0 auto;
  min-width: 0;
}

.crm-mobile-brand {
  display: none;
  align-items: center;
  gap: 8px;
  color: var(--crm-brand-navy);
  font-weight: 700;
  text-decoration: none;
}

.crm-mobile-brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.crm-topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.crm-header-logo {
  display: block;
  width: clamp(92px, 12vw, 150px);
  max-height: 34px;
  object-fit: contain;
}

.crm-header-mark {
  display: none;
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.crm-topbar-title {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.crm-topbar-kicker {
  color: var(--crm-muted);
  font-size: var(--crm-font-xs);
  font-weight: 600;
}

.crm-topbar-heading {
  color: var(--crm-text);
  font-size: 1.05rem;
  font-weight: 700;
}

.crm-icon-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--crm-border);
  border-radius: 8px;
  background: var(--crm-surface);
  color: #344054;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.crm-icon-button:hover,
.crm-icon-button:focus {
  background: var(--crm-brand-blue-soft);
  border-color: #a9c5e3;
  color: var(--crm-brand-blue);
}

.crm-topbar-search {
  position: relative;
  flex: 1 1 420px;
  max-width: 620px;
}

.crm-topbar-search i {
  position: absolute;
  top: 50%;
  left: 14px;
  color: var(--crm-muted);
  transform: translateY(-50%);
  z-index: 1;
}

.crm-topbar-search .form-control {
  min-height: 42px;
  padding-left: 40px;
  border-color: var(--crm-border);
  border-radius: 10px;
  background: #f7f9fc;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.crm-topbar-search .form-control:focus {
  border-color: #8bb2dc;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(13, 76, 143, .1);
}

.crm-topbar-actions {
  margin-left: auto;
}

.crm-notification-dot {
  display: none;
}

.crm-notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  color: #ffffff;
  background: var(--crm-brand-orange);
  font-size: var(--crm-font-xs);
  font-weight: 700;
  line-height: 1;
}

.crm-notification-badge[hidden] {
  display: none;
}

.crm-notification-menu {
  width: min(400px, calc(100vw - 24px));
  margin-top: 10px !important;
  padding: 0;
  overflow: hidden;
  border: 1px solid #d7e1ed;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(4, 26, 56, .18);
}

.crm-notification-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid #e7edf4;
  background: linear-gradient(120deg, #f8fbff, #fffaf6);
}

.crm-notification-menu-header strong,
.crm-notification-menu-header small {
  display: block;
}

.crm-notification-menu-header strong {
  color: var(--crm-brand-navy);
  font-size: .95rem;
}

.crm-notification-menu-header small {
  margin-top: 2px;
  color: var(--crm-muted);
  font-size: var(--crm-font-xs);
}

.crm-notification-menu-header a {
  color: var(--crm-brand-blue);
  font-size: var(--crm-font-xs);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.crm-notification-list {
  max-height: min(420px, 62vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: transparent transparent;
  scrollbar-width: thin;
}

.crm-notification-list:hover,
.crm-notification-list:focus-within {
  scrollbar-color: rgba(13, 76, 143, .45) transparent;
}

.crm-notification-item {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 17px;
  border-bottom: 1px solid #edf1f6;
  color: var(--crm-text);
  text-decoration: none;
  transition: background-color 150ms ease;
}

.crm-notification-item:last-child {
  border-bottom: 0;
}

.crm-notification-item:hover,
.crm-notification-item:focus {
  color: var(--crm-text);
  background: #f7faff;
}

.crm-notification-item.is-overdue::before {
  position: absolute;
  inset: 14px auto 14px 0;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: var(--crm-brand-orange);
  content: "";
}

.crm-notification-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  color: var(--crm-brand-blue);
  background: var(--crm-brand-blue-soft);
}

.crm-notification-item.is-overdue .crm-notification-icon {
  color: #c84f00;
  background: var(--crm-brand-orange-soft);
}

.crm-notification-copy,
.crm-notification-title-row,
.crm-notification-meta {
  min-width: 0;
}

.crm-notification-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.crm-notification-title-row strong {
  overflow: hidden;
  font-size: .78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-notification-title-row time {
  flex: 0 0 auto;
  color: var(--crm-brand-blue);
  font-size: var(--crm-font-xs);
  font-weight: 700;
}

.crm-notification-title-row time.is-overdue {
  color: #c84f00;
}

.crm-notification-message {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 3px;
  color: var(--crm-muted);
  font-size: var(--crm-font-xs);
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.crm-notification-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: #8090a5;
  font-size: var(--crm-font-xs);
  font-weight: 600;
}

.crm-notification-priority {
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--crm-brand-navy);
  background: #edf2f8;
}

.crm-notification-loading,
.crm-notification-error,
.crm-notification-empty {
  display: flex;
  min-height: 150px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 26px;
  color: var(--crm-muted);
  font-size: .76rem;
  text-align: center;
}

.crm-notification-loading .spinner-border {
  color: var(--crm-brand-blue);
}

.crm-notification-error {
  flex-direction: column;
}

.crm-notification-error i {
  color: var(--crm-brand-orange);
  font-size: 1.4rem;
}

.crm-notification-error button {
  padding: 4px 10px;
  border: 1px solid #b9cce1;
  border-radius: 8px;
  color: var(--crm-brand-blue);
  background: #ffffff;
  font-size: var(--crm-font-xs);
  font-weight: 700;
}

.crm-notification-empty {
  flex-direction: column;
}

.crm-notification-empty > span {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  color: var(--crm-brand-blue);
  background: var(--crm-brand-blue-soft);
  font-size: 1.25rem;
}

.crm-notification-empty strong,
.crm-notification-empty small {
  display: block;
}

.crm-user-menu {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 5px 11px 5px 6px;
  border: 1px solid var(--crm-border);
  border-radius: 8px;
  background: var(--crm-surface);
  color: #344054;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.crm-user-menu:hover,
.crm-user-menu:focus-visible,
.crm-user-menu[aria-expanded="true"] {
  border-color: #a9c5e3;
  background: #f8fbff;
  box-shadow: 0 0 0 3px rgba(13, 76, 143, 0.08);
}

.crm-user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #c6d9ec;
  background: var(--crm-brand-blue-soft);
  color: var(--crm-brand-blue);
  font-weight: 700;
}

.crm-user-copy {
  display: grid;
  min-width: 0;
  max-width: 230px;
  text-align: left;
}

.crm-user-name-line {
  display: flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
  font-size: 0.82rem;
  line-height: 1.2;
  white-space: nowrap;
}

.crm-user-greeting {
  flex: 0 0 auto;
  color: var(--crm-brand-blue);
  font-weight: 500;
}

.crm-user-display-name {
  min-width: 0;
  overflow: hidden;
  color: var(--crm-brand-navy);
  font-weight: 700;
  text-overflow: ellipsis;
}

.crm-user-role {
  margin-top: 3px;
  color: var(--crm-muted);
  font-size: var(--crm-font-xs);
  font-weight: 500;
  line-height: 1.2;
}

.crm-account-menu {
  min-width: 220px;
  margin-top: 8px !important;
  padding: 6px;
  border: 1px solid #d7e0ea;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(9, 30, 66, 0.14);
}

.crm-account-menu-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 5px 8px;
  border-radius: 8px;
  color: #344054;
  font-size: var(--crm-font-sm);
  font-weight: 500;
  line-height: 1.25;
  transition: color 140ms ease, background-color 140ms ease;
}

.crm-account-menu-item:hover,
.crm-account-menu-item:focus-visible {
  color: var(--crm-brand-blue);
  background: #f2f7fc;
}

.crm-account-menu-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: #edf5fd;
  color: var(--crm-brand-blue);
  font-size: 0.9rem;
  transition: color 140ms ease, background-color 140ms ease;
}

.crm-account-menu-item:hover .crm-account-menu-icon,
.crm-account-menu-item:focus-visible .crm-account-menu-icon {
  background: #dcecfb;
}

.crm-account-menu .dropdown-divider {
  margin: 5px 7px;
  border-color: #e6ebf1;
  opacity: 1;
}

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

.crm-account-menu-logout {
  color: #b42318;
}

.crm-account-menu-logout .crm-account-menu-icon {
  color: #b42318;
  background: #fff1f0;
}

.crm-account-menu-logout:hover,
.crm-account-menu-logout:focus-visible {
  color: #912018;
  background: #fff5f4;
}

.crm-account-menu-logout:hover .crm-account-menu-icon,
.crm-account-menu-logout:focus-visible .crm-account-menu-icon {
  color: #912018;
  background: #ffe4e1;
}

.crm-auth-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.crm-mobile-login-button {
  display: none;
}

.crm-content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  padding-bottom: 58px;
}

.crm-breadcrumb-bar {
  padding: 16px 24px 0;
}

.crm-breadcrumb-bar .breadcrumb {
  display: inline-flex;
  padding: 10px 14px;
  border: 1px solid var(--crm-border);
  border-radius: 8px;
  background: var(--crm-surface);
  font-size: 0.86rem;
}

.crm-breadcrumb-bar a {
  color: var(--crm-brand-blue);
  text-decoration: none;
}

.crm-content-container {
  flex: 1 1 auto;
  width: 100%;
  padding: 24px;
}

.crm-footer {
  position: fixed;
  right: 0;
  bottom: 0;
  left: var(--crm-sidebar-width);
  z-index: 1025;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 9px 24px;
  border-top: 1px solid var(--crm-border);
  background: var(--crm-surface);
  box-shadow: 0 -8px 24px rgba(4, 26, 56, .06);
  color: var(--crm-muted);
  font-size: 0.86rem;
  transition: left 180ms ease;
}

body.crm-sidebar-collapsed .crm-footer {
  left: var(--crm-sidebar-collapsed-width);
}

.crm-footer-powered {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--crm-muted);
  font-size: var(--crm-font-xs);
  font-weight: 600;
}

.crm-footer-solaris-logo {
  display: block;
  width: 126px;
  max-height: 32px;
  object-fit: contain;
}

.crm-sidebar-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(15, 23, 42, 0.45);
  z-index: 1035;
}

body.crm-sidebar-open .crm-sidebar-backdrop {
  display: block;
}

@media (max-width: 1199.98px) {
  body.crm-sidebar-collapsed .crm-sidebar {
    flex-basis: var(--crm-sidebar-width);
    width: var(--crm-sidebar-width);
  }

  body.crm-sidebar-collapsed .crm-brand-text,
  body.crm-sidebar-collapsed .crm-nav-text,
  body.crm-sidebar-collapsed .crm-nav-group-label,
  body.crm-sidebar-collapsed .crm-nav-group-toggle .bi-chevron-down {
    display: initial;
  }

  body.crm-sidebar-collapsed .crm-nav-group-toggle {
    justify-content: space-between;
  }

  body.crm-sidebar-collapsed .crm-nav-link {
    justify-content: flex-start;
  }

  .crm-sidebar {
    position: fixed;
    left: 0;
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

  body.crm-sidebar-open .crm-sidebar {
    transform: translateX(0);
  }

  body.crm-sidebar-open {
    overflow: hidden;
  }

  .crm-topbar {
    padding-inline: 16px;
  }

  .crm-footer,
  body.crm-sidebar-collapsed .crm-footer {
    left: 0;
  }
}

@media (max-width: 767.98px) {
  .crm-topbar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
  }

  .crm-topbar-start {
    grid-column: 1;
    flex: 0 1 auto;
    min-width: 0;
    gap: 8px;
  }

  .crm-topbar-actions {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    margin-left: 0;
  }

  .crm-mobile-brand {
    display: inline-flex;
  }

  .crm-header-logo {
    display: none;
  }

  .crm-header-mark {
    display: none;
  }

  .crm-topbar-title {
    display: none;
  }

  .crm-topbar-actions,
  .crm-auth-links {
    gap: 6px;
  }

  .crm-auth-links .btn {
    padding-inline: 0.5rem;
  }

  .crm-mobile-login-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--crm-border);
    border-radius: 8px;
    background: var(--crm-surface);
    color: #344054;
    text-decoration: none;
  }

  .crm-auth-links {
    display: none;
  }

  .crm-topbar-search {
    grid-column: 1 / -1;
    grid-row: 2;
    flex-basis: 100%;
    max-width: none;
  }

  .crm-topbar-kicker,
  .crm-user-copy {
    display: none;
  }

  .crm-breadcrumb-bar,
  .crm-content-container {
    padding-inline: 16px;
  }

  .crm-footer {
    min-height: 54px;
    padding-inline: 16px;
    font-size: var(--crm-font-xs);
  }

  .crm-content {
    padding-bottom: 54px;
  }

  .crm-footer-powered {
    gap: 7px;
    font-size: var(--crm-font-xs);
  }

  .crm-footer-solaris-logo {
    width: 104px;
  }
}
