@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-greek.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

body.crm-template,
body.crm-auth-template {
  --crm-font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --crm-primary: #2563eb;
  --crm-primary-rgb: 37, 99, 235;
  --crm-success: #16a34a;
  --crm-warning: #d97706;
  --crm-danger: #dc2626;
  --crm-soft: rgba(var(--crm-primary-rgb), 0.08);
  --crm-line: #e5eaf2;
  --crm-card-bg: #fff;
  --crm-muted: #64748b;
  --crm-shadow: 0 8px 24px rgba(15, 23, 42, .06);
  --crm-radius-sm: 8px;
  --crm-radius: 12px;
  --crm-sidebar-width: 270px;
  --crm-sidebar-rail-width: 70px;
  --crm-footer-height: 72px;
  --crm-sidebar-footer-height: 132px;
  --crm-sidebar-footer-rail-height: var(--crm-footer-height);
  --crm-sidebar-motion: 200ms ease;
  --crm-sidebar-accordion-motion: 260ms cubic-bezier(.22, .8, .24, 1);
  --crm-page-gap: 24px;
  --crm-workspace-height: calc(100vh - 245px);
  --crm-workspace-height-with-metrics: calc(100vh - 420px);
  --crm-widget-height: 352px;
  --crm-surface: #fff;
  --crm-surface-elevated: #f8fafc;
  --crm-surface-soft: #f8fafc;
  --crm-border-soft: #e5eaf2;
  --crm-heading: #172033;
  --crm-text: #334155;
  --crm-text-muted: #64748b;
  --crm-shadow-soft: 0 12px 30px rgba(15, 23, 42, .06);
  --crm-panel-height: clamp(700px, calc(100vh - 292px), 800px);
  --bs-font-sans-serif: var(--crm-font-sans);
  --bs-body-font-family: var(--crm-font-sans);
  --bs-primary: var(--crm-primary);
  --bs-primary-rgb: var(--crm-primary-rgb);
  --bs-body-color: var(--crm-text);
  --bs-body-color-rgb: 51, 65, 85;
  --bs-body-bg: #f6f8fc;
  --bs-body-bg-rgb: 246, 248, 252;
  --bs-heading-color: var(--crm-heading);
  --bs-secondary-color: var(--crm-text-muted);
  --bs-secondary-color-rgb: 100, 116, 139;
  --bs-secondary-bg: var(--crm-surface);
  --bs-secondary-bg-rgb: 255, 255, 255;
  --bs-tertiary-bg: var(--crm-surface-soft);
  --bs-border-color: var(--crm-border-soft);
  --bs-border-color-translucent: var(--crm-border-soft);
  --bs-link-color: var(--crm-primary);
  --bs-link-color-rgb: var(--crm-primary-rgb);
  --bs-border-radius: var(--crm-radius);
  --bs-border-radius-sm: var(--crm-radius-sm);
  font-family: var(--crm-font-sans);
}

body.crm-template {
  overflow-x: hidden;
}

body.crm-template[data-sidebar-size=sm] {
  min-height: 100vh;
}

body.crm-template[data-density=compact] {
  --crm-page-gap: 16px;
  --crm-widget-height: 320px;
  --crm-panel-height: clamp(660px, calc(100vh - 260px), 760px);
}

body.crm-template[data-theme="dark"],
body.crm-auth-template[data-theme="dark"] {
  --crm-soft: rgba(var(--crm-primary-rgb), .16);
  --crm-line: #26344b;
  --crm-card-bg: #111a2a;
  --crm-muted: #94a3b8;
  --crm-shadow: 0 18px 48px rgba(0, 0, 0, .28);
  --crm-surface: #111a2a;
  --crm-surface-elevated: #172236;
  --crm-surface-soft: rgba(148, 163, 184, .08);
  --crm-border-soft: #26344b;
  --crm-heading: #e8eef8;
  --crm-text: #cbd5e1;
  --crm-text-muted: #94a3b8;
  --crm-shadow-soft: 0 18px 42px rgba(0, 0, 0, .24);
  --bs-body-color: var(--crm-text);
  --bs-body-color-rgb: 203, 213, 225;
  --bs-body-bg: #0b1220;
  --bs-body-bg-rgb: 11, 18, 32;
  --bs-heading-color: var(--crm-heading);
  --bs-secondary-color: var(--crm-text-muted);
  --bs-secondary-color-rgb: 148, 163, 184;
  --bs-secondary-bg: var(--crm-surface);
  --bs-secondary-bg-rgb: 17, 26, 42;
  --bs-tertiary-bg: var(--crm-surface-elevated);
  --bs-border-color: var(--crm-border-soft);
  --bs-border-color-translucent: var(--crm-border-soft);
}

body.crm-template .btn-primary,
body.crm-auth-template .btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: #2563eb;
  --bs-btn-border-color: #2563eb;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #1d4ed8;
  --bs-btn-hover-border-color: #1d4ed8;
  --bs-btn-focus-shadow-rgb: 37, 99, 235;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #1e40af;
  --bs-btn-active-border-color: #1e40af;
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: #2563eb;
  --bs-btn-disabled-border-color: #2563eb;
}

body.crm-template .form-control,
body.crm-template .form-select,
body.crm-auth-template .form-control,
body.crm-auth-template .form-select {
  border-color: var(--crm-border-soft);
  background-color: var(--crm-surface);
  color: var(--crm-text);
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

body.crm-template .form-control:focus,
body.crm-template .form-select:focus,
body.crm-auth-template .form-control:focus,
body.crm-auth-template .form-select:focus {
  border-color: rgba(var(--crm-primary-rgb), .48);
  background-color: var(--crm-surface);
  color: var(--crm-heading);
  box-shadow: 0 0 0 3px rgba(var(--crm-primary-rgb), .1);
}

body.crm-template .card,
body.crm-auth-template .card {
  --bs-card-bg: var(--crm-surface);
  --bs-card-border-color: var(--crm-border-soft);
}

body.crm-template[data-density=compact] .panel,
body.crm-template[data-density=compact] .metric-card,
body.crm-template[data-density=compact] .dashboard-hero,
body.crm-template[data-density=compact] .reports-toolbar,
body.crm-template[data-density=compact] .settings-savebar {
  padding: 1.15rem;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--bs-border-color);
  border-radius: 999px;
  background: rgba(var(--bs-secondary-rgb), .08);
}

.language-switcher__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--bs-secondary-color);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.language-switcher__item small {
  color: inherit;
  font-size: 11px;
  font-weight: 700;
}

.language-switcher__item.is-active {
  color: #fff;
  background: var(--crm-primary);
  box-shadow: 0 8px 18px rgba(var(--crm-primary-rgb), .18);
}

.language-switcher__item:not(.is-active):hover {
  color: var(--bs-heading-color);
  background: rgba(var(--bs-secondary-rgb), .12);
}

.language-switcher--crm {
  align-self: center;
  margin-right: 8px;
}

.language-switcher--auth {
  width: max-content;
  max-width: 100%;
}

.language-switcher--compact .language-switcher__item small {
  display: none;
}

body.crm-template .page-content .container-fluid,
body.crm-template .footer .container-fluid {
  width: 100%;
  max-width: none;
}

body.crm-template .main-content {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body.crm-template .main-content .page-content {
  flex: 1 0 auto;
}

body.crm-template .footer {
  position: static;
  flex: 0 0 var(--crm-footer-height);
  width: 100%;
}

@media (min-width: 992px) {
  body.crm-template {
    --crm-panel-height: max(520px, calc(100vh - 292px));
    --crm-panel-height: max(520px, calc(100dvh - 292px));
  }

  body.crm-template[data-density=compact] {
    --crm-panel-height: max(500px, calc(100vh - 260px));
    --crm-panel-height: max(500px, calc(100dvh - 260px));
  }

  body.crm-template .main-content .page-content {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  body.crm-template .main-content .page-content > .container-fluid {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
  }

  body.crm-template .main-content .page-content > .container-fluid > :last-child {
    margin-bottom: 0;
  }

  body.crm-template .footer {
    height: var(--crm-footer-height);
    padding-top: 0;
    padding-bottom: 0;
  }

  body.crm-template .footer .container-fluid,
  body.crm-template .footer .crm-footer-grid {
    height: 100%;
  }
}

html.crm-transition-enabled body.crm-template .main-content .page-content > .container-fluid,
html.crm-transition-enabled body.crm-auth-template .authentication-bg .auth-logo,
html.crm-transition-enabled body.crm-auth-template .authentication-bg .card {
  opacity: 0;
  transform: translate3d(0, 14px, 0) scale(.992);
  filter: blur(2px);
  will-change: opacity, transform, filter;
}

html.crm-transition-enabled body.crm-template .main-content .page-content > .container-fluid {
  view-transition-name: crm-page;
}

html.crm-transition-enabled body.crm-template.crm-page-ready .main-content .page-content > .container-fluid,
html.crm-transition-enabled body.crm-auth-template.crm-page-ready .authentication-bg .auth-logo,
html.crm-transition-enabled body.crm-auth-template.crm-page-ready .authentication-bg .card {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  filter: blur(0);
  transition:
    opacity 380ms cubic-bezier(.22, .61, .36, 1),
    transform 520ms cubic-bezier(.16, 1, .3, 1),
    filter 420ms cubic-bezier(.22, .61, .36, 1);
}

html.crm-transition-enabled body.crm-template.crm-page-leaving .main-content .page-content > .container-fluid,
html.crm-transition-enabled body.crm-auth-template.crm-page-leaving .authentication-bg .auth-logo,
html.crm-transition-enabled body.crm-auth-template.crm-page-leaving .authentication-bg .card {
  opacity: .82;
  transform: translate3d(0, -5px, 0) scale(.998);
  filter: blur(1px);
  transition:
    opacity 260ms cubic-bezier(.4, 0, .2, 1),
    transform 260ms cubic-bezier(.4, 0, .2, 1),
    filter 260ms cubic-bezier(.4, 0, .2, 1);
}

body.crm-template.crm-finance-tabs-navigating .main-content .page-content > .container-fluid > :not(.finance-subnav) {
  opacity: .72;
  transform: translate3d(0, 6px, 0) scale(.996);
  filter: blur(.5px);
  transition:
    opacity 180ms ease,
    transform 220ms cubic-bezier(.4, 0, .2, 1),
    filter 180ms ease;
}

body.crm-template.crm-finance-tabs-navigating .main-content .page-content > .container-fluid > .finance-subnav {
  position: relative;
  z-index: 2;
  opacity: 1;
  transform: none;
  filter: none;
}

html.crm-transition-enabled.crm-transition-fallback body.crm-template .main-content .page-content > .container-fluid,
html.crm-transition-enabled.crm-transition-fallback body.crm-auth-template .authentication-bg .auth-logo,
html.crm-transition-enabled.crm-transition-fallback body.crm-auth-template .authentication-bg .card,
html.crm-transition-enabled body.crm-template.modal-open .main-content .page-content > .container-fluid {
  opacity: 1;
  transform: none;
  filter: none;
  will-change: auto;
  transition: none;
}

html.crm-transition-enabled body.crm-template.modal-open .main-content .page-content > .container-fluid {
  view-transition-name: none;
}

html.crm-pjax-cinematic::view-transition-old(root),
html.crm-pjax-cinematic::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

html.crm-pjax-cinematic::view-transition-group(crm-page) {
  animation-duration: 620ms;
  animation-timing-function: cubic-bezier(.16, 1, .3, 1);
}

html.crm-pjax-cinematic::view-transition-old(crm-page),
html.crm-pjax-cinematic::view-transition-new(crm-page) {
  height: 100%;
  overflow: clip;
  mix-blend-mode: normal;
  transform-origin: 50% 18%;
}

html.crm-pjax-cinematic::view-transition-old(crm-page) {
  animation: crm-cinematic-page-out 320ms cubic-bezier(.4, 0, .2, 1) both;
}

html.crm-pjax-cinematic::view-transition-new(crm-page) {
  animation: crm-cinematic-page-in 620ms cubic-bezier(.16, 1, .3, 1) both;
}

body.crm-theme-switching,
body.crm-theme-switching *,
body.crm-theme-switching *::before,
body.crm-theme-switching *::after {
  transition: none !important;
}

html.crm-theme-love-transition {
  --crm-theme-expo-in: linear(
    0 0%,
    .0085 31.26%,
    .0167 40.94%,
    .0289 48.86%,
    .0471 55.92%,
    .0717 61.99%,
    .1038 67.32%,
    .1443 72.07%,
    .1989 76.7%,
    .2659 80.89%,
    .3465 84.71%,
    .4419 88.22%,
    .554 91.48%,
    .6835 94.51%,
    .8316 97.34%,
    1 100%
  );
}

html.crm-theme-love-transition body.crm-template .main-content .page-content > .container-fluid,
html.crm-theme-love-transition .crm-mobile-bottom-nav {
  view-transition-name: none !important;
}

html.crm-theme-love-transition::view-transition-group(root) {
  animation-timing-function: var(--crm-theme-expo-in);
}

html.crm-theme-love-transition::view-transition-new(root) {
  -webkit-mask: url('/assets/images/theme-transition-love.webp') center / 0 no-repeat;
  mask: url('/assets/images/theme-transition-love.webp') center / 0 no-repeat;
  animation: crm-theme-love-scale 1.5s;
  animation-fill-mode: both;
}

html.crm-theme-love-transition::view-transition-old(root) {
  animation: crm-theme-love-scale 1.5s;
  animation-fill-mode: both;
}

@keyframes crm-theme-love-scale {
  0% {
    -webkit-mask-size: 0;
    mask-size: 0;
  }

  10% {
    -webkit-mask-size: 50vmax;
    mask-size: 50vmax;
  }

  90% {
    -webkit-mask-size: 50vmax;
    mask-size: 50vmax;
  }

  100% {
    -webkit-mask-size: 2000vmax;
    mask-size: 2000vmax;
  }
}

@keyframes crm-cinematic-page-out {
  from {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }

  to {
    opacity: 0;
    transform: translate3d(0, -18px, 0) scale(.986);
    filter: blur(10px);
  }
}

@keyframes crm-cinematic-page-in {
  0% {
    opacity: 0;
    clip-path: inset(7% 0 0 0 round 8px);
    transform: translate3d(0, 28px, 0) scale(.986);
    filter: blur(12px);
  }

  58% {
    opacity: 1;
    filter: blur(2px);
  }

  100% {
    opacity: 1;
    clip-path: inset(0 0 0 0 round 0);
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
}

.animate-jello {
  --crm-jello-translate: translateX(0);
  animation: crm-jello .9s both;
  transform-origin: center;
}

@keyframes crm-jello {
  0% {
    transform: var(--crm-jello-translate, translateX(0)) scale3d(1, 1, 1);
  }

  30% {
    transform: var(--crm-jello-translate, translateX(0)) scale3d(1.25, .75, 1);
  }

  40% {
    transform: var(--crm-jello-translate, translateX(0)) scale3d(.75, 1.25, 1);
  }

  50% {
    transform: var(--crm-jello-translate, translateX(0)) scale3d(1.15, .85, 1);
  }

  65% {
    transform: var(--crm-jello-translate, translateX(0)) scale3d(.95, 1.05, 1);
  }

  75% {
    transform: var(--crm-jello-translate, translateX(0)) scale3d(1.05, .95, 1);
  }

  100% {
    transform: var(--crm-jello-translate, translateX(0)) scale3d(1, 1, 1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .animate-jello {
    animation: none;
  }
}

.page-title-box .page-title-subtitle {
  color: var(--bs-secondary-color);
  font-size: 12px;
  line-height: 1.2;
}

.crm-topbar-avatar {
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  background: var(--crm-primary);
  font-size: 13px;
  font-weight: 600;
}

.crm-topbar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.btn [data-eva],
.btn svg,
.dropdown-item [data-eva],
.dropdown-item svg,
.notification-item [data-eva],
.notification-item svg,
.nav-tabs-custom [data-eva],
.nav-tabs-custom svg {
  width: 16px;
  height: 16px;
  vertical-align: text-bottom;
}

.btn .ui-icon-added,
.btn svg.ui-icon-added,
.btn > [data-eva]:first-child:not(:last-child),
.btn > svg:first-child:not(:last-child) {
  margin-right: 6px;
}

.btn svg,
.dropdown-item svg,
.notification-item svg,
.vertical-menu svg.icon,
.noti-icon svg,
.nav-tabs-custom svg {
  fill: currentColor;
}

body.crm-template svg.eva,
body.crm-auth-template svg.eva {
  fill: currentColor;
}

#page-topbar .navbar-header .noti-icon svg {
  width: 20px;
  height: 20px;
}

body.crm-template .vertical-menu {
  display: flex;
  flex-direction: column;
  width: var(--crm-sidebar-width);
  overflow: visible;
  border-right: 1px solid var(--bs-border-color);
  background: var(--bs-body-bg);
  box-shadow: 10px 0 26px rgba(15, 23, 42, .045);
  transition:
    width var(--crm-sidebar-motion),
    box-shadow var(--crm-sidebar-motion),
    background-color .2s ease;
}

body.crm-template .main-content,
body.crm-template #page-topbar,
body.crm-template .footer {
  transition:
    margin-left var(--crm-sidebar-motion),
    left var(--crm-sidebar-motion),
    max-width var(--crm-sidebar-motion);
}

body.crm-template .vertical-menu .navbar-brand-box {
  position: static;
  flex: 0 0 75px;
  display: flex;
  align-items: center;
  width: auto !important;
  min-height: 75px;
  padding: 0 22px;
  border-bottom: 1px solid rgba(148, 163, 184, .14);
  background: transparent;
  transition:
    width var(--crm-sidebar-motion),
    padding var(--crm-sidebar-motion);
}

body.crm-template .vertical-menu .logo {
  align-items: center;
  line-height: 1;
}

body.crm-template .vertical-menu .logo.logo-dark {
  display: inline-flex;
}

body.crm-template .vertical-menu .logo.logo-light {
  display: none;
}

body.crm-template[data-bs-theme=dark] .vertical-menu .logo.logo-dark,
body.crm-template[data-sidebar=dark] .vertical-menu .logo.logo-dark {
  display: none;
}

body.crm-template[data-bs-theme=dark] .vertical-menu .logo.logo-light,
body.crm-template[data-sidebar=dark] .vertical-menu .logo.logo-light {
  display: inline-flex;
}

body.crm-template .vertical-menu .logo span {
  transition:
    opacity 220ms ease,
    transform var(--crm-sidebar-motion);
}

body.crm-template .vertical-menu .logo img {
  display: block;
  width: auto;
  max-width: 170px;
  object-fit: contain;
}

body.crm-template .vertical-menu .logo-sm {
  display: none;
}

body.crm-template .sidebar-menu-scroll {
  flex: 1 1 auto;
  height: calc(100vh - 75px - var(--crm-sidebar-footer-height)) !important;
  max-height: calc(100vh - 75px - var(--crm-sidebar-footer-height));
  min-height: 0;
  margin-top: 0;
  overflow: hidden;
  padding: 14px 0 10px;
}

body.crm-template #sidebar-menu {
  padding: 0 0 12px;
}

body.crm-template #side-menu {
  display: grid;
  gap: 6px;
}

body.crm-template #sidebar-menu .metismenu .menu-title {
  margin: 0 0 4px;
  padding: 8px 28px !important;
  letter-spacing: 0;
}

body.crm-template #sidebar-menu .crm-sidebar-group-title {
  overflow: hidden;
  color: var(--crm-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .055em;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

body.crm-template #sidebar-menu .metismenu .menu-item {
  min-width: 0;
  margin-left: 12px;
}

body.crm-template #sidebar-menu ul li a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 46px;
  margin: 0 12px;
  padding: 0 13px;
  gap: 0;
  border-radius: 12px;
  color: var(--crm-muted);
  font-weight: 650;
  letter-spacing: 0;
  transition:
    color .18s ease,
    background-color .18s ease,
    box-shadow .18s ease,
    transform .18s ease,
    opacity .18s ease;
}

body.crm-template #sidebar-menu ul li a:hover,
body.crm-template #sidebar-menu ul li a:focus-visible {
  margin-left: 12px;
  color: var(--crm-primary);
  background: rgba(var(--crm-primary-rgb), .075);
  transform: translateX(1px);
}

body.crm-template #sidebar-menu ul li a .nav-icon {
  position: static;
  width: 20px;
  height: 20px;
  min-width: 20px;
  color: currentColor;
  fill: currentColor;
  transition:
    color .18s ease,
    fill .18s ease,
    transform .18s ease;
}

.crm-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  margin-left: auto;
  padding: 0 7px;
  color: #fff;
  border-radius: 999px;
  background: #ef4444;
  box-shadow: 0 8px 18px rgba(239, 68, 68, .22);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

body.crm-template #sidebar-menu > ul > li > a.has-arrow {
  padding-right: 46px;
}

body.crm-template #sidebar-menu .has-arrow::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 20px;
  height: 20px;
  margin-top: -12px;
  border: 1px solid rgba(var(--crm-primary-rgb), .14);
  border-radius: 8px;
  background-color: rgba(var(--crm-primary-rgb), .055);
  background-image:
    linear-gradient(currentColor, currentColor),
    linear-gradient(currentColor, currentColor);
  background-position: 50% calc(50% - 1px), 50% calc(50% - 1px);
  background-repeat: no-repeat;
  background-size: 10px 2px, 2px 10px;
  opacity: .72;
  transform: rotate(0deg) scale(.96);
  transform-origin: 50% 50%;
  transition:
    opacity .18s ease,
    background-color .18s ease,
    background-size .22s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    transform var(--crm-sidebar-accordion-motion);
}

body.crm-template #sidebar-menu .mm-active > .has-arrow::after,
body.crm-template #sidebar-menu .has-arrow[aria-expanded=true]::after {
  border-color: rgba(var(--crm-primary-rgb), .22);
  background-color: rgba(var(--crm-primary-rgb), .12);
  background-size: 10px 2px, 2px 0;
  box-shadow: 0 7px 16px rgba(var(--crm-primary-rgb), .12);
  opacity: 1;
  transform: rotate(180deg) scale(1);
}

body.crm-template #sidebar-menu > ul > li.mm-active > a.has-arrow,
body.crm-template #sidebar-menu > ul > li > a.active {
  color: var(--crm-primary);
  background:
    linear-gradient(90deg, rgba(var(--crm-primary-rgb), .14), rgba(var(--crm-primary-rgb), .075));
  box-shadow: inset 0 0 0 1px rgba(var(--crm-primary-rgb), .08);
}

body.crm-template #sidebar-menu > ul > li.mm-active > a.has-arrow .nav-icon,
body.crm-template #sidebar-menu > ul > li > a.active .nav-icon {
  fill: currentColor !important;
}

body.crm-template #sidebar-menu ul li ul.sub-menu {
  position: relative;
  box-sizing: border-box;
  height: 0;
  margin: 0 14px 0 50px;
  padding: 0 6px;
  overflow: hidden;
  border: 0;
  border-left: 1px solid rgba(var(--crm-primary-rgb), .16);
  border-radius: 0;
  background: transparent !important;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition:
    height var(--crm-sidebar-accordion-motion),
    margin var(--crm-sidebar-accordion-motion),
    padding var(--crm-sidebar-accordion-motion),
    opacity .18s ease,
    transform var(--crm-sidebar-accordion-motion);
  will-change: height, opacity, transform;
}

body.crm-template #sidebar-menu ul li ul.sub-menu.mm-show,
body.crm-template #sidebar-menu ul li ul.sub-menu.crm-submenu-animating,
body.crm-template #sidebar-menu ul li ul.sub-menu.crm-submenu-closing {
  height: auto;
  margin-top: 6px;
  margin-bottom: 7px;
  padding-top: 6px;
  padding-bottom: 6px;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

body.crm-template #sidebar-menu ul li ul.sub-menu.crm-submenu-closing {
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
}

body.crm-template #sidebar-menu ul li ul.sub-menu li a {
  position: relative;
  min-height: 36px;
  margin: 0;
  padding: 0 10px 0 24px;
  color: var(--crm-muted);
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
  font-weight: 650;
  transform: none;
  transition:
    color .18s ease,
    background-color .18s ease,
    transform .18s ease,
    opacity .18s ease;
}

body.crm-template #sidebar-menu ul li ul.sub-menu::before {
  display: none;
}

body.crm-template #sidebar-menu ul li ul.sub-menu li a::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  display: block;
  width: 5px;
  height: 5px;
  border: 0;
  border-radius: 50%;
  background: rgba(var(--crm-primary-rgb), .28);
  transform: translateY(-50%);
  transition:
    background-color .18s ease,
    box-shadow .18s ease,
    transform .18s ease;
}

body.crm-template #sidebar-menu ul li ul.sub-menu li a:hover,
body.crm-template #sidebar-menu ul li ul.sub-menu li a:focus-visible {
  margin-left: 0;
  color: var(--crm-primary);
  background: transparent;
  transform: translateX(1px);
}

body.crm-template #sidebar-menu ul li.mm-active .mm-show .mm-active > a,
body.crm-template #sidebar-menu ul li ul.sub-menu li a.active {
  color: var(--crm-primary);
  background: transparent;
  box-shadow: none;
  font-weight: 760;
}

body.crm-template #sidebar-menu ul li ul.sub-menu li a:hover::before,
body.crm-template #sidebar-menu ul li ul.sub-menu li a:focus-visible::before,
body.crm-template #sidebar-menu ul li ul.sub-menu li a.active::before {
  background: var(--crm-primary);
  box-shadow: 0 0 0 4px rgba(var(--crm-primary-rgb), .12);
  transform: translateY(-50%) scale(1.08);
}

.crm-sidebar-footer {
  flex: 0 0 auto;
  padding: 14px;
  border-top: 1px solid rgba(148, 163, 184, .16);
  background: linear-gradient(180deg, rgba(var(--bs-body-bg-rgb), .82), var(--bs-body-bg));
  transition:
    padding var(--crm-sidebar-motion),
    opacity .18s ease;
}

.crm-sidebar-user {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
  margin-bottom: 10px;
  color: inherit;
  text-decoration: none;
}

.crm-sidebar-user:hover,
.crm-sidebar-user:focus-visible {
  color: inherit;
}

.crm-sidebar-user__avatar {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  font-size: 13px;
  border-radius: 50%;
}

.crm-sidebar-user__meta {
  display: grid;
  min-width: 0;
  line-height: 1.15;
}

.crm-sidebar-user__meta strong,
.crm-sidebar-user__meta small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-sidebar-user__meta strong {
  color: var(--bs-heading-color);
  font-size: 13px;
  font-weight: 700;
}

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

.crm-sidebar-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  color: var(--bs-danger);
  background: rgba(var(--bs-danger-rgb), .075);
  border: 1px solid rgba(var(--bs-danger-rgb), .14);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  transition:
    color .18s ease,
    background-color .18s ease,
    border-color .18s ease,
    transform .18s ease;
}

.crm-sidebar-logout svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.crm-sidebar-logout:hover,
.crm-sidebar-logout:focus {
  color: #fff;
  background: var(--bs-danger);
  border-color: var(--bs-danger);
  transform: translateY(-1px);
}

body.crm-template[data-sidebar-size=sm] .main-content {
  margin-left: var(--crm-sidebar-rail-width);
  min-height: 100vh;
}

body.crm-template[data-sidebar-size=sm] #page-topbar,
body.crm-template[data-sidebar-size=sm] .footer {
  left: var(--crm-sidebar-rail-width);
}

body.crm-template[data-sidebar-size=sm] .vertical-menu {
  position: fixed;
  width: var(--crm-sidebar-rail-width) !important;
}

body.crm-template[data-sidebar-size=sm] .vertical-menu .navbar-brand-box {
  width: var(--crm-sidebar-rail-width) !important;
  justify-content: center;
  padding: 0;
}

body.crm-template[data-sidebar-size=sm] .vertical-menu .logo-lg {
  display: none;
  opacity: 0;
  transform: translateX(-8px);
}

body.crm-template[data-sidebar-size=sm] .vertical-menu .logo-sm {
  display: inline-flex;
  opacity: 1;
  transform: translateX(0);
}

body.crm-template[data-sidebar-size=sm] .vertical-menu .sidebar-menu-scroll {
  overflow: visible;
  padding: 12px 0 8px;
}

body.crm-template[data-sidebar-size=sm] .vertical-menu .simplebar-mask,
body.crm-template[data-sidebar-size=sm] .vertical-menu .simplebar-content-wrapper {
  overflow: visible !important;
}

body.crm-template[data-sidebar-size=sm] .vertical-menu #sidebar-menu .menu-title,
body.crm-template[data-sidebar-size=sm] .vertical-menu #sidebar-menu .badge {
  display: none !important;
}

body.crm-template[data-sidebar-size=sm] .vertical-menu #side-menu {
  gap: 7px;
}

body.crm-template[data-sidebar-size=sm] .vertical-menu #sidebar-menu > ul > li {
  display: grid;
  place-items: center;
  width: 100%;
}

body.crm-template[data-sidebar-size=sm] .vertical-menu #sidebar-menu > ul > li > a,
body.crm-template[data-sidebar-size=sm] .vertical-menu #sidebar-menu > ul > li:hover > a {
  display: grid;
  place-items: center;
  width: 46px;
  min-width: 46px;
  height: 46px;
  min-height: 46px;
  margin: 0 auto;
  padding: 0;
  border-radius: 12px;
  box-shadow: none;
  transform: none;
}

body.crm-template[data-sidebar-size=sm] .vertical-menu #sidebar-menu > ul > li > a:hover,
body.crm-template[data-sidebar-size=sm] .vertical-menu #sidebar-menu > ul > li > a:focus-visible {
  background: rgba(var(--crm-primary-rgb), .08);
  transform: translateY(-1px);
}

body.crm-template[data-sidebar-size=sm] .vertical-menu #sidebar-menu > ul > li.mm-active > a,
body.crm-template[data-sidebar-size=sm] .vertical-menu #sidebar-menu > ul > li > a.active {
  background: rgba(var(--crm-primary-rgb), .12);
  box-shadow: inset 0 0 0 1px rgba(var(--crm-primary-rgb), .08);
}

body.crm-template[data-sidebar-size=sm] .vertical-menu #sidebar-menu > ul > li > a span,
body.crm-template[data-sidebar-size=sm] .vertical-menu #sidebar-menu > ul > li:hover > a span {
  display: none !important;
}

body.crm-template[data-sidebar-size=sm] .vertical-menu #sidebar-menu > ul > li > a .nav-icon {
  width: 21px;
  height: 21px;
  min-width: 21px;
  margin: 0;
}

body.crm-template[data-sidebar-size=sm] .vertical-menu #sidebar-menu > ul > li > a .crm-nav-badge {
  position: absolute;
  top: 9px;
  right: 10px;
  width: 8px;
  min-width: 8px;
  height: 8px;
  padding: 0;
  font-size: 0;
  box-shadow: 0 0 0 3px var(--crm-surface);
}

body.crm-template[data-sidebar-size=sm] .vertical-menu #sidebar-menu > ul > li > a.has-arrow::after {
  display: none;
}

body.crm-template[data-sidebar-size=sm] .vertical-menu #sidebar-menu > ul > li > a.has-arrow {
  padding-right: 0;
}

body.crm-template[data-sidebar-size=sm]:not(.crm-sidebar-hover-open) .vertical-menu #sidebar-menu > ul > li > ul.sub-menu {
  display: none !important;
}

body.crm-template[data-sidebar-size=sm] .crm-sidebar-footer {
  display: grid;
  justify-items: center;
  min-height: var(--crm-sidebar-footer-rail-height);
  padding: 10px 0 16px;
}

body.crm-template[data-sidebar-size=sm] .sidebar-menu-scroll {
  height: calc(100vh - 75px - var(--crm-sidebar-footer-rail-height)) !important;
  max-height: calc(100vh - 75px - var(--crm-sidebar-footer-rail-height));
}

body.crm-template[data-sidebar-size=sm] .crm-sidebar-user {
  display: none;
}

body.crm-template[data-sidebar-size=sm] .crm-sidebar-logout {
  width: 46px;
  min-width: 46px;
  height: 46px;
  min-height: 46px;
  padding: 0;
  color: var(--crm-muted);
  background: transparent;
  border-color: transparent;
  border-radius: 12px;
}

body.crm-template[data-sidebar-size=sm] .crm-sidebar-logout span {
  display: none;
}

body.crm-template[data-sidebar-size=sm] .crm-sidebar-logout:hover,
body.crm-template[data-sidebar-size=sm] .crm-sidebar-logout:focus {
  color: var(--bs-danger);
  background: rgba(var(--bs-danger-rgb), .09);
  transform: translateY(-1px);
}

@media (min-width: 992px) {
  @keyframes crm-sidebar-group-title-reveal {
    from {
      opacity: 0;
      transform: translateX(-8px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

  body.crm-template:not([data-sidebar-size=sm]) .vertical-menu #sidebar-menu .crm-sidebar-group-title,
  body.crm-template[data-sidebar-size=sm].crm-sidebar-hover-open .vertical-menu #sidebar-menu .crm-sidebar-group-title {
    animation: crm-sidebar-group-title-reveal 420ms cubic-bezier(.19, 1, .22, 1) both;
    animation-delay: calc(80ms + (var(--crm-sidebar-title-order, 0) * 90ms));
  }

  body.crm-template[data-sidebar-size=sm].crm-sidebar-hover-open .vertical-menu {
    width: var(--crm-sidebar-width) !important;
    box-shadow: 16px 0 34px rgba(15, 23, 42, .1);
  }

  body.crm-template[data-sidebar-size=sm].crm-sidebar-hover-open .vertical-menu .sidebar-menu-scroll {
    height: calc(100vh - 75px - var(--crm-sidebar-footer-height)) !important;
    max-height: calc(100vh - 75px - var(--crm-sidebar-footer-height));
    overflow: hidden;
  }

  body.crm-template[data-sidebar-size=sm].crm-sidebar-hover-open .vertical-menu .navbar-brand-box {
    width: var(--crm-sidebar-width) !important;
    justify-content: flex-start;
    padding: 0 22px;
  }

  body.crm-template[data-sidebar-size=sm].crm-sidebar-hover-open .vertical-menu .logo-lg {
    display: inline-flex;
    opacity: 1;
    transform: translateX(0);
  }

  body.crm-template[data-sidebar-size=sm].crm-sidebar-hover-open .vertical-menu .logo-sm {
    display: none;
  }

  body.crm-template[data-sidebar-size=sm].crm-sidebar-hover-open .vertical-menu .simplebar-mask {
    overflow: hidden !important;
  }

  body.crm-template[data-sidebar-size=sm].crm-sidebar-hover-open .vertical-menu .simplebar-content-wrapper {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  body.crm-template[data-sidebar-size=sm].crm-sidebar-hover-open .vertical-menu .simplebar-scrollbar {
    display: block !important;
  }

  body.crm-template[data-sidebar-size=sm].crm-sidebar-hover-open .vertical-menu #sidebar-menu .menu-title {
    display: block !important;
  }

  body.crm-template[data-sidebar-size=sm].crm-sidebar-hover-open .vertical-menu #side-menu {
    gap: 6px;
  }

  body.crm-template[data-sidebar-size=sm].crm-sidebar-hover-open .vertical-menu #sidebar-menu > ul > li {
    display: block;
    width: 100%;
  }

  body.crm-template[data-sidebar-size=sm].crm-sidebar-hover-open .vertical-menu #sidebar-menu > ul > li > a {
    display: flex;
    justify-content: flex-start;
    width: calc(100% - 24px);
    min-width: 0;
    height: auto;
    min-height: 46px;
    margin: 0 12px;
    padding: 0 13px;
    border-radius: 12px;
    color: var(--crm-muted);
  }

  body.crm-template[data-sidebar-size=sm].crm-sidebar-hover-open .vertical-menu #sidebar-menu > ul > li > a.has-arrow {
    padding-right: 46px;
  }

  body.crm-template[data-sidebar-size=sm].crm-sidebar-hover-open .vertical-menu #sidebar-menu > ul > li > a span {
    display: inline-block !important;
    padding: 0;
    color: inherit;
  }

  body.crm-template[data-sidebar-size=sm].crm-sidebar-hover-open .vertical-menu #sidebar-menu > ul > li > a:focus-visible {
    color: var(--crm-primary);
  }

  body.crm-template[data-sidebar-size=sm].crm-sidebar-hover-open .vertical-menu #sidebar-menu > ul > li.mm-active > a,
  body.crm-template[data-sidebar-size=sm].crm-sidebar-hover-open .vertical-menu #sidebar-menu > ul > li > a.active {
    color: var(--crm-primary);
    background:
      linear-gradient(90deg, rgba(var(--crm-primary-rgb), .14), rgba(var(--crm-primary-rgb), .075));
    box-shadow: inset 0 0 0 1px rgba(var(--crm-primary-rgb), .08);
  }

  body.crm-template[data-sidebar-size=sm].crm-sidebar-hover-open .vertical-menu #sidebar-menu > ul > li > a.has-arrow::after {
    display: block;
  }

  body.crm-template[data-sidebar-size=sm].crm-sidebar-hover-open .vertical-menu #sidebar-menu .mm-active > .has-arrow::after {
    transform: rotate(180deg) scale(1);
  }

  body.crm-template[data-sidebar-size=sm].crm-sidebar-hover-open .vertical-menu #sidebar-menu > ul > li > a .nav-icon {
    width: 20px;
    height: 20px;
    min-width: 20px;
  }

  body.crm-template[data-sidebar-size=sm].crm-sidebar-hover-open .vertical-menu #sidebar-menu > ul > li > ul.sub-menu {
    position: relative !important;
    right: auto !important;
    left: auto !important;
    width: auto !important;
    margin-right: 14px;
    margin-left: 50px;
    border: 0 !important;
    border-left: 1px solid rgba(var(--crm-primary-rgb), .16) !important;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
    z-index: auto;
  }

  body.crm-template[data-sidebar-size=sm].crm-sidebar-hover-open .vertical-menu #sidebar-menu > ul > li:hover > ul.sub-menu.mm-collapse:not(.mm-show) {
    display: none !important;
  }

  body.crm-template[data-sidebar-size=sm].crm-sidebar-hover-open .vertical-menu #sidebar-menu > ul > li > ul.sub-menu.mm-show {
    display: block !important;
  }

  body.crm-template[data-sidebar-size=sm].crm-sidebar-hover-open .vertical-menu #sidebar-menu ul li ul.sub-menu::before {
    display: none;
  }

  body.crm-template[data-sidebar-size=sm].crm-sidebar-hover-open .vertical-menu #sidebar-menu ul li ul.sub-menu li a::before {
    display: block;
  }

  body.crm-template[data-sidebar-size=sm].crm-sidebar-hover-open .vertical-menu #sidebar-menu > ul > li > ul.sub-menu li a {
    width: auto !important;
    min-height: 36px;
    margin: 0;
    padding: 0 10px 0 24px;
    color: var(--crm-muted);
    border-radius: 10px;
    box-shadow: none;
  }

  body.crm-template[data-sidebar-size=sm].crm-sidebar-hover-open .vertical-menu #sidebar-menu > ul > li > ul.sub-menu li a:hover,
  body.crm-template[data-sidebar-size=sm].crm-sidebar-hover-open .vertical-menu #sidebar-menu > ul > li > ul.sub-menu li a:focus-visible,
  body.crm-template[data-sidebar-size=sm].crm-sidebar-hover-open .vertical-menu #sidebar-menu > ul > li > ul.sub-menu li a.active {
    color: var(--crm-primary);
    background: transparent;
    transform: translateX(1px);
  }

  body.crm-template[data-sidebar-size=sm].crm-sidebar-hover-open .vertical-menu #sidebar-menu > ul > li > ul.sub-menu li a.active {
    color: var(--crm-primary);
    background: transparent;
  }

  body.crm-template[data-sidebar-size=sm].crm-sidebar-hover-open .vertical-menu .crm-sidebar-footer {
    justify-items: stretch;
    padding: 14px;
  }

  body.crm-template[data-sidebar-size=sm].crm-sidebar-hover-open .vertical-menu .crm-sidebar-user {
    display: flex;
  }

  body.crm-template[data-sidebar-size=sm].crm-sidebar-hover-open .vertical-menu .crm-sidebar-logout {
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 42px;
    padding: 0 12px;
    color: var(--bs-danger);
    background: rgba(var(--bs-danger-rgb), .075);
    border-color: rgba(var(--bs-danger-rgb), .14);
  }

  body.crm-template[data-sidebar-size=sm].crm-sidebar-hover-open .vertical-menu .crm-sidebar-logout span {
    display: inline;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.crm-template #sidebar-menu .crm-sidebar-group-title {
    animation: none !important;
    transition: none !important;
  }
}


@media (max-width: 991.98px) {
  body.crm-template .vertical-menu {
    display: none !important;
  }

  body.crm-template .main-content {
    margin-left: 0 !important;
  }

  body.crm-template #page-topbar,
  body.crm-template .footer {
    left: 0 !important;
  }
}

body.crm-template #page-topbar .navbar-header .page-title-box {
  margin-left: 0;
}

.crm-footer-heart {
  width: 14px;
  height: 14px;
  color: var(--bs-danger);
  fill: currentColor;
  vertical-align: -2px;
}

.crm-footer-grid {
  display: grid;
  place-items: center;
  min-width: 0;
}

.crm-footer-credit {
  min-width: 0;
  color: var(--crm-muted);
  font-weight: 600;
  text-align: center;
}

.crm-footer-type {
  display: inline-flex;
  max-width: 0;
  overflow: hidden;
  border-right: 2px solid var(--crm-primary);
  white-space: nowrap;
  animation:
    crm-footer-typing 3400ms steps(37, end) 420ms forwards,
    crm-footer-caret 820ms step-end infinite;
}

.crm-footer-type a {
  color: var(--crm-primary);
  font-weight: 700;
  text-decoration: none;
}

.crm-footer-type a:hover,
.crm-footer-type a:focus {
  color: var(--crm-primary);
  text-decoration: underline;
}

@keyframes crm-footer-typing {
  to {
    max-width: 40ch;
  }
}

@keyframes crm-footer-caret {
  50% {
    border-color: transparent;
  }
}

@media (prefers-reduced-motion: reduce) {
  .crm-footer-type {
    max-width: none;
    border-right: 0;
    animation: none;
  }
}

@media (max-width: 767.98px) {
  .crm-footer-grid {
    text-align: center;
  }
}

.input-custom-icon > svg {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--bs-secondary-color);
  transform: translateY(-50%);
  z-index: 3;
}

.auth-pass-inputgroup .btn svg {
  width: 18px;
  height: 18px;
}

.crm-kicker {
  margin: 0 0 6px;
  color: var(--crm-primary);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.glass-card,
.admin-record-card,
.service-card {
  color: var(--bs-body-color);
  background-color: var(--crm-card-bg);
  border: var(--bs-border-width) solid var(--bs-border-color-translucent);
  border-radius: var(--bs-border-radius);
  box-shadow: var(--crm-shadow);
}

.glass-card {
  width: 100%;
  margin-bottom: 24px;
}

.panel,
.metric-card,
.dashboard-hero,
.reports-toolbar,
.settings-savebar {
  padding: 1.5rem;
}

.panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.panel-large {
  grid-row: span 2;
}

.crm-table-card {
  margin-bottom: 24px;
  border-color: var(--bs-border-color-translucent);
  box-shadow: var(--crm-shadow);
}

.crm-table-card .card-body {
  padding: 1.5rem;
}

.crm-table-card .table-responsive {
  margin-inline: -0.25rem;
  padding-inline: 0.25rem;
}

.crm-table-card .table th {
  color: var(--crm-muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 1.25rem;
}

.panel-header .btn {
  flex: 0 0 auto;
}

.panel-header h2,
.reports-toolbar h2,
.settings-savebar h2 {
  margin: 0;
  color: var(--bs-heading-color);
  font-size: 16px;
  font-weight: 600;
}

.panel-header p,
.reports-toolbar p,
.settings-savebar p,
.dashboard-hero p {
  margin: 4px 0 0;
  color: var(--crm-muted);
}

.dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.dashboard-hero h2 {
  max-width: 760px;
  margin: 0;
  color: var(--bs-heading-color);
  font-size: clamp(22px, 2.2vw, 32px);
  line-height: 1.2;
  font-weight: 600;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--crm-page-gap);
}

.metric-card {
  position: relative;
  overflow: hidden;
}

.metric-card::after {
  content: "";
  position: absolute;
  inset: auto 18px 18px auto;
  width: 44px;
  height: 44px;
  border-radius: var(--bs-border-radius);
  background: var(--crm-soft);
}

.metric-card .metric-card__icon {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--crm-primary);
}

.metric-card .metric-card__icon svg,
.metric-card .metric-card__icon [data-eva] {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.metric-card span,
.metric-card small {
  display: block;
  color: var(--crm-muted);
  font-size: 13px;
  font-weight: 500;
}

.metric-card strong {
  display: block;
  margin: 18px 0 6px;
  color: var(--bs-heading-color);
  font-size: clamp(24px, 2.8vw, 34px);
  line-height: 1;
  font-weight: 600;
}

.dashboard-grid,
.admin-two-column,
.services-layout {
  display: grid;
  grid-template-columns: minmax(320px, 390px) minmax(0, 1fr);
  gap: var(--crm-page-gap);
  align-items: stretch;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, .8fr);
}

.crud-page {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--crm-page-gap);
  align-items: stretch;
}

.crud-page.admin-two-column,
.crud-page.services-layout,
.crud-page.payments-layout {
  grid-template-columns: 1fr;
}

.crud-page > .panel {
  width: 100%;
  max-height: none;
}

.metric-grid + .crud-page > .panel {
  max-height: none;
}

.panel > .admin-card-list,
.panel > .service-card-grid,
.panel > .stack-list,
.panel > .progress-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.panel > .table-wrap {
  flex: 0 0 auto;
  min-height: 0;
  overflow-x: auto;
  overflow-y: visible;
  padding-right: 0;
}

.panel > .admin-card-list::-webkit-scrollbar,
.panel > .service-card-grid::-webkit-scrollbar,
.panel > .stack-list::-webkit-scrollbar,
.panel > .progress-list::-webkit-scrollbar,
.panel > .table-wrap::-webkit-scrollbar,
.crm-tabs-card .tab-content::-webkit-scrollbar,
.crm-tab-pane::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.panel > .admin-card-list::-webkit-scrollbar-thumb,
.panel > .service-card-grid::-webkit-scrollbar-thumb,
.panel > .stack-list::-webkit-scrollbar-thumb,
.panel > .progress-list::-webkit-scrollbar-thumb,
.panel > .table-wrap::-webkit-scrollbar-thumb,
.crm-tabs-card .tab-content::-webkit-scrollbar-thumb,
.crm-tab-pane::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(var(--crm-primary-rgb), .2);
}

.service-form-panel {
  position: sticky;
  top: 99px;
}

.reports-grid,
.settings-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--crm-page-gap);
  align-items: stretch;
}

.settings-section:first-child,
.settings-savebar {
  grid-column: 1 / -1;
}

.settings-savebar {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 0;
}

.reports-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 18px;
  align-items: end;
}

.dashboard-grid > .panel {
  min-height: var(--crm-widget-height);
  max-height: var(--crm-widget-height);
}

.dashboard-grid > .panel-large {
  min-height: calc((var(--crm-widget-height) * 2) + var(--crm-page-gap));
  max-height: calc((var(--crm-widget-height) * 2) + var(--crm-page-gap));
}

.crm-calendar-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.crm-calendar-intro h2 {
  margin: 0;
  color: var(--bs-heading-color);
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 700;
  line-height: 1.15;
}

.crm-calendar-intro p {
  margin: 6px 0 0;
  color: var(--crm-muted);
}

.crm-calendar-intro-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.crm-calendar-stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.crm-calendar-stat-strip > article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding: 12px 16px;
  border: 1px solid var(--crm-border-soft);
  border-radius: var(--bs-border-radius);
  background: var(--crm-surface);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.crm-calendar-stat-strip > article:hover {
  border-color: rgba(var(--crm-primary-rgb), .24);
  box-shadow: var(--crm-shadow-soft);
  transform: translateY(-1px);
}

.crm-calendar-stat-strip span {
  color: var(--crm-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.crm-calendar-stat-strip strong {
  color: var(--bs-heading-color);
  font-size: 25px;
  font-weight: 800;
  line-height: 1;
}

.crm-calendar-dashboard,
.dashboard-secondary-grid {
  display: grid;
  gap: var(--crm-page-gap);
  align-items: stretch;
}

.crm-calendar-dashboard {
  grid-template-columns: minmax(250px, 280px) minmax(620px, 1fr) minmax(300px, 340px);
  --crm-calendar-panel-height: var(--crm-panel-height);
}

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

.crm-calendar-card,
.crm-calendar-left,
.crm-calendar-sidebar {
  height: var(--crm-calendar-panel-height);
  min-height: var(--crm-calendar-panel-height);
  max-height: var(--crm-calendar-panel-height);
}

.crm-calendar-card,
.crm-calendar-left,
.crm-calendar-sidebar {
  overflow: hidden;
}

.crm-calendar-card {
  display: flex;
  flex-direction: column;
  container-type: inline-size;
}

.crm-calendar-left {
  display: grid;
  align-content: start;
  gap: 16px;
  overflow: auto;
  padding: 18px;
}

.crm-calendar-mini {
  display: grid;
  gap: 12px;
}

.crm-calendar-mini__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.crm-calendar-mini__head strong {
  color: var(--bs-heading-color);
  font-size: 14px;
  font-weight: 800;
  text-transform: capitalize;
}

.crm-calendar-mini__head button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  color: var(--crm-muted);
  background: rgba(var(--bs-secondary-rgb), .04);
  transition: transform .16s ease, color .16s ease, border-color .16s ease, background .16s ease;
}

.crm-calendar-mini__head button:hover {
  border-color: rgba(var(--crm-primary-rgb), .26);
  color: var(--crm-primary);
  background: rgba(var(--crm-primary-rgb), .07);
  transform: translateY(-1px);
}

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

.crm-calendar-mini__weekdays span {
  color: var(--crm-muted);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.crm-calendar-mini__grid button {
  position: relative;
  display: grid;
  min-width: 0;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--bs-heading-color);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  transition: transform .16s ease, color .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.crm-calendar-mini__grid button:hover {
  border-color: rgba(var(--crm-primary-rgb), .18);
  background: rgba(var(--crm-primary-rgb), .06);
  transform: translateY(-1px);
}

.crm-calendar-mini__grid button.is-muted {
  color: rgba(var(--bs-secondary-rgb), .54);
}

.crm-calendar-mini__grid button.is-today {
  border-color: rgba(var(--crm-primary-rgb), .35);
}

.crm-calendar-mini__grid button.is-selected {
  color: #fff;
  background: var(--crm-primary);
  box-shadow: 0 8px 18px rgba(var(--crm-primary-rgb), .24);
}

.crm-calendar-mini__grid button.has-events::after {
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
  content: "";
  transform: translateX(-50%);
}

.crm-calendar-filter-panel {
  display: grid;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--bs-border-color);
}

.crm-calendar-filter-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.crm-calendar-filter-heading strong,
.crm-calendar-filter-panel .field > span {
  color: var(--bs-heading-color);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.crm-calendar-filter-heading button {
  min-width: 28px;
  min-height: 28px;
  padding: 4px 6px;
  border: 0;
  border-radius: 6px;
  color: var(--crm-primary);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.crm-calendar-filter-option {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 42px;
  margin: 0;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: var(--bs-border-radius);
  color: var(--bs-heading-color);
  background: rgba(var(--bs-secondary-rgb), .05);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.crm-calendar-filter-option:hover {
  border-color: rgba(var(--crm-primary-rgb), .18);
  background: rgba(var(--crm-primary-rgb), .06);
  transform: translateY(-1px);
}

.crm-calendar-filter-option input {
  width: 16px;
  height: 16px;
  accent-color: var(--crm-primary);
}

.crm-calendar-toolbar {
  --crm-calendar-toolbar-control-height: 38px;
  display: grid;
  grid-template-columns: max-content minmax(160px, 1fr) max-content;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 10px;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background: rgba(var(--bs-secondary-rgb), .05);
}

.crm-calendar-nav,
.crm-calendar-view-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.crm-calendar-nav {
  flex: 1 1 230px;
}

.crm-calendar-nav > .btn {
  height: var(--crm-calendar-toolbar-control-height);
  min-height: var(--crm-calendar-toolbar-control-height);
  padding-block: 0;
}

.crm-calendar-nav strong {
  display: inline-flex;
  align-items: center;
  min-height: var(--crm-calendar-toolbar-control-height);
  margin-left: 4px;
  color: var(--bs-heading-color);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.crm-calendar-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: var(--crm-calendar-toolbar-control-height);
  min-height: var(--crm-calendar-toolbar-control-height);
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  color: var(--crm-muted);
  background: var(--crm-surface);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.crm-calendar-search:focus-within {
  border-color: rgba(var(--crm-primary-rgb), .42);
  box-shadow: 0 0 0 3px rgba(var(--crm-primary-rgb), .1);
  background: var(--crm-surface);
}

.crm-calendar-search input {
  width: 100%;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--bs-body-color);
  background: transparent;
  font-size: 13px;
  font-weight: 600;
}

.crm-calendar-view-switch {
  flex: 0 1 auto;
  justify-self: end;
  height: var(--crm-calendar-toolbar-control-height);
  max-width: 100%;
  overflow-x: auto;
  padding: 3px;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background: var(--crm-surface);
}

.crm-calendar-view-switch button {
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: calc(var(--bs-border-radius) - 2px);
  color: var(--crm-muted);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transition: color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.crm-calendar-view-switch button:hover {
  color: var(--bs-heading-color);
  background: rgba(var(--bs-secondary-rgb), .09);
}

.crm-calendar-view-switch button.is-active {
  color: #fff;
  background: var(--crm-primary);
  box-shadow: 0 6px 14px rgba(var(--crm-primary-rgb), .18);
}

@container (max-width: 860px) {
  .crm-calendar-toolbar {
    grid-template-columns: minmax(0, 1fr) max-content;
  }

  .crm-calendar-search {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

.crm-calendar-grid {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.crm-calendar-grid .fc {
  color: var(--bs-body-color);
  font-size: 13px;
}

.crm-calendar-grid .fc .fc-view-harness {
  min-height: 580px;
}

.crm-calendar-grid .fc-theme-standard td,
.crm-calendar-grid .fc-theme-standard th,
.crm-calendar-grid .fc-theme-standard .fc-scrollgrid {
  border-color: var(--bs-border-color);
}

.crm-calendar-grid .fc .fc-scrollgrid {
  border-radius: var(--bs-border-radius);
  overflow: hidden;
}

.crm-calendar-grid .fc .fc-daygrid-day-frame {
  min-height: 104px;
  transition: background .16s ease;
}

.crm-calendar-grid .fc .fc-daygrid-day:hover .fc-daygrid-day-frame {
  background: rgba(var(--crm-primary-rgb), .025);
}

.crm-calendar-grid .fc .fc-col-header-cell {
  height: 40px;
  background: rgba(var(--bs-secondary-rgb), .05);
}

.crm-calendar-grid .fc .fc-col-header-cell-cushion,
.crm-calendar-grid .fc .fc-timegrid-slot-label-cushion {
  color: var(--crm-muted);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
}

.crm-calendar-grid .fc .fc-day-today {
  background: rgba(var(--crm-primary-rgb), .06);
}

.crm-calendar-grid.fc .fc-daygrid-day,
.crm-calendar-grid .fc .fc-daygrid-day {
  background-clip: padding-box;
  transition: background .16s ease, box-shadow .16s ease;
}

.crm-calendar-grid.fc .fc-daygrid-day-frame,
.crm-calendar-grid .fc .fc-daygrid-day-frame {
  position: relative;
  z-index: 0;
}

.crm-calendar-grid.fc .fc-daygrid-day.is-selected-day,
.crm-calendar-grid .fc .fc-daygrid-day.is-selected-day {
  background: rgba(var(--crm-primary-rgb), .085) !important;
  box-shadow: inset 0 0 0 2px rgba(var(--crm-primary-rgb), .22);
}

.crm-calendar-grid.fc .fc-daygrid-day.is-selected-day .fc-daygrid-day-frame,
.crm-calendar-grid .fc .fc-daygrid-day.is-selected-day .fc-daygrid-day-frame {
  background: transparent !important;
}

.crm-calendar-grid.fc .fc-timegrid-col.is-selected-day,
.crm-calendar-grid .fc .fc-timegrid-col.is-selected-day {
  background: rgba(var(--crm-primary-rgb), .055) !important;
  box-shadow: inset 0 0 0 2px rgba(var(--crm-primary-rgb), .16);
}

.crm-calendar-grid.fc .fc-timegrid-col.is-selected-day .fc-timegrid-col-frame,
.crm-calendar-grid .fc .fc-timegrid-col.is-selected-day .fc-timegrid-col-frame {
  background: transparent !important;
}

.crm-calendar-grid.fc .fc-daygrid-day.is-selected-day .fc-daygrid-day-number,
.crm-calendar-grid .fc .fc-daygrid-day.is-selected-day .fc-daygrid-day-number {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  color: #fff;
  background: var(--crm-primary);
  box-shadow: 0 8px 18px rgba(var(--crm-primary-rgb), .22);
}

.crm-calendar-grid .fc .fc-daygrid-day-number {
  color: var(--bs-heading-color);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.crm-calendar-grid .fc .fc-timegrid-now-indicator-line {
  border-color: var(--crm-primary);
}

.crm-calendar-grid .fc .fc-timegrid-now-indicator-arrow {
  border-color: var(--crm-primary);
}

.crm-calendar-grid.fc .fc-event,
.crm-calendar-grid .fc .fc-event {
  overflow: hidden;
  border: 1px solid transparent;
  border-left-width: 3px;
  border-radius: 6px;
  box-shadow: none;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, filter .16s ease;
}

.crm-calendar-grid.fc .fc-event:hover,
.crm-calendar-grid.fc .fc-event.is-selected,
.crm-calendar-grid .fc .fc-event:hover,
.crm-calendar-grid .fc .fc-event.is-selected {
  box-shadow: 0 8px 18px rgba(15, 23, 42, .11);
  filter: saturate(1.05);
  transform: translateY(-1px);
}

.crm-calendar-grid.fc .fc-event-main,
.crm-calendar-grid .fc .fc-event-main,
.crm-calendar-grid .fc-event-main {
  padding: 4px 5px;
  color: inherit !important;
}

.crm-calendar-grid.fc .fc-event-main-frame,
.crm-calendar-grid.fc .fc-event .fc-event-title,
.crm-calendar-grid.fc .fc-event .fc-event-time,
.crm-calendar-grid.fc .fc-event .crm-calendar-event-title,
.crm-calendar-grid.fc .fc-event .crm-calendar-event-time,
.crm-calendar-grid .fc .fc-event-main-frame,
.crm-calendar-grid .fc .fc-event .fc-event-title,
.crm-calendar-grid .fc .fc-event .fc-event-time,
.crm-calendar-grid .fc .fc-event .crm-calendar-event-title,
.crm-calendar-grid .fc .fc-event .crm-calendar-event-time,
.crm-calendar-grid .fc-event-main-frame,
.crm-calendar-grid .fc-event .fc-event-title,
.crm-calendar-grid .fc-event .fc-event-time,
.crm-calendar-grid .fc-event .crm-calendar-event-title,
.crm-calendar-grid .fc-event .crm-calendar-event-time {
  color: inherit !important;
}

.crm-calendar-grid.fc .fc-event-title,
.crm-calendar-grid.fc .fc-event-time,
.crm-calendar-grid .fc .fc-event-title,
.crm-calendar-grid .fc .fc-event-time,
.crm-calendar-event-title,
.crm-calendar-event-time {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}

.crm-calendar-event-inner {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.crm-calendar-event-time {
  flex: 0 0 auto;
  opacity: .84;
}

.crm-calendar-event-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-calendar-grid.fc .crm-calendar-event.is-selected,
.crm-calendar-grid .fc .crm-calendar-event.is-selected {
  outline: 2px solid rgba(var(--crm-primary-rgb), .45);
  outline-offset: 2px;
}

.crm-event--meeting,
.crm-event--call {
  border-color: #1f58c7 !important;
  color: #223b70 !important;
  background: #eef4ff !important;
}

.crm-event--task,
.crm-event--follow-up,
.crm-event--milestone {
  border-color: #7c3aed !important;
  color: #4c1d95 !important;
  background: #f3efff !important;
}

.crm-event--revenue {
  border-color: #059669 !important;
  color: #065f46 !important;
  background: #ecfdf5 !important;
}

.crm-event--expense {
  border-color: #dc2626 !important;
  color: #991b1b !important;
  background: #fef2f2 !important;
}

.crm-event--customer {
  border-color: #0f766e !important;
  color: #115e59 !important;
  background: #ecfeff !important;
}

body.crm-template[data-theme="dark"] .crm-event--meeting,
body.crm-template[data-theme="dark"] .crm-event--call {
  border-color: #60a5fa !important;
  color: #dbeafe !important;
  background: rgba(37, 99, 235, .2) !important;
}

body.crm-template[data-theme="dark"] .crm-event--task,
body.crm-template[data-theme="dark"] .crm-event--follow-up,
body.crm-template[data-theme="dark"] .crm-event--milestone {
  border-color: #a78bfa !important;
  color: #ede9fe !important;
  background: rgba(124, 58, 237, .22) !important;
}

body.crm-template[data-theme="dark"] .crm-event--revenue {
  border-color: #34d399 !important;
  color: #d1fae5 !important;
  background: rgba(5, 150, 105, .2) !important;
}

body.crm-template[data-theme="dark"] .crm-event--expense {
  border-color: #f87171 !important;
  color: #fee2e2 !important;
  background: rgba(220, 38, 38, .18) !important;
}

body.crm-template[data-theme="dark"] .crm-event--customer {
  border-color: #2dd4bf !important;
  color: #ccfbf1 !important;
  background: rgba(15, 118, 110, .2) !important;
}

.crm-event-status--completed,
.crm-event-status--paid {
  opacity: .82;
}

.crm-event-status--cancelled {
  opacity: .62;
  text-decoration: line-through;
}

.crm-calendar-grid.fc .is-movable,
.crm-calendar-grid .fc .is-movable {
  cursor: grab;
}

.crm-calendar-grid.fc .is-movable:active,
.crm-calendar-grid .fc .is-movable:active {
  cursor: grabbing;
}

body.crm-template .fc-event.fc-event-mirror,
.crm-calendar-grid.fc .fc-event.fc-event-dragging,
.crm-calendar-grid .fc .fc-event.fc-event-dragging {
  opacity: .96 !important;
  border-radius: 8px;
  box-shadow:
    0 18px 38px rgba(15, 23, 42, .2),
    0 0 0 1px rgba(var(--crm-primary-rgb), .16);
  filter: saturate(1.08);
  transform: rotate(.35deg) scale(1.015);
}

body.crm-template .fc-event.fc-event-mirror {
  pointer-events: none;
  z-index: 1085 !important;
}

body.crm-template .fc-event.fc-event-mirror .fc-event-main,
.crm-calendar-grid.fc .fc-event.fc-event-dragging .fc-event-main,
.crm-calendar-grid .fc .fc-event.fc-event-dragging .fc-event-main {
  padding: 5px 7px;
}

body.crm-template .fc-event.fc-event-mirror .crm-calendar-event-inner,
.crm-calendar-grid.fc .fc-event.fc-event-dragging .crm-calendar-event-inner,
.crm-calendar-grid .fc .fc-event.fc-event-dragging .crm-calendar-event-inner {
  gap: 6px;
}

.crm-calendar-grid.fc .fc-highlight,
.crm-calendar-grid .fc .fc-highlight {
  background: rgba(var(--crm-primary-rgb), .08);
  box-shadow: inset 0 0 0 1px rgba(var(--crm-primary-rgb), .16);
}

.crm-calendar-sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.crm-calendar-sidebar .crm-calendar-sidebar__header {
  flex: 0 0 auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--bs-border-color);
}

.crm-calendar-sidebar__heading {
  min-width: 0;
}

.crm-calendar-sidebar__eyebrow {
  display: block;
  margin-bottom: 5px;
  color: var(--crm-primary);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1;
  text-transform: uppercase;
}

.crm-calendar-sidebar .panel-header h2 {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
}

.crm-calendar-sidebar .panel-header p {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-transform: capitalize;
}

.crm-calendar-sidebar__day-view {
  flex: 1 1 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
}

.crm-calendar-detail {
  display: grid;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background: linear-gradient(145deg, rgba(var(--crm-primary-rgb), .045), transparent 45%), var(--crm-surface);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .045);
  animation: crmCalendarPanelIn .2s ease both;
}

.crm-calendar-detail__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.crm-calendar-type-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--bs-primary-text-emphasis);
  background: var(--bs-primary-bg-subtle);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.crm-calendar-detail h3,
.crm-calendar-agenda h3 {
  margin: 0;
  color: var(--bs-heading-color);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
}

.crm-calendar-detail h3 {
  display: -webkit-box;
  overflow: hidden;
  font-size: 17px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.crm-calendar-detail p {
  margin: 0;
  color: var(--crm-muted);
  line-height: 1.45;
}

.crm-calendar-detail__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--bs-border-color);
  border-radius: 11px;
  background: rgba(var(--bs-secondary-rgb), .025);
}

.crm-calendar-detail__fact {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 9px 10px;
  background: var(--crm-surface);
}

.crm-calendar-detail__fact + .crm-calendar-detail__fact {
  border-left: 1px solid var(--bs-border-color);
}

.crm-calendar-detail__fact:nth-child(3) {
  grid-column: 1 / -1;
  border-top: 1px solid var(--bs-border-color);
  border-left: 0;
}

.crm-calendar-detail__fact-icon {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 9px;
  color: var(--crm-primary);
  background: rgba(var(--crm-primary-rgb), .09);
}

.crm-calendar-detail__fact-icon svg,
.crm-calendar-detail__fact-icon [data-eva] {
  width: 16px;
  height: 16px;
}

.crm-calendar-detail__fact > span:last-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.crm-calendar-detail__fact small,
.crm-calendar-detail__notes > span {
  color: var(--crm-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1.2;
  text-transform: uppercase;
}

.crm-calendar-detail__fact strong {
  min-width: 0;
  overflow: hidden;
  color: var(--bs-heading-color);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-calendar-detail__notes {
  display: grid;
  gap: 5px;
  padding: 0 2px;
}

.crm-calendar-detail__notes p {
  display: -webkit-box;
  overflow: hidden;
  font-size: 13px;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.crm-calendar-detail__notes.is-expanded p {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
}

.crm-calendar-detail__notes [data-calendar-notes-toggle] {
  justify-self: start;
  padding: 2px 0;
  border: 0;
  color: var(--crm-primary);
  background: transparent;
  font-size: 11px;
  font-weight: 800;
}

.crm-calendar-detail__notes [data-calendar-notes-toggle]:hover,
.crm-calendar-detail__notes [data-calendar-notes-toggle]:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.crm-calendar-detail__actions {
  display: grid;
  gap: 9px;
  padding-top: 2px;
  border-top: 1px solid var(--bs-border-color);
}

.crm-calendar-detail__primary-actions,
.crm-calendar-detail__utility-actions,
.crm-calendar-detail__minor-actions {
  display: grid;
  gap: 8px;
}

.crm-calendar-detail__primary-actions {
  grid-template-columns: 1fr;
  margin-top: 7px;
}

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

.crm-calendar-detail__minor-actions {
  grid-template-columns: minmax(0, 1fr) auto;
}

.crm-calendar-detail__actions .btn {
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 7px 8px;
  font-size: 11px;
  line-height: 1.2;
}

.crm-calendar-detail__primary-actions .btn {
  font-size: 12px;
}

.crm-calendar-detail__utility-actions .btn,
.crm-calendar-detail__minor-actions .btn {
  font-size: 11px;
}

.crm-calendar-detail__actions .btn svg,
.crm-calendar-detail__actions .btn [data-eva] {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.crm-calendar-detail__delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  border: 1px solid rgba(220, 38, 38, .2);
  border-radius: var(--bs-border-radius);
  color: var(--bs-danger);
  background: rgba(220, 38, 38, .045);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.crm-calendar-detail__delete:hover,
.crm-calendar-detail__delete:focus-visible {
  border-color: rgba(220, 38, 38, .34);
  color: #b91c1c;
  background: rgba(220, 38, 38, .09);
}

.crm-calendar-detail__delete svg,
.crm-calendar-detail__delete [data-eva] {
  width: 14px;
  height: 14px;
}

.crm-calendar-agenda {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
}

.crm-calendar-agenda__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.crm-calendar-agenda__count {
  flex: 0 0 auto;
  color: var(--crm-muted);
  font-size: 11px;
  font-weight: 700;
}

.crm-calendar-agenda-list {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 0;
  max-height: none;
  overflow: auto;
  padding: 3px 6px 8px 2px;
  scroll-padding: 8px;
  scrollbar-gutter: stable;
  scrollbar-color: rgba(var(--crm-primary-rgb), .32) transparent;
  scrollbar-width: thin;
}

.crm-calendar-agenda-section {
  display: grid;
  gap: 7px;
}

.crm-calendar-agenda-section + .crm-calendar-agenda-section {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--bs-border-color);
}

.crm-calendar-agenda-section h4 {
  margin: 0;
  color: var(--crm-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  line-height: 1;
  text-transform: uppercase;
}

.crm-calendar-agenda-section__rows {
  display: grid;
  gap: 7px;
}

.crm-calendar-agenda-list::-webkit-scrollbar {
  width: 6px;
}

.crm-calendar-agenda-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(var(--crm-primary-rgb), .28);
}

.crm-calendar-agenda-list::-webkit-scrollbar-track {
  background: transparent;
}

.crm-calendar-agenda-item {
  display: grid;
  min-width: 0;
}

.crm-calendar-agenda-row {
  display: grid;
  grid-template-columns: 52px 7px minmax(0, 1fr) 20px;
  gap: 8px;
  align-items: center;
  min-height: 56px;
  padding: 8px 10px;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background: var(--crm-surface);
  cursor: pointer;
  text-align: left;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.crm-calendar-agenda-row__dot {
  align-self: center;
  justify-self: center;
  margin: 0;
}

.crm-calendar-agenda-row:hover,
.crm-calendar-agenda-row.is-active {
  border-color: rgba(var(--crm-primary-rgb), .35);
  background: rgba(var(--crm-primary-rgb), .045);
  box-shadow: 0 7px 14px rgba(15, 23, 42, .055);
  transform: translateY(-1px);
}

.crm-calendar-agenda-item.is-open .crm-calendar-agenda-row {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  transform: none;
}

.crm-calendar-agenda-row__chevron {
  display: inline-grid;
  place-items: center;
  color: var(--crm-muted);
  transition: color .2s ease, transform .22s cubic-bezier(.2, .8, .2, 1);
}

.crm-calendar-agenda-row__chevron svg,
.crm-calendar-agenda-row__chevron [data-eva] {
  width: 16px;
  height: 16px;
}

.crm-calendar-agenda-item.is-open .crm-calendar-agenda-row__chevron {
  color: var(--crm-primary);
  transform: rotate(180deg);
}

.crm-calendar-agenda-item__collapse {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows .22s cubic-bezier(.2, .8, .2, 1), opacity .16s ease;
}

.crm-calendar-agenda-item__content {
  min-height: 0;
  overflow: hidden;
}

.crm-calendar-agenda-item.is-open .crm-calendar-agenda-item__collapse {
  grid-template-rows: 1fr;
  opacity: 1;
}

.crm-calendar-agenda-item__content > .crm-calendar-detail {
  border-top: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  box-shadow: none;
  animation: none;
}

.crm-calendar-agenda-row__when {
  display: grid;
  align-content: center;
  min-width: 0;
  min-height: 38px;
  padding-right: 8px;
  border-right: 1px solid var(--bs-border-color);
  color: var(--crm-primary);
  text-align: left;
}

.crm-calendar-agenda-row__when strong,
.crm-calendar-agenda-row__when small {
  color: inherit;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
}

.crm-calendar-agenda-row__when small {
  margin-top: 3px;
  opacity: .72;
  font-size: 10px;
}

.crm-calendar-agenda-row__when.is-all-day strong {
  font-size: 9px;
  white-space: normal;
}

.crm-calendar-agenda-row strong,
.crm-calendar-agenda-row small {
  display: block;
}

.crm-calendar-agenda-row__body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.crm-calendar-agenda-row__body > strong {
  display: block;
  overflow: hidden;
  color: var(--bs-heading-color);
  font-size: 13px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-calendar-agenda-row__body > small {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--crm-muted);
  font-size: 11px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-calendar-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--crm-primary);
}

.crm-calendar-dot--tasks {
  background: #7c3aed;
}

.crm-calendar-dot--meetings {
  background: #1f58c7;
}

.crm-calendar-dot--finance {
  background: #059669;
}

.crm-calendar-dot--customers {
  background: #0f766e;
}

.crm-calendar-day-add {
  width: auto;
  min-width: 38px;
  height: 38px;
  justify-content: center;
  padding: 0 11px;
}

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

@keyframes crmCalendarPanelIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .crm-calendar-stat-strip *,
  .crm-calendar-dashboard *,
  .pipeline-workspace * {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

.customer-360 {
  display: grid;
  gap: var(--crm-page-gap);
}

.customer-brand-avatar {
  overflow: hidden;
  border: 1px solid var(--bs-border-color);
  background: var(--crm-soft);
  color: var(--crm-primary);
}

.customer-brand-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 5px;
  background: var(--crm-surface);
}

.customer-brand-avatar--lg img {
  padding: 7px;
}

.customer-revenue-list > div {
  display: grid;
  gap: 3px;
  padding: 11px 0;
  border-bottom: 1px solid var(--bs-border-color);
}

.customer-revenue-list > div:last-child {
  border-bottom: 0;
}

.customer-revenue-list span {
  color: var(--crm-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.customer-revenue-list strong {
  color: var(--bs-heading-color);
  font-size: 14px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.customer-next-action {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.customer-next-action.is-active {
  border-color: rgba(var(--crm-primary-rgb), .24);
}

.customer-next-action:hover {
  box-shadow: 0 14px 30px rgba(15, 23, 42, .07);
  transform: translateY(-1px);
}

.customer-next-action__body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.customer-next-action__body strong {
  display: block;
  color: var(--bs-heading-color);
  font-size: 14px;
  font-weight: 800;
}

.customer-next-action__body small {
  color: var(--crm-muted);
  font-size: 12px;
  font-weight: 700;
}

.customer-next-action__buttons {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}

.customer-timeline-panel {
  min-height: 720px;
}

.customer-timeline-header {
  display: grid;
  gap: 12px;
  align-items: stretch;
}

.customer-timeline-header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.customer-section-tools--timeline {
  flex: 1 1 auto;
  flex-wrap: nowrap;
  max-width: min(620px, 74%);
}

.customer-section-tools--timeline .customer-section-search {
  flex: 1 1 260px;
  min-width: 240px;
}

.customer-section-tools--timeline .customer-create-toggle {
  flex: 0 0 auto;
  min-width: max-content;
  order: 2;
  white-space: nowrap;
}

.customer-timeline-filters {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  width: 100%;
  max-width: 100%;
  padding: 3px;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background: rgba(var(--bs-secondary-rgb), .05);
}

.customer-timeline-filters button {
  min-height: 30px;
  padding: 0 9px;
  border: 0;
  border-radius: calc(var(--bs-border-radius) - 2px);
  color: var(--crm-muted);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  transition: color .16s ease, background .16s ease, box-shadow .16s ease;
}

.customer-timeline-filters button:hover {
  color: var(--bs-heading-color);
  background: rgba(var(--bs-secondary-rgb), .1);
}

.customer-timeline-filters button.is-active {
  color: #fff;
  background: var(--crm-primary);
  box-shadow: 0 8px 18px rgba(var(--crm-primary-rgb), .18);
}

.customer-timeline-list {
  position: relative;
  display: grid;
  gap: 12px;
}

.customer-timeline-list::before {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 17px;
  width: 2px;
  background: linear-gradient(180deg, rgba(var(--crm-primary-rgb), .24), rgba(var(--bs-secondary-rgb), .12));
  content: "";
}

.customer-timeline-list.is-empty::before {
  display: none;
}

.customer-timeline-row {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: var(--bs-border-radius);
  background: transparent;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.customer-timeline-row:hover,
.customer-timeline-row.is-visible:hover {
  border-color: rgba(var(--crm-primary-rgb), .2);
  background: #fff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .07);
  transform: translateY(-1px);
}

.customer-timeline-row.is-hidden {
  display: none;
}

.customer-timeline-icon {
  position: relative;
  z-index: 1;
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  color: var(--crm-primary);
  background: #eef4ff;
}

.customer-timeline-icon--finance {
  color: #047857;
  background: #ecfdf5;
}

.customer-timeline-icon--meeting {
  color: #1f58c7;
  background: #eef4ff;
}

.customer-timeline-icon--task {
  color: #7c3aed;
  background: #f3efff;
}

.customer-timeline-icon--note,
.customer-timeline-icon--change,
.customer-timeline-icon--document {
  color: #475569;
  background: #f1f5f9;
}

.customer-timeline-row__top,
.customer-timeline-row__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.customer-timeline-row__top {
  justify-content: space-between;
}

.customer-timeline-row__top span,
.customer-timeline-row__top time {
  color: var(--crm-muted);
  font-size: 12px;
  font-weight: 800;
}

.customer-timeline-row h3 {
  margin: 5px 0 4px;
  color: var(--bs-heading-color);
  font-size: 15px;
  font-weight: 800;
}

.customer-timeline-row p {
  margin: 0 0 8px;
  color: var(--crm-muted);
  font-size: 13px;
  line-height: 1.45;
}

.customer-timeline-row__meta small,
.customer-timeline-row__meta a {
  color: var(--crm-muted);
  font-size: 12px;
  font-weight: 800;
}

.customer-timeline-row__meta strong {
  color: #047857;
  font-size: 13px;
  font-weight: 900;
}

.customer-timeline-row__meta .customer-timeline-action {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid rgba(var(--crm-primary-rgb), .18);
  border-radius: var(--bs-border-radius);
  padding: 0 9px;
  color: var(--crm-primary);
  background: rgba(var(--crm-primary-rgb), .08);
  font-size: .72rem;
  font-weight: 900;
  text-decoration: none;
}

.customer-timeline-row__meta .customer-timeline-action:hover,
.customer-timeline-row__meta .customer-timeline-action:focus {
  border-color: rgba(var(--crm-primary-rgb), .3);
  background: rgba(var(--crm-primary-rgb), .13);
}

.customer-sparkline {
  display: flex;
  align-items: end;
  gap: 8px;
  height: 92px;
  padding: 12px;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background: rgba(var(--bs-secondary-rgb), .04);
}

.customer-sparkline span {
  flex: 1;
  min-width: 14px;
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, rgba(var(--crm-primary-rgb), .9), rgba(var(--crm-primary-rgb), .28));
  transition: transform .16s ease, filter .16s ease;
}

.customer-sparkline span:hover {
  filter: saturate(1.14);
  transform: scaleY(1.04);
}

.customer-revenue-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.customer-deal-card__body {
  display: grid;
  gap: 12px;
}

.customer-deal-card__body strong {
  color: var(--bs-heading-color);
  font-size: 24px;
  font-weight: 900;
}

.finance-balance-list {
  display: grid;
  gap: 12px;
}

.finance-balance-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--bs-border-color);
}

.finance-balance-list > div:last-child {
  border-bottom: 0;
}

.finance-balance-list span {
  color: var(--crm-muted);
  font-size: 13px;
}

.finance-balance-list strong {
  color: var(--bs-heading-color);
  font-size: 15px;
}

.finance-balance-list .finance-total {
  margin-top: 4px;
  padding: 14px;
  border: 1px solid rgba(var(--crm-primary-rgb), .18);
  border-radius: var(--bs-border-radius);
  background: rgba(var(--crm-primary-rgb), .07);
}

.reports-grid > .report-section {
  min-height: var(--crm-widget-height);
  max-height: var(--crm-widget-height);
}

.settings-layout {
  grid-template-columns: 1fr;
  gap: 16px;
}

.crm-tabs-card {
  overflow: hidden;
  padding: 0;
}

.crm-tabs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 74px;
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--bs-border-color);
}

.crm-tabs-heading {
  min-width: 220px;
}

.crm-tabs-heading h2 {
  margin: 0;
  color: var(--bs-heading-color);
  font-size: 16px;
  font-weight: 600;
}

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

.crm-tabs-header .nav-tabs-custom {
  position: relative;
  flex-wrap: nowrap;
  flex: 0 1 auto;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  border-bottom: 0;
  margin: -10px -30px -10px 0;
  padding: 10px 30px;
  isolation: isolate;
  scrollbar-width: none;
}

.crm-tabs-header .nav-tabs-custom::-webkit-scrollbar {
  display: none;
}

.crm-tabs-header .nav-tabs-custom::before {
  content: "";
  pointer-events: none;
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 0;
  z-index: 0;
  width: var(--crm-tabs-slider-width, 0px);
  border: 1px solid rgba(var(--crm-primary-rgb), .18);
  border-radius: var(--bs-border-radius);
  background: rgba(var(--crm-primary-rgb), .16);
  box-shadow: 0 10px 24px rgba(var(--crm-primary-rgb), .08);
  opacity: 0;
  transform: translateX(var(--crm-tabs-slider-x, 0px));
  transform-origin: center;
  transition:
    transform 280ms cubic-bezier(.22, 1, .36, 1),
    width 280ms cubic-bezier(.22, 1, .36, 1),
    opacity 140ms ease;
  will-change: transform, width;
}

.crm-tabs-header .nav-tabs-custom.crm-tabs-slider-measuring::before {
  transition: none;
}

.crm-tabs-header .nav-tabs-custom.crm-tabs-slider-ready::before {
  opacity: 1;
}

.crm-tabs-header .nav-tabs-custom .nav-item {
  position: relative;
  z-index: 1;
}

.crm-tabs-header .nav-tabs-custom .nav-link {
  position: relative;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  min-height: 56px;
  padding: 1.1rem 1rem;
  color: var(--crm-muted);
  border-color: transparent !important;
  border-radius: var(--bs-border-radius);
  background: transparent !important;
  font-weight: 500;
  white-space: nowrap;
  transition:
    color 240ms ease,
    transform 240ms cubic-bezier(.19, 1, .22, 1);
}

.crm-tabs-header .nav-tabs-custom .nav-link i {
  font-size: 18px;
  line-height: 1;
}

.crm-tabs-header .nav-tabs-custom .nav-link.active {
  color: var(--crm-primary);
  transform: translateY(-1px);
}

.crm-tabs-card .tab-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 1.5rem;
}

.crm-tabs-card .tab-pane {
  height: auto;
}

.crm-tab-pane {
  min-height: 0;
  overflow: visible;
  padding-right: 4px;
}

.crm-tab-content-exiting,
.crm-tab-content-entering {
  will-change: opacity, transform, filter;
}

.crm-tab-content-exiting {
  opacity: .58;
  transform: translate3d(0, 7px, 0) scale(.998);
  filter: blur(.35px);
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 220ms cubic-bezier(.4, 0, .2, 1),
    filter 180ms ease;
}

.crm-tab-content-entering {
  animation: crm-tab-content-shell-in 280ms cubic-bezier(.16, 1, .3, 1) both;
}

.crm-tab-content-entering > * {
  animation: crm-tab-content-item-in 380ms cubic-bezier(.16, 1, .3, 1) both;
}

.crm-tab-content-entering > :nth-child(1) {
  animation-delay: 20ms;
}

.crm-tab-content-entering > :nth-child(2) {
  animation-delay: 55ms;
}

.crm-tab-content-entering > :nth-child(3) {
  animation-delay: 85ms;
}

.crm-tab-content-entering > :nth-child(n+4) {
  animation-delay: 115ms;
}

@keyframes crm-tab-content-shell-in {
  from {
    opacity: .82;
    transform: translate3d(0, 5px, 0) scale(.998);
    filter: blur(.25px);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
}

@keyframes crm-tab-content-item-in {
  from {
    opacity: 0;
    transform: translate3d(0, 12px, 0) scale(.992);
    filter: blur(.45px);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .crm-tabs-header .nav-tabs-custom::before,
  .crm-tab-content-exiting,
  .crm-tab-content-entering,
  .crm-tab-content-entering > * {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}

.settings-card {
  max-height: calc(var(--crm-workspace-height) - 88px);
}

.schedule-tabs-card {
  max-height: var(--crm-workspace-height);
}

.settings-card .tab-content,
.schedule-tabs-card .tab-content {
  max-height: calc(var(--crm-workspace-height) - 75px);
}

.settings-tab-pane .panel-header,
.schedule-tab-pane .panel-header {
  margin-bottom: 1.25rem;
}

.form-grid,
.filter-bar,
.reports-filter,
.schedule-form,
.admin-card-list,
.service-card-grid,
.stack-list,
.progress-list {
  display: grid;
  gap: 14px;
}

.admin-card-list,
.service-card-grid,
.stack-list,
.progress-list {
  align-content: start;
}

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

.filter-bar {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1.25rem;
}

.filter-bar-wide {
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  color: var(--bs-secondary-color);
  font-size: 13px;
}

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

.pagination-actions .disabled {
  pointer-events: none;
  opacity: .45;
}

.reports-filter {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 0;
}

.field-wide {
  grid-column: 1 / -1;
}

.finance-entry-duplicate-warning {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
  padding: 13px;
  border: 1px solid rgba(245, 158, 11, .34);
  border-radius: 11px;
  background: rgba(245, 158, 11, .09);
}

.finance-entry-duplicate-warning__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: #b45309;
  background: rgba(245, 158, 11, .16);
}

.finance-entry-duplicate-warning strong {
  display: block;
  color: var(--crm-heading, var(--bs-heading-color));
  font-size: .84rem;
}

.finance-entry-duplicate-warning p {
  margin: 4px 0 2px;
  color: var(--crm-text, var(--bs-body-color));
  font-size: .77rem;
  line-height: 1.45;
}

.finance-entry-duplicate-warning small {
  color: #92400e;
  font-size: .71rem;
  font-weight: 650;
}

body.crm-template[data-theme="dark"] .finance-entry-duplicate-warning small {
  color: #fcd34d;
}

.field label,
.auth-form label {
  display: block;
  margin-bottom: .5rem;
  color: var(--bs-heading-color);
  font-size: 13px;
  font-weight: 500;
}

.input {
  display: block;
  width: 100%;
  min-height: 38px;
  padding: .47rem .75rem;
  border: var(--bs-border-width) solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  color: var(--bs-body-color);
  background-color: var(--bs-body-bg);
  background-clip: padding-box;
  outline: 0;
  transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.input:focus {
  border-color: #8fade6;
  box-shadow: 0 0 0 .15rem rgba(var(--crm-primary-rgb), .16);
}

.quick-date-input {
  cursor: pointer;
  caret-color: transparent;
}

body.crm-template .quick-date-picker {
  --qdp-bg: var(--bs-body-bg);
  --qdp-panel: var(--bs-secondary-bg);
  --qdp-line: var(--bs-border-color);
  --qdp-text: var(--bs-body-color);
  --qdp-muted: var(--bs-secondary-color);
  --qdp-soft: var(--bs-body-color);
  --qdp-primary: var(--crm-primary);
  --qdp-primary-strong: var(--crm-primary);
  --qdp-primary-soft: rgba(var(--crm-primary-rgb), .10);
}

.quick-date-picker {
  position: absolute;
  z-index: 20000;
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr);
  width: min(620px, calc(100vw - 24px));
  overflow: hidden;
  border: 1px solid var(--qdp-line);
  border-radius: var(--bs-border-radius-lg);
  background: var(--qdp-bg);
  box-shadow: var(--bs-box-shadow-lg);
  color: var(--qdp-text);
}

.quick-date-picker--mobile-panel {
  width: auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.quick-date-picker--single {
  width: min(540px, calc(100vw - 24px));
}

.quick-date-picker__sidebar {
  display: grid;
  align-content: start;
  border-right: 1px solid var(--qdp-line);
  background: var(--qdp-panel);
}

.quick-date-picker__preset,
.quick-date-picker__nav-button,
.quick-date-picker__field {
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
}

.quick-date-picker__preset {
  min-height: 44px;
  padding: 0 16px;
  border-bottom: 1px solid var(--qdp-line);
  color: var(--qdp-soft);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.quick-date-picker__preset:hover,
.quick-date-picker__preset:focus-visible {
  color: var(--qdp-primary-strong);
  background: var(--qdp-primary-soft);
  outline: 0;
}

.quick-date-picker__preset.is-muted-action {
  color: var(--qdp-muted);
}

.quick-date-picker__jump {
  display: grid;
  grid-template-columns: 40px 30px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-height: 48px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--qdp-line);
  color: var(--qdp-muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.quick-date-picker__jump input {
  width: 40px;
  min-width: 0;
  height: 30px;
  border: 1px solid var(--qdp-line);
  border-radius: var(--bs-border-radius);
  color: var(--qdp-text);
  background: var(--qdp-bg);
  text-align: center;
}

.quick-date-picker__jump button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--qdp-line);
  border-radius: var(--bs-border-radius);
  color: var(--qdp-primary-strong);
  background: var(--qdp-primary-soft);
  font-weight: 800;
}

.quick-date-picker__main {
  min-width: 0;
  padding: 14px;
}

.quick-date-picker__fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.quick-date-picker--single .quick-date-picker__fields {
  grid-template-columns: 1fr;
}

.quick-date-picker__field {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--qdp-line);
  border-radius: var(--bs-border-radius);
  background: var(--qdp-panel);
  color: var(--qdp-muted);
  font-size: 13px;
  font-weight: 700;
}

.quick-date-picker__field.is-active {
  border-color: var(--qdp-primary);
  color: var(--qdp-text);
  box-shadow: 0 0 0 .15rem rgba(var(--crm-primary-rgb), .16);
}

.quick-date-picker__nav {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 94px 34px;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.quick-date-picker__nav-button {
  width: 34px;
  height: 34px;
  border-radius: var(--bs-border-radius);
  color: var(--qdp-primary-strong);
  background: var(--qdp-primary-soft);
  font-size: 22px;
  line-height: 1;
}

.quick-date-picker__select {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 1px solid transparent;
  border-radius: var(--bs-border-radius);
  color: var(--qdp-text);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
}

.quick-date-picker__weekdays,
.quick-date-picker__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.quick-date-picker__weekdays span {
  padding: 7px 0;
  color: var(--qdp-muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.quick-date-picker__day {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  height: 38px;
  border: 0;
  color: var(--qdp-soft);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

.quick-date-picker__day span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
}

.quick-date-picker__day:hover span,
.quick-date-picker__day:focus-visible span,
.quick-date-picker__day.is-today span {
  box-shadow: inset 0 0 0 1px var(--qdp-primary);
}

.quick-date-picker__day.is-muted {
  color: var(--qdp-muted);
}

.quick-date-picker__day.is-in-range,
.quick-date-picker__day.is-range-start,
.quick-date-picker__day.is-range-end {
  background: var(--qdp-primary-soft);
}

.quick-date-picker__day.is-selected span,
.quick-date-picker__day.is-range-start span,
.quick-date-picker__day.is-range-end span {
  color: #fff;
  background: var(--qdp-primary);
  box-shadow: none;
}

.quick-date-picker__day.is-disabled {
  color: var(--qdp-muted);
  opacity: .42;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .quick-date-picker {
    grid-template-columns: 1fr;
  }

  .quick-date-picker__sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-right: 0;
    border-bottom: 1px solid var(--qdp-line);
  }

  .quick-date-picker__jump {
    grid-column: span 2;
  }
}

.input-file {
  min-height: 44px;
  padding: .42rem .55rem;
}

.input-file::file-selector-button {
  min-height: 30px;
  margin-right: 10px;
  padding: 0 12px;
  color: var(--crm-primary);
  border: 0;
  border-radius: var(--bs-border-radius);
  background: rgba(var(--crm-primary-rgb), .1);
  font-weight: 700;
}

.textarea {
  min-height: 110px;
  resize: vertical;
}

.field-error {
  margin: .35rem 0 0;
  color: var(--bs-danger);
  font-size: 13px;
}

.modal-header {
  align-items: flex-start;
}

.modal-header .btn-close {
  margin-top: 2px;
}

.modal-title {
  color: var(--bs-heading-color);
  font-weight: 600;
}

.modal-subtitle {
  margin: 4px 0 0;
  color: var(--crm-muted);
  font-size: 13px;
  line-height: 1.35;
}

.modal .form-grid {
  gap: 16px;
}

.modal-dialog-scrollable .modal-content > form {
  display: flex;
  flex-direction: column;
  max-height: 100%;
  min-height: 0;
}

.modal-dialog-scrollable .modal-content > form .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal .modal-footer {
  gap: 8px;
}

.btn-glass {
  color: var(--crm-primary);
  background-color: rgba(var(--crm-primary-rgb), .1);
  border-color: transparent;
}

.btn-glass:hover,
.btn-glass:focus {
  color: #fff;
  background-color: var(--crm-primary);
  border-color: var(--crm-primary);
}

.table-wrap {
  overflow-x: auto;
}

.crm-table {
  width: 100%;
  margin-bottom: 0;
  color: var(--bs-body-color);
  vertical-align: middle;
  border-color: var(--bs-border-color);
}

.crm-table th,
.crm-table td {
  padding: .75rem .75rem;
  border-bottom: var(--bs-border-width) solid var(--bs-border-color);
  text-align: start;
  vertical-align: middle;
}

.crm-table th {
  color: var(--crm-muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.crm-table tbody tr:hover td {
  background-color: rgba(var(--crm-primary-rgb), .04);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: .25em .65em;
  border-radius: 50rem;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.status-pending {
  color: var(--bs-warning-text-emphasis);
  background: var(--bs-warning-bg-subtle);
}

.status-confirmed,
.status-unpaid {
  color: var(--bs-primary-text-emphasis);
  background: var(--bs-primary-bg-subtle);
}

.status-completed,
.status-paid {
  color: var(--bs-success-text-emphasis);
  background: var(--bs-success-bg-subtle);
}

.status-cancelled,
.status-no-show {
  color: var(--bs-danger-text-emphasis);
  background: var(--bs-danger-bg-subtle);
}

.empty-state {
  display: grid;
  gap: 6px;
  padding: 1.5rem;
  color: var(--crm-muted);
  border: 1px dashed var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background: rgba(var(--bs-secondary-rgb), .05);
}

.empty-state strong {
  color: var(--bs-heading-color);
}

.empty-state.compact {
  padding: 1rem;
}

.customer-workspace-section .customer-empty-state,
.customer-workspace-summary .customer-empty-state {
  grid-column: 1 / -1;
  min-height: 112px;
  align-content: center;
  justify-items: start;
  border-style: solid;
  background: linear-gradient(135deg, rgba(var(--crm-primary-rgb), .055), rgba(var(--bs-secondary-rgb), .035));
}

.customer-workspace-section .customer-empty-state.compact,
.customer-workspace-summary .customer-empty-state.compact {
  padding: 1rem;
}

.customer-empty-state__icon {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: var(--bs-border-radius);
  color: var(--crm-primary);
  background: rgba(var(--crm-primary-rgb), .1);
}

.customer-empty-state__icon svg,
.customer-empty-state__icon [data-eva] {
  width: 18px;
  height: 18px;
}

.customer-empty-state > span:not(.customer-empty-state__icon) {
  max-width: 62ch;
  color: var(--crm-text-muted);
  font-size: .82rem;
  font-weight: 750;
  line-height: 1.5;
}

.customer-search-empty {
  margin-top: 0;
}

.stack-row,
.record-row,
.admin-record-card > summary,
.service-card > summary {
  display: grid;
  align-items: center;
  gap: 12px;
}

.stack-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 14px;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background: rgba(var(--bs-secondary-rgb), .05);
}

.stack-row strong,
.stack-row small,
.record-row strong,
.record-row small,
.admin-record-card summary strong,
.admin-record-card summary small,
.service-card summary strong,
.service-card summary small {
  display: block;
}

.stack-row small,
.record-row small,
.admin-record-card summary small,
.service-card summary small,
.service-card__description {
  color: var(--crm-muted);
}

.avatar-sm,
.payment-mark,
.service-card__icon {
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: var(--crm-primary);
  font-weight: 600;
}

.avatar-sm,
.payment-mark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
}

.admin-record-card,
.service-card {
  overflow: hidden;
  margin-bottom: 0;
}

.record-row {
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  min-height: 74px;
  padding: 14px 16px;
}

.customer-record-row {
  grid-template-columns: auto minmax(180px, 1.4fr) minmax(130px, .7fr) minmax(150px, .8fr) auto auto;
}

.customer-record-links {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.customer-record-links a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--crm-primary);
  background: var(--crm-soft);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  transition: transform .16s ease, background .16s ease, color .16s ease;
}

.customer-record-links a:hover,
.customer-record-links a:focus {
  color: #fff;
  background: var(--crm-primary);
  transform: translateY(-1px);
}

.customer-record-links svg,
.customer-record-links [data-eva] {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.customer-record-next {
  min-width: 0;
}

.customer-create-modal-grid {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.customer-logo-upload {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background: var(--crm-surface-soft);
}

.customer-logo-upload--compact {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.customer-logo-upload__preview {
  display: inline-grid;
  place-items: center;
  width: 72px;
  height: 72px;
  overflow: hidden;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  color: var(--crm-primary);
  background: var(--crm-surface);
}

.customer-logo-upload__preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.customer-logo-upload__preview svg,
.customer-logo-upload__preview [data-eva] {
  width: 26px;
  height: 26px;
}

.customer-file-label {
  display: block;
  margin-bottom: 7px;
  color: var(--bs-heading-color);
  font-size: 12px;
  font-weight: 800;
  text-align: left;
}

.customer-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.customer-file-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  width: 100%;
  margin: 0;
  padding: 0 14px;
  border: 1px dashed rgba(var(--crm-primary-rgb), .28);
  border-radius: var(--bs-border-radius);
  color: var(--crm-primary);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .72), rgba(var(--crm-primary-rgb), .055)),
    var(--crm-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
  font-size: .84rem;
  font-weight: 900;
  line-height: 1.2;
  cursor: pointer;
  text-align: center;
  transition: transform .16s ease, color .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.field label.customer-file-trigger,
.customer-logo-upload label.customer-file-trigger,
.customer-modal .field label.customer-file-trigger,
.customer-modal-section .field label.customer-file-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  font-size: .84rem;
  font-weight: 900;
}

.customer-file-trigger span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-file-meta {
  display: block;
  margin-top: 6px;
  color: var(--crm-text-muted);
  font-size: .72rem;
  font-weight: 850;
  text-align: center;
}

.customer-file-meta[hidden] {
  display: none;
}

.customer-file-trigger:hover,
.customer-file-trigger:focus {
  border-color: var(--crm-primary);
  color: #fff;
  background: var(--crm-primary);
  box-shadow: 0 10px 20px rgba(var(--crm-primary-rgb), .16);
  transform: translateY(-1px);
}

.customer-file-trigger.has-file {
  border-style: solid;
  color: var(--crm-heading);
  background:
    linear-gradient(180deg, rgba(var(--crm-success-rgb, 53, 166, 115), .1), rgba(var(--crm-primary-rgb), .06)),
    var(--crm-surface);
}

.customer-file-trigger.has-file:hover,
.customer-file-trigger.has-file:focus {
  color: #fff;
  background: var(--crm-primary);
}

.customer-file-trigger svg,
.customer-file-trigger [data-eva] {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

body.crm-template[data-theme="dark"] .customer-brand-avatar img,
body.crm-template[data-theme="dark"] .customer-logo-upload__preview,
body.crm-template[data-theme="dark"] .customer-logo-upload__preview img {
  background: var(--crm-surface-elevated);
}

body.crm-template[data-theme="dark"] .customer-file-trigger {
  background:
    linear-gradient(180deg, rgba(30, 41, 59, .62), rgba(var(--crm-primary-rgb), .12)),
    var(--crm-surface-elevated);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

body.crm-template[data-theme="dark"] .customer-file-trigger.has-file {
  color: var(--crm-heading);
  background:
    linear-gradient(180deg, rgba(var(--crm-primary-rgb), .14), rgba(30, 41, 59, .52)),
    var(--crm-surface-elevated);
}

body.crm-template[data-theme="dark"] .customer-record-links a {
  background: rgba(var(--crm-primary-rgb), .18);
}

body.crm-template[data-theme="dark"] .customer-timeline-row:hover,
body.crm-template[data-theme="dark"] .customer-timeline-row.is-visible:hover {
  background: var(--crm-surface-elevated);
}

.service-card > .record-row {
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  min-height: 76px;
}

.record-row > span {
  min-width: 0;
}

.record-row strong,
.record-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-row .status-pill {
  justify-self: end;
}

.record-open-btn {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.admin-record-card > summary {
  grid-template-columns: 44px minmax(0, 1fr) auto;
  min-height: 74px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.admin-record-card > summary::-webkit-details-marker,
.service-card > summary::-webkit-details-marker {
  display: none;
}

.admin-record-card > summary::after,
.service-card > summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--crm-muted);
  border-bottom: 2px solid var(--crm-muted);
  transform: rotate(45deg);
  color: var(--crm-muted);
}

.admin-record-card[open] > summary::after,
.service-card[open] > summary::after {
  transform: rotate(225deg);
}

.admin-record-card > summary .status-pill,
.service-card > summary .status-pill {
  justify-self: end;
}

.record-edit,
.admin-record-card > form,
.status-actions,
.service-edit-form,
.service-card form:last-child {
  padding: 16px;
  border-top: 1px solid var(--bs-border-color);
}

.status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  border-top: 1px solid var(--bs-border-color);
}

.mini-stats span {
  padding: 12px;
  border-radius: var(--bs-border-radius);
  color: var(--crm-muted);
  background: rgba(var(--bs-secondary-rgb), .08);
  font-size: 12px;
}

.mini-stats strong {
  display: block;
  margin-top: 4px;
  color: var(--bs-heading-color);
}

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

.record-modal-grid span,
.record-modal-note {
  padding: 12px;
  border-radius: var(--bs-border-radius);
  color: var(--crm-muted);
  background: rgba(var(--bs-secondary-rgb), .08);
  font-size: 12px;
}

.record-modal-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--bs-heading-color);
  word-break: break-word;
}

.record-modal-note {
  margin: 0 0 1.25rem;
  font-size: 13px;
  line-height: 1.5;
}

.record-edit-modal {
  padding-top: 1.25rem;
  border-top: 1px solid var(--bs-border-color);
}

.record-modal-grid + .record-edit-modal,
.record-modal-note + .record-edit-modal {
  margin-top: 1.25rem;
}

.modal-body .status-actions.record-modal-section {
  margin: 0 0 1.25rem;
  padding: 0 0 1rem;
  border-top: 0;
  border-bottom: 1px solid var(--bs-border-color);
}

.modal-footer > form {
  margin: 0 auto 0 0;
}

.toggle-line {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--bs-heading-color);
  font-size: 14px;
  font-weight: 500;
}

.toggle-line input,
.checkbox-grid input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--crm-primary);
}

.checkbox-grid {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
}

.checkbox-grid legend {
  width: auto;
  float: none;
  margin: 0;
  padding: 0 6px;
  color: var(--bs-heading-color);
  font-size: 13px;
  font-weight: 600;
}

.checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--crm-muted);
}

.service-pricing-grid {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
}

.service-pricing-grid legend {
  width: auto;
  float: none;
  margin: 0;
  padding: 0 6px;
  color: var(--bs-heading-color);
  font-size: 13px;
  font-weight: 600;
}

.service-pricing-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.35fr) repeat(3, minmax(92px, 0.65fr));
  gap: 10px;
  align-items: center;
}

.service-pricing-row--head {
  color: var(--crm-muted);
  font-size: 12px;
  font-weight: 700;
}

.service-pricing-row__service {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--bs-heading-color);
  font-size: 13px;
  font-weight: 600;
}

.service-pricing-row__service input {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  accent-color: var(--crm-primary);
}

.service-pricing-row__service span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.service-card > summary {
  grid-template-columns: 48px minmax(0, 1fr) auto auto;
  min-height: 76px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.service-card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--bs-border-radius);
  background: var(--service-accent, var(--crm-primary));
}

.service-card__icon i {
  font-size: 22px;
  line-height: 1;
}

.service-card__description {
  margin: 0;
  padding: 0 16px 16px 78px;
}

.progress-item {
  display: grid;
  gap: 8px;
}

.progress-item > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.progress-item span {
  color: var(--crm-muted);
}

.progress-track {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 50rem;
  background: rgba(var(--bs-secondary-rgb), .18);
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--crm-primary);
}

.schedule-row {
  display: grid;
  grid-template-columns: 110px 110px repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background: rgba(var(--bs-secondary-rgb), .05);
}

.schedule-row strong {
  font-size: 13px;
}

.schedule-source {
  display: block;
  margin-top: 2px;
  color: var(--bs-secondary-color);
  font-size: 11px;
  font-weight: 600;
}

.schedule-source--custom {
  color: var(--bs-primary);
}

.schedule-row--intervals {
  grid-template-columns: minmax(130px, 180px) minmax(0, 1fr);
  align-items: start;
}

.schedule-day-label {
  display: grid;
  gap: 8px;
}

.schedule-interval-grid {
  display: grid;
  gap: 8px;
}

.schedule-interval {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  align-items: end;
}

.schedule-time-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 0;
}

.schedule-time-field span {
  color: var(--bs-secondary-color);
  font-size: 12px;
  font-weight: 700;
}

.schedule-time-field .input {
  width: 100%;
}

.schedule-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.payment-record-card > summary {
  grid-template-columns: 44px minmax(0, 1fr) auto auto;
}

.report-stack-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.report-stack-row > div {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.report-stack-row > strong,
.report-progress strong {
  white-space: nowrap;
}

.crm-notification-scroll {
  max-height: 340px;
}

.crm-notification-item {
  position: relative;
  border-top: 1px solid var(--bs-border-color);
}

.crm-notification-item:first-child {
  border-top: 0;
}

.crm-notification-item.is-unread {
  background: rgba(var(--crm-primary-rgb), .06);
}

.crm-notification-item.is-unread::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--crm-primary);
}

.crm-notification-item h6,
.crm-notification-item p {
  overflow: hidden;
  text-overflow: ellipsis;
}

.crm-notification-item h6 {
  max-width: 250px;
  white-space: nowrap;
}

.crm-notification-item p.mb-0 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.crm-notification-empty {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 170px;
  padding: 24px;
  color: var(--crm-muted);
  text-align: center;
}

.crm-notification-empty .avatar-title {
  width: 44px;
  height: 44px;
}

.crm-push-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  margin-top: 12px;
  padding: 6px 10px;
  color: var(--crm-text);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  border: 1px solid var(--crm-border-soft);
  border-radius: 8px;
  background: var(--crm-surface-soft);
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}

.crm-push-toggle svg {
  width: 16px;
  height: 16px;
}

.crm-push-toggle:hover,
.crm-push-toggle.is-active {
  color: var(--crm-primary);
  border-color: rgba(var(--crm-primary-rgb), .28);
  background: rgba(var(--crm-primary-rgb), .08);
}

body.crm-command-palette-open {
  overflow: hidden;
}

.crm-command-palette[hidden] {
  display: none;
}

.crm-command-palette {
  position: fixed;
  inset: 0;
  z-index: 1085;
  display: grid;
  place-items: start center;
  padding: 8vh 16px 24px;
  pointer-events: none;
}

.crm-command-palette.is-open {
  pointer-events: auto;
}

.crm-command-palette__backdrop {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  background: rgba(15, 23, 42, .46);
  opacity: 0;
  transition: opacity .14s ease;
}

.crm-command-palette__dialog {
  position: relative;
  z-index: 1;
  overflow: hidden;
  width: min(720px, calc(100vw - 32px));
  max-height: min(76vh, 720px);
  color: var(--crm-text);
  border: 1px solid var(--crm-border-soft);
  border-radius: 8px;
  background: var(--crm-surface);
  box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
  opacity: 0;
  transform: translateY(-8px) scale(.985);
  transition: opacity .14s ease, transform .14s ease;
}

.crm-command-palette.is-open .crm-command-palette__backdrop {
  opacity: 1;
}

.crm-command-palette.is-open .crm-command-palette__dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.crm-command-palette__search {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--crm-border-soft);
}

.crm-command-palette__search > svg {
  color: var(--crm-muted);
}

.crm-command-palette__search input {
  width: 100%;
  min-width: 0;
  height: 42px;
  color: var(--crm-text);
  font-size: 16px;
  font-weight: 700;
  border: 0;
  outline: 0;
  background: transparent;
}

.crm-command-palette__search input::placeholder {
  color: var(--crm-muted);
}

.crm-command-palette__search button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--crm-muted);
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
}

.crm-command-palette__search button:hover,
.crm-command-palette__search button:focus-visible {
  color: var(--crm-text);
  border-color: var(--crm-border-soft);
  background: var(--crm-surface-soft);
}

.crm-command-palette__status {
  display: none;
  padding: 18px 20px;
  color: var(--crm-muted);
  font-size: 13px;
  font-weight: 700;
}

.crm-command-palette__status.is-active {
  display: block;
}

.crm-command-palette__results {
  display: grid;
  gap: 8px;
  max-height: calc(min(76vh, 720px) - 63px);
  padding: 10px;
  overflow: auto;
  transition: opacity 180ms ease, transform 220ms cubic-bezier(.22, 1, .36, 1);
}

.crm-command-palette__results.is-rendering {
  opacity: .35;
  transform: translateY(3px);
}

.crm-command-palette__group {
  display: grid;
  gap: 4px;
}

.crm-command-palette__group + .crm-command-palette__group {
  padding-top: 8px;
  border-top: 1px solid var(--crm-border-soft);
}

.crm-command-palette__group-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 0 8px;
  color: var(--crm-muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.crm-command-palette__group-label svg {
  width: 14px;
  height: 14px;
}

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

.crm-command-palette__item:hover,
.crm-command-palette__item.is-active {
  border-color: rgba(var(--crm-primary-rgb), .24);
  background: rgba(var(--crm-primary-rgb), .08);
}

.crm-command-palette__item-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--crm-primary);
  border-radius: 8px;
  background: rgba(var(--crm-primary-rgb), .1);
}

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

.crm-command-palette__item-copy strong,
.crm-command-palette__item-copy small,
.crm-command-palette__badge {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-command-palette__item-copy strong {
  color: var(--crm-heading);
  font-size: 14px;
  font-weight: 900;
}

.crm-command-palette__item-copy small {
  color: var(--crm-muted);
  font-size: 12px;
  font-weight: 700;
}

.crm-command-palette__badge {
  max-width: 150px;
  padding: 4px 8px;
  color: var(--crm-muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
  border: 1px solid var(--crm-border-soft);
  border-radius: 999px;
  background: var(--crm-surface-soft);
}

@media (max-width: 767.98px) {
  .crm-command-palette {
    place-items: end center;
    padding: 0;
    overflow: hidden;
  }

  .crm-command-palette__backdrop {
    background: rgba(15, 23, 42, .38);
    transition: opacity 380ms cubic-bezier(.4, 0, .2, 1);
  }

  .crm-command-palette__dialog {
    align-self: end;
    display: flex;
    flex-direction: column;
    width: min(430px, 100vw);
    height: min(74vh, 620px);
    height: min(74dvh, 620px);
    max-height: calc(100vh - env(safe-area-inset-top));
    max-height: calc(100dvh - env(safe-area-inset-top));
    border-bottom: 0;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -24px 70px rgba(15, 23, 42, .28);
    opacity: 1;
    transform: translate3d(0, calc(100% + 18px), 0);
    transform-origin: bottom center;
    transition: transform 420ms cubic-bezier(.4, 0, .2, 1);
    will-change: transform;
  }

  .crm-command-palette__dialog::before {
    content: "";
    display: block;
    width: 44px;
    height: 4px;
    margin: 10px auto 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, .5);
  }

  .crm-command-palette.is-open .crm-command-palette__dialog {
    transform: translate3d(0, 0, 0);
    transition: transform 460ms cubic-bezier(.16, 1, .3, 1);
  }

  .crm-command-palette.is-open .crm-command-palette__backdrop {
    transition-duration: 420ms;
    transition-timing-function: cubic-bezier(.22, 1, .36, 1);
  }

  .crm-command-palette__search {
    min-height: 66px;
    padding: 10px 14px 12px;
  }

  .crm-command-palette__results {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    padding: 10px 10px calc(14px + env(safe-area-inset-bottom));
  }

  .crm-command-palette__skeleton {
    display: grid;
    gap: 8px;
  }

  .crm-command-palette__skeleton-row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 8px 10px;
    border: 1px solid var(--crm-border-soft);
    border-radius: 12px;
    background: rgba(var(--crm-primary-rgb), .025);
  }

  .crm-command-palette__skeleton-icon,
  .crm-command-palette__skeleton-copy span {
    display: block;
    border-radius: 999px;
    background: var(--crm-border-soft);
    animation: crm-command-skeleton-pulse 900ms ease-in-out infinite alternate;
  }

  .crm-command-palette__skeleton-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .crm-command-palette__skeleton-copy {
    display: grid;
    gap: 7px;
  }

  .crm-command-palette__skeleton-copy span:first-child {
    width: min(58%, 190px);
    height: 10px;
  }

  .crm-command-palette__skeleton-copy span:last-child {
    width: min(38%, 130px);
    height: 8px;
    opacity: .72;
    animation-delay: 120ms;
  }

  .crm-command-palette__item {
    grid-template-columns: 34px minmax(0, 1fr);
    border-radius: 12px;
  }

  .crm-command-palette__badge {
    grid-column: 2;
    justify-self: start;
    max-width: 100%;
  }

  @keyframes crm-command-skeleton-pulse {
    from { opacity: .46; }
    to { opacity: .92; }
  }

  .crm-command-palette__search,
  .crm-command-palette__status,
  .crm-command-palette__group {
    opacity: 0;
    transform: translateY(8px) scale(.992);
    transition:
      opacity 160ms ease,
      transform 200ms ease;
  }

  .crm-command-palette.is-open .crm-command-palette__search,
  .crm-command-palette.is-open .crm-command-palette__status,
  .crm-command-palette.is-open .crm-command-palette__group {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  .crm-command-palette.is-open .crm-command-palette__search {
    transition-delay: 90ms;
    transition-duration: 280ms, 360ms;
    transition-timing-function: ease-out, cubic-bezier(.16, 1, .3, 1);
  }

  .crm-command-palette.is-open .crm-command-palette__status,
  .crm-command-palette.is-open .crm-command-palette__group {
    transition-delay: 140ms;
    transition-duration: 300ms, 380ms;
    transition-timing-function: ease-out, cubic-bezier(.16, 1, .3, 1);
  }

  .crm-command-palette.is-closing .crm-command-palette__search,
  .crm-command-palette.is-closing .crm-command-palette__status,
  .crm-command-palette.is-closing .crm-command-palette__group {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: none;
  }
}

@media (max-width: 767.98px) and (prefers-reduced-motion: reduce) {
  .crm-command-palette__backdrop,
  .crm-command-palette__dialog,
  .crm-command-palette__search,
  .crm-command-palette__status,
  .crm-command-palette__group {
    clip-path: none !important;
    transform: none !important;
    transition: none !important;
  }

  .crm-command-palette__skeleton-icon,
  .crm-command-palette__skeleton-copy span {
    animation: none !important;
  }
}

.notification-stack-root {
  position: fixed;
  top: 86px;
  right: 22px;
  z-index: 1090;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}

.notification-stack-item {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--bs-border-color);
  border-left: 4px solid var(--crm-primary);
  border-radius: var(--bs-border-radius);
  color: var(--bs-body-color);
  background: var(--bs-secondary-bg);
  box-shadow: var(--bs-box-shadow-lg);
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity .2s ease, transform .2s ease;
}

.notification-stack-item:hover {
  color: var(--bs-body-color);
}

.notification-stack-item strong {
  color: var(--bs-heading-color);
  font-weight: 600;
}

.notification-stack-item span {
  color: var(--crm-muted);
  font-size: 13px;
  line-height: 1.4;
}

.notification-stack-item.is-hiding {
  opacity: 0;
  transform: translateY(-8px);
}

.toast-root {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: grid;
  gap: 10px;
  z-index: 1100;
}

.toast {
  max-width: 360px;
  padding: 14px 16px;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  color: var(--bs-body-color);
  background: var(--bs-secondary-bg);
  box-shadow: var(--crm-shadow);
}

body.crm-template .swal2-container {
  z-index: 20000;
}

body.crm-template .swal2-popup {
  border-radius: var(--bs-border-radius);
  box-shadow: var(--bs-box-shadow-lg);
}

body.crm-template .swal2-title {
  color: var(--bs-heading-color);
  font-weight: 600;
}

body.crm-template .swal2-html-container {
  color: var(--crm-muted);
}

body.crm-auth-template {
  background: var(--bs-body-bg);
}

.crm-auth-template .authentication-bg {
  background-image: url("../themeforest/images/bg-auth.png");
  background-position: center;
  background-size: cover;
}

.crm-auth-template .auth-logo-text {
  color: var(--bs-heading-color);
  font-size: 22px;
  font-weight: 600;
}

/* Installer first-run experience */
body.crm-auth-template--setup {
  --installer-bg: #f5f7fb;
  --installer-ink: #111827;
  --installer-muted: #667085;
  --installer-soft: #eef3fb;
  --installer-line: rgba(15, 23, 42, .12);
  --installer-line-strong: rgba(15, 23, 42, .18);
  --installer-blue: #245dcc;
  --installer-blue-dark: #1f4fb2;
  --installer-blue-soft: rgba(36, 93, 204, .1);
  --installer-green: #16824a;
  --installer-green-soft: rgba(22, 130, 74, .11);
  --installer-amber: #9a6a16;
  --installer-amber-soft: #fff3cd;
  --installer-red: #b42318;
  --installer-red-soft: #fff0ee;
  --installer-ease: cubic-bezier(.22, 1, .36, 1);
  background: var(--installer-bg);
  overflow-x: hidden;
}

.crm-auth-template--setup .authentication-bg {
  background:
    linear-gradient(180deg, #eef3fb 0, #f7f9fc 180px, var(--installer-bg) 100%),
    var(--installer-bg);
}

.crm-auth-template--setup .authentication-bg .container {
  width: 100%;
  max-width: none;
  padding-inline: clamp(28px, 5vw, 76px);
}

.crm-auth-template--setup .authentication-bg .d-flex.flex-column {
  padding-inline: 0 !important;
}

.crm-auth-template--setup .authentication-bg .row.justify-content-center {
  margin-inline: 0;
}

.crm-auth-template--setup .authentication-bg .row.justify-content-center.my-auto {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 24px;
  padding-bottom: 40px;
}

.crm-auth-template--setup .authentication-bg .row.justify-content-center > [class*="col-"] {
  padding-inline: 0;
}

.crm-auth-template--setup .installer-shell-card {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.crm-auth-template--setup .installer-shell-card > .card-body {
  padding: 0 !important;
}

.crm-auth-template--setup .auth-logo {
  display: inline-flex !important;
  align-items: center;
}

.crm-auth-template--setup .auth-logo-text {
  color: var(--installer-ink);
  letter-spacing: 0;
}

.crm-auth-template--setup .language-switcher--auth {
  margin-top: 0 !important;
  margin-left: 14px;
  vertical-align: middle;
}

.crm-auth-template--setup .installer-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: 20px 0 16px;
  border-bottom: 1px solid var(--installer-line);
  color: var(--installer-ink);
  animation: installerRevealUp 560ms var(--installer-ease) 130ms both;
}

.crm-auth-template--setup .installer-hero__content {
  max-width: 720px;
}

.crm-auth-template--setup .installer-hero h2 {
  margin: 0;
  color: var(--installer-ink);
  font-size: clamp(24px, 2.4vw, 34px);
  font-weight: 740;
  line-height: 1.1;
  letter-spacing: 0;
}

.crm-auth-template--setup .installer-hero p {
  max-width: 700px;
  margin: 8px 0 0;
  color: var(--installer-muted);
  font-size: 13px;
  line-height: 1.55;
}

.crm-auth-template--setup .installer-health {
  flex: 0 0 auto;
  min-width: 108px;
  padding-left: 18px;
  border-left: 1px solid var(--installer-line);
  color: var(--installer-muted);
  text-align: left;
}

.crm-auth-template--setup .installer-health span,
.crm-auth-template--setup .installer-health small {
  display: block;
  color: var(--installer-muted);
  font-size: 11px;
  font-weight: 820;
  line-height: 1.1;
  text-transform: uppercase;
}

.crm-auth-template--setup .installer-health strong {
  display: block;
  margin: 5px 0 3px;
  color: var(--installer-blue);
  font-size: 24px;
  font-weight: 820;
  line-height: .95;
}

.crm-auth-template--setup .installer-status-strip {
  display: inline-grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 12px;
  max-width: 100%;
  margin: 16px 0 0;
  padding: 10px 14px;
  border: 1px solid var(--installer-line);
  border-left: 3px solid var(--installer-line-strong);
  border-radius: 8px;
  color: var(--installer-ink);
  font-size: 12px;
  animation: installerRevealUp 500ms var(--installer-ease) both;
}

.crm-auth-template--setup .installer-status-strip strong {
  font-weight: 820;
}

.crm-auth-template--setup .installer-status-strip span {
  color: var(--installer-muted);
}

.crm-auth-template--setup .installer-status-strip.is-warning {
  border-left-color: #f0b429;
  background: rgba(255, 243, 205, .58);
}

.crm-auth-template--setup .installer-status-strip.is-danger {
  border-left-color: var(--installer-red);
  background: rgba(255, 240, 238, .7);
}

.crm-auth-template--setup .installer-status-strip.is-success {
  border-left-color: var(--installer-green);
  background: rgba(22, 130, 74, .08);
}

.crm-auth-template--setup .installer-status-strip.is-muted {
  border-left-color: rgba(36, 93, 204, .35);
  background: rgba(36, 93, 204, .07);
}

.crm-auth-template--setup .installer-workspace {
  display: grid;
  grid-template-columns: minmax(292px, 340px) minmax(0, 1fr);
  gap: clamp(30px, 4vw, 58px);
  padding-top: 22px;
  animation: installerRevealUp 600ms var(--installer-ease) 260ms both;
}

.crm-auth-template--setup .installer-sidebar {
  padding: 0 clamp(22px, 3vw, 34px) 0 0;
  border-right: 1px solid var(--installer-line);
}

.crm-auth-template--setup .installer-sidebar__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--installer-line);
}

.crm-auth-template--setup .installer-sidebar__head .fw-semibold {
  display: block;
  color: var(--installer-ink);
  font-size: 15px;
  font-weight: 820;
}

.crm-auth-template--setup .installer-sidebar__head small {
  display: block;
  margin-top: 5px;
  color: var(--installer-muted);
  font-size: 12px;
}

.crm-auth-template--setup .installer-step-count {
  color: var(--installer-blue);
  font-size: 13px;
  font-weight: 820;
}

.crm-auth-template--setup .installer-progress {
  height: 4px;
  margin: 16px 0 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .1);
}

.crm-auth-template--setup .installer-progress .progress-bar {
  border-radius: inherit;
  background: var(--installer-blue);
  transition: width 520ms var(--installer-ease);
}

.crm-auth-template--setup .installer-steps {
  display: grid;
  gap: 0;
}

.crm-auth-template--setup .installer-step {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) minmax(54px, auto);
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 12px 12px 12px 0;
  border-left: 0;
  border-bottom: 1px solid rgba(15, 23, 42, .08);
  color: var(--installer-ink);
  text-decoration: none;
  transition: background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.crm-auth-template--setup .installer-step:hover {
  background: rgba(255, 255, 255, .5);
  transform: translateX(2px);
}

.crm-auth-template--setup .installer-step.is-active {
  background: rgba(36, 93, 204, .07);
  box-shadow: inset 3px 0 0 var(--installer-blue);
}

.crm-auth-template--setup .installer-step.is-locked {
  opacity: .5;
}

.crm-auth-template--setup .installer-step__index {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(15, 23, 42, .07);
  color: var(--installer-muted);
  font-size: 12px;
  font-weight: 820;
}

.crm-auth-template--setup .installer-step.is-active .installer-step__index {
  background: var(--installer-blue);
  color: #fff;
}

.crm-auth-template--setup .installer-step.is-done:not(.is-active) .installer-step__index {
  background: var(--installer-green-soft);
  color: var(--installer-green);
}

.crm-auth-template--setup .installer-step__body {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.crm-auth-template--setup .installer-step__label {
  color: var(--installer-ink);
  font-size: 13px;
  font-weight: 820;
}

.crm-auth-template--setup .installer-step__title {
  color: var(--installer-muted);
  font-size: 11px;
  line-height: 1.35;
}

.crm-auth-template--setup .installer-step__badge {
  justify-self: end;
  min-width: 48px;
  padding: 3px 0;
  text-align: right;
  color: var(--installer-muted);
  font-size: 10px;
  font-weight: 820;
  white-space: nowrap;
}

.crm-auth-template--setup .installer-step__badge.is-now {
  color: var(--installer-blue);
}

.crm-auth-template--setup .installer-step__badge.is-done {
  color: var(--installer-green);
}

.crm-auth-template--setup .installer-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--installer-line);
}

.crm-auth-template--setup .installer-facts span,
.crm-auth-template--setup .installer-summary-grid span {
  display: block;
  color: var(--installer-muted);
  font-size: 11px;
  font-weight: 780;
}

.crm-auth-template--setup .installer-facts strong,
.crm-auth-template--setup .installer-summary-grid strong {
  display: block;
  margin-top: 6px;
  color: var(--installer-ink);
  font-size: 14px;
  font-weight: 820;
  overflow-wrap: anywhere;
}

.crm-auth-template--setup .installer-main {
  min-width: 0;
  min-height: 480px;
}

.crm-auth-template--setup .installer-step-panel {
  min-width: 0;
}

.crm-auth-template--setup .installer-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--installer-line);
}

.crm-auth-template--setup .installer-panel-head span {
  display: block;
  color: var(--installer-blue);
  font-size: 12px;
  font-weight: 820;
}

.crm-auth-template--setup .installer-panel-head h3 {
  margin: 4px 0 0;
  color: var(--installer-ink);
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 740;
  line-height: 1.12;
}

.crm-auth-template--setup .installer-panel-head p {
  margin: 8px 0 0;
  color: var(--installer-muted);
  font-size: 14px;
}

.crm-auth-template--setup .installer-panel-status,
.crm-auth-template--setup .installer-inline-status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(15, 23, 42, .06);
  color: var(--installer-muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 820;
}

.crm-auth-template--setup .installer-panel-status.is-success,
.crm-auth-template--setup .installer-inline-status.is-success {
  background: var(--installer-green-soft);
  color: var(--installer-green);
}

.crm-auth-template--setup .installer-panel-status.is-warning,
.crm-auth-template--setup .installer-inline-status.is-warning {
  background: rgba(240, 180, 41, .14);
  color: var(--installer-amber);
}

.crm-auth-template--setup .installer-panel-status.is-danger,
.crm-auth-template--setup .installer-inline-status.is-danger {
  background: rgba(180, 35, 24, .1);
  color: var(--installer-red);
}

.crm-auth-template--setup .installer-reveal-stack {
  display: grid;
  gap: 0;
  padding-top: 14px;
}

.crm-auth-template--setup .installer-reveal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.crm-auth-template--setup .installer-drawer-reveal {
  min-width: 0;
  padding: 18px 0;
  border-top: 1px solid var(--installer-line);
  background: transparent;
  opacity: 0;
  transform: translateY(16px);
  animation: installerDrawerReveal 520ms var(--installer-ease) both;
}

.crm-auth-template--setup .installer-reveal-stack > .installer-drawer-reveal:nth-child(1),
.crm-auth-template--setup .installer-form > .installer-drawer-reveal:nth-child(1) {
  animation-delay: 80ms;
}

.crm-auth-template--setup .installer-reveal-stack > .installer-drawer-reveal:nth-child(2),
.crm-auth-template--setup .installer-form > .installer-drawer-reveal:nth-child(2),
.crm-auth-template--setup .installer-reveal-grid > .installer-drawer-reveal:nth-child(1) {
  animation-delay: 150ms;
}

.crm-auth-template--setup .installer-reveal-stack > .installer-drawer-reveal:nth-child(3),
.crm-auth-template--setup .installer-form > .installer-drawer-reveal:nth-child(3),
.crm-auth-template--setup .installer-reveal-grid > .installer-drawer-reveal:nth-child(2) {
  animation-delay: 220ms;
}

.crm-auth-template--setup .installer-reveal-stack > .installer-drawer-reveal:nth-child(4),
.crm-auth-template--setup .installer-form > .installer-drawer-reveal:nth-child(4) {
  animation-delay: 290ms;
}

.crm-auth-template--setup .installer-drawer-reveal__head,
.crm-auth-template--setup .installer-section-title {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
}

.crm-auth-template--setup .installer-section-title {
  grid-template-columns: 34px minmax(0, 1fr);
  margin-bottom: 16px;
}

.crm-auth-template--setup .installer-drawer-reveal__head > span,
.crm-auth-template--setup .installer-section-title > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(36, 93, 204, .08);
  color: var(--installer-blue);
  font-size: 11px;
  font-weight: 820;
}

.crm-auth-template--setup .installer-drawer-reveal h4,
.crm-auth-template--setup .installer-section-title h4 {
  margin: 0;
  color: var(--installer-ink);
  font-size: 16px;
  font-weight: 820;
}

.crm-auth-template--setup .installer-drawer-reveal p,
.crm-auth-template--setup .installer-section-title p {
  margin: 6px 0 0;
  color: var(--installer-muted);
  font-size: 14px;
  line-height: 1.6;
}

.crm-auth-template--setup .installer-drawer-reveal ul {
  margin: 10px 0 0;
  padding-left: 1.1rem;
  color: var(--installer-muted);
  font-size: 13px;
  line-height: 1.65;
}

.crm-auth-template--setup .installer-drawer-reveal li + li {
  margin-top: 4px;
}

.crm-auth-template--setup .installer-form {
  display: grid;
  gap: 0;
}

.crm-auth-template--setup .installer-main .form-label {
  color: var(--installer-ink);
  font-size: 12px;
  font-weight: 820;
}

.crm-auth-template--setup .installer-main .form-control,
.crm-auth-template--setup .installer-main .form-select,
.crm-auth-template--setup .installer-main .input {
  min-height: 44px;
  border-color: var(--installer-line);
  border-radius: 8px;
  background-color: rgba(255, 255, 255, .84);
  color: var(--installer-ink);
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.crm-auth-template--setup .installer-main .form-control:focus,
.crm-auth-template--setup .installer-main .form-select:focus,
.crm-auth-template--setup .installer-main .input:focus {
  border-color: rgba(36, 93, 204, .5);
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(36, 93, 204, .11);
}

.crm-auth-template--setup .installer-main .form-text,
.crm-auth-template--setup .installer-main .text-muted,
.crm-auth-template--setup .installer-main .small {
  color: var(--installer-muted) !important;
}

.crm-auth-template--setup .installer-main code {
  color: #be185d;
  overflow-wrap: anywhere;
}

.crm-auth-template--setup .installer-note {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 0 14px 16px;
  border-left: 3px solid rgba(36, 93, 204, .35);
}

.crm-auth-template--setup .installer-note > span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--installer-blue-soft);
  color: var(--installer-blue);
}

.crm-auth-template--setup .installer-note strong,
.crm-auth-template--setup .installer-note small {
  display: block;
}

.crm-auth-template--setup .installer-note strong {
  color: var(--installer-ink);
  font-weight: 820;
}

.crm-auth-template--setup .installer-note small {
  margin-top: 3px;
  color: var(--installer-muted);
}

.crm-auth-template--setup .installer-check-list {
  display: grid;
  gap: 0;
}

.crm-auth-template--setup .installer-check-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 58px;
  padding: 13px 0;
  border-bottom: 1px solid var(--installer-line);
}

.crm-auth-template--setup .installer-check-row strong,
.crm-auth-template--setup .installer-check-row span {
  display: block;
}

.crm-auth-template--setup .installer-check-row strong {
  color: var(--installer-ink);
  font-size: 13px;
  font-weight: 820;
}

.crm-auth-template--setup .installer-check-row span {
  margin-top: 4px;
  color: var(--installer-muted);
  font-size: 12px;
  line-height: 1.45;
}

.crm-auth-template--setup .installer-check-row em {
  min-width: 70px;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(15, 23, 42, .06);
  color: var(--installer-muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 820;
  text-align: center;
}

.crm-auth-template--setup .installer-check-row.is-success em {
  background: var(--installer-green-soft);
  color: var(--installer-green);
}

.crm-auth-template--setup .installer-check-row.is-warning em {
  background: rgba(240, 180, 41, .14);
  color: var(--installer-amber);
}

.crm-auth-template--setup .installer-check-row.is-danger em {
  background: rgba(180, 35, 24, .1);
  color: var(--installer-red);
}

.crm-auth-template--setup .installer-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--installer-line);
}

.crm-auth-template--setup .installer-summary-grid > div {
  min-width: 0;
  padding: 15px 18px 15px 0;
  border-bottom: 1px solid var(--installer-line);
}

.crm-auth-template--setup .installer-summary-grid > div + div {
  padding-left: 18px;
  border-left: 1px solid var(--installer-line);
}

.crm-auth-template--setup .installer-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 24px;
}

.crm-auth-template--setup .installer-main .btn {
  min-height: 42px;
  border-radius: 8px;
  font-weight: 820;
  transition: transform 140ms ease, box-shadow 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.crm-auth-template--setup .installer-main .btn:hover {
  transform: translateY(-1px);
}

.crm-auth-template--setup .installer-main .btn:active {
  transform: translateY(0);
}

.crm-auth-template--setup .installer-main .btn-primary {
  border-color: var(--installer-blue);
  background: var(--installer-blue);
  box-shadow: 0 14px 26px rgba(36, 93, 204, .16);
}

.crm-auth-template--setup .installer-main .btn-primary:hover {
  border-color: var(--installer-blue-dark);
  background: var(--installer-blue-dark);
  box-shadow: 0 18px 32px rgba(36, 93, 204, .2);
}

.crm-auth-template--setup .installer-main .btn-outline-primary {
  border-color: rgba(36, 93, 204, .36);
  color: var(--installer-blue);
}

.crm-auth-template--setup .installer-password-meter::before {
  background: rgba(15, 23, 42, .1);
}

@keyframes installerRevealUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes installerDrawerReveal {
  from {
    opacity: 0;
    transform: translateY(18px) scale(.995);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 991.98px) {
  .crm-auth-template--setup .installer-workspace {
    grid-template-columns: 1fr;
  }

  .crm-auth-template--setup .installer-sidebar {
    padding: 0 0 26px;
    border-right: 0;
    border-bottom: 1px solid var(--installer-line);
  }

}

@media (max-width: 767.98px) {
  .crm-auth-template--setup .language-switcher--auth {
    display: inline-flex;
    margin: 12px 0 0;
  }

  .crm-auth-template--setup .installer-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .crm-auth-template--setup .installer-health {
    width: 100%;
    padding: 16px 0 0;
    border-top: 1px solid var(--installer-line);
    border-left: 0;
  }

  .crm-auth-template--setup .installer-status-strip {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .crm-auth-template--setup .installer-reveal-grid,
  .crm-auth-template--setup .installer-summary-grid {
    grid-template-columns: 1fr;
  }

  .crm-auth-template--setup .installer-summary-grid > div + div {
    padding-left: 0;
    border-left: 0;
  }

  .crm-auth-template--setup .installer-drawer-reveal__head,
  .crm-auth-template--setup .installer-section-title {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .crm-auth-template--setup .installer-inline-status {
    grid-column: 2;
    justify-self: start;
    margin-top: 8px;
  }

  .crm-auth-template--setup .installer-actions,
  .crm-auth-template--setup .installer-actions > .d-flex {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .crm-auth-template--setup .installer-actions .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .crm-auth-template--setup .installer-hero,
  .crm-auth-template--setup .installer-workspace,
  .crm-auth-template--setup .installer-status-strip,
  .crm-auth-template--setup .installer-drawer-reveal {
    opacity: 1;
    transform: none;
    filter: none;
    animation: none;
    transition: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.crm-transition-enabled body.crm-template .main-content .page-content > .container-fluid,
  html.crm-transition-enabled body.crm-auth-template .authentication-bg .auth-logo,
  html.crm-transition-enabled body.crm-auth-template .authentication-bg .card {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }

  html.crm-transition-enabled body.crm-template .main-content .page-content > .container-fluid {
    view-transition-name: none;
  }
}

@media (max-width: 1199.98px) {
  .crm-calendar-toolbar {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .crm-calendar-search {
    flex: 1 1 220px;
    width: auto;
  }

  .crm-calendar-view-switch {
    justify-self: auto;
  }

  .metric-grid,
  .crm-calendar-stat-strip,
  .reports-grid,
  .settings-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid,
  .crm-calendar-dashboard,
  .customer-record-grid,
  .customer-record-layout,
  .customer-overview-grid,
  .customer-finance-grid,
  .admin-two-column,
  .services-layout,
  .reports-toolbar {
    grid-template-columns: 1fr;
  }

  .customer-recent-activity-card,
  .customer-next-action {
    grid-column: auto;
    grid-row: auto;
  }

  .customer-overview-grid .customer-record-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-calendar-stat-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .dashboard-secondary-grid {
    grid-template-columns: 1fr;
  }

  .service-form-panel {
    position: static;
  }
}

@media (max-width: 767.98px) {
  .dashboard-hero,
  .crm-calendar-intro,
  .crm-calendar-toolbar,
  .customer-record-hero,
  .customer-timeline-header,
  .settings-savebar {
    align-items: flex-start;
    flex-direction: column;
  }

  .metric-grid,
  .crm-calendar-stat-strip,
  .reports-grid,
  .settings-layout,
  .form-grid,
  .filter-bar,
  .filter-bar-wide,
  .reports-filter,
  .mini-stats,
  .record-modal-grid,
  .service-pricing-row,
  .schedule-row {
    grid-template-columns: 1fr;
  }

  .crm-calendar-stat-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .crm-calendar-card,
  .crm-calendar-left,
  .crm-calendar-sidebar {
    height: auto;
    min-height: auto;
    max-height: none;
  }

  .crm-calendar-dashboard {
    padding-bottom: 86px;
  }

  .crm-calendar-card {
    order: 1;
  }

  .crm-calendar-sidebar {
    order: 2;
  }

  .crm-calendar-left {
    order: 3;
  }

  .crm-calendar-left,
  .crm-calendar-sidebar {
    overflow: visible;
  }

  .crm-calendar-toolbar,
  .crm-calendar-nav,
  .crm-calendar-search,
  .crm-calendar-view-switch {
    width: 100%;
  }

  .crm-calendar-toolbar {
    justify-content: flex-start;
  }

  .crm-calendar-nav,
  .crm-calendar-search,
  .crm-calendar-view-switch {
    flex: 0 0 auto;
  }

  .crm-calendar-nav {
    flex-wrap: wrap;
  }

  .crm-calendar-view-switch {
    overflow-x: auto;
  }

  .crm-calendar-view-switch button {
    flex: 1 0 auto;
  }

  .crm-calendar-grid {
    min-height: 520px;
    overflow: visible;
  }

  .crm-calendar-grid .fc .fc-view-harness {
    min-height: 480px;
  }

  .crm-calendar-grid .fc .fc-daygrid-day-frame {
    min-height: 82px;
  }

  .crm-calendar-grid .fc {
    font-size: 12px;
  }

  .crm-calendar-grid.fc,
  .crm-calendar-grid .fc {
    font-size: 12px;
  }

  .crm-calendar-grid.fc .fc-scrollgrid,
  .crm-calendar-grid .fc .fc-scrollgrid {
    border-radius: 7px;
  }

  .crm-calendar-grid.fc .fc-col-header-cell,
  .crm-calendar-grid .fc .fc-col-header-cell {
    height: 32px;
  }

  .crm-calendar-grid.fc .fc-col-header-cell-cushion,
  .crm-calendar-grid .fc .fc-col-header-cell-cushion {
    font-size: 11px;
  }

  .crm-calendar-grid.fc .fc-daygrid-day-frame,
  .crm-calendar-grid .fc .fc-daygrid-day-frame {
    min-height: 72px;
    padding: 3px 2px;
    overflow: hidden;
  }

  .crm-calendar-grid.fc .fc-daygrid-day-top,
  .crm-calendar-grid .fc .fc-daygrid-day-top {
    padding: 0 1px;
  }

  .crm-calendar-grid.fc .fc-daygrid-day-number,
  .crm-calendar-grid .fc .fc-daygrid-day-number {
    padding: 2px 4px;
    font-size: 11px;
    line-height: 1;
  }

  .crm-calendar-grid.fc .fc-daygrid-day.is-selected-day .fc-daygrid-day-number,
  .crm-calendar-grid .fc .fc-daygrid-day.is-selected-day .fc-daygrid-day-number {
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
  }

  .crm-calendar-grid.fc .fc-daygrid-day-events,
  .crm-calendar-grid .fc .fc-daygrid-day-events {
    display: grid;
    gap: 2px;
    margin: 1px 1px 0;
    max-width: 100%;
    overflow: hidden;
  }

  .crm-calendar-grid.fc .fc-daygrid-event-harness,
  .crm-calendar-grid .fc .fc-daygrid-event-harness {
    max-width: 100%;
    margin-top: 0 !important;
    overflow: hidden;
  }

  .crm-calendar-grid.fc .fc-daygrid-event,
  .crm-calendar-grid .fc .fc-daygrid-event {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 16px;
    margin: 0;
    border-left-width: 0;
    border-radius: 5px;
  }

  .crm-calendar-grid.fc .fc-daygrid-event .fc-event-main,
  .crm-calendar-grid .fc .fc-daygrid-event .fc-event-main {
    width: 100%;
    min-width: 0;
    padding: 2px 1px;
    overflow: hidden;
  }

  .crm-calendar-grid.fc .fc-daygrid-event .crm-calendar-event-inner,
  .crm-calendar-grid .fc .fc-daygrid-event .crm-calendar-event-inner {
    width: 100%;
    min-width: 0;
    justify-content: center;
    gap: 0;
    overflow: hidden;
  }

  .crm-calendar-grid.fc .fc-daygrid-event .crm-calendar-event-time,
  .crm-calendar-grid .fc .fc-daygrid-event .crm-calendar-event-time {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    font-size: 8px;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
    text-overflow: clip;
    white-space: nowrap;
  }

  .crm-calendar-grid.fc .fc-daygrid-event .crm-calendar-event-title,
  .crm-calendar-grid .fc .fc-daygrid-event .crm-calendar-event-title,
  .crm-calendar-grid.fc .fc-daygrid-event .crm-calendar-dot,
  .crm-calendar-grid .fc .fc-daygrid-event .crm-calendar-dot {
    display: none;
  }

  .crm-calendar-grid.fc .fc-timegrid-event,
  .crm-calendar-grid .fc .fc-timegrid-event {
    min-height: 34px;
    border-left-width: 3px;
    border-radius: 7px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
  }

  .crm-calendar-grid.fc .fc-timegrid-event .fc-event-main,
  .crm-calendar-grid .fc .fc-timegrid-event .fc-event-main {
    padding: 5px 6px;
  }

  .crm-calendar-grid.fc .fc-timegrid-event .crm-calendar-event-inner,
  .crm-calendar-grid .fc .fc-timegrid-event .crm-calendar-event-inner {
    display: grid;
    gap: 1px;
    min-width: 0;
  }

  .crm-calendar-grid.fc .fc-timegrid-event .crm-calendar-event-time,
  .crm-calendar-grid .fc .fc-timegrid-event .crm-calendar-event-time {
    min-width: 0;
    overflow: hidden;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .crm-calendar-grid.fc .fc-timegrid-event .crm-calendar-event-title,
  .crm-calendar-grid .fc .fc-timegrid-event .crm-calendar-event-title {
    display: block;
    min-width: 0;
    overflow: hidden;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .crm-calendar-grid.fc .fc-timegrid-event .crm-calendar-dot,
  .crm-calendar-grid .fc .fc-timegrid-event .crm-calendar-dot {
    display: none;
  }

  .crm-calendar-grid.fc .fc-daygrid-more-link,
  .crm-calendar-grid .fc .fc-daygrid-more-link {
    font-size: 10px;
    font-weight: 800;
  }

  .crm-calendar-agenda-list {
    max-height: none;
  }

  .crm-calendar-sidebar__day-view,
  .crm-calendar-agenda {
    flex: 0 0 auto;
  }

  .customer-record-actions,
  .customer-record-actions .btn,
  .customer-timeline-filters {
    width: 100%;
  }

  .customer-record-actions .btn {
    justify-content: center;
  }

  .customer-record-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .customers-record-card {
    grid-template-areas:
      "identity"
      "contact"
      "touch"
      "signals"
      "actions";
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .customers-record-main,
  .customers-record-contact,
  .customers-record-touchpoint,
  .customers-record-signals,
  .customers-record-digital,
  .customers-record-actions {
    grid-column: 1 / -1;
  }

  .customers-record-main {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .customers-record-signals {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customers-record-digital {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-create-shell,
  .customer-create-main,
  .customer-create-columns,
  .customer-record-kpis,
  .customer-relationship-map {
    grid-template-columns: 1fr;
  }

  .customer-modal .modal-dialog.modal-xl {
    max-width: calc(100vw - 18px);
  }

  .customer-create-main .customer-modal-section:last-child {
    grid-column: auto;
  }

  .customer-overview-grid .customer-record-kpis {
    grid-template-columns: 1fr;
  }

  .customer-record-links,
  .customer-record-next,
  .customer-record-row .status-pill,
  .customer-record-row .record-open-btn {
    grid-column: 2;
    justify-self: start;
  }

  .customer-create-modal-grid,
  .customer-logo-upload--compact {
    grid-template-columns: 1fr;
  }

  .customer-logo-upload__preview {
    width: 72px;
    height: 72px;
  }

  .service-pricing-row--head {
    display: none;
  }

  .schedule-interval {
    grid-template-columns: 1fr 1fr;
  }

  .crud-page > .panel,
  .metric-grid + .crud-page > .panel,
  .dashboard-grid > .panel,
  .dashboard-grid > .panel-large,
  .reports-grid > .report-section,
  .settings-card,
  .schedule-tabs-card {
    min-height: auto;
    max-height: none;
  }

  .crm-tabs-header {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 1rem 1rem 0;
  }

  .crm-tabs-heading {
    width: 100%;
    min-width: 0;
  }

  .crm-tabs-header .nav-tabs-custom {
    align-self: center;
    justify-content: center !important;
    width: auto;
    max-width: 100%;
    gap: 10px;
    margin: 0 auto -1px;
    padding: 8px 12px 0;
  }

  .crm-tabs-header .nav-tabs-custom::before {
    top: 4px;
    bottom: 0;
    border-radius: 14px;
  }

  .crm-tabs-header .nav-tabs-custom .nav-link {
    width: 54px;
    min-width: 54px;
    min-height: 64px;
    padding: 0;
    border-radius: 14px;
  }

  .crm-tabs-header .nav-tabs-custom .nav-link .d-block {
    display: grid !important;
    place-items: center;
    width: 100%;
    height: 100%;
  }

  .crm-tabs-header .nav-tabs-custom .nav-link svg,
  .crm-tabs-header .nav-tabs-custom .nav-link [data-eva] {
    width: 18px;
    height: 18px;
  }

  .crm-tabs-card .tab-content {
    height: auto;
    max-height: 65vh;
    padding: 1rem;
    overflow: auto;
  }

  .settings-section:first-child,
  .settings-savebar {
    grid-column: auto;
  }

  .admin-record-card > summary,
  .service-card > summary,
  .payment-record-card > summary,
  .admin-record-card > .record-row,
  .service-card > .record-row,
  .payment-record-card > .record-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .admin-record-card > summary .status-pill,
  .service-card > summary .status-pill,
  .record-row .status-pill {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .record-open-btn {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .service-card__description {
    padding-left: 16px;
  }
}

@media (max-width: 620px) {
  .schedule-interval {
    grid-template-columns: 1fr;
  }
}

.pipeline-workspace {
  display: grid;
  gap: 18px;
  --pipeline-panel-height: var(--crm-panel-height);
  --pipeline-surface: var(--crm-surface);
  --pipeline-surface-soft: var(--crm-surface-soft);
  --pipeline-border: var(--crm-border-soft);
  --pipeline-heading: var(--crm-heading);
  --pipeline-text: var(--crm-text);
  --pipeline-muted: var(--crm-text-muted);
  --pipeline-shadow: var(--crm-shadow-soft);
}

.customer-related-deal {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 11px 0;
  border-bottom: 1px solid var(--crm-border-soft);
  color: inherit;
  transition: transform .18s ease, color .18s ease;
}

.customer-related-deal:last-child {
  border-bottom: 0;
}

.customer-related-deal:hover {
  color: var(--crm-primary);
  transform: translateX(2px);
}

.customer-related-deal strong {
  color: var(--crm-heading);
  font-size: .88rem;
  font-weight: 850;
}

.customer-related-deal small {
  color: var(--crm-text-muted);
  font-size: .78rem;
  font-weight: 750;
}

.customers-page,
.customer-record-page {
  display: grid;
  gap: var(--crm-page-gap);
}

.crm-directory-header,
.crm-directory-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.crm-directory-header {
  justify-content: space-between;
}

.crm-directory-header p {
  margin: 4px 0 0;
  color: var(--crm-text-muted);
  font-size: .82rem;
  font-weight: 750;
}

.crm-directory-actions .btn span {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.crm-directory-filter-bar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 14px 0;
}

.supplier-filter-bar.crm-directory-filter-bar {
  grid-template-columns: minmax(280px, 1fr) minmax(170px, .35fr) minmax(160px, .3fr) auto;
}

.supplier-filter-bar.crm-directory-filter-bar > .input {
  min-height: 42px;
  height: 42px;
}

.crm-directory-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: start;
  min-height: 42px;
  height: 42px;
  padding-block: 0;
  white-space: nowrap;
}

.crm-directory-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 42px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--crm-border-soft);
  border-radius: 12px;
  background: var(--crm-surface);
}

.crm-directory-search svg,
.crm-directory-search [data-eva] {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--crm-text-muted);
}

.crm-directory-search input {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--crm-text);
}

.crm-directory-search:focus-within {
  border-color: rgba(var(--crm-primary-rgb), .48);
  box-shadow: 0 0 0 3px rgba(var(--crm-primary-rgb), .09);
}

.crm-directory-table-wrap {
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
}

.crm-directory-table {
  margin: 0;
}

/*
 * Unified admin table language
 *
 * Directory, workflow and finance tables keep their domain-specific layout,
 * while sharing the customer directory's surface, density and row feedback.
 */
.crm-unified-table-wrap {
  --crm-table-surface: var(--crm-surface);
  --crm-table-header: #f8fafc;
  --crm-table-divider: #e7ecf3;
  --crm-table-hover: #eef4ff;
  position: relative;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
  border: 1px solid var(--crm-table-divider);
  border-radius: var(--bs-border-radius);
  background: var(--crm-table-surface);
  box-shadow: 0 4px 16px rgba(15, 23, 42, .035);
  scrollbar-color: rgba(var(--bs-secondary-rgb), .28) transparent;
  scrollbar-width: thin;
}

.crm-unified-table {
  width: 100%;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.crm-unified-table > thead > tr > th {
  height: 36px;
  padding: 9px 10px;
  border: 0;
  background: var(--crm-table-header);
  color: var(--crm-text-muted);
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
  vertical-align: middle;
  white-space: nowrap;
}

.crm-unified-table > tbody > tr > td {
  min-height: 48px;
  padding: 9px 10px;
  border: 0;
  border-top: 1px solid var(--crm-table-divider);
  color: var(--crm-text);
  font-size: .76rem;
  font-weight: 650;
  vertical-align: middle;
}

.crm-unified-table > tbody > tr:first-child > td {
  border-top: 0;
}

.crm-unified-table > tbody > tr > td,
.crm-unified-table > tbody > tr > th,
.crm-directory-table--unified > tbody > tr > td,
.crm-directory-table--unified > tbody > tr > th {
  --bs-table-bg-state: transparent;
  --bs-table-color-state: inherit;
  transition: none;
}

.crm-unified-table > tbody > tr > td:first-child,
.crm-directory-table--unified > tbody > tr > td:first-child {
  box-shadow: none;
}

.crm-unified-table.table-hover > tbody > tr:hover > *,
.crm-directory-table--unified.table-hover > tbody > tr:hover > * {
  --bs-table-bg-state: transparent;
  --bs-table-color-state: inherit;
}

.crm-unified-table > tbody > tr:hover > td,
.crm-unified-table > tbody > tr:focus-within > td {
  background: var(--crm-table-hover);
}

.crm-unified-table > tbody > tr:hover > td:first-child,
.crm-unified-table > tbody > tr:focus-within > td:first-child {
  box-shadow: none;
}

.crm-unified-table > tbody > tr[tabindex]:focus-visible {
  outline: 2px solid rgba(var(--crm-primary-rgb), .42);
  outline-offset: -2px;
}

.crm-unified-table .empty-state,
.crm-unified-table .tasks-empty,
.crm-unified-table .support-empty {
  white-space: normal;
}

.crm-unified-filter-bar :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]), select, .input, .form-select) {
  min-height: 42px;
  border-color: var(--crm-border-soft);
  border-radius: 12px;
}

.crm-unified-filter-bar :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]), select, .input, .form-select):focus {
  border-color: rgba(var(--crm-primary-rgb), .48);
  box-shadow: 0 0 0 3px rgba(var(--crm-primary-rgb), .09);
}

.crm-unified-filter-bar button[type="submit"] {
  min-height: 42px;
  border-radius: 12px;
}

body.crm-template[data-theme="dark"] .crm-unified-table-wrap {
  --crm-table-surface: var(--crm-surface);
  --crm-table-header: var(--crm-surface-elevated);
  --crm-table-divider: var(--crm-border-soft);
  --crm-table-hover: #172a46;
  box-shadow: none;
}

.customers-directory-grid th:nth-child(1) { width: 26%; }
.customers-directory-grid th:nth-child(2) { width: 30%; }
.customers-directory-grid th:nth-child(3) { width: 23%; }
.customers-directory-grid th:nth-child(4) { width: 13%; }
.customers-directory-grid th:nth-child(5) { width: 8%; }

.supplier-directory-table .crm-directory-table th:nth-child(1) { width: 23%; }
.supplier-directory-table .crm-directory-table th:nth-child(2) { width: 18%; }
.supplier-directory-table .crm-directory-table th:nth-child(3),
.supplier-directory-table .crm-directory-table th:nth-child(4),
.supplier-directory-table .crm-directory-table th:nth-child(5) { width: 12%; }
.supplier-directory-table .crm-directory-table th:nth-child(6) { width: 15%; }
.supplier-directory-table .crm-directory-table th:nth-child(7) { width: 8%; }

/* One strict visual contract for entity directories. */
.crm-directory-panel--unified {
  --customer-grid-surface: var(--crm-surface);
  --customer-grid-header-bg: #f8fafc;
  --customer-grid-divider: #e7ecf3;
  --customer-grid-hover: #eef4ff;
  overflow: hidden;
}

.crm-directory-panel--unified > .crm-directory-header {
  min-height: 42px;
}

.crm-directory-panel--unified > .crm-directory-header h2 {
  margin: 0;
  color: var(--crm-heading);
  font-size: 1rem;
  font-weight: 900;
}

.crm-directory-table-wrap.crm-directory-table-wrap--unified {
  border-color: var(--customer-grid-divider);
  border-radius: var(--bs-border-radius);
  background: var(--customer-grid-surface);
  box-shadow: 0 4px 16px rgba(15, 23, 42, .035);
}

.crm-directory-table--unified {
  width: 100%;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.crm-directory-table--unified > thead > tr > th {
  height: 36px;
  padding: 9px 10px;
  border: 0;
  background: var(--customer-grid-header-bg);
  color: var(--crm-text-muted);
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1.2;
  text-transform: uppercase;
  vertical-align: middle;
  white-space: nowrap;
}

.crm-directory-table--unified > tbody > tr > td {
  height: 64px;
  padding: 7px 10px;
  overflow: hidden;
  border: 0;
  color: var(--crm-text);
  font-size: .76rem;
  font-weight: 650;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.crm-directory-table--unified > tbody > tr + tr > td {
  border-top: 1px solid var(--customer-grid-divider);
}

.crm-directory-table--unified > tbody > tr {
  transition: none;
}

.crm-directory-table--unified > tbody > tr:hover > td,
.crm-directory-table--unified > tbody > tr:focus-within > td {
  background: var(--customer-grid-hover);
}

.crm-directory-table--unified > tbody > tr:hover > td:first-child,
.crm-directory-table--unified > tbody > tr:focus-within > td:first-child {
  box-shadow: none;
}

.crm-directory-table--unified > tbody > tr[tabindex] {
  cursor: pointer;
}

.crm-directory-table--unified > tbody > tr[tabindex]:focus-visible {
  outline: 2px solid rgba(var(--crm-primary-rgb), .42);
  outline-offset: -2px;
}

.crm-directory-table--unified .crm-directory-identity {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.crm-directory-table--unified > tbody > tr:hover .crm-directory-identity strong,
.crm-directory-table--unified > tbody > tr:focus-within .crm-directory-identity strong {
  color: var(--crm-primary);
  transition: none;
}

.crm-directory-avatar {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--customer-grid-divider);
  border-radius: 50%;
  background: var(--crm-surface);
  color: var(--crm-primary);
  font-size: .84rem;
  font-weight: 900;
}

.crm-directory-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.crm-directory-cell-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.crm-directory-cell-copy > strong,
.crm-directory-cell-copy > small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-directory-cell-copy > strong {
  color: var(--crm-heading);
  font-size: .78rem;
  font-weight: 900;
}

.crm-directory-cell-copy > small {
  color: var(--crm-text-muted);
  font-size: .68rem;
  font-weight: 650;
}

.crm-directory-panel--unified > .pagination-bar {
  margin: 0;
  padding: 9px 10px;
  border-top: 1px solid var(--customer-grid-divider);
  background: var(--customer-grid-surface);
}

body.crm-template[data-theme="dark"] .crm-directory-table-wrap--unified {
  box-shadow: none;
}

body.crm-template[data-theme="dark"] .crm-directory-panel--unified {
  --customer-grid-surface: var(--crm-surface);
  --customer-grid-header-bg: var(--crm-surface-elevated);
  --customer-grid-divider: var(--crm-border-soft);
  --customer-grid-hover: #172a46;
}

.projects-directory-grid th:nth-child(1) { width: 25%; }
.projects-directory-grid th:nth-child(2) { width: 16%; }
.projects-directory-grid th:nth-child(3) { width: 12%; }
.projects-directory-grid th:nth-child(4) { width: 14%; }
.projects-directory-grid th:nth-child(5) { width: 20%; }
.projects-directory-grid th:nth-child(6) { width: 9%; }
.projects-directory-grid th:last-child { width: 4%; }

.projects-directory-grid.has-budget th:nth-child(1) { width: 22%; }
.projects-directory-grid.has-budget th:nth-child(2) { width: 14%; }
.projects-directory-grid.has-budget th:nth-child(3) { width: 11%; }
.projects-directory-grid.has-budget th:nth-child(4) { width: 13%; }
.projects-directory-grid.has-budget th:nth-child(5) { width: 18%; }
.projects-directory-grid.has-budget th:nth-child(6) { width: 10%; }
.projects-directory-grid.has-budget th:nth-child(7) { width: 8%; }

.customers-directory-grid [data-customer-row] {
  cursor: pointer;
}

.customers-directory-grid [data-customer-row]:focus-visible {
  outline: 2px solid rgba(var(--crm-primary-rgb), .42);
  outline-offset: -2px;
}

@media (max-width: 767.98px) {
  .crm-directory-header {
    align-items: flex-start;
  }

  .crm-directory-actions {
    justify-content: flex-start;
  }

  .crm-directory-filter-bar {
    grid-template-columns: minmax(0, 1fr);
  }

  .supplier-filter-bar.crm-directory-filter-bar {
    grid-template-columns: minmax(0, 1fr);
  }
}

.customers-directory-panel,
.customer-record-hero,
.customer-relationships-panel,
.customer-record-kpis,
.customer-record-side > .panel,
.customer-timeline-panel {
  border-color: var(--crm-border-soft);
  box-shadow: var(--crm-shadow-soft);
}

.customers-toolbar,
.customer-section-heading,
.customer-record-hero,
.customer-record-actions,
.customer-record-identity,
.customer-record-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.customers-toolbar {
  justify-content: space-between;
  margin-bottom: 16px;
}

.customers-toolbar.panel-header {
  align-items: center;
}

.customers-primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: max-content;
  min-height: 38px;
  padding: 0 .95rem;
  border-radius: var(--bs-border-radius);
  color: #fff;
  border-color: var(--crm-primary);
  background: var(--crm-primary);
  box-shadow: 0 14px 28px rgba(31, 88, 199, .18);
  transition: transform .18s ease, box-shadow .18s ease;
}

.customers-primary-action:hover,
.customers-primary-action:focus {
  color: #fff;
  border-color: var(--crm-primary);
  background: var(--crm-primary);
  box-shadow: 0 18px 34px rgba(31, 88, 199, .22);
  outline: 0;
  transform: translateY(-1px);
}

.customers-primary-action:focus-visible {
  box-shadow: 0 0 0 .14rem rgba(var(--crm-primary-rgb), .22), 0 18px 34px rgba(31, 88, 199, .22);
}

.customers-primary-action:active {
  transform: translateY(0);
}

.customers-primary-action span,
.customers-primary-action svg,
.customers-primary-action [data-eva] {
  color: currentColor;
}

.customers-toolbar h2,
.customer-section-heading h2 {
  margin: 0;
  color: var(--crm-heading);
  font-size: 1.2rem;
  font-weight: 850;
  letter-spacing: 0;
}

.customers-toolbar > div:first-child > span {
  color: var(--crm-text-muted);
  font-size: .82rem;
  font-weight: 750;
}

.customers-searchbar {
  grid-template-columns: minmax(360px, 520px) minmax(180px, 220px);
  align-items: center;
  max-width: min(760px, 100%);
  margin-bottom: 16px;
}

.customers-record-list {
  display: grid;
  gap: 8px;
}

.customers-record-card {
  display: grid;
  grid-template-areas: "identity contact touch signals actions";
  grid-template-columns: minmax(250px, 1.15fr) minmax(250px, 1.05fr) minmax(210px, .9fr) minmax(240px, .9fr) 38px;
  gap: 10px;
  align-items: center;
  min-height: 74px;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: var(--bs-border-radius);
  background: var(--crm-surface);
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.customers-record-card:hover {
  border-color: rgba(var(--crm-primary-rgb), .24);
  background: linear-gradient(90deg, rgba(var(--crm-primary-rgb), .035), var(--crm-surface) 34%);
  box-shadow: 0 10px 26px rgba(15, 23, 42, .06);
}

.customers-record-card:focus-visible {
  border-color: rgba(var(--crm-primary-rgb), .38);
  box-shadow: 0 0 0 .16rem rgba(var(--crm-primary-rgb), .16);
  outline: 0;
}

.customers-record-main {
  display: grid;
  grid-area: identity;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  color: inherit;
}

.customers-directory-row .avatar-sm {
  width: 40px;
  height: 40px;
  font-size: .92rem;
}

.customers-record-title,
.customers-record-contact,
.customers-record-touchpoint {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.customers-record-contact {
  grid-area: contact;
}

.customers-record-touchpoint {
  grid-area: touch;
}

.customers-record-card .customer-record-links {
  grid-area: links;
  min-height: 0;
}

.customers-record-signals {
  grid-area: signals;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: center;
  min-width: 0;
}

.customers-record-signals > span {
  display: grid;
  gap: 1px;
  min-height: 0;
  min-width: 0;
  align-content: center;
  padding: 0;
  border: 0;
  background: transparent;
}

.customers-record-signals > span.is-warning {
  color: #b45309;
}

.customers-record-signals small,
.customers-row-label {
  color: var(--crm-text-muted);
  font-size: .6rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.customers-record-signals strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--crm-heading);
  font-size: .78rem;
  font-weight: 950;
  white-space: nowrap;
}

.customers-record-signals > span.is-warning strong {
  color: #b45309;
}

.customers-record-digital {
  grid-area: signals;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: center;
  min-width: 0;
}

.customers-record-digital a,
.customers-digital-empty {
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: 100%;
  color: var(--crm-primary);
  text-decoration: none;
}

.customers-record-digital a:hover,
.customers-record-digital a:focus {
  color: var(--crm-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.customers-digital-empty {
  color: var(--crm-text-muted);
}

.customers-record-digital svg,
.customers-record-digital [data-eva] {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.customers-record-digital a > span,
.customers-digital-empty > span {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.customers-record-digital small {
  color: var(--crm-text-muted);
  font-size: .6rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.customers-record-digital strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: currentColor;
  font-size: .78rem;
  font-weight: 900;
  white-space: nowrap;
}

.customers-record-title strong,
.customers-record-contact strong,
.customers-record-touchpoint strong {
  color: var(--crm-heading);
  font-size: .86rem;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.customers-record-title small,
.customers-record-contact small,
.customers-record-touchpoint small,
.customers-muted-inline {
  color: var(--crm-text-muted);
  font-size: .72rem;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.customers-record-touchpoint strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: .8rem;
}

.customers-record-touchpoint strong svg,
.customers-record-touchpoint strong [data-eva] {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: var(--crm-primary);
}

.customers-warning-text,
.customers-record-touchpoint .customers-warning-text svg,
.customers-record-touchpoint .customers-warning-text [data-eva] {
  color: #b45309;
}

.customers-row-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}

.customers-row-chips .status-pill {
  min-height: 19px;
  padding: 0 7px;
  font-size: .62rem;
}

.customers-contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  min-width: 0;
}

.customers-contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  min-height: 19px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--crm-primary);
  background: transparent;
  font-size: .71rem;
  font-weight: 850;
  text-decoration: none;
}

.customers-contact-links a span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customers-contact-links svg,
.customers-contact-links [data-eva] {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.customers-record-actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 6px;
  min-width: 0;
}

.customers-record-actions form,
.customers-actions-dropdown form {
  margin: 0;
}

.customers-record-actions .btn,
.customers-actions-dropdown .dropdown-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.customers-record-actions .btn {
  justify-content: center;
  min-height: 32px;
}

.customers-actions-toggle {
  width: 34px;
  padding-inline: 0;
}

.customers-actions-dropdown .dropdown-menu {
  min-width: 190px;
}

.customers-directory-table.is-grid-enhanced .gridjs-wrapper,
.customers-directory-table.is-grid-enhanced .gridjs-table,
.customers-directory-table.is-grid-enhanced .gridjs-tbody,
.customers-directory-table.is-grid-enhanced .gridjs-tr,
.customers-directory-table.is-grid-enhanced .gridjs-td[data-label="Ενέργειες"] {
  overflow: visible;
}

.customers-directory-table.is-grid-enhanced .gridjs-tr:has(.dropdown-menu.show),
.customers-directory-table.is-grid-enhanced .gridjs-td:has(.dropdown-menu.show) {
  position: relative;
  z-index: 40;
}

.customer-actions-menu {
  position: relative;
  display: inline-flex;
}

.customer-actions-menu__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  min-width: 32px;
  height: 32px;
  padding: 0;
}

.customer-actions-menu__dropdown {
  z-index: 1085;
  min-width: 210px;
  padding: 6px;
  border: 1px solid var(--crm-border-soft);
  border-radius: 10px;
  background: var(--crm-surface);
  box-shadow: 0 18px 44px rgba(15, 23, 42, .2);
}

.crm-table-dropdown-menu--portaled,
.customer-actions-menu__dropdown--portaled {
  position: fixed !important;
  z-index: 2000 !important;
  inset: auto !important;
  max-width: calc(100vw - 16px);
  max-height: calc(100vh - 16px);
  max-height: calc(100dvh - 16px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: none !important;
}

.crm-table-dropdown-menu--portaled .dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-height: 36px;
}

@media (max-width: 767.98px) {
  .crm-table-dropdown-menu--portaled .dropdown-item {
    min-height: 42px;
  }
}

.customer-actions-menu__form {
  display: block !important;
  width: 100%;
  margin: 0;
}

.customer-actions-menu__item {
  display: flex !important;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  border: 0;
  border-radius: 7px;
  color: var(--crm-text);
  background: transparent;
  font-size: .78rem;
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
}

.customer-actions-menu__item svg,
.customer-actions-menu__item [data-eva] {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
}

.customer-actions-menu__item:hover,
.customer-actions-menu__item:focus {
  color: var(--crm-primary);
  background: rgba(var(--crm-primary-rgb), .08);
}

.customer-actions-menu__item--danger,
.customer-actions-menu__item--danger:hover,
.customer-actions-menu__item--danger:focus {
  color: #dc2626;
}

.customer-record-actions > .customer-actions-menu .customer-actions-menu__toggle {
  width: auto;
  min-width: 110px;
  padding-inline: 12px;
}

.customer-record-actions > .customer-actions-menu .customer-actions-menu__toggle::after {
  content: "Ενέργειες";
  margin-left: 7px;
  font-weight: 800;
}

.customers-actions-dropdown .dropdown-item {
  width: 100%;
  min-height: 36px;
  font-size: .82rem;
  font-weight: 800;
}

.customers-danger-action {
  color: #dc2626;
}

.customers-danger-action:hover,
.customers-danger-action:focus {
  color: #fff;
  border-color: #dc2626;
  background: #dc2626;
}

.customer-invoice-table-toolbar.customers-directory-table__toolbar {
  display: grid;
  grid-template-columns: minmax(150px, auto) minmax(280px, 460px) minmax(150px, auto);
  min-height: 48px;
}

.customers-directory-table__toolbar::after {
  content: "10 ανά σελίδα";
  justify-self: end;
  color: var(--crm-text-muted);
  font-size: .68rem;
  font-weight: 800;
}

.customers-grid-search {
  position: relative;
  display: flex;
  align-items: center;
  justify-self: center;
  width: 100%;
  min-width: 0;
  margin: 0;
}

.customers-grid-search > svg,
.customers-grid-search > [data-eva] {
  position: absolute;
  z-index: 1;
  left: 11px;
  width: 15px;
  height: 15px;
  color: var(--crm-text-muted);
  pointer-events: none;
}

.customers-grid-search input {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  padding: 5px 70px 5px 34px;
  border: 1px solid var(--customer-grid-divider);
  border-radius: var(--bs-border-radius-sm);
  background: var(--customer-grid-field-bg);
  color: var(--crm-heading);
  font-family: inherit;
  font-size: .76rem;
  outline: 0;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.customers-grid-search input:focus {
  border-color: rgba(var(--crm-primary-rgb), .48);
  background: var(--customer-grid-surface);
  box-shadow: 0 0 0 3px rgba(var(--crm-primary-rgb), .09);
}

.customers-grid-search button,
.customers-grid-search__clear {
  position: absolute;
  z-index: 2;
  top: 50%;
  display: inline-grid;
  width: 26px;
  height: 26px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--crm-text-muted);
  transform: translateY(-50%);
}

.customers-grid-search button {
  right: 3px;
}

.customers-grid-search__clear {
  right: 31px;
}

.customers-grid-search button:hover,
.customers-grid-search button:focus,
.customers-grid-search__clear:hover,
.customers-grid-search__clear:focus {
  background: rgba(var(--crm-primary-rgb), .09);
  color: var(--crm-primary);
  outline: 0;
}

.customers-grid-search button svg,
.customers-grid-search button [data-eva],
.customers-grid-search__clear svg,
.customers-grid-search__clear [data-eva] {
  width: 15px;
  height: 15px;
}

.customers-directory-table.is-grid-enhanced .gridjs-wrapper {
  overflow: visible;
}

.customers-directory-table.is-grid-enhanced .gridjs-td {
  height: 68px;
  padding: 7px 10px;
}

.customers-directory-grid-row {
  cursor: pointer;
}

.customers-directory-grid-row:focus-visible {
  outline: 2px solid rgba(var(--crm-primary-rgb), .42);
  outline-offset: -2px;
}

.customers-grid-identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-width: 0;
}

.customers-grid-identity .avatar-sm {
  width: 38px;
  height: 38px;
  font-size: .84rem;
}

.customers-grid-identity__content,
.customers-grid-contact,
.customers-grid-next-action {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.customers-grid-identity__content > a,
.customers-grid-identity__content > strong,
.customers-grid-contact > strong,
.customers-grid-next-action > strong {
  min-width: 0;
  overflow: hidden;
  color: var(--crm-heading);
  font-size: .78rem;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customers-grid-identity__content > a {
  text-decoration: none;
}

.customers-grid-identity__content > small,
.customers-grid-contact > small,
.customers-grid-next-action > small {
  min-width: 0;
  overflow: hidden;
  color: var(--crm-text-muted);
  font-size: .65rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customers-grid-contact .customers-contact-links {
  flex-wrap: nowrap;
  overflow: hidden;
}

.customers-grid-contact .customers-contact-links a {
  min-width: 0;
  font-size: .66rem;
}

.customers-grid-next-action strong {
  display: flex;
  align-items: center;
  gap: 5px;
}

.customers-grid-next-action strong svg,
.customers-grid-next-action strong [data-eva] {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: var(--crm-primary);
}

.customers-grid-next-action.is-empty strong,
.customers-grid-next-action.is-empty strong svg,
.customers-grid-next-action.is-empty strong [data-eva] {
  color: var(--crm-text-muted);
}

.customers-grid-digital {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.customers-grid-digital > a,
.customers-grid-digital > span {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  min-width: 0;
  color: var(--crm-primary);
  text-decoration: none;
}

.customers-grid-digital > span {
  color: var(--crm-text-muted);
}

.customers-grid-digital svg,
.customers-grid-digital [data-eva] {
  width: 14px;
  height: 14px;
}

.customers-grid-digital a > span,
.customers-grid-digital > span > span {
  display: grid;
  min-width: 0;
}

.customers-grid-digital small,
.customers-grid-digital strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customers-grid-digital small {
  color: var(--crm-text-muted);
  font-size: .58rem;
  font-weight: 850;
  letter-spacing: .025em;
  text-transform: uppercase;
}

.customers-grid-digital strong {
  color: currentColor;
  font-size: .69rem;
  font-weight: 850;
}

.customers-grid-actions {
  justify-content: center;
}

.customers-grid-actions .customers-actions-toggle {
  width: 30px;
  min-width: 30px;
  height: 30px;
  padding: 0;
}

.customers-directory-table > .pagination-bar {
  margin: 0;
  padding: 9px 10px;
  border-top: 1px solid var(--customer-grid-divider);
  background: var(--customer-grid-surface);
}

.customers-directory-table__empty {
  min-height: 160px;
  border: 0;
  border-radius: 0;
  background: var(--customer-grid-surface);
}

.customer-record-links span {
  display: inline-grid;
  min-height: 28px;
  place-items: center;
  padding: 0 9px;
  border-radius: var(--bs-border-radius);
  color: var(--crm-text-muted);
  background: rgba(var(--bs-secondary-rgb), .08);
  font-size: 12px;
  font-weight: 850;
}

@media (max-width: 1199.98px) {
  .customers-record-card {
    grid-template-areas:
      "identity contact actions"
      "touch signals actions";
    grid-template-columns: minmax(220px, 1fr) minmax(190px, .9fr) 38px;
    align-items: center;
  }

  .customers-record-signals {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .customers-record-digital {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.customer-modal .modal-content {
  border: 1px solid var(--crm-border-soft);
  border-radius: calc(var(--bs-border-radius) + 2px);
  overflow: hidden;
}

.customer-modal .modal-dialog.modal-xl {
  max-width: min(1760px, calc(100vw - 72px));
}

.customer-modal .modal-content > form {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 48px);
  min-height: 0;
}

.customer-modal .modal-body.customer-create-shell {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.customer-create-shell {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-height: 0;
  padding: 10px;
}

.customer-create-side {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--crm-border-soft);
  border-radius: var(--bs-border-radius);
  background: rgba(var(--bs-secondary-rgb), .035);
}

.customer-create-side .customer-logo-upload {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 10px;
  text-align: center;
}

.customer-create-side .customer-logo-upload .field,
.customer-create-side .customer-file-trigger {
  width: 100%;
}

.customer-create-side .customer-logo-upload .field {
  display: grid;
  justify-items: center;
}

.customer-create-side .customer-file-trigger {
  width: 100%;
  margin-inline: auto;
}

.customer-create-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: start;
}

.customer-create-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
}

.customer-create-stack {
  display: grid;
  gap: 8px;
  align-content: start;
}

.customer-modal-section {
  display: grid;
  align-self: start;
  gap: 7px;
}

.customer-modal-section {
  padding: 8px;
  border: 1px solid var(--crm-border-soft);
  border-radius: var(--bs-border-radius);
  background: var(--crm-surface);
}

.customer-create-main .customer-modal-section:last-child {
  grid-column: 1 / -1;
}

.customer-modal-section--sales .form-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.customer-sales-grid {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.customer-sales-group {
  display: grid;
  gap: 8px 10px;
  min-width: 0;
}

.customer-sales-group--context {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.customer-sales-group--address {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.customer-sales-group .field {
  min-width: 0;
}

.customer-sales-address-line {
  grid-column: span 3;
}

.customer-sales-city {
  grid-column: span 2;
}

.customer-sales-postal {
  grid-column: span 1;
}

.customer-sales-vat,
.customer-sales-country {
  grid-column: span 3;
}

.customer-sales-consent {
  min-height: 34px;
  margin: 0;
  padding: 4px 0;
}

.customer-sales-notes {
  display: grid;
  min-width: 0;
}

.customer-modal-section--sales .field-wide {
  grid-column: span 2;
}

.customer-modal-section--sales .field-wide:last-child {
  grid-column: 1 / -1;
}

.customer-modal-section h3 {
  margin: 0;
  color: var(--crm-heading);
  font-size: .86rem;
  font-weight: 850;
  letter-spacing: 0;
}

.customer-modal-section .form-grid,
.customer-modal .form-grid {
  gap: 6px 8px;
}

.customer-modal-section .field label {
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 750;
}

.customer-modal-section .input {
  min-height: 34px;
  padding: .32rem .6rem;
  font-size: .86rem;
}

.crm-drawer-modal .input {
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.crm-drawer-modal .input:hover:not(:focus):not(:disabled) {
  border-color: rgba(var(--crm-primary-rgb), .28);
  background-color: rgba(var(--crm-primary-rgb), .018);
}

.crm-drawer-modal .input:focus,
.crm-drawer-modal .input.is-drawer-focused {
  border-color: rgba(var(--crm-primary-rgb), .72);
  box-shadow:
    0 0 0 .16rem rgba(var(--crm-primary-rgb), .16),
    0 8px 18px rgba(var(--crm-primary-rgb), .08);
}

.crm-drawer-modal .input.is-invalid,
.crm-drawer-modal .input.is-invalid:focus,
.crm-drawer-modal .input.is-invalid.is-drawer-focused {
  border-color: rgba(239, 68, 68, .74);
  box-shadow: 0 0 0 .14rem rgba(239, 68, 68, .12);
}

.crm-drawer-modal .customer-field-error {
  margin: 5px 0 0;
  color: #dc2626;
  font-size: .74rem;
  font-weight: 750;
  line-height: 1.25;
  opacity: 0;
  transform: translateY(-3px);
  animation: crmDrawerFieldErrorIn .18s ease forwards;
}

.customer-modal-section .textarea {
  min-height: 58px;
}

.customer-modal-section select[multiple].input {
  height: auto;
  min-height: 86px;
  overflow: auto;
  padding: .42rem .6rem;
}

.customer-relation-field {
  min-width: 0;
}

.customer-relation-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 8px;
  min-height: 34px;
  max-height: 34px;
  overflow-x: hidden;
  overflow-y: hidden;
  padding: 0 .6rem;
  border: 1px solid var(--crm-border-soft);
  border-radius: var(--bs-border-radius);
  background: var(--crm-surface);
  scrollbar-width: none;
}

.customer-relation-picker::-webkit-scrollbar {
  display: none;
}

.customer-relation-picker .customer-relation-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px;
  align-items: center;
  min-width: 0;
  min-height: 22px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--crm-text);
  cursor: pointer;
  font-size: .78rem;
  font-weight: 800;
  line-height: 1.1;
  background: transparent;
  transition: color .16s ease;
}

.customer-relation-picker .customer-relation-option:hover {
  color: var(--crm-heading);
}

.customer-relation-picker .customer-relation-option:has(input:checked) {
  color: var(--crm-primary);
}

.customer-relation-picker .customer-relation-option input {
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: var(--crm-primary);
}

.customer-relation-picker .customer-relation-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-relation-empty {
  padding: 7px 8px;
  color: var(--crm-text-muted);
  font-size: .8rem;
  font-weight: 750;
}

.customer-modal .modal-footer {
  padding: 8px 10px;
}

.crm-drawer-modal {
  --customer-drawer-open-duration: .46s;
  --customer-drawer-close-duration: .32s;
  --customer-drawer-content-open-duration: .52s;
  --customer-drawer-content-exit-duration: .38s;
  --customer-drawer-content-open-ease: cubic-bezier(.2, .8, .2, 1);
  --customer-drawer-content-exit-ease: cubic-bezier(.4, 0, .2, 1);
  --customer-drawer-open-ease: cubic-bezier(.22, 1, .36, 1);
  --customer-drawer-close-ease: cubic-bezier(.4, 0, .2, 1);
  --customer-drawer-offset: calc(100% + 24px);
  z-index: 1080;
  padding: 0 !important;
}

.crm-drawer-modal.fade,
.crm-drawer-modal.fade:not(.show) {
  opacity: 1;
}

.crm-drawer-modal.fade {
  transition: opacity calc(var(--customer-drawer-content-exit-duration) + var(--customer-drawer-close-duration)) linear;
}

.crm-drawer-modal .modal-dialog {
  display: flex;
  align-items: stretch;
  width: min(720px, calc(100vw - 72px));
  max-width: min(720px, calc(100vw - 72px));
  height: 100dvh;
  margin: 0 0 0 auto;
  opacity: 1;
  transform: translate3d(var(--customer-drawer-offset), 0, 0);
  transition:
    transform var(--customer-drawer-open-duration) var(--customer-drawer-open-ease),
    box-shadow var(--customer-drawer-open-duration) ease;
  will-change: transform;
}

.crm-drawer-modal.fade .modal-dialog,
.crm-drawer-modal.fade:not(.show):not(.is-closing) .modal-dialog {
  transform: translate3d(var(--customer-drawer-offset), 0, 0);
  transition:
    transform var(--customer-drawer-open-duration) var(--customer-drawer-open-ease),
    box-shadow var(--customer-drawer-open-duration) ease;
}

.crm-drawer-modal .modal-dialog.modal-md {
  width: min(640px, calc(100vw - 72px));
  max-width: min(640px, calc(100vw - 72px));
}

.crm-drawer-modal .modal-dialog.modal-lg {
  width: min(960px, calc(100vw - 72px));
  max-width: min(960px, calc(100vw - 72px));
}

.crm-drawer-modal .modal-dialog.modal-xl {
  width: min(1220px, calc(100vw - 72px));
  max-width: min(1220px, calc(100vw - 72px));
}

.crm-drawer-modal.crm-drawer-modal--compact .modal-dialog,
.crm-drawer-modal.crm-drawer-modal--compact .modal-dialog.modal-md {
  width: min(560px, calc(100vw - 72px));
  max-width: min(560px, calc(100vw - 72px));
}

.crm-drawer-modal.show .modal-dialog {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.crm-drawer-modal.fade.show .modal-dialog {
  transform: translate3d(0, 0, 0);
}

.crm-drawer-modal.is-closing .modal-dialog {
  opacity: 1;
  transform: translate3d(var(--customer-drawer-offset), 0, 0);
  transition:
    transform var(--customer-drawer-close-duration) var(--customer-drawer-close-ease) var(--customer-drawer-content-exit-duration),
    box-shadow var(--customer-drawer-close-duration) ease var(--customer-drawer-content-exit-duration);
}

.crm-drawer-modal .modal-content {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  max-height: none;
  overflow: hidden;
  border-radius: var(--bs-border-radius) 0 0 var(--bs-border-radius);
  box-shadow: -24px 0 80px rgba(15, 23, 42, .24);
}

.crm-drawer-modal .modal-content > form {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: none;
  min-height: 0;
}

.crm-drawer-modal .modal-header {
  flex: 0 0 auto;
  padding: 18px 20px;
}

.crm-drawer-modal .modal-title {
  font-size: 1rem;
  font-weight: 950;
}

.crm-drawer-modal.is-dirty .modal-title::after {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 8px;
  border-radius: 999px;
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, .14);
  vertical-align: middle;
  content: "";
}

.crm-drawer-modal .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.crm-drawer-modal.is-submitting .modal-body {
  pointer-events: none;
}

.crm-drawer-modal.is-submitting .modal-body > * {
  opacity: .72;
  transition: opacity .16s ease;
}

.crm-drawer-modal .modal-footer {
  flex: 0 0 auto;
  padding: 14px 16px 16px;
  background: var(--crm-surface);
}

.crm-drawer-modal .modal-footer .btn {
  position: relative;
  min-width: 0;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background-color .16s ease, opacity .16s ease;
}

.crm-drawer-modal .modal-footer .btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.crm-drawer-modal .modal-footer .btn.is-loading {
  pointer-events: none;
}

.crm-drawer-modal .modal-footer .btn.is-loading::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 7px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  vertical-align: -2px;
  animation: crmDrawerButtonSpin .65s linear infinite;
}

.crm-drawer-modal .modal-footer .btn:disabled {
  opacity: .72;
}

@media (min-width: 768px) {
  .crm-drawer-modal.crm-drawer-modal--compact .modal-body {
    flex: 0 0 auto;
    min-height: auto;
    overflow: visible;
    padding: 18px;
  }

  .crm-drawer-modal.crm-drawer-modal--compact .modal-footer {
    margin-top: auto;
    padding: 12px 16px 16px;
  }

  .crm-drawer-modal.crm-drawer-modal--compact .form-grid,
  .crm-drawer-modal.crm-drawer-modal--compact .form-grid-compact {
    gap: 12px;
  }
}

.crm-drawer-modal:not(.customer-drawer-modal) .modal-header > *,
.crm-drawer-modal:not(.customer-drawer-modal) .modal-body > *,
.crm-drawer-modal:not(.customer-drawer-modal) .modal-footer > * {
  opacity: .01;
  clip-path: inset(0 0 100% 0);
  transition:
    opacity .22s ease,
    clip-path var(--customer-drawer-content-open-duration) var(--customer-drawer-content-open-ease);
  will-change: clip-path, opacity;
}

.crm-drawer-modal:not(.customer-drawer-modal).show .modal-header > *,
.crm-drawer-modal:not(.customer-drawer-modal).show .modal-body > *,
.crm-drawer-modal:not(.customer-drawer-modal).show .modal-footer > * {
  opacity: 1;
  clip-path: inset(0 0 0 0);
}

.crm-drawer-modal:not(.customer-drawer-modal).show .modal-header > * { transition-delay: .16s; }
.crm-drawer-modal:not(.customer-drawer-modal).show .modal-body > * { transition-delay: .22s; }
.crm-drawer-modal:not(.customer-drawer-modal).show .modal-body > :nth-child(2) { transition-delay: .28s; }
.crm-drawer-modal:not(.customer-drawer-modal).show .modal-footer > * { transition-delay: .42s; }

.crm-drawer-modal:not(.customer-drawer-modal).is-closing .modal-header > *,
.crm-drawer-modal:not(.customer-drawer-modal).is-closing .modal-body > *,
.crm-drawer-modal:not(.customer-drawer-modal).is-closing .modal-footer > * {
  opacity: .01;
  clip-path: inset(0 0 100% 0);
  transition-delay: 0s;
  transition-duration: var(--customer-drawer-content-exit-duration);
  transition-timing-function: var(--customer-drawer-content-exit-ease);
}

@media (prefers-reduced-motion: reduce) {
  .crm-drawer-modal.fade,
  .crm-drawer-modal .modal-dialog,
  .crm-drawer-modal:not(.customer-drawer-modal) .modal-header > *,
  .crm-drawer-modal:not(.customer-drawer-modal) .modal-body > *,
  .crm-drawer-modal:not(.customer-drawer-modal) .modal-footer > * {
    transition: none;
  }

  .crm-drawer-modal .modal-dialog,
  .crm-drawer-modal:not(.customer-drawer-modal) .modal-header > *,
  .crm-drawer-modal:not(.customer-drawer-modal) .modal-body > *,
  .crm-drawer-modal:not(.customer-drawer-modal) .modal-footer > * {
    clip-path: none;
    filter: none;
    transform: none;
  }
}

@media (max-width: 991.98px) {
  .crm-drawer-modal .modal-dialog,
  .crm-drawer-modal .modal-dialog.modal-md,
  .crm-drawer-modal .modal-dialog.modal-lg,
  .crm-drawer-modal .modal-dialog.modal-xl {
    width: min(920px, calc(100vw - 44px));
    max-width: min(920px, calc(100vw - 44px));
    height: 100dvh;
    margin: 0 0 0 auto;
  }

  .crm-drawer-modal.crm-drawer-modal--compact .modal-dialog,
  .crm-drawer-modal.crm-drawer-modal--compact .modal-dialog.modal-md {
    width: min(560px, calc(100vw - 44px));
    max-width: min(560px, calc(100vw - 44px));
  }
}

@media (max-width: 620px) {
  .crm-drawer-modal .modal-dialog,
  .crm-drawer-modal .modal-dialog.modal-md,
  .crm-drawer-modal .modal-dialog.modal-lg,
  .crm-drawer-modal .modal-dialog.modal-xl {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    margin: 0;
  }

  .crm-drawer-modal.crm-drawer-modal--compact .modal-dialog,
  .crm-drawer-modal.crm-drawer-modal--compact .modal-dialog.modal-md {
    width: 100vw;
    max-width: 100vw;
  }

  .crm-drawer-modal .modal-content {
    border-radius: 0;
  }

  .crm-drawer-modal:not(.customer-drawer-modal) .modal-header {
    padding: 16px;
  }

  .crm-drawer-modal:not(.customer-drawer-modal) .modal-body {
    padding: 14px;
  }

  .crm-drawer-modal:not(.customer-drawer-modal) .modal-footer {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
  }

  .crm-drawer-modal:not(.customer-drawer-modal) .modal-footer .btn,
  .crm-drawer-modal:not(.customer-drawer-modal) .modal-footer > form .btn {
    width: 100%;
    min-height: 42px;
    justify-content: center;
    padding: .56rem .68rem;
    font-size: .82rem;
    line-height: 1.1;
  }

  .crm-drawer-modal:not(.customer-drawer-modal) .modal-footer > :nth-child(odd):last-child {
    grid-column: 1 / -1;
  }
}

.customer-drawer-modal {
  --customer-drawer-open-duration: .46s;
  --customer-drawer-close-duration: .32s;
  --customer-drawer-content-open-duration: .52s;
  --customer-drawer-content-exit-duration: .38s;
  --customer-drawer-content-open-ease: cubic-bezier(.2, .8, .2, 1);
  --customer-drawer-content-exit-ease: cubic-bezier(.4, 0, .2, 1);
  --customer-drawer-open-ease: cubic-bezier(.22, 1, .36, 1);
  --customer-drawer-close-ease: cubic-bezier(.4, 0, .2, 1);
  --customer-drawer-offset: calc(100% + 24px);
  z-index: 1080;
  padding: 0 !important;
}

.customer-drawer-modal.fade,
.customer-drawer-modal.fade:not(.show) {
  opacity: 1;
}

.customer-drawer-modal.fade {
  transition: opacity calc(var(--customer-drawer-content-exit-duration) + var(--customer-drawer-close-duration)) linear;
}

.customer-drawer-modal .modal-dialog.modal-xl {
  display: flex;
  width: min(1440px, calc(100vw - 72px));
  max-width: min(1440px, calc(100vw - 72px));
  height: 100dvh;
  margin: 0 0 0 auto;
  opacity: 1;
  transform: translate3d(var(--customer-drawer-offset), 0, 0);
  transition:
    transform var(--customer-drawer-open-duration) var(--customer-drawer-open-ease),
    box-shadow var(--customer-drawer-open-duration) ease;
  will-change: transform;
}

.customer-drawer-modal.show .modal-dialog.modal-xl {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.customer-drawer-modal.is-closing .modal-dialog.modal-xl {
  opacity: 1;
  transform: translate3d(var(--customer-drawer-offset), 0, 0);
  transition:
    transform var(--customer-drawer-close-duration) var(--customer-drawer-close-ease) var(--customer-drawer-content-exit-duration),
    box-shadow var(--customer-drawer-close-duration) ease var(--customer-drawer-content-exit-duration);
}

.customer-drawer-modal .modal-content {
  width: 100%;
  height: 100%;
  border-radius: var(--bs-border-radius) 0 0 var(--bs-border-radius);
  box-shadow: -24px 0 80px rgba(15, 23, 42, .24);
}

.customer-drawer-modal .modal-content > form {
  height: 100%;
  max-height: none;
}

.customer-drawer-modal .modal-header {
  flex: 0 0 auto;
  padding: 18px 20px;
}

.customer-drawer-modal .modal-title {
  font-size: 1rem;
  font-weight: 950;
}

.customer-drawer-modal .modal-body.customer-create-shell {
  padding: 16px;
}

.customer-drawer-modal .customer-create-shell {
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 12px;
}

.customer-drawer-modal .customer-create-columns {
  gap: 12px;
}

.customer-drawer-modal .customer-create-stack {
  gap: 12px;
}

.customer-drawer-modal .customer-modal-section {
  gap: 9px;
  padding: 10px;
}

.customer-drawer-modal .customer-modal-section .form-grid,
.customer-drawer-modal.customer-modal .form-grid {
  gap: 8px 10px;
}

.customer-drawer-modal .modal-footer {
  flex: 0 0 auto;
  padding: 14px 16px 16px;
  background: var(--crm-surface);
}

.customer-drawer-modal .modal-footer .btn {
  position: relative;
  min-width: 0;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background-color .16s ease, opacity .16s ease;
}

.customer-drawer-modal .modal-footer .btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.customer-drawer-modal .modal-footer .btn.is-loading {
  pointer-events: none;
}

.customer-drawer-modal .modal-footer .btn.is-loading::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 7px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  vertical-align: -2px;
  animation: crmDrawerButtonSpin .65s linear infinite;
}

.customer-drawer-modal .modal-footer .btn:disabled {
  opacity: .72;
}

.customer-drawer-modal .modal-title,
.customer-drawer-modal .btn-close,
.customer-drawer-modal .customer-create-side,
.customer-drawer-modal .customer-modal-section,
.customer-drawer-modal .modal-footer > * {
  opacity: .01;
  clip-path: inset(0 0 100% 0);
  transition:
    opacity .22s ease,
    clip-path var(--customer-drawer-content-open-duration) var(--customer-drawer-content-open-ease);
  will-change: clip-path, opacity;
}

.customer-drawer-modal.show .modal-title,
.customer-drawer-modal.show .btn-close,
.customer-drawer-modal.show .customer-create-side,
.customer-drawer-modal.show .customer-modal-section,
.customer-drawer-modal.show .modal-footer > * {
  opacity: 1;
  clip-path: inset(0 0 0 0);
}

.customer-drawer-modal.show .modal-title { transition-delay: .16s; }
.customer-drawer-modal.show .btn-close { transition-delay: .16s; }
.customer-drawer-modal.show .customer-create-side { transition-delay: .20s; }
.customer-drawer-modal.show .customer-modal-section { transition-delay: .24s; }
.customer-drawer-modal.show .customer-modal-section--basic { transition-delay: .22s; }
.customer-drawer-modal.show .customer-modal-section--contact { transition-delay: .24s; }
.customer-drawer-modal.show .customer-modal-section--digital { transition-delay: .30s; }
.customer-drawer-modal.show .customer-modal-section--sales { transition-delay: .38s; }
.customer-drawer-modal.show .modal-footer > * { transition-delay: .42s; }

.customer-drawer-modal.is-closing .modal-title,
.customer-drawer-modal.is-closing .btn-close,
.customer-drawer-modal.is-closing .customer-create-side,
.customer-drawer-modal.is-closing .customer-modal-section,
.customer-drawer-modal.is-closing .modal-footer > * {
  opacity: .01;
  clip-path: inset(0 0 100% 0);
  transition-delay: 0s;
  transition-duration: var(--customer-drawer-content-exit-duration);
  transition-timing-function: var(--customer-drawer-content-exit-ease);
}

body.crm-drawer-modal-open .modal-backdrop.show {
  opacity: .34;
  backdrop-filter: blur(5px) saturate(1.04);
  -webkit-backdrop-filter: blur(5px) saturate(1.04);
}

body.crm-drawer-modal-open .modal-backdrop {
  z-index: 1070;
  background: #0f172a;
}

body.crm-drawer-modal-open .modal-backdrop.fade {
  transition: opacity .32s ease, backdrop-filter .32s ease;
}

body.crm-drawer-modal-closing .modal-backdrop.show {
  opacity: 0;
  backdrop-filter: blur(0) saturate(1);
  -webkit-backdrop-filter: blur(0) saturate(1);
  transition:
    opacity .3s ease .34s,
    backdrop-filter .3s ease .34s;
}

@keyframes crmDrawerFieldErrorIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@media (prefers-reduced-motion: reduce) {
  .customer-drawer-modal.fade,
  .customer-drawer-modal .modal-dialog.modal-xl,
  .customer-drawer-modal .modal-title,
  .customer-drawer-modal .btn-close,
  .customer-drawer-modal .customer-create-side,
  .customer-drawer-modal .customer-modal-section,
  .customer-drawer-modal .modal-footer > * {
    transition: none;
  }

  .customer-drawer-modal .modal-dialog.modal-xl,
  .customer-drawer-modal .modal-title,
  .customer-drawer-modal .btn-close,
  .customer-drawer-modal .customer-create-side,
  .customer-drawer-modal .customer-modal-section,
  .customer-drawer-modal .modal-footer > * {
    clip-path: none;
    filter: none;
    transform: none;
  }
}

@media (min-width: 992px) {
  .customer-drawer-modal .customer-create-shell {
    align-items: stretch;
  }

  .customer-drawer-modal .customer-create-side {
    align-self: start;
  }

  .customer-drawer-modal .customer-create-main {
    height: 100%;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .customer-drawer-modal .customer-create-columns {
    align-items: stretch;
  }

  .customer-drawer-modal .customer-create-stack {
    height: 100%;
  }

  .customer-drawer-modal .customer-create-stack:last-child {
    align-content: stretch;
    grid-template-rows: minmax(0, 1fr);
  }

  .customer-drawer-modal .customer-modal-section--contact {
    align-self: stretch;
    min-height: 100%;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .customer-drawer-modal .customer-modal-section--contact .form-grid {
    align-content: start;
  }

  .customer-drawer-modal .customer-modal-section--sales {
    align-self: stretch;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .customer-drawer-modal .customer-modal-section--sales .customer-sales-grid {
    height: 100%;
    grid-template-rows: auto auto auto minmax(160px, 1fr);
  }

  .customer-drawer-modal .customer-modal-section--sales .customer-sales-notes {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .customer-drawer-modal .customer-modal-section--sales .customer-sales-notes .textarea {
    height: 100%;
    min-height: 140px;
  }
}

@media (max-width: 991.98px) {
  .customer-modal .modal-dialog.modal-xl {
    max-width: calc(100vw - 18px);
    margin: .5rem auto;
  }

  .customer-drawer-modal .modal-dialog.modal-xl {
    width: min(920px, calc(100vw - 44px));
    max-width: min(920px, calc(100vw - 44px));
    height: 100dvh;
    margin: 0 0 0 auto;
  }

  .customer-drawer-modal .customer-create-shell {
    grid-template-columns: 1fr;
  }

  .customer-create-shell {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 8px;
  }

  .customer-create-side,
  .customer-create-columns {
    grid-template-columns: 1fr;
  }

  .customer-modal-section--sales .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-modal-section--sales .field-wide {
    grid-column: 1 / -1;
  }

  .customer-modal-section--sales .customer-sales-group--address {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-sales-address-line {
    grid-column: 1 / -1;
  }

  .customer-sales-city,
  .customer-sales-postal,
  .customer-sales-vat,
  .customer-sales-country {
    grid-column: auto;
  }
}

@media (max-width: 620px) {
  .customers-toolbar {
    align-items: stretch;
  }

  .customers-primary-action {
    width: 100%;
  }

  .customers-searchbar {
    grid-template-columns: 1fr;
  }

  .customers-record-card {
    grid-template-areas:
      "identity"
      "contact"
      "touch"
      "signals"
      "actions";
    grid-template-columns: 1fr;
    align-items: stretch;
    padding: 12px;
  }

  .customers-record-signals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customers-record-digital {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customers-record-actions {
    justify-content: flex-end;
    flex-wrap: nowrap;
    min-width: 0;
  }

  .customers-actions-dropdown {
    flex: 0 0 auto;
  }

  .customer-modal .modal-content > form {
    max-height: calc(100vh - 16px);
  }

  .customer-modal .modal-footer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .customer-modal .modal-footer .btn {
    width: 100%;
    justify-content: center;
  }

  .customer-drawer-modal .modal-footer {
    grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
    gap: 8px;
    padding: 10px;
  }

  .customer-drawer-modal .modal-footer .btn {
    min-height: 42px;
    padding: .56rem .68rem;
    font-size: .82rem;
    line-height: 1.1;
  }

  .customer-drawer-modal .modal-footer .btn:nth-child(3) {
    grid-column: 1 / -1;
    min-height: 44px;
  }

  .customer-drawer-modal .modal-footer .btn:nth-child(3) span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .customer-drawer-modal .modal-dialog.modal-xl {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    margin: 0;
  }

  .customer-drawer-modal .modal-content {
    border-radius: 0;
  }

  .customer-drawer-modal .modal-body.customer-create-shell {
    padding: 10px;
  }

  .customer-modal-section .form-grid,
  .customer-modal-section--sales .form-grid {
    grid-template-columns: 1fr;
  }

  .customer-modal-section--sales .field-wide {
    grid-column: auto;
  }

  .customer-modal-section--sales .customer-sales-group--context,
  .customer-modal-section--sales .customer-sales-group--address {
    grid-template-columns: 1fr;
  }

  .customer-sales-address-line,
  .customer-sales-city,
  .customer-sales-postal,
  .customer-sales-vat,
  .customer-sales-country {
    grid-column: auto;
  }
}

.customer-type-picker {
  display: grid;
  gap: 8px;
}

.customer-type-picker label {
  cursor: pointer;
  margin: 0;
}

.customer-type-picker input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.customer-type-picker span {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--crm-border-soft);
  border-radius: var(--bs-border-radius);
  color: var(--crm-text);
  background: var(--crm-surface);
  font-size: .84rem;
  font-weight: 850;
  transition: border-color .18s ease, color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.customer-type-picker input:checked + span {
  border-color: rgba(var(--crm-primary-rgb), .42);
  color: var(--crm-primary);
  background: rgba(var(--crm-primary-rgb), .08);
  box-shadow: 0 10px 22px rgba(var(--crm-primary-rgb), .12);
}

.customer-type-picker label:hover span {
  transform: translateY(-1px);
}

.customer-record-hero {
  justify-content: space-between;
  padding: 14px;
}

.customer-record-logo {
  display: inline-grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border-radius: var(--bs-border-radius);
  color: var(--crm-primary);
  font-size: 1.6rem;
  font-weight: 900;
}

.customer-record-hero h2 {
  margin: 0 0 8px;
  color: var(--crm-heading);
  font-size: clamp(1.35rem, 2vw, 1.95rem);
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.08;
}

.customer-section-heading a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--crm-primary);
  font-size: .82rem;
  font-weight: 850;
}

.customer-record-actions {
  justify-content: flex-end;
}

.customer-record-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .9fr) minmax(260px, .55fr);
  gap: var(--crm-page-gap);
  align-items: stretch;
}

.customer-tabs-card {
  min-height: 0;
}

.customer-tabs-card .crm-tabs-header {
  min-height: 60px;
  padding: 0 1rem;
}

.customer-tabs-card .tab-content {
  overflow: visible;
  padding: 1rem;
}

.customer-tabs-card .nav-tabs-custom .nav-link {
  min-height: 46px;
  padding: .75rem .9rem;
}

.customer-tab-pane {
  padding: .25rem 1rem 0 !important;
}

.customer-overview-grid,
.customer-finance-grid {
  display: grid;
  gap: var(--crm-page-gap);
  align-items: start;
}

.customer-overview-grid {
  grid-template-columns: minmax(0, 1fr) minmax(320px, .5fr);
}

.customer-overview-grid .customer-record-kpis {
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.customer-tab-card,
.customer-tab-list {
  border: 1px solid var(--crm-border-soft);
  border-radius: var(--bs-border-radius);
  background: rgba(var(--bs-secondary-rgb), .035);
}

.customer-tab-card {
  padding: 14px;
}

.customer-tab-list {
  padding: 4px 14px;
}

.customer-recent-activity-card,
.customer-next-action {
  grid-column: 2;
  align-self: stretch;
}

.customer-finance-grid {
  grid-template-columns: minmax(0, .7fr) minmax(320px, .3fr);
}

.customer-section-heading {
  justify-content: space-between;
  margin-bottom: 10px;
}

.customer-relationship-map {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.customer-relationship-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--crm-border-soft);
  border-radius: var(--bs-border-radius);
  background: rgba(var(--bs-secondary-rgb), .035);
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.customer-relationship-card:hover {
  border-color: rgba(var(--crm-primary-rgb), .24);
  background: var(--crm-surface);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .07);
  transform: translateY(-1px);
}

.customer-relationship-card a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  color: inherit;
}

.customer-relationship-card small {
  display: block;
  color: var(--crm-primary);
  font-size: .72rem;
  font-weight: 850;
}

.customer-relationship-card strong {
  display: block;
  color: var(--crm-heading);
  font-size: .86rem;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.customer-relationship-card form button {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--crm-text-muted);
  background: transparent;
  transition: color .16s ease, background .16s ease, transform .16s ease;
}

.customer-relationship-card form button:hover {
  color: #dc2626;
  background: rgba(220, 38, 38, .08);
  transform: scale(1.04);
}

.customer-record-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.customer-kpi-card {
  display: grid;
  gap: 5px;
  min-height: 76px;
  padding: 11px 12px;
  border: 1px solid var(--crm-border-soft);
  border-radius: var(--bs-border-radius);
  background: rgba(var(--bs-secondary-rgb), .035);
}

.customer-kpi-card span {
  color: var(--crm-text-muted);
  font-size: .75rem;
  font-weight: 850;
  text-transform: uppercase;
}

.customer-kpi-card strong {
  color: var(--crm-heading);
  font-size: 1.18rem;
  font-weight: 900;
}

.customer-kpi-card small {
  color: var(--crm-text-muted);
  font-size: .78rem;
  font-weight: 750;
}

.customer-record-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: var(--crm-page-gap);
  align-items: start;
}

.customer-record-side {
  display: grid;
  gap: var(--crm-page-gap);
}

.customer-mini-timeline {
  display: grid;
  gap: 7px;
}

.customer-mini-timeline-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px;
  align-items: start;
}

.customer-mini-timeline-row strong,
.customer-mini-timeline-row small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.customer-mini-timeline-row strong {
  color: var(--crm-heading);
  font-size: .8rem;
  font-weight: 850;
}

.customer-mini-timeline-row small {
  color: var(--crm-text-muted);
  font-size: .7rem;
  font-weight: 750;
}

body.crm-template[data-theme="dark"] .customers-record-card,
body.crm-template[data-theme="dark"] .customer-modal-section,
body.crm-template[data-theme="dark"] .customer-type-picker span,
body.crm-template[data-theme="dark"] .customer-tab-card,
body.crm-template[data-theme="dark"] .customer-tab-list,
body.crm-template[data-theme="dark"] .customer-relationship-card:hover {
  background: var(--crm-surface);
}

body.crm-template[data-theme="dark"] .customer-create-side,
body.crm-template[data-theme="dark"] .customer-relationship-card,
body.crm-template[data-theme="dark"] .customer-kpi-card {
  background: rgba(148, 163, 184, .06);
}

body.crm-template[data-theme="dark"] .customers-record-card:hover,
body.crm-template[data-theme="dark"] .customer-relationship-card:hover {
  box-shadow: 0 18px 38px rgba(0, 0, 0, .22);
}

body.crm-template[data-theme="dark"] .customer-type-picker input:checked + span {
  background: rgba(var(--crm-primary-rgb), .16);
}

.customer-workspace {
  gap: 14px;
}

.customer-workspace-hero {
  border: 1px solid var(--crm-border-soft);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .78)),
    var(--crm-surface);
  padding: 10px 12px;
}

.customer-workspace-kicker {
  margin-bottom: 2px;
  color: var(--crm-text-muted);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.customer-workspace-layout {
  --customer-workspace-column-height: clamp(560px, calc(100vh - 230px), 820px);
  --customer-workspace-column-height: clamp(560px, calc(100dvh - 230px), 820px);
  display: grid;
  grid-template-columns: minmax(200px, 230px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.customer-workspace-layout.has-action-rail {
  grid-template-columns: minmax(200px, 230px) minmax(0, 1fr) 66px;
}

.customer-workspace-hero .customer-record-logo {
  width: 58px;
  height: 58px;
  font-size: 1.25rem;
}

.customer-workspace-hero h2 {
  margin-bottom: 5px;
  font-size: clamp(1.12rem, 1.25vw, 1.45rem);
}

.customer-workspace-hero .customer-record-actions,
.customer-workspace-hero .customer-record-chips {
  gap: 7px;
}

.customer-workspace-hero .btn-sm {
  min-height: 30px;
  padding: .32rem .55rem;
  font-size: .74rem;
}

.customer-workspace-nav {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 110px);
  padding: 12px;
  overflow: auto;
  border: 1px solid var(--crm-border-soft);
}

.customer-workspace-nav__title {
  display: grid;
  gap: 2px;
  padding: 0 4px 10px;
  border-bottom: 1px solid var(--crm-border-soft);
}

.customer-workspace-nav__title strong,
.customer-workspace-nav__title span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-workspace-nav__title strong {
  color: var(--crm-heading);
  font-size: .9rem;
  font-weight: 700;
}

.customer-workspace-nav__title span {
  color: var(--crm-text-muted);
  font-size: .76rem;
  font-weight: 500;
}

.customer-workspace-nav nav {
  display: grid;
  gap: 5px;
}

.customer-workspace-nav__group {
  display: block;
  margin: 9px 8px 3px;
  color: var(--crm-text-muted);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.customer-workspace-nav__group:first-child {
  margin-top: 0;
}

.customer-workspace-nav a {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: var(--bs-border-radius);
  color: var(--crm-heading);
  font-size: .86rem;
  font-weight: 600;
  transition: color .16s ease, background .16s ease, border-color .16s ease, transform .16s ease;
}

.customer-workspace-nav a svg,
.customer-workspace-nav a [data-eva] {
  width: 18px;
  height: 18px;
  color: var(--crm-text-muted);
}

.customer-workspace-nav a span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-workspace-nav a strong {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  color: var(--crm-text-muted);
  background: rgba(var(--bs-secondary-rgb), .08);
  font-size: .72rem;
  font-weight: 600;
}

.customer-workspace-nav a:hover,
.customer-workspace-nav a:focus,
.customer-workspace-nav a.is-active {
  border-color: rgba(var(--crm-primary-rgb), .18);
  color: var(--crm-primary);
  background: rgba(var(--crm-primary-rgb), .08);
  transform: translateX(1px);
}

.customer-workspace-nav a:hover svg,
.customer-workspace-nav a:focus svg,
.customer-workspace-nav a.is-active svg,
.customer-workspace-nav a:hover [data-eva],
.customer-workspace-nav a:focus [data-eva],
.customer-workspace-nav a.is-active [data-eva] {
  color: var(--crm-primary);
}

.customer-workspace-nav a.is-active strong {
  color: #fff;
  background: var(--crm-primary);
}

.customer-workspace-main {
  min-width: 0;
  padding: 0;
  overflow: hidden;
}

.customer-workspace-section {
  --customer-module-gap: 10px;
  --customer-module-row-gap: 12px;
  --customer-module-row-padding: 14px;
  --customer-module-row-radius: var(--bs-border-radius);
  --customer-module-row-bg: linear-gradient(180deg, rgba(var(--bs-secondary-rgb), .018), rgba(var(--bs-secondary-rgb), .05));
  --customer-module-row-shadow: 0 8px 24px rgba(15, 23, 42, .025);
  --customer-module-icon-size: 40px;
  --customer-module-action-size: 34px;
  --customer-module-action-gap: 10px;
  --customer-module-detail-bg: rgba(var(--bs-body-bg-rgb), .66);
  display: none;
  min-height: 0;
  padding: 14px;
  scroll-margin-top: 104px;
}

.customer-workspace-section.is-active {
  display: block;
}

.customer-workspace-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--crm-border-soft);
}

.customer-workspace-section__header > div {
  flex: 1 1 260px;
  min-width: 0;
}

.customer-workspace-section__header > .customer-section-title {
  flex: 0 1 210px;
}

.customer-workspace-section__header > .customer-section-actions,
.customer-section-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.customer-fragment-actions {
  margin: 0 0 14px auto;
}

.customer-upload-drawer-intro {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--crm-border-soft);
  border-radius: var(--bs-border-radius);
  background: rgba(var(--crm-primary-rgb), .045);
}

.customer-upload-drawer-intro > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 10px;
  color: var(--crm-primary);
  background: rgba(var(--crm-primary-rgb), .1);
}

.customer-upload-drawer-intro strong,
.customer-upload-drawer-intro small {
  display: block;
}

.customer-upload-drawer-intro strong {
  color: var(--crm-heading);
  font-size: .9rem;
  font-weight: 950;
}

.customer-upload-drawer-intro small {
  margin-top: 3px;
  color: var(--crm-text-muted);
  font-size: .78rem;
  line-height: 1.4;
}

.customer-file-trigger--large {
  min-height: 96px;
}

.customer-section-title {
  display: grid;
  gap: 4px;
}

.customer-section-meta {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  color: var(--crm-text-muted);
  font-size: .76rem;
  font-weight: 850;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-section-tools {
  display: flex;
  flex: 1 1 420px;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 8px;
  max-width: none;
}

.customer-create-toggle {
  min-height: 36px;
}

.customer-section-tools .customer-create-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  height: 36px;
  min-width: max-content;
  padding-block: 0;
  order: 2;
  white-space: nowrap;
}

.customer-section-tools .customer-section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 36px;
  white-space: nowrap;
}

.customer-section-tools--tasks {
  max-width: min(620px, 74%);
}

.customer-section-tools--tasks .customer-create-toggle {
  order: 0;
}

.customer-section-tools--tasks .customer-section-link {
  order: 1;
}

.customer-create-toggle.is-active {
  border-color: rgba(var(--crm-primary-rgb), .24);
  color: var(--crm-primary);
  background: rgba(var(--crm-primary-rgb), .09);
}

.customer-section-search {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 36px;
  min-width: min(240px, 100%);
}

.customer-section-tools .customer-section-search {
  flex: 1 1 260px;
  order: 1;
}

.customer-section-search svg,
.customer-section-search [data-eva] {
  position: absolute;
  left: 10px;
  width: 16px;
  height: 16px;
  color: var(--crm-text-muted);
  pointer-events: none;
}

.customer-section-search .input {
  width: 100%;
  height: 36px;
  min-height: 36px;
  padding-top: 0;
  padding-bottom: 0;
  padding-left: 32px;
  font-size: .78rem;
  font-weight: 800;
}

.customer-section-tools.customer-section-tools--timeline {
  max-width: min(620px, 74%);
}

.customer-section-tools--timeline .customer-create-toggle {
  order: 2;
}

.customer-workspace-section__header h2,
.customer-section-heading h2 {
  margin: 0;
  color: var(--crm-heading);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0;
}

.customer-workspace-section__header p {
  margin: 4px 0 0;
  color: var(--crm-text-muted);
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.45;
}

.customer-workspace-form {
  display: grid;
  gap: 12px;
}

.customer-workspace-form fieldset {
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
}

.customer-profile-tabs {
  display: flex;
  gap: 14px;
  min-height: 40px;
  overflow-x: auto;
  border-bottom: 1px solid var(--crm-border-soft);
}

.customer-profile-tabs button {
  position: relative;
  flex: 0 0 auto;
  border: 0;
  color: var(--crm-text-muted);
  background: transparent;
  font-size: .84rem;
  font-weight: 900;
  transition: color .16s ease;
}

.customer-profile-tabs button::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: transparent;
  content: "";
}

.customer-profile-tabs button:hover,
.customer-profile-tabs button:focus,
.customer-profile-tabs button.is-active {
  color: var(--crm-heading);
}

.customer-profile-tabs button.is-active::after {
  background: var(--crm-primary);
}

.customer-profile-tab {
  display: none;
  padding-top: 4px;
}

.customer-profile-tab.is-active {
  display: block;
}

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

.customer-workspace-form .field label,
.customer-module-form .field label,
.customer-inline-followup-form .field label,
.customer-inline-relationship-form .field label {
  margin-bottom: .34rem;
  font-size: 12px;
}

.customer-workspace-form .input,
.customer-module-form .input,
.customer-inline-followup-form .input,
.customer-inline-relationship-form .input {
  min-height: 34px;
  padding: .35rem .65rem;
  font-size: .82rem;
}

.customer-website-list,
.customer-email-list {
  display: grid;
  gap: 10px;
}

.customer-website-row,
.customer-email-row {
  display: grid;
  grid-template-columns: minmax(120px, .75fr) minmax(190px, 1.25fr) minmax(118px, auto) auto;
  gap: 10px;
  align-items: end;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--crm-border-soft);
  border-radius: var(--bs-border-radius);
  background: rgba(var(--bs-secondary-rgb), .035);
}

.customer-website-row .field,
.customer-email-row .field {
  min-width: 0;
}

.customer-primary-choice {
  display: inline-flex !important;
  align-items: center;
  justify-content: flex-start;
  align-self: end;
  gap: 8px;
  height: 42px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(var(--crm-primary-rgb), .24);
  border-radius: var(--bs-border-radius);
  color: var(--crm-heading);
  background: var(--crm-surface);
  font-size: .78rem;
  font-weight: 900;
  margin: 0;
  cursor: pointer;
  line-height: 1;
  text-align: left;
  white-space: nowrap;
}

.customer-primary-choice .form-check-input,
.customer-primary-choice input {
  flex: 0 0 16px;
  display: block;
  float: none;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--crm-primary);
}

.customer-primary-choice .form-check-label,
.customer-primary-choice span {
  display: inline-flex;
  align-items: center;
  min-height: 16px;
  margin: 0;
  color: inherit;
  line-height: 1;
}

.customer-existing-source-field[hidden] {
  display: none !important;
}

.customer-primary-choice:has(input:checked) {
  border-color: rgba(var(--crm-primary-rgb), .46);
  color: var(--crm-primary);
  background: rgba(var(--crm-primary-rgb), .08);
  box-shadow: 0 0 0 3px rgba(var(--crm-primary-rgb), .08);
}

.customer-website-remove,
.customer-email-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  line-height: 1;
}

.customer-modal-section .customer-primary-choice,
.customer-modal-section .customer-website-remove,
.customer-modal-section .customer-email-remove {
  height: 34px;
  min-height: 34px;
}

.customer-modal-section .customer-website-remove,
.customer-modal-section .customer-email-remove {
  width: 34px;
  min-width: 34px;
}

.customer-website-remove svg,
.customer-website-remove [data-eva],
.customer-email-remove svg,
.customer-email-remove [data-eva] {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-right: 0;
}

.customer-website-remove .ui-icon-added,
.customer-website-remove svg.ui-icon-added,
.customer-email-remove .ui-icon-added,
.customer-email-remove svg.ui-icon-added {
  margin-right: 0;
}

.customer-website-remove > svg:first-child:not(:last-child),
.customer-website-remove > [data-eva]:first-child:not(:last-child),
.customer-email-remove > svg:first-child:not(:last-child),
.customer-email-remove > [data-eva]:first-child:not(:last-child) {
  margin-right: 0;
}

.customer-website-add,
.customer-email-add {
  justify-self: start;
}

.customer-management-grid {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.customer-workspace-form .customer-logo-upload {
  min-height: 100%;
  padding: 14px;
  border: 1px solid var(--crm-border-soft);
  border-radius: var(--bs-border-radius);
  background: rgba(var(--bs-secondary-rgb), .035);
}

.customer-workspace-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--crm-border-soft);
}

.customer-workspace-summary {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 10px;
  min-width: 0;
}

.customer-action-rail {
  z-index: 12;
  align-content: start;
  width: 66px;
  padding: 7px;
  overflow: visible;
  border: 1px solid var(--crm-border-soft);
  border-radius: var(--bs-border-radius);
  background: var(--crm-surface);
  box-shadow: 0 12px 30px rgba(15, 23, 42, .055);
}

.customer-action-rail__buttons {
  display: grid;
  gap: 7px;
}

.customer-action-rail__button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 50px;
  height: 46px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: calc(var(--bs-border-radius) - 2px);
  background: rgba(var(--bs-secondary-rgb), .045);
  color: var(--crm-text-muted);
  cursor: pointer;
  transition: color .16s ease, background .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.customer-action-rail__button:hover,
.customer-action-rail__button:focus-visible {
  border-color: rgba(var(--crm-primary-rgb), .2);
  background: rgba(var(--crm-primary-rgb), .09);
  color: var(--crm-primary);
  box-shadow: 0 7px 18px rgba(var(--crm-primary-rgb), .1);
  outline: 0;
  transform: translateY(-1px);
}

.customer-action-rail__button.is-active {
  border-color: var(--crm-primary);
  background: var(--crm-primary);
  color: #fff;
  box-shadow: 0 9px 22px rgba(var(--crm-primary-rgb), .24), inset 0 0 0 1px rgba(255, 255, 255, .12);
  outline: 0;
  transform: translateY(-1px) scale(1.02);
}

.customer-action-rail__button svg,
.customer-action-rail__button [data-eva] {
  width: 19px;
  height: 19px;
}

.customer-action-rail__tooltip {
  position: absolute;
  top: 50%;
  right: calc(100% + 10px);
  z-index: 4;
  width: max-content;
  max-width: 180px;
  padding: 5px 8px;
  border: 1px solid var(--crm-border-soft);
  border-radius: var(--bs-border-radius-sm);
  background: var(--crm-heading);
  color: var(--crm-surface);
  box-shadow: 0 8px 18px rgba(15, 23, 42, .14);
  font-size: .68rem;
  font-weight: 850;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translate(4px, -50%);
  transition: opacity .14s ease, transform .14s ease;
}

.customer-action-rail__button:hover > .customer-action-rail__tooltip,
.customer-action-rail__button:focus-visible > .customer-action-rail__tooltip {
  opacity: 1;
  transform: translate(0, -50%);
}

.customer-action-rail__button.is-active > .customer-action-rail__tooltip {
  opacity: 0;
}

.customer-action-rail__divider {
  display: block;
  width: 34px;
  height: 1px;
  margin: 3px auto;
  background: var(--crm-border-soft);
}

.customer-action-rail__notification {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  border: 2px solid var(--crm-surface);
  border-radius: 50%;
  background: var(--bs-warning);
  box-sizing: content-box;
  box-shadow: 0 0 0 1px rgba(var(--bs-warning-rgb), .12);
}

.customer-action-rail__button.is-active .customer-action-rail__notification {
  border-color: var(--crm-primary);
  background: #fff;
}

.customer-action-rail__drawer {
  position: absolute;
  z-index: 8;
  top: 0;
  right: calc(100% + 12px);
  width: min(340px, calc(100vw - 110px));
  padding: 14px;
  border: 1px solid var(--crm-border-soft);
  border-radius: var(--bs-border-radius);
  background: var(--crm-surface);
  box-shadow: 0 22px 55px rgba(15, 23, 42, .16);
  opacity: 0;
  transform: translateX(8px) scale(.985);
  transform-origin: top right;
  transition: opacity .16s ease, transform .16s ease;
}

.customer-action-rail__drawer.is-open {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.customer-action-rail__drawer-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.customer-action-rail__drawer-heading > div {
  display: grid;
  gap: 3px;
}

.customer-action-rail__drawer-heading small {
  color: var(--crm-text-muted);
  font-size: .65rem;
  font-weight: 850;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.customer-action-rail__drawer-heading strong {
  color: var(--crm-heading);
  font-size: .92rem;
  font-weight: 950;
}

.customer-action-rail__drawer .customer-activity-composer {
  gap: 10px;
}

.customer-action-rail__drawer .btn-primary {
  width: 100%;
  justify-content: center;
}

@media (min-width: 992px) {
  .customer-workspace-layout {
    align-items: start;
  }

  .customer-workspace-nav,
  .customer-workspace-main,
  .customer-workspace-summary {
    position: sticky;
    top: 88px;
    align-self: start;
    box-sizing: border-box;
    height: auto;
    max-height: var(--customer-workspace-column-height);
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-color: rgba(var(--bs-secondary-rgb), .28) transparent;
    scrollbar-width: thin;
  }

  .customer-workspace-nav::-webkit-scrollbar,
  .customer-workspace-main::-webkit-scrollbar,
  .customer-workspace-summary::-webkit-scrollbar {
    width: 8px;
  }

  .customer-workspace-nav::-webkit-scrollbar-thumb,
  .customer-workspace-main::-webkit-scrollbar-thumb,
  .customer-workspace-summary::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: rgba(var(--bs-secondary-rgb), .24);
    background-clip: content-box;
  }

  .customer-workspace-main {
    position: relative;
    top: auto;
    align-self: start;
    height: auto;
    max-height: var(--customer-workspace-column-height);
    min-height: 0;
  }

  .customer-workspace-summary.customer-action-rail {
    height: auto;
    max-height: none;
    overflow: visible;
    scrollbar-gutter: auto;
  }

  .customer-workspace-section {
    min-height: 0;
  }
}

.customer-workspace-summary .customer-record-kpis {
  grid-template-columns: minmax(0, 1fr);
}

.customer-workspace-summary .customer-tab-card {
  padding: 12px;
  background: var(--crm-surface);
}

.customer-workspace-summary .customer-next-action,
.customer-workspace-summary .customer-recent-activity-card {
  grid-column: auto;
}

.customer-profile-overview {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid var(--crm-border-soft);
  border-radius: var(--bs-border-radius);
  background: var(--crm-surface);
}

.customer-profile-overview__identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.customer-profile-overview__label {
  display: block;
  margin-bottom: 2px;
  color: var(--crm-text-muted);
  font-size: .68rem;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.customer-profile-overview h2 {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--crm-heading);
  font-size: 1.12rem;
  font-weight: 950;
  letter-spacing: 0;
}

.customer-profile-overview__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-self: end;
}

.customer-profile-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.customer-profile-facts > .customer-profile-fact,
.customer-profile-start-date > summary {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 3px 8px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--crm-border-soft);
  border-radius: calc(var(--bs-border-radius) - 2px);
  background: rgba(var(--bs-secondary-rgb), .025);
}

.customer-profile-start-date {
  min-width: 0;
}

.customer-profile-start-date > summary {
  position: relative;
  padding-right: 34px;
  cursor: pointer;
  list-style: none;
}

.customer-profile-start-date > summary::-webkit-details-marker {
  display: none;
}

.customer-profile-start-date > summary > small {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  color: var(--crm-text-muted);
}

.customer-profile-start-date > summary > small svg,
.customer-profile-start-date > summary > small [data-eva] {
  width: 14px;
  height: 14px;
}

.customer-profile-fact > svg,
.customer-profile-fact > [data-eva],
.customer-profile-start-date > summary > svg,
.customer-profile-start-date > summary > [data-eva] {
  grid-row: 1 / span 2;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--crm-primary);
}

.customer-profile-fact > span,
.customer-profile-start-date > summary > span {
  color: var(--crm-text-muted);
  font-size: .68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.customer-profile-fact > strong,
.customer-profile-start-date > summary > strong {
  min-width: 0;
  overflow: hidden;
  color: var(--crm-heading);
  font-size: .8rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-profile-start-date > form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--crm-border-soft);
  border-radius: calc(var(--bs-border-radius) - 2px);
  background: rgba(var(--bs-secondary-rgb), .035);
}

.customer-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.customer-card-heading > strong {
  color: var(--crm-heading);
  font-size: .9rem;
  font-weight: 950;
}

.customer-card-note {
  margin: 10px 0 0;
  color: var(--crm-text-muted);
  font-size: .78rem;
  font-weight: 800;
  line-height: 1.45;
}

.customer-health-status {
  flex: 0 0 auto;
}

.customer-health-card--good .customer-health-status {
  color: #047857;
  background: rgba(16, 185, 129, .13);
}

.customer-health-card--warn .customer-health-status {
  color: #a16207;
  background: rgba(245, 158, 11, .14);
}

.customer-health-card--bad .customer-health-status {
  color: #b91c1c;
  background: rgba(220, 38, 38, .13);
}

.customer-health-meter {
  display: grid;
  gap: 7px;
}

.customer-health-meter > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.customer-health-meter strong {
  color: var(--crm-heading);
  font-size: 1.45rem;
  font-weight: 950;
  line-height: 1;
}

.customer-health-meter span {
  color: var(--crm-text-muted);
  font-size: .8rem;
  font-weight: 850;
}

.customer-health-bar,
.customer-completeness-bar {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(var(--bs-secondary-rgb), .12);
}

.customer-health-bar span,
.customer-completeness-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--crm-primary);
}

.customer-health-bar span {
  width: var(--customer-health-score);
}

.customer-health-card--good .customer-health-bar span {
  background: #10b981;
}

.customer-health-card--warn .customer-health-bar span {
  background: #f59e0b;
}

.customer-health-card--bad .customer-health-bar span {
  background: #ef4444;
}

.customer-health-signals,
.customer-completeness-list {
  display: grid;
  gap: 4px;
  margin-top: 8px;
}

.customer-health-signal,
.customer-completeness-list a {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 26px;
  margin-inline: -4px;
  border-radius: calc(var(--bs-border-radius) - 4px);
  padding: 2px 4px;
  color: var(--crm-text);
  font-size: .76rem;
  font-weight: 850;
  text-decoration: none;
  transition: background-color .16s ease, transform .16s ease;
}

.customer-health-signal:hover,
.customer-health-signal:focus,
.customer-completeness-list a:hover,
.customer-completeness-list a:focus {
  color: var(--crm-text);
  background: rgba(var(--crm-primary-rgb), .055);
  transform: translateX(1px);
}

.customer-health-signal svg,
.customer-health-signal [data-eva],
.customer-completeness-list svg,
.customer-completeness-list [data-eva] {
  width: 16px;
  height: 16px;
}

.customer-health-signal--good svg,
.customer-health-signal--good [data-eva],
.customer-completeness-list a.is-complete svg,
.customer-completeness-list a.is-complete [data-eva] {
  color: #059669;
}

.customer-health-signal--warn svg,
.customer-health-signal--warn [data-eva],
.customer-completeness-list a:not(.is-complete) svg,
.customer-completeness-list a:not(.is-complete) [data-eva] {
  color: #d97706;
}

.customer-health-signal strong,
.customer-completeness-list span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-health-signal small {
  grid-column: 2;
  color: var(--crm-text-muted);
  font-size: .7rem;
  font-weight: 850;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-activity-composer {
  display: grid;
  gap: 8px;
}

.customer-activity-composer__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(92px, .65fr);
  gap: 8px;
}

.customer-activity-composer .field {
  min-width: 0;
}

.customer-activity-type-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.customer-activity-type-grid label {
  min-width: 0;
  margin: 0;
}

.customer-activity-type-grid input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.customer-activity-type-grid span {
  display: grid;
  gap: 4px;
  min-height: 44px;
  place-items: center;
  border: 1px solid var(--crm-border-soft);
  border-radius: var(--bs-border-radius);
  padding: 5px 4px;
  color: var(--crm-heading);
  background: rgba(var(--bs-secondary-rgb), .035);
  font-size: .62rem;
  font-weight: 850;
  line-height: 1.15;
  text-align: center;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, color .16s ease;
}

.customer-activity-type-grid svg,
.customer-activity-type-grid [data-eva] {
  width: 15px;
  height: 15px;
  color: var(--crm-text-muted);
}

.customer-activity-type-grid input:checked + span {
  border-color: rgba(var(--crm-primary-rgb), .22);
  color: var(--crm-primary);
  background: rgba(var(--crm-primary-rgb), .09);
}

.customer-activity-type-grid input:checked + span svg,
.customer-activity-type-grid input:checked + span [data-eva] {
  color: var(--crm-primary);
}

.customer-activity-composer .input {
  min-height: 34px;
}

.customer-activity-composer .textarea {
  min-height: 62px;
}

.customer-activity-composer .btn {
  justify-self: stretch;
}

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

.customer-financial-grid > div {
  display: grid;
  gap: 4px;
  min-height: 66px;
  padding: 10px;
  border: 1px solid var(--crm-border-soft);
  border-radius: var(--bs-border-radius);
  background: rgba(var(--bs-secondary-rgb), .035);
}

.customer-financial-grid span {
  color: var(--crm-text-muted);
  font-size: .68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.customer-financial-grid strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--crm-heading);
  font-size: .88rem;
  font-weight: 950;
}

.customer-glance-grid {
  display: grid;
  margin-top: 6px;
}

.customer-glance-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 10px;
  align-items: baseline;
  min-width: 0;
  padding: 7px 0;
  border-top: 1px solid var(--crm-border-soft);
  color: var(--crm-text);
  text-decoration: none;
}

.customer-glance-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.customer-glance-item span {
  min-width: 0;
  overflow: hidden;
  color: var(--crm-text-muted);
  font-size: .7rem;
  font-weight: 900;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.customer-glance-item strong {
  color: var(--crm-heading);
  font-size: .9rem;
  font-weight: 950;
  white-space: nowrap;
}

.customer-glance-item small {
  grid-column: 1 / -1;
  min-width: 0;
  overflow: hidden;
  color: var(--crm-text-muted);
  font-size: .74rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-glance-item.needs-attention strong,
.customer-glance-item.needs-attention small {
  color: #b45309;
}

.customer-sparkline--compact {
  min-height: 86px;
  margin-top: 12px;
  padding: 12px;
}

.customer-journey-list {
  display: grid;
  gap: 8px;
}

.customer-journey-step {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 32px;
  color: var(--crm-text);
  font-size: .78rem;
  font-weight: 900;
  text-decoration: none;
}

.customer-journey-step > span {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(var(--bs-secondary-rgb), .28);
  border-radius: 999px;
  background: var(--crm-surface);
}

.customer-journey-step--done > span {
  border-color: #10b981;
  background: #10b981;
}

.customer-journey-step--current > span {
  border-color: var(--crm-primary);
  box-shadow: 0 0 0 4px rgba(var(--crm-primary-rgb), .1);
}

.customer-journey-step--attention > span {
  border-color: #f59e0b;
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, .13);
}

.customer-journey-step--pending {
  color: var(--crm-text-muted);
}

.customer-completeness-list a {
  grid-template-columns: 18px minmax(0, 1fr);
  min-height: 28px;
}

.customer-workspace-list,
.customer-person-grid {
  display: grid;
  gap: 8px;
}

.customer-person-grid {
  grid-template-columns: minmax(0, 1fr);
}

.customer-contact-list-header {
  display: grid;
  grid-template-columns: minmax(190px, 1.35fr) minmax(180px, 1fr) minmax(105px, .58fr) minmax(70px, .34fr) 64px;
  gap: 12px;
  align-items: center;
  padding: 0 12px 2px;
  color: var(--crm-text-muted);
  font-size: .66rem;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.customer-person-card,
.customer-note-card,
.customer-followup-card,
.customer-inline-note-form,
.customer-inline-relationship-form,
.customer-inline-followup-form,
.customer-module-form {
  border: 1px solid var(--crm-border-soft);
  border-radius: var(--bs-border-radius);
  background: rgba(var(--bs-secondary-rgb), .035);
}

.customer-contact-form .toggle-line {
  margin: 0;
}

.customer-person-card {
  display: grid;
  grid-template-columns: minmax(190px, 1.35fr) minmax(180px, 1fr) minmax(105px, .58fr) minmax(70px, .34fr) 64px;
  gap: 12px;
  align-items: center;
  min-height: 70px;
  padding: 9px 12px;
  background: var(--crm-surface);
  transition: border-color .18s ease, background-color .18s ease;
}

.customer-person-card:hover {
  border-color: rgba(var(--crm-primary-rgb), .18);
  background: rgba(var(--crm-primary-rgb), .025);
}

.customer-person-card .avatar-sm {
  width: 34px;
  height: 34px;
  min-width: 34px;
  font-size: .82rem;
}

.customer-person-card__identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  align-self: center;
  min-width: 0;
}

.customer-person-card__title {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.customer-person-card__badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 5px;
}

.customer-person-card__badges .status-pill {
  min-height: 19px;
  padding: 2px 7px;
  font-size: .66rem;
  line-height: 1.15;
}

.customer-contact-methods {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.customer-contact-method {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-width: 0;
  width: fit-content;
  max-width: 100%;
  color: var(--crm-primary);
  font-size: .78rem;
  font-weight: 850;
  text-decoration: none;
}

.customer-contact-method svg,
.customer-contact-method [data-eva] {
  width: 14px;
  height: 14px;
}

.customer-contact-method span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-contact-method:hover {
  color: var(--crm-primary);
}

.customer-contact-method--empty {
  color: var(--crm-text-muted);
}

.customer-contact-details {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.customer-contact-details span {
  min-width: 0;
  overflow: hidden;
  color: var(--crm-heading);
  font-size: .76rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-contact-details strong {
  min-width: 0;
  overflow: hidden;
  color: var(--crm-text-muted);
  font-size: .73rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-contact-last {
  min-width: 0;
  color: var(--crm-heading);
  font-size: .76rem;
  font-weight: 900;
  text-align: left;
  white-space: nowrap;
}

.customer-person-card h3 {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--crm-heading);
  font-size: .9rem;
  font-weight: 950;
  line-height: 1.18;
}

.customer-person-card small {
  display: block;
  overflow-wrap: anywhere;
  color: var(--crm-text-muted);
  font-size: .72rem;
  font-weight: 800;
  line-height: 1.25;
}

.customer-person-card p {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 4px;
  border-top: 1px solid rgba(var(--bs-secondary-rgb), .09);
  color: var(--crm-text);
  font-size: .76rem;
  font-weight: 700;
  line-height: 1.45;
}

.customer-person-card form {
  margin: 0;
  justify-self: end;
}

.customer-person-card .customer-inline-edit {
  min-width: 0;
  justify-self: end;
}

.customer-person-card__tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
}

.customer-person-card__tools .btn,
.customer-person-card__tools summary {
  min-width: 0;
}

@media (min-width: 768px) {
  .customer-person-card__tools .customer-inline-edit:not([open]) summary,
  .customer-person-card__tools .customer-archive-form .btn {
    display: inline-flex;
    width: 30px;
    min-width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    padding: 0;
  }

  .customer-person-card__tools .customer-inline-edit:not([open]) summary span,
  .customer-person-card__tools .customer-archive-form .btn span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .customer-person-card__tools:has(.customer-inline-edit[open]) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-column: 1 / -1;
    justify-items: stretch;
  }

  .customer-person-card__tools:has(.customer-inline-edit[open]) .customer-inline-edit {
    width: 100%;
  }
}

.customer-inline-edit {
  border-top: 0;
  padding-top: 0;
}

.customer-inline-edit[open] {
  grid-column: 1 / -1;
  justify-self: stretch;
  border-top: 1px solid var(--crm-border-soft);
  padding-top: 10px;
}

.customer-person-card__tools:has(.customer-inline-edit[open]) .customer-inline-edit[open] {
  width: 100%;
  max-width: 100%;
}

.customer-inline-edit summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  width: fit-content;
  border: 1px solid var(--crm-border-soft);
  border-radius: var(--bs-border-radius);
  padding: 6px 10px;
  color: var(--crm-heading);
  background: var(--crm-surface);
  font-size: .78rem;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.customer-inline-edit summary::-webkit-details-marker {
  display: none;
}

.customer-inline-edit summary svg,
.customer-inline-edit summary [data-eva] {
  width: 15px;
  height: 15px;
  color: var(--crm-primary);
}

.customer-inline-edit form {
  display: grid;
  gap: 12px;
  justify-self: stretch;
  width: 100%;
  margin-top: 12px;
}

.customer-inline-edit__actions {
  display: flex;
  justify-content: flex-end;
}

.customer-record-card {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.customer-record-edit {
  width: 100%;
  min-width: 0;
  justify-self: stretch;
}

.customer-record-edit:not([open]) {
  display: flex;
  justify-content: flex-end;
}

.customer-record-edit[open] {
  padding: 12px;
  border: 1px solid var(--crm-border-soft);
  border-radius: var(--bs-border-radius);
  background: rgba(var(--bs-secondary-rgb), .025);
}

.customer-ticket-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.customer-archive-form {
  justify-self: end;
}

.customer-archive-form .btn {
  min-height: 30px;
}

.customer-workspace-icon {
  display: inline-grid;
  width: var(--customer-module-icon-size, 36px);
  height: var(--customer-module-icon-size, 36px);
  place-items: center;
  border-radius: var(--bs-border-radius);
  color: var(--crm-primary);
  background: rgba(var(--crm-primary-rgb), .1);
}

.customer-note-card small,
.customer-followup-card small {
  display: block;
  color: var(--crm-text-muted);
  font-size: .75rem;
  font-weight: 800;
}

.customer-note-card strong,
.customer-followup-card strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--crm-heading);
  font-size: .9rem;
  font-weight: 900;
}

.customer-inline-note-form,
.customer-inline-relationship-form,
.customer-inline-followup-form,
.customer-module-form {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
}

.customer-create-panel {
  border-style: dashed;
  background: rgba(var(--crm-primary-rgb), .035);
}

.customer-create-panel[hidden],
.is-filter-hidden,
.is-search-hidden {
  display: none !important;
}

.customer-contact-drawer .modal-body {
  padding: 16px;
}

.customer-contact-drawer .customer-create-drawer__form.customer-module-form {
  gap: 14px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.customer-contact-drawer .customer-create-drawer__form .customer-workspace-form-grid {
  grid-template-columns: minmax(0, 1fr);
}

.customer-contact-drawer .customer-create-drawer__submit {
  min-width: 190px;
  min-height: 42px;
}

.customer-inline-note-form > div,
.customer-inline-relationship-form > button,
.customer-inline-followup-form > button,
.customer-module-form > button {
  justify-self: end;
}

.customer-upload-form > button {
  justify-self: stretch;
  width: 100%;
  min-height: 42px;
}

.customer-module-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--customer-module-gap);
  margin-bottom: 14px;
}

.customer-module-metrics > div,
.customer-module-row {
  border: 1px solid var(--crm-border-soft);
  border-radius: var(--customer-module-row-radius);
  background: var(--customer-module-row-bg);
}

.customer-module-metrics > div {
  display: grid;
  gap: 4px;
  min-height: 74px;
  padding: 12px;
}

.customer-module-metrics span {
  color: var(--crm-text-muted);
  font-size: .72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.customer-module-metrics strong {
  color: var(--crm-heading);
  font-size: 1rem;
  font-weight: 950;
}

.customer-module-list {
  display: grid;
  gap: var(--customer-module-gap);
}

.customer-file-group {
  display: grid;
  gap: 8px;
}

.customer-file-group__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 2px;
  color: var(--crm-text-muted);
}

.customer-file-group__header strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--crm-heading);
  font-size: .82rem;
  font-weight: 950;
}

.customer-file-group__header span {
  flex: 0 0 auto;
  font-size: .72rem;
  font-weight: 850;
}

.customer-file-project-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  max-width: 100%;
  margin-top: 6px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(var(--bs-primary-rgb), .08);
  color: var(--crm-primary);
  font-size: .72rem;
  font-weight: 850;
}

.customer-file-project-chip svg,
.customer-file-project-chip [data-eva] {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.customer-file-project-chip span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.customer-module-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: var(--customer-module-row-gap);
  align-items: center;
  padding: var(--customer-module-row-padding);
  box-shadow: var(--customer-module-row-shadow);
}

.customer-module-row > div {
  min-width: 0;
}

.customer-module-row__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.customer-module-row strong,
.customer-module-row a strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--crm-heading);
  font-size: .9rem;
  font-weight: 950;
}

.customer-module-row > strong {
  white-space: nowrap;
}

.customer-amount-stack {
  display: grid;
  gap: 2px;
  justify-items: end;
  white-space: nowrap;
}

.customer-amount-stack strong {
  color: var(--crm-heading);
  font-size: .9rem;
  font-weight: 950;
}

.customer-amount-stack small {
  color: var(--crm-text-muted);
  font-size: .72rem;
  font-weight: 850;
}

.customer-module-row small,
.customer-module-row__top > span:not(.status-pill) {
  color: var(--crm-text-muted);
  font-size: .75rem;
  font-weight: 800;
}

.customer-module-row p {
  margin: 6px 0 0;
  color: var(--crm-text);
  font-size: .82rem;
  line-height: 1.45;
}

.customer-module-row form {
  margin: 0;
}

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

.crm-row-actions form {
  display: inline-flex;
  margin: 0;
}

.crm-icon-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 8px;
  line-height: 1;
}

.crm-icon-action svg,
.crm-icon-action [data-eva] {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin-right: 0;
}

.crm-icon-action .ui-icon-added,
.crm-icon-action svg.ui-icon-added,
.crm-icon-action > svg:first-child:not(:last-child),
.crm-icon-action > [data-eva]:first-child:not(:last-child) {
  margin-right: 0;
}

.crm-icon-action--danger {
  color: #dc2626;
}

.crm-icon-action:hover,
.crm-icon-action:focus-visible {
  border-color: rgba(var(--crm-primary-rgb), .22);
  color: var(--crm-primary);
  background: rgba(var(--crm-primary-rgb), .08);
}

.crm-icon-action--danger:hover,
.crm-icon-action--danger:focus-visible {
  border-color: rgba(220, 38, 38, .24);
  color: #dc2626;
  background: rgba(220, 38, 38, .08);
}

.customer-module-row__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--customer-module-action-gap);
}

.customer-module-row > .btn,
.customer-module-row > form .btn,
.customer-module-row__actions .btn,
.customer-invoice-row__actions .btn,
.customer-payment-row__actions .btn,
.customer-expense-row__actions .btn,
.customer-contract-row__actions .btn {
  min-height: var(--customer-module-action-size);
  white-space: nowrap;
}

.customer-invoice-row {
  grid-template-columns: minmax(220px, 1fr) minmax(280px, 1.35fr) minmax(136px, auto);
  grid-template-areas:
    "identity ledger actions"
    "footer footer footer";
  gap: var(--customer-module-row-gap) 16px;
  align-items: stretch;
  padding: var(--customer-module-row-padding);
  background: var(--customer-module-row-bg);
}

.customer-invoice-row__identity,
.customer-contract-row__identity {
  grid-area: identity;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.customer-invoice-row__identity > div,
.customer-contract-row__content {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.customer-invoice-row__identity small {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  min-width: 0;
}

.customer-invoice-row__identity small span {
  white-space: nowrap;
}

.customer-invoice-row__ledger,
.customer-contract-timeline {
  grid-area: ledger;
  display: grid;
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--crm-border-soft);
  border-radius: var(--bs-border-radius-sm);
  background: var(--customer-module-detail-bg);
}

.customer-invoice-row__ledger {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.customer-contract-timeline {
  grid-area: auto;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.customer-invoice-row__ledger > div,
.customer-contract-timeline > div {
  display: grid;
  gap: 4px;
  align-content: center;
  min-width: 0;
  padding: 10px 12px;
}

.customer-invoice-row__ledger > div + div,
.customer-contract-timeline > div + div {
  border-left: 1px solid var(--crm-border-soft);
}

.customer-invoice-row__ledger span,
.customer-contract-timeline span {
  color: var(--crm-text-muted);
  font-size: .68rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.customer-invoice-row__ledger strong,
.customer-contract-timeline strong {
  color: var(--crm-heading);
  font-size: .92rem;
  line-height: 1.15;
  font-weight: 950;
  white-space: nowrap;
}

.customer-invoice-row__ledger strong.is-settled {
  color: var(--bs-success-text-emphasis);
}

.customer-invoice-row__ledger strong.is-open {
  color: var(--bs-warning-text-emphasis);
}

.customer-invoice-row__actions {
  grid-area: actions;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--customer-module-action-gap);
  min-width: 0;
}

.customer-invoice-row__actions .status-pill {
  font-weight: 850;
}

.customer-invoice-row__actions form {
  margin: 0;
}

.customer-invoice-action-strip {
  flex-wrap: nowrap;
}

.customer-invoice-row__footer,
.customer-contract-row__footer {
  grid-area: footer;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  min-width: 0;
  padding-top: 12px;
  border-top: 1px solid var(--crm-border-soft);
}

.customer-invoice-row__footer p,
.customer-contract-row__footer p {
  flex: 1 1 220px;
  margin: 0;
}

.customer-invoice-file {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: min(100%, 520px);
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(var(--crm-primary-rgb), .18);
  border-radius: var(--bs-border-radius-sm);
  background: rgba(var(--crm-primary-rgb), .06);
  color: var(--crm-primary);
  font-size: .78rem;
  font-weight: 900;
  line-height: 1.2;
}

.customer-invoice-file:hover,
.customer-invoice-file:focus {
  border-color: rgba(var(--crm-primary-rgb), .3);
  background: rgba(var(--crm-primary-rgb), .1);
  color: var(--crm-primary);
}

.customer-invoice-file svg,
.customer-invoice-file [data-eva] {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.customer-invoice-file span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-invoice-file em {
  flex: 0 0 auto;
  padding-left: 2px;
  color: var(--crm-text-muted);
  font-size: .72rem;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

.customer-category-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid rgba(var(--crm-primary-rgb), .16);
  border-radius: 999px;
  background: rgba(var(--crm-primary-rgb), .07);
  color: var(--crm-primary);
  font-size: .72rem;
  font-weight: 900;
  line-height: 1.1;
}

.customer-category-chip svg,
.customer-category-chip [data-eva] {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.customer-category-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-category-chip--muted {
  border-color: var(--crm-border-soft);
  background: rgba(var(--bs-secondary-rgb), .06);
  color: var(--crm-text-muted);
}

.customer-invoice-table-wrap {
  --customer-grid-surface: var(--crm-surface);
  --customer-grid-header-bg: #f8fafc;
  --customer-grid-field-bg: #f8fafc;
  --customer-grid-divider: #e7ecf3;
  --customer-grid-hover: #eef4ff;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--customer-grid-divider);
  border-radius: var(--bs-border-radius);
  background: var(--customer-grid-surface);
  box-shadow: 0 4px 16px rgba(15, 23, 42, .035);
  scrollbar-color: rgba(var(--bs-secondary-rgb), .28) transparent;
  scrollbar-width: thin;
}

.customer-invoice-table-wrap:not(.is-grid-enhanced) {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
}

.crm-record-table-wrap {
  --customer-grid-surface: var(--crm-surface);
  --customer-grid-header-bg: #f8fafc;
  --customer-grid-divider: #e7ecf3;
  --customer-grid-hover: #eef4ff;
  position: relative;
  border: 1px solid var(--customer-grid-divider);
  border-radius: var(--bs-border-radius);
  background: var(--customer-grid-surface);
  box-shadow: 0 4px 16px rgba(15, 23, 42, .035);
}

.customer-invoice-table-wrap.is-native-table {
  overflow-x: auto;
  overflow-y: hidden;
}

.customer-invoice-table-wrap.is-native-table .crm-record-table {
  min-width: 760px;
}

body.crm-template[data-theme="dark"] .crm-record-table-wrap {
  --customer-grid-surface: var(--crm-surface);
  --customer-grid-header-bg: var(--crm-surface-elevated);
  --customer-grid-divider: var(--crm-border-soft);
  --customer-grid-hover: #172a46;
  box-shadow: none;
}

body.crm-template[data-theme="dark"] .customer-invoice-table-wrap {
  --customer-grid-surface: var(--crm-surface);
  --customer-grid-header-bg: var(--crm-surface-elevated);
  --customer-grid-field-bg: #0e1726;
  --customer-grid-divider: var(--crm-border-soft);
  --customer-grid-hover: #172a46;
  box-shadow: none;
}

body.crm-template[data-theme="dark"] .customer-invoice-table-wrap.is-grid-enhanced .gridjs-th {
  color: #a9b7ca;
}

body.crm-template[data-theme="dark"] .customer-invoice-table-wrap.is-grid-enhanced .gridjs-sort {
  filter: invert(88%) sepia(9%) saturate(354%) hue-rotate(176deg) brightness(88%);
  opacity: .72;
}

body.crm-template[data-theme="dark"] .customer-invoice-table-wrap .btn-light,
body.crm-template[data-theme="dark"] .customer-invoice-table-wrap .btn-glass {
  border-color: #2a3950;
  background: #182438;
  color: #dce5f1;
}

body.crm-template[data-theme="dark"] .customer-invoice-table-wrap .btn-light:hover,
body.crm-template[data-theme="dark"] .customer-invoice-table-wrap .btn-light:focus,
body.crm-template[data-theme="dark"] .customer-invoice-table-wrap .btn-glass:hover,
body.crm-template[data-theme="dark"] .customer-invoice-table-wrap .btn-glass:focus {
  border-color: rgba(var(--crm-primary-rgb), .58);
  background: rgba(var(--crm-primary-rgb), .2);
  color: #dce9ff;
}

body.crm-template[data-theme="dark"] .customer-invoice-table-wrap .status-pending {
  background: rgba(245, 158, 11, .15);
  color: #f6d28b;
}

body.crm-template[data-theme="dark"] .customer-invoice-table-wrap .status-confirmed,
body.crm-template[data-theme="dark"] .customer-invoice-table-wrap .status-unpaid {
  background: rgba(59, 130, 246, .17);
  color: #a9c8ff;
}

body.crm-template[data-theme="dark"] .customer-invoice-table-wrap .status-completed,
body.crm-template[data-theme="dark"] .customer-invoice-table-wrap .status-paid {
  background: rgba(34, 197, 94, .15);
  color: #9be7b2;
}

body.crm-template[data-theme="dark"] .customer-invoice-table-wrap .status-cancelled,
body.crm-template[data-theme="dark"] .customer-invoice-table-wrap .status-no-show {
  background: rgba(239, 68, 68, .15);
  color: #f8aaaa;
}

.customer-invoice-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 100%;
  min-height: 42px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--customer-grid-divider);
  background: var(--customer-grid-surface);
}

.customer-invoice-table-toolbar > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--crm-text-muted);
  font-size: .7rem;
}

.customer-invoice-table-toolbar > span svg,
.customer-invoice-table-toolbar > span [data-eva] {
  width: 15px;
  height: 15px;
  color: var(--crm-primary);
}

.customer-invoice-table-toolbar > span strong {
  color: var(--crm-heading);
  font-weight: 900;
}

.customer-invoice-table-toolbar .btn {
  min-height: 30px;
  padding: 4px 9px;
  white-space: nowrap;
}

.customer-invoice-table {
  width: 100%;
  min-width: 0;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.customers-directory-table > .customers-directory-grid {
  min-width: 860px;
}

.supplier-directory-table > .crm-directory-table {
  min-width: 1080px;
}

.projects-directory-table > .projects-directory-grid {
  min-width: 1120px;
}

.crm-record-table {
  width: 100%;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.customer-invoice-table col:nth-child(1) { width: 18%; }
.customer-invoice-table col:nth-child(2) { width: 11%; }
.customer-invoice-table col:nth-child(3) { width: 20%; }
.customer-invoice-table col:nth-child(4) { width: 14%; }
.customer-invoice-table col:nth-child(5) { width: 11%; }
.customer-invoice-table col:nth-child(6) { width: 11%; }
.customer-invoice-table col:nth-child(7) { width: 15%; }

.customer-invoice-table th,
.customer-invoice-table td {
  min-width: 0;
  padding: 9px 10px;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.customer-invoice-table th {
  height: 36px;
  color: var(--crm-text-muted);
  background: var(--customer-grid-header-bg);
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.customer-invoice-table td {
  height: 48px;
  padding-block: 6px;
  color: var(--crm-text);
  font-size: .76rem;
  font-weight: 650;
}

.customer-invoice-table tbody tr + tr td {
  border-top: 1px solid var(--customer-grid-divider);
}

.customer-invoice-table th + th,
.customer-invoice-table td + td {
  border-left: 0;
}

.customer-invoice-table__actions-heading {
  text-align: center !important;
}

.customer-invoice-table:not(.crm-unified-table):not(.crm-directory-table--unified) tbody tr {
  transition: none;
}

.customer-invoice-table:not(.crm-unified-table):not(.crm-directory-table--unified) tbody tr:hover,
.customer-invoice-table:not(.crm-unified-table):not(.crm-directory-table--unified) tbody tr:focus-within {
  background: var(--customer-grid-hover);
  box-shadow: none;
}

.customer-invoice-table__number strong {
  display: block;
  overflow: hidden;
  color: var(--crm-heading);
  font-size: .8rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-invoice-table__date,
.customer-invoice-table__money {
  font-variant-numeric: tabular-nums;
}

.customer-invoice-table__money {
  text-align: right !important;
  color: var(--crm-heading) !important;
  font-weight: 950 !important;
}

.customer-invoice-table__money.is-settled {
  color: var(--bs-success-text-emphasis) !important;
}

.customer-invoice-table__money.is-open {
  color: var(--bs-warning-text-emphasis) !important;
}

.customer-invoice-table td .customer-category-chip {
  max-width: 100%;
  min-height: 24px;
  padding: 3px 7px;
  font-size: .68rem;
}

.customer-invoice-table__action-cell {
  padding-inline: 8px !important;
}

.customer-invoice-table__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.customer-invoice-table__actions form {
  display: flex;
  margin: 0;
}

.customer-invoice-table__actions .crm-icon-action {
  flex: 0 0 34px;
}

.customer-invoice-grid-mount:empty {
  display: none;
}

.customer-invoice-table-wrap.is-grid-enhanced {
  overflow: visible;
}

.customer-invoice-table-wrap.is-grid-enhanced .gridjs-container {
  position: static;
  min-width: 0;
  color: var(--crm-text);
  font-family: inherit;
  font-size: .76rem;
}

.customer-invoice-table-wrap.is-grid-enhanced .gridjs-head {
  position: absolute;
  z-index: 2;
  top: 6px;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(340px, calc(100% - 320px));
  min-height: 30px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  transform: translateX(-50%);
}

.customer-invoice-table-wrap.is-grid-enhanced .gridjs-search {
  float: none;
  width: min(340px, 100%);
}

.customer-invoice-table-wrap.is-grid-enhanced .gridjs-search-input {
  width: 100%;
  min-height: 30px;
  padding: 5px 11px;
  border: 1px solid var(--customer-grid-divider);
  border-radius: var(--bs-border-radius-sm);
  background: var(--customer-grid-field-bg);
  color: var(--crm-heading);
  box-shadow: none;
  font-family: inherit;
  font-size: .76rem;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.customer-invoice-table-wrap.is-grid-enhanced .gridjs-search-input:focus {
  border-color: rgba(var(--crm-primary-rgb), .48);
  background: var(--customer-grid-surface);
  box-shadow: 0 0 0 3px rgba(var(--crm-primary-rgb), .09);
  outline: 0;
}

.customer-invoice-table-wrap.is-grid-enhanced .gridjs-wrapper {
  overflow: hidden;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  scrollbar-color: rgba(var(--bs-secondary-rgb), .28) transparent;
  scrollbar-width: thin;
}

.customer-invoice-table-wrap.is-grid-enhanced .gridjs-table {
  width: 100%;
  min-width: 0;
  margin: 0;
  table-layout: fixed;
  border: 0;
}

.customer-invoice-table-wrap.is-grid-enhanced .gridjs-th,
.customer-invoice-table-wrap.is-grid-enhanced .gridjs-td {
  min-width: 0;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid var(--customer-grid-divider);
  background: var(--customer-grid-surface);
  color: var(--crm-text);
  text-align: left;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.customer-invoice-table-wrap.is-grid-enhanced .gridjs-th + .gridjs-th,
.customer-invoice-table-wrap.is-grid-enhanced .gridjs-td + .gridjs-td {
  border-left: 0;
}

.customer-invoice-table-wrap.is-grid-enhanced .gridjs-th {
  height: 34px;
  padding: 6px 18px 6px 8px;
  background: var(--customer-grid-header-bg);
  color: var(--crm-text-muted);
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.customer-invoice-table-wrap.is-grid-enhanced .gridjs-th-content {
  overflow: hidden;
  text-overflow: ellipsis;
}

.customer-invoice-table-wrap.is-grid-enhanced .gridjs-sort {
  right: 4px;
  width: 12px;
  color: var(--crm-text-muted);
}

.customer-invoice-table-wrap.is-grid-enhanced .gridjs-td {
  height: 48px;
  padding: 6px 8px;
  font-size: .76rem;
  font-weight: 650;
  transition: color .16s ease;
}

.customer-invoice-table-wrap.is-grid-enhanced .customer-invoice-table__actions .crm-icon-action {
  width: 30px;
  min-width: 30px;
  height: 30px;
  flex-basis: 30px;
  border-radius: 7px;
}

.customer-invoice-table-wrap.is-grid-enhanced .gridjs-tr:hover .gridjs-td,
.customer-invoice-table-wrap.is-grid-enhanced .gridjs-tr:focus .gridjs-td,
.customer-invoice-table-wrap.is-grid-enhanced .gridjs-tr:focus-within .gridjs-td {
  background-color: var(--customer-grid-hover) !important;
}

.customer-invoice-table-wrap.is-grid-enhanced .customer-grid-action-row {
  cursor: pointer;
  outline: 0;
}

.customer-invoice-table-wrap.is-grid-enhanced .gridjs-tr:hover .gridjs-td:first-child,
.customer-invoice-table-wrap.is-grid-enhanced .gridjs-tr:focus .gridjs-td:first-child,
.customer-invoice-table-wrap.is-grid-enhanced .gridjs-tr:focus-within .gridjs-td:first-child {
  box-shadow: none;
}

.customer-invoice-table-wrap.is-grid-enhanced .customer-grid-action-row:focus-visible .gridjs-td {
  background-color: var(--customer-grid-hover) !important;
}

.customer-invoice-table-wrap.is-grid-enhanced .customer-grid-action-row:focus-visible .gridjs-td:first-child {
  box-shadow: inset 3px 0 0 var(--crm-primary), inset 0 1px 0 rgba(var(--crm-primary-rgb), .22), inset 0 -1px 0 rgba(var(--crm-primary-rgb), .22);
}

.customer-invoice-table th[data-type="number"],
.customer-invoice-table-wrap.is-grid-enhanced .gridjs-th[data-column-type="number"],
.customer-invoice-table-wrap.is-grid-enhanced .gridjs-td[data-column-type="number"] {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
}

.customer-data-grid .gridjs-td a:not(.btn) {
  color: var(--crm-primary);
  font-weight: 850;
  text-decoration: none;
}

.customer-data-grid .gridjs-td small {
  color: var(--crm-text-muted);
  font-size: .67rem;
  font-weight: 750;
}

.customer-grid-file-action,
.customer-grid-file-action label {
  margin: 0;
}

.customer-invoice-table-wrap.is-grid-enhanced .gridjs-th[data-label="Ενέργειες"] {
  padding-right: 10px;
  text-align: center;
}

.customer-invoice-table-wrap.is-grid-enhanced .gridjs-td[data-label="Ενέργειες"] {
  text-align: center;
}

.customer-invoice-table-wrap.is-grid-enhanced .gridjs-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 9px 10px;
  border: 0;
  border-top: 1px solid var(--customer-grid-divider);
  background: var(--customer-grid-surface);
  box-shadow: none;
}

.customer-invoice-table-wrap.is-grid-enhanced .gridjs-summary {
  color: var(--crm-text-muted);
  font-size: .7rem;
  font-weight: 750;
}

.customer-invoice-table-wrap.is-grid-enhanced .gridjs-pagination {
  display: flex !important;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: none;
  float: none !important;
}

.customer-invoice-table-wrap.is-grid-enhanced .gridjs-pagination .gridjs-pages {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  float: none !important;
}

.customer-invoice-table-wrap.is-grid-enhanced .gridjs-pagination .gridjs-pages button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 4px 8px;
  border-color: var(--customer-grid-divider);
  background: var(--customer-grid-surface);
  color: var(--crm-text);
  font-size: .7rem;
  font-weight: 850;
  line-height: 1;
  vertical-align: middle;
}

.customer-invoice-table-wrap.is-grid-enhanced .gridjs-pagination .gridjs-pages button:hover:not(:disabled) {
  border-color: rgba(var(--crm-primary-rgb), .28);
  background: rgba(var(--crm-primary-rgb), .06);
  color: var(--crm-primary);
}

.customer-invoice-table-wrap.is-grid-enhanced .gridjs-pagination .gridjs-pages button.gridjs-currentPage {
  width: 32px;
  min-width: 32px;
  height: 32px;
  padding: 0;
  border-color: var(--crm-primary);
  border-radius: 50%;
  background: var(--crm-primary);
  color: #fff;
  line-height: 1;
}

@media (max-width: 767.98px) {
  .customer-invoice-table-toolbar {
    min-height: 82px;
    align-items: flex-start;
  }

  .customer-invoice-table-wrap.is-grid-enhanced .gridjs-head {
    top: 43px;
    right: 10px;
    left: 10px;
    justify-content: stretch;
    width: auto;
    transform: none;
  }

  .customer-invoice-table-wrap.is-grid-enhanced .gridjs-search {
    width: 100%;
  }

  .customer-invoice-table-wrap.is-grid-enhanced .gridjs-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: stretch;
    gap: 8px;
  }

  .customer-invoice-table-wrap.is-grid-enhanced .gridjs-summary,
  .customer-invoice-table-wrap.is-grid-enhanced .gridjs-pagination {
    float: none;
  }

  .customer-invoice-table-wrap.is-grid-enhanced .gridjs-pagination {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .customer-invoice-table-wrap.is-grid-enhanced .gridjs-pagination .gridjs-pages {
    align-self: flex-end;
  }

  .customer-invoice-table-wrap.is-grid-enhanced .gridjs-thead {
    display: none;
  }

  .customer-invoice-table-wrap.is-grid-enhanced .gridjs-tbody {
    display: grid;
  }

  .customer-invoice-table-wrap.is-grid-enhanced .gridjs-tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-bottom: 1px solid var(--crm-border-soft);
  }

  .customer-invoice-table-wrap.is-grid-enhanced .gridjs-td,
  .customer-invoice-table-wrap.is-grid-enhanced .gridjs-td:nth-child(n) {
    display: grid;
    gap: 5px;
    align-content: center;
    width: auto;
    height: auto;
    min-height: 58px;
    padding: 8px 10px;
    border-bottom: 0;
    border-left: 0;
    white-space: normal;
  }

  .customer-invoice-table-wrap.is-grid-enhanced .gridjs-td::before {
    content: attr(data-label);
    color: var(--crm-text-muted);
    font-size: .6rem;
    font-weight: 900;
    letter-spacing: .035em;
    line-height: 1;
    text-transform: uppercase;
  }

  .customer-invoice-table-wrap.is-grid-enhanced .gridjs-td:nth-child(1) {
    grid-column: 1 / -1;
  }

  .customer-data-grid.is-grid-enhanced .gridjs-td[data-label="Ενέργειες"] {
    grid-column: 1 / -1;
  }

  .customer-invoice-table-wrap.is-grid-enhanced .gridjs-td[data-column-type="number"] {
    text-align: left !important;
  }

  .customer-invoice-table-wrap.is-grid-enhanced .customer-invoice-table__actions {
    justify-content: flex-start;
  }

  .customer-data-grid.is-grid-enhanced .customer-invoice-table__actions {
    justify-content: flex-end;
  }
}

@media (max-width: 767.98px) {
  .customer-invoice-table-toolbar.customers-directory-table__toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 8px;
    min-height: auto;
    padding: 10px;
  }

  .customers-directory-table__toolbar::after {
    display: none;
  }

  .customers-grid-search {
    justify-self: stretch;
    max-width: none;
  }

  .customers-directory-table.is-grid-enhanced .gridjs-tbody {
    gap: 8px;
    padding: 8px;
    background: var(--customer-grid-field-bg);
  }

  .customers-directory-table.is-grid-enhanced .gridjs-tr {
    position: relative;
    padding: 2px 0;
    overflow: hidden;
    border: 1px solid var(--customer-grid-divider);
    border-radius: 10px;
    background: var(--customer-grid-surface);
    box-shadow: 0 2px 8px rgba(15, 23, 42, .035);
  }

  .customers-directory-table.is-grid-enhanced .gridjs-td {
    min-height: 56px;
  }

  .customers-directory-table.is-grid-enhanced .gridjs-td:first-child {
    min-height: 70px;
    padding-right: 48px;
  }

  .customers-directory-table.is-grid-enhanced .gridjs-td:nth-child(2) {
    grid-column: 1 / -1;
    min-height: 66px;
    border-top: 1px solid var(--customer-grid-divider);
  }

  .customers-directory-table.is-grid-enhanced .gridjs-td:nth-child(3),
  .customers-directory-table.is-grid-enhanced .gridjs-td:nth-child(4) {
    min-height: 56px;
    border-top: 1px solid var(--customer-grid-divider);
  }

  .customers-directory-table.is-grid-enhanced .gridjs-td:nth-child(4) {
    grid-column: auto;
    border-left: 1px solid var(--customer-grid-divider);
  }

  .customers-directory-table.is-grid-enhanced .gridjs-td[data-label="Ενέργειες"] {
    position: absolute;
    z-index: 2;
    top: 37px;
    right: 10px;
    display: block;
    width: auto;
    min-height: 0;
    padding: 0;
    overflow: visible;
  }

  .customers-directory-table.is-grid-enhanced .gridjs-td[data-label="Ενέργειες"]::before {
    display: none;
  }

  .customers-grid-contact .customers-contact-links {
    flex-wrap: wrap;
    overflow: visible;
  }

  .customers-grid-contact .customers-contact-links a[href^="mailto:"] {
    flex-basis: 100%;
  }

  .customers-directory-table > .pagination-bar {
    align-items: stretch;
  }

  body.crm-template[data-theme="dark"] .customers-directory-table.is-grid-enhanced .gridjs-tr,
  body.crm-template[data-bs-theme="dark"] .customers-directory-table.is-grid-enhanced .gridjs-tr {
    box-shadow: none;
  }
}

.customer-payment-row {
  grid-template-columns: minmax(220px, 1fr) minmax(360px, 1.35fr) minmax(104px, auto) minmax(44px, auto);
  grid-template-areas:
    "identity details amount actions"
    "footer footer footer footer";
  gap: var(--customer-module-row-gap) 16px;
  align-items: stretch;
  padding: var(--customer-module-row-padding);
  background: var(--customer-module-row-bg);
}

.customer-payment-row__identity {
  grid-area: identity;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.customer-payment-row__identity > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.customer-payment-row__identity small {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  min-width: 0;
}

.customer-payment-row__identity small span {
  white-space: nowrap;
}

.customer-payment-row__details {
  grid-area: details;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--crm-border-soft);
  border-radius: var(--bs-border-radius-sm);
  background: var(--customer-module-detail-bg);
}

.customer-payment-row__details > div {
  display: grid;
  gap: 4px;
  align-content: center;
  min-width: 0;
  padding: 10px 12px;
}

.customer-payment-row__details > div + div {
  border-left: 1px solid var(--crm-border-soft);
}

.customer-payment-row__details span,
.customer-payment-row__amount span {
  color: var(--crm-text-muted);
  font-size: .68rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.customer-payment-row__details strong {
  overflow: hidden;
  color: var(--crm-heading);
  font-size: .9rem;
  font-weight: 950;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-payment-row__details strong.is-muted {
  color: var(--crm-text-muted);
}

.customer-payment-row__amount {
  grid-area: amount;
  display: grid;
  gap: 4px;
  align-content: center;
  justify-items: end;
  min-width: 0;
  white-space: nowrap;
}

.customer-payment-row__amount strong {
  color: var(--crm-heading);
  font-size: .95rem;
  font-weight: 950;
  line-height: 1.15;
}

.customer-payment-row__actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.customer-payment-row__actions form {
  margin: 0;
}

.customer-payment-row__footer {
  grid-area: footer;
  min-width: 0;
  padding-top: 12px;
  border-top: 1px solid var(--crm-border-soft);
}

.customer-payment-row__footer p {
  margin: 0;
}

.customer-expense-section .customer-finance-dashboard {
  margin-bottom: 14px;
}

.customer-expense-section .customer-finance-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, .92fr);
  gap: var(--customer-module-gap);
  align-items: stretch;
}

.customer-expense-metric--primary::before {
  background: #ef4444;
}

.customer-expense-breakdown .customer-finance-breakdown__row i {
  background: #ef4444;
}

.customer-expense-ring {
  background:
    radial-gradient(circle at center, var(--crm-surface) 0 57%, transparent 58%),
    conic-gradient(#16a34a 0 var(--finance-progress), rgba(239, 68, 68, .14) var(--finance-progress) 100%);
}

.customer-expense-form {
  margin-bottom: 14px;
}

.customer-expense-row {
  grid-template-columns: minmax(220px, 1fr) minmax(360px, 1.25fr) minmax(128px, auto) minmax(112px, auto);
  grid-template-areas:
    "identity details amount actions"
    "footer footer footer footer";
  gap: var(--customer-module-row-gap) 16px;
  align-items: stretch;
  padding: var(--customer-module-row-padding);
  background: var(--customer-module-row-bg);
}

.customer-expense-row__identity {
  grid-area: identity;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.customer-expense-row__identity > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.customer-expense-row__identity small {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  min-width: 0;
}

.customer-expense-row__identity small span {
  white-space: nowrap;
}

.customer-expense-row__details {
  grid-area: details;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--crm-border-soft);
  border-radius: var(--bs-border-radius-sm);
  background: var(--customer-module-detail-bg);
}

.customer-expense-row__details > div {
  display: grid;
  gap: 4px;
  align-content: center;
  min-width: 0;
  padding: 10px 12px;
}

.customer-expense-row__details > div + div {
  border-left: 1px solid var(--crm-border-soft);
}

.customer-expense-row__details span,
.customer-expense-row__amount span {
  color: var(--crm-text-muted);
  font-size: .68rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.customer-expense-row__details strong {
  overflow: hidden;
  color: var(--crm-heading);
  font-size: .9rem;
  font-weight: 950;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-expense-row__amount {
  grid-area: amount;
  display: grid;
  gap: 4px;
  align-content: center;
  justify-items: end;
  min-width: 0;
  white-space: nowrap;
}

.customer-expense-row__amount strong {
  color: var(--crm-heading);
  font-size: .95rem;
  font-weight: 950;
  line-height: 1.15;
}

.customer-expense-row__amount small {
  color: var(--crm-text-muted);
  font-size: .72rem;
  font-weight: 850;
}

.customer-expense-row__actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--customer-module-action-gap);
}

.customer-expense-row__actions form {
  margin: 0;
}

.customer-expense-row__footer {
  grid-area: footer;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  min-width: 0;
  padding-top: 12px;
  border-top: 1px solid var(--crm-border-soft);
}

.customer-expense-row__footer span,
.customer-expense-row__footer a {
  color: var(--crm-primary);
  font-size: .78rem;
  font-weight: 900;
  text-decoration: none;
}

.customer-expense-row__footer a:hover,
.customer-expense-row__footer a:focus {
  text-decoration: underline;
}

.customer-expense-row__footer p {
  flex: 1 1 220px;
  margin: 0;
}

.customer-finance-dashboard {
  display: grid;
  gap: 14px;
}

.customer-finance-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--customer-module-gap);
}

.customer-finance-metric,
.customer-finance-card {
  border: 1px solid var(--crm-border-soft);
  border-radius: var(--customer-module-row-radius);
  background: var(--customer-module-row-bg);
  box-shadow: var(--customer-module-row-shadow);
}

.customer-finance-metric {
  position: relative;
  display: grid;
  gap: 4px;
  min-height: 92px;
  overflow: hidden;
  padding: 14px;
}

.customer-finance-metric::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: rgba(var(--crm-primary-rgb), .55);
}

.customer-finance-metric--primary::before {
  background: var(--crm-primary);
}

.customer-finance-metric--warning::before {
  background: #f59e0b;
}

.customer-finance-metric span,
.customer-finance-card__header span,
.customer-finance-card__footer span,
.customer-finance-collection__details span {
  color: var(--crm-text-muted);
  font-size: .7rem;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.customer-finance-metric strong {
  color: var(--crm-heading);
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  font-weight: 950;
  line-height: 1.12;
}

.customer-finance-metric small {
  color: var(--crm-text-muted);
  font-size: .76rem;
  font-weight: 800;
  line-height: 1.35;
}

.customer-finance-section .customer-finance-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, .92fr);
  gap: var(--customer-module-gap);
  align-items: stretch;
}

.customer-finance-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
}

.customer-finance-card--wide {
  grid-column: span 1;
}

.customer-finance-card__header,
.customer-finance-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.customer-finance-card__header > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.customer-finance-card__header h3 {
  margin: 0;
  color: var(--crm-heading);
  font-size: .95rem;
  font-weight: 950;
  line-height: 1.15;
}

.customer-finance-card__header strong,
.customer-finance-card__footer strong {
  flex: 0 0 auto;
  color: var(--crm-heading);
  font-size: .98rem;
  font-weight: 950;
  white-space: nowrap;
}

.customer-finance-card__header a {
  flex: 0 0 auto;
  color: var(--crm-primary);
  font-size: .76rem;
  font-weight: 900;
  text-decoration: none;
}

.customer-finance-card__header a:hover,
.customer-finance-card__header a:focus {
  text-decoration: underline;
}

.customer-money-chart {
  --money-chart-rgb: var(--crm-primary-rgb);
  --money-chart-line: var(--crm-primary);
  position: relative;
  display: grid;
  place-items: stretch;
  height: 190px;
  min-height: 190px;
  overflow: hidden;
  border: 1px solid var(--crm-border-soft);
  border-radius: var(--bs-border-radius-sm);
  background:
    linear-gradient(180deg, rgba(var(--money-chart-rgb), .045), rgba(var(--bs-secondary-rgb), .018)),
    repeating-linear-gradient(0deg, transparent 0, transparent 37px, rgba(var(--bs-secondary-rgb), .085) 38px);
}

.customer-money-chart--expense {
  --money-chart-rgb: 239, 68, 68;
  --money-chart-line: #ef4444;
}

.customer-money-chart svg {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
}

.customer-money-chart__area {
  fill: rgba(var(--money-chart-rgb), .16);
}

.customer-money-chart__line {
  fill: none;
  stroke: var(--money-chart-line);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.customer-money-chart__point {
  fill: var(--crm-surface);
  stroke: var(--money-chart-line);
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.customer-money-chart__empty {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 6px;
  height: 100%;
  padding: 18px;
  text-align: center;
}

.customer-money-chart__empty svg,
.customer-money-chart__empty [data-eva] {
  width: 24px;
  height: 24px;
  color: var(--crm-primary);
}

.customer-money-chart--expense .customer-money-chart__empty svg,
.customer-money-chart--expense .customer-money-chart__empty [data-eva] {
  color: #ef4444;
}

.customer-money-chart__empty strong {
  color: var(--crm-heading);
  font-size: .9rem;
  font-weight: 950;
}

.customer-money-chart__empty span {
  max-width: 280px;
  color: var(--crm-text-muted);
  font-size: .76rem;
  font-weight: 800;
  line-height: 1.35;
}

.customer-money-chart__labels {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  color: var(--crm-text-muted);
  font-size: .68rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.customer-finance-breakdown,
.customer-finance-list {
  display: grid;
  gap: 8px;
}

.customer-finance-breakdown__row {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--crm-border-soft);
  border-radius: var(--bs-border-radius-sm);
  background: var(--customer-module-detail-bg);
}

.customer-finance-breakdown__row > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.customer-finance-breakdown__row span {
  min-width: 0;
  overflow: hidden;
  color: var(--crm-heading);
  font-size: .82rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-finance-breakdown__row strong {
  flex: 0 0 auto;
  color: var(--crm-heading);
  font-size: .82rem;
  font-weight: 950;
  white-space: nowrap;
}

.customer-finance-breakdown__row em {
  display: block;
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(var(--bs-secondary-rgb), .11);
}

.customer-finance-breakdown__row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--crm-primary);
}

.customer-finance-collection {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.customer-finance-ring {
  display: grid;
  place-items: center;
  width: 118px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--crm-surface) 0 57%, transparent 58%),
    conic-gradient(var(--crm-primary) 0 var(--finance-progress), rgba(var(--bs-secondary-rgb), .12) var(--finance-progress) 100%);
}

.customer-finance-ring span {
  color: var(--crm-heading);
  font-size: 1rem;
  font-weight: 950;
}

.customer-finance-collection__details {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--crm-border-soft);
  border-radius: var(--bs-border-radius-sm);
  background: var(--customer-module-detail-bg);
}

.customer-finance-collection__details > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
}

.customer-finance-collection__details > div + div {
  border-top: 1px solid var(--crm-border-soft);
}

.customer-finance-collection__details strong {
  color: var(--crm-heading);
  font-size: .86rem;
  font-weight: 950;
  white-space: nowrap;
}

.customer-finance-list__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--crm-border-soft);
  border-radius: var(--bs-border-radius-sm);
  background: var(--customer-module-detail-bg);
}

.customer-finance-list__item > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.customer-finance-list__item strong {
  overflow: hidden;
  color: var(--crm-heading);
  font-size: .84rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-finance-list__item small {
  overflow: hidden;
  color: var(--crm-text-muted);
  font-size: .74rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-finance-list__item em {
  color: var(--crm-heading);
  font-size: .86rem;
  font-style: normal;
  font-weight: 950;
  white-space: nowrap;
}

.customer-finance-card .customer-empty-state {
  min-height: 120px;
  padding: 14px;
}

.customer-task-form {
  margin-bottom: 12px;
}

.customer-due-presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--crm-border-soft);
  border-radius: 10px;
  background: rgba(var(--bs-secondary-rgb), .055);
}

.customer-due-presets > span {
  flex: 1 1 100%;
  color: var(--crm-text-muted);
  font-size: .72rem;
  font-weight: 900;
}

.customer-due-presets button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 11px;
  color: var(--crm-text);
  border: 1px solid var(--crm-border-soft);
  border-radius: 999px;
  background: var(--crm-surface-elevated);
  font-size: .74rem;
  font-weight: 850;
  line-height: 1;
  transition: color .18s ease, border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.customer-due-presets button:hover,
.customer-due-presets button.is-active {
  color: var(--crm-primary);
  border-color: rgba(var(--crm-primary-rgb), .24);
  background: rgba(var(--crm-primary-rgb), .09);
  box-shadow: 0 8px 20px rgba(var(--crm-primary-rgb), .08);
}

.customer-task-row {
  grid-template-columns: auto minmax(0, 1fr) auto auto;
}

.customer-task-row.is-overdue {
  box-shadow: inset 3px 0 0 #dc2626;
}

.customer-task-row--done {
  grid-template-columns: auto minmax(0, 1fr) auto;
  opacity: .82;
}

.customer-task-priority {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 900;
  white-space: nowrap;
}

.customer-task-priority--low,
.customer-task-priority--normal {
  color: var(--crm-text-muted);
  background: rgba(var(--bs-secondary-rgb), .1);
}

.customer-task-priority--high {
  color: #a16207;
  background: rgba(245, 158, 11, .16);
}

.customer-task-priority--urgent {
  color: #b91c1c;
  background: rgba(220, 38, 38, .14);
}

.customer-task-history {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.customer-task-history__list {
  padding-top: 0;
}

.customer-proposal-row {
  --customer-proposal-action-gap: var(--customer-module-action-gap);
  --customer-proposal-action-size: var(--customer-module-action-size);
  --customer-module-row-gap: 10px;
  --customer-module-row-padding: 12px;
  position: relative;
  grid-template-columns: minmax(0, 1fr) minmax(188px, 216px);
  grid-template-areas:
    "identity side"
    "edit edit"
    "upload upload";
  gap: var(--customer-module-row-gap) 16px;
  align-items: stretch;
  padding: var(--customer-module-row-padding);
  background: var(--customer-module-row-bg);
  box-shadow: var(--customer-module-row-shadow);
}

.customer-proposal-row__identity {
  grid-area: identity;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-width: 0;
}

.customer-proposal-row__identity .customer-workspace-icon {
  width: var(--customer-module-icon-size);
  height: var(--customer-module-icon-size);
}

.customer-proposal-row__content {
  display: grid;
  gap: var(--customer-module-row-gap);
  min-width: 0;
}

.customer-proposal-row__heading {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px 10px;
  min-width: 0;
}

.customer-proposal-row__heading strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--crm-heading);
  font-size: .9rem;
  font-weight: 950;
}

.customer-proposal-row__heading span {
  color: var(--crm-text-muted);
  font-size: .72rem;
  font-weight: 900;
  white-space: nowrap;
}

.customer-proposal-timeline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--crm-border-soft);
  border-radius: var(--bs-border-radius-sm);
  background: var(--customer-module-detail-bg);
}

.customer-proposal-timeline > div {
  display: grid;
  gap: 4px;
  align-content: center;
  min-width: 0;
  padding: 7px 10px;
}

.customer-proposal-timeline > div + div {
  border-left: 1px solid var(--crm-border-soft);
}

.customer-proposal-timeline span {
  color: var(--crm-text-muted);
  font-size: .68rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.customer-proposal-timeline strong {
  overflow: hidden;
  color: var(--crm-heading);
  font-size: .86rem;
  font-weight: 950;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-proposal-row__footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  min-width: 0;
  padding-top: 10px;
  border-top: 1px solid var(--crm-border-soft);
}

.customer-proposal-row__footer p {
  flex: 1 1 220px;
  margin: 0;
}

.customer-proposal-row__side {
  grid-area: side;
  display: grid;
  align-content: space-between;
  justify-items: end;
  gap: 14px;
  min-width: 0;
  padding-left: 16px;
  border-left: 1px solid var(--crm-border-soft);
}

.customer-proposal-row__side-top {
  display: grid;
  justify-items: end;
  gap: 7px;
}

.customer-proposal-row__side-top strong {
  color: var(--crm-heading);
  font-size: .94rem;
  font-weight: 950;
  white-space: nowrap;
}

.customer-proposal-row__actions {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: var(--customer-proposal-action-gap);
  min-height: var(--customer-proposal-action-size);
  transform: translateY(-7px);
}

.customer-proposal-archive {
  display: flex;
  margin: 0;
}

.customer-proposal-edit-slot,
.customer-proposal-upload-slot {
  flex: 0 0 var(--customer-proposal-action-size);
  width: var(--customer-proposal-action-size);
  height: var(--customer-proposal-action-size);
}

.customer-proposal-edit,
.customer-proposal-upload {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.customer-proposal-edit {
  grid-area: edit;
}

.customer-proposal-upload {
  grid-area: upload;
}

.customer-proposal-edit summary,
.customer-proposal-upload summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: var(--customer-proposal-action-size);
  width: fit-content;
  padding: 6px 10px;
  border: 1px solid var(--crm-border-soft);
  border-radius: var(--bs-border-radius);
  background: var(--crm-surface);
  color: var(--crm-primary);
  font-size: .78rem;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.customer-proposal-edit:not([open]),
.customer-proposal-upload:not([open]) {
  height: 0;
}

.customer-proposal-edit:not([open]) summary,
.customer-proposal-upload:not([open]) summary {
  position: absolute;
  bottom: calc(var(--customer-module-row-padding) + var(--customer-module-row-gap) + var(--customer-module-row-gap));
  width: var(--customer-proposal-action-size);
  min-width: var(--customer-proposal-action-size);
  height: var(--customer-proposal-action-size);
  padding: 0;
  transform: translateY(-7px);
}

.customer-proposal-edit:not([open]) summary {
  right: calc(var(--customer-module-row-padding) + var(--customer-proposal-action-size) + var(--customer-proposal-action-gap) + var(--customer-proposal-action-size) + var(--customer-proposal-action-gap));
}

.customer-proposal-upload:not([open]) summary {
  right: calc(var(--customer-module-row-padding) + var(--customer-proposal-action-size) + var(--customer-proposal-action-gap));
}

.customer-proposal-edit:not([open]) summary span,
.customer-proposal-upload:not([open]) summary span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.customer-proposal-edit[open],
.customer-proposal-upload[open] {
  margin-top: 4px;
  padding: 12px;
  border: 1px solid var(--crm-border-soft);
  border-radius: var(--bs-border-radius);
  background: rgba(var(--bs-secondary-rgb), .035);
}

.customer-proposal-edit[open] summary,
.customer-proposal-upload[open] summary {
  min-width: 0;
  height: 32px;
  padding: 0 10px;
  background: rgba(var(--crm-primary-rgb), .07);
}

.customer-proposal-edit summary::-webkit-details-marker,
.customer-proposal-upload summary::-webkit-details-marker {
  display: none;
}

.customer-proposal-edit form,
.customer-proposal-upload form {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.customer-proposal-archive .btn {
  width: var(--customer-proposal-action-size);
  min-width: var(--customer-proposal-action-size);
  height: var(--customer-proposal-action-size);
}

.customer-contract-row {
  --customer-contract-action-gap: var(--customer-module-action-gap);
  --customer-contract-action-size: var(--customer-module-action-size);
  position: relative;
  grid-template-columns: minmax(0, 1fr) minmax(188px, 216px);
  grid-template-areas:
    "identity side"
    "edit edit";
  gap: var(--customer-module-row-gap) 16px;
  align-items: stretch;
  padding: var(--customer-module-row-padding);
  background: var(--customer-module-row-bg);
  box-shadow: var(--customer-module-row-shadow);
}

.customer-contract-row__identity {
  align-items: start;
}

.customer-contract-row__identity .customer-workspace-icon {
  width: var(--customer-module-icon-size);
  height: var(--customer-module-icon-size);
}

.customer-contract-row__content {
  gap: var(--customer-module-row-gap);
}

.customer-contract-row__heading {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-width: 0;
}

.customer-contract-row__heading strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--crm-heading);
  font-size: .9rem;
  font-weight: 950;
}

.customer-contract-timeline {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.customer-contract-timeline > div {
  gap: 4px;
}

.customer-contract-timeline span {
  font-size: .68rem;
  font-weight: 900;
}

.customer-contract-timeline strong {
  overflow: hidden;
  text-overflow: ellipsis;
}

.customer-contract-row__footer {
  grid-area: auto;
  gap: 8px 12px;
  padding-top: 12px;
  border-top: 1px solid var(--crm-border-soft);
}

.customer-contract-row__footer .customer-contract-file:only-child {
  grid-column: 1 / -1;
}

.customer-contract-row__footer p:only-child {
  grid-column: 1 / -1;
}

.customer-contract-row__footer p {
  margin: 0;
}

.customer-contract-row__side {
  grid-area: side;
  display: grid;
  align-content: space-between;
  justify-items: end;
  gap: 14px;
  min-width: 0;
  padding-left: 16px;
  border-left: 1px solid var(--crm-border-soft);
}

.customer-contract-row__side-top {
  display: grid;
  justify-items: end;
  gap: 7px;
  min-width: 0;
}

.customer-contract-row__side-top .status-pill {
  font-weight: 850;
}

.customer-contract-row__side-top strong {
  color: var(--crm-heading);
  font-size: .94rem;
  font-weight: 950;
  white-space: nowrap;
}

.customer-contract-row__side-top small {
  max-width: 100%;
  overflow: hidden;
  color: var(--crm-text-muted);
  font-size: .72rem;
  font-weight: 900;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-contract-row__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--customer-contract-action-gap);
  min-height: var(--customer-contract-action-size);
  min-width: 0;
}

.customer-contract-row__actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  line-height: 1;
  white-space: nowrap;
}

.customer-contract-edit-slot {
  flex: 0 0 var(--customer-contract-action-size);
  width: var(--customer-contract-action-size);
  height: var(--customer-contract-action-size);
}

.customer-contract-delete .btn {
  width: var(--customer-contract-action-size);
  min-width: var(--customer-contract-action-size);
  height: var(--customer-contract-action-size);
  padding: 0;
  line-height: 1;
  color: #b42318;
  border-color: rgba(220, 38, 38, .18);
  background: rgba(220, 38, 38, .06);
}

.customer-contract-delete .btn svg,
.customer-contract-delete .btn [data-eva] {
  margin-right: 0;
}

.customer-contract-delete .btn .ui-icon-added,
.customer-contract-delete .btn svg.ui-icon-added {
  margin-right: 0;
}

.customer-contract-edit {
  grid-area: edit;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.customer-contract-edit summary,
.customer-proposal-upload summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: var(--customer-contract-action-size);
  width: fit-content;
  padding: 6px 10px;
  border: 1px solid var(--crm-border-soft);
  border-radius: var(--bs-border-radius);
  background: var(--crm-surface);
  color: var(--crm-primary);
  font-size: .78rem;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.customer-contract-edit:not([open]) {
  height: 0;
}

.customer-contract-edit:not([open]) summary {
  position: absolute;
  right: calc(var(--customer-module-row-padding) + var(--customer-contract-action-size) + var(--customer-contract-action-gap));
  bottom: calc(var(--customer-module-row-padding) + var(--customer-module-row-gap));
  width: var(--customer-contract-action-size);
  min-width: var(--customer-contract-action-size);
  height: var(--customer-contract-action-size);
  padding: 0;
}

.customer-contract-edit:not([open]) summary span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.customer-contract-edit[open] {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--crm-border-soft);
  border-radius: var(--bs-border-radius);
  background: rgba(var(--bs-secondary-rgb), .035);
}

.customer-contract-edit[open] summary {
  width: fit-content;
  min-width: 0;
  height: 32px;
  gap: 6px;
  padding: 0 10px;
  background: rgba(var(--crm-primary-rgb), .07);
}

.customer-contract-edit summary::-webkit-details-marker,
.customer-proposal-upload summary::-webkit-details-marker {
  display: none;
}

.customer-contract-edit form,
.customer-proposal-upload form {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.customer-contract-file,
.customer-proposal-file {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  max-width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid rgba(var(--crm-primary-rgb), .16);
  border-radius: var(--bs-border-radius);
  color: var(--crm-primary);
  background: rgba(var(--crm-primary-rgb), .08);
  font-size: .78rem;
  font-weight: 900;
  text-decoration: none;
}

.customer-contract-file:hover,
.customer-contract-file:focus,
.customer-proposal-file:hover,
.customer-proposal-file:focus {
  border-color: rgba(var(--crm-primary-rgb), .28);
  color: var(--crm-primary);
  background: rgba(var(--crm-primary-rgb), .11);
}

.customer-contract-file span,
.customer-proposal-file span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-contract-file em {
  flex: 0 0 auto;
  color: var(--crm-text-muted);
  font-size: .72rem;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

.customer-contract-file svg,
.customer-contract-file [data-eva],
.customer-proposal-file svg,
.customer-proposal-file [data-eva] {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
}

.customer-invoice-file,
.customer-contract-file,
.customer-proposal-file {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  max-width: min(100%, 520px);
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(var(--crm-primary-rgb), .18);
  border-radius: var(--bs-border-radius-sm);
  background: rgba(var(--crm-primary-rgb), .07);
  color: var(--crm-primary);
  font-size: .78rem;
  font-weight: 900;
  line-height: 1.2;
  text-decoration: none;
}

.customer-invoice-file:hover,
.customer-invoice-file:focus,
.customer-contract-file:hover,
.customer-contract-file:focus,
.customer-proposal-file:hover,
.customer-proposal-file:focus {
  border-color: rgba(var(--crm-primary-rgb), .3);
  background: rgba(var(--crm-primary-rgb), .1);
  color: var(--crm-primary);
}

.customer-invoice-file svg,
.customer-invoice-file [data-eva],
.customer-contract-file svg,
.customer-contract-file [data-eva],
.customer-proposal-file svg,
.customer-proposal-file [data-eva] {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.customer-invoice-file span,
.customer-contract-file span,
.customer-proposal-file span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-invoice-file em,
.customer-contract-file em,
.customer-proposal-file em {
  flex: 0 0 auto;
  padding-left: 2px;
  color: var(--crm-text-muted);
  font-size: .72rem;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

.customer-progress-bar {
  width: min(260px, 100%);
  height: 7px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(var(--bs-secondary-rgb), .12);
}

.customer-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--crm-primary);
}

.customer-note-card {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.customer-note-card > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.customer-note-card time {
  flex: 0 0 auto;
  color: var(--crm-text-muted);
  font-size: .75rem;
  font-weight: 800;
}

.customer-note-card p,
.customer-followup-card p {
  margin: 0;
  color: var(--crm-text);
  font-size: .84rem;
  line-height: 1.5;
}

.customer-followup-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
}

.customer-workspace-main .customer-finance-grid {
  grid-template-columns: minmax(0, .58fr) minmax(260px, .42fr);
}

.customer-workspace-main .customer-sparkline {
  min-height: 210px;
}

body.crm-template[data-theme="dark"] .customer-workspace-hero,
body.crm-template[data-theme="dark"] .customer-workspace-nav,
body.crm-template[data-theme="dark"] .customer-workspace-main,
body.crm-template[data-theme="dark"] .customer-profile-overview,
body.crm-template[data-theme="dark"] .customer-workspace-summary .customer-tab-card {
  background: var(--crm-surface);
}

body.crm-template[data-theme="dark"] .customer-person-card,
body.crm-template[data-theme="dark"] .customer-profile-facts > .customer-profile-fact,
body.crm-template[data-theme="dark"] .customer-profile-start-date > summary,
body.crm-template[data-theme="dark"] .customer-activity-type-grid span,
body.crm-template[data-theme="dark"] .customer-note-card,
body.crm-template[data-theme="dark"] .customer-followup-card,
body.crm-template[data-theme="dark"] .customer-inline-note-form,
body.crm-template[data-theme="dark"] .customer-inline-relationship-form,
body.crm-template[data-theme="dark"] .customer-inline-followup-form,
body.crm-template[data-theme="dark"] .customer-module-form,
body.crm-template[data-theme="dark"] .customer-module-row,
body.crm-template[data-theme="dark"] .customer-module-metrics > div,
body.crm-template[data-theme="dark"] .customer-finance-metric,
body.crm-template[data-theme="dark"] .customer-finance-card,
body.crm-template[data-theme="dark"] .customer-financial-grid > div,
body.crm-template[data-theme="dark"] .customer-inline-edit summary,
body.crm-template[data-theme="dark"] .customer-workspace-form .customer-logo-upload {
  background: rgba(148, 163, 184, .06);
}

body.crm-template[data-theme="dark"] .customer-create-panel {
  background: rgba(var(--crm-primary-rgb), .08);
}

body.crm-template[data-theme="dark"] .customer-invoice-row__ledger,
body.crm-template[data-theme="dark"] .customer-payment-row__details,
body.crm-template[data-theme="dark"] .customer-expense-row__details,
body.crm-template[data-theme="dark"] .customer-finance-breakdown__row,
body.crm-template[data-theme="dark"] .customer-finance-collection__details,
body.crm-template[data-theme="dark"] .customer-finance-list__item,
body.crm-template[data-theme="dark"] .customer-contract-timeline {
  background: rgba(15, 23, 42, .18);
}

body.crm-template[data-theme="dark"] .customer-contract-file,
body.crm-template[data-theme="dark"] .customer-proposal-file {
  background: rgba(var(--crm-primary-rgb), .12);
}

body.crm-template[data-theme="dark"] .customer-money-chart {
  background:
    linear-gradient(180deg, rgba(var(--money-chart-rgb), .08), rgba(15, 23, 42, .1)),
    repeating-linear-gradient(0deg, transparent 0, transparent 35px, rgba(148, 163, 184, .1) 36px);
}

body.crm-template[data-theme="dark"] .customer-finance-ring {
  background:
    radial-gradient(circle at center, var(--crm-surface) 0 57%, transparent 58%),
    conic-gradient(var(--crm-primary) 0 var(--finance-progress), rgba(148, 163, 184, .16) var(--finance-progress) 100%);
}

body.crm-template[data-theme="dark"] .customer-expense-ring {
  background:
    radial-gradient(circle at center, var(--crm-surface) 0 57%, transparent 58%),
    conic-gradient(#22c55e 0 var(--finance-progress), rgba(239, 68, 68, .2) var(--finance-progress) 100%);
}

body.crm-template[data-theme="dark"] .customer-invoice-file,
body.crm-template[data-theme="dark"] .customer-category-chip,
body.crm-template[data-theme="dark"] .customer-contract-file {
  background: rgba(var(--crm-primary-rgb), .12);
}

@media (min-width: 1680px) {
  .customer-workspace-layout {
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  }

  .customer-workspace-layout.has-action-rail {
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr) 70px;
  }

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

@media (max-width: 1199.98px) {
  .customer-workspace-layout {
    grid-template-columns: minmax(210px, 240px) minmax(0, 1fr);
  }

  .customer-workspace-layout.has-action-rail {
    grid-template-columns: minmax(190px, 220px) minmax(0, 1fr) 64px;
  }

  .customer-invoice-row {
    grid-template-columns: minmax(0, 1fr) minmax(136px, auto);
    grid-template-areas:
      "identity actions"
      "ledger ledger"
      "footer footer";
  }

  .customer-payment-row {
    grid-template-columns: minmax(0, 1fr) minmax(104px, auto) minmax(44px, auto);
    grid-template-areas:
      "identity amount actions"
      "details details details"
      "footer footer footer";
  }

  .customer-expense-row {
    grid-template-columns: minmax(0, 1fr) minmax(128px, auto) minmax(112px, auto);
    grid-template-areas:
      "identity amount actions"
      "details details details"
      "footer footer footer";
  }

  .customer-finance-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-finance-section .customer-finance-grid,
  .customer-expense-section .customer-finance-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .customer-action-rail {
    width: 64px;
  }
}

@media (max-width: 991.98px) {
  .customer-workspace-layout,
  .customer-workspace-layout.has-action-rail,
  .customer-workspace-layout.has-no-action-rail {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    min-width: 0;
  }

  .customer-workspace-nav,
  .customer-workspace-main,
  .customer-workspace-summary {
    position: static;
    width: 100%;
    min-width: 0;
  }

  .customer-workspace-nav nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .customer-workspace-nav__group {
    display: none;
  }

  .customer-workspace-nav a {
    grid-template-columns: 20px minmax(92px, auto) auto;
    flex: 0 0 auto;
  }

  .customer-workspace-summary.customer-action-rail {
    display: none !important;
  }

  .customer-contact-list-header,
  .customer-person-card {
    grid-template-columns: minmax(170px, 1.15fr) minmax(160px, 1fr) minmax(96px, .58fr) minmax(68px, .36fr) 60px;
  }

  .customer-profile-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-person-grid,
  .customer-management-grid,
  .customer-module-metrics,
  .customer-workspace-main .customer-finance-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 767.98px) {
  .customer-record-page {
    padding-bottom: 96px;
  }

  .customer-workspace-section {
    min-height: 0;
    padding: 14px;
    scroll-margin-top: 84px;
  }

  .customer-timeline-header__top {
    display: grid;
    gap: 10px;
  }

  .customer-section-tools,
  .customer-section-tools--timeline {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: stretch;
    width: 100%;
    max-width: 100%;
  }

  .customer-section-tools .customer-section-search,
  .customer-section-tools .customer-create-toggle {
    width: 100%;
    min-width: 0;
  }

  .customer-section-tools .customer-section-search .input {
    width: 100%;
  }

  .customer-section-tools .customer-create-toggle {
    white-space: nowrap;
  }

  .customer-workspace-section__header,
  .customer-note-card > div {
    display: grid;
  }

  .customer-workspace-section__header > .customer-section-actions,
  .customer-section-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    width: 100%;
  }

  .customer-section-tools--tasks {
    max-width: 100%;
  }

  .customer-section-tools--tasks .customer-section-link {
    width: 100%;
    min-width: 0;
  }

  .customer-section-search {
    flex: 1 1 100%;
    min-width: 0;
  }

  .customer-activity-composer__row,
  .customer-financial-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .customer-workspace-form-grid,
  .customer-inline-relationship-form .form-grid,
  .customer-inline-followup-form .form-grid,
  .customer-module-form .form-grid,
  .customer-finance-metrics,
  .customer-module-row,
  .customer-website-row,
  .customer-email-row,
  .customer-contract-row,
  .customer-proposal-row,
  .customer-person-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .customer-invoice-row {
    grid-template-areas:
      "identity"
      "ledger"
      "actions"
      "footer";
  }

  .customer-payment-row {
    grid-template-areas:
      "identity"
      "details"
      "amount"
      "actions"
      "footer";
  }

  .customer-expense-row {
    grid-template-areas:
      "identity"
      "details"
      "amount"
      "actions"
      "footer";
  }

  .customer-invoice-row__ledger {
    grid-template-columns: minmax(0, 1fr);
  }

  .customer-record-edit:not([open]) {
    justify-content: stretch;
  }

  .customer-record-edit summary {
    justify-content: center;
    width: 100%;
  }

  .customer-payment-row__details {
    grid-template-columns: minmax(0, 1fr);
  }

  .customer-expense-row__details {
    grid-template-columns: minmax(0, 1fr);
  }

  .customer-invoice-row__ledger > div + div {
    border-top: 1px solid var(--crm-border-soft);
    border-left: 0;
  }

  .customer-payment-row__details > div + div {
    border-top: 1px solid var(--crm-border-soft);
    border-left: 0;
  }

  .customer-expense-row__details > div + div {
    border-top: 1px solid var(--crm-border-soft);
    border-left: 0;
  }

  .customer-invoice-row__actions {
    align-items: stretch;
  }

  .customer-payment-row__amount {
    justify-items: stretch;
    padding-top: 10px;
    border-top: 1px solid var(--crm-border-soft);
  }

  .customer-expense-row__amount {
    justify-items: stretch;
    padding-top: 10px;
    border-top: 1px solid var(--crm-border-soft);
  }

  .customer-payment-row__actions {
    justify-content: stretch;
  }

  .customer-payment-row__actions form,
  .customer-payment-row__actions button {
    width: 100%;
  }

  .customer-expense-row__actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
  }

  .customer-expense-row__actions .status-pill,
  .customer-expense-row__actions form,
  .customer-expense-row__actions button {
    width: 100%;
  }

  .customer-finance-card {
    padding: 12px;
  }

  .customer-finance-card__header,
  .customer-finance-card__footer,
  .customer-finance-breakdown__row > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .customer-money-chart {
    height: 140px;
    min-height: 140px;
  }

  .customer-finance-collection,
  .customer-finance-list__item {
    grid-template-columns: minmax(0, 1fr);
  }

  .customer-finance-ring {
    width: 112px;
    justify-self: center;
  }

  .customer-finance-list__item em {
    justify-self: start;
  }

  .customer-invoice-row__actions .status-pill {
    justify-content: center;
    width: 100%;
  }

  .customer-invoice-action-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(44px, 1fr));
    width: 100%;
  }

  .customer-invoice-action-strip form,
  .customer-invoice-action-strip .crm-icon-action {
    width: 100%;
  }

  .customer-primary-choice {
    min-height: 0;
    width: 100%;
  }

  .customer-website-remove,
  .customer-website-add,
  .customer-email-remove,
  .customer-email-add,
  .customer-module-row__actions .btn,
  .customer-module-row__actions form,
  .customer-module-row__actions button {
    width: 100%;
  }

  .customer-contract-edit {
    grid-column: auto;
  }

  .customer-proposal-row {
    grid-template-areas:
      "identity"
      "side"
      "edit"
      "upload";
    gap: 12px;
  }

  .customer-proposal-row__side {
    justify-items: stretch;
    padding-top: 12px;
    padding-left: 0;
    border-top: 1px solid var(--crm-border-soft);
    border-left: 0;
  }

  .customer-proposal-row__side-top {
    grid-template-columns: auto 1fr;
    align-items: center;
    justify-items: start;
  }

  .customer-proposal-row__side-top strong {
    justify-self: end;
  }

  .customer-proposal-row__actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(44px, 1fr));
    width: 100%;
    transform: none;
  }

  .customer-proposal-row__actions .crm-icon-action,
  .customer-proposal-archive,
  .customer-proposal-archive .btn {
    width: 100%;
  }

  .customer-proposal-edit-slot,
  .customer-proposal-upload-slot {
    display: none;
  }

  .customer-proposal-edit:not([open]),
  .customer-proposal-upload:not([open]) {
    height: auto;
  }

  .customer-proposal-edit[open],
  .customer-proposal-upload[open] {
    margin-top: 0;
  }

  .customer-proposal-edit:not([open]) summary,
  .customer-proposal-edit[open] summary,
  .customer-proposal-upload:not([open]) summary,
  .customer-proposal-upload[open] summary {
    position: static;
    width: 100%;
    min-width: 0;
    gap: 6px;
    transform: none;
  }

  .customer-proposal-edit:not([open]) summary span,
  .customer-proposal-upload:not([open]) summary span {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
  }

  .customer-contract-row {
    grid-template-areas:
      "identity"
      "side"
      "edit";
    gap: 12px;
  }

  .customer-contract-row__heading {
    display: grid;
    justify-content: start;
  }

  .customer-contract-timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-contract-timeline > div:nth-child(odd) {
    border-left: 0;
  }

  .customer-contract-timeline > div:nth-child(n + 3) {
    border-top: 1px solid var(--crm-border-soft);
  }

  .customer-contract-row__footer {
    grid-template-columns: minmax(0, 1fr);
  }

  .customer-contract-row__side {
    justify-items: stretch;
    padding-top: 12px;
    padding-left: 0;
    border-top: 1px solid var(--crm-border-soft);
    border-left: 0;
  }

  .customer-contract-row__side-top {
    justify-items: start;
  }

  .customer-contract-row__side-top small {
    text-align: left;
  }

  .customer-contract-row__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .customer-contract-edit-slot {
    display: none;
  }

  .customer-contract-delete .btn {
    width: 100%;
    min-width: 0;
  }

  .customer-contract-edit:not([open]) {
    height: auto;
  }

  .customer-contract-edit[open] {
    margin-top: 0;
  }

  .customer-contract-edit:not([open]) summary,
  .customer-contract-edit[open] summary {
    position: static;
    width: 100%;
    min-width: 0;
    gap: 6px;
  }

  .customer-contract-edit:not([open]) summary span {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
  }

  .customer-proposal-upload {
    grid-column: 1 / -1;
  }

  .customer-contact-list-header {
    display: none;
  }

  .customer-person-card {
    gap: 10px;
    padding: 12px;
  }

  .customer-profile-overview {
    padding: 14px;
  }

  .customer-profile-overview__actions,
  .customer-person-card__tools {
    justify-self: stretch;
  }

  .customer-profile-overview__actions .btn,
  .customer-person-card__tools .btn,
  .customer-person-card__tools .customer-inline-edit,
  .customer-person-card__tools .customer-inline-edit summary {
    width: 100%;
  }

  .customer-person-card__tools {
    justify-content: flex-start;
  }

  .customer-person-card__tools .customer-inline-edit:not([open]) {
    width: auto;
  }

  .customer-person-card__tools .customer-inline-edit:not([open]) summary,
  .customer-person-card__tools .customer-archive-form .btn {
    display: inline-flex;
    width: 34px;
    min-width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    padding: 0;
  }

  .customer-person-card__tools .customer-inline-edit:not([open]) summary span,
  .customer-person-card__tools .customer-archive-form .btn span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .customer-person-card__identity {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .customer-person-card__badges,
  .customer-person-card__identity .status-pill {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .customer-contact-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-contact-last {
    text-align: left;
  }

  .customer-profile-tabs {
    gap: 14px;
  }

  .customer-workspace-form-actions {
    display: grid;
  }

  .customer-workspace-form-actions .btn,
  .customer-workspace-section__header .btn,
  .customer-inline-note-form .btn,
  .customer-inline-relationship-form .btn,
  .customer-inline-followup-form .btn,
  .customer-module-form .btn,
  .customer-module-row .btn {
    width: 100%;
  }

  .customer-task-priority {
    justify-self: start;
  }

  .customer-module-row__top {
    display: grid;
    justify-content: start;
  }

  .customer-contract-file,
  .customer-proposal-file {
    width: 100%;
  }
}

.pipeline-header {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 16px;
}

.pipeline-header-copy {
  display: none;
  margin-right: auto;
}

.pipeline-header h2 {
  margin: 0;
  color: var(--pipeline-heading);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: 0;
}

.pipeline-header p {
  margin: 4px 0 0;
  color: var(--pipeline-muted);
  font-size: .95rem;
}

.pipeline-primary-action {
  min-width: max-content;
  box-shadow: 0 14px 28px rgba(31, 88, 199, .18);
  transition: transform .18s ease, box-shadow .18s ease;
}

.pipeline-primary-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(31, 88, 199, .22);
}

.pipeline-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.pipeline-header-actions form {
  margin: 0;
}

.pipeline-cleanup-action {
  min-width: max-content;
}

.pipeline-archive-note {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 11px 14px;
  color: #7f1d1d;
  border: 1px solid rgba(239, 68, 68, .18);
  border-radius: 12px;
  background: rgba(254, 242, 242, .74);
}

.pipeline-archive-note svg,
.pipeline-archive-note [data-eva] {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.pipeline-archive-note span {
  min-width: 0;
  color: inherit;
  font-size: .82rem;
  font-weight: 800;
  line-height: 1.35;
}

.pipeline-summary-strip {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  min-height: 78px;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--pipeline-border);
  background: var(--pipeline-surface);
}

.pipeline-summary-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.pipeline-summary-item:hover,
.pipeline-summary-item:focus-visible {
  border-color: rgba(var(--crm-primary-rgb), .14);
  background: rgba(var(--crm-primary-rgb), .035);
  color: inherit;
  outline: 0;
  transform: translateY(-1px);
}

.pipeline-summary-item:focus-visible {
  box-shadow: 0 0 0 3px rgba(var(--crm-primary-rgb), .12);
}

.pipeline-summary-item.is-active {
  border-color: rgba(var(--crm-primary-rgb), .28);
  background: linear-gradient(180deg, rgba(var(--crm-primary-rgb), .12), rgba(var(--crm-primary-rgb), .045));
  box-shadow: inset 0 0 0 1px rgba(var(--crm-primary-rgb), .08), 0 12px 28px rgba(31, 88, 199, .1);
}

.pipeline-summary-item.is-active::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 8px;
  left: 60px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--crm-primary), rgba(var(--crm-primary-rgb), 0));
}

.pipeline-summary-item small {
  display: block;
  color: var(--pipeline-muted);
  font-size: .76rem;
  font-weight: 800;
  line-height: 1.1;
}

.pipeline-summary-item strong {
  display: block;
  margin-top: 3px;
  color: var(--pipeline-heading);
  font-size: 1.12rem;
  font-weight: 850;
  line-height: 1.1;
}

.pipeline-summary-icon {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  color: var(--crm-primary);
  background: rgba(var(--crm-primary-rgb), .1);
  transition: transform .18s ease, box-shadow .18s ease;
}

.pipeline-summary-item.is-active .pipeline-summary-icon {
  box-shadow: 0 8px 18px rgba(var(--crm-primary-rgb), .16);
  transform: scale(1.02);
}

.pipeline-summary-icon--forecast {
  color: #6d5dfc;
  background: rgba(109, 93, 252, .12);
}

.pipeline-summary-icon--active {
  color: #13945f;
  background: rgba(19, 148, 95, .12);
}

.pipeline-summary-icon--overdue {
  color: #dc2626;
  background: rgba(220, 38, 38, .12);
}

.pipeline-summary-icon--archived {
  color: #64748b;
  background: rgba(100, 116, 139, .12);
}

.pipeline-summary-divider {
  width: 1px;
  height: 34px;
  background: var(--pipeline-border);
}

.pipeline-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) minmax(140px, .7fr) minmax(130px, .65fr) minmax(150px, .65fr) auto auto;
  align-items: stretch;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--pipeline-border);
  background: var(--pipeline-surface);
}

.pipeline-search,
.pipeline-filter {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  min-height: 42px;
  min-width: 0;
  padding: 0 12px;
  border: 1px solid var(--pipeline-border);
  border-radius: 8px;
  background: var(--pipeline-surface);
  color: var(--pipeline-muted);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.pipeline-search:focus-within,
.pipeline-filter:focus-within {
  border-color: var(--crm-primary);
  box-shadow: 0 0 0 4px rgba(31, 88, 199, .12);
}

.pipeline-search input,
.pipeline-filter select,
.pipeline-filter input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--pipeline-text);
  font-size: .88rem;
  font-weight: 650;
}

.pipeline-filter select {
  appearance: none;
  cursor: pointer;
}

.pipeline-filter-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  min-height: 42px;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 1;
}

.pipeline-view-switch {
  justify-self: end;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  align-self: stretch;
  height: 42px;
  min-height: 42px;
  padding: 4px;
  border-radius: 8px;
  background: var(--pipeline-surface-soft);
  border: 1px solid var(--pipeline-border);
}

.pipeline-view-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 100%;
  min-width: 86px;
  padding: 0 12px;
  border-radius: 7px;
  color: var(--pipeline-muted);
  font-size: .84rem;
  font-weight: 800;
  transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.pipeline-view-switch a:hover {
  color: var(--crm-primary);
}

.pipeline-view-switch a.is-active {
  color: #fff;
  background: var(--crm-primary);
  box-shadow: 0 10px 20px rgba(31, 88, 199, .22);
}

.pipeline-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 360px);
  gap: 18px;
  align-items: stretch;
}

.pipeline-workspace.is-drawer-collapsed .pipeline-shell {
  grid-template-columns: minmax(0, 1fr);
}

.pipeline-workspace.is-drawer-collapsed .pipeline-drawer {
  display: none;
}

.pipeline-main {
  min-width: 0;
}

.pipeline-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(190px, 1fr));
  gap: 10px;
  height: var(--pipeline-panel-height);
  min-width: 0;
}

.pipeline-column {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  border: 1px solid var(--pipeline-border);
  border-radius: 8px;
  background: var(--pipeline-surface);
  overflow: hidden;
}

.pipeline-column-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--pipeline-border);
}

.pipeline-column-header > div {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: 8px minmax(0, 1fr);
  column-gap: 8px;
  row-gap: 3px;
  align-items: center;
  min-width: 0;
  max-width: none;
  overflow: visible;
}

.pipeline-column-header strong {
  display: block;
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.2;
  color: var(--pipeline-heading);
  font-size: .9rem;
  font-weight: 850;
}

.pipeline-column-header small {
  display: block;
  grid-column: 1 / -1;
  margin-top: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--pipeline-muted);
  font-size: .78rem;
  font-weight: 750;
}

.pipeline-column-header > span {
  display: grid;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--pipeline-border);
  border-radius: 999px;
  color: var(--pipeline-heading);
  background: var(--pipeline-surface-soft);
  font-size: .78rem;
  font-weight: 850;
}

.pipeline-stage-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 0;
  border-radius: 999px;
  vertical-align: 1px;
  background: var(--crm-primary);
}

.pipeline-stage-dot--danger { background: #ef4444; }
.pipeline-stage-dot--warning { background: #f6a609; }
.pipeline-stage-dot--primary { background: #6b5df6; }
.pipeline-stage-dot--orange { background: #f97316; }
.pipeline-stage-dot--success { background: #16a34a; }

.pipeline-dropzone {
  position: relative;
  display: grid;
  align-content: start;
  gap: 10px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 12px;
  transition: background .18s ease, box-shadow .18s ease;
}

.pipeline-dropzone.is-drop-target {
  background: rgba(var(--crm-primary-rgb), .08);
  box-shadow: inset 0 0 0 1px rgba(31, 88, 199, .2);
}

.pipeline-dropzone.is-drop-target::before {
  content: "";
  display: block;
  height: 2px;
  border-radius: 999px;
  background: var(--crm-primary);
  box-shadow: 0 0 0 4px rgba(31, 88, 199, .08);
}

.pipeline-empty-column {
  display: grid;
  min-height: 124px;
  place-items: center;
  align-content: center;
  gap: 6px;
  padding: 14px;
  border: 1px dashed var(--pipeline-border);
  border-radius: 8px;
  color: var(--pipeline-muted);
  text-align: center;
  font-size: .84rem;
  font-weight: 750;
  background: linear-gradient(180deg, rgba(var(--crm-primary-rgb), .035), rgba(var(--crm-primary-rgb), .012));
}

.pipeline-empty-column__icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  color: var(--crm-primary);
  background: rgba(var(--crm-primary-rgb), .1);
}

.pipeline-empty-column strong {
  color: var(--pipeline-heading);
  font-size: .86rem;
  font-weight: 850;
}

.pipeline-empty-column small {
  max-width: 190px;
  color: var(--pipeline-muted);
  font-size: .73rem;
  font-weight: 700;
  line-height: 1.35;
}

.pipeline-empty-column__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  margin-top: 3px;
  padding: 0 10px;
  border: 1px solid rgba(var(--crm-primary-rgb), .2);
  border-radius: 8px;
  color: var(--crm-primary);
  background: var(--pipeline-surface);
  font-size: .76rem;
  font-weight: 850;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.pipeline-empty-column__action:hover,
.pipeline-empty-column__action:focus-visible {
  border-color: rgba(var(--crm-primary-rgb), .34);
  background: rgba(var(--crm-primary-rgb), .08);
  outline: 0;
  transform: translateY(-1px);
}

.pipeline-empty-column--archived {
  background: rgba(100, 116, 139, .04);
}

.pipeline-empty-column--archived .pipeline-empty-column__icon {
  color: #64748b;
  background: rgba(100, 116, 139, .12);
}

.pipeline-deal-card {
  position: relative;
  display: grid;
  gap: 9px;
  min-width: 0;
  min-height: 156px;
  padding: 13px 12px 12px 14px;
  border: 1px solid var(--pipeline-border);
  border-left-width: 3px;
  border-radius: 8px;
  background: var(--pipeline-surface);
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, opacity .18s ease;
}

.pipeline-deal-card > * {
  min-width: 0;
}

.pipeline-deal-card--lead { border-left-color: #ef4444; }
.pipeline-deal-card--contact { border-left-color: #f6a609; }
.pipeline-deal-card--proposal { border-left-color: #6b5df6; }
.pipeline-deal-card--negotiation { border-left-color: #f97316; }
.pipeline-deal-card--won { border-left-color: #16a34a; }

.pipeline-deal-card.is-archived {
  border-left-color: #64748b;
  background: color-mix(in srgb, var(--pipeline-surface) 88%, #64748b 12%);
}

.pipeline-deal-card:hover,
.pipeline-deal-card.is-selected {
  transform: translateY(-2px);
  border-color: rgba(var(--crm-primary-rgb), .42);
  box-shadow: 0 18px 38px rgba(15, 23, 42, .1);
}

.pipeline-deal-card.is-dragging {
  opacity: .72;
  transform: rotate(.6deg) scale(1.015);
  box-shadow: 0 26px 52px rgba(15, 23, 42, .18);
}

.pipeline-deal-card.is-overdue::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, .12);
}

.pipeline-deal-card__top,
.pipeline-deal-card__value,
.pipeline-deal-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.pipeline-deal-card__top > div {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.pipeline-deal-card__top strong,
.pipeline-deal-card__top span,
.pipeline-deal-card__value strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pipeline-deal-card__top strong {
  color: var(--pipeline-heading);
  font-size: .9rem;
  font-weight: 850;
}

.pipeline-deal-card__top span {
  margin-top: 3px;
  color: var(--pipeline-muted);
  font-size: .78rem;
  font-weight: 700;
}

.pipeline-owner-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  margin-top: 0;
  padding: 1px 0 0;
  border-radius: 999px;
  color: #fff;
  background: var(--crm-primary);
  box-shadow: 0 7px 14px rgba(31, 88, 199, .16);
  font-size: .76rem;
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
}

.pipeline-deal-card__top .pipeline-owner-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  padding-top: 1px;
  line-height: 1;
}

.pipeline-deal-card__value strong {
  color: var(--pipeline-heading);
  font-size: .9rem;
  font-weight: 850;
}

.pipeline-deal-card__value span {
  flex: 0 0 auto;
  color: var(--pipeline-heading);
  font-size: .78rem;
  font-weight: 850;
}

.pipeline-progress {
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--pipeline-surface-soft);
}

.pipeline-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--crm-primary);
  transition: width .22s ease;
}

.pipeline-deal-card--won .pipeline-progress span {
  background: #16a34a;
}

.pipeline-deal-card__meta {
  color: var(--pipeline-muted);
  font-size: .76rem;
  font-weight: 700;
}

.pipeline-deal-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.pipeline-deal-card__meta > span:nth-child(2) {
  flex: 1 1 auto;
  overflow: hidden;
}

.pipeline-deal-card__meta [data-card-next] {
  display: inline-block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pipeline-deal-card__meta svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
}

.pipeline-deal-card__workflow {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.pipeline-next-action {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  padding: 7px 9px;
  border: 1px solid rgba(var(--crm-primary-rgb), .16);
  border-radius: 8px;
  color: var(--pipeline-heading);
  background: rgba(var(--crm-primary-rgb), .055);
  text-align: left;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.pipeline-next-action:hover,
.pipeline-next-action:focus-visible {
  border-color: rgba(var(--crm-primary-rgb), .34);
  background: rgba(var(--crm-primary-rgb), .09);
  outline: 0;
  transform: translateY(-1px);
}

.pipeline-next-action svg,
.pipeline-next-action [data-eva] {
  width: 15px;
  height: 15px;
  color: var(--crm-primary);
}

.pipeline-next-action span,
.pipeline-next-action small,
.pipeline-next-action strong {
  min-width: 0;
}

.pipeline-next-action small,
.pipeline-next-action strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pipeline-next-action small {
  color: var(--pipeline-muted);
  font-size: .66rem;
  font-weight: 850;
  line-height: 1.1;
}

.pipeline-next-action strong {
  margin-top: 2px;
  color: var(--pipeline-heading);
  font-size: .76rem;
  font-weight: 900;
  line-height: 1.15;
}

.pipeline-next-action--overdue {
  border-color: rgba(220, 38, 38, .24);
  background: rgba(220, 38, 38, .075);
}

.pipeline-next-action--overdue svg,
.pipeline-next-action--overdue [data-eva],
.pipeline-next-action--overdue strong {
  color: #dc2626;
}

.pipeline-next-action--today {
  border-color: rgba(22, 163, 74, .24);
  background: rgba(22, 163, 74, .075);
}

.pipeline-next-action--today svg,
.pipeline-next-action--today [data-eva],
.pipeline-next-action--today strong {
  color: #16a34a;
}

.pipeline-next-action--soon {
  border-color: rgba(31, 88, 199, .24);
}

.pipeline-next-action--empty {
  border-style: dashed;
  color: var(--pipeline-muted);
  background: var(--pipeline-surface-soft);
}

.pipeline-next-action--empty svg,
.pipeline-next-action--empty [data-eva],
.pipeline-next-action--empty strong {
  color: var(--pipeline-muted);
}

.pipeline-deal-card__actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity .18s ease, transform .18s ease;
}

.pipeline-deal-card:hover .pipeline-deal-card__actions,
.pipeline-deal-card:focus-within .pipeline-deal-card__actions,
.pipeline-deal-card.is-selected .pipeline-deal-card__actions {
  opacity: 1;
  transform: translateY(0);
}

.pipeline-card-action {
  display: inline-grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--pipeline-border);
  border-radius: 8px;
  color: var(--pipeline-muted);
  background: var(--pipeline-surface);
  transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
}

.pipeline-card-action:not(.is-disabled):hover,
.pipeline-card-action:not(.is-disabled):focus-visible {
  color: var(--crm-primary);
  border-color: rgba(var(--crm-primary-rgb), .28);
  background: rgba(var(--crm-primary-rgb), .08);
  outline: 0;
  transform: translateY(-1px);
}

.pipeline-card-action.is-disabled {
  opacity: .42;
  cursor: not-allowed;
}

.pipeline-card-action svg,
.pipeline-card-action [data-eva] {
  width: 14px;
  height: 14px;
}

.pipeline-column-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  margin: auto 12px 12px;
  border: 0;
  border-radius: 8px;
  color: var(--crm-primary);
  background: transparent;
  font-size: .84rem;
  font-weight: 850;
  transition: background .18s ease, transform .18s ease;
}

.pipeline-column-add:hover {
  background: rgba(var(--crm-primary-rgb), .08);
  transform: translateY(-1px);
}

.pipeline-drawer {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  height: var(--pipeline-panel-height);
  min-height: var(--pipeline-panel-height);
  max-height: var(--pipeline-panel-height);
  overflow: hidden;
  border: 1px solid var(--pipeline-border);
  background: var(--pipeline-surface);
}

.pipeline-drawer-close,
.pipeline-drawer-edit {
  position: absolute;
  top: 14px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: var(--pipeline-muted);
  background: transparent;
  transition: background .18s ease, color .18s ease;
}

.pipeline-drawer-close {
  right: 14px;
}

.pipeline-drawer-edit {
  right: 52px;
  color: var(--crm-primary);
  background: rgba(var(--crm-primary-rgb), .08);
}

.pipeline-drawer-close:hover,
.pipeline-drawer-edit:hover {
  color: var(--crm-primary);
  background: rgba(var(--crm-primary-rgb), .08);
}

.pipeline-drawer-head {
  flex: 0 0 auto;
  min-width: 0;
  padding: 22px 48px 16px 20px;
  border-bottom: 1px solid var(--pipeline-border);
}

.pipeline-drawer-head h3 {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--pipeline-heading);
  font-size: 1.14rem;
  font-weight: 850;
  line-height: 1.25;
}

.pipeline-drawer-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.pipeline-drawer.is-empty .pipeline-drawer-scroll {
  display: grid;
  place-items: center;
  padding: 20px;
}

.pipeline-drawer-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
}

.pipeline-drawer-tags small {
  color: var(--pipeline-muted);
  font-size: .76rem;
  font-weight: 750;
}

.pipeline-drawer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--pipeline-border);
}

.pipeline-drawer-grid > div {
  min-width: 0;
  padding: 16px 18px;
}

.pipeline-drawer-grid > div + div {
  border-left: 1px solid var(--pipeline-border);
}

.pipeline-drawer-grid > div > span,
.pipeline-drawer-select span,
.pipeline-drawer-row div > span {
  display: block;
  color: var(--pipeline-muted);
  font-size: .74rem;
  font-weight: 850;
}

.pipeline-drawer-grid strong {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--pipeline-heading);
  font-size: 1.15rem;
  font-weight: 850;
}

.pipeline-range {
  width: 100%;
  margin-top: 10px;
  accent-color: var(--crm-primary);
}

.pipeline-range:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.pipeline-drawer-select {
  display: grid;
  gap: 7px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--pipeline-border);
}

.pipeline-drawer-tabs.crm-tabs-card {
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.pipeline-drawer-tabs .crm-tabs-header {
  justify-content: stretch;
  min-height: 58px;
  padding: 0 10px;
  border-bottom: 1px solid var(--pipeline-border);
}

.pipeline-drawer-tabs .crm-tabs-header .nav-tabs-custom {
  width: 100%;
  flex: 1 1 auto;
  justify-content: space-between !important;
  gap: 6px;
  margin: 0;
  padding: 8px;
}

.pipeline-drawer-tabs .crm-tabs-header .nav-tabs-custom::before {
  top: 8px;
  bottom: 8px;
  border-radius: 8px;
  background: rgba(var(--crm-primary-rgb), .12);
  box-shadow: 0 8px 18px rgba(var(--crm-primary-rgb), .06);
}

.pipeline-drawer-tabs .crm-tabs-header .nav-tabs-custom .nav-item {
  flex: 1 1 0;
  min-width: 0;
}

.pipeline-drawer-tabs .crm-tabs-header .nav-tabs-custom .nav-link {
  display: inline-flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  color: var(--pipeline-muted);
  font-size: .82rem;
  font-weight: 850;
  line-height: 1;
}

.pipeline-drawer-tabs .crm-tabs-header .nav-tabs-custom .nav-link:hover,
.pipeline-drawer-tabs .crm-tabs-header .nav-tabs-custom .nav-link.active {
  color: var(--crm-primary);
}

.pipeline-drawer-tabs .tab-content {
  overflow: visible;
  padding: 0;
}

.pipeline-drawer-tab-pane {
  padding: 0;
}

.pipeline-drawer-select select {
  min-width: 0;
  height: 40px;
  border: 1px solid var(--pipeline-border);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--pipeline-text);
  background: var(--pipeline-surface);
  font-size: .86rem;
  font-weight: 750;
}

.pipeline-drawer-select select:disabled {
  color: var(--pipeline-muted);
  background: var(--pipeline-surface-soft);
  cursor: not-allowed;
  opacity: .72;
}

.pipeline-drawer-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--pipeline-border);
  color: inherit;
  transition: background .18s ease, transform .18s ease;
}

.pipeline-drawer-row > div {
  min-width: 0;
}

.pipeline-drawer-row:hover {
  background: rgba(var(--crm-primary-rgb), .06);
}

.pipeline-drawer-row > i,
.pipeline-drawer-row > svg {
  color: var(--crm-primary);
}

.pipeline-drawer-row strong {
  display: block;
  margin-top: 2px;
  color: var(--pipeline-heading);
  font-size: .9rem;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pipeline-drawer-row small {
  display: block;
  margin-top: 2px;
  color: var(--pipeline-muted);
  font-size: .76rem;
  font-weight: 700;
}

.pipeline-drawer-row--action {
  margin: 12px 16px;
  border: 1px solid rgba(var(--crm-primary-rgb), .3);
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(31, 88, 199, .08);
}

.pipeline-drawer-timeline {
  flex: 0 0 auto;
  min-height: 0;
  padding: 14px 18px 16px;
  overflow: visible;
}

.pipeline-drawer-timeline h4 {
  margin: 0 0 12px;
  color: var(--pipeline-heading);
  font-size: .88rem;
  font-weight: 850;
}

.pipeline-drawer-timeline article {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 0;
}

.pipeline-drawer-timeline article > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  color: var(--crm-primary);
  background: rgba(var(--crm-primary-rgb), .1);
}

.pipeline-drawer-timeline strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--pipeline-heading);
  font-size: .84rem;
  font-weight: 850;
}

.pipeline-drawer-timeline p {
  margin: 3px 0;
  color: var(--pipeline-muted);
  font-size: .78rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.pipeline-drawer-timeline small {
  color: var(--pipeline-muted);
  font-size: .74rem;
  font-weight: 750;
}

.pipeline-drawer-actions {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 8px;
  padding: 14px 16px;
  border-top: 1px solid var(--pipeline-border);
  background: var(--pipeline-surface);
  backdrop-filter: blur(10px);
}

.pipeline-drawer-actions form {
  display: flex;
  min-width: 0;
  margin: 0;
}

.pipeline-drawer-actions .btn {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding-inline: 12px;
  line-height: 1.1;
  white-space: nowrap;
}

.pipeline-drawer-actions .btn svg,
.pipeline-drawer-actions .btn [data-eva] {
  flex: 0 0 auto;
  margin-right: 0;
}

.pipeline-drawer-actions .btn span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pipeline-drawer-actions a.btn.disabled {
  color: var(--pipeline-muted);
  background: rgba(148, 163, 184, .08);
  border-color: var(--pipeline-border);
  opacity: 1;
  pointer-events: none;
}

.pipeline-list-panel {
  padding: 0;
  overflow: hidden;
}

.pipeline-table th {
  color: var(--pipeline-muted);
  font-size: .74rem;
  text-transform: uppercase;
}

.pipeline-table td {
  color: var(--pipeline-text);
  font-size: .86rem;
}

.pipeline-table tbody tr {
  cursor: pointer;
  transition: background .18s ease;
}

.pipeline-table tbody tr:hover {
  background: rgba(var(--crm-primary-rgb), .06);
}

@media (max-width: 1480px) {
  .pipeline-shell {
    grid-template-columns: minmax(0, 1fr) 330px;
  }

  .pipeline-board {
    overflow-x: auto;
    grid-template-columns: repeat(5, minmax(210px, 1fr));
    padding-bottom: 4px;
  }
}

@media (max-width: 1180px) {
  .pipeline-summary-strip {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .pipeline-summary-item:last-of-type {
    grid-column: 1 / -1;
  }

  .pipeline-summary-divider {
    display: none;
  }

  .pipeline-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .pipeline-view-switch {
    justify-self: stretch;
  }

  .pipeline-shell {
    grid-template-columns: 1fr;
  }

  .pipeline-drawer {
    position: relative;
    top: auto;
    height: auto;
    min-height: 560px;
    max-height: none;
  }
}

@media (max-width: 720px) {
  .pipeline-header {
    flex-direction: column;
  }

  .pipeline-header-copy {
    display: block;
  }

  .pipeline-primary-action {
    width: 100%;
    justify-content: center;
  }

  .pipeline-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 14px;
  }

  .pipeline-toolbar {
    grid-template-columns: 1fr;
  }

  .pipeline-summary-item {
    align-items: flex-start;
    min-height: 44px;
  }

  .pipeline-summary-icon {
    flex-basis: 34px;
    width: 34px;
    height: 34px;
  }

  .pipeline-summary-item strong {
    font-size: 1rem;
  }

  .pipeline-filter-submit {
    display: none;
  }

  .pipeline-view-switch {
    display: none;
  }

  .pipeline-board {
    grid-template-columns: minmax(260px, 1fr);
    height: auto;
    overflow: visible;
  }

  .pipeline-column {
    height: auto;
    min-height: auto;
  }

  .pipeline-dropzone {
    min-height: 160px;
  }

  .pipeline-deal-card__actions {
    opacity: 1;
    transform: none;
  }

  .pipeline-drawer {
    min-height: auto;
  }

  .pipeline-drawer-grid,
  .pipeline-drawer-actions {
    grid-template-columns: 1fr;
  }

  .pipeline-drawer-grid > div + div {
    border-left: 0;
    border-top: 1px solid var(--pipeline-border);
  }
}

@media (min-width: 992px) {
  html:has(body.crm-template .main-content .page-content > .container-fluid > :is(.crm-calendar-dashboard, .customers-page, .customer-record-page.customer-workspace, .pipeline-workspace, .projects-workspace, .tasks-workspace, .action-center-page, .finance-workspace, .settings-layout, .crud-page, .audit-page, .account-shell)),
  body.crm-template:has(.main-content .page-content > .container-fluid > :is(.crm-calendar-dashboard, .customers-page, .customer-record-page.customer-workspace, .pipeline-workspace, .projects-workspace, .tasks-workspace, .action-center-page, .finance-workspace, .settings-layout, .crud-page, .audit-page, .account-shell)) {
    overflow: hidden;
  }

  body.crm-template:has(.main-content .page-content > .container-fluid > :is(.crm-calendar-dashboard, .customers-page, .customer-record-page.customer-workspace, .pipeline-workspace, .projects-workspace, .tasks-workspace, .action-center-page, .finance-workspace, .settings-layout, .crud-page, .audit-page, .account-shell)) #layout-wrapper,
  body.crm-template:has(.main-content .page-content > .container-fluid > :is(.crm-calendar-dashboard, .customers-page, .customer-record-page.customer-workspace, .pipeline-workspace, .projects-workspace, .tasks-workspace, .action-center-page, .finance-workspace, .settings-layout, .crud-page, .audit-page, .account-shell)) .main-content {
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  body.crm-template:has(.main-content .page-content > .container-fluid > :is(.crm-calendar-dashboard, .customers-page, .customer-record-page.customer-workspace, .pipeline-workspace, .projects-workspace, .tasks-workspace, .action-center-page, .finance-workspace, .settings-layout, .crud-page, .audit-page, .account-shell)) .main-content .page-content {
    flex: 1 1 auto;
    height: 100%;
    max-height: 100vh;
    max-height: 100dvh;
    min-height: 0;
    overflow: hidden;
    padding-bottom: 12px;
  }

  body.crm-template:has(.main-content .page-content > .container-fluid > :is(.crm-calendar-dashboard, .customers-page, .customer-record-page.customer-workspace, .pipeline-workspace, .projects-workspace, .tasks-workspace, .action-center-page, .finance-workspace, .settings-layout, .crud-page, .audit-page, .account-shell)) .main-content .page-content > .container-fluid {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  body.crm-template:has(.main-content .page-content > .container-fluid > :is(.crm-calendar-dashboard, .customers-page, .customer-record-page.customer-workspace, .pipeline-workspace, .projects-workspace, .tasks-workspace, .action-center-page, .finance-workspace, .settings-layout, .crud-page, .audit-page, .account-shell)) .footer {
    display: none;
  }

  body.crm-template .main-content .page-content > .container-fluid > .crm-calendar-dashboard,
  body.crm-template .main-content .page-content > .container-fluid > .customers-page,
  body.crm-template .main-content .page-content > .container-fluid > .customer-record-page.customer-workspace,
  body.crm-template .main-content .page-content > .container-fluid > .pipeline-workspace,
  body.crm-template .main-content .page-content > .container-fluid > .projects-workspace,
  body.crm-template .main-content .page-content > .container-fluid > .tasks-workspace,
  body.crm-template .main-content .page-content > .container-fluid > .action-center-page,
  body.crm-template .main-content .page-content > .container-fluid > .finance-workspace,
  body.crm-template .main-content .page-content > .container-fluid > .settings-layout,
  body.crm-template .main-content .page-content > .container-fluid > .crud-page,
  body.crm-template .main-content .page-content > .container-fluid > .audit-page,
  body.crm-template .main-content .page-content > .container-fluid > .account-shell {
    flex: 1 1 auto;
    min-height: 0;
  }

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

  .crm-calendar-dashboard > .glass-card,
  .customer-workspace-layout > .glass-card,
  .customer-workspace-layout > .panel,
  .pipeline-shell > .glass-card {
    margin-bottom: 0;
  }

  .crm-calendar-card,
  .crm-calendar-left,
  .crm-calendar-sidebar {
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .crm-calendar-dashboard > .crm-calendar-card,
  .crm-calendar-dashboard > .crm-calendar-left,
  .crm-calendar-dashboard > .crm-calendar-sidebar {
    align-self: stretch;
    height: 100%;
  }

  .crm-calendar-grid.fc,
  .crm-calendar-grid .fc {
    height: 100%;
    min-height: 0;
  }

  .crm-calendar-grid.fc .fc-view-harness,
  .crm-calendar-grid .fc .fc-view-harness {
    flex: 1 1 auto;
    min-height: 0;
  }

  .crm-calendar-grid.fc .fc-view-harness > .fc-view,
  .crm-calendar-grid.fc .fc-scrollgrid,
  .crm-calendar-grid .fc .fc-view-harness > .fc-view,
  .crm-calendar-grid .fc .fc-scrollgrid {
    height: 100% !important;
  }

  .crm-calendar-grid.fc .fc-daygrid-body,
  .crm-calendar-grid.fc .fc-scrollgrid-sync-table,
  .crm-calendar-grid .fc .fc-daygrid-body,
  .crm-calendar-grid .fc .fc-scrollgrid-sync-table {
    width: 100% !important;
    height: 100% !important;
  }

  .crm-calendar-grid.fc .fc-daygrid-body,
  .crm-calendar-grid .fc .fc-daygrid-body {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .crm-calendar-grid.fc .fc-daygrid-day-frame,
  .crm-calendar-grid .fc .fc-daygrid-day-frame {
    min-height: 0;
  }

  .crm-calendar-grid.fc .fc-timeGridWeek-view .fc-timegrid-col.is-selected-day,
  .crm-calendar-grid .fc .fc-timeGridWeek-view .fc-timegrid-col.is-selected-day {
    background: rgba(var(--crm-primary-rgb), .026) !important;
    box-shadow:
      inset 1px 0 0 rgba(var(--crm-primary-rgb), .12),
      inset -1px 0 0 rgba(var(--crm-primary-rgb), .12);
  }

  .crm-calendar-grid.fc .fc-timeGridDay-view .fc-timegrid-col.is-selected-day,
  .crm-calendar-grid .fc .fc-timeGridDay-view .fc-timegrid-col.is-selected-day {
    background: rgba(var(--crm-primary-rgb), .018) !important;
    box-shadow: inset 0 0 0 1px rgba(var(--crm-primary-rgb), .1);
  }

  .crm-calendar-grid.fc .fc-timeGridWeek-view .fc-daygrid-day.is-selected-day,
  .crm-calendar-grid.fc .fc-timeGridDay-view .fc-daygrid-day.is-selected-day,
  .crm-calendar-grid .fc .fc-timeGridWeek-view .fc-daygrid-day.is-selected-day,
  .crm-calendar-grid .fc .fc-timeGridDay-view .fc-daygrid-day.is-selected-day {
    background: rgba(var(--crm-primary-rgb), .035) !important;
    box-shadow: inset 0 0 0 1px rgba(var(--crm-primary-rgb), .14);
  }

  .crm-calendar-grid.fc .fc-timegrid-event,
  .crm-calendar-grid .fc .fc-timegrid-event {
    min-height: 36px;
    border-left-width: 4px;
    border-radius: 8px;
    box-shadow:
      0 10px 22px rgba(15, 23, 42, .08),
      0 0 0 1px rgba(15, 23, 42, .035);
  }

  .crm-calendar-grid.fc .fc-timegrid-event.fc-timegrid-event-short,
  .crm-calendar-grid .fc .fc-timegrid-event.fc-timegrid-event-short {
    min-height: 34px;
  }

  .crm-calendar-grid.fc .fc-timeGridWeek-view .fc-timegrid-event,
  .crm-calendar-grid .fc .fc-timeGridWeek-view .fc-timegrid-event {
    min-height: 40px;
  }

  .crm-calendar-grid.fc .fc-timegrid-event .fc-event-main,
  .crm-calendar-grid .fc .fc-timegrid-event .fc-event-main {
    display: flex;
    align-items: center;
    height: 100%;
    min-height: 0;
    padding: 6px 8px;
  }

  .crm-calendar-grid.fc .fc-timegrid-event .crm-calendar-event-inner,
  .crm-calendar-grid .fc .fc-timegrid-event .crm-calendar-event-inner {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center;
    width: 100%;
    min-width: 0;
    gap: 6px;
  }

  .crm-calendar-grid.fc .fc-timegrid-event .crm-calendar-event-time,
  .crm-calendar-grid.fc .fc-timegrid-event .crm-calendar-event-title,
  .crm-calendar-grid .fc .fc-timegrid-event .crm-calendar-event-time,
  .crm-calendar-grid .fc .fc-timegrid-event .crm-calendar-event-title {
    min-width: 0;
    overflow: hidden;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .crm-calendar-grid.fc .fc-timegrid-event .crm-calendar-event-time,
  .crm-calendar-grid .fc .fc-timegrid-event .crm-calendar-event-time {
    opacity: .9;
  }

  .crm-calendar-grid.fc .fc-timegrid-event .crm-calendar-dot,
  .crm-calendar-grid .fc .fc-timegrid-event .crm-calendar-dot {
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
  }

  .crm-calendar-grid.fc .fc-timeGridWeek-view .fc-timegrid-event .crm-calendar-event-inner,
  .crm-calendar-grid .fc .fc-timeGridWeek-view .fc-timegrid-event .crm-calendar-event-inner {
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    gap: 2px;
  }

  .crm-calendar-grid.fc .fc-timeGridWeek-view .fc-timegrid-event .crm-calendar-dot,
  .crm-calendar-grid .fc .fc-timeGridWeek-view .fc-timegrid-event .crm-calendar-dot {
    display: none;
  }

  .crm-calendar-grid.fc .fc-timeGridWeek-view .fc-timegrid-event .crm-calendar-event-time,
  .crm-calendar-grid.fc .fc-timeGridWeek-view .fc-timegrid-event .crm-calendar-event-title,
  .crm-calendar-grid .fc .fc-timeGridWeek-view .fc-timegrid-event .crm-calendar-event-time,
  .crm-calendar-grid .fc .fc-timeGridWeek-view .fc-timegrid-event .crm-calendar-event-title {
    font-size: 10px;
    line-height: 1.1;
  }

  .crm-calendar-grid.fc .fc-timeGridDay-view .fc-timegrid-event,
  .crm-calendar-grid .fc .fc-timeGridDay-view .fc-timegrid-event {
    width: min(100%, 960px);
  }

  .customer-record-page.customer-workspace {
    height: 100%;
    max-height: 100%;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
  }

  .customer-workspace-layout {
    --customer-workspace-column-height: max(420px, calc(100vh - 230px));
    --customer-workspace-column-height: max(420px, calc(100dvh - 230px));
    align-items: stretch;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .customer-workspace-nav,
  .customer-workspace-main,
  .customer-workspace-summary {
    align-self: stretch;
    height: 100%;
    max-height: none;
  }

  .customer-workspace-nav,
  .customer-workspace-summary {
    align-content: start;
    grid-auto-rows: max-content;
    position: relative;
    top: auto;
  }

  .customer-workspace-main {
    top: auto;
  }

  body.crm-template .main-content .page-content > .container-fluid > .customers-page,
  body.crm-template .main-content .page-content > .container-fluid > .crud-page,
  .settings-layout {
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  body.crm-template .main-content .page-content > .container-fluid > .customers-page,
  body.crm-template .main-content .page-content > .container-fluid > .crud-page {
    align-content: start;
    grid-auto-rows: max-content;
    overflow: auto;
  }

  body.crm-template .main-content .page-content > .container-fluid > .customers-page > .customers-directory-panel,
  body.crm-template .main-content .page-content > .container-fluid > .crud-page > .panel {
    min-height: 0;
    overflow: visible;
  }

  .settings-layout > .settings-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
  }

  .customers-record-list,
  .settings-layout > .settings-card > .tab-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
  }

  .customers-record-list {
    align-content: start;
    align-items: start;
    grid-auto-rows: max-content;
    overflow: visible;
  }

  body.crm-template .main-content .page-content > .container-fluid > .crud-page > .panel > .admin-card-list,
  body.crm-template .main-content .page-content > .container-fluid > .crud-page > .panel > .table-wrap {
    max-height: none;
    overflow-x: auto;
    overflow-y: visible;
  }
}

@media (min-width: 1180.02px) {
  .pipeline-workspace {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
  }

  .pipeline-shell,
  .pipeline-main {
    flex: 1 1 auto;
    min-height: 0;
  }

  .pipeline-board,
  .pipeline-drawer {
    height: 100%;
    min-height: 0;
    max-height: none;
  }
}
.crm-customer-remote-search {
  display: grid;
  gap: 0.4rem;
  width: 100%;
}

.crm-customer-remote-search__input {
  min-width: 0;
}

.crm-customer-remote-search__status {
  color: var(--bs-secondary-color, #64748b);
  font-size: 0.72rem;
  line-height: 1.2;
  min-height: 0.85rem;
}

/* Dropdowns inside Grid.js cells must escape the table clipping context. */
.customer-invoice-table-wrap.is-grid-enhanced:has(.dropdown-menu.show),
.customer-invoice-table-wrap.is-grid-enhanced .gridjs-wrapper:has(.dropdown-menu.show),
.customer-invoice-table-wrap.is-grid-enhanced .gridjs-table:has(.dropdown-menu.show),
.customer-invoice-table-wrap.is-grid-enhanced .gridjs-tbody:has(.dropdown-menu.show),
.customer-invoice-table-wrap.is-grid-enhanced .gridjs-tr:has(.dropdown-menu.show),
.customer-invoice-table-wrap.is-grid-enhanced .gridjs-td:has(.dropdown-menu.show) {
  overflow: visible !important;
}

.customer-invoice-table-wrap.is-grid-enhanced .gridjs-tr:has(.dropdown-menu.show),
.customer-invoice-table-wrap.is-grid-enhanced .gridjs-td:has(.dropdown-menu.show) {
  position: relative;
  z-index: 60;
}

/* Inactive directory records stay recognizable beyond their status pill. */
.customers-directory-grid .is-record-inactive > td,
.customers-directory-table.is-grid-enhanced .gridjs-tr:has([data-record-inactive="1"]) > .gridjs-td {
  background-color: rgba(220, 38, 38, 0.055) !important;
}

.customers-directory-grid .is-record-inactive:hover > td,
.customers-directory-table.is-grid-enhanced .gridjs-tr:has([data-record-inactive="1"]):hover > .gridjs-td,
.customers-directory-table.is-grid-enhanced .gridjs-tr:has([data-record-inactive="1"]):focus > .gridjs-td,
.customers-directory-table.is-grid-enhanced .gridjs-tr:has([data-record-inactive="1"]):focus-within > .gridjs-td {
  background-color: rgba(220, 38, 38, 0.09) !important;
}

body.crm-template[data-theme="dark"] .customers-directory-grid .is-record-inactive > td,
body.crm-template[data-bs-theme="dark"] .customers-directory-grid .is-record-inactive > td,
body.crm-template[data-theme="dark"] .customers-directory-table.is-grid-enhanced .gridjs-tr:has([data-record-inactive="1"]) > .gridjs-td,
body.crm-template[data-bs-theme="dark"] .customers-directory-table.is-grid-enhanced .gridjs-tr:has([data-record-inactive="1"]) > .gridjs-td {
  background-color: rgba(248, 113, 113, 0.1) !important;
}
