﻿html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.login-page {
  min-height: 100vh;
  margin: 0;
  color: #0f172a;
  background: #f8fafc;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
  background: #f8fafc;
}

.login-shell-simple {
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-visual {
  position: relative;
  min-height: 100vh;
  background-image: url("https://images.unsplash.com/photo-1554224155-6726b3ff858f?auto=format&fit=crop&w=1600&q=80");
  background-position: center;
  background-size: cover;
  overflow: hidden;
}

.login-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.24);
}

.login-panel {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.login-card {
  width: min(100%, 560px);
  padding: 34px 30px 30px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.14);
}

.login-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.login-logo {
  color: #009640;
  font-size: 40px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #111827;
}

.language-switch select {
  border: 0;
  background: transparent;
  color: #111827;
  font-size: 14px;
  outline: 0;
  cursor: pointer;
}

.language-flag {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 16px;
  border: 1px solid #d1d5db;
  background: repeating-linear-gradient(
    to bottom,
    #bf0a30 0,
    #bf0a30 1.25px,
    #ffffff 1.25px,
    #ffffff 2.5px
  );
  overflow: hidden;
}

.language-flag::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 10px;
  height: 8.8px;
  background: #002868;
}

.login-heading {
  margin-bottom: 18px;
}

.login-heading h1 {
  margin: 0 0 6px;
  color: #111827;
  font-size: 28px;
  font-weight: 750;
  letter-spacing: 0;
}

.login-heading p {
  margin: 0;
  color: #111827;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-field label {
  display: block;
  margin-bottom: 6px;
  color: #111827;
  font-size: 15px;
}

.login-field input {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  background: #e8f0fe;
  color: #111827;
  padding: 8px 14px;
  outline: 0;
}

.login-field input:focus {
  box-shadow: 0 0 0 2px rgba(0, 150, 64, 0.22);
}

.password-input {
  position: relative;
}

.password-input input {
  padding-right: 44px;
}

.password-input button {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  transform: translateY(-50%);
  color: #94a3b8;
  cursor: pointer;
}

.password-input svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.password-input button.is-visible {
  color: #009640;
}

.login-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  min-height: 26px;
  margin-top: -2px;
}

.login-row a,
.login-footer a {
  color: #009640;
  text-decoration: none;
}

.remember-me {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #475569;
  font-size: 14px;
}

.login-submit {
  min-height: 46px;
  border: 0;
  border-radius: 7px;
  color: #ffffff;
  background: #009640;
  font-weight: 650;
}

.login-submit:hover {
  background: #00863a;
}

.sso-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  margin: 28px 0 18px;
  color: #111827;
}

.sso-divider span {
  height: 1px;
  background: #e5e7eb;
}

.sso-divider p {
  margin: 0;
  white-space: nowrap;
}

.azure-login,
.more-sso-options button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  border: 1px solid #d1d5db;
  border-radius: 7px;
  background: #ffffff;
  color: #374151;
  text-decoration: none;
}

.azure-login:hover,
.more-sso-options button:hover {
  background: #f8fafc;
  color: #111827;
}

.azure-mark {
  display: grid;
  grid-template-columns: repeat(2, 8px);
  grid-template-rows: repeat(2, 8px);
  gap: 2px;
  margin-right: 12px;
}

.azure-mark span:nth-child(1) {
  background: #f25022;
}

.azure-mark span:nth-child(2) {
  background: #7fba00;
}

.azure-mark span:nth-child(3) {
  background: #00a4ef;
}

.azure-mark span:nth-child(4) {
  background: #ffb900;
}

.more-sso-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 14px;
  border: 0;
  background: transparent;
  color: #111827;
}

.more-sso-options {
  margin-top: 12px;
}

.login-alert,
.login-validation {
  margin-bottom: 12px;
  color: #b42318;
  font-size: 14px;
}

.field-validation {
  display: block;
  min-height: 18px;
  margin-top: 4px;
  color: #b42318;
  font-size: 12px;
}

.login-footer {
  width: min(100%, 560px);
  margin-top: 18px;
  color: #aab4c3;
  text-align: center;
  font-size: 13px;
}

@media (max-width: 900px) {
  .login-shell {
    display: flex;
    min-height: 100vh;
  }

  .login-visual {
    position: fixed;
    inset: 0;
    min-height: 100vh;
  }

  .login-visual::after {
    background: rgba(255, 255, 255, 0.5);
  }

  .login-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 20px;
  }

  .login-card {
    padding: 26px 20px;
  }

  .login-logo {
    font-size: 34px;
  }

  .login-card-header {
    align-items: flex-start;
  }
}

.home-shell-page {
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  color: #111827;
  background: #eef0f2;
  font-family: Inter, "Noto Sans Khmer", Arial, sans-serif;
}

.home-shell-page .material-icons-round {
  font-family: "Material Icons Round", "Material Icons", sans-serif;
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
}

.home-shell {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: #ffffff;
}

.home-topbar {
  height: 58px;
  display: grid;
  grid-template-columns: 280px minmax(240px, 1fr) auto;
  align-items: center;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
  z-index: 20;
}

.home-brand-area {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px 0 38px;
  border-right: 1px solid #e5e7eb;
}

.home-brand {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.home-brand-logo {
  display: block;
  object-fit: contain;
}

.home-brand-logo-full {
  width: 100%;
  max-width: 224px;
  max-height: 54px;
}

.home-brand-logo-mark {
  display: none;
  width: auto;
  height: 44px;
}

.home-topbar-center {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  padding-left: 22px;
}

.home-company-button {
  width: min(300px, 100%);
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid var(--home-primary);
  border-radius: 7px;
  background: #ffffff;
  color: var(--home-primary);
  font-size: 15px;
  font-weight: 800;
}

.home-company-button span:first-child {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.home-topbar-actions {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
}

.home-icon-button,
.home-profile-button,
.home-sidebar-collapse {
  border: 0;
  background: transparent;
  color: #5f6b7a;
  cursor: pointer;
}

.home-icon-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-left: 1px solid #e5e7eb;
}

.home-icon-button:first-child,
.home-mobile-menu {
  border-left: 0;
}

.home-icon-button:hover,
.home-profile-button:hover,
.home-sidebar-collapse:hover {
  color: var(--home-primary);
}

.home-mobile-menu {
  display: none;
}

.home-profile {
  position: relative;
}

.home-profile-button {
  position: relative;
  width: 38px;
  height: 38px;
  padding: 0;
}

.home-profile-button img {
  width: 34px;
  height: 34px;
  border: 2px solid var(--home-primary);
  border-radius: 50%;
  object-fit: cover;
}

.home-profile-status {
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 12px;
  height: 12px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: #22c55e;
}

.home-company-menu,
.home-profile-menu,
.home-settings-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 292px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.16);
  z-index: 40;
}

.home-company-menu {
  left: 30px;
  right: auto;
}

.home-company-option,
.home-profile-menu button,
.home-settings-panel button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: #374151;
  text-align: left;
  padding: 12px 14px;
}

.home-company-option:hover,
.home-company-option.is-active,
.home-profile-menu button:hover,
.home-settings-panel button:hover {
  background: #e8f7ef;
  color: var(--home-primary);
}

.home-company-option span:last-child,
.home-profile-summary {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.home-company-option small,
.home-profile-summary span {
  color: #6b7280;
  font-size: 12px;
}

.home-dropdown-empty,
.home-profile-summary {
  padding: 14px;
}

.home-shell-skeleton {
  display: block;
  min-height: 20px;
  border-radius: 8px;
  background: linear-gradient(90deg, #eef2f7, #f8fafc, #eef2f7);
  background-size: 200% 100%;
  animation: home-skeleton 1.1s ease-in-out infinite;
}

.home-company-skeleton {
  width: 300px;
  min-height: 38px;
}

.home-action-skeleton,
.home-avatar-skeleton {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.home-sidebar-loading {
  display: grid;
  gap: 12px;
  padding: 16px 10px;
}

.home-sidebar-loading .home-shell-skeleton {
  min-height: 34px;
}

@keyframes home-skeleton {
  from {
    background-position: 100% 0;
  }

  to {
    background-position: -100% 0;
  }
}

@keyframes home-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.home-settings-panel {
  top: 68px;
  right: 78px;
  padding: 14px;
}

.home-settings-panel h2 {
  margin: 0 0 8px;
  font-size: 16px;
}

.home-main {
  min-height: 0;
  flex: 1;
  display: flex;
  position: relative;
}

.home-sidebar {
  position: relative;
  width: 280px;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #e5e7eb;
  background: #ffffff;
  transition: width 160ms ease, transform 180ms ease;
  z-index: 18;
}

.home-sidebar-collapse {
  align-self: flex-end;
  width: 34px;
  height: 26px;
  margin: 4px 16px 0 0;
}

.home-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 10px 12px;
}

.home-menu-section {
  margin-bottom: 4px;
}

.home-menu-title,
.home-menu-link {
  width: 100%;
  min-height: 30px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #5b6879;
  text-align: left;
  font-size: 13px;
  font-weight: 800;
}

.home-menu-title {
  padding: 0 7px;
  text-transform: uppercase;
}

.home-menu-title span:nth-child(2),
.home-menu-link span:nth-child(2) {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.home-menu-title .material-icons-round:first-child,
.home-menu-link .material-icons-round:first-child {
  color: var(--home-primary);
}

.home-menu-title:hover,
.home-menu-link:hover {
  background: #edf7f1;
  color: var(--home-primary);
}

.home-menu-title.is-active {
  background: #d8f0e2;
  color: var(--home-primary);
}

.home-menu-section.is-open .home-menu-caret {
  transform: rotate(180deg);
}

.home-menu-items {
  display: none;
  padding: 3px 0 3px 28px;
}

.home-menu-section.is-open .home-menu-items {
  display: block;
}

.home-menu-link {
  grid-template-columns: 24px minmax(0, 1fr);
  margin: 1px 0;
  padding: 0 10px;
  text-transform: none;
  color: #4b5563;
}

.home-menu-link.is-active {
  background: #d8f0e2;
  color: var(--home-primary);
}

.home-sidebar-footer {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-top: 1px solid #e5e7eb;
  color: #64748b;
  font-size: 11px;
}

.home-sidebar-footer strong {
  color: var(--home-primary);
  font-size: 17px;
  letter-spacing: 0;
}

.home-sidebar-footer-logo {
  display: none;
  width: 58px;
  height: auto;
}

.home-workspace {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  position: relative;
}

.home-frame-surface {
  position: relative;
  flex: 1;
  min-height: 0;
  margin: 8px 8px 4px;
  border: 1px solid #e5e7eb;
  background: #ededed;
}

.home-frame-surface iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #ededed;
}

.home-frame-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--home-primary);
  background: rgba(255, 255, 255, 0.55);
  font-weight: 700;
  pointer-events: none;
}

.home-frame-loading[hidden] {
  display: none !important;
}

.home-frame-loading .material-icons-round,
.home-status-left.is-loading .material-icons-round {
  animation: home-spin 1s linear infinite;
}

.home-module-popup {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 30px;
  left: 0;
  z-index: 17;
  display: flex;
  flex-direction: column;
  background: #f3f4f6;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.14);
}

.home-module-popup[hidden] {
  display: none !important;
}

.home-module-popup-header {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 22px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
}

.home-module-popup-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.home-module-popup-title h1 {
  margin: 0;
  color: var(--home-primary);
  font-size: 22px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.home-module-popup-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #e7f6ed;
  color: var(--home-primary);
  font-size: 28px;
}

.home-shell-page .home-module-popup-icon.material-icons-round,
.home-shell-page .home-module-card-icon.material-icons-round {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  line-height: 1;
  text-align: center;
}

.home-module-popup-header button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #64748b;
  cursor: pointer;
}

.home-module-popup-header button:hover {
  background: #fee2e2;
  color: #dc2626;
}

.home-module-popup-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 22px 34px;
}

.home-module-section {
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.home-module-section header {
  padding: 12px 22px;
  border-bottom: 1px solid #e5e7eb;
  color: var(--home-primary);
  font-size: 18px;
  font-weight: 800;
}

.home-module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px 18px;
  padding: 18px 22px;
}

.home-module-card {
  position: relative;
  min-height: 44px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #111827;
  padding: 6px 8px;
  text-decoration: none;
}

.home-module-card:hover {
  border-color: #e5e7eb;
  background: #f8fafc;
  color: var(--home-primary);
}

.home-module-card-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #f1f3f6;
  color: #5f6b7a;
  font-size: 22px;
}

.home-module-card:hover .home-module-card-icon {
  background: #e7f6ed;
  color: var(--home-primary);
}

.home-module-card-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.home-module-card-title {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.home-module-card-description {
  min-width: 0;
  overflow: hidden;
  color: #64748b;
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.home-module-favorite {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #c0c7d2;
  cursor: pointer;
}

.home-module-favorite:hover {
  background: #ffffff;
  color: #f59e0b;
}

.home-module-favorite.is-active,
.home-module-favorite.is-active:hover,
.home-module-favorite.is-active:focus-visible {
  color: #f5b301;
}

.home-module-favorite.is-active .material-icons-round {
  text-shadow: 0 1px 1px rgba(146, 92, 0, 0.18);
}

.home-module-popup-empty {
  border: 1px dashed #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  color: #64748b;
  padding: 28px;
}

.home-statusbar {
  height: 30px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
  color: #94a3b8;
  font-size: 12px;
}

.home-status-left,
.home-status-center,
.home-status-right {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 0 14px;
}

.home-status-center {
  justify-content: center;
  color: #16b957;
}

.home-status-right {
  justify-content: flex-end;
  color: #5b6879;
}

.home-status-left .material-icons-round {
  color: #aab2bf;
}

.home-status-left.is-loading {
  color: var(--home-primary);
}

.home-status-left.is-loading .material-icons-round {
  color: var(--home-primary);
}

.home-status-separator {
  width: 1px;
  height: 14px;
  background: #d1d5db;
}

.home-search-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-top: 12vh;
  background: rgba(15, 23, 42, 0.36);
  z-index: 60;
}

.home-search-overlay[hidden],
.home-company-menu[hidden],
.home-profile-menu[hidden],
.home-settings-panel[hidden],
.home-backdrop[hidden] {
  display: none !important;
}

.home-search-box {
  width: min(640px, calc(100vw - 32px));
  min-height: 58px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.28);
}

.home-search-box input,
.home-search-box button {
  border: 0;
  background: transparent;
  outline: 0;
}

.home-search-box input {
  width: 100%;
  font-size: 18px;
}

.home-search-results {
  width: min(640px, calc(100vw - 32px));
  max-height: 46vh;
  overflow-y: auto;
  margin-top: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.18);
}

.home-search-result,
.home-search-empty {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid #f1f5f9;
  background: transparent;
  color: #374151;
  text-align: left;
  padding: 0 16px;
}

.home-search-result:hover {
  background: #edf7f1;
  color: var(--home-primary);
}

.home-search-empty {
  color: #94a3b8;
}

.home-frame-page {
  min-height: 100vh;
  margin: 0;
  background: #ededed;
  font-family: Arial, sans-serif;
}

.crm-dashboard-page { background: #f7f9fb; color: #162238; overflow-y: auto; }
.crm-dashboard-page .material-icons-round { font-family: "Material Icons Round", "Material Icons", sans-serif; font-weight: normal; font-style: normal; line-height: 1; letter-spacing: 0; text-transform: none; -webkit-font-feature-settings: "liga"; font-feature-settings: "liga"; -webkit-font-smoothing: antialiased; }
.crm-dashboard { max-width: 1500px; margin: 0 auto; padding: 28px 34px 48px; }
.crm-dashboard-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 20px; }
.crm-dashboard-eyebrow { margin: 0 0 6px; color: #009640; font-size: 12px; font-weight: 800; letter-spacing: .16em; }
.crm-dashboard-header h1 { margin: 0; font-size: clamp(26px, 3vw, 38px); letter-spacing: -.03em; }
.crm-dashboard-subtitle { margin: 8px 0 0; color: #718096; font-size: 13px; }
.crm-dashboard-toolbar { display: flex; align-items: center; gap: 10px; padding-top: 2px; }
.crm-dashboard-toolbar .dx-button { border-radius: 8px; min-height: 34px; }
.crm-dashboard-refresh { display: inline-flex; align-items: center; gap: 7px; border: 0; border-radius: 10px; padding: 11px 15px; background: #009640; color: #fff; font-weight: 700; cursor: pointer; }
.crm-dashboard-refresh:hover { background: #007b35; }
.crm-dashboard-kpis { display: grid; grid-template-columns: repeat(6, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.crm-dashboard-kpi { display: flex; align-items: flex-start; gap: 12px; min-height: 112px; padding: 18px 16px; border-radius: 12px; background: #fff; box-shadow: 0 4px 18px rgba(36, 55, 80, .06); border-top: 0; }
.crm-dashboard-kpi-icon { display: inline-flex; flex: 0 0 42px; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 50%; background: #eaf8f0; color: #009640; }
.crm-dashboard-kpi-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.crm-dashboard-kpi small, .crm-dashboard-kpi em { display: block; color: #7a8798; font-style: normal; }
.crm-dashboard-kpi strong { display: block; margin: 7px 0 3px; font-size: 24px; letter-spacing: -.02em; }
.crm-dashboard-kpi.blue .crm-dashboard-kpi-icon { color: #3977d8; background: #edf3ff; }
.crm-dashboard-kpi.purple .crm-dashboard-kpi-icon { color: #8b5bd6; background: #f4efff; }
.crm-dashboard-kpi.orange .crm-dashboard-kpi-icon { color: #e58b26; background: #fff5e7; }
.crm-dashboard-kpi.teal .crm-dashboard-kpi-icon { color: #0c9e9b; background: #e8fbfa; }
.crm-dashboard-kpi.red .crm-dashboard-kpi-icon { color: #d75555; background: #fff0f0; }
.crm-dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.crm-dashboard-panel { min-width: 0; padding: 18px 20px; border-radius: 12px; background: #fff; box-shadow: 0 4px 18px rgba(36, 55, 80, .06); margin-bottom: 14px; }
.crm-dashboard-panel-wide { width: 100%; }
.crm-dashboard-grid > .crm-dashboard-panel-wide { width: auto; }
.crm-dashboard-panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.crm-dashboard-panel-heading h2 { margin: 0; font-size: 16px; }.crm-dashboard-panel-heading p { margin: 5px 0 0; color: #8290a4; font-size: 12px; }.crm-dashboard-panel-heading > .material-icons-round { color: #009640; }.crm-dashboard-panel-heading a { color: #009640; font-size: 12px; font-weight: 700; text-decoration: none; }
.crm-dashboard-funnel-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); align-items: center; gap: 18px; }
.crm-dashboard-toolbar { flex-wrap: wrap; }
.crm-dashboard-toolbar > .dx-button { flex-shrink: 0; }
.crm-dashboard-toolbar input[type="date"], .crm-dashboard-toolbar form button { border: 1px solid #bac8d8; border-radius: 3px; padding: 5px 8px; color: #172033; background: #fff; font: inherit; font-size: 12px; }
.crm-dashboard-toolbar label { white-space: nowrap; font-size: 12px; }
.crm-dashboard-toolbar a { color: #008c3d; font-size: 12px; }
.crm-dashboard > p { color: #718096; font-size: 12px; line-height: 1.5; }
.crm-dashboard-kpi strong { overflow-wrap: anywhere; }
@media (max-width: 1100px) { .crm-dashboard-header { flex-direction: column; }.crm-dashboard-grid { grid-template-columns: 1fr; } }
.crm-funnel-visual { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 205px; padding: 8px 0; }
.crm-funnel-segment { height: 29px; width: var(--funnel-width); max-width: 285px; min-width: 82px; background: #159e5b; border-bottom: 2px solid #fff; clip-path: polygon(0 0, 100% 0, 92% 100%, 8% 100%); }
.crm-funnel-segment:nth-child(even) { background: #159b59; }
.crm-dashboard-legend > div { display: grid; grid-template-columns: 12px 1fr auto auto; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px solid #edf0f2; font-size: 12px; }.crm-dashboard-legend i { width: 7px; height: 7px; border-radius: 50%; }.crm-dashboard-legend b { font-weight: 600; }.crm-dashboard-legend small { color: #748096; }
.crm-dashboard-bar-row { margin: 15px 0; }.crm-dashboard-bar-row > div:first-child { display: flex; justify-content: space-between; margin-bottom: 7px; font-size: 13px; }.crm-dashboard-bar-row small { color: #8995a5; }.crm-dashboard-bar-track { height: 9px; border-radius: 99px; background: #edf1f3; overflow: hidden; }.crm-dashboard-bar-track i { display: block; height: 100%; border-radius: inherit; background: #009640; }.crm-dashboard-bar-track i.blue { background: #3977d8; }.crm-dashboard-bar-track i.orange { background: #e58b26; }.crm-dashboard-bar-track i.purple { background: #8b5bd6; }
.crm-dashboard-table-wrap { overflow-x: auto; } .crm-dashboard-panel table { width: 100%; border-collapse: collapse; font-size: 13px; }.crm-dashboard-panel th { padding: 0 8px 11px; color: #8793a3; text-align: left; font-weight: 700; }.crm-dashboard-panel td { padding: 12px 8px; border-top: 1px solid #edf0f2; white-space: nowrap; }.crm-dashboard-pill { display: inline-block; border-radius: 99px; padding: 4px 8px; background: #eaf8f0; color: #00833a; font-size: 11px; font-weight: 700; }
.crm-dashboard-list > div { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid #edf0f2; }.crm-dashboard-list > div:last-child { border-bottom: 0; }.crm-dashboard-list-icon { padding: 8px; border-radius: 9px; background: #eef8f2; color: #009640; }.crm-dashboard-list p { flex: 1; margin: 0; }.crm-dashboard-list p strong, .crm-dashboard-list p small { display: block; }.crm-dashboard-list p small { margin-top: 3px; color: #8793a3; }
.crm-dashboard-devexpress-chart { min-height: 245px; width: 100%; }
.crm-dashboard-devexpress-grid { min-height: 255px; width: 100%; }
.crm-dashboard-devexpress-grid .dx-datagrid { background: transparent; color: #172033; }
.crm-dashboard-devexpress-grid .dx-datagrid-headers, .crm-dashboard-devexpress-grid .dx-datagrid-rowsview { border-left: 0; border-right: 0; }
.crm-dashboard-devexpress-grid .dx-datagrid-headers { color: #718096; font-size: 11px; text-transform: uppercase; }
.crm-dashboard-devexpress-grid .dx-data-row > td { padding-top: 8px; padding-bottom: 8px; border-color: #edf0f2; font-size: 12px; }
@media (max-width: 1150px) { .crm-dashboard-kpis { grid-template-columns: repeat(2, minmax(150px, 1fr)); } }
@media (max-width: 760px) { .crm-dashboard { padding: 22px 16px 36px; }.crm-dashboard-header { flex-direction: column; }.crm-dashboard-kpis, .crm-dashboard-grid { grid-template-columns: 1fr; }.crm-dashboard-kpi { min-height: 95px; } }

.dashboard-empty-state {
  min-height: 100vh;
  display: grid;
  place-items: center;
  color: #000000;
  font-size: 16px;
}

.home-sidebar-is-collapsed .home-topbar {
  grid-template-columns: 68px minmax(240px, 1fr) auto;
}

.home-sidebar-is-collapsed .home-brand-area {
  padding: 0 14px;
  justify-content: center;
}

.home-sidebar-is-collapsed .home-brand-logo-full,
.home-sidebar-is-collapsed .home-menu-title span:nth-child(2),
.home-sidebar-is-collapsed .home-menu-link span:nth-child(2),
.home-sidebar-is-collapsed .home-menu-caret,
.home-sidebar-is-collapsed .home-sidebar-footer span,
.home-sidebar-is-collapsed .home-sidebar-footer strong {
  display: none;
}
.home-status-center.license-status-warning { color: #945600; }
.home-status-center.license-status-error { color: #b91c1c; }
.home-status-center.license-status-success { color: #15803d; }
.home-status-center > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.home-sidebar-is-collapsed .home-brand-logo-mark {
  display: block;
}

.home-sidebar-is-collapsed .home-sidebar-footer-logo {
  display: block;
}

.home-sidebar-is-collapsed .home-sidebar {
  width: 68px;
}

.home-sidebar-is-collapsed .home-menu-title,
.home-sidebar-is-collapsed .home-menu-link {
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 0;
}

.home-sidebar-is-collapsed .home-menu-items {
  padding-left: 0;
}

@media (max-width: 980px) {
  .home-topbar {
    grid-template-columns: 1fr auto;
    height: 58px;
  }

  .home-brand-area {
    border-right: 0;
    padding-left: 16px;
  }

  .home-brand-logo-full {
    max-width: 210px;
    max-height: 50px;
  }

  .home-topbar-center {
    display: none;
  }

  .home-mobile-menu {
    display: grid;
  }

  .home-sidebar {
    position: fixed;
    inset: 58px auto 0 0;
    transform: translateX(-100%);
    height: calc(100vh - 58px);
  }

  .home-sidebar.is-mobile-open {
    transform: translateX(0);
  }

  .home-backdrop {
    position: fixed;
    inset: 58px 0 0;
    background: rgba(15, 23, 42, 0.34);
    z-index: 16;
  }

  .home-frame-surface {
    margin: 0;
    border-left: 0;
    border-right: 0;
  }

  .home-module-popup-header {
    min-height: 58px;
    padding: 0 16px;
  }

  .home-module-popup-title h1 {
    font-size: 20px;
  }

  .home-module-popup-icon {
    width: 42px;
    height: 42px;
    font-size: 26px;
  }

  .home-module-popup-body {
    padding: 14px 14px 34px;
  }

  .home-module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 16px;
  }

  .home-module-section header {
    padding: 14px 16px;
    font-size: 18px;
  }

  .home-statusbar {
    grid-template-columns: 1fr auto;
  }

  .home-status-center {
    display: none;
  }
}

@media (max-width: 620px) {
  .home-topbar-actions {
    gap: 6px;
    padding: 0 10px;
  }

  .home-brand-logo-full {
    max-width: 190px;
  }

  .home-icon-button {
    width: 36px;
  }

  .home-statusbar {
    font-size: 12px;
  }

  .home-status-separator,
  #home-clock-time {
    display: none;
  }

  .home-module-grid {
    grid-template-columns: 1fr;
  }

  .home-module-card-title {
    font-size: 15px;
  }
}

/* Approved CRM workspace refresh */
.home-command-center {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(260px, 520px);
  align-items: center;
  justify-content: space-between;
  gap: clamp(14px, 3vw, 54px);
  padding-right: 20px;
}

.home-company-wrap {
  position: relative;
  min-width: 0;
}

.home-command-center .home-company-button {
  width: 100%;
}

.home-command-center .home-company-menu {
  top: calc(100% + 8px);
  left: 0;
  right: auto;
}

.home-global-search-trigger {
  min-width: 0;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid #d8e0ea;
  border-radius: 7px;
  padding: 0 13px;
  background: #f8fafc;
  color: #78869a;
  text-align: left;
  cursor: pointer;
}

.home-global-search-trigger:hover {
  border-color: #9fcdb1;
  background: #ffffff;
  color: var(--home-primary);
}

.home-global-search-trigger span:last-child {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13px;
}

.home-topbar-actions {
  gap: 5px;
  padding: 0 18px 0 10px;
  border-left: 1px solid #edf0f3;
}

.home-topbar-actions .home-icon-button {
  border-left: 0;
  border-radius: 8px;
}

.home-topbar-actions .home-icon-button:hover {
  background: #f4f8f6;
}

.home-profile {
  margin-left: 2px;
}

.home-profile-button-wide {
  width: auto;
  min-width: 118px;
  height: 40px;
  display: grid;
  grid-template-columns: 34px minmax(0, auto) 18px;
  align-items: center;
  gap: 7px;
  border-radius: 20px;
  padding: 3px 8px 3px 4px;
}

.home-profile-button-wide:hover {
  background: #f4f8f6;
}

.home-profile-avatar-wrap {
  position: relative;
  width: 34px;
  height: 34px;
  display: block;
}

.home-profile-avatar-wrap img {
  display: block;
}

.home-profile-avatar-wrap .home-profile-status {
  right: -1px;
  bottom: -1px;
}

.home-profile-button-wide .home-profile-name {
  max-width: 118px;
  overflow: hidden;
  color: #26364d;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.home-profile-button-wide .home-profile-chevron {
  color: #8290a4;
  font-size: 18px;
}

.home-profile-menu {
  top: calc(100% + 8px);
}

.crm-workspace-popup {
  display: block;
  overflow: hidden;
  background: #f5f7fa;
  box-shadow: none;
}

.crm-workspace-page {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  padding: 0 14px 28px;
  color: #14213a;
  background:
    linear-gradient(180deg, #fbfcfd 0, #f4f7fa 150px, #f5f7fa 100%);
}

.crm-workspace-breadcrumb {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #6e7d93;
  font-size: 12px;
}

.crm-workspace-breadcrumb > div {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.crm-workspace-breadcrumb .material-icons-round {
  font-size: 16px;
}

.crm-workspace-breadcrumb strong {
  color: #18253a;
}

.crm-workspace-breadcrumb > button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #718096;
  cursor: pointer;
}

.crm-workspace-breadcrumb > button:hover {
  background: #fff0f0;
  color: #d14343;
}

.crm-workspace-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 286px;
  align-items: start;
  gap: 14px;
  max-width: 1560px;
  margin: 0 auto;
}

.crm-workspace-main {
  min-width: 0;
}

.crm-workspace-hero {
  position: relative;
  min-height: 118px;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) minmax(180px, 290px);
  align-items: center;
  gap: 18px;
  overflow: hidden;
  border: 1px solid #e2e8ef;
  border-radius: 14px;
  padding: 14px 22px;
  background:
    radial-gradient(circle at 88% 25%, rgba(111, 233, 163, .24), transparent 25%),
    radial-gradient(circle at 74% -30%, rgba(0, 150, 64, .14), transparent 36%),
    #ffffff;
  box-shadow: 0 7px 24px rgba(43, 60, 84, .05);
}

.crm-workspace-hero::after {
  content: "";
  position: absolute;
  top: -54px;
  right: 40px;
  width: 320px;
  height: 130px;
  border: 1px solid rgba(0, 150, 64, .12);
  border-radius: 50%;
  transform: rotate(-10deg);
  pointer-events: none;
}

.crm-workspace-hero-icon {
  width: 72px;
  height: 72px;
  display: grid !important;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(145deg, #d9f8e6, #edfdf4);
  color: #00a54f;
  font-size: 42px !important;
}

.crm-workspace-hero-copy {
  min-width: 0;
  z-index: 1;
}

.crm-workspace-hero-copy h1 {
  margin: 0 0 5px;
  color: #10203d;
  font-size: 30px;
  line-height: 1;
  letter-spacing: -.025em;
}

.crm-workspace-hero-copy p {
  max-width: 650px;
  margin: 0;
  color: #63758d;
  font-size: 13px;
  line-height: 1.55;
}

.crm-workspace-hero-message {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #315d4b;
  text-align: center;
  font-style: italic;
}

.crm-workspace-hero-message strong {
  color: #2f5e4b;
  font-family: Georgia, serif;
  font-size: 19px;
  font-weight: 500;
}

.crm-workspace-hero-message span {
  margin-top: 3px;
  font-family: Georgia, serif;
  font-size: 16px;
}

.crm-workspace-hero-message::after {
  content: "";
  width: 38px;
  height: 3px;
  margin-top: 7px;
  border-radius: 999px;
  background: var(--home-primary);
}

.crm-workspace-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
  margin: 12px 0;
}

.crm-workspace-kpi {
  min-width: 0;
  min-height: 78px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 11px;
  border: 1px solid #e3e8ef;
  border-radius: 12px;
  padding: 11px 13px;
  background: #ffffff;
  color: #17243b;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(36, 55, 80, .045);
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.crm-workspace-kpi:hover {
  transform: translateY(-1px);
  border-color: #bdd8c8;
  box-shadow: 0 8px 22px rgba(36, 55, 80, .08);
}

.crm-workspace-kpi-icon,
.crm-workspace-card-icon,
.crm-workspace-rail-icon {
  display: inline-grid !important;
  place-items: center;
}

.crm-workspace-kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  font-size: 25px !important;
}

.crm-workspace-kpi-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.crm-workspace-kpi-copy strong {
  color: #12233f;
  font-size: 22px;
  line-height: 1.1;
}

.crm-workspace-kpi-copy small {
  margin-top: 4px;
  overflow: hidden;
  color: #65758b;
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.crm-workspace-kpi-arrow {
  color: #68819d;
  font-size: 18px !important;
}

.crm-workspace-browser {
  overflow: hidden;
  border: 1px solid #e1e7ee;
  border-radius: 13px;
  background: #ffffff;
  box-shadow: 0 6px 22px rgba(36, 55, 80, .045);
}

.crm-workspace-toolbar {
  min-height: 54px;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e6eaf0;
  padding: 0 10px 0 5px;
}

.crm-workspace-tabs {
  min-width: 0;
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  scrollbar-width: none;
}

.crm-workspace-tabs::-webkit-scrollbar {
  display: none;
}

.crm-workspace-tab {
  position: relative;
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: #53657d;
  padding: 0 13px;
  font-size: 12px;
  cursor: pointer;
}

.crm-workspace-tab::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 0;
  left: 10px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: transparent;
}

.crm-workspace-tab:hover,
.crm-workspace-tab.is-active {
  color: var(--home-primary);
}

.crm-workspace-tab.is-active {
  font-weight: 800;
}

.crm-workspace-tab.is-active::after {
  background: var(--home-primary);
}

.crm-workspace-tools {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 5px;
}

.crm-workspace-tools > button {
  min-width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid #dde4ec;
  border-radius: 7px;
  background: #ffffff;
  color: #64758c;
  cursor: pointer;
}

.crm-workspace-tools > button.is-active {
  border-color: var(--home-primary);
  background: var(--home-primary);
  color: #ffffff;
}

.crm-workspace-tools .crm-workspace-search-trigger {
  width: 190px;
  grid-template-columns: 22px minmax(0, 1fr);
  justify-items: start;
  gap: 4px;
  padding: 0 10px;
  color: #77869a;
}

.crm-workspace-search-trigger span:last-child {
  min-width: 0;
  overflow: hidden;
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.crm-workspace-sections {
  padding: 5px 0 10px;
}

.crm-workspace-section {
  padding: 9px 12px 5px;
}

.crm-workspace-section + .crm-workspace-section {
  border-top: 1px solid #f0f2f5;
}

.crm-workspace-section-heading {
  min-height: 35px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
}

.crm-workspace-section-heading > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.crm-workspace-section-accent {
  width: 4px;
  height: 22px;
  border-radius: 999px;
  background: var(--home-primary);
}

.crm-workspace-section:nth-child(2) .crm-workspace-section-accent {
  background: #3183f4;
}

.crm-workspace-section:nth-child(3) .crm-workspace-section-accent {
  background: #8b5cf6;
}

.crm-workspace-section-heading h2 {
  margin: 0;
  color: #17243a;
  font-size: 14px;
}

.crm-workspace-section-heading > span {
  color: #7890aa;
  font-size: 10px;
}

.crm-workspace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.crm-workspace-card {
  position: relative;
  min-width: 0;
  min-height: 82px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 9px;
  border: 1px solid #e6eaf0;
  border-radius: 10px;
  padding: 9px 29px 9px 10px;
  background: #ffffff;
  color: #17243a;
  text-decoration: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.crm-workspace-card:hover {
  transform: translateY(-1px);
  border-color: #cddbd3;
  box-shadow: 0 6px 17px rgba(36, 55, 80, .07);
}

.crm-workspace-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  font-size: 23px !important;
}

.crm-workspace-card-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.crm-workspace-card-copy strong {
  overflow: hidden;
  color: #17243a;
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.crm-workspace-card-copy small {
  display: -webkit-box;
  overflow: hidden;
  color: #718097;
  font-size: 9.5px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.crm-workspace-card-arrow {
  color: #66809f;
  font-size: 16px !important;
}

.crm-workspace-favorite {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #bdc7d4;
  cursor: pointer;
}

.crm-workspace-favorite .material-icons-round {
  font-size: 17px !important;
}

.crm-workspace-favorite.is-active {
  color: #f5ae00;
}

.crm-tone-blue .crm-workspace-card-icon,
.crm-tone-blue .crm-workspace-kpi-icon { background: #eaf3ff; color: #1671e8; }
.crm-tone-green .crm-workspace-card-icon,
.crm-tone-green .crm-workspace-kpi-icon { background: #e9f9ef; color: #06a84f; }
.crm-tone-purple .crm-workspace-card-icon,
.crm-tone-purple .crm-workspace-kpi-icon { background: #f1ebff; color: #7445e8; }
.crm-tone-orange .crm-workspace-card-icon,
.crm-tone-orange .crm-workspace-kpi-icon { background: #fff2e4; color: #ef7a16; }
.crm-tone-rose .crm-workspace-card-icon,
.crm-tone-rose .crm-workspace-kpi-icon { background: #ffe9ef; color: #ee3c69; }
.crm-tone-teal .crm-workspace-card-icon,
.crm-tone-teal .crm-workspace-kpi-icon { background: #e2f8f7; color: #079d9c; }
.crm-tone-violet .crm-workspace-card-icon,
.crm-tone-violet .crm-workspace-kpi-icon { background: #f1e9ff; color: #7e31ef; }
.crm-tone-pink .crm-workspace-card-icon,
.crm-tone-pink .crm-workspace-kpi-icon { background: #ffe8f2; color: #e6337b; }
.crm-tone-slate .crm-workspace-card-icon,
.crm-tone-slate .crm-workspace-kpi-icon { background: #edf2f7; color: #60738a; }

.crm-workspace-popup.is-list .crm-workspace-grid {
  grid-template-columns: 1fr;
}

.crm-workspace-popup.is-list .crm-workspace-card {
  min-height: 60px;
  grid-template-columns: 38px minmax(0, 1fr) 18px;
}

.crm-workspace-popup.is-list .crm-workspace-card-icon {
  width: 34px;
  height: 34px;
  font-size: 20px !important;
}

.crm-workspace-rail {
  min-width: 0;
  display: grid;
  gap: 11px;
}

.crm-workspace-promo,
.crm-workspace-rail-panel {
  overflow: hidden;
  border: 1px solid #e1e7ee;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 5px 18px rgba(36, 55, 80, .045);
}

.crm-workspace-promo {
  min-height: 145px;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  align-items: end;
  gap: 8px;
  padding: 20px 17px;
  color: #ffffff;
  background:
    radial-gradient(circle at 85% 12%, rgba(165, 238, 112, .65), transparent 20%),
    linear-gradient(135deg, #255d57, #55814c 68%, #9eb85e);
}

.crm-workspace-promo > .material-icons-round {
  align-self: center;
  font-size: 58px !important;
  color: #c9f45a;
}

.crm-workspace-promo div {
  display: flex;
  flex-direction: column;
}

.crm-workspace-promo small {
  opacity: .82;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
}

.crm-workspace-promo strong {
  margin-top: 6px;
  font-size: 18px;
  line-height: 1.15;
}

.crm-workspace-promo p {
  margin: 5px 0 0;
  font-size: 11px;
  line-height: 1.35;
}

.crm-workspace-rail-panel > header {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #e8ecf1;
  padding: 0 13px;
  color: #14233c;
  font-size: 12px;
}

.crm-workspace-rail-panel > header .material-icons-round {
  color: #2b6dac;
  font-size: 18px !important;
}

.crm-workspace-rail-link {
  min-height: 39px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid #f0f2f5;
  padding: 5px 9px;
  color: #46617e;
  text-decoration: none;
}

.crm-workspace-rail-link:last-child {
  border-bottom: 0;
}

.crm-workspace-rail-link:hover {
  background: #f6faf8;
  color: var(--home-primary);
}

.crm-workspace-rail-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: #eef5ff;
  color: #2974dd;
  font-size: 16px !important;
}

.crm-workspace-rail-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.crm-workspace-rail-copy strong,
.crm-workspace-rail-copy small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.crm-workspace-rail-copy strong {
  color: inherit;
  font-size: 10.5px;
}

.crm-workspace-rail-copy small {
  color: #74869c;
  font-size: 9px;
}

.crm-workspace-rail-link > .material-icons-round:last-child {
  color: #7191b5;
  font-size: 15px !important;
}

.crm-workspace-empty {
  padding: 16px 12px;
  color: #8090a5;
  font-size: 10px;
  text-align: center;
}

.crm-workspace-empty-large {
  min-height: 160px;
  display: grid;
  place-items: center;
}

.crm-workspace-loading {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--home-primary);
  font-weight: 700;
}

.crm-workspace-loading .material-icons-round {
  animation: home-spin 1s linear infinite;
}

@media (max-width: 1280px) {
  .home-command-center {
    grid-template-columns: minmax(210px, 280px) minmax(220px, 1fr);
    gap: 14px;
  }

  .crm-workspace-layout {
    grid-template-columns: minmax(0, 1fr) 250px;
  }

  .crm-workspace-grid {
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  }
}

@media (max-width: 1100px) {
  .home-global-search-trigger {
    display: none;
  }

  .home-command-center {
    grid-template-columns: minmax(210px, 300px);
  }

  .crm-workspace-layout {
    grid-template-columns: 1fr;
  }

  .crm-workspace-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .crm-workspace-promo {
    grid-column: 1 / -1;
    min-height: 105px;
  }
}

@media (max-width: 820px) {
  .crm-workspace-page {
    padding: 0 8px 24px;
  }

  .crm-workspace-hero {
    grid-template-columns: 62px minmax(0, 1fr);
    min-height: 105px;
    padding: 12px 14px;
  }

  .crm-workspace-hero-icon {
    width: 56px;
    height: 56px;
    font-size: 34px !important;
  }

  .crm-workspace-hero-message {
    display: none;
  }

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

  .crm-workspace-toolbar {
    flex-direction: column;
    align-items: stretch;
    padding: 0 8px 8px;
  }

  .crm-workspace-tabs {
    min-height: 46px;
  }

  .crm-workspace-tools {
    justify-content: flex-end;
  }

  .crm-workspace-tools .crm-workspace-search-trigger {
    margin-right: auto;
  }

  .crm-workspace-rail {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .home-profile-button-wide {
    min-width: 38px;
    grid-template-columns: 34px;
  }

  .home-profile-name,
  .home-profile-chevron {
    display: none !important;
  }

  .crm-workspace-kpis {
    grid-template-columns: 1fr;
  }

  .crm-workspace-grid {
    grid-template-columns: 1fr;
  }

  .crm-workspace-tabs {
    width: 100%;
  }
}



/* Shared modern workspace for non-CRM submenus */
.module-workspace-popup {
  display: block;
  overflow: hidden;
  background: #f5f7fa;
  box-shadow: none;
}

.module-workspace-page {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  padding: 0 14px 28px;
  color: #14213a;
  background: linear-gradient(180deg, #fbfcfd 0, #f5f7fa 150px, #f5f7fa 100%);
}

.module-workspace-breadcrumb {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #6e7d93;
  font-size: 12px;
}

.module-workspace-breadcrumb > div {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.module-workspace-breadcrumb .material-icons-round {
  font-size: 16px;
}

.module-workspace-breadcrumb strong {
  color: #18253a;
}

.module-workspace-breadcrumb > button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #718096;
  cursor: pointer;
}

.module-workspace-breadcrumb > button:hover {
  background: #fff0f0;
  color: #d14343;
}

.module-workspace-hero {
  min-height: 94px;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) minmax(180px, 260px);
  align-items: center;
  gap: 16px;
  border: 1px solid #e1e7ee;
  border-radius: 13px;
  padding: 14px 18px;
  background:
    radial-gradient(circle at 88% 12%, rgba(95, 220, 146, .18), transparent 22%),
    #ffffff;
  box-shadow: 0 6px 20px rgba(36, 55, 80, .045);
}

.module-workspace-hero-icon {
  width: 54px;
  height: 54px;
  display: grid !important;
  place-items: center;
  border-radius: 14px;
  background: #e8f7ef;
  color: var(--home-primary);
  font-size: 30px !important;
}

.module-workspace-hero-copy {
  min-width: 0;
}

.module-workspace-hero-copy h1 {
  margin: 0 0 5px;
  color: #12223f;
  font-size: 24px;
  line-height: 1.1;
}

.module-workspace-hero-copy p {
  max-width: 760px;
  margin: 0;
  color: #667890;
  font-size: 12px;
  line-height: 1.5;
}

.module-workspace-search {
  height: 36px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  border: 1px solid #dce4ed;
  border-radius: 8px;
  padding: 0 11px;
  background: #f9fbfc;
  color: #75859a;
  text-align: left;
  cursor: pointer;
}

.module-workspace-search:hover {
  border-color: #a6cdb4;
  background: #ffffff;
  color: var(--home-primary);
}

.module-workspace-search span:last-child {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 11px;
}

.module-workspace-sections {
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid #e1e7ee;
  border-radius: 13px;
  background: #ffffff;
  box-shadow: 0 6px 22px rgba(36, 55, 80, .045);
}

.module-workspace-section {
  padding: 10px 12px 13px;
}

.module-workspace-section + .module-workspace-section {
  border-top: 1px solid #edf1f5;
}

.module-workspace-section-heading {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 5px;
}

.module-workspace-section-heading > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.module-workspace-section-accent {
  width: 4px;
  height: 22px;
  border-radius: 999px;
  background: var(--home-primary);
}

.module-workspace-section:nth-child(2) .module-workspace-section-accent {
  background: #3183f4;
}

.module-workspace-section:nth-child(3) .module-workspace-section-accent {
  background: #8b5cf6;
}

.module-workspace-section-heading h2 {
  margin: 0;
  color: #17243a;
  font-size: 14px;
}

.module-workspace-section-heading > span {
  color: #7890aa;
  font-size: 10px;
}

.module-workspace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.module-workspace-grid .crm-workspace-card {
  min-height: 78px;
}

@media (max-width: 820px) {
  .module-workspace-page {
    padding: 0 8px 24px;
  }

  .module-workspace-hero {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .module-workspace-search {
    grid-column: 1 / -1;
  }

  .module-workspace-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .module-workspace-grid {
    grid-template-columns: 1fr;
  }
}


/* Approved final shell alignment: centered global search + aligned submenu titles */
.home-topbar {
  position: relative;
}

.home-command-center {
  position: static;
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  padding-left: 22px;
  padding-right: 0;
}

.home-command-center .home-company-wrap {
  width: min(300px, 100%);
  flex: 0 0 min(300px, 100%);
}

.home-global-search-trigger {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(480px, calc(100vw - 780px));
  max-width: 480px;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.crm-workspace-hero {
  min-height: 94px;
  grid-template-columns: 62px minmax(0, 1fr) minmax(180px, 260px);
  gap: 16px;
  padding: 14px 18px;
}

.crm-workspace-hero-icon,
.module-workspace-hero-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  font-size: 30px !important;
}

.crm-workspace-hero-copy h1,
.module-workspace-hero-copy h1 {
  margin: 0 0 5px;
  color: #12223f;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -.02em;
}

.crm-workspace-hero-copy p,
.module-workspace-hero-copy p {
  margin: 0;
  color: #667890;
  font-size: 12px;
  line-height: 1.5;
}

.module-workspace-hero {
  min-height: 94px;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 18px;
}

@media (max-width: 1100px) {
  .home-global-search-trigger {
    display: none;
  }
}

@media (max-width: 820px) {
  .crm-workspace-hero,
  .module-workspace-hero {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 12px;
  }

  .crm-workspace-hero-message {
    display: none;
  }
}


/* Approved CRM desktop rail preservation */
@media (min-width: 760px) {
  .crm-workspace-layout {
    grid-template-columns: minmax(0, 1fr) 260px !important;
    align-items: start;
  }

  .crm-workspace-rail {
    display: grid;
    grid-template-columns: 1fr !important;
    align-content: start;
  }

  .crm-workspace-promo {
    grid-column: auto !important;
    min-height: 145px !important;
  }
}

.crm-workspace-toolbar {
  align-items: center;
}

.crm-workspace-tools {
  margin-left: auto;
  flex: 0 0 auto;
}

.crm-workspace-tools > button {
  flex: 0 0 32px;
  width: 32px;
  min-width: 32px;
}


/* Approved CX360 top toolbar matching the final mockup */
.home-topbar {
  position: relative;
  grid-template-columns: 250px 300px minmax(360px, 1fr) 280px;
  height: 58px;
}

.home-brand-area {
  padding: 0 22px;
  border-right: 1px solid #edf0f3;
}

.home-brand-logo-full {
  width: 155px;
  max-width: 155px;
  max-height: 48px;
}

.home-company-area,
.home-global-search-area {
  height: 100%;
  display: flex;
  align-items: center;
  min-width: 0;
}

.home-company-area {
  position: relative;
  padding: 0 20px;
}

.home-company-area .home-company-wrap {
  width: 100%;
  min-width: 0;
}

.home-company-area .home-company-button {
  width: 100%;
  min-height: 36px;
  height: 36px;
  border-radius: 6px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 800;
}

.home-company-area .home-company-menu {
  top: calc(100% + 8px);
  left: 0;
  right: auto;
}

.home-global-search-area {
  padding: 0 24px 0 clamp(36px, 5vw, 82px);
}

.home-global-search-trigger {
  position: static;
  top: auto;
  left: auto;
  width: 100%;
  max-width: 474px;
  height: 36px;
  display: flex;
  transform: none;
  border-color: #d9e1ea;
  border-radius: 6px;
  background: #f8fafc;
  z-index: auto;
}

.home-global-search-trigger .material-icons-round {
  color: #5f7da1;
  font-size: 19px;
}

.home-global-search-trigger span:last-child {
  font-size: 12px;
  color: #718096;
}

.home-topbar-actions {
  width: 100%;
  box-sizing: border-box;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 18px 0 10px;
  border-left: 1px solid #f0f2f5;
}

.home-topbar-actions .home-icon-button {
  position: relative;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
}

.home-topbar-actions .home-icon-button:hover {
  background: #f3f7f5;
}

.home-notification-badge {
  position: absolute;
  top: 1px;
  right: 0;
  min-width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  border: 2px solid #ffffff;
  border-radius: 999px;
  padding: 0 3px;
  background: #f04b37;
  color: #ffffff;
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
}

.home-profile {
  margin-left: 2px;
}

.home-profile-button-wide {
  min-width: 134px;
  height: 42px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 8px;
  border-radius: 21px;
  padding: 4px 8px 4px 4px;
}

.home-profile-button-wide:hover {
  background: #f3f7f5;
}

.home-profile-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #4fc47a;
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}

.home-profile-avatar-small {
  width: 36px;
  height: 36px;
}

.home-profile-button-wide .home-profile-name {
  max-width: 96px;
  overflow: hidden;
  color: #1f2f49;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.home-profile-button-wide .home-profile-chevron {
  color: #41618b;
  font-size: 18px;
}

.home-profile-menu {
  top: calc(100% + 8px);
  width: 260px;
}

.home-profile-summary {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.home-profile-summary-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.home-profile-summary-copy strong,
.home-profile-summary-copy span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.home-sidebar {
  width: 250px;
}

.home-sidebar-is-collapsed .home-topbar {
  grid-template-columns: 68px 300px minmax(360px, 1fr) 280px;
}

@media (max-width: 1320px) {
  .home-topbar {
    grid-template-columns: 250px 270px minmax(280px, 1fr) 235px;
  }

  .home-company-area {
    padding: 0 14px;
  }

  .home-global-search-area {
    padding-left: 28px;
    padding-right: 18px;
  }

  .home-profile-button-wide {
    min-width: 112px;
  }

  .home-profile-button-wide .home-profile-name {
    max-width: 72px;
  }

  .home-sidebar-is-collapsed .home-topbar {
    grid-template-columns: 68px 270px minmax(280px, 1fr) 235px;
  }
}

@media (max-width: 1080px) {
  .home-topbar {
    grid-template-columns: 250px minmax(240px, 1fr) 220px;
  }

  .home-company-area {
    padding: 0 18px;
  }

  .home-global-search-area {
    display: none;
  }

  .home-sidebar-is-collapsed .home-topbar {
    grid-template-columns: 68px minmax(240px, 1fr) 220px;
  }
}

@media (max-width: 980px) {
  .home-topbar,
  .home-sidebar-is-collapsed .home-topbar {
    grid-template-columns: 1fr auto;
  }

  .home-company-area,
  .home-global-search-area {
    display: none;
  }

  .home-brand-area {
    padding: 0 16px;
    border-right: 0;
  }

  .home-brand-logo-full {
    width: 155px;
    max-width: 155px;
  }
}

@media (max-width: 620px) {
  .home-profile-button-wide {
    min-width: 42px;
    grid-template-columns: 34px;
    padding-right: 4px;
  }

  .home-profile-name,
  .home-profile-chevron,
  .home-notification-button {
    display: none !important;
  }
}
