:root {
  --tblr-font-sans-serif: "Plus Jakarta Sans", "Noto Sans Thai", sans-serif;
  --tblr-body-font-size: 0.75rem;
  --tblr-body-line-height: 1.45;
  --tblr-btn-font-size: 0.78rem;
  --tblr-btn-padding-y: 0.5rem;
  --tblr-btn-padding-x: 0.82rem;
  --tblr-btn-line-height: 1.35;
  --tblr-btn-border-radius: 0.82rem;
  --tblr-nav-font-size: 0.78rem;
  --tblr-nav-link-font-size: 0.78rem;
  --tblr-nav-link-padding-y: 0.5rem;
  --tblr-nav-link-padding-x: 0.75rem;
  --tblr-dropdown-font-size: 0.78rem;
  --tblr-dropdown-border-radius: 0.9rem;
  --tblr-dropdown-item-padding-x: 0.75rem;
  --tblr-dropdown-item-padding-y: 0.42rem;
  --tblr-breadcrumb-font-size: 0.78rem;
  --tblr-breadcrumb-padding-x: 0.58rem;
  --tblr-breadcrumb-padding-y: 0.38rem;
  --tblr-pagination-font-size: 0.78rem;
  --tblr-pagination-padding-x: 0.68rem;
  --tblr-pagination-padding-y: 0.38rem;
  --tblr-popover-font-size: 0.78rem;
  --tblr-toast-font-size: 0.78rem;
  --tblr-tooltip-font-size: 0.64rem;
  --tblr-badge-font-size: 0.64rem;
  --tblr-badge-padding-x: 0.42rem;
  --tblr-badge-padding-y: 0.18rem;
  --tblr-font-size-h1: 1.28rem;
  --tblr-font-size-h2: 1.06rem;
  --tblr-font-size-h3: 0.88rem;
  --tblr-font-size-h4: 0.78rem;
  --tblr-font-size-h5: 0.66rem;
  --tblr-font-size-h6: 0.54rem;
  --tblr-border-radius: 0.86rem;
  --tblr-border-radius-lg: 1rem;
  --tblr-border-radius-xl: 1.1rem;
  --tblr-card-border-radius: 1.12rem;
  --tblr-card-spacer-x: 1rem;
  --tblr-card-spacer-y: 1rem;
  --tblr-card-cap-padding-x: 1rem;
  --tblr-card-cap-padding-y: 0.88rem;
  --tblr-modal-padding: 0.9rem;
  --tblr-modal-header-padding-x: 1rem;
  --tblr-modal-header-padding-y: 0.9rem;
  --tblr-modal-footer-gap: 0.65rem;
  --tblr-page-padding: 0.9rem;
  --tblr-page-padding-y: 0.9rem;
  --tblr-primary: #173a63;
  --tblr-primary-rgb: 23, 58, 99;
  --tblr-secondary: #6b7280;
  --tblr-secondary-rgb: 107, 114, 128;
  --tblr-body-bg: #f3f6fb;
  --tblr-body-color: #182433;
  --tblr-border-color: #dde3ec;
  --tblr-border-color-translucent: rgba(23, 36, 51, 0.08);
  --tblr-card-border-color: #e2e8f0;
  --tblr-card-cap-bg: #ffffff;
  --tblr-muted: #6c7a8c;
  --tblr-success: #2fb344;
  --tblr-warning: #f59f00;
  --tblr-danger: #d63939;
  --tblr-info: #4299e1;
  --kg-accent: #c99a2d;
  --kg-sidebar: #10233d;
  --kg-sidebar-2: #17304f;
  --kg-surface: #ffffff;
  --kg-surface-alt: #f8fafc;
  --kg-surface-glass: rgba(255, 255, 255, 0.78);
  --kg-accent-soft: rgba(201, 154, 45, 0.16);
  --kg-shadow-sm: 0 14px 34px rgba(15, 23, 42, 0.06);
  --kg-shadow-md: 0 20px 52px rgba(15, 23, 42, 0.08);
  --kg-shadow-lg: 0 28px 80px rgba(15, 23, 42, 0.12);
  --kg-radius-card: 1.12rem;
  --kg-radius-pill: 999px;
  --kg-control-height: 2.55rem;
  --kg-control-radius: 0.84rem;
  --kg-panel-padding: 1rem;
  --kg-section-gap: 0.85rem;
}

html {
  font-size: 15px;
}

@media (min-width: 1200px) {
  :root {
    --tblr-body-font-size: 0.79rem;
    --tblr-btn-font-size: 0.79rem;
    --tblr-nav-font-size: 0.79rem;
    --tblr-nav-link-font-size: 0.79rem;
    --tblr-dropdown-font-size: 0.79rem;
    --tblr-breadcrumb-font-size: 0.79rem;
    --tblr-pagination-font-size: 0.79rem;
    --tblr-toast-font-size: 0.79rem;
    --tblr-font-size-h1: 1.34rem;
    --tblr-font-size-h2: 1.12rem;
    --tblr-card-border-radius: 1rem;
    --tblr-card-spacer-x: 0.9rem;
    --tblr-card-spacer-y: 0.9rem;
    --tblr-card-cap-padding-x: 0.9rem;
    --tblr-card-cap-padding-y: 0.8rem;
    --tblr-modal-padding: 0.82rem;
    --tblr-modal-header-padding-x: 0.9rem;
    --tblr-modal-header-padding-y: 0.82rem;
    --tblr-page-padding: 0.78rem;
    --kg-radius-card: 1rem;
    --kg-control-height: 2.32rem;
    --kg-control-radius: 0.76rem;
    --kg-panel-padding: 0.9rem;
    --kg-section-gap: 0.78rem;
  }

  html {
    font-size: 12.75px;
  }

  .navbar-vertical.navbar-expand-lg {
    width: 13.75rem;
  }

  .navbar-expand-lg.navbar-vertical ~ .navbar,
  .navbar-expand-lg.navbar-vertical ~ .page-wrapper {
    margin-left: 13.75rem;
  }

  .crm-page-body {
    padding-bottom: 1rem;
  }

  .admin-sidebar .container-fluid {
    padding-top: 0.9rem;
    padding-bottom: 1rem;
  }

  .admin-brand-logo {
    width: 8.1rem;
    max-height: 1.8rem;
  }

  .admin-sidebar .admin-brand-with-logo {
    gap: 0.42rem;
  }

  .admin-sidebar .admin-brand-copy strong {
    font-size: 0.82rem;
  }

  .admin-sidebar .admin-brand-copy small {
    font-size: 0.69rem;
    margin-top: 0.14rem;
  }

  .admin-sidebar-nav {
    margin-top: 0.9rem;
  }

  .admin-sidebar-section + .admin-sidebar-section {
    margin-top: 0.82rem;
  }

  .admin-sidebar-section__label,
  .admin-sidebar-disclosure__summary {
    margin-bottom: 0.42rem;
  }

  .admin-sidebar-section__label strong,
  .admin-sidebar-disclosure__copy strong {
    font-size: 0.69rem;
  }

  .admin-sidebar-section__label small,
  .admin-sidebar-disclosure__copy small {
    font-size: 0.66rem;
  }

  .admin-sidebar-disclosure {
    border-radius: 0.82rem;
    padding: 0.22rem 0.34rem 0.34rem;
  }

  .admin-sidebar-disclosure__summary {
    padding: 0.24rem 0.28rem 0.14rem;
  }

  .admin-sidebar-disclosure__icon {
    width: 1.6rem;
    height: 1.6rem;
  }

  .admin-sidebar .nav-link {
    min-height: 2.38rem;
    padding-left: 0.72rem;
    padding-right: 0.72rem;
    margin-bottom: 0.26rem;
    border-radius: 0.8rem;
  }

  .admin-sidebar .icon,
  .page-topbar .icon,
  .btn .icon,
  .crm-alert .icon,
  .crm-kpi-icon .icon,
  .crm-soft-link .icon {
    width: 1rem;
    height: 1rem;
  }

  .page-topbar .container-xl {
    min-height: 3.55rem;
  }

  .crm-topbar-actions {
    gap: 0.46rem !important;
  }

  .crm-topbar-action {
    min-height: 2.18rem;
    padding-inline: 0.72rem;
    border-radius: 0.76rem;
  }

  .crm-topbar-user__toggle {
    gap: 0.5rem;
    padding: 0.28rem 0.4rem !important;
    border-radius: 0.8rem;
  }

  .crm-topbar-user__toggle .avatar {
    width: 2.2rem;
    height: 2.2rem;
  }

  .crm-topbar-user__name {
    font-size: 0.82rem;
  }

  .crm-topbar-user__role {
    margin-top: 0.12rem;
    font-size: 0.64rem;
  }

  .crm-page-header {
    padding-top: 0.25rem;
    padding-bottom: 0.22rem;
  }

  .page-pretitle {
    margin-bottom: 0.4rem;
    font-size: 0.66rem;
  }

  .page-title {
    font-size: clamp(1.32rem, 0.98vw + 0.9rem, 1.95rem);
  }

  .crm-page-description {
    font-size: 0.82rem;
  }

  .crm-page-meta {
    gap: 0.34rem;
  }

  .crm-chip {
    padding: 0.3rem 0.56rem;
    font-size: 0.66rem;
  }

  .crm-panel-card .card-header,
  .crm-form-section .card-header {
    gap: 0.7rem;
    padding: 0.82rem 0.9rem;
  }

  .crm-panel-title {
    font-size: 0.9rem;
  }

  .crm-panel-subtitle {
    margin-top: 0.16rem;
    font-size: 0.76rem;
  }

  .crm-kpi-card .card-body {
    padding: 0.9rem 0.9rem 0.84rem;
  }

  .crm-kpi-label {
    margin-bottom: 0.32rem;
    font-size: 0.7rem;
  }

  .crm-kpi-value {
    font-size: clamp(1.08rem, 0.76vw + 0.88rem, 1.52rem);
  }

  .crm-kpi-meta {
    margin-top: 0.28rem;
    font-size: 0.74rem;
  }

  .crm-kpi-icon {
    width: 2.08rem;
    height: 2.08rem;
    border-radius: 0.72rem;
  }

  .crm-form-flow {
    top: calc(3.55rem + 0.68rem);
    padding: 0.78rem 0.82rem;
  }

  .form-label {
    font-size: 0.76rem;
    margin-bottom: 0.3rem;
  }

  .form-control,
  .form-select {
    padding: 0.54rem 0.72rem;
  }

  .crm-searchable-input {
    padding-right: 2.2rem;
    background:
      linear-gradient(45deg, transparent 50%, #64748b 50%) right 0.98rem center / 0.38rem 0.38rem no-repeat,
      linear-gradient(135deg, #64748b 50%, transparent 50%) right 0.74rem center / 0.38rem 0.38rem no-repeat,
      #fff;
  }

  .crm-searchable-menu {
    top: calc(100% + 0.32rem);
    padding: 0.3rem;
    border-radius: 0.9rem;
  }

  .crm-searchable-option {
    padding: 0.5rem 0.66rem;
    border-radius: 0.68rem;
  }

  .crm-filter-card--compact .card-header {
    padding-bottom: 0.78rem;
  }

  .crm-filter-card--compact .card-body {
    padding-top: 0.85rem;
  }

  .crm-filter-card--compact .crm-shortcut-button {
    min-height: 2.18rem;
    padding: 0.46rem 0.72rem;
    font-size: 0.76rem;
  }

  .crm-orders-table {
    --crm-orders-sticky-col-1: 8rem;
    --crm-orders-sticky-col-2: 14.5rem;
    --crm-orders-sticky-col-3: 10rem;
    min-width: 66rem;
  }
}

html,
body {
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at 0% 0%, rgba(201, 154, 45, 0.12), transparent 22%),
    radial-gradient(circle at 100% 12%, rgba(23, 58, 99, 0.12), transparent 26%),
    linear-gradient(180deg, #f7f9fc 0%, #f2f5fa 100%);
  color: var(--tblr-body-color);
  font-family: var(--tblr-font-sans-serif);
  letter-spacing: -0.01em;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.24), transparent 72%);
  opacity: 0.28;
}

a {
  text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6,
.page-title,
.card-title,
.crm-panel-title,
.crm-kpi-value,
.admin-brand-copy strong,
.btn,
.form-label {
  font-family: "Plus Jakarta Sans", "Noto Sans Thai", sans-serif;
}

.crm-admin-body .page,
.crm-page-shell {
  min-height: 100vh;
}

.crm-admin-body .page {
  width: 100%;
  max-width: none;
  margin: 0;
}

.crm-page-body {
  padding-bottom: 1.2rem;
}

.admin-sidebar {
  position: relative;
  background:
    radial-gradient(circle at top left, rgba(201, 154, 45, 0.18), transparent 24%),
    linear-gradient(180deg, rgba(201, 154, 45, 0.08), transparent 24%),
    linear-gradient(180deg, var(--kg-sidebar) 0%, var(--kg-sidebar-2) 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04);
}

.admin-sidebar::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.02), rgba(241, 207, 102, 0.45), rgba(255, 255, 255, 0.02));
}

.admin-sidebar .container-fluid {
  padding-top: 1.1rem;
  padding-bottom: 1.25rem;
}

.admin-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.875rem;
  color: inherit;
}

.admin-brand-with-logo {
  align-items: center;
  gap: 0.75rem;
  max-width: 100%;
}

.admin-brand-logo-shell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.admin-brand-logo {
  display: block;
  width: 9rem;
  max-width: 100%;
  height: auto;
  max-height: 2rem;
  object-fit: contain;
}

.admin-brand-mark {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--kg-accent) 0%, #f1cf66 100%);
  color: #111827;
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.15),
    0 12px 30px rgba(201, 154, 45, 0.22);
}

.admin-brand-copy {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.2;
}

.admin-brand-copy strong {
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.admin-brand-copy small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.75rem;
  margin-top: 0.2rem;
}

.admin-sidebar .navbar-brand {
  max-width: 100%;
}

.admin-sidebar .admin-brand {
  width: 100%;
}

.admin-sidebar .admin-brand-with-logo {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.admin-sidebar .admin-brand-copy strong {
  font-size: 0.88rem;
  color: #ffffff;
}

.admin-sidebar .admin-brand-copy small {
  color: rgba(255, 255, 255, 0.68);
}

.admin-sidebar-nav {
  margin-top: 1.15rem;
}

.admin-sidebar-section + .admin-sidebar-section {
  margin-top: 1rem;
}

.admin-sidebar-section__label,
.admin-sidebar-disclosure__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.admin-sidebar-section__copy,
.admin-sidebar-disclosure__copy {
  display: block;
}

.admin-sidebar-section__label strong,
.admin-sidebar-disclosure__copy strong {
  display: block;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
}

.admin-sidebar-section__label small,
.admin-sidebar-disclosure__copy small {
  display: block;
  margin-top: 0.14rem;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.55);
}

.admin-sidebar-disclosure {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.92rem;
  padding: 0.26rem 0.4rem 0.4rem;
  background: rgba(255, 255, 255, 0.03);
}

.admin-sidebar-disclosure__summary {
  list-style: none;
  cursor: pointer;
  padding: 0.3rem 0.32rem 0.18rem;
  margin-bottom: 0;
}

.admin-sidebar-disclosure__summary::-webkit-details-marker {
  display: none;
}

.admin-sidebar-disclosure__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.05);
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.admin-sidebar-disclosure[open] .admin-sidebar-disclosure__icon {
  transform: rotate(180deg);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.admin-sidebar-disclosure__body {
  margin-top: 0.45rem;
}

.admin-sidebar .nav-link {
  border-radius: 0.9rem;
  margin-bottom: 0.34rem;
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid transparent;
  min-height: 2.7rem;
  padding-left: 0.85rem;
  padding-right: 0.85rem;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-item.active .nav-link {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06)),
    rgba(255, 255, 255, 0.06);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 28px rgba(7, 12, 20, 0.18);
  transform: translateX(2px);
}

.admin-sidebar .nav-item.disabled .nav-link,
.admin-sidebar .nav-item.disabled span.nav-link {
  color: rgba(255, 255, 255, 0.42);
  cursor: default;
}

.admin-sidebar .icon,
.page-topbar .icon,
.btn .icon,
.crm-alert .icon,
.crm-kpi-icon .icon,
.crm-soft-link .icon {
  display: inline-block;
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  stroke-width: 1.85;
  vertical-align: -0.16em;
}

.page-topbar {
  position: relative;
  top: auto;
  z-index: 30;
  background: rgba(247, 249, 252, 0.72);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.page-topbar .container-xl {
  min-height: 4rem;
}

.crm-topbar-shell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.crm-topbar-actions {
  align-items: center;
  gap: 0.55rem !important;
}

.crm-topbar-action {
  min-height: 2.4rem;
  padding-inline: 0.8rem;
  border-radius: 0.82rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.crm-topbar-user {
  position: relative;
}

.crm-topbar-user__toggle {
  align-items: center;
  gap: 0.62rem;
  padding: 0.34rem 0.48rem !important;
  border-radius: 0.88rem;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.crm-topbar-user__toggle:hover,
.crm-topbar-user__toggle:focus {
  text-decoration: none;
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(201, 154, 45, 0.22);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.crm-topbar-user__meta {
  min-width: 0;
}

.crm-topbar-user__name {
  color: #0f172a;
  font-weight: 700;
  line-height: 1.2;
}

.crm-topbar-user__role {
  margin-top: 0.18rem;
  color: #7d6320;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.3;
  text-transform: uppercase;
}

.crm-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.64);
  backdrop-filter: blur(12px);
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}

.crm-footer-compact {
  border-top: 0;
  background: transparent;
  padding-top: 0;
  padding-bottom: 0;
}

.crm-footer__note {
  padding-top: 0.2rem;
  padding-bottom: 0.2rem;
  line-height: 1.35;
}

.crm-searchable-select {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: min(20rem, 100%);
}

.crm-searchable-select.is-open {
  z-index: 2400;
}

.crm-searchable-native {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.crm-searchable-input {
  padding-right: 2.4rem;
  background:
    linear-gradient(45deg, transparent 50%, #64748b 50%) right 1.05rem center / 0.42rem 0.42rem no-repeat,
    linear-gradient(135deg, #64748b 50%, transparent 50%) right 0.78rem center / 0.42rem 0.42rem no-repeat,
    #fff;
}

.crm-searchable-select.is-open .crm-searchable-input {
  border-color: rgba(23, 58, 99, 0.45);
  box-shadow: 0 0 0 0.22rem rgba(23, 58, 99, 0.08);
}

.crm-searchable-menu {
  position: absolute;
  z-index: 2450;
  top: calc(100% + 0.38rem);
  left: 0;
  right: 0;
  display: none;
  max-height: 17.5rem;
  overflow-y: auto;
  padding: 0.35rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 52px rgba(15, 23, 42, 0.16);
}

.crm-form-section.has-open-searchable,
.crm-panel-card.has-open-searchable,
.crm-soft-card.has-open-searchable {
  position: relative;
  z-index: 2300;
  overflow: visible;
}

.table-responsive.has-open-searchable {
  overflow: visible;
}

.crm-searchable-select.is-open .crm-searchable-menu {
  display: block;
}

.crm-searchable-option {
  display: block;
  width: 100%;
  padding: 0.58rem 0.72rem;
  border: 0;
  border-radius: 0.75rem;
  background: transparent;
  color: #1f2937;
  font: inherit;
  line-height: 1.35;
  text-align: left;
}

.crm-searchable-option--package {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.52rem 0.7rem;
}

.crm-searchable-option__main {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.08rem;
}

.crm-searchable-option__title {
  display: block;
  color: #1e293b;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.24;
  white-space: normal;
}

.crm-searchable-option__meta {
  display: block;
  color: #64748b;
  font-size: 0.76rem;
  line-height: 1.2;
  white-space: normal;
}

.crm-searchable-option__price {
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(201, 154, 45, 0.12);
  color: #9a6700;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.32rem 0.54rem;
}

.crm-searchable-option:hover,
.crm-searchable-option.is-active {
  background: linear-gradient(135deg, rgba(23, 58, 99, 0.1), rgba(201, 154, 45, 0.1));
  color: var(--tblr-primary);
}

.crm-searchable-option:hover .crm-searchable-option__title,
.crm-searchable-option.is-active .crm-searchable-option__title {
  color: var(--tblr-primary);
}

.crm-searchable-option:hover .crm-searchable-option__meta,
.crm-searchable-option.is-active .crm-searchable-option__meta {
  color: #47627f;
}

.crm-searchable-option:hover .crm-searchable-option__price,
.crm-searchable-option.is-active .crm-searchable-option__price {
  background: rgba(201, 154, 45, 0.18);
  color: #7c5200;
}

.crm-searchable-empty {
  padding: 0.7rem 0.8rem;
  color: var(--tblr-muted);
  font-size: 0.9rem;
}

.admin-avatar {
  background: linear-gradient(135deg, var(--tblr-primary), #224e85);
  color: #fff;
  font-weight: 700;
  border-radius: 999px;
}

.admin-avatar-has-image {
  padding: 0;
  overflow: hidden;
  background: #fff;
  color: transparent;
  border-radius: 999px;
}

.admin-avatar-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.admin-sidebar-mobile-user .nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.85rem;
  height: 2.85rem;
  padding: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 24px rgba(7, 12, 20, 0.16);
}

.admin-sidebar-mobile-user .nav-link:hover,
.admin-sidebar-mobile-user .nav-link:focus {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.admin-sidebar-mobile-user .dropdown-menu {
  min-width: 13.75rem;
  margin-top: 0.65rem;
}

.admin-sidebar-mobile-avatar {
  width: 100%;
  height: 100%;
  font-size: 0.9rem;
  border-radius: 999px;
  box-shadow: none;
}

.profile-photo-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.profile-photo-frame {
  flex: 0 0 auto;
}

.profile-photo-avatar {
  width: 5.6rem;
  height: 5.6rem;
  border-radius: 1.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--tblr-primary), #224e85);
  color: #fff;
  font-family: "Plus Jakarta Sans", "Noto Sans Thai", sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.32),
    0 18px 38px rgba(15, 35, 61, 0.18);
}

.profile-photo-avatar .admin-avatar-img {
  border-radius: inherit;
}

.profile-photo-note,
.profile-danger-zone {
  border: 1px solid rgba(206, 216, 227, 0.96);
  border-radius: 1.15rem;
  padding: 1rem;
  background: #fbfcfe;
}

.profile-photo-note span,
.profile-danger-zone p {
  display: block;
  margin: 0.25rem 0 0;
  color: var(--tblr-muted);
}

.profile-danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background:
    linear-gradient(135deg, rgba(214, 57, 57, 0.06), rgba(255, 255, 255, 0.9));
}

.crm-user-table-identity {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 15rem;
}

.crm-user-table-identity > div {
  min-width: 0;
}

.crm-user-table-avatar {
  width: 2.9rem;
  height: 2.9rem;
  flex: 0 0 2.9rem;
  font-size: 0.95rem;
  box-shadow: 0 10px 24px rgba(14, 35, 62, 0.14);
}

.crm-user-history-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.crm-user-history-hero__avatar {
  flex: 0 0 auto;
}

.crm-user-history-avatar {
  width: 5rem;
  height: 5rem;
  border-radius: 1.4rem;
}

.crm-user-history-hero__content {
  min-width: 0;
}

.crm-page-header {
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
}

.crm-page-header-row {
  align-items: flex-start;
}

.crm-page-header-main {
  min-width: 0;
}

.crm-page-header-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

.crm-page-header-actions .btn-list {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.62rem;
}

.crm-page-header--compact {
  padding-top: 0.15rem;
  padding-bottom: 0.25rem;
}

.crm-page-header--compact .page-pretitle {
  margin-bottom: 0.38rem;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
}

.crm-page-header--compact .page-title {
  font-size: clamp(1.25rem, 0.9vw + 0.98rem, 1.82rem);
}

.crm-page-header--compact .crm-page-description {
  margin-top: 0.45rem !important;
  max-width: 48rem;
  font-size: 0.84rem;
  line-height: 1.48;
}

.crm-page-header--compact .crm-page-meta {
  gap: 0.4rem;
  margin-top: 0.7rem !important;
}

.crm-page-header--compact .crm-chip {
  padding: 0.34rem 0.6rem;
  font-size: 0.69rem;
}

.crm-page-header--compact .crm-page-header-actions .btn-list {
  gap: 0.55rem;
}

.crm-page-header--hidden {
  display: none;
}

.crm-page-header .page-pretitle:empty {
  display: none;
}

.page-pretitle {
  margin-bottom: 0.55rem;
  color: #7d6320;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.page-title {
  font-size: clamp(1.42rem, 1.15vw + 0.98rem, 2.18rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.crm-page-description {
  max-width: 60rem;
  font-size: 0.9rem;
  color: #5f6f83 !important;
}

.crm-page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.crm-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.7rem;
  border-radius: var(--kg-radius-pill);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #5e6a7b;
  font-size: 0.72rem;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.crm-alert {
  position: relative;
  border-radius: 1rem;
  border: 1px solid transparent;
  box-shadow: var(--kg-shadow-sm);
  margin-bottom: 1rem;
}

.crm-alert .btn-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
}

.crm-toast-stack {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 1rem);
  right: 1rem;
  z-index: 3200;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: min(24rem, calc(100vw - 2rem));
  pointer-events: none;
}

.crm-toast-popup {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.72rem;
  padding: 0.82rem 0.9rem;
  border-radius: 0.98rem;
  border: 1px solid rgba(222, 232, 240, 0.92);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--kg-shadow-md);
  opacity: 0;
  transform: translate3d(0, -12px, 0);
  transition: opacity 0.22s ease, transform 0.22s ease;
  overflow: hidden;
  pointer-events: auto;
}

.crm-toast-popup.is-clear {
  border-color: rgba(203, 213, 225, 0.96);
  background: rgba(248, 250, 252, 0.98);
}

.crm-toast-popup::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 0.28rem;
  background: linear-gradient(180deg, rgba(47, 179, 68, 1), rgba(201, 154, 45, 0.92));
}

.crm-toast-popup.is-clear::before {
  background: linear-gradient(180deg, rgba(100, 116, 139, 0.96), rgba(148, 163, 184, 0.88));
}

.crm-toast-popup.is-success::before,
.crm-toast-popup.is-apply::before {
  background: linear-gradient(180deg, rgba(47, 179, 68, 1), rgba(201, 154, 45, 0.92));
}

.crm-toast-popup.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.crm-toast-popup__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 2.5rem;
  border-radius: 999px;
  background: rgba(47, 179, 68, 0.12);
  color: var(--tblr-success);
}

.crm-toast-popup.is-clear .crm-toast-popup__icon {
  background: rgba(100, 116, 139, 0.14);
  color: #475569;
}

.crm-toast-popup.is-success .crm-toast-popup__icon,
.crm-toast-popup.is-apply .crm-toast-popup__icon {
  background: rgba(47, 179, 68, 0.12);
  color: var(--tblr-success);
}

.crm-toast-popup__content {
  min-width: 0;
  flex: 1 1 auto;
}

.crm-toast-popup__title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--tblr-body-color);
  line-height: 1.2;
}

.crm-toast-popup__message {
  margin-top: 0.18rem;
  font-size: 0.85rem;
  color: #5e6a7b;
  line-height: 1.45;
}

.crm-toast-popup__details {
  margin: 0.45rem 0 0;
  padding-left: 1.05rem;
  color: #4f5d70;
  font-size: 0.81rem;
  line-height: 1.45;
}

.crm-toast-popup__details li + li {
  margin-top: 0.12rem;
}

.crm-toast-popup__close {
  margin: -0.2rem -0.1rem 0 0;
  border: 0;
  background: transparent;
  color: #9aa7b7;
  font-size: 1.4rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

.crm-toast-popup__close:hover {
  color: var(--tblr-body-color);
}

.alert-icon {
  flex: 0 0 auto;
  color: inherit;
}

@media (max-width: 767.98px) {
  .crm-toast-stack {
    top: calc(env(safe-area-inset-top, 0px) + 0.75rem);
    left: 0.75rem;
    right: 0.75rem;
    width: auto;
  }
}

.crm-kpi-card.card,
.crm-panel-card.card,
.crm-profile-card.card,
.crm-form-section.card,
.crm-soft-card.card {
  border-radius: var(--kg-radius-card);
  border: 1px solid rgba(222, 232, 240, 0.95);
  box-shadow: var(--kg-shadow-sm);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 251, 255, 0.94)),
    var(--kg-surface);
}

.crm-kpi-card.card:hover,
.crm-panel-card.card:hover,
.crm-form-section.card:hover,
.crm-soft-card.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--kg-shadow-md);
}

.crm-kpi-card {
  overflow: hidden;
}

.crm-kpi-card .card-body {
  position: relative;
  padding: 1rem 1rem 0.94rem;
}

.crm-kpi-card .card-body::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 9rem;
  height: 9rem;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.6), transparent 60%);
}

.crm-kpi-card .card-body::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 0.24rem;
  background: linear-gradient(90deg, rgba(23, 58, 99, 0.92), rgba(201, 154, 45, 0.74));
}

.crm-kpi-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.82rem;
}

.crm-kpi-label {
  margin: 0 0 0.4rem;
  color: var(--tblr-muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.crm-kpi-value {
  display: block;
  margin: 0;
  font-size: clamp(1.2rem, 0.82vw + 0.98rem, 1.72rem);
  line-height: 1.08;
  color: var(--tblr-body-color);
}

.crm-kpi-meta {
  margin-top: 0.35rem;
  color: #68778a;
  font-size: 0.8rem;
}

.crm-kpi-icon {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.82rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--tblr-primary-rgb), 0.08);
  color: var(--tblr-primary);
  flex: 0 0 auto;
}

.crm-kpi-card.crm-kpi-success .crm-kpi-icon {
  background: rgba(47, 179, 68, 0.12);
  color: #1f8b33;
}

.crm-kpi-card.crm-kpi-warning .crm-kpi-icon {
  background: rgba(245, 159, 0, 0.14);
  color: #9b6500;
}

.crm-kpi-card.crm-kpi-danger .crm-kpi-icon {
  background: rgba(214, 57, 57, 0.12);
  color: #a92c2c;
}

.crm-kpi-card.crm-kpi-info .crm-kpi-icon {
  background: rgba(66, 153, 225, 0.12);
  color: #1f5f98;
}

.crm-panel-card .card-header,
.crm-form-section .card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.82rem;
  padding: 0.96rem 1rem;
  background: transparent;
  border-bottom: 1px solid rgba(222, 232, 240, 0.92);
}

.crm-panel-title {
  margin: 0;
  font-size: 0.96rem;
}

.crm-panel-subtitle {
  margin: 0.2rem 0 0;
  color: var(--tblr-muted);
  font-size: 0.81rem;
}

.crm-panel-card .card-body,
.crm-form-section .card-body,
.crm-profile-card .card-body,
.crm-soft-card .card-body {
  padding: var(--kg-panel-padding);
}

.crm-section-stack {
  display: grid;
  gap: var(--kg-section-gap);
}

.crm-section-stack--mobile-action-pad {
  padding-bottom: 0;
}

.crm-form-flow {
  position: sticky;
  top: calc(4rem + 0.75rem);
  z-index: 26;
  padding: 0.88rem 0.94rem;
  border: 1px solid rgba(206, 216, 227, 0.92);
  border-radius: 1.02rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.96)),
    linear-gradient(135deg, rgba(23, 58, 99, 0.08), rgba(201, 154, 45, 0.08));
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.crm-form-flow__copy {
  display: grid;
  gap: 0.18rem;
  margin-bottom: 0.85rem;
}

.crm-form-flow__eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 1.75rem;
  padding: 0.28rem 0.68rem;
  border-radius: 999px;
  background: rgba(23, 58, 99, 0.08);
  color: #173a63;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.crm-form-flow__title {
  margin: 0;
  color: var(--tblr-body-color);
  font-size: clamp(1.02rem, 0.35vw + 0.98rem, 1.28rem);
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.03em;
}

.crm-form-flow__hint {
  margin: 0;
  color: var(--tblr-muted);
  font-size: 0.82rem;
  line-height: 1.58;
}

.crm-form-flow__copy strong {
  color: var(--tblr-body-color);
  font-size: 0.94rem;
  font-weight: 800;
}

.crm-form-flow__copy small {
  color: var(--tblr-muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.crm-form-flow__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.crm-form-flow__tools {
  display: grid;
  gap: 0.7rem;
  justify-items: end;
}

.crm-form-flow__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.crm-form-flow__actions .btn {
  min-height: 2.35rem;
  border-radius: 999px;
  padding-inline: 0.95rem;
  font-weight: 800;
}

.crm-form-flow__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.45rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(206, 216, 227, 0.95);
  background: rgba(255, 255, 255, 0.96);
  color: #334155;
  font-size: 0.82rem;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.crm-form-flow__link:hover,
.crm-form-flow__link:focus {
  color: #10233d;
  border-color: rgba(23, 58, 99, 0.18);
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.crm-form-flow__link.is-active {
  color: #10233d;
  border-color: rgba(23, 58, 99, 0.26);
  background: linear-gradient(135deg, rgba(23, 58, 99, 0.09), rgba(201, 154, 45, 0.15));
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.1);
}

.crm-form-flow__link .icon {
  width: 0.95rem;
  height: 0.95rem;
  color: #173a63;
  stroke-width: 2;
}

.crm-form-flow--compact-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem 1rem;
  align-items: center;
  padding-block: 0.95rem;
}

.crm-form-flow--compact-overview .crm-form-flow__copy {
  margin-bottom: 0;
}

.crm-form-flow--compact-overview .crm-form-flow__eyebrow {
  margin-bottom: 0.3rem;
}

.crm-form-flow--compact-overview .crm-form-flow__copy strong {
  display: block;
  font-size: 0.96rem;
  color: #143052;
}

.crm-form-flow--compact-overview .crm-form-flow__copy small {
  display: block;
  margin-top: 0.22rem;
  color: #6a7a8c;
  font-size: 0.79rem;
  line-height: 1.55;
}

.crm-form-flow--compact-overview .crm-form-flow__nav {
  justify-content: flex-end;
}

.crm-form-flow--order-snapshot {
  gap: 0.95rem 1rem;
}

.crm-form-flow--order-command {
  gap: 0.75rem 1rem;
  padding: 0.8rem 0.85rem;
}

.crm-form-flow--order-command .crm-form-flow__copy {
  display: grid;
  gap: 0.14rem;
}

.crm-form-flow--order-command .crm-form-flow__copy strong {
  font-size: 0.92rem;
}

.crm-form-flow--order-command .crm-form-flow__copy small {
  margin-top: 0.12rem;
}

.crm-form-flow--order-command .crm-form-flow__nav {
  justify-content: flex-start;
}

.crm-workspace-metrics {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.crm-workspace-metric {
  --crm-workspace-metric-accent: #173a63;
  --crm-workspace-metric-tint: rgba(23, 58, 99, 0.08);
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.82rem 0.88rem;
  border: 1px solid rgba(206, 216, 227, 0.9);
  border-radius: 0.95rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96)),
    linear-gradient(135deg, var(--crm-workspace-metric-tint), rgba(255, 255, 255, 0));
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.crm-workspace-metric--order {
  --crm-workspace-metric-accent: #c99a2d;
  --crm-workspace-metric-tint: rgba(201, 154, 45, 0.11);
}

.crm-workspace-metric--items {
  --crm-workspace-metric-accent: #275da3;
  --crm-workspace-metric-tint: rgba(39, 93, 163, 0.1);
}

.crm-workspace-metric--payment {
  --crm-workspace-metric-accent: #218a56;
  --crm-workspace-metric-tint: rgba(33, 138, 86, 0.1);
}

.crm-workspace-metric--shipping {
  --crm-workspace-metric-accent: #16839a;
  --crm-workspace-metric-tint: rgba(22, 131, 154, 0.1);
}

.crm-workspace-metric--focus {
  --crm-workspace-metric-accent: #9a6b15;
  --crm-workspace-metric-tint: rgba(154, 107, 21, 0.1);
}

.crm-workspace-metric__icon {
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  border-radius: 0.78rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--crm-workspace-metric-accent) 12%, #fff);
  color: var(--crm-workspace-metric-accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--crm-workspace-metric-accent) 14%, transparent);
}

.crm-workspace-metric__icon .icon {
  width: 0.98rem;
  height: 0.98rem;
  stroke-width: 2;
}

.crm-workspace-metric__content {
  min-width: 0;
  display: grid;
  gap: 0.16rem;
}

.crm-workspace-metric__label {
  color: var(--crm-workspace-metric-accent);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.crm-workspace-metric__value,
.crm-workspace-metric__meta {
  display: block;
  min-width: 0;
}

.crm-workspace-metric__value {
  color: #10233d;
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.crm-workspace-metric__meta {
  color: #64748b;
  font-size: 0.76rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.crm-workspace-note {
  margin-bottom: 0.85rem;
  padding: 0.72rem 0.9rem;
  border: 1px solid rgba(201, 154, 45, 0.2);
  border-radius: 0.95rem;
  background: linear-gradient(135deg, rgba(201, 154, 45, 0.08), rgba(23, 58, 99, 0.04));
  color: #4f6072;
  font-size: 0.81rem;
  font-weight: 700;
  line-height: 1.45;
}

.crm-workspace-snapshot {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.crm-workspace-snapshot__card {
  --crm-snapshot-accent: #173a63;
  --crm-snapshot-tint: rgba(23, 58, 99, 0.07);
  position: relative;
  min-width: 0;
  padding: 0.95rem 1rem 1rem;
  border: 1px solid rgba(206, 216, 227, 0.92);
  border-radius: 1.05rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 252, 0.96)),
    linear-gradient(135deg, var(--crm-snapshot-tint), rgba(255, 255, 255, 0));
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
}

.crm-workspace-snapshot__card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--crm-snapshot-accent), rgba(255, 255, 255, 0));
}

.crm-workspace-snapshot__card--order {
  --crm-snapshot-accent: #c99a2d;
  --crm-snapshot-tint: rgba(201, 154, 45, 0.12);
}

.crm-workspace-snapshot__card--items {
  --crm-snapshot-accent: #275da3;
  --crm-snapshot-tint: rgba(39, 93, 163, 0.1);
}

.crm-workspace-snapshot__card--payment {
  --crm-snapshot-accent: #218a56;
  --crm-snapshot-tint: rgba(33, 138, 86, 0.1);
}

.crm-workspace-snapshot__card--shipping {
  --crm-snapshot-accent: #16839a;
  --crm-snapshot-tint: rgba(22, 131, 154, 0.1);
}

.crm-workspace-snapshot__card--focus {
  --crm-snapshot-accent: #9a6b15;
  --crm-snapshot-tint: rgba(154, 107, 21, 0.1);
}

.crm-workspace-snapshot__head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.crm-workspace-snapshot__icon {
  width: 2.05rem;
  height: 2.05rem;
  border-radius: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--crm-snapshot-accent) 12%, #fff);
  color: var(--crm-snapshot-accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--crm-snapshot-accent) 14%, transparent);
}

.crm-workspace-snapshot__icon .icon {
  width: 1rem;
  height: 1rem;
  stroke-width: 2;
}

.crm-workspace-snapshot__eyebrow {
  color: var(--crm-snapshot-accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.crm-workspace-snapshot__value,
.crm-workspace-snapshot__meta,
.crm-workspace-snapshot__hint {
  display: block;
}

.crm-workspace-snapshot__value {
  margin-top: 0.7rem;
  color: #10233d;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.45;
}

.crm-workspace-snapshot__meta {
  margin-top: 0.32rem;
  color: #526477;
  font-size: 0.8rem;
  line-height: 1.55;
}

.crm-workspace-snapshot__hint {
  margin-top: 0.35rem;
  color: #7b8794;
  font-size: 0.77rem;
  line-height: 1.58;
}

.crm-quick-action-card {
  padding: 1rem 1.05rem;
  border: 1px solid rgba(206, 216, 227, 0.92);
  border-radius: 1.15rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98)),
    linear-gradient(135deg, rgba(23, 58, 99, 0.05), rgba(201, 154, 45, 0.09));
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

.crm-quick-action-card__copy {
  margin: 0.85rem 0 0;
  color: var(--tblr-body-color);
  font-size: 0.92rem;
  line-height: 1.6;
}

.crm-case-order-lines {
  display: grid;
  gap: 0.7rem;
}

.crm-case-order-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(206, 216, 227, 0.9);
  border-radius: 0.95rem;
  background: rgba(248, 250, 252, 0.75);
}

.crm-case-order-line strong,
.crm-case-order-line small,
.crm-case-order-line span {
  display: block;
}

.crm-case-order-line small {
  margin-top: 0.18rem;
  color: var(--tblr-muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.crm-case-order-line span {
  color: #173a63;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.crm-case-timeline {
  display: grid;
  gap: 0.85rem;
}

.crm-case-timeline__item {
  padding: 0.95rem 1rem;
  border: 1px solid rgba(206, 216, 227, 0.92);
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94));
}

.crm-case-timeline__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.crm-case-timeline__item p {
  margin: 0;
  color: var(--tblr-body-color);
  font-size: 0.92rem;
  line-height: 1.6;
}

.crm-case-timeline__item small {
  display: block;
  margin-top: 0.55rem;
  color: var(--tblr-muted);
  font-size: 0.8rem;
}

.crm-quick-drawer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  justify-content: flex-end;
}

.crm-quick-drawer[hidden] {
  display: none !important;
}

.crm-quick-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(4px);
}

.crm-quick-drawer__dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(520px, 100%);
  height: 100%;
  background: #fff;
  box-shadow: -18px 0 36px rgba(15, 23, 42, 0.22);
}

.crm-quick-drawer__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.82rem;
  padding: 1rem 1rem 0.88rem;
  border-bottom: 1px solid rgba(206, 216, 227, 0.9);
}

.crm-quick-drawer__title {
  margin: 0.55rem 0 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--tblr-body-color);
}

.crm-quick-drawer__subtitle {
  margin: 0.4rem 0 0;
  color: var(--tblr-muted);
  font-size: 0.8rem;
  line-height: 1.48;
}

.crm-quick-drawer__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.3rem;
  height: 2.3rem;
  border: 1px solid rgba(206, 216, 227, 0.95);
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: 1.2rem;
  line-height: 1;
}

.crm-quick-drawer__form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.crm-quick-drawer__body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 1rem;
}

.crm-quick-drawer__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.9rem 1rem calc(0.9rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(206, 216, 227, 0.9);
  background: rgba(248, 250, 252, 0.94);
}

.crm-sticky-action-bar {
  position: fixed;
  left: 0.85rem;
  right: 0.85rem;
  bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
  z-index: 34;
  pointer-events: none;
}

.crm-sticky-action-bar__inner {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.82rem 0.9rem;
  border: 1px solid rgba(206, 216, 227, 0.92);
  border-radius: 1.02rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(248, 250, 252, 0.97)),
    linear-gradient(135deg, rgba(23, 58, 99, 0.09), rgba(201, 154, 45, 0.09));
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.14);
}

.crm-sticky-action-bar__copy {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.crm-sticky-action-bar__copy strong {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--tblr-body-color);
}

.crm-sticky-action-bar__copy small {
  color: var(--tblr-muted);
  font-size: 0.74rem;
  line-height: 1.4;
}

.crm-sticky-action-bar__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

body.crm-has-sticky-actions {
  padding-bottom: 8rem;
}

body.crm-quick-drawer-open {
  overflow: hidden;
}

.crm-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.crm-hero-actions > .btn {
  min-width: 0;
}

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

.crm-hero-metric-card {
  display: grid;
  gap: 0.2rem;
  padding: 0.72rem 0.8rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(203, 213, 225, 0.78);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.05);
}

.crm-hero-metric-card span {
  color: #6d7d90;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.35;
}

.crm-hero-metric-card strong {
  color: #11263f;
  font-size: 1.25rem;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.crm-hero-metric-card small {
  color: #5d6d80;
  font-size: 0.75rem;
  line-height: 1.45;
}

.crm-inline-chips--hero .crm-chip {
  min-width: 0;
}

.crm-summary-grid {
  display: grid;
  gap: 0.85rem;
}

.crm-soft-panel {
  border: 1px solid var(--tblr-border-color);
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(250, 252, 255, 0.92));
  padding: 0.88rem 0.9rem 0.94rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.crm-soft-panel-contrast {
  background:
    linear-gradient(135deg, rgba(23, 58, 99, 0.96), rgba(36, 77, 131, 0.92)),
    var(--tblr-primary);
  border-color: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.crm-soft-panel-contrast h4,
.crm-soft-panel-contrast p {
  color: inherit;
}

.crm-soft-panel h4,
.crm-soft-panel h3 {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
}

.crm-soft-panel p:last-child {
  margin-bottom: 0;
}

.crm-hero-side--staff .crm-soft-panel {
  min-height: 0;
}

.crm-soft-panel.d-block:hover {
  transform: translateY(-2px);
  box-shadow: var(--kg-shadow-sm);
}

.crm-owner-command-card .card-body {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.crm-owner-command-card__eyebrow {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7d6320;
}

.crm-owner-command-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
}

.crm-owner-command-card__title {
  margin: 0;
  font-size: 1.08rem;
}

.crm-owner-command-card__copy {
  margin: 0.38rem 0 0;
  color: var(--tblr-muted);
  line-height: 1.6;
}

.crm-owner-command-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.85rem;
  height: 2.85rem;
  border-radius: 1rem;
  color: var(--tblr-primary);
  background: rgba(47, 94, 165, 0.1);
  flex: 0 0 auto;
}

.crm-owner-command-card__value {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.crm-owner-command-card__value strong {
  font-size: clamp(1.65rem, 1.2vw + 1rem, 2.35rem);
  line-height: 1;
  letter-spacing: -0.05em;
  color: #10233d;
}

.crm-owner-command-card__value span {
  font-size: 0.82rem;
  color: #5f6f83;
  font-weight: 700;
}

.crm-owner-command-card__value--text strong {
  font-size: clamp(1.2rem, 0.9vw + 0.95rem, 1.55rem);
  letter-spacing: -0.03em;
}

.crm-owner-command-card__meta {
  color: #617285;
  font-size: 0.83rem;
  line-height: 1.55;
}

.crm-owner-command-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: auto;
}

.crm-dashboard-inline-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.crm-dashboard-inline-stat {
  display: grid;
  gap: 0.18rem;
  padding: 0.72rem 0.8rem;
  border-radius: 0.95rem;
  border: 1px solid rgba(206, 216, 227, 0.92);
  background: rgba(255, 255, 255, 0.94);
}

.crm-dashboard-inline-stat span {
  color: #66778a;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.35;
}

.crm-dashboard-inline-stat strong {
  color: #10233d;
  font-size: 1rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.crm-owner-command-card--primary .crm-dashboard-inline-stat {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.1);
}

.crm-owner-command-card--primary .crm-dashboard-inline-stat span,
.crm-owner-command-card--primary .crm-dashboard-inline-stat strong {
  color: #fff;
}

.crm-owner-command-card--primary {
  background:
    linear-gradient(135deg, rgba(18, 43, 75, 0.98), rgba(32, 78, 128, 0.94)),
    var(--tblr-primary);
  border-color: rgba(255, 255, 255, 0.08);
}

.crm-owner-command-card--primary .crm-owner-command-card__eyebrow,
.crm-owner-command-card--primary .crm-owner-command-card__title,
.crm-owner-command-card--primary .crm-owner-command-card__copy,
.crm-owner-command-card--primary .crm-owner-command-card__meta,
.crm-owner-command-card--primary .crm-owner-command-card__value strong,
.crm-owner-command-card--primary .crm-owner-command-card__value span {
  color: #fff;
}

.crm-owner-command-card--primary .crm-owner-command-card__icon {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.crm-owner-detail-disclosure {
  display: block;
}

.crm-owner-detail-disclosure__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  cursor: pointer;
  list-style: none;
}

.crm-owner-detail-disclosure__summary::-webkit-details-marker {
  display: none;
}

.crm-owner-detail-disclosure__copy {
  display: block;
}

.crm-owner-detail-disclosure__copy strong {
  display: block;
  font-size: 1rem;
  color: #10233d;
}

.crm-owner-detail-disclosure__copy small {
  display: block;
  margin-top: 0.28rem;
  color: #5f6f83;
  line-height: 1.55;
}

.crm-owner-detail-disclosure__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  color: #173a63;
  background: rgba(23, 58, 99, 0.08);
  flex: 0 0 auto;
  transition: transform 0.18s ease, background 0.18s ease;
}

.crm-owner-detail-disclosure[open] .crm-owner-detail-disclosure__icon {
  transform: rotate(180deg);
  background: rgba(23, 58, 99, 0.14);
}

.crm-owner-detail-disclosure__body {
  padding: 0 1.25rem 1.25rem;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.crm-profile-hero {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.crm-profile-avatar {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, var(--tblr-primary), #224e85);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.05rem;
  flex: 0 0 auto;
}

.crm-profile-copy h3 {
  margin: 0;
  font-size: 1.05rem;
}

.crm-profile-copy p {
  margin: 0.3rem 0 0;
  color: var(--tblr-muted);
}

.crm-inline-list,
.crm-link-list,
.crm-action-row,
.crm-inline-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.crm-meta-list {
  display: grid;
  gap: 0.85rem;
}

.crm-meta-item span {
  display: block;
  font-size: 0.78rem;
  color: var(--tblr-muted);
}

.crm-meta-item strong {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.95rem;
}

.crm-meta-item--stacked {
  align-items: flex-start;
}

.crm-inline-proof-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  width: 100%;
  margin-top: 0.65rem;
}

.crm-inline-proof-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 1px solid rgba(206, 216, 227, 0.95);
  border-radius: 0.95rem;
  overflow: hidden;
  background: linear-gradient(180deg, #f8fafc, #eef3f8);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  cursor: zoom-in;
}

.crm-inline-proof-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.crm-inline-proof-badge {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.24);
}

.crm-inline-proof-badge .icon {
  width: 1rem;
  height: 1rem;
}

.crm-inline-proof-thumb--file {
  display: grid;
  place-items: center;
  gap: 0.35rem;
  padding: 0.7rem;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  color: var(--tblr-primary);
}

.crm-inline-proof-file {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  background: rgba(41, 98, 255, 0.1);
}

.crm-inline-proof-file .icon {
  width: 1.05rem;
  height: 1.05rem;
}

.crm-inline-proof-thumb--file small {
  display: -webkit-box;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--tblr-body-color);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.crm-table-card .table-responsive {
  overflow-x: auto;
  border-radius: 0 0 var(--kg-radius-card) var(--kg-radius-card);
}

.crm-orders-table-scroll {
  max-height: none;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-gutter: auto;
}

.crm-table-card .table {
  margin-bottom: 0;
}

.crm-table-card .table thead th {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(222, 232, 240, 0.92);
  background: rgba(248, 250, 252, 0.86);
  color: #718092;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.crm-table-card .table tbody td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  vertical-align: top;
}

.crm-table-card .table tbody tr:last-child td {
  border-bottom: 0;
}

.crm-table-card .table tbody tr:hover td {
  background: rgba(23, 58, 99, 0.028);
}

.crm-page-management-row--inactive > td {
  background: rgba(148, 163, 184, 0.11);
  color: #64748b;
}

.crm-page-management-row--inactive .crm-table-primary,
.crm-page-management-row--inactive .crm-table-secondary {
  color: #64748b;
}

.crm-page-management-row--inactive:hover > td {
  background: rgba(148, 163, 184, 0.18);
}

.crm-stack {
  display: grid;
  gap: 0.22rem;
}

.crm-table-primary {
  color: var(--tblr-body-color);
  font-weight: 700;
}

.crm-table-primary-button {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.crm-table-primary-button:hover,
.crm-table-primary-button:focus-visible {
  color: #1f5f98;
  text-decoration: underline;
  text-underline-offset: 0.12rem;
}

.crm-order-id-inline {
  color: #94a3b8;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.2;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.crm-order-id-inline__label {
  font-size: 0.7em;
}

.crm-order-id-inline__value {
  font-size: 1.28em;
  font-weight: 700;
}

.crm-order-id-inline:hover,
.crm-order-id-inline:focus-visible {
  color: #64748b;
  text-decoration: underline;
  text-underline-offset: 0.1rem;
}

.crm-order-id-inline--warehouse {
  color: #7c8aa5;
}

.crm-order-id-inline--copy {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  gap: 0.18rem;
  align-items: center;
  margin: 0;
  padding: 0;
  text-align: left;
}

.crm-order-id-inline__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.crm-order-id-inline__icon .icon {
  width: 0.78rem;
  height: 0.78rem;
  stroke-width: 2;
}

.crm-order-id-inline--copy:disabled {
  cursor: wait;
  opacity: 0.78;
}

.crm-order-id-inline--warehouse .crm-order-id-inline__value {
  font-size: 1.1em;
  font-weight: 650;
}

.crm-table-secondary {
  color: var(--tblr-muted);
  font-size: 0.8rem;
}

.crm-orders-table {
  --crm-orders-sticky-col-1: 8.8rem;
  --crm-orders-sticky-col-2: 16rem;
  --crm-orders-sticky-col-3: 10.75rem;
  --crm-orders-sticky-head-bg: #f8fafc;
  --crm-orders-sticky-cell-bg: #ffffff;
  --crm-orders-sticky-hover-bg: #f3f7fb;
  min-width: 77rem;
  font-size: 0.8rem;
}

.crm-orders-table tbody tr.crm-orders-row--cancelled {
  --crm-orders-sticky-cell-bg: #fff5f5;
  --crm-orders-sticky-hover-bg: #ffebeb;
}

.crm-orders-table tbody tr.crm-orders-row--completed {
  --crm-orders-sticky-cell-bg: #f2fbf5;
  --crm-orders-sticky-hover-bg: #e7f8ed;
}

.crm-orders-table tbody tr.crm-orders-row--cancelled > td {
  background: #fff5f5;
}

.crm-orders-table tbody tr.crm-orders-row--completed > td {
  background: #f2fbf5;
}

.crm-orders-table tbody tr.crm-orders-row--cancelled:hover > td {
  background: #ffebeb;
}

.crm-orders-table tbody tr.crm-orders-row--completed:hover > td {
  background: #e7f8ed;
}

.crm-orders-filter-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
}

.crm-orders-filter-mobile-bar {
  display: none;
}

.crm-orders-filter-grid__advanced {
  display: contents;
}

.crm-orders-filter-grid__item {
  min-width: 0;
}

.crm-orders-filter-grid__item .form-control,
.crm-orders-filter-grid__item .form-select,
.crm-orders-filter-grid__item .crm-searchable-select,
.crm-orders-filter-grid__item .crm-searchable-input {
  width: 100%;
}

.crm-orders-filter-grid__select--current-user,
.crm-orders-filter-grid__item--current-user .crm-searchable-input,
.crm-orders-filter-grid__item--current-user .crm-searchable-select {
  border-color: rgba(59, 130, 246, 0.5);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.98) 0%, rgba(248, 251, 255, 0.98) 100%);
  color: #1e3a8a;
  box-shadow:
    0 0 0 0.22rem rgba(59, 130, 246, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.crm-orders-filter-grid__select--current-user:focus,
.crm-orders-filter-grid__item--current-user .crm-searchable-input:focus,
.crm-orders-filter-grid__item--current-user .crm-searchable-select:focus {
  border-color: rgba(37, 99, 235, 0.58);
  box-shadow:
    0 0 0 0.26rem rgba(37, 99, 235, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

@media (max-width: 767.98px) {
  .crm-orders-filter-mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
  }

  .crm-orders-filter-mobile-bar__title-wrap {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
  }

  .crm-orders-filter-mobile-bar__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #24324a;
  }

  .crm-orders-filter-mobile-bar__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.45rem;
    height: 1.45rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
    font-size: 0.72rem;
    font-weight: 700;
  }

  .crm-orders-filter-mobile-bar .btn {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .crm-orders-filter-mobile-bar .btn .icon {
    transition: transform 0.18s ease;
  }

  .crm-orders-filter-mobile-bar .btn[aria-expanded="true"] .icon {
    transform: rotate(180deg);
  }

  .crm-orders-filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem 0.5rem;
    align-items: start;
  }

  .crm-orders-filter-grid__item--search {
    grid-column: 1 / -1;
  }

  .crm-orders-filter-grid__item .form-label {
    margin-bottom: 0.32rem;
    font-size: 0.73rem;
    line-height: 1.16;
  }

  .crm-orders-filter-grid__item .form-control,
  .crm-orders-filter-grid__item .form-select,
  .crm-orders-filter-grid__item .crm-searchable-input {
    min-height: 2.65rem;
    font-size: 0.82rem;
  }

  .crm-filter-card.is-mobile-collapsed [data-orders-filter-advanced],
  .crm-filter-card.is-mobile-collapsed [data-orders-filter-footer] {
    display: none;
  }

  .crm-filter-card.is-mobile-collapsed .card-body {
    padding-bottom: 1rem;
  }
}

@media (min-width: 768px) {
  .crm-orders-filter-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .crm-orders-filter-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 1400px) {
  .crm-orders-filter-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.crm-orders-table thead th {
  position: sticky;
  top: 0;
  z-index: 8;
  background: #f8fafc;
  background-image: none;
  background-clip: padding-box;
  font-size: 0.75rem;
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
  box-shadow: inset 0 -1px 0 rgba(222, 232, 240, 0.95);
}

.crm-orders-table tbody td {
  padding-top: 0.95rem;
  padding-bottom: 0.95rem;
}

.crm-orders-table .crm-table-primary,
.crm-orders-table .crm-order-item-line,
.crm-orders-table .crm-order-quantity-pill,
.crm-orders-table .crm-status-text {
  font-size: 0.82rem;
}

.crm-orders-table .crm-order-party-name {
  font-size: 0.86rem;
}

.crm-orders-table .crm-order-party-code {
  font-size: 0.72rem;
}

.crm-orders-table .crm-order-party-meta {
  font-size: 0.75rem;
}

.crm-orders-table .crm-country-flag {
  font-size: 0.92rem;
}

.crm-orders-table .crm-order-type-label {
  font-size: 0.79rem;
}

.crm-action-row--icon-only {
  gap: 0.4rem;
}

.crm-action-row--icon-only > * {
  flex: 0 0 auto;
}

.crm-order-row-actions {
  flex-wrap: nowrap;
}

.crm-order-row-actions > * {
  flex: 0 0 auto !important;
}

.crm-icon-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0;
}

.crm-icon-action .icon {
  margin: 0;
}

.crm-order-party-card {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  padding: 0.15rem 0;
}

.crm-order-party-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.32rem;
}

.crm-order-party-name {
  color: var(--tblr-body-color);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.25;
}

.crm-order-party-name-link {
  color: inherit;
  text-decoration: none;
}

.crm-order-party-name-link:hover,
.crm-order-party-name-link:focus-visible {
  color: #1f5f98;
  text-decoration: underline;
  text-underline-offset: 0.12rem;
}

.crm-order-party-code {
  color: var(--tblr-muted);
  font-size: 0.77rem;
  font-weight: 600;
  line-height: 1.2;
}

.crm-order-party-code-button {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 0.12rem;
  cursor: pointer;
}

.crm-order-party-code-button:hover,
.crm-order-party-code-button:focus-visible {
  color: #2b5c96;
}

.crm-order-party-meta {
  color: var(--tblr-muted);
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.25;
}

.crm-order-party-meta-button {
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
  transition: color 0.16s ease;
}

.crm-order-party-meta-button:hover,
.crm-order-party-meta-button:focus-visible {
  color: #173a63;
  text-decoration: underline;
  text-underline-offset: 0.14rem;
}

.crm-country-flag {
  font-size: 1rem;
  line-height: 1;
}

.crm-order-item-list {
  gap: 0.3rem;
}

.crm-order-quantity-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.38rem;
}

.crm-order-quantity-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 2.2rem;
  padding: 0.34rem 0.88rem;
  border: 1px solid rgba(195, 209, 226, 0.96);
  border-radius: 999px;
  background: #ffffff;
  color: #63748c;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.28;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 6px 18px rgba(148, 163, 184, 0.08);
}

.crm-order-quantity-pill--gift {
  color: #a75a00;
  border-color: rgba(240, 191, 120, 0.95);
  background: linear-gradient(180deg, rgba(255, 251, 245, 0.98), rgba(255, 245, 231, 0.98));
}

.crm-orders-table th:nth-child(6),
.crm-orders-table td.crm-order-items-cell {
  width: 26rem;
  min-width: 26rem;
  max-width: 26rem;
}

.crm-orders-table th:nth-child(8),
.crm-orders-table td.crm-order-quantity-cell {
  width: 12rem;
  min-width: 12rem;
  max-width: 12rem;
}

.crm-orders-table th:nth-child(1),
.crm-orders-table tbody tr:not(.crm-mobile-card-table__empty) > td:nth-child(1) {
  width: var(--crm-orders-sticky-col-1);
  min-width: var(--crm-orders-sticky-col-1);
  max-width: var(--crm-orders-sticky-col-1);
}

.crm-orders-table th:nth-child(5),
.crm-orders-table tbody tr:not(.crm-mobile-card-table__empty) > td:nth-child(5) {
  width: 14rem;
  min-width: 14rem;
  max-width: 14rem;
}

.crm-orders-table__center .crm-stack {
  justify-items: center;
}

.crm-orders-table__status-cell .crm-stack {
  justify-items: end;
}

.crm-order-row-actions--center {
  justify-content: center;
}

.crm-orders-table--v2 {
  --crm-orders-sticky-col-1: 7.4rem;
  --crm-orders-sticky-col-2: 8.75rem;
  --crm-orders-sticky-col-3: 15.5rem;
  min-width: 240rem;
}

.crm-orders-table--v2 th:not(:nth-child(-n+3)),
.crm-orders-table--v2 tbody td:not(:nth-child(-n+3)) {
  min-width: 8.25rem;
  max-width: 10.5rem;
}

.crm-orders-table--v2 th:nth-child(4),
.crm-orders-table--v2 td:nth-child(4),
.crm-orders-table--v2 th:nth-child(7),
.crm-orders-table--v2 td:nth-child(7),
.crm-orders-table--v2 th:nth-child(12),
.crm-orders-table--v2 td.crm-order-items-cell--v2,
.crm-orders-table--v2 th:nth-child(13),
.crm-orders-table--v2 td:nth-child(13),
.crm-orders-table--v2 th:nth-child(36),
.crm-orders-table--v2 td:nth-child(36) {
  max-width: none;
}

.crm-orders-table--v2 th:nth-child(4),
.crm-orders-table--v2 td:nth-child(4) {
  width: 11rem;
  min-width: 11rem;
}

.crm-orders-table--v2 th:nth-child(7),
.crm-orders-table--v2 td:nth-child(7) {
  width: 18rem;
  min-width: 18rem;
}

.crm-orders-table--v2 th:nth-child(12),
.crm-orders-table--v2 td.crm-order-items-cell--v2 {
  width: 17rem;
  min-width: 17rem;
}

.crm-orders-table--v2 th:nth-child(13),
.crm-orders-table--v2 td:nth-child(13) {
  width: 13.5rem;
  min-width: 13.5rem;
}

.crm-orders-table--v2 th:nth-child(25),
.crm-orders-table--v2 td:nth-child(25),
.crm-orders-table--v2 th:nth-child(28),
.crm-orders-table--v2 td:nth-child(28),
.crm-orders-table--v2 th:nth-child(36),
.crm-orders-table--v2 td:nth-child(36) {
  width: 11rem;
  min-width: 11rem;
}

.crm-orders-table--v2 .crm-table-secondary {
  font-size: 0.72rem;
  line-height: 1.35;
}

.crm-orders-table--v2 .crm-orders-created-by-secondary {
  font-size: 0.36rem;
  line-height: 1.15;
}

.crm-orders-table--v2 .crm-orders-created-by-secondary--sheet-sync {
  font-size: 0.16rem;
  line-height: 1;
  letter-spacing: -0.01em;
}

.crm-orders-table--v2 .crm-orders-number {
  font-variant-numeric: tabular-nums;
}

.crm-orders-table--v2 .crm-status-inline--v2 {
  justify-content: center;
}

.crm-orders-profit-positive {
  color: #22863a;
}

.crm-orders-profit-negative {
  color: #c2410c;
}

@media (min-width: 992px) {
  .crm-orders-table thead th:nth-child(1) {
    position: sticky;
    top: 0;
    left: 0;
    width: var(--crm-orders-sticky-col-1);
    min-width: var(--crm-orders-sticky-col-1);
    max-width: var(--crm-orders-sticky-col-1);
  }

  .crm-orders-table tbody tr:not(.crm-mobile-card-table__empty) > td:nth-child(1) {
    position: sticky;
    left: 0;
    width: var(--crm-orders-sticky-col-1);
    min-width: var(--crm-orders-sticky-col-1);
    max-width: var(--crm-orders-sticky-col-1);
  }

  .crm-orders-table thead th:nth-child(2) {
    position: sticky;
    top: 0;
    left: var(--crm-orders-sticky-col-1);
    width: var(--crm-orders-sticky-col-2);
    min-width: var(--crm-orders-sticky-col-2);
    max-width: var(--crm-orders-sticky-col-2);
  }

  .crm-orders-table tbody tr:not(.crm-mobile-card-table__empty) > td:nth-child(2) {
    position: sticky;
    left: var(--crm-orders-sticky-col-1);
    width: var(--crm-orders-sticky-col-2);
    min-width: var(--crm-orders-sticky-col-2);
    max-width: var(--crm-orders-sticky-col-2);
  }

  .crm-orders-table thead th:nth-child(3) {
    position: sticky;
    top: 0;
    left: calc(var(--crm-orders-sticky-col-1) + var(--crm-orders-sticky-col-2));
    width: var(--crm-orders-sticky-col-3);
    min-width: var(--crm-orders-sticky-col-3);
    max-width: var(--crm-orders-sticky-col-3);
    box-shadow: 10px 0 18px -18px rgba(15, 23, 42, 0.42);
  }

  .crm-orders-table tbody tr:not(.crm-mobile-card-table__empty) > td:nth-child(3) {
    position: sticky;
    left: calc(var(--crm-orders-sticky-col-1) + var(--crm-orders-sticky-col-2));
    width: var(--crm-orders-sticky-col-3);
    min-width: var(--crm-orders-sticky-col-3);
    max-width: var(--crm-orders-sticky-col-3);
    box-shadow: 10px 0 18px -18px rgba(15, 23, 42, 0.42);
  }

  .crm-orders-table thead th:nth-child(-n+3) {
    z-index: 9;
    background: var(--crm-orders-sticky-head-bg);
    background-image: none;
    background-clip: padding-box;
  }

  .crm-orders-table thead th:nth-child(1) {
    z-index: 12;
  }

  .crm-orders-table thead th:nth-child(2) {
    z-index: 11;
  }

  .crm-orders-table thead th:nth-child(3) {
    z-index: 10;
  }

  .crm-orders-table tbody tr:not(.crm-mobile-card-table__empty) > td:nth-child(-n+3) {
    background: var(--crm-orders-sticky-cell-bg);
    background-image: none;
    background-clip: padding-box;
    z-index: 2;
  }

  .crm-orders-table tbody tr:hover > td:nth-child(-n+3) {
    background: var(--crm-orders-sticky-hover-bg);
    background-image: none;
  }

  .crm-orders-table tbody tr:not(.crm-mobile-card-table__empty) > td:nth-child(1) {
    z-index: 5;
  }

  .crm-orders-table tbody tr:not(.crm-mobile-card-table__empty) > td:nth-child(2) {
    z-index: 4;
  }

  .crm-orders-table tbody tr:not(.crm-mobile-card-table__empty) > td:nth-child(3) {
    z-index: 3;
  }
}

@media (max-width: 991.98px) {
  .crm-orders-table-scroll {
    max-height: none;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
  }

}

.crm-order-item-list--single .crm-order-item-line {
  white-space: nowrap;
}

.crm-order-item-line {
  display: block;
  color: var(--tblr-body-color);
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.crm-order-item-line-button {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
  transition: color 0.16s ease;
}

.crm-order-item-line-button:hover,
.crm-order-item-line-button:focus-visible {
  color: #173a63;
  text-decoration: underline;
  text-underline-offset: 0.14rem;
}

.crm-order-item-line--gift {
  color: #b45309;
}

.crm-order-type-label {
  display: inline-flex;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1.2;
}

a.crm-order-type-label {
  text-decoration: none;
}

a.crm-order-type-label:hover,
a.crm-order-type-label:focus-visible {
  text-decoration: none;
}

.crm-order-type-label--new {
  color: #0f6fd6;
}

.crm-order-type-label--reorder {
  color: #22863a;
}

.crm-order-type-label--refer {
  color: #d63384;
}

.crm-order-type-label--default {
  color: var(--tblr-muted);
}

a.crm-order-type-label--new,
a.crm-order-type-label--new:visited {
  color: #0f6fd6;
}

a.crm-order-type-label--reorder,
a.crm-order-type-label--reorder:visited {
  color: #22863a;
}

a.crm-order-type-label--refer,
a.crm-order-type-label--refer:visited {
  color: #d63384;
}

a.crm-order-type-label--default,
a.crm-order-type-label--default:visited {
  color: var(--tblr-muted);
}

.crm-track-button {
  width: fit-content;
  margin-top: 0.2rem;
  gap: 0.35rem;
}

.crm-chat-button {
  width: fit-content;
  margin-top: 0.2rem;
  gap: 0.35rem;
}

.crm-track-button .icon {
  width: 0.95rem;
  height: 0.95rem;
}

.crm-chat-button .icon {
  width: 0.95rem;
  height: 0.95rem;
}

.crm-note-box {
  min-height: 100%;
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 1rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.88)),
    #fff;
}

.crm-note-box span {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--tblr-muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.crm-note-box p {
  margin: 0;
  color: var(--tblr-body-color);
  line-height: 1.7;
}

.crm-note-important {
  border-color: rgba(201, 154, 45, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 250, 232, 0.82), rgba(255, 255, 255, 0.96)),
    #fff;
}

.crm-attachment-preview {
  overflow: hidden;
  display: grid;
  place-items: center;
  min-height: 24rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 1.25rem;
  background:
    linear-gradient(135deg, rgba(23, 58, 99, 0.06), rgba(201, 154, 45, 0.08)),
    #f8fafc;
}

.crm-attachment-preview img {
  display: block;
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
}

.crm-attachment-preview--mini {
  min-height: 11rem;
}

.crm-aside-card .card-body,
.crm-attachment-aside-card .card-body {
  display: grid;
  gap: 1rem;
}

.crm-file-surface {
  display: block;
  width: 100%;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.92));
  color: #1e293b;
  font-family: var(--tblr-font-monospace);
  font-size: 0.78rem;
  line-height: 1.6;
  word-break: break-word;
}

.crm-attachment-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.crm-attachment-preview-actions .btn {
  flex: 1 1 12rem;
  justify-content: center;
}

.crm-payment-slip-upload,
.crm-payment-slip-list {
  padding: 1rem;
  border: 1px solid rgba(206, 216, 227, 0.8);
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.88));
}

.crm-attachment-zone {
  --crm-attachment-accent: rgba(var(--tblr-primary-rgb), 1);
  --crm-attachment-soft: rgba(var(--tblr-primary-rgb), 0.08);
  --crm-attachment-stroke: rgba(var(--tblr-primary-rgb), 0.16);
  position: relative;
  border-color: var(--crm-attachment-stroke);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.92)),
    linear-gradient(135deg, var(--crm-attachment-soft), rgba(255, 255, 255, 0));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.crm-attachment-zone::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 0.28rem;
  border-radius: 1rem 0 0 1rem;
  background: var(--crm-attachment-accent);
  opacity: 0.9;
}

.crm-attachment-zone--payment {
  --crm-attachment-accent: rgba(22, 101, 52, 1);
  --crm-attachment-soft: rgba(22, 163, 74, 0.08);
  --crm-attachment-stroke: rgba(22, 163, 74, 0.17);
}

.crm-attachment-zone--shipping {
  --crm-attachment-accent: rgba(3, 105, 161, 1);
  --crm-attachment-soft: rgba(14, 165, 233, 0.08);
  --crm-attachment-stroke: rgba(14, 165, 233, 0.18);
}

.crm-attachment-zone--return {
  --crm-attachment-accent: rgba(146, 64, 14, 1);
  --crm-attachment-soft: rgba(249, 115, 22, 0.08);
  --crm-attachment-stroke: rgba(249, 115, 22, 0.18);
}

.crm-attachment-zone--received {
  --crm-attachment-accent: rgba(67, 56, 202, 1);
  --crm-attachment-soft: rgba(99, 102, 241, 0.08);
  --crm-attachment-stroke: rgba(99, 102, 241, 0.18);
}

.crm-attachment-zone--other {
  --crm-attachment-accent: rgba(71, 85, 105, 1);
  --crm-attachment-soft: rgba(100, 116, 139, 0.08);
  --crm-attachment-stroke: rgba(100, 116, 139, 0.18);
}

.crm-attachment-cluster {
  --crm-attachment-accent: rgba(var(--tblr-primary-rgb), 1);
  --crm-attachment-soft: rgba(var(--tblr-primary-rgb), 0.08);
  --crm-attachment-stroke: rgba(var(--tblr-primary-rgb), 0.18);
  position: relative;
  padding: 1rem;
  border-radius: 1.25rem;
  border: 1px solid color-mix(in srgb, var(--crm-attachment-stroke) 82%, #dbe4ee);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.94)),
    linear-gradient(135deg, color-mix(in srgb, var(--crm-attachment-soft) 88%, #fff), rgba(255, 255, 255, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.crm-attachment-cluster::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: inherit;
  background: linear-gradient(180deg, var(--crm-attachment-accent), rgba(255, 255, 255, 0));
}

.crm-attachment-cluster > * + * {
  margin-top: 0.95rem;
}

.crm-attachment-cluster--payment {
  --crm-attachment-accent: rgba(22, 101, 52, 1);
  --crm-attachment-soft: rgba(22, 163, 74, 0.08);
  --crm-attachment-stroke: rgba(22, 163, 74, 0.17);
}

.crm-attachment-cluster--shipping {
  --crm-attachment-accent: rgba(3, 105, 161, 1);
  --crm-attachment-soft: rgba(14, 165, 233, 0.08);
  --crm-attachment-stroke: rgba(14, 165, 233, 0.18);
}

.crm-attachment-cluster--return {
  --crm-attachment-accent: rgba(146, 64, 14, 1);
  --crm-attachment-soft: rgba(249, 115, 22, 0.08);
  --crm-attachment-stroke: rgba(249, 115, 22, 0.18);
}

.crm-attachment-cluster--received {
  --crm-attachment-accent: rgba(67, 56, 202, 1);
  --crm-attachment-soft: rgba(99, 102, 241, 0.08);
  --crm-attachment-stroke: rgba(99, 102, 241, 0.18);
}

.crm-payment-slip-head {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.crm-attachment-zone__title {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  line-height: 1.35;
}

.crm-attachment-zone__icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: color-mix(in srgb, var(--crm-attachment-accent) 12%, #fff);
  color: var(--crm-attachment-accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--crm-attachment-accent) 14%, transparent);
}

.crm-attachment-zone__icon .icon {
  width: 1rem;
  height: 1rem;
  stroke-width: 2;
}

.crm-attachment-zone__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  margin-right: 0.45rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--crm-attachment-accent) 12%, #fff);
  color: var(--crm-attachment-accent);
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.2;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--crm-attachment-accent) 14%, transparent);
}

.crm-payment-slip-head h4 {
  margin: 0;
  color: var(--tblr-body-color);
  font-size: 0.98rem;
  font-weight: 800;
}

.crm-payment-slip-head p {
  margin: 0.35rem 0 0;
  color: var(--tblr-muted);
  font-size: 0.82rem;
}

.crm-attachment-zone__picker {
  margin-top: 0.2rem;
  padding: 0.95rem 1rem 1rem;
  border: 1px dashed color-mix(in srgb, var(--crm-attachment-accent) 30%, #dbe4ee);
  border-radius: 1rem;
  background: linear-gradient(180deg, color-mix(in srgb, var(--crm-attachment-soft) 50%, #fff), rgba(255, 255, 255, 0.97));
}

.crm-attachment-zone__guide {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.85rem 0.95rem;
  margin-bottom: 0.95rem;
  border-radius: 0.95rem;
  background: color-mix(in srgb, var(--crm-attachment-accent) 9%, #fff);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--crm-attachment-accent) 13%, transparent);
}

.crm-attachment-zone__guide-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.78rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: var(--crm-attachment-accent);
  color: #fff;
  box-shadow: 0 10px 22px color-mix(in srgb, var(--crm-attachment-accent) 20%, transparent);
}

.crm-attachment-zone__guide-icon .icon {
  width: 1.05rem;
  height: 1.05rem;
  stroke-width: 2.2;
}

.crm-attachment-zone__guide-copy {
  display: grid;
  gap: 0.18rem;
}

.crm-attachment-zone__guide-copy strong {
  color: var(--tblr-body-color);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.35;
}

.crm-attachment-zone__guide-copy small {
  color: var(--tblr-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.crm-attachment-zone--payment .crm-attachment-zone__guide {
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.12), rgba(255, 255, 255, 0.96));
}

.crm-attachment-zone--shipping .crm-attachment-zone__guide {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.14), rgba(255, 255, 255, 0.96));
}

.crm-attachment-zone--return .crm-attachment-zone__guide {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.14), rgba(255, 255, 255, 0.96));
}

.crm-attachment-zone--received .crm-attachment-zone__guide {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(255, 255, 255, 0.96));
}

.crm-attachment-zone__input {
  border-color: color-mix(in srgb, var(--crm-attachment-accent) 18%, #d9e1eb);
  background: rgba(255, 255, 255, 0.98);
}

.crm-attachment-zone .btn-primary {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--crm-attachment-accent) 92%, #0f172a),
    color-mix(in srgb, var(--crm-attachment-accent) 76%, #fff)
  );
  border-color: transparent;
  box-shadow: 0 14px 28px color-mix(in srgb, var(--crm-attachment-accent) 20%, transparent);
}

.crm-attachment-zone .btn-primary:hover,
.crm-attachment-zone .btn-primary:focus {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--crm-attachment-accent) 96%, #0f172a),
    color-mix(in srgb, var(--crm-attachment-accent) 82%, #fff)
  );
  border-color: transparent;
}

.crm-attachment-zone .btn-outline-primary {
  color: var(--crm-attachment-accent);
  border-color: color-mix(in srgb, var(--crm-attachment-accent) 22%, #d9e1eb);
  background: color-mix(in srgb, var(--crm-attachment-soft) 42%, #fff);
}

.crm-attachment-zone .btn-outline-primary:hover,
.crm-attachment-zone .btn-outline-primary:focus {
  color: #fff;
  border-color: transparent;
  background: var(--crm-attachment-accent);
}

.crm-pack-summary {
  border: 1px solid rgba(206, 216, 227, 0.92);
  border-radius: 1rem;
  padding: 1rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98)),
    linear-gradient(135deg, rgba(23, 58, 99, 0.05), rgba(22, 131, 154, 0.04));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.crm-pack-summary--readonly {
  margin-top: 1rem;
}

.crm-pack-summary__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 0.9rem;
}

.crm-pack-summary__head h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--tblr-body-color);
}

.crm-pack-summary__head p {
  margin: 0.25rem 0 0;
  font-size: 0.84rem;
  color: var(--tblr-muted);
}

.crm-pack-summary__totals {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}

.crm-pack-summary__metric {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(206, 216, 227, 0.95);
  background: rgba(255, 255, 255, 0.92);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--tblr-body-color);
}

.crm-pack-summary__lines {
  display: grid;
  gap: 0.7rem;
}

.crm-pack-summary__line {
  border: 1px solid rgba(220, 228, 237, 0.92);
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.92);
  padding: 0.8rem 0.9rem;
}

.crm-pack-summary__line-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.crm-pack-summary__line-head strong {
  font-size: 0.92rem;
  font-weight: 800;
}

.crm-pack-summary__line-head span {
  font-size: 0.8rem;
  color: var(--tblr-primary);
  font-weight: 700;
}

.crm-pack-summary__line-meta {
  margin-top: 0.3rem;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--tblr-muted);
}

.crm-pack-summary__empty {
  border: 1px dashed rgba(206, 216, 227, 0.95);
  border-radius: 0.95rem;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.8);
  color: var(--tblr-muted);
  text-align: center;
}

.crm-payment-slip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.9rem;
}

.crm-payment-slip-grid--two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.crm-payment-slip-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border: 1px solid rgba(206, 216, 227, 0.9);
  border-radius: 1rem;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.crm-payment-slip-card--image {
  appearance: none;
  padding: 0;
  width: 100%;
  text-align: left;
  cursor: zoom-in;
}

.crm-payment-slip-card--image:focus-visible {
  outline: 0;
  border-color: rgba(23, 58, 99, 0.38);
  box-shadow: 0 0 0 0.22rem rgba(var(--tblr-primary-rgb), 0.16);
}

.crm-payment-slip-card:hover {
  border-color: rgba(23, 58, 99, 0.32);
  box-shadow: var(--kg-shadow-sm);
  color: inherit;
  transform: translateY(-1px);
}

.crm-payment-slip-thumb,
.crm-payment-slip-file {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, rgba(23, 58, 99, 0.06), rgba(201, 154, 45, 0.1));
}

.crm-payment-slip-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.crm-payment-slip-file {
  gap: 0.35rem;
  color: var(--tblr-primary);
  font-weight: 800;
}

.crm-payment-slip-file .icon {
  width: 1.75rem;
  height: 1.75rem;
}

.crm-payment-slip-meta {
  display: grid;
  gap: 0.25rem;
  padding: 0.75rem;
}

.crm-payment-slip-meta strong {
  overflow: hidden;
  color: var(--tblr-body-color);
  font-size: 0.86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-payment-slip-grid--compact {
  gap: 0.75rem;
}

.crm-payment-slip-card--compact .crm-payment-slip-thumb,
.crm-payment-slip-card--compact .crm-payment-slip-file {
  aspect-ratio: 5 / 4;
}

.crm-payment-slip-card--compact .crm-payment-slip-meta {
  gap: 0.18rem;
  padding: 0.62rem 0.68rem 0.72rem;
}

.crm-payment-slip-card--compact .crm-payment-slip-meta strong {
  display: -webkit-box;
  overflow: hidden;
  min-height: 2.35em;
  white-space: normal;
  text-overflow: initial;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.crm-inline-proof-gallery--compact {
  grid-template-columns: repeat(auto-fill, minmax(6.25rem, 1fr));
  gap: 0.55rem;
}

.crm-inline-proof-gallery--dense {
  grid-template-columns: repeat(auto-fill, minmax(6.4rem, 1fr));
}

.crm-inline-proof-thumb--compact {
  aspect-ratio: 6 / 5;
  border-radius: 0.88rem;
}

.crm-proof-cluster {
  padding: 0.95rem;
  border-radius: 1.15rem;
  border: 1px solid rgba(186, 230, 253, 0.95);
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.09), rgba(255, 255, 255, 0.98)),
    #fff;
}

.crm-proof-cluster__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.75rem;
}

.crm-proof-cluster__head p {
  margin: 0.22rem 0 0;
  color: #5d6d80;
  font-size: 0.82rem;
}

.crm-proof-cluster__hint {
  margin-top: 0.72rem;
  color: #567088;
  font-size: 0.78rem;
  line-height: 1.5;
}

.crm-proof-cluster--received {
  border-color: rgba(129, 140, 248, 0.24);
  background:
    linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(255, 255, 255, 0.98)),
    #fff;
}

.crm-proof-cluster--received .crm-proof-cluster__hint {
  color: #5e67ae;
}

.crm-payment-slip-meta small,
.crm-payment-slip-empty {
  color: var(--tblr-muted);
  font-size: 0.8rem;
}

.crm-attachment-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.crm-attachment-overview__item {
  display: grid;
  gap: 0.16rem;
  padding: 0.82rem 0.9rem;
  border-radius: 1rem;
  border: 1px solid rgba(206, 216, 227, 0.92);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
}

.crm-attachment-overview__item span {
  color: #67778a;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.4;
}

.crm-attachment-overview__item strong {
  color: #11263f;
  font-size: 0.98rem;
  line-height: 1.2;
}

.crm-attachment-overview__item--payment {
  border-color: rgba(22, 163, 74, 0.2);
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.98), rgba(255, 255, 255, 0.98));
}

.crm-attachment-overview__item--shipping {
  border-color: rgba(14, 165, 233, 0.22);
  background: linear-gradient(180deg, rgba(240, 249, 255, 0.98), rgba(255, 255, 255, 0.98));
}

.crm-attachment-overview__item--received {
  border-color: rgba(99, 102, 241, 0.2);
  background: linear-gradient(180deg, rgba(238, 242, 255, 0.98), rgba(255, 255, 255, 0.98));
}

.crm-attachment-overview__item--other {
  border-color: rgba(148, 163, 184, 0.22);
}

.crm-attachment-gallery-panel {
  margin-top: 0.9rem;
  padding: 0.9rem;
  border: 1px solid rgba(206, 216, 227, 0.92);
  border-radius: 1.05rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98)),
    linear-gradient(135deg, rgba(23, 58, 99, 0.04), rgba(201, 154, 45, 0.06));
}

.crm-attachment-gallery-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.82rem;
}

.crm-attachment-gallery-panel__head strong,
.crm-attachment-gallery-panel__head small {
  display: block;
}

.crm-attachment-gallery-panel__head strong {
  color: #123052;
  font-size: 0.92rem;
  font-weight: 800;
}

.crm-attachment-gallery-panel__head small {
  margin-top: 0.18rem;
  color: #67778a;
  font-size: 0.78rem;
  line-height: 1.5;
}

.crm-attachment-gallery-panel__links {
  justify-content: flex-end;
}

.crm-attachment-reel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(7rem, 7.6rem);
  gap: 0.65rem;
  overflow-x: auto;
  padding-bottom: 0.12rem;
  scrollbar-width: none;
}

.crm-attachment-reel::-webkit-scrollbar {
  display: none;
}

.crm-inline-proof-thumb--reel {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 1rem;
}

.crm-inline-proof-zone {
  position: absolute;
  top: 0.45rem;
  left: 0.45rem;
  display: inline-flex;
  align-items: center;
  max-width: calc(100% - 1rem);
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1.2;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.18);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.crm-inline-proof-zone--payment {
  background: rgba(22, 101, 52, 0.86);
}

.crm-inline-proof-zone--shipping {
  background: rgba(3, 105, 161, 0.86);
}

.crm-inline-proof-zone--received {
  background: rgba(79, 70, 229, 0.84);
}

.crm-inline-proof-zone--other {
  background: rgba(71, 85, 105, 0.82);
}

.crm-attachment-gallery-panel__hint {
  margin-top: 0.75rem;
  color: #607286;
  font-size: 0.77rem;
  line-height: 1.52;
}

.crm-attachment-gallery-panel__empty {
  padding: 0.82rem 0.9rem;
  border: 1px dashed rgba(206, 216, 227, 0.94);
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.9);
  color: var(--tblr-muted);
  font-size: 0.8rem;
  line-height: 1.55;
  text-align: center;
}

.crm-image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 3300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.crm-image-lightbox[hidden] {
  display: none !important;
}

.crm-image-lightbox.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.crm-image-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(3px);
}

.crm-image-lightbox__dialog {
  position: relative;
  z-index: 1;
  width: min(96vw, 70rem);
  max-height: calc(100vh - 2.5rem);
  overflow: hidden;
  border-radius: 1.3rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.4);
}

.crm-image-lightbox__close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.68);
  color: #fff;
  line-height: 1;
  cursor: pointer;
}

.crm-image-lightbox__close .icon {
  width: 1.1rem;
  height: 1.1rem;
  stroke-width: 2.25;
}

.crm-image-lightbox__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.22);
  transform: translateY(-50%);
  transition: transform 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

.crm-image-lightbox__nav:hover:not(:disabled),
.crm-image-lightbox__nav:focus-visible:not(:disabled) {
  background: rgba(15, 23, 42, 0.86);
  transform: translateY(-50%) scale(1.02);
}

.crm-image-lightbox__nav:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.crm-image-lightbox__nav .icon {
  width: 1.2rem;
  height: 1.2rem;
  stroke-width: 2.25;
}

.crm-image-lightbox__nav--prev {
  left: 1rem;
}

.crm-image-lightbox__nav--next {
  right: 1rem;
}

.crm-image-lightbox__stage {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1.25rem 0.85rem;
  background: linear-gradient(180deg, rgba(241, 245, 249, 0.96), rgba(248, 250, 252, 1));
}

.crm-image-lightbox__stage img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 12rem);
  object-fit: contain;
  border-radius: 1rem;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
}

.crm-image-lightbox__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.95rem 1.2rem 1.15rem;
  border-top: 1px solid rgba(206, 216, 227, 0.7);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.crm-image-lightbox__content {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.crm-image-lightbox__meta-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 1.25rem;
}

.crm-image-lightbox__content .crm-image-lightbox__position {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 1.45rem;
  padding: 0.2rem 0.52rem;
  border-radius: 999px;
  background: rgba(23, 58, 99, 0.08);
  color: #173a63;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.crm-image-lightbox__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.6rem;
}

.crm-image-lightbox__customer-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  min-width: 0;
  max-width: min(100%, 18rem);
  padding: 0.32rem 0.55rem;
  border: 1px solid rgba(206, 216, 227, 0.88);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.96);
}

.crm-image-lightbox__customer-name {
  color: #475569;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.crm-image-lightbox__customer-copy {
  color: #7b8798;
  flex: 0 0 auto;
}

.crm-image-lightbox__customer-copy .icon {
  width: 0.86rem;
  height: 0.86rem;
}

.crm-image-lightbox__customer-copy:hover,
.crm-image-lightbox__customer-copy:focus-visible {
  color: #173a63;
}

.crm-image-lightbox__actions form {
  margin: 0;
}

.crm-image-lightbox__content strong,
.crm-image-lightbox__content span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-image-lightbox__content strong {
  color: var(--tblr-body-color);
  font-size: 0.95rem;
}

.crm-image-lightbox__content span {
  color: var(--tblr-muted);
  font-size: 0.82rem;
}

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

.crm-mobile-card-wrap {
  position: relative;
}

.crm-empty-cell,
.crm-empty-state {
  color: var(--tblr-muted);
  text-align: center;
}

.crm-empty-cell {
  padding: 1.35rem !important;
}

.crm-empty-state {
  padding: 1rem 0;
}

.crm-status-badge.badge,
.crm-tag-badge.badge,
.status-label,
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.4rem 0.68rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: #f8fafc;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
}

.crm-status-badge.status-success,
.status-success,
.tag-pill:not(.muted).highlight-success {
  background: rgba(47, 179, 68, 0.1);
  border-color: rgba(47, 179, 68, 0.18);
  color: #1c7c30;
}

.crm-status-badge.status-wait,
.crm-status-badge.status-warning,
.status-wait,
.status-warning {
  background: rgba(245, 159, 0, 0.12);
  border-color: rgba(245, 159, 0, 0.2);
  color: #9b6500;
}

.crm-status-badge.status-info,
.status-info {
  background: rgba(66, 153, 225, 0.12);
  border-color: rgba(66, 153, 225, 0.2);
  color: #1f5f98;
}

.crm-status-badge.status-failed,
.crm-status-badge.status-danger,
.status-failed,
.status-danger {
  background: rgba(214, 57, 57, 0.1);
  border-color: rgba(214, 57, 57, 0.16);
  color: #a92c2c;
}

.crm-status-text {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}

.crm-status-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.22rem;
  flex-wrap: nowrap;
}

.crm-orders-table__status-cell .crm-status-inline {
  justify-content: flex-end;
  width: 100%;
}

.crm-status-inline--with-secondary {
  align-items: flex-start;
}

.crm-status-summary {
  justify-items: center;
}

.crm-orders-table__status-cell .crm-status-summary {
  justify-items: end;
  text-align: right;
}

.crm-status-text-link {
  color: inherit;
  text-decoration: none;
}

.crm-status-text-link:hover {
  text-decoration: underline;
}

.crm-status-secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: #1f5f98;
  text-decoration: none;
  line-height: 1.2;
  width: fit-content;
  margin-inline: auto;
}

.crm-orders-table__status-cell .crm-status-secondary-link {
  margin-inline: 0 0;
}

.crm-status-secondary-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin-inline: auto;
  font-size: 0.6rem;
  line-height: 1.12;
  white-space: pre-line;
  text-align: center;
}

.crm-orders-table__status-cell .crm-status-secondary-label {
  margin-inline: 0 0;
  width: 100%;
  justify-content: flex-end;
  align-items: flex-end;
  text-align: right;
}

.crm-status-received-by {
  font-weight: 400;
  color: #93a1b5;
  letter-spacing: -0.01em;
}

.crm-status-shipped-meta {
  font-weight: 400;
  color: #93a1b5;
  letter-spacing: -0.01em;
}

.crm-status-closed-by {
  font-weight: 400;
  color: #93a1b5;
  letter-spacing: -0.01em;
}

.crm-status-secondary-button {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  position: relative;
  z-index: 2;
}

.crm-status-secondary-link:hover,
.crm-status-secondary-link:focus-visible {
  color: #0f2743;
  text-decoration: underline;
}

.crm-status-tracking-link {
  max-width: 100%;
}

.crm-status-followup-trigger {
  max-width: 100%;
  color: #7a8797;
  font-size: 0.63rem;
  font-weight: 600;
  line-height: 1.32;
  text-align: right;
  white-space: normal;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 0.13rem;
}

.crm-status-followup-trigger.is-today {
  color: #1c7c30;
}

.crm-status-followup-trigger.is-stale {
  color: #9b6500;
}

.crm-status-followup-trigger:hover,
.crm-status-followup-trigger:focus-visible {
  color: #44556a;
}

.crm-status-followup-trigger.is-today:hover,
.crm-status-followup-trigger.is-today:focus-visible {
  color: #166429;
}

.crm-status-followup-trigger.is-stale:hover,
.crm-status-followup-trigger.is-stale:focus-visible {
  color: #7a5200;
}

.crm-orders-table__payment-cell .crm-status-inline {
  justify-content: flex-end;
  width: 100%;
}

.crm-orders-table__payment-cell .crm-status-inline--with-secondary {
  align-items: flex-start;
}

.crm-orders-table__payment-cell .crm-status-summary {
  justify-items: end;
  text-align: right;
}

.crm-payment-status-summary {
  min-width: 0;
}

.crm-payment-status-date {
  display: inline-flex;
  justify-content: flex-end;
  max-width: 100%;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.24;
}

.crm-orders-table__payment-cell .crm-payment-status-date.crm-status-secondary-link {
  margin-inline: 0 0;
  justify-content: flex-end;
}

.crm-payment-slip-inline-list {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.18rem;
  max-width: 100%;
}

.crm-payment-slip-inline-link {
  font-size: 0.68rem;
  font-weight: 700;
  color: #1f5f98;
  line-height: 1.2;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 0.13rem;
}

.crm-payment-slip-inline-link:hover,
.crm-payment-slip-inline-link:focus-visible {
  color: #0f2743;
}

.crm-payment-slip-inline-separator {
  color: #94a3b8;
  font-size: 0.62rem;
  line-height: 1;
}

.crm-payment-slip-inline-empty {
  color: #94a3b8;
  font-size: 0.66rem;
  font-weight: 600;
  line-height: 1.2;
}

.crm-status-text--success {
  color: #1c7c30;
}

.crm-status-text--wait {
  color: #9b6500;
}

.crm-status-text--info {
  color: #1f5f98;
}

.crm-status-text--failed {
  color: #a92c2c;
}

.crm-status-icon-button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0 0 0 0.02rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.16s ease, opacity 0.16s ease;
}

.crm-status-icon-button:hover,
.crm-status-icon-button:focus-visible {
  transform: translateY(-1px) scale(1.06);
  opacity: 0.92;
}

.crm-status-icon-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 0.12rem rgba(23, 58, 99, 0.18);
  border-radius: 999px;
}

.crm-status-icon-button span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.84rem;
}

.tag-pill.muted {
  color: var(--tblr-muted);
}

.crm-note-card,
.activity-item {
  border: 1px solid var(--tblr-card-border-color);
  border-radius: 1rem;
  background: #fff;
  padding: 1rem;
  box-shadow: var(--kg-shadow-sm);
}

.crm-note-head,
.activity-header {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}

.activity-meta {
  color: var(--tblr-muted);
  font-size: 0.78rem;
}

.activity-list {
  display: grid;
  gap: 0.9rem;
}

.crm-order-history-button {
  min-width: 12.25rem;
}

.crm-user-history-button {
  min-width: 8rem;
}

.crm-order-history-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.7rem;
  height: 1.7rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: rgba(var(--tblr-primary-rgb), 0.1);
  color: var(--tblr-primary);
  font-size: 0.72rem;
  font-weight: 800;
}

.crm-order-activity-list {
  gap: 1rem;
}

.crm-order-activity-item {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 250, 252, 0.98));
}

.crm-order-activity-summary {
  margin: 0;
  color: #223049;
  font-weight: 600;
}

.crm-user-activity-entity {
  margin: 0.4rem 0 0.6rem;
}

.crm-user-activity-entity-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(23, 58, 99, 0.08);
  color: var(--tblr-primary);
  font-size: 0.83rem;
  font-weight: 700;
  text-decoration: none;
}

.crm-user-activity-entity-link:hover,
.crm-user-activity-entity-link:focus {
  background: rgba(23, 58, 99, 0.14);
  color: var(--tblr-primary);
}

.crm-user-activity-entity-link.is-static {
  cursor: default;
}

.crm-order-activity-details {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.45rem;
  color: #4f6178;
  font-size: 0.84rem;
}

.crm-order-activity-details li::marker {
  color: #c99a2d;
}

.crm-order-activity-empty {
  padding: 1rem 1.1rem;
  border: 1px dashed rgba(201, 154, 45, 0.32);
  border-radius: 1rem;
  background: rgba(255, 250, 240, 0.68);
  color: #6f5a23;
  font-weight: 600;
}

.crm-history-modal {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.crm-history-modal.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.crm-history-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(4px);
}

.crm-history-modal__dialog {
  position: relative;
  width: min(860px, 100%);
  max-height: calc(100vh - 3rem);
  display: flex;
  flex-direction: column;
  border-radius: 1.4rem;
  border: 1px solid rgba(226, 232, 240, 0.8);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 62px rgba(15, 23, 42, 0.26);
  overflow: hidden;
}

.crm-history-modal__dialog--narrow {
  width: min(760px, 100%);
}

.crm-history-modal__header,
.crm-history-modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(255, 255, 255, 0.98));
}

.crm-history-modal__header {
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.crm-history-modal__footer {
  border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.crm-history-modal__header h3 {
  margin: 0;
  font-size: 1.05rem;
}

.crm-history-modal__header p {
  margin: 0.28rem 0 0;
  color: var(--tblr-muted);
  font-size: 0.84rem;
}

.crm-history-modal__body {
  padding: 1rem 1.15rem 1.15rem;
  overflow: auto;
}

.crm-history-modal__close {
  border: 0;
  background: transparent;
  color: #607086;
  font-size: 1.65rem;
  line-height: 1;
  padding: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
}

.crm-history-modal__close:hover {
  background: rgba(15, 23, 42, 0.06);
  color: #122d4d;
}

.crm-history-modal__count {
  color: #5d6f85;
  font-size: 0.84rem;
  font-weight: 700;
}

.crm-history-modal__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
}

.crm-history-modal__summary {
  color: #5d6f85;
  font-size: 0.84rem;
  font-weight: 700;
  align-self: center;
}

.crm-order-tracking-followup__body {
  display: grid;
  gap: 0.55rem;
}

.crm-order-tracking-followup__workspace {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(440px, 2fr);
  gap: 0.55rem;
  align-items: start;
  min-height: 0;
}

.crm-order-tracking-followup__main {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
}

.crm-order-tracking-followup__latest,
.crm-order-tracking-followup__panel,
.crm-order-tracking-followup__history-shell,
.crm-order-tracking-followup__form {
  border: 1px solid rgba(214, 223, 233, 0.92);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.025);
}

.crm-order-tracking-followup__latest {
  padding: 0.68rem 0.8rem;
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(243, 248, 255, 0.98), rgba(255, 255, 255, 0.98));
}

.crm-order-tracking-followup__history-summary {
  margin: 0.12rem 0 0.52rem;
  padding: 0.7rem 0.76rem;
  border: 1px solid rgba(191, 219, 254, 0.76);
  border-radius: 0.78rem;
  background: rgba(239, 246, 255, 0.76);
  box-shadow: none;
}

.crm-order-tracking-followup__latest-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem;
}

.crm-order-tracking-followup__eyebrow {
  display: inline-flex;
  margin-bottom: 0.18rem;
  color: #66778d;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.crm-order-tracking-followup__latest strong {
  display: block;
  color: #0f2743;
  font-size: 0.88rem;
  line-height: 1.24;
}

.crm-order-tracking-followup__count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.28rem 0.62rem;
  border-radius: 999px;
  background: rgba(15, 39, 67, 0.06);
  color: #35516f;
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

.crm-order-tracking-followup__section-head .crm-order-tracking-followup__count-pill {
  display: inline-flex;
  margin-top: 0;
  color: #35516f;
  font-size: 0.68rem;
  line-height: 1.2;
}

.crm-order-tracking-followup__latest-badges,
.crm-order-tracking-followup__timeline-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.crm-order-tracking-followup__latest-badges {
  margin-top: 0.42rem;
}

.crm-order-tracking-followup__latest-meta {
  margin: 0.42rem 0 0;
  color: #66788f;
  font-size: 0.71rem;
  font-weight: 600;
  line-height: 1.34;
}

.crm-order-tracking-followup__latest-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 0.34rem;
  margin-top: 0.48rem;
}

.crm-order-tracking-followup__signal {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  padding: 0.24rem 0.5rem;
  border: 1px solid rgba(203, 213, 225, 0.8);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #52657a;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1.2;
}

.crm-order-tracking-followup__signal.is-success {
  border-color: rgba(134, 239, 172, 0.78);
  background: rgba(240, 253, 244, 0.92);
  color: #15803d;
}

.crm-order-tracking-followup__info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.crm-order-tracking-followup__overview {
  padding: 0.58rem 0.76rem;
}

.crm-order-tracking-followup__modal-title {
  display: flex;
  align-items: center;
  gap: 0.48rem;
}

.crm-order-tracking-followup__title-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: rgba(239, 246, 255, 0.96);
  color: #607995;
}

.crm-order-tracking-followup__title-icon .icon {
  width: 1rem;
  height: 1rem;
}

.crm-order-tracking-followup__overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}

.crm-order-tracking-followup__overview-group {
  min-width: 0;
  padding-right: 0.82rem;
}

.crm-order-tracking-followup__overview-group + .crm-order-tracking-followup__overview-group {
  padding-right: 0;
  padding-left: 0.82rem;
  border-left: 1px solid rgba(226, 232, 240, 0.9);
}

.crm-order-tracking-followup__shortcut-row {
  margin-top: 0.58rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.crm-order-tracking-followup__tracking-number-wrap {
  display: flex;
  align-items: center;
  gap: 0.34rem;
}

.crm-order-tracking-followup__tracking-number-wrap > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.crm-order-tracking-followup__copy-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 1.62rem;
  height: 1.62rem;
  padding: 0;
  border: 0;
  border-radius: 0.45rem;
  background: transparent;
  color: #5f7692;
}

.crm-order-tracking-followup__copy-icon:hover:not(:disabled),
.crm-order-tracking-followup__copy-icon:focus-visible:not(:disabled) {
  background: rgba(219, 234, 254, 0.72);
  color: #1d4ed8;
  outline: none;
}

.crm-order-tracking-followup__copy-icon:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.crm-order-tracking-followup__copy-icon .icon {
  width: 0.9rem;
  height: 0.9rem;
}

.crm-order-tracking-followup__panel,
.crm-order-tracking-followup__history-shell,
.crm-order-tracking-followup__form {
  padding: 0.58rem 0.68rem;
}

.crm-order-tracking-followup__section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.55rem;
  margin-bottom: 0.22rem;
}

.crm-order-tracking-followup__section-head strong {
  display: block;
  color: #0f2743;
  font-size: 0.8rem;
}

.crm-order-tracking-followup__section-head span {
  display: block;
  margin-top: 0.14rem;
  color: #6d7d90;
  font-size: 0.77rem;
  font-weight: 600;
  line-height: 1.45;
}

.crm-order-tracking-followup__kv-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.crm-order-tracking-followup__kv-row {
  display: grid;
  grid-template-columns: minmax(5rem, 6rem) minmax(0, 1fr);
  gap: 0.48rem;
  align-items: start;
  min-width: 0;
  padding: 0.28rem 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.82);
}

.crm-order-tracking-followup__kv-row:first-child {
  padding-top: 0.04rem;
}

.crm-order-tracking-followup__kv-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.crm-order-tracking-followup__kv-label {
  margin: 0;
  color: #66778d;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1.28;
}

.crm-order-tracking-followup__kv-value {
  min-width: 0;
  margin: 0;
  color: #0f2743;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.crm-order-tracking-followup__kv-value.text-truncate {
  display: block;
  max-width: 100%;
}

.crm-order-tracking-followup__action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.34rem;
  margin-top: 0.42rem;
}

.crm-order-tracking-followup__shortcut-row .crm-order-tracking-followup__action-row {
  margin-top: 0;
}

.crm-order-tracking-followup__action-button {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  min-width: 0;
  padding: 0.34rem 0.58rem;
  font-size: 0.74rem;
  line-height: 1.2;
}

.crm-order-tracking-followup__action-button .icon {
  width: 0.78rem;
  height: 0.78rem;
}

.crm-order-tracking-followup__panel .crm-order-tracking-followup__action-button span {
  white-space: nowrap;
}

.crm-order-tracking-followup__action-button.is-disabled {
  pointer-events: none;
  opacity: 0.72;
}

.crm-order-tracking-followup__quick-statuses {
  display: flex;
  flex-wrap: wrap;
  gap: 0.34rem;
  margin-bottom: 0.32rem;
}

.crm-order-tracking-followup__quick-status {
  border: 1px solid rgba(191, 204, 219, 0.96);
  border-radius: 999px;
  background: #fff;
  color: #37506c;
  font-size: 0.69rem;
  font-weight: 800;
  line-height: 1.2;
  padding: 0.3rem 0.62rem;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.crm-order-tracking-followup__form .row {
  --tblr-gutter-x: 0.7rem;
  --tblr-gutter-y: 0.6rem;
}

.crm-order-tracking-followup__form .form-label {
  margin-bottom: 0.28rem;
}

.crm-order-tracking-followup__form textarea.form-control {
  min-height: 3.7rem;
  padding-top: 0.48rem;
  padding-bottom: 0.48rem;
}

.crm-order-tracking-followup__quick-status:hover,
.crm-order-tracking-followup__quick-status:focus-visible {
  border-color: rgba(59, 130, 246, 0.46);
  color: #0f4d86;
  box-shadow: 0 0 0 0.16rem rgba(59, 130, 246, 0.12);
}

.crm-order-tracking-followup__quick-status.is-active {
  border-color: rgba(37, 99, 235, 0.32);
  background: rgba(59, 130, 246, 0.12);
  color: #11457b;
}

.crm-order-tracking-followup__quick-status:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.crm-order-tracking-followup__update-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.62rem 0.72rem;
  border: 1px solid rgba(196, 212, 229, 0.96);
  border-radius: 0.9rem;
  background: linear-gradient(180deg, rgba(248, 252, 255, 0.98), rgba(241, 247, 252, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.crm-order-tracking-followup__update-box:has(.form-check-input:checked) {
  border-color: rgba(96, 165, 250, 0.65);
  background: linear-gradient(180deg, rgba(241, 248, 255, 0.98), rgba(232, 243, 255, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    0 10px 22px rgba(37, 99, 235, 0.08);
}

.crm-order-tracking-followup__update-copy {
  display: grid;
  gap: 0.14rem;
}

.crm-order-tracking-followup__update-copy strong {
  color: #0f2743;
  font-size: 0.84rem;
  font-weight: 800;
}

.crm-order-tracking-followup__checkbox {
  min-height: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0.38rem 0.62rem;
  border: 1px solid rgba(204, 215, 229, 0.92);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
  white-space: nowrap;
}

.crm-order-tracking-followup__checkbox .form-check-input {
  flex: 0 0 auto;
  width: 1.08rem;
  height: 1.08rem;
  margin-top: 0;
  border-color: rgba(148, 163, 184, 0.72);
}

.crm-order-tracking-followup__checkbox .form-check-input:focus {
  box-shadow: 0 0 0 0.16rem rgba(59, 130, 246, 0.16);
}

.crm-order-tracking-followup__checkbox .form-check-input:checked {
  background-color: #2563eb;
  border-color: #2563eb;
  box-shadow: 0 0 0 0.14rem rgba(37, 99, 235, 0.14);
}

.crm-order-tracking-followup__checkbox .form-check-label {
  color: #213a57;
  font-size: 0.78rem;
  font-weight: 700;
}

.crm-order-tracking-followup__checkbox .form-check-input:checked + .form-check-label {
  color: #11457b;
}

.crm-order-tracking-followup__history {
  min-height: 0;
  overflow: auto;
  padding-right: 0.18rem;
}

.crm-order-tracking-followup__history-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.52rem;
}

.crm-order-tracking-followup__history-filters {
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
  padding: 0.16rem;
  border-radius: 0.64rem;
  background: rgba(241, 245, 249, 0.96);
}

.crm-order-tracking-followup__history-filter {
  min-height: 1.7rem;
  padding: 0.24rem 0.54rem;
  border: 0;
  border-radius: 0.48rem;
  background: transparent;
  color: #64748b;
  font-size: 0.67rem;
  font-weight: 800;
}

.crm-order-tracking-followup__history-filter:hover,
.crm-order-tracking-followup__history-filter:focus-visible {
  color: #1d4ed8;
  outline: none;
}

.crm-order-tracking-followup__history-filter.is-active {
  background: #fff;
  color: #1d4ed8;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.1);
}

.crm-order-tracking-followup__history-filter-hint {
  color: #7b8899;
  font-size: 0.64rem;
  font-weight: 700;
  text-align: right;
}

.crm-order-tracking-followup__timeline {
  position: relative;
  display: grid;
  gap: 0.55rem;
  padding-left: 0.1rem;
}

.crm-order-tracking-followup__timeline::before {
  content: "";
  position: absolute;
  top: 0.32rem;
  bottom: 0.32rem;
  left: 0.52rem;
  width: 2px;
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.32), rgba(59, 130, 246, 0.2));
}

.crm-order-tracking-followup__timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.54rem;
  align-items: flex-start;
}

.crm-order-tracking-followup__timeline-marker {
  position: relative;
  z-index: 1;
  width: 0.96rem;
  height: 0.96rem;
  margin-top: 0.4rem;
  border: 3px solid #fff;
  border-radius: 999px;
  background: #86a4c8;
  box-shadow: 0 0 0 0.18rem rgba(134, 164, 200, 0.18);
}

.crm-order-tracking-followup__timeline-item.is-latest .crm-order-tracking-followup__timeline-marker {
  background: #2563eb;
  box-shadow: 0 0 0 0.22rem rgba(37, 99, 235, 0.18);
}

.crm-order-tracking-followup__timeline-body {
  min-width: 0;
  padding: 0.58rem 0.7rem;
  border: 1px solid rgba(223, 230, 238, 0.94);
  border-radius: 0.82rem;
  background: #fff;
}

.crm-order-tracking-followup__timeline-item.is-latest .crm-order-tracking-followup__timeline-body {
  border-color: rgba(147, 197, 253, 0.74);
  background: rgba(239, 246, 255, 0.68);
}

.crm-order-tracking-followup__timeline-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.42rem 0.6rem;
  margin-bottom: 0.32rem;
  color: #6d7d90;
  font-size: 0.71rem;
  font-weight: 700;
  line-height: 1.28;
}

.crm-order-tracking-followup__timeline-title {
  display: block;
  color: #10233c;
  font-size: 0.82rem;
  line-height: 1.34;
  margin-bottom: 0.36rem;
  overflow-wrap: anywhere;
}

.crm-order-tracking-followup__timeline-note {
  margin: 0.36rem 0 0;
  color: #46586d;
  font-size: 0.73rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.crm-order-tracking-followup__agent-checks {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.58rem;
  padding: 0.58rem 0.62rem;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 0.7rem;
  background: rgba(239, 246, 255, 0.7);
}

.crm-order-tracking-followup__agent-checks-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.45rem 0.65rem;
}

.crm-order-tracking-followup__agent-checks-head strong,
.crm-order-tracking-followup__agent-checks-head span {
  display: block;
}

.crm-order-tracking-followup__agent-checks-head strong {
  color: #173a63;
  font-size: 0.72rem;
}

.crm-order-tracking-followup__agent-checks-head > div > span {
  margin-top: 0.16rem;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 700;
}

.crm-order-tracking-followup__agent-checks-history summary {
  cursor: pointer;
  color: #285a96;
  font-size: 0.7rem;
  font-weight: 800;
}

.crm-order-tracking-followup__agent-checks-list {
  display: grid;
  gap: 0.34rem;
  margin-top: 0.46rem;
}

.crm-order-tracking-followup__agent-check-row {
  display: grid;
  grid-template-columns: minmax(8.2rem, auto) minmax(7.5rem, auto) minmax(0, 1fr);
  gap: 0.22rem 0.48rem;
  align-items: center;
  padding: 0.4rem 0.46rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.82);
  color: #52657a;
  font-size: 0.66rem;
}

.crm-order-tracking-followup__agent-check-row strong.is-success { color: #15803d; }
.crm-order-tracking-followup__agent-check-row strong.is-progress { color: #1d4ed8; }
.crm-order-tracking-followup__agent-check-row strong.is-warning { color: #c2410c; }
.crm-order-tracking-followup__agent-check-row strong.is-danger { color: #c81e1e; }

.crm-order-tracking-followup__agent-check-date,
.crm-order-tracking-followup__agent-check-source {
  font-weight: 700;
}

.crm-order-tracking-followup__agent-check-row small {
  grid-column: 2 / -1;
  color: #6d7d90;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

@media (max-width: 575.98px) {
  .crm-order-tracking-followup__agent-check-row {
    grid-template-columns: 1fr;
  }

  .crm-order-tracking-followup__agent-check-row small {
    grid-column: auto;
  }
}

.crm-order-tracking-followup__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.24rem;
  padding: 0.22rem 0.46rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1.2;
}

.crm-order-tracking-followup__badge.is-success {
  background: rgba(34, 197, 94, 0.14);
  color: #15803d;
}

.crm-order-tracking-followup__badge.is-muted {
  background: rgba(100, 116, 139, 0.12);
  color: #5b6b80;
}

.crm-order-tracking-followup__badge.is-warning {
  background: rgba(249, 115, 22, 0.14);
  color: #c2410c;
}

.crm-order-tracking-followup__badge.is-danger {
  background: rgba(239, 68, 68, 0.14);
  color: #c81e1e;
}

.crm-order-tracking-followup__badge.is-progress {
  background: rgba(59, 130, 246, 0.14);
  color: #1d4ed8;
}

.crm-order-tracking-followup__badge.is-latest {
  background: rgba(15, 118, 110, 0.14);
  color: #0f766e;
}

.crm-order-tracking-followup__footer {
  gap: 0.72rem;
}

.crm-order-tracking-followup__footer .crm-history-modal__count {
  line-height: 1.32;
  font-size: 0.78rem;
}

.crm-order-tracking-followup__footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  width: 100%;
}

.crm-order-tracking-followup__footer-actions-left,
.crm-order-tracking-followup__footer-actions-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.crm-order-tracking-followup__footer-actions-right {
  margin-left: auto;
}

.crm-order-tracking-followup__footer-actions-right .btn-primary:not(:disabled) {
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18);
}

.crm-order-tracking-followup__empty {
  padding: 0.95rem 0.3rem;
  color: #7b8899;
  font-size: 0.79rem;
  text-align: center;
}

[data-order-tracking-followup-modal] .crm-history-modal__dialog {
  width: min(1440px, 100%);
}

[data-order-tracking-followup-modal] .crm-order-tracking-followup__history-shell {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 13rem);
  overflow: hidden;
}

[data-order-tracking-followup-modal] .crm-history-modal__header,
[data-order-tracking-followup-modal] .crm-history-modal__footer {
  padding: 0.72rem 0.9rem;
}

[data-order-tracking-followup-modal] .crm-history-modal__body {
  padding: 0.72rem 0.9rem 0.82rem;
}

@media (max-width: 1099.98px) {
  [data-order-tracking-followup-modal] .crm-history-modal__dialog {
    width: min(920px, 100%);
  }

  .crm-order-tracking-followup__workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  [data-order-tracking-followup-modal] .crm-order-tracking-followup__history-shell {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .crm-order-tracking-followup__history {
    overflow: visible;
    padding-right: 0;
  }
}


@media (max-width: 767.98px) {
  .crm-order-tracking-followup__overview-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .crm-order-tracking-followup__overview-group,
  .crm-order-tracking-followup__overview-group + .crm-order-tracking-followup__overview-group {
    padding-right: 0;
    padding-left: 0;
  }

  .crm-order-tracking-followup__overview-group + .crm-order-tracking-followup__overview-group {
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(226, 232, 240, 0.9);
    border-left: 0;
  }

  .crm-order-tracking-followup__overview .crm-order-tracking-followup__kv-row {
    grid-template-columns: minmax(4.6rem, 5.4rem) minmax(0, 1fr);
    gap: 0.32rem;
  }

  .crm-order-tracking-followup__shortcut-row .crm-order-tracking-followup__action-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-order-tracking-followup__shortcut-row .crm-order-tracking-followup__action-row > * {
    width: 100%;
  }

  .crm-order-tracking-followup__history-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .crm-order-tracking-followup__history-filter-hint {
    text-align: left;
  }
}

.crm-order-cancel__summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.8rem;
}

.crm-order-cancel__summary-card {
  padding: 0.52rem 0.72rem;
  border: 1px solid rgba(214, 223, 233, 0.9);
  border-radius: 0.95rem;
  background: rgba(248, 250, 252, 0.82);
}

.crm-order-cancel__summary-card span {
  display: block;
  color: #738094;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
}

.crm-order-cancel__summary-card strong {
  display: block;
  margin-top: 0.24rem;
  color: #223247;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.3;
  word-break: break-word;
}

.crm-order-cancel__field textarea {
  min-height: 7.4rem;
  resize: vertical;
}

.crm-order-cancel__note {
  margin: 0.8rem 0 0;
  color: #6b7788;
  font-size: 0.76rem;
  line-height: 1.55;
}

@media (max-width: 767.98px) {
  .crm-order-cancel__summary {
    grid-template-columns: 1fr;
  }
}

.crm-order-status-quick__summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.8rem;
}

.crm-order-status-quick__summary-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.46rem 0.78rem;
  border: 1px solid rgba(214, 223, 233, 0.9);
  border-radius: 0.95rem;
  background: rgba(248, 250, 252, 0.82);
}

.crm-order-status-quick__summary-item span {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.2;
}

.crm-order-status-quick__summary-item strong {
  margin-top: 0;
  font-size: 0.88rem;
  text-align: right;
  line-height: 1.2;
}

.crm-order-status-quick__summary-item--status strong {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
}

.crm-order-status-quick__summary-item--placeholder {
  min-height: 3.6rem;
  background: rgba(255, 255, 255, 0.56);
}

.crm-order-status-quick__summary-item--customer {
  justify-content: flex-start;
  align-items: flex-start;
  min-height: 2.88rem;
  background: rgba(255, 255, 255, 0.56);
}

.crm-order-status-quick__customer-card {
  gap: 0.1rem;
  padding: 0;
}

.crm-order-status-quick__customer-card .crm-order-party-line {
  gap: 0.16rem;
}

.crm-order-status-quick__customer-card .crm-order-party-name {
  font-size: 0.65rem;
  line-height: 1.08;
}

.crm-order-status-quick__customer-card .crm-country-flag {
  font-size: 0.68rem;
}

.crm-order-status-quick__customer-card .crm-order-party-meta {
  display: inline-flex;
  align-items: center;
  min-height: 0;
  font-size: 0.55rem;
  line-height: 1.08;
}

.crm-order-status-quick__current {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.crm-order-payment-quick__current {
  flex-shrink: 0;
  padding: 0.36rem 0.68rem;
  border: 1px solid rgba(205, 217, 231, 0.95);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  font-size: 0.76rem;
  font-weight: 800;
}

.crm-order-payment-quick__snapshot {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0.12rem 0 0.18rem;
}

.crm-order-payment-quick__snapshot-card {
  padding: 0.5rem 0.72rem;
  border: 1px solid rgba(214, 223, 233, 0.86);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.82);
}

.crm-order-payment-quick__snapshot-card span {
  display: block;
  color: #738094;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
}

.crm-order-payment-quick__snapshot-card strong {
  display: block;
  margin-top: 0.22rem;
  color: #223247;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.25;
}

.crm-order-status-option {
  appearance: none;
  border: 1px solid rgba(206, 216, 227, 0.96);
  background: rgba(255, 255, 255, 0.94);
  border-radius: 0.95rem;
  min-height: 3.15rem;
  padding: 0.7rem 0.82rem;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: left;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.crm-order-status-option:hover,
.crm-order-status-option:focus-visible,
.crm-order-status-option.is-active {
  transform: translateY(-1px);
  border-color: rgba(23, 58, 99, 0.18);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  background: linear-gradient(135deg, rgba(23, 58, 99, 0.05), rgba(201, 154, 45, 0.06));
}

.crm-order-status-option:focus-visible {
  outline: none;
}

.crm-order-status-option:disabled {
  opacity: 0.58;
  cursor: progress;
  transform: none;
}

.crm-order-status-option__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  font-size: 1rem;
  line-height: 1;
}

.crm-order-status-option__label {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.crm-order-status-quick__timeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.8rem;
  align-items: start;
  margin-top: 0.08rem;
}

.crm-order-payment-quick__timeline {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 1rem;
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
}

.crm-order-payment-quick__timeline .crm-order-status-option--timeline {
  width: min(12.25rem, 100%);
  flex: 0 0 12.25rem;
}

.crm-order-status-option--timeline {
  position: relative;
  min-height: 0;
  padding: 0.2rem 0.15rem 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.78rem;
  overflow: visible;
}

.crm-order-status-option--timeline:hover,
.crm-order-status-option--timeline:focus-visible,
.crm-order-status-option--timeline.is-active {
  transform: none;
  border-color: transparent;
  box-shadow: none;
  background: transparent;
}

.crm-order-status-option--timeline:disabled {
  cursor: not-allowed;
}

.crm-order-status-option__line {
  position: absolute;
  top: 1.45rem;
  left: calc(50% + 1.72rem);
  width: calc(100% - 0.92rem);
  border-top: 0.32rem dotted rgba(59, 130, 246, 0.78);
  opacity: 0.92;
}

.crm-order-status-option--timeline:last-child .crm-order-status-option__line {
  display: none;
}

.crm-order-status-option__dot-shell {
  position: relative;
  z-index: 1;
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.24);
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.crm-order-status-option--timeline.crm-status-text--wait .crm-order-status-option__dot-shell {
  background: #fdf1de;
}

.crm-order-status-option--timeline.crm-status-text--info .crm-order-status-option__dot-shell {
  background: #e7f1fd;
}

.crm-order-status-option--timeline.crm-status-text--success .crm-order-status-option__dot-shell {
  background: #e8f5eb;
}

.crm-order-status-option--timeline.crm-status-text--failed .crm-order-status-option__dot-shell {
  background: #fbe8e6;
}

.crm-order-status-option__dot {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #3b82f6;
  color: #fff;
  box-shadow: 0 8px 18px rgba(59, 130, 246, 0.18);
}

.crm-order-status-option--timeline.crm-status-text--wait .crm-order-status-option__dot {
  background: #9b6500;
  box-shadow: 0 8px 18px rgba(155, 101, 0, 0.22);
}

.crm-order-status-option--timeline.crm-status-text--info .crm-order-status-option__dot {
  background: #1f5f98;
  box-shadow: 0 8px 18px rgba(31, 95, 152, 0.22);
}

.crm-order-status-option--timeline.crm-status-text--success .crm-order-status-option__dot {
  background: #1c7c30;
  box-shadow: 0 8px 18px rgba(28, 124, 48, 0.22);
}

.crm-order-status-option--timeline.crm-status-text--failed .crm-order-status-option__dot {
  background: #c2413a;
  box-shadow: 0 8px 18px rgba(194, 65, 58, 0.22);
}

.crm-order-status-option--timeline .crm-order-status-option__icon {
  width: auto;
  font-size: 1.08rem;
}

.crm-order-status-option__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.08rem;
  text-align: center;
  min-width: 0;
  width: 100%;
}

.crm-order-status-option--timeline .crm-order-status-option__label {
  justify-content: center;
  min-height: 2.25rem;
  line-height: 1.24;
  font-size: 0.84rem;
  color: #536273;
  text-align: center;
}

.crm-order-status-option__indicator {
  display: block;
  width: min(84%, 8rem);
  height: 0.34rem;
  margin-top: 0.2rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.22);
  opacity: 0;
  transform: scaleX(0.42);
  transform-origin: center;
  transition: opacity 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.crm-order-status-option--timeline.crm-status-text--wait .crm-order-status-option__indicator {
  background: rgba(155, 101, 0, 0.22);
}

.crm-order-status-option--timeline.crm-status-text--info .crm-order-status-option__indicator {
  background: rgba(31, 95, 152, 0.2);
}

.crm-order-status-option--timeline.crm-status-text--success .crm-order-status-option__indicator {
  background: rgba(28, 124, 48, 0.22);
}

.crm-order-status-option--timeline.crm-status-text--failed .crm-order-status-option__indicator {
  background: rgba(194, 65, 58, 0.2);
}

.crm-order-status-option--timeline:hover .crm-order-status-option__dot-shell,
.crm-order-status-option--timeline:focus-visible .crm-order-status-option__dot-shell {
  transform: translateY(-1px);
  background: rgba(59, 130, 246, 0.28);
}

.crm-order-status-option--timeline.is-active .crm-order-status-option__dot-shell {
  background: rgba(59, 130, 246, 0.36);
  box-shadow: 0 14px 30px rgba(59, 130, 246, 0.16);
}

.crm-order-status-option--timeline.crm-status-text--wait:hover .crm-order-status-option__dot-shell,
.crm-order-status-option--timeline.crm-status-text--wait:focus-visible .crm-order-status-option__dot-shell {
  background: #f9e6c4;
}

.crm-order-status-option--timeline.crm-status-text--info:hover .crm-order-status-option__dot-shell,
.crm-order-status-option--timeline.crm-status-text--info:focus-visible .crm-order-status-option__dot-shell {
  background: #dceafb;
}

.crm-order-status-option--timeline.crm-status-text--success:hover .crm-order-status-option__dot-shell,
.crm-order-status-option--timeline.crm-status-text--success:focus-visible .crm-order-status-option__dot-shell {
  background: #d9eee0;
}

.crm-order-status-option--timeline.crm-status-text--failed:hover .crm-order-status-option__dot-shell,
.crm-order-status-option--timeline.crm-status-text--failed:focus-visible .crm-order-status-option__dot-shell {
  background: #f6dcd8;
}

.crm-order-status-option--timeline.crm-status-text--wait.is-active .crm-order-status-option__dot-shell {
  background: #f6ddb2;
  box-shadow: 0 12px 24px rgba(155, 101, 0, 0.1);
}

.crm-order-status-option--timeline.crm-status-text--info.is-active .crm-order-status-option__dot-shell {
  background: #cfe3fa;
  box-shadow: 0 12px 24px rgba(31, 95, 152, 0.1);
}

.crm-order-status-option--timeline.crm-status-text--success.is-active .crm-order-status-option__dot-shell {
  background: #cae8d2;
  box-shadow: 0 12px 24px rgba(28, 124, 48, 0.1);
}

.crm-order-status-option--timeline.crm-status-text--failed.is-active .crm-order-status-option__dot-shell {
  background: #f2d0cb;
  box-shadow: 0 12px 24px rgba(194, 65, 58, 0.1);
}

.crm-order-status-option--timeline.is-active .crm-order-status-option__dot {
  transform: scale(1.06);
}

.crm-order-status-option--timeline.is-active .crm-order-status-option__label {
  color: #1d2b3a;
}

.crm-order-status-option--timeline.is-active .crm-order-status-option__indicator {
  opacity: 1;
  transform: scaleX(1);
}

.crm-order-status-option--timeline.crm-status-text--wait.is-active .crm-order-status-option__indicator {
  background: #f59e0b;
}

.crm-order-status-option--timeline.crm-status-text--info.is-active .crm-order-status-option__indicator {
  background: #2563eb;
}

.crm-order-status-option--timeline.crm-status-text--success.is-active .crm-order-status-option__indicator {
  background: #16a34a;
}

.crm-order-status-option--timeline.crm-status-text--failed.is-active .crm-order-status-option__indicator {
  background: #dc2626;
}

.crm-order-status-option--timeline.crm-status-text--wait .crm-order-status-option__label {
  color: #9b6500;
}

.crm-order-status-option--timeline.crm-status-text--info .crm-order-status-option__label {
  color: #1f5f98;
}

.crm-order-status-option--timeline.crm-status-text--success .crm-order-status-option__label {
  color: #1c7c30;
}

.crm-order-status-option--timeline.crm-status-text--failed .crm-order-status-option__label {
  color: #c2413a;
}

.crm-order-status-option--timeline.is-disabled-choice {
  opacity: 0.42;
  cursor: not-allowed;
}

.crm-order-status-option--timeline.is-disabled-choice .crm-order-status-option__dot-shell,
.crm-order-status-option--timeline.is-disabled-choice .crm-order-status-option__dot {
  box-shadow: none;
}

.crm-order-status-option--timeline.is-disabled-choice:hover .crm-order-status-option__dot-shell,
.crm-order-status-option--timeline.is-disabled-choice:focus-visible .crm-order-status-option__dot-shell {
  transform: none;
}

.crm-order-status-quick__extra[hidden] {
  display: none !important;
}

.crm-order-status-quick__extra {
  margin-top: 0.95rem;
  padding: 0.95rem 1rem 1rem;
  border: 1px solid rgba(228, 191, 76, 0.4);
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(255, 249, 226, 0.98), rgba(255, 242, 190, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.crm-order-status-quick__extra-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.2rem;
}

.crm-order-status-quick__extra-head strong {
  display: block;
  color: #855a00;
  font-size: 0.86rem;
  font-weight: 800;
}

.crm-order-status-quick__extra-head small {
  display: block;
  margin-top: 0.18rem;
  color: #a16d0d;
  font-size: 0.76rem;
}

.crm-order-status-quick__extra .form-label {
  margin-bottom: 0.32rem;
  color: #855a00;
}

.crm-order-status-quick__extra .form-control,
.crm-order-status-quick__extra .form-select {
  font-size: 0.84rem;
  color: #6e4a00;
  border-color: rgba(228, 191, 76, 0.44);
  background: rgba(255, 252, 241, 0.95);
}

.crm-order-status-quick__extra .crm-form-hint {
  font-size: 0.76rem;
  color: #9d6b10;
}

.crm-order-payment-quick__extra--partial {
  border-color: rgba(58, 125, 211, 0.22);
  background: linear-gradient(180deg, rgba(244, 249, 255, 0.98), rgba(232, 242, 255, 0.95));
}

.crm-order-payment-quick__extra--partial .crm-order-status-quick__extra-head strong {
  color: #1f5f98;
}

.crm-order-payment-quick__extra--partial .crm-order-status-quick__extra-head small {
  color: #3c79ad;
}

.crm-order-payment-quick__extra--partial .form-label,
.crm-order-payment-quick__extra--partial .crm-order-status-quick__proof-label {
  color: #1f5f98;
}

.crm-order-payment-quick__extra--partial .form-control,
.crm-order-payment-quick__extra--partial .form-select {
  color: #194b78;
  border-color: rgba(58, 125, 211, 0.24);
  background: rgba(250, 253, 255, 0.96);
}

.crm-order-payment-quick__extra--partial .crm-form-hint,
.crm-order-payment-quick__extra--partial .crm-order-status-quick__proof-current-note {
  color: #3c79ad;
}

.crm-order-payment-quick__extra--partial .crm-order-status-quick__proof-current {
  border-color: rgba(58, 125, 211, 0.22);
  background: rgba(255, 255, 255, 0.88);
}

.crm-order-payment-quick__extra--partial .crm-order-status-quick__proof-current-link,
.crm-order-payment-quick__extra--partial .crm-order-status-quick__proof-current-name {
  color: #1f5f98;
}

.crm-order-payment-quick__extra--partial .crm-order-status-quick__proof-current-link:hover {
  color: #163f66;
}

.crm-order-payment-quick__extra--partial .crm-order-status-quick__proof-current-image {
  border-color: rgba(58, 125, 211, 0.2);
  background: rgba(245, 250, 255, 0.98);
}

.crm-order-payment-quick__extra--partial .crm-order-payment-quick__current {
  border-color: rgba(58, 125, 211, 0.22);
  background: rgba(255, 255, 255, 0.9);
}

.crm-order-payment-quick__extra--partial .crm-order-payment-quick__snapshot-card {
  border-color: rgba(58, 125, 211, 0.18);
  background: rgba(255, 255, 255, 0.84);
}

.crm-order-payment-quick__extra--partial .crm-order-payment-quick__snapshot-card span {
  color: #3c79ad;
}

.crm-order-payment-quick__extra--partial .crm-order-payment-quick__snapshot-card strong {
  color: #194b78;
}

.crm-order-payment-quick__extra--paid {
  border-color: rgba(41, 153, 63, 0.24);
  background: linear-gradient(180deg, rgba(245, 254, 247, 0.98), rgba(229, 247, 233, 0.95));
}

.crm-order-payment-quick__extra--paid .crm-order-status-quick__extra-head strong {
  color: #1a7f36;
}

.crm-order-payment-quick__extra--paid .crm-order-status-quick__extra-head small {
  color: #2f8a48;
}

.crm-order-payment-quick__extra--paid .form-label,
.crm-order-payment-quick__extra--paid .crm-order-status-quick__proof-label {
  color: #1a7f36;
}

.crm-order-payment-quick__extra--paid .form-control,
.crm-order-payment-quick__extra--paid .form-select {
  color: #17612c;
  border-color: rgba(41, 153, 63, 0.22);
  background: rgba(250, 255, 251, 0.96);
}

.crm-order-payment-quick__extra--paid .crm-form-hint,
.crm-order-payment-quick__extra--paid .crm-order-status-quick__proof-current-note {
  color: #2f8a48;
}

.crm-order-payment-quick__extra--paid .crm-order-status-quick__proof-current {
  border-color: rgba(41, 153, 63, 0.2);
  background: rgba(255, 255, 255, 0.88);
}

.crm-order-payment-quick__extra--paid .crm-order-status-quick__proof-current-link,
.crm-order-payment-quick__extra--paid .crm-order-status-quick__proof-current-name {
  color: #1a7f36;
}

.crm-order-payment-quick__extra--paid .crm-order-status-quick__proof-current-link:hover {
  color: #125425;
}

.crm-order-payment-quick__extra--paid .crm-order-status-quick__proof-current-image {
  border-color: rgba(41, 153, 63, 0.18);
  background: rgba(245, 255, 247, 0.98);
}

.crm-order-payment-quick__extra--paid .crm-order-payment-quick__current {
  border-color: rgba(41, 153, 63, 0.22);
  background: rgba(255, 255, 255, 0.9);
}

.crm-order-payment-quick__extra--paid .crm-order-payment-quick__snapshot-card {
  border-color: rgba(41, 153, 63, 0.18);
  background: rgba(255, 255, 255, 0.84);
}

.crm-order-payment-quick__extra--paid .crm-order-payment-quick__snapshot-card span {
  color: #2f8a48;
}

.crm-order-payment-quick__extra--paid .crm-order-payment-quick__snapshot-card strong {
  color: #17612c;
}

.crm-order-status-quick__extra--received {
  border-color: rgba(52, 168, 83, 0.32);
  background: linear-gradient(180deg, rgba(241, 253, 245, 0.98), rgba(224, 247, 231, 0.95));
}

.crm-order-status-quick__extra--received .crm-order-status-quick__extra-head strong {
  color: #187b39;
}

.crm-order-status-quick__extra--received .crm-order-status-quick__extra-head small {
  color: #2a8f4c;
}

.crm-order-status-quick__extra--received .form-label {
  color: #187b39;
}

.crm-order-status-quick__extra--received .form-control,
.crm-order-status-quick__extra--received .form-select {
  color: #176135;
  border-color: rgba(52, 168, 83, 0.34);
  background: rgba(248, 255, 250, 0.96);
}

.crm-order-status-quick__extra--received .crm-form-hint {
  color: #2a8f4c;
}

.crm-order-status-quick__extra--received .crm-order-status-quick__proof-label {
  color: #2a8f4c;
}

.crm-order-status-quick__extra--received .crm-order-status-quick__proof-current {
  border-color: rgba(52, 168, 83, 0.28);
  background: rgba(255, 255, 255, 0.82);
}

.crm-order-status-quick__extra--received .crm-order-status-quick__proof-current-link {
  color: #187b39;
}

.crm-order-status-quick__extra--received .crm-order-status-quick__proof-current-link:hover {
  color: #12592a;
}

.crm-order-status-quick__extra--received .crm-order-status-quick__proof-current-image {
  border-color: rgba(52, 168, 83, 0.28);
  background: rgba(243, 255, 247, 0.98);
}

.crm-order-status-quick__extra--received .crm-order-status-quick__proof-current-name {
  color: #187b39;
}

.crm-order-status-quick__extra--received .crm-order-status-quick__proof-current-note {
  color: #2a8f4c;
}

.crm-order-status-quick__extra--completed {
  border-color: rgba(24, 123, 57, 0.3);
  background: linear-gradient(180deg, rgba(244, 255, 248, 0.98), rgba(223, 246, 232, 0.95));
}

.crm-order-status-quick__extra--completed .crm-order-status-quick__extra-head strong {
  color: #16723a;
}

.crm-order-status-quick__extra--completed .crm-order-status-quick__extra-head small {
  color: #2a8f4c;
}

.crm-order-status-quick__extra--completed .form-label {
  color: #16723a;
}

.crm-order-status-quick__extra--completed .form-control,
.crm-order-status-quick__extra--completed .form-select {
  color: #13582d;
  border-color: rgba(24, 123, 57, 0.28);
  background: rgba(250, 255, 251, 0.96);
}

.crm-order-status-quick__extra--completed .crm-form-hint {
  color: #2a8f4c;
}

.crm-order-status-quick__extra--cancelled {
  border-color: rgba(197, 60, 60, 0.28);
  background: linear-gradient(180deg, rgba(255, 247, 247, 0.98), rgba(255, 230, 230, 0.95));
}

.crm-order-status-quick__extra--cancelled .crm-order-status-quick__extra-head strong {
  color: #b42318;
}

.crm-order-status-quick__extra--cancelled .crm-order-status-quick__extra-head small {
  color: #c2413a;
}

.crm-order-status-quick__extra--cancelled .form-label {
  color: #b42318;
}

.crm-order-status-quick__extra--cancelled .form-control,
.crm-order-status-quick__extra--cancelled .form-select {
  color: #7a1d1d;
  border-color: rgba(197, 60, 60, 0.24);
  background: rgba(255, 252, 252, 0.96);
}

.crm-order-status-quick__extra--cancelled .crm-form-hint {
  color: #c2413a;
}

.crm-order-status-quick__proof-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
  align-items: start;
}

.crm-order-status-quick__proof-slot {
  min-width: 0;
}

.crm-order-status-quick__proof-label {
  margin-bottom: 0.18rem;
  color: #9d6b10;
  font-size: 0.68rem;
  font-weight: 700;
}

.crm-order-status-quick__proof-current {
  margin-bottom: 0.28rem;
  padding: 0.28rem;
  border: 1px solid rgba(228, 191, 76, 0.4);
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.68);
}

.crm-order-status-quick__proof-current.is-marked-delete {
  border-color: rgba(220, 38, 38, 0.26);
  background: rgba(255, 241, 242, 0.95);
}

.crm-order-status-quick__proof-current-link {
  display: block;
  color: #855a00;
  text-decoration: none;
}

.crm-order-status-quick__proof-current-link:hover {
  color: #6e4a00;
  text-decoration: none;
}

.crm-order-status-quick__proof-current-image {
  display: block;
  width: 100%;
  height: 7.8rem;
  margin-bottom: 0.24rem;
  border: 1px solid rgba(228, 191, 76, 0.38);
  border-radius: 0.6rem;
  background: rgba(255, 251, 240, 0.96);
  object-fit: cover;
}

.crm-order-status-quick__proof-current-name {
  display: block;
  overflow: hidden;
  color: #855a00;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-order-status-quick__proof-current-note {
  display: block;
  margin-top: 0.18rem;
  color: #a16d0d;
  font-size: 0.65rem;
  line-height: 1.35;
}

.crm-order-status-quick__proof-current.is-marked-delete .crm-order-status-quick__proof-current-image {
  opacity: 0.46;
  filter: grayscale(0.28);
}

.crm-order-status-quick__proof-current.is-marked-delete .crm-order-status-quick__proof-current-name {
  color: #b42318;
  text-decoration: line-through;
}

.crm-order-status-quick__proof-current.is-marked-delete .crm-order-status-quick__proof-current-note {
  color: #b42318;
}

.crm-order-status-quick__proof-delete {
  margin-top: 0.24rem;
}

.crm-order-status-quick__proof-delete-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  margin: 0;
  color: #b42318;
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.crm-order-status-quick__proof-delete-toggle .form-check-input {
  width: 0.86rem;
  height: 0.86rem;
  margin: 0;
  flex: 0 0 auto;
  accent-color: #dc2626;
}

.crm-order-status-quick__proof-slot .form-control-sm {
  min-height: calc(1.4em + 0.38rem + 2px);
  padding: 0.22rem 0.42rem;
  font-size: 0.74rem;
}

@media (max-width: 1199.98px) {
  .crm-order-payment-quick__snapshot {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-order-status-quick__timeline {
    grid-template-columns: repeat(5, minmax(8rem, 1fr));
    overflow-x: auto;
    padding-bottom: 0.35rem;
  }

  .crm-order-payment-quick__timeline {
    gap: 0.8rem;
    overflow-x: visible;
    padding-bottom: 0;
  }

  .crm-order-payment-quick__timeline .crm-order-status-option--timeline {
    width: min(11rem, 100%);
    flex-basis: 11rem;
  }

  .crm-order-status-quick__proof-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-order-status-quick__proof-current-image {
    height: 8.8rem;
  }
}

@media (max-width: 767.98px) {
  .crm-order-payment-quick__snapshot {
    grid-template-columns: minmax(0, 1fr);
  }

  .crm-order-payment-quick__current {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 767.98px) {
  .crm-order-status-quick__timeline {
    grid-template-columns: repeat(5, minmax(7.2rem, 1fr));
    gap: 0.55rem;
  }

  .crm-order-payment-quick__timeline {
    gap: 0.55rem;
  }

  .crm-order-payment-quick__timeline .crm-order-status-option--timeline {
    width: min(9rem, 100%);
    flex-basis: 9rem;
  }

  .crm-order-status-option__line {
    left: calc(50% + 1.46rem);
    width: calc(100% - 0.72rem);
  }

  .crm-order-status-option__dot-shell {
    width: 3.15rem;
    height: 3.15rem;
  }

  .crm-order-status-option__dot {
    width: 1.58rem;
    height: 1.58rem;
  }

  .crm-order-status-option--timeline .crm-order-status-option__icon {
    font-size: 0.94rem;
  }

  .crm-order-status-option--timeline .crm-order-status-option__label {
    min-height: 2rem;
    font-size: 0.77rem;
  }

  .crm-order-status-quick__proof-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .crm-order-status-quick__proof-current-image {
    height: 10rem;
  }
}

.crm-customer-history-table th:nth-child(3),
.crm-customer-history-table td:nth-child(3) {
  min-width: 16rem;
}

.crm-customer-history-table {
  font-size: 0.8rem;
}

.crm-customer-history-table thead th {
  font-size: 0.74rem;
  padding-top: 0.78rem;
  padding-bottom: 0.78rem;
}

.crm-customer-history-table tbody td {
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.crm-customer-history-items {
  gap: 0.22rem;
}

.crm-customer-history-table .crm-table-primary,
.crm-customer-history-table .crm-order-item-line,
.crm-customer-history-table .crm-status-text {
  font-size: 0.82rem;
}

.crm-customer-history-table .crm-order-type-label {
  font-size: 0.79rem;
}

.crm-customer-history-status {
  align-items: center;
  gap: 0.12rem;
}

[data-customer-order-history-modal] .crm-history-modal__header h3 {
  font-size: 0.96rem;
}

[data-customer-order-history-modal] .crm-history-modal__header p,
[data-customer-order-history-modal] .crm-history-modal__count,
[data-customer-order-history-modal] .crm-history-modal__summary {
  font-size: 0.78rem;
}

[data-customer-order-history-modal] .crm-history-modal__actions > .btn {
  font-size: 0.79rem;
}

.crm-order-shipment-preview__meta-grid {
  display: grid;
  gap: 0.85rem 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.crm-order-shipment-preview__address {
  margin-top: 1rem;
  padding: 0.92rem 1rem;
  border: 1px solid rgba(214, 223, 233, 0.96);
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(255, 255, 255, 0.98));
}

.crm-order-shipment-preview__address span {
  display: block;
  font-size: 0.78rem;
  color: var(--tblr-muted);
}

.crm-order-shipment-preview__address p {
  margin: 0.35rem 0 0;
  color: var(--tblr-body-color);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.55;
  white-space: pre-line;
}

[data-order-shipment-preview-modal] .crm-history-modal__header h3 {
  font-size: 0.96rem;
}

[data-order-shipment-preview-modal] .crm-history-modal__header p,
[data-order-shipment-preview-modal] .crm-history-modal__count,
[data-order-shipment-preview-modal] .crm-history-modal__summary {
  font-size: 0.78rem;
}

[data-order-shipment-preview-modal] .crm-history-modal__actions > .btn {
  font-size: 0.79rem;
}

.crm-order-product-preview__list {
  display: grid;
  gap: 0.8rem;
}

.crm-order-product-preview__card {
  padding: 0.92rem 1rem;
  border: 1px solid rgba(214, 223, 233, 0.96);
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
}

.crm-order-product-preview__card.is-active {
  border-color: rgba(23, 58, 99, 0.26);
  box-shadow: 0 10px 24px rgba(23, 58, 99, 0.08);
}

.crm-order-product-preview__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.crm-order-product-preview__head strong {
  font-size: 0.88rem;
  line-height: 1.45;
}

.crm-order-product-preview__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: rgba(180, 83, 9, 0.12);
  color: #b45309;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.crm-order-product-preview__meta,
.crm-order-product-preview__note {
  margin-top: 0.4rem;
  color: #5d6f85;
  font-size: 0.8rem;
  line-height: 1.5;
}

.crm-order-product-preview__note {
  color: var(--tblr-body-color);
}

.crm-order-product-preview__prices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.9rem;
  margin-top: 0.6rem;
  color: var(--tblr-body-color);
  font-size: 0.79rem;
  font-weight: 700;
}

[data-order-product-preview-modal] .crm-history-modal__header h3 {
  font-size: 0.96rem;
}

[data-order-product-preview-modal] .crm-history-modal__header p,
[data-order-product-preview-modal] .crm-history-modal__count,
[data-order-product-preview-modal] .crm-history-modal__summary {
  font-size: 0.78rem;
}

[data-order-product-preview-modal] .crm-history-modal__actions > .btn {
  font-size: 0.79rem;
}

body.crm-history-modal-open {
  overflow: hidden;
}

.crm-soft-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  color: var(--tblr-primary);
}

.crm-soft-link:hover,
.text-link:hover {
  color: #0f2743;
}

.text-link {
  color: var(--tblr-primary);
  font-weight: 600;
}

.row-actions,
.stack-links,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.form-label {
  color: #223049;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.38rem;
}

.crm-required-marker {
  color: var(--tblr-danger);
  font-weight: 800;
  margin-left: 0.18rem;
}

.form-control,
.form-select {
  min-height: var(--kg-control-height);
  border-color: rgba(206, 216, 227, 0.96);
  border-radius: var(--kg-control-radius);
  background: #fbfcfe;
  color: var(--tblr-body-color);
  padding: 0.62rem 0.82rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(var(--tblr-primary-rgb), 0.48);
  box-shadow: 0 0 0 0.25rem rgba(var(--tblr-primary-rgb), 0.14);
}

textarea.form-control {
  min-height: 6.25rem;
  resize: vertical;
}

.crm-form-section .card-header .card-title {
  margin: 0;
}

.crm-form-section {
  --crm-section-accent: rgba(var(--tblr-primary-rgb), 0.92);
  --crm-section-tint: rgba(var(--tblr-primary-rgb), 0.08);
  --crm-section-ring: rgba(var(--tblr-primary-rgb), 0.18);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(222, 230, 239, 0.94);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.98)),
    linear-gradient(135deg, var(--crm-section-tint), transparent 58%);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.05);
}

.crm-form-section::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--crm-section-accent), rgba(255, 255, 255, 0));
}

.crm-filter-card::before {
  display: none;
}

.crm-form-section .card-header {
  position: relative;
  background:
    linear-gradient(135deg, var(--crm-section-tint), rgba(255, 255, 255, 0.92) 46%, rgba(255, 255, 255, 0.98) 100%);
  border-bottom-color: var(--crm-section-ring);
}

.crm-form-section--order {
  --crm-section-accent: #c99a2d;
  --crm-section-tint: rgba(201, 154, 45, 0.12);
  --crm-section-ring: rgba(201, 154, 45, 0.2);
}

.crm-form-section--items {
  --crm-section-accent: #275da3;
  --crm-section-tint: rgba(39, 93, 163, 0.1);
  --crm-section-ring: rgba(39, 93, 163, 0.16);
}

.crm-form-section--payment {
  --crm-section-accent: #218a56;
  --crm-section-tint: rgba(33, 138, 86, 0.1);
  --crm-section-ring: rgba(33, 138, 86, 0.18);
}

.crm-form-section--shipping {
  --crm-section-accent: #16839a;
  --crm-section-tint: rgba(22, 131, 154, 0.1);
  --crm-section-ring: rgba(22, 131, 154, 0.18);
}

.crm-form-section--closing {
  --crm-section-accent: #7b6cb8;
  --crm-section-tint: rgba(123, 108, 184, 0.1);
  --crm-section-ring: rgba(123, 108, 184, 0.18);
}

.crm-section-heading {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.crm-section-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-left: auto;
}

.crm-section-icon {
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--crm-section-accent) 12%, #fff);
  color: var(--crm-section-accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--crm-section-accent) 14%, transparent);
}

.crm-section-icon .icon {
  width: 1.15rem;
  height: 1.15rem;
  stroke-width: 2;
}

.crm-form-section .card-header p {
  margin: 0.25rem 0 0;
  color: var(--tblr-muted);
  font-size: 0.84rem;
}

.crm-form-section {
  scroll-margin-top: 7rem;
}

.crm-scroll-anchor {
  scroll-margin-top: 7rem;
}

.crm-order-form .crm-section-stack {
  gap: 0.95rem;
}

.crm-filter-card--compact .card-header {
  padding-bottom: 0.95rem;
}

.crm-filter-card--compact .card-body {
  padding-top: 1rem;
}

.crm-filter-card--compact .crm-shortcut-bar {
  gap: 0.45rem;
}

.crm-filter-card--compact .crm-shortcut-button {
  min-height: 2.4rem;
  padding: 0.52rem 0.82rem;
  font-size: 0.8rem;
}

.crm-label-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.crm-label-icon {
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 0.48rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--crm-section-accent) 10%, #fff);
  color: var(--crm-section-accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--crm-section-accent) 12%, transparent);
}

.crm-label-icon .icon {
  width: 0.88rem;
  height: 0.88rem;
  stroke-width: 2;
}

.crm-table-head-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
}

.crm-table-head-label .icon {
  width: 0.95rem;
  height: 0.95rem;
  color: var(--crm-section-accent);
  stroke-width: 2;
}

.crm-chat-shortcut {
  min-width: 11.5rem;
  justify-content: center;
  gap: 0.42rem;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.crm-chat-shortcut .icon {
  width: 0.95rem;
  height: 0.95rem;
}

.crm-link-shortcut {
  min-width: 12.5rem;
}

.crm-link-shortcut--tracking {
  width: 100%;
  min-width: 0;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.crm-link-shortcut--tracking .icon {
  width: 0.95rem;
  height: 0.95rem;
}

.crm-tracking-url-input-group {
  align-items: stretch;
}

.crm-tracking-url-input-group > .form-control {
  min-width: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.crm-tracking-url-input-group > .crm-link-shortcut--tracking-inline {
  min-width: 0;
  width: auto;
  padding-inline: 0.72rem;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.crm-link-shortcut--tracking-inline {
  gap: 0.35rem;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1;
}

.crm-link-shortcut--tracking-inline .icon {
  width: 0.88rem;
  height: 0.88rem;
}

.crm-field-shortcut-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.38rem;
}

.crm-field-shortcut-head .form-label {
  margin-bottom: 0;
}

.crm-field-shortcut-panel {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-left: auto;
}

.crm-field-shortcut-panel .crm-link-shortcut--tracking {
  width: auto;
  min-width: 14rem;
}

.crm-inline-shortcut-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.65rem;
}

.crm-inline-shortcut-row--tracking {
  margin-top: 0.15rem;
}

.crm-tracking-url-action-col {
  display: flex;
  align-items: flex-end;
}

.crm-tracking-url-action-shell {
  width: 100%;
}

.crm-form-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.crm-orders-filter-footer-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-left: auto;
}

.crm-mobile-form-actions {
  display: none;
}

.crm-shortcut-bar {
  align-items: center;
  justify-content: flex-end;
}

.crm-shortcut-button {
  min-width: 10.75rem;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 999px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.crm-shortcut-button .icon {
  width: 1rem;
  height: 1rem;
}

.crm-shortcut-button strong {
  font-size: 0.78rem;
  font-weight: 800;
  opacity: 0.9;
}

.crm-shortcut-button.active,
.crm-shortcut-button:hover,
.crm-shortcut-button:focus {
  background: linear-gradient(135deg, var(--tblr-primary), #224e85);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 14px 30px rgba(23, 58, 99, 0.22);
}

.crm-form-shortcut-note {
  color: var(--tblr-muted);
  font-size: 0.82rem;
}

.crm-pagination-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
}

.crm-pagination-bar--footer {
  border-top: 1px solid var(--tblr-border-color);
}

.crm-pagination-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.crm-pagination-meta strong {
  font-size: 0.92rem;
}

.crm-pagination-meta span {
  color: var(--tblr-muted);
  font-size: 0.82rem;
}

.crm-pagination-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.crm-pagination-actions .btn.disabled {
  pointer-events: none;
  opacity: 0.52;
}

.crm-workmode-card .card-body {
  display: grid;
  gap: 1rem;
}

.crm-workmode-head {
  display: grid;
  gap: 0.32rem;
}

.crm-workmode-eyebrow {
  color: var(--kg-accent);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.crm-workmode-head strong {
  font-size: 1.02rem;
}

.crm-workmode-head small {
  color: var(--tblr-muted);
  font-size: 0.84rem;
}

.crm-workmode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.crm-workmode-chip {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.95rem 1rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(206, 216, 227, 0.96);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.crm-workmode-chip:hover,
.crm-workmode-chip:focus,
.crm-workmode-chip.active {
  transform: translateY(-1px);
  border-color: rgba(23, 58, 99, 0.18);
  box-shadow: 0 16px 32px rgba(23, 58, 99, 0.1);
}

.crm-workmode-chip.active {
  background: linear-gradient(135deg, rgba(23, 58, 99, 0.08), rgba(201, 154, 45, 0.08));
}

.crm-workmode-chip__icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(23, 58, 99, 0.08);
  color: var(--tblr-primary);
}

.crm-workmode-chip__body {
  display: grid;
  gap: 0.18rem;
}

.crm-workmode-chip__body strong {
  font-size: 0.92rem;
}

.crm-workmode-chip__body small {
  color: var(--tblr-muted);
  font-size: 0.8rem;
}

.crm-workmode-chip__scope {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: rgba(16, 35, 61, 0.07);
  color: var(--tblr-primary);
  font-size: 0.74rem;
  font-weight: 700;
}

.crm-inline-form {
  margin: 0;
}

.crm-queue-actions {
  display: grid;
  gap: 0.55rem;
}

.crm-queue-actions__primary,
.crm-queue-actions__secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.crm-queue-actions__primary > *,
.crm-queue-actions__secondary > * {
  flex: 1 1 calc(50% - 0.35rem);
  min-width: 0;
}

.crm-queue-actions__more {
  display: grid;
  gap: 0.55rem;
}

.crm-queue-actions__more summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  width: fit-content;
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  border: 1px dashed rgba(23, 58, 99, 0.18);
  color: var(--tblr-primary);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.crm-queue-actions__more summary::-webkit-details-marker {
  display: none;
}

.crm-queue-actions__more[open] summary {
  background: rgba(23, 58, 99, 0.05);
  border-style: solid;
}

.crm-form-label-spacer {
  visibility: hidden;
}

.crm-form-check {
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(206, 216, 227, 0.96);
  border-radius: 0.9rem;
  background: #fbfcfe;
}

.crm-form-check .form-check-input {
  margin: 0;
}

.crm-form-check .form-check-label {
  margin: 0;
  color: var(--tblr-body-color);
  font-weight: 600;
}

.crm-form-hint,
.muted-note,
.description-text {
  color: var(--tblr-muted);
  font-size: 0.84rem;
}

.crm-form-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--tblr-border-color), transparent);
  margin: 0.2rem 0;
}

.auth-page {
  background:
    radial-gradient(circle at top right, rgba(201, 154, 45, 0.18), transparent 22%),
    radial-gradient(circle at bottom left, rgba(var(--tblr-primary-rgb), 0.22), transparent 30%),
    linear-gradient(180deg, #f4f7fb 0%, #edf2f8 100%);
}

.auth-page-shell {
  min-height: 100vh;
}

.auth-shell-container {
  width: min(100%, 72rem);
}

.auth-brand-row {
  display: flex;
  justify-content: flex-start;
}

.auth-brand {
  color: var(--tblr-body-color);
  flex-direction: column;
  gap: 0;
  align-items: flex-start;
  text-align: left;
}

.auth-brand .admin-brand-logo-shell {
  min-width: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.auth-brand .admin-brand-logo {
  width: min(22rem, 84vw);
  max-height: 4.8rem;
  object-fit: contain;
}

.auth-brand-copy strong {
  color: #11263f;
  font-size: 1rem;
}

.auth-brand-copy small {
  color: #607086;
  max-width: 28rem;
}

.auth-shell-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(20rem, 27rem);
  gap: 2rem;
  align-items: stretch;
}

.auth-shell-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.2rem 1.25rem 1.2rem 0;
  max-width: 34rem;
}

.auth-shell-intro__eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.46rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  color: #173a63;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.auth-shell-intro__title {
  margin: 0.85rem 0 0;
  color: #10233c;
  font-size: clamp(2rem, 2.3vw + 1rem, 3.1rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.auth-shell-intro__text {
  margin: 1rem 0 0;
  color: #5d6d80;
  font-size: 0.98rem;
  line-height: 1.72;
}

.auth-shell-intro__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.2rem;
}

.auth-shell-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.56rem 0.82rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  color: #173a63;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

@media (max-width: 991.98px) {
  .page-topbar {
    display: none;
  }

  .crm-form-flow {
    top: 0.7rem;
  }

  .crm-form-flow__nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.1rem;
    scrollbar-width: none;
  }

  .crm-form-flow__nav::-webkit-scrollbar {
    display: none;
  }

  .crm-form-flow__link {
    flex: 0 0 auto;
  }

  .crm-form-flow--compact-overview {
    grid-template-columns: 1fr;
  }

  .crm-form-flow--compact-overview .crm-form-flow__nav {
    justify-content: flex-start;
  }

  .crm-form-flow__tools {
    width: 100%;
    justify-items: stretch;
  }

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

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

  .admin-sidebar .container-fluid {
    min-height: 4.4rem;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
  }

  .admin-sidebar .navbar-brand {
    padding-top: 0;
    padding-bottom: 0;
    margin-right: auto;
  }

  .admin-sidebar .navbar-toggler {
    padding: 0.3rem;
    margin-right: 0.3rem;
  }

  .admin-sidebar .admin-brand-logo-shell {
    min-width: 0;
    min-height: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .admin-sidebar .admin-brand-logo {
    width: 9.25rem;
    max-height: 2rem;
  }

  .admin-sidebar .admin-brand-copy {
    display: none;
  }

  .admin-sidebar-section + .admin-sidebar-section {
    margin-top: 0.7rem;
  }

  .admin-sidebar-section__label strong,
  .admin-sidebar-disclosure__copy strong {
    font-size: 0.7rem;
  }

  .admin-sidebar-section__label small,
  .admin-sidebar-disclosure__copy small {
    font-size: 0.66rem;
  }

  .admin-sidebar-mobile-user .nav-link {
    width: 2.45rem;
    height: 2.45rem;
  }

  .profile-danger-zone {
    align-items: stretch;
    flex-direction: column;
  }

  .crm-image-lightbox__footer {
    flex-direction: column;
    align-items: stretch;
  }

  .crm-image-lightbox__actions {
    width: 100%;
    justify-content: stretch;
  }

  .crm-image-lightbox__actions > .btn,
  .crm-image-lightbox__actions > form {
    width: 100%;
  }

  .crm-image-lightbox__actions > form .btn {
    width: 100%;
  }

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

  .crm-attachment-preview-actions {
    flex-direction: column;
  }

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

  .auth-shell-container {
    width: 100%;
  }

  .auth-brand-row {
    justify-content: center;
    margin-bottom: 1.25rem !important;
  }

  .auth-brand {
    align-items: center;
    text-align: center;
  }

  .auth-brand-copy {
    align-items: center;
  }

  .auth-shell-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .auth-shell-intro {
    padding: 0;
    max-width: none;
    text-align: center;
  }

  .auth-shell-intro__eyebrow {
    margin-inline: auto;
  }

  .auth-shell-intro__chips {
    justify-content: center;
  }

  .auth-card {
    max-width: none;
    margin-left: 0;
  }
}

.auth-card {
  position: relative;
  overflow: hidden;
  border-radius: 1.18rem;
  border-color: rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(18px);
  box-shadow: var(--kg-shadow-lg);
  max-width: 25.5rem;
  width: 100%;
  margin-left: auto;
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 0.24rem;
  background: linear-gradient(90deg, rgba(23, 58, 99, 0.96), rgba(201, 154, 45, 0.82));
}

.auth-card .card-body {
  padding: 1.35rem;
}

.auth-form .form-label {
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #17314d;
}

.auth-form .form-control {
  min-height: 2.75rem;
}

.auth-form .form-control:focus {
  border-color: rgba(23, 58, 99, 0.36);
  box-shadow: 0 0 0 0.22rem rgba(23, 58, 99, 0.08);
}

.auth-form .alert {
  border-radius: 1rem;
}

.auth-form .btn {
  min-height: 2.75rem;
}

.auth-form .btn .icon {
  width: 1rem;
  height: 1rem;
}

.auth-note-box {
  margin-top: 0.2rem;
  border-color: rgba(201, 154, 45, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(252, 249, 241, 0.95));
}

.auth-password-note {
  margin-top: 0.8rem;
}

.auth-form-footer {
  gap: 0.75rem;
}

.btn {
  border-radius: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, #173a63 0%, #234f86 100%);
  border-color: transparent;
  box-shadow: 0 16px 32px rgba(var(--tblr-primary-rgb), 0.18);
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, #153356 0%, #21497b 100%);
  box-shadow: 0 20px 42px rgba(var(--tblr-primary-rgb), 0.22);
}

.btn-outline-primary,
.btn-outline-secondary,
.btn-ghost-secondary {
  background: rgba(255, 255, 255, 0.84);
  border-color: rgba(209, 217, 229, 0.95);
  color: var(--tblr-body-color);
}

.btn-outline-primary:hover,
.btn-outline-secondary:hover,
.btn-ghost-secondary:hover {
  border-color: rgba(23, 58, 99, 0.18);
  color: #122d4d;
  background: rgba(255, 255, 255, 0.98);
}

.crm-hero-card {
  position: relative;
  overflow: hidden;
  padding: 1.45rem 1.5rem;
  border-radius: 1.65rem;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background:
    radial-gradient(circle at top right, rgba(201, 154, 45, 0.16), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 249, 252, 0.92));
  box-shadow: var(--kg-shadow-md);
}

.crm-hero-card::after {
  content: "";
  position: absolute;
  inset: auto -6% -72% auto;
  width: 20rem;
  height: 20rem;
  background: radial-gradient(circle, rgba(23, 58, 99, 0.16), transparent 60%);
}

.crm-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(18rem, 0.9fr);
  gap: 1rem;
  align-items: start;
}

.crm-hero-card--staff-compact {
  padding: 1.18rem 1.25rem;
}

.crm-hero-card--staff-compact .crm-hero-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(16.5rem, 0.82fr);
  gap: 0.9rem;
}

.crm-hero-side {
  display: grid;
  gap: 0.85rem;
}

.crm-hero-side--staff-compact {
  gap: 0;
}

.crm-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.38rem 0.78rem;
  border-radius: var(--kg-radius-pill);
  background: rgba(201, 154, 45, 0.12);
  color: #7d6320;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.crm-hero-title {
  margin: 0.95rem 0 0;
  max-width: 52rem;
  font-size: clamp(1.7rem, 1.65vw + 1rem, 2.75rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.crm-hero-copy {
  max-width: 48rem;
  margin: 0.9rem 0 0;
  color: #5c6c80;
  font-size: 0.96rem;
  line-height: 1.7;
}

.crm-hero-title--compact {
  max-width: 40rem;
  font-size: clamp(1.38rem, 1vw + 1rem, 2.1rem);
  line-height: 1.08;
}

.crm-hero-copy--compact {
  max-width: 43rem;
  font-size: 0.87rem;
  line-height: 1.62;
}

.crm-soft-panel--dashboard-note {
  padding: 0.95rem 1rem;
}

.crm-dashboard-note-list {
  display: grid;
  gap: 0.72rem;
}

.crm-dashboard-note-item {
  display: grid;
  gap: 0.22rem;
}

.crm-dashboard-note-item + .crm-dashboard-note-item {
  padding-top: 0.72rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.crm-dashboard-note-item strong {
  color: inherit;
  font-size: 0.9rem;
  line-height: 1.4;
}

.crm-dashboard-note-item span {
  color: inherit;
  font-size: 0.78rem;
  line-height: 1.52;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  background: rgba(var(--tblr-primary-rgb), 0.08);
  color: var(--tblr-primary);
  font-size: 0.8rem;
  font-weight: 700;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.5rem;
  border-radius: 0.75rem;
  border: 1px solid transparent;
  padding: 0.65rem 0.95rem;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: all 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--tblr-primary);
  color: #fff;
  box-shadow: 0 10px 24px rgba(var(--tblr-primary-rgb), 0.22);
}

.button-secondary {
  background: #fff;
  color: var(--tblr-body-color);
  border-color: var(--tblr-border-color);
}

.button-ghost {
  background: transparent;
  color: var(--tblr-muted);
  border-color: transparent;
}

.button.small {
  min-height: 2rem;
  padding: 0.45rem 0.7rem;
  font-size: 0.78rem;
}

@media (max-width: 1199.98px) {
  .crm-kpi-value {
    font-size: 1.5rem;
  }

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

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

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

  .crm-inline-chips--hero {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .crm-inline-chips--hero .crm-chip {
    justify-content: center;
    text-align: center;
  }

  .crm-dashboard-inline-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .crm-panel-card .card-header,
  .crm-form-section .card-header,
  .crm-note-head,
  .activity-header,
  .crm-kpi-head,
  .crm-profile-hero {
    flex-direction: column;
  }

  .crm-page-meta,
  .crm-inline-list,
  .crm-link-list,
  .crm-action-row,
  .row-actions,
  .stack-links,
  .tag-list,
  .crm-form-footer,
  .page-header .btn-list {
    width: 100%;
  }

  .crm-inline-list > *,
  .crm-link-list > *,
  .crm-action-row > *,
  .row-actions > *,
  .crm-form-footer > *,
  .page-header .btn-list > * {
    flex: 1 1 auto;
  }

  .crm-orders-filter-footer-toggles {
    width: 100%;
    margin-left: 0;
  }

  .crm-section-header-actions,
  .crm-chat-shortcut {
    width: 100%;
  }

  .crm-inline-shortcut-row {
    justify-content: flex-start;
  }

  .crm-field-shortcut-head {
    align-items: stretch;
  }

  .crm-field-shortcut-panel,
  .crm-field-shortcut-panel > * {
    width: 100%;
  }

  .crm-inline-shortcut-row--tracking,
  .crm-inline-shortcut-row--tracking > * {
    width: 100%;
  }

  .crm-pagination-bar,
  .crm-pagination-actions,
  .crm-pagination-actions > * {
    width: 100%;
  }

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

  .crm-workmode-chip {
    grid-template-columns: auto 1fr;
  }

  .crm-workmode-chip__scope {
    grid-column: 1 / -1;
    justify-self: flex-start;
  }

  .crm-queue-actions__primary,
  .crm-queue-actions__secondary,
  .crm-queue-actions__primary > *,
  .crm-queue-actions__secondary > * {
    width: 100%;
  }

  .crm-form-flow {
    padding: 0.9rem;
    border-radius: 1rem;
  }

  .crm-form-flow__copy {
    margin-bottom: 0.7rem;
  }

  .crm-form-flow__copy strong {
    font-size: 0.88rem;
  }

  .crm-form-flow__copy small {
    font-size: 0.77rem;
  }

  .crm-form-flow--compact-overview {
    padding: 0.85rem 0.9rem;
  }

  .crm-form-flow--compact-overview .crm-form-flow__copy strong {
    font-size: 0.9rem;
  }

  .crm-form-flow--order-command .crm-form-flow__actions .btn {
    min-height: 2.2rem;
    padding-inline: 0.82rem;
  }

  .crm-workspace-metrics {
    gap: 0.6rem;
  }

  .crm-workspace-metric {
    padding: 0.78rem 0.8rem;
    border-radius: 0.9rem;
  }

  .crm-workspace-metric__value {
    font-size: 0.9rem;
  }

  .crm-workspace-metric__meta {
    font-size: 0.74rem;
  }

  .crm-workspace-snapshot {
    grid-template-columns: 1fr;
    gap: 0.68rem;
  }

  .crm-workspace-snapshot__card {
    padding: 0.9rem 0.92rem 0.95rem;
    border-radius: 1rem;
  }

  .crm-workspace-snapshot__value {
    margin-top: 0.62rem;
    font-size: 0.94rem;
  }

  .crm-workspace-snapshot__meta,
  .crm-workspace-snapshot__hint {
    font-size: 0.76rem;
  }

  .crm-form-flow__link {
    min-height: 2.3rem;
    padding: 0.5rem 0.78rem;
    font-size: 0.78rem;
  }

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

  .crm-quick-action-card {
    padding: 0.92rem;
    border-radius: 1rem;
  }

  .crm-case-order-line,
  .crm-case-timeline__head {
    flex-direction: column;
  }

  .crm-case-order-line span {
    white-space: normal;
  }

  .crm-quick-drawer {
    align-items: flex-end;
  }

  .crm-quick-drawer__dialog {
    width: 100%;
    height: auto;
    max-height: calc(100% - 2.2rem);
    margin-top: 2.2rem;
    border-radius: 1.25rem 1.25rem 0 0;
  }

  .crm-quick-drawer__header,
  .crm-quick-drawer__body,
  .crm-quick-drawer__footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .crm-quick-drawer__footer {
    flex-direction: column;
    align-items: stretch;
  }

  .crm-quick-drawer__footer > * {
    width: 100%;
  }

  .crm-sticky-action-bar {
    left: 0.75rem;
    right: 0.75rem;
    bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  }

  .crm-sticky-action-bar__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    padding: 0.85rem;
    border-radius: 1rem;
  }

  .crm-sticky-action-bar__copy {
    display: none;
  }

  .crm-sticky-action-bar__actions,
  .crm-sticky-action-bar__actions > * {
    width: 100%;
  }

  .crm-attachment-zone__guide {
    padding: 0.8rem 0.85rem;
  }

  .crm-attachment-cluster {
    padding: 0.82rem;
    border-radius: 1.05rem;
  }

  .page-topbar .btn {
    display: none;
  }

  .crm-page-header-row {
    flex-direction: column;
    align-items: stretch !important;
  }

  .crm-page-header-row > .crm-page-header-main,
  .crm-page-header-row > .crm-page-header-actions {
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
  }

  .crm-page-header-row > .crm-page-header-actions {
    margin-left: 0 !important;
  }

  .crm-page-header-actions .btn-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9.75rem, 1fr));
    width: 100%;
    gap: 0.65rem;
  }

  .crm-page-header-actions .btn-list > * {
    min-width: 0;
    width: 100%;
  }

  .crm-panel-card .card-body,
  .crm-form-section .card-body,
  .crm-profile-card .card-body,
  .crm-soft-card .card-body,
  .crm-panel-card .card-header,
  .crm-form-section .card-header {
    padding: 0.9rem;
  }

  .crm-page-header {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
  }

  .page-pretitle {
    margin-bottom: 0.45rem;
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    line-height: 1.45;
  }

  .page-title {
    max-width: none;
    font-size: clamp(1.75rem, 6vw, 2.2rem);
    line-height: 1.08;
    letter-spacing: -0.03em;
    overflow-wrap: break-word;
  }

  .crm-page-description {
    max-width: none;
    font-size: 0.92rem;
    line-height: 1.6;
  }

  .crm-page-header--compact .page-title {
    font-size: clamp(1.4rem, 5.1vw, 1.82rem);
  }

  .crm-page-header--compact .crm-page-description {
    font-size: 0.84rem;
  }

  .crm-form-flow__title {
    font-size: 1rem;
    line-height: 1.34;
  }

  .crm-form-flow__hint {
    font-size: 0.78rem;
  }

  .crm-page-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
    width: 100%;
  }

  .crm-chip {
    width: 100%;
    justify-content: flex-start;
    white-space: normal;
    line-height: 1.35;
  }

  .crm-hero-title {
    font-size: 1.9rem;
  }

  .crm-hero-title--compact {
    font-size: 1.55rem;
  }

  .crm-hero-card {
    padding: 1.15rem 1rem;
  }

  .crm-hero-card--staff-compact {
    padding: 1rem;
  }

  .crm-hero-card--staff-compact.crm-hero-card--staff {
    display: none;
  }

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

  .crm-hero-metric-card {
    padding: 0.78rem 0.8rem;
  }

  .crm-hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

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

  .crm-inline-chips--hero {
    grid-template-columns: 1fr;
  }

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

  .crm-dashboard-inline-stat {
    padding: 0.68rem 0.72rem;
  }

  .crm-dashboard-inline-stat strong {
    font-size: 0.92rem;
  }

  .crm-soft-panel--dashboard-note {
    padding: 0.82rem 0.85rem;
  }

  .crm-shortcut-button {
    min-width: 0;
  }

  .crm-payment-slip-grid,
  .crm-payment-slip-grid--two-up {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .crm-pack-summary {
    padding: 0.85rem;
  }

  .crm-pack-summary__head {
    flex-direction: column;
    align-items: stretch;
  }

  .crm-pack-summary__head .btn {
    width: 100%;
  }

  .crm-pack-summary__metric {
    width: 100%;
    justify-content: flex-start;
  }

  .crm-pack-summary__line-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .crm-inline-proof-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-proof-cluster__head {
    flex-direction: column;
    align-items: stretch;
  }

  .crm-proof-cluster__head .btn {
    width: 100%;
  }

  .crm-attachment-gallery-panel {
    padding: 0.82rem;
  }

  .crm-attachment-gallery-panel__head {
    flex-direction: column;
    align-items: stretch;
  }

  .crm-attachment-gallery-panel__links,
  .crm-attachment-gallery-panel__links > * {
    width: 100%;
  }

  .crm-attachment-reel {
    grid-auto-columns: minmax(6.1rem, 6.6rem);
  }

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

  .crm-payment-slip-thumb,
  .crm-payment-slip-file {
    aspect-ratio: 1 / 1;
    min-height: 0;
  }

  .crm-payment-slip-thumb {
    padding: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 249, 252, 0.96));
  }

  .crm-payment-slip-thumb img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    object-position: center;
    border-radius: 0;
  }

  .crm-payment-slip-meta {
    gap: 0.18rem;
    padding: 0.55rem 0.6rem 0.65rem;
  }

  .crm-payment-slip-meta strong,
  .crm-payment-slip-meta small {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .crm-image-lightbox {
    padding: 0.8rem;
  }

  .crm-image-lightbox__nav {
    width: 2.5rem;
    height: 2.5rem;
  }

  .crm-image-lightbox__nav--prev {
    left: 0.65rem;
  }

  .crm-image-lightbox__nav--next {
    right: 0.65rem;
  }

  .crm-image-lightbox__dialog {
    width: 100%;
    max-height: calc(100vh - 1.6rem);
  }

  .crm-image-lightbox__stage {
    padding: 0.9rem 0.9rem 0.7rem;
  }

  .crm-image-lightbox__stage img {
    max-height: calc(100vh - 14rem);
  }

  .crm-order-items-table-wrap {
    overflow: visible;
  }

  .crm-order-items-table,
  .crm-order-items-table tbody,
  .crm-order-items-table tr,
  .crm-order-items-table td {
    display: block;
    width: 100%;
  }

  .crm-order-items-table thead {
    display: none;
  }

  .crm-order-items-table tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem 0.75rem;
    padding: 1rem;
    border-bottom: 1px solid rgba(223, 230, 239, 0.9);
  }

  .crm-order-items-table tbody tr:last-child {
    border-bottom: 0;
  }

  .crm-order-items-table tbody td {
    min-width: 0;
    padding: 0;
    border: 0;
  }

  .crm-order-items-table tbody td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.35rem;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.01em;
  }

  .crm-order-items-table tbody td:nth-child(1),
  .crm-order-items-table tbody td:nth-child(4),
  .crm-order-items-table tbody td:nth-child(5) {
    grid-column: 1 / -1;
  }

  .crm-order-items-table--unified tbody td:nth-child(2),
  .crm-order-items-table--unified tbody td:nth-child(5) {
    grid-column: 1 / -1;
  }

  .crm-order-items-table--unified tbody td:nth-child(4) {
    grid-column: auto;
  }

  .crm-order-items-table .form-control,
  .crm-order-items-table .form-select,
  .crm-order-items-table .crm-searchable-select,
  .crm-order-items-table .crm-searchable-input {
    width: 100%;
  }

  .crm-order-items-table .crm-searchable-input {
    font-size: 0.95rem;
  }

  .crm-table-card .table thead th,
  .crm-table-card .table tbody td {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .crm-order-history-button {
    width: 100%;
    min-width: 0;
  }

  .crm-section-stack--mobile-action-pad {
    padding-bottom: calc(11.5rem + var(--kg-mobile-nav-height, 4.65rem));
  }

  .crm-form-footer--desktop-mobilebar {
    display: none;
  }

  .crm-mobile-form-actions {
    position: fixed;
    left: 0;
    right: 0;
    bottom: var(--kg-mobile-nav-height, 4.65rem);
    z-index: 1070;
    display: block;
    padding: 0.85rem;
    background: linear-gradient(180deg, rgba(244, 247, 251, 0) 0%, rgba(244, 247, 251, 0.82) 22%, rgba(244, 247, 251, 0.97) 100%);
    pointer-events: none;
  }

  .crm-mobile-form-actions__panel {
    pointer-events: auto;
    display: grid;
    gap: 0.65rem;
    max-width: 100%;
    padding: 0.8rem;
    border: 1px solid rgba(201, 154, 45, 0.22);
    border-radius: 1.1rem;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    box-shadow: 0 -14px 30px rgba(15, 23, 42, 0.12);
  }

  .crm-mobile-form-actions__buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .crm-mobile-form-actions__buttons--single {
    grid-template-columns: 1fr;
  }

  .crm-mobile-form-actions .btn {
    min-height: 3rem;
    justify-content: center;
    font-weight: 700;
  }

  .crm-mobile-form-actions__cancel {
    width: 100%;
  }

  .crm-mobile-card-table {
    display: block;
    width: 100%;
  }

  .crm-mobile-card-table thead {
    display: none;
  }

  .crm-mobile-card-table tbody {
    display: grid;
    gap: 0.85rem;
    padding: 0.9rem;
  }

  .crm-mobile-card-table tbody tr {
    display: block;
    border: 1px solid rgba(220, 228, 237, 0.96);
    border-radius: 1rem;
    padding: 0.95rem;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  }

  .crm-mobile-card-table tbody tr.crm-mobile-card-table__empty {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .crm-mobile-card-table tbody td {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
  }

  .crm-mobile-card-table tbody tr.crm-mobile-card-table__empty td::before {
    display: none;
  }

  .crm-mobile-card-table tbody td + td {
    margin-top: 0.8rem;
  }

  .crm-mobile-card-table tbody td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.32rem;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
  }

  .crm-mobile-card-table tbody td.text-end {
    text-align: left !important;
  }

  .crm-mobile-card-table tbody td.crm-orders-table__status-cell {
    text-align: right;
  }

  .crm-mobile-card-table .crm-action-row,
  .crm-mobile-card-table .crm-queue-actions__primary,
  .crm-mobile-card-table .crm-queue-actions__secondary {
    justify-content: flex-start;
    width: 100%;
  }

  .crm-mobile-card-table .crm-action-row > *,
  .crm-mobile-card-table .crm-queue-actions__primary > *,
  .crm-mobile-card-table .crm-queue-actions__secondary > * {
    flex: 1 1 calc(50% - 0.35rem);
    min-width: 0;
  }

  .crm-mobile-card-table .crm-action-row--icon-only > * {
    flex: 0 0 auto;
  }

  .crm-order-party-card {
    min-width: 0;
  }

  .crm-history-modal {
    padding: 0.8rem;
  }

  .crm-history-modal__dialog {
    width: 100%;
    max-height: calc(100vh - 1.6rem);
    border-radius: 1.15rem;
  }

  .crm-history-modal__header,
  .crm-history-modal__footer {
    align-items: stretch;
    flex-direction: column;
    padding: 0.9rem 1rem;
  }

  .crm-history-modal__header {
    position: relative;
    padding-right: 3rem;
  }

  .crm-history-modal__body {
    padding: 0.9rem 1rem 1rem;
  }

  .crm-history-modal__close {
    position: absolute;
    top: 0.7rem;
    right: 0.8rem;
  }

  .crm-history-modal__actions {
    width: 100%;
    justify-content: stretch;
  }

  .crm-history-modal__actions > .btn {
    width: 100%;
  }

  .crm-order-tracking-followup__section-head,
  .crm-order-tracking-followup__update-box,
  .crm-order-tracking-followup__timeline-meta,
  .crm-order-tracking-followup__footer-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .crm-order-tracking-followup__latest-head {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }

  .crm-order-tracking-followup__kv-row {
    grid-template-columns: 1fr;
    gap: 0.16rem;
  }

  .crm-order-tracking-followup__action-row,
  .crm-order-tracking-followup__footer-actions-left,
  .crm-order-tracking-followup__footer-actions-right {
    width: 100%;
  }

  .crm-order-tracking-followup__action-row > *,
  .crm-order-tracking-followup__footer-actions-left > *,
  .crm-order-tracking-followup__footer-actions-right > * {
    width: 100%;
    justify-content: center;
  }

  .crm-order-tracking-followup__info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.42rem;
  }

  .crm-order-tracking-followup__info-grid .crm-order-tracking-followup__panel {
    padding: 0.54rem 0.58rem;
  }

  .crm-order-tracking-followup__info-grid .crm-order-tracking-followup__kv-row {
    grid-template-columns: minmax(4.35rem, 5.25rem) minmax(0, 1fr);
    gap: 0.28rem;
  }

  .crm-order-tracking-followup__info-grid .crm-order-tracking-followup__action-row {
    width: auto;
  }

  .crm-order-tracking-followup__info-grid .crm-order-tracking-followup__action-row > * {
    width: auto;
    justify-content: center;
  }

  .crm-order-tracking-followup__quick-status {
    flex: 1 1 calc(50% - 0.3rem);
  }

  .crm-order-tracking-followup__checkbox {
    white-space: normal;
  }

  .crm-order-tracking-followup__timeline::before {
    left: 0.5rem;
  }

  .crm-order-status-quick__grid {
    grid-template-columns: 1fr;
  }

  .crm-order-status-quick__summary {
    grid-template-columns: 1fr;
  }

  .crm-order-status-quick__summary-item {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.2rem;
  }

  .crm-order-status-quick__summary-item--placeholder {
    min-height: 2.9rem;
  }

  .crm-order-status-quick__summary-item strong,
  .crm-order-status-quick__summary-item--status strong {
    text-align: left;
    justify-content: flex-start;
  }

  .crm-order-shipment-preview__meta-grid {
    grid-template-columns: 1fr;
  }

  .crm-order-product-preview__head {
    flex-direction: column;
  }

  .crm-order-product-preview__badge {
    align-self: flex-start;
  }

  .crm-user-table-identity {
    min-width: 11.5rem;
  }

.crm-user-history-hero {
    align-items: flex-start;
    flex-direction: column;
  }
}

.exec-filter-actions,
.exec-quick-filters,
.exec-chart-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.exec-quick-filters {
  justify-content: flex-end;
}

.exec-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.exec-chart-shell {
  min-height: 19rem;
  padding: 0.5rem 0;
}

.exec-chart-svg {
  width: 100%;
  height: auto;
  display: block;
}

.exec-chart-grid {
  stroke: rgba(148, 163, 184, 0.35);
  stroke-width: 1;
}

.exec-chart-line {
  fill: none;
  stroke: var(--tblr-primary);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.exec-chart-area {
  fill: rgba(23, 58, 99, 0.12);
}

.exec-chart-point {
  fill: #fff;
  stroke: var(--kg-accent);
  stroke-width: 2;
}

.exec-chart-x-label,
.exec-chart-y-label {
  fill: var(--tblr-muted);
  font-size: 11px;
  font-family: "Plus Jakarta Sans", "Noto Sans Thai", sans-serif;
}

.exec-chart-x-label {
  text-anchor: middle;
}

.exec-chart-y-label {
  text-anchor: end;
}

.exec-chart-meta {
  margin-top: 0.5rem;
}

.exec-chart-meta-item {
  flex: 1 1 12rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.72);
}

.exec-chart-meta-item .label {
  display: block;
  color: var(--tblr-muted);
  font-size: 0.82rem;
}

.exec-chart-meta-item strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 1.02rem;
}

.exec-chart-meta-item small {
  display: block;
  margin-top: 0.15rem;
  color: var(--tblr-muted);
}

.exec-chart-empty {
  display: grid;
  place-items: center;
  min-height: 16rem;
  border: 1px dashed rgba(148, 163, 184, 0.4);
  border-radius: 1rem;
  color: var(--tblr-muted);
  background: rgba(248, 250, 252, 0.7);
  text-align: center;
}

.exec-donut-wrap {
  display: flex;
  justify-content: center;
  padding-top: 0.25rem;
}

.exec-donut {
  --exec-donut-bg: conic-gradient(#e5e7eb 0deg 360deg);
  position: relative;
  width: 15rem;
  height: 15rem;
  border-radius: 50%;
  background: var(--exec-donut-bg);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
}

.exec-donut::after {
  content: "";
  position: absolute;
  inset: 1.85rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12);
}

.exec-donut-center {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  text-align: center;
}

.exec-donut-center strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
}

.exec-donut-center span {
  display: block;
  margin-top: 0.35rem;
  color: var(--tblr-muted);
  font-size: 0.92rem;
}

.exec-type-legend {
  display: grid;
  gap: 0.75rem;
}

.exec-type-legend-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.exec-type-dot {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 999px;
  margin-top: 0.22rem;
  flex: 0 0 auto;
}

.exec-type-legend-item strong,
.exec-type-legend-item small {
  display: block;
}

.exec-type-legend-item small {
  color: var(--tblr-muted);
  margin-top: 0.12rem;
}

.exec-ranking-list {
  display: grid;
  gap: 0.9rem;
}

.exec-ranking-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.95rem;
  align-items: start;
}

.exec-ranking-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.7rem;
  height: 2.7rem;
  border-radius: 999px;
  background: rgba(23, 58, 99, 0.08);
  color: var(--tblr-primary);
  font-weight: 800;
}

.exec-ranking-main small {
  display: block;
  margin-top: 0.35rem;
  color: var(--tblr-muted);
}

.exec-ranking-bar {
  margin-top: 0.5rem;
  width: 100%;
  height: 0.65rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  overflow: hidden;
}

.exec-ranking-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--tblr-primary), var(--kg-accent));
}

.exec-mini-table .crm-money,
.exec-top-orders-table .crm-money {
  white-space: nowrap;
}

.exec-status-stack {
  display: grid;
  gap: 0.3rem;
}

.exec-profit-positive {
  color: #15803d;
  font-weight: 700;
}

.exec-profit-negative {
  color: #b91c1c;
  font-weight: 700;
}

@media (max-width: 1199.98px) {
  .exec-quick-filters {
    justify-content: flex-start;
  }

  .exec-donut {
    width: 13.25rem;
    height: 13.25rem;
  }
}

@media (max-width: 767.98px) {
  .exec-filter-actions > .btn,
  .exec-quick-filters > .btn {
    width: 100%;
  }

  .exec-chart-meta-item,
  .exec-ranking-item {
    grid-column: 1 / -1;
  }

  .exec-donut {
    width: 11.75rem;
    height: 11.75rem;
  }
}

@media (min-width: 1200px) {
  body.crm-admin-body {
    font-size: 10px !important;
  }

  .navbar-vertical.navbar-expand-lg {
    width: 188px !important;
  }

  .navbar-expand-lg.navbar-vertical ~ .navbar,
  .navbar-expand-lg.navbar-vertical ~ .page-wrapper {
    margin-left: 188px !important;
  }

  .crm-page-body .container-xl,
  .page-topbar .container-xl,
  .page-header .container-xl {
    --tblr-gutter-x: 0 !important;
  }

  .admin-sidebar .container-fluid {
    padding-top: 0.75rem !important;
    padding-bottom: 0.85rem !important;
  }

  .admin-brand-logo {
    width: 7.35rem !important;
    max-height: 1.55rem !important;
  }

  .admin-sidebar-nav {
    margin-top: 0.72rem !important;
  }

  .admin-sidebar-section + .admin-sidebar-section {
    margin-top: 0.65rem !important;
  }

  .admin-sidebar .nav-link {
    min-height: 35px !important;
    padding-left: 0.62rem !important;
    padding-right: 0.62rem !important;
    border-radius: 0.72rem !important;
    margin-bottom: 0.2rem !important;
  }

  .admin-sidebar .nav-link,
  .admin-sidebar .nav-link-title {
    font-size: 0.72rem !important;
  }

  .admin-sidebar-section__label strong,
  .admin-sidebar-disclosure__copy strong {
    font-size: 0.64rem !important;
  }

  .admin-sidebar-section__label small,
  .admin-sidebar-disclosure__copy small {
    font-size: 0.61rem !important;
  }

  .page-topbar .container-xl {
    min-height: 46px !important;
  }

  .crm-topbar-actions {
    gap: 0.3rem !important;
  }

  .crm-topbar-action {
    min-height: 30px !important;
    padding-inline: 0.54rem !important;
    border-radius: 0.64rem !important;
    font-size: 0.66rem !important;
  }

  .crm-topbar-user__toggle {
    padding: 0.18rem 0.28rem !important;
    border-radius: 0.64rem !important;
  }

  .crm-topbar-user__toggle .avatar {
    width: 1.72rem !important;
    height: 1.72rem !important;
  }

  .crm-topbar-user__name {
    font-size: 0.68rem !important;
  }

  .crm-topbar-user__role {
    font-size: 0.52rem !important;
  }

  .crm-page-header,
  .crm-page-header--compact {
    padding-top: 0.12rem !important;
    padding-bottom: 0.12rem !important;
  }

  .page-pretitle {
    margin-bottom: 0.24rem !important;
    font-size: 0.52rem !important;
  }

  .page-title,
  .crm-page-header--compact .page-title {
    font-size: 20px !important;
    line-height: 1.02 !important;
  }

  .crm-page-description,
  .crm-page-header--compact .crm-page-description {
    margin-top: 0.3rem !important;
    font-size: 0.64rem !important;
    line-height: 1.42 !important;
  }

  .crm-chip,
  .crm-page-header--compact .crm-chip {
    padding: 0.24rem 0.48rem !important;
    font-size: 0.52rem !important;
  }

  .crm-panel-card .card-header,
  .crm-form-section .card-header {
    padding: 0.62rem 0.72rem !important;
    gap: 0.48rem !important;
  }

  .crm-panel-card .card-body,
  .crm-form-section .card-body,
  .crm-profile-card .card-body,
  .crm-soft-card .card-body {
    padding: 0.72rem !important;
  }

  .crm-panel-title,
  .card-title {
    font-size: 0.72rem !important;
  }

  .crm-panel-subtitle {
    margin-top: 0.12rem !important;
    font-size: 0.6rem !important;
  }

  .btn,
  .form-label,
  .form-control,
  .form-select,
  .crm-searchable-input,
  .dropdown-menu,
  .table,
  .crm-kpi-meta {
    font-size: 0.66rem !important;
  }

  .form-label {
    margin-bottom: 0.22rem !important;
  }

  .form-control,
  .form-select,
  .crm-searchable-select,
  .crm-searchable-input {
    min-height: 30px !important;
  }

  .form-control,
  .form-select,
  .crm-searchable-input {
    padding: 0.34rem 0.56rem !important;
  }

  .crm-searchable-input {
    padding-right: 1.95rem !important;
    background:
      linear-gradient(45deg, transparent 50%, #64748b 50%) right 0.82rem center / 0.34rem 0.34rem no-repeat,
      linear-gradient(135deg, #64748b 50%, transparent 50%) right 0.62rem center / 0.34rem 0.34rem no-repeat,
      #fff !important;
  }

  .crm-filter-card--compact .card-header {
    padding-bottom: 0.62rem !important;
  }

  .crm-filter-card--compact .card-body {
    padding-top: 0.72rem !important;
  }

  .crm-filter-card--compact .crm-shortcut-button {
    min-height: 30px !important;
    padding: 0.3rem 0.56rem !important;
    font-size: 0.64rem !important;
  }

  .crm-orders-table {
    --crm-orders-sticky-col-1: 7.4rem !important;
    --crm-orders-sticky-col-2: 12.6rem !important;
    --crm-orders-sticky-col-3: 8.75rem !important;
    min-width: 51.75rem !important;
    font-size: 0.64rem !important;
  }

  .crm-orders-table th:nth-child(6),
  .crm-orders-table td.crm-order-items-cell {
    width: 15rem !important;
    min-width: 15rem !important;
    max-width: 15rem !important;
  }

  .crm-orders-table th:nth-child(8),
  .crm-orders-table td.crm-order-quantity-cell {
    width: 9.75rem !important;
    min-width: 9.75rem !important;
    max-width: 9.75rem !important;
  }

  .crm-orders-table th:nth-child(5),
  .crm-orders-table tbody tr:not(.crm-mobile-card-table__empty) > td:nth-child(5) {
    width: 10.5rem !important;
    min-width: 10.5rem !important;
    max-width: 10.5rem !important;
  }

  .crm-orders-table thead th {
    font-size: 0.58rem !important;
    padding-top: 0.52rem !important;
    padding-bottom: 0.52rem !important;
  }

  .crm-orders-table tbody td {
    padding-top: 0.6rem !important;
    padding-bottom: 0.6rem !important;
  }

  .crm-orders-table .crm-table-primary,
  .crm-orders-table .crm-order-item-line,
  .crm-orders-table .crm-order-quantity-pill,
  .crm-orders-table .crm-status-text,
  .crm-orders-table .crm-order-type-label {
    font-size: 0.64rem !important;
  }

  .crm-orders-table .crm-payment-status-date,
  .crm-orders-table .crm-payment-slip-inline-link,
  .crm-orders-table .crm-payment-slip-inline-empty {
    font-size: 0.56rem !important;
  }

  .crm-orders-table .crm-payment-slip-inline-separator {
    font-size: 0.5rem !important;
  }

  .crm-orders-table .crm-order-party-name {
    font-size: 0.68rem !important;
  }

  .crm-orders-table .crm-order-party-code,
  .crm-orders-table .crm-order-party-meta {
    font-size: 0.6rem !important;
  }

  .crm-orders-table .crm-country-flag {
    font-size: 0.72rem !important;
  }

  .crm-order-id-inline {
    font-size: 0.58rem !important;
  }

  .crm-order-id-inline__label {
    font-size: 0.66em !important;
  }

  .crm-order-id-inline__value {
    font-size: 1.22em !important;
  }

  .crm-order-id-inline--warehouse .crm-order-id-inline__value {
    font-size: 1.08em !important;
  }

  .crm-icon-action {
    width: 1.8rem !important;
    min-width: 1.8rem !important;
    height: 1.8rem !important;
  }
}

body {
  font-size: 11px;
}

.btn,
.form-control,
.form-select {
  font-size: 0.72rem;
}

.page-pretitle {
  font-size: 0.58rem;
}

.page-title {
  font-size: clamp(1.28rem, 0.88vw + 0.82rem, 1.68rem);
}

.crm-page-description {
  font-size: 0.72rem;
}

.crm-chip {
  font-size: 0.58rem;
  padding: 0.32rem 0.58rem;
}

.crm-panel-title,
.card-title {
  font-size: 0.8rem;
}

.crm-panel-subtitle {
  font-size: 0.68rem;
}

.form-label {
  font-size: 0.68rem;
}

.admin-sidebar .nav-link,
.admin-sidebar .nav-link-title {
  font-size: 0.76rem;
}

.admin-sidebar-section__label strong,
.admin-sidebar-disclosure__copy strong {
  font-size: 0.68rem;
}

.admin-sidebar-section__label small,
.admin-sidebar-disclosure__copy small {
  font-size: 0.65rem;
}

.crm-topbar-user__name {
  font-size: 0.74rem;
}

.crm-topbar-user__role {
  font-size: 0.56rem;
}

.table {
  font-size: 0.72rem;
}

.admin-topnav {
  position: relative;
  z-index: 1200;
  display: block;
  width: 100%;
  overflow: visible;
  background:
    radial-gradient(circle at top left, rgba(201, 154, 45, 0.14), transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(246, 249, 253, 0.96));
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.admin-topnav::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(201, 154, 45, 0.6), rgba(255, 255, 255, 0));
}

.admin-topnav__bar {
  display: flex;
  align-items: center;
  gap: 0.62rem;
  min-height: 3rem;
  padding-top: 0.24rem;
  padding-bottom: 0.24rem;
  overflow: visible;
}

.admin-topnav .container-xl,
.page-topbar .container-xl,
.page-header .container-xl,
.crm-page-body > .container-xl {
  width: 100%;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  --kg-page-side-space: clamp(0.75rem, 1.8vw, 2rem);
  --tblr-gutter-x: calc(var(--kg-page-side-space) * 2) !important;
  padding-left: var(--kg-page-side-space) !important;
  padding-right: var(--kg-page-side-space) !important;
}

.admin-topnav__brand {
  flex-shrink: 0;
  min-width: 0;
  color: #0f172a;
}

.admin-topnav__brand:hover,
.admin-topnav__brand:focus {
  color: #0f172a;
  text-decoration: none;
}

.admin-topnav__brand .admin-brand-logo {
  width: 6.9rem;
  max-height: 1.5rem;
}

.admin-topnav__brand .admin-brand-copy {
  display: none;
}

.admin-topnav__tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.38rem;
  flex-shrink: 0;
}

.admin-topnav__toggler {
  margin-left: auto;
  border-radius: 0.82rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.admin-topnav__collapse {
  flex: 1 1 auto;
  overflow: visible;
}

.admin-topnav__nav {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  gap: 0.22rem;
  width: auto;
  min-width: 0;
  padding: 0;
  overflow: visible;
  scrollbar-width: none;
}

.admin-topnav__nav::-webkit-scrollbar {
  display: none;
}

.admin-topnav .nav-item {
  position: relative;
  flex: 0 0 auto;
}

.admin-topnav .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  min-height: 2.1rem;
  padding: 0.42rem 0.78rem;
  border-radius: 0.9rem;
  color: #475569;
  font-size: 0.74rem;
  font-weight: 700;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.admin-topnav .nav-link:hover,
.admin-topnav .nav-link:focus,
.admin-topnav .nav-link.active,
.admin-topnav .nav-item.active > .nav-link {
  color: #1d4ed8;
  background: rgba(47, 111, 237, 0.08);
  border-color: rgba(47, 111, 237, 0.16);
  box-shadow: 0 10px 22px rgba(47, 111, 237, 0.12);
  text-decoration: none;
  transform: translateY(-1px);
}

.admin-topnav .nav-item.disabled .nav-link,
.admin-topnav .nav-item.disabled span.nav-link {
  color: #94a3b8;
  cursor: default;
}

.admin-topnav .nav-link-icon .icon,
.admin-topnav-dropdown__item-icon .icon {
  width: 0.92rem;
  height: 0.92rem;
  stroke-width: 1.85;
}

.admin-topnav .dropdown-toggle::after {
  margin-left: 0.2rem;
}

.admin-topnav-dropdown {
  min-width: 15rem;
  padding: 0.34rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 0.88rem;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.14);
  z-index: 1250;
}

.admin-topnav-dropdown__header {
  display: flex;
  flex-direction: column;
  gap: 0.16rem;
  padding: 0.45rem 0.55rem 0.55rem;
}

.admin-topnav-dropdown__header strong {
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0f172a;
}

.admin-topnav-dropdown__header small {
  font-size: 0.6rem;
  line-height: 1.4;
  color: #64748b;
}

.admin-topnav-dropdown .dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  border-radius: 0.72rem;
  padding: 0.48rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
}

.admin-topnav-dropdown .dropdown-item.active,
.admin-topnav-dropdown .dropdown-item:active {
  background: rgba(47, 111, 237, 0.1);
  color: #1d4ed8;
}

.admin-topnav-dropdown .dropdown-item.disabled,
.admin-topnav-dropdown span.dropdown-item.disabled {
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.08);
  cursor: default;
}

.admin-topnav-mobile-tools {
  display: none;
}

.crm-page-shell {
  width: 100%;
  min-width: 0;
}

body.crm-admin-body--topnav-only > .crm-page--topnav-only {
  width: 100%;
  max-width: none;
  margin: 0;
}

body.crm-admin-body--topnav-only > .crm-page--topnav-only > .page-wrapper {
  width: 100%;
  min-width: 0;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

@media (min-width: 992px) {
  .admin-topnav__collapse {
    display: flex !important;
    align-items: center;
    gap: 0.58rem;
    min-width: 0;
  }

  .admin-topnav__tools--desktop {
    margin-left: auto;
  }

  .crm-topbar-action {
    min-height: 1.82rem;
    padding-inline: 0.58rem;
  }

  .crm-topbar-user__toggle {
    padding: 0.16rem 0.26rem !important;
  }

  .crm-topbar-user__toggle .avatar {
    width: 1.68rem;
    height: 1.68rem;
  }

  .crm-topbar-user__name {
    font-size: 0.68rem;
  }

  .crm-topbar-user__role {
    margin-top: 0.1rem;
    font-size: 0.5rem;
  }
}

@media (max-width: 991.98px) {
  .admin-topnav__bar {
    flex-wrap: wrap;
    min-height: 3.35rem;
    gap: 0.55rem;
  }

  .admin-topnav__brand .admin-brand-logo {
    width: 7.5rem;
    max-height: 1.72rem;
  }

  .admin-topnav__collapse {
    width: 100%;
    margin-top: 0.28rem;
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
  }

  .admin-topnav__nav {
    align-items: stretch;
    flex-wrap: wrap;
    gap: 0.36rem;
    width: 100%;
    padding-top: 0;
    overflow-x: visible;
  }

  .admin-topnav .nav-item,
  .admin-topnav .nav-link,
  .admin-topnav .dropdown {
    width: 100%;
  }

  .admin-topnav .nav-link {
    justify-content: space-between;
    min-height: 2.3rem;
  }

  .admin-topnav-dropdown {
    position: static !important;
    float: none;
    width: 100%;
    margin-top: 0.28rem;
    box-shadow: none;
  }

  .admin-topnav-mobile-tools {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
  }

  .admin-topnav-mobile-tools__user {
    display: flex;
    align-items: center;
    gap: 0.62rem;
  }

  .admin-topnav-mobile-tools__meta {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
  }

  .admin-topnav-mobile-tools__meta strong {
    font-size: 0.76rem;
    color: #0f172a;
  }

  .admin-topnav-mobile-tools__meta small {
    font-size: 0.64rem;
    color: #64748b;
  }

  .admin-topnav-mobile-tools__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
  }
}

.table thead th {
  font-size: 0.72rem;
}

.crm-orders-table {
  --crm-orders-sticky-col-1: 8.3rem;
  --crm-orders-sticky-col-2: 5.7rem;
  --crm-orders-sticky-col-3: 13.5rem;
  min-width: 75.4rem;
  font-size: 0.76rem;
}

.crm-orders-table thead th {
  font-size: 0.7rem;
}

.crm-orders-table .crm-table-primary,
.crm-orders-table .crm-order-item-line,
.crm-orders-table .crm-order-quantity-pill,
.crm-orders-table .crm-status-text,
.crm-orders-table .crm-order-type-label {
  font-size: 0.78rem;
}

.crm-orders-table .crm-order-party-name {
  font-size: 0.82rem;
}

.crm-orders-table .crm-order-party-code,
.crm-orders-table .crm-order-party-meta {
  font-size: 0.72rem;
}

.file-drop-page {
  background: #ffffff;
}

.file-drop-shell {
  min-height: auto;
}

.file-drop-container {
  max-width: 1160px;
}

.file-drop-card {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.file-drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 18.5rem;
  padding: 1.55rem 1.35rem;
  border: 3px dashed #bdd0fb;
  border-radius: 2rem;
  background: linear-gradient(180deg, #f4f8ff 0%, #ffffff 100%);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.file-drop-zone:hover,
.file-drop-zone.is-dragover,
.file-drop-zone.has-files {
  border-color: #9cb7f7;
  box-shadow: 0 18px 42px rgba(123, 151, 226, 0.14);
  transform: translateY(-1px);
}

.file-drop-zone.is-invalid {
  border-color: rgba(220, 38, 38, 0.42);
}

.file-drop-zone__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  background: #dbe7ff;
  color: #2d5ae0;
  font-family: "Plus Jakarta Sans", "Noto Sans Thai", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
}

.file-drop-zone__title {
  font-family: "Plus Jakarta Sans", "Noto Sans Thai", sans-serif;
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 800;
  line-height: 1.1;
  color: #14213d;
}

.file-drop-zone__hint {
  font-family: "Plus Jakarta Sans", "Noto Sans Thai", sans-serif;
  font-size: clamp(1.15rem, 2.1vw, 1.6rem);
  font-weight: 700;
  line-height: 1.2;
  color: #356ee8;
}

.file-drop-zone__meta {
  max-width: 42rem;
  color: #7b8eab;
  font-size: 0.92rem;
  line-height: 1.55;
}

.file-drop-selection {
  max-width: 42rem;
  margin-inline: auto;
  padding: 0.75rem 0.9rem 0.7rem;
  border-radius: 1rem;
  background: #f3f7fd;
  text-align: left;
}

.file-drop-selection__summary {
  font-weight: 700;
  color: #24344d;
  font-size: 0.95rem;
}

.file-drop-selection__list {
  margin: 0.45rem 0 0;
  padding-left: 1.2rem;
  color: #5c6d87;
  font-size: 0.92rem;
}

.file-drop-selection__list li + li {
  margin-top: 0.28rem;
}

.file-drop-actions {
  display: flex;
  justify-content: center;
}

.file-drop-submit-button {
  min-height: 3.15rem;
  padding: 0.68rem 1.5rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #2f6df6 0%, #1f56d8 100%);
  color: #ffffff;
  font-family: "Plus Jakarta Sans", "Noto Sans Thai", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: 0 14px 28px rgba(47, 109, 246, 0.28);
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.file-drop-submit-button .icon {
  width: 0.95rem;
  height: 0.95rem;
}

.file-drop-submit-button:not(:disabled):not(.disabled) {
  background: linear-gradient(135deg, #2f6df6 0%, #1f56d8 100%);
  color: #ffffff;
}

.file-drop-submit-button:hover,
.file-drop-submit-button:focus {
  background: linear-gradient(135deg, #245fe3 0%, #1848bf 100%);
  box-shadow: 0 16px 30px rgba(31, 86, 216, 0.34);
  transform: translateY(-1px);
  color: #ffffff;
}

.file-drop-submit-button:disabled,
.file-drop-submit-button.disabled {
  background: #9eb8eb;
  color: rgba(255, 255, 255, 0.96);
  box-shadow: inset 0 0 0 1px rgba(118, 150, 214, 0.26);
  transform: none;
  opacity: 1;
}

.file-drop-results {
  display: grid;
  gap: 0.85rem;
}

.file-drop-result-item {
  padding: 1.2rem 1.3rem;
  border: 1px solid #d8e1ef;
  border-radius: 1.45rem;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(148, 163, 184, 0.08);
}

.file-drop-result-item__header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.file-drop-result-item__header strong {
  display: block;
  color: #253248;
  font-family: "Plus Jakarta Sans", "Noto Sans Thai", sans-serif;
  font-size: 1rem;
  font-weight: 700;
}

.file-drop-result-item__header small {
  display: block;
  margin-top: 0.2rem;
  color: #7b8eab;
  font-size: 0.84rem;
}

.file-drop-result-item__header .badge {
  padding: 0.32rem 0.62rem;
  border-radius: 999px;
  font-size: 0.74rem;
}

.file-drop-result-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.75rem;
}

.file-drop-result-item__meta span {
  display: inline-flex;
  align-items: center;
  min-height: 2.2rem;
  padding: 0.36rem 0.8rem;
  border-radius: 999px;
  background: #eef3fa;
  color: #5a6b84;
  font-family: "Plus Jakarta Sans", "Noto Sans Thai", sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
}

.file-drop-result-item .input-group {
  flex-wrap: nowrap;
  border: 1px solid #d3ddeb;
  border-radius: 1rem;
  overflow: hidden;
  background: #ffffff;
}

.file-drop-result-item .input-group > .form-control {
  min-height: 3rem;
  border: 0;
  border-radius: 0;
  padding-inline: 0.85rem;
  font-size: 0.9rem;
  color: #334155;
  background: #ffffff;
  box-shadow: none;
}

.file-drop-result-item .input-group > .btn {
  border: 0;
  border-left: 1px solid #d3ddeb;
  border-radius: 0;
  padding-inline: 0.9rem;
  font-family: "Plus Jakarta Sans", "Noto Sans Thai", sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
}

.file-drop-result-item .input-group > .btn-outline-primary {
  background: #ffffff;
  color: #253248;
}

.file-drop-result-item .input-group > .btn-outline-primary:hover,
.file-drop-result-item .input-group > .btn-outline-primary:focus {
  background: #f8fbff;
  color: #1b3359;
}

.file-drop-result-item .input-group > .btn-primary {
  background: #1f4f8d;
  color: #ffffff;
}

.file-drop-result-item .input-group > .btn-primary:hover,
.file-drop-result-item .input-group > .btn-primary:focus {
  background: #173d6d;
  color: #ffffff;
}

@media (max-width: 767.98px) {
  .file-drop-zone {
    min-height: 15.5rem;
    padding: 1.2rem 1rem;
    border-radius: 1.35rem;
  }

  .file-drop-zone__badge {
    font-size: 0.8rem;
  }

  .file-drop-zone__hint {
    font-size: 1rem;
  }

  .file-drop-result-item {
    padding: 1rem 0.95rem;
    border-radius: 1.2rem;
  }

  .file-drop-result-item__header,
  .file-drop-result-item .input-group {
    flex-direction: column;
  }

  .file-drop-result-item .input-group > .btn {
    border-left: 0;
    border-top: 1px solid #d3ddeb;
    width: 100%;
    justify-content: center;
  }
}

.crm-orders-table--v2 {
  --crm-orders-sticky-col-1: 7.4rem !important;
  --crm-orders-sticky-col-2: 8.75rem !important;
  --crm-orders-sticky-col-3: 15.5rem !important;
  min-width: 240rem !important;
}

.crm-orders-table--v2 th:not(:nth-child(-n+3)),
.crm-orders-table--v2 tbody td:not(:nth-child(-n+3)) {
  min-width: 8.25rem !important;
  max-width: 10.5rem !important;
}

.crm-orders-table--v2 th:nth-child(4),
.crm-orders-table--v2 td:nth-child(4),
.crm-orders-table--v2 th:nth-child(7),
.crm-orders-table--v2 td:nth-child(7),
.crm-orders-table--v2 th:nth-child(12),
.crm-orders-table--v2 td.crm-order-items-cell--v2,
.crm-orders-table--v2 th:nth-child(13),
.crm-orders-table--v2 td:nth-child(13),
.crm-orders-table--v2 th:nth-child(36),
.crm-orders-table--v2 td:nth-child(36) {
  max-width: none !important;
}

.crm-orders-table--v2 th:nth-child(4),
.crm-orders-table--v2 td:nth-child(4) {
  width: 11rem !important;
  min-width: 11rem !important;
}

.crm-orders-table--v2 th:nth-child(7),
.crm-orders-table--v2 td:nth-child(7) {
  width: 18rem !important;
  min-width: 18rem !important;
}

.crm-orders-table--v2 th:nth-child(12),
.crm-orders-table--v2 td.crm-order-items-cell--v2 {
  width: 17rem !important;
  min-width: 17rem !important;
}

.crm-orders-table--v2 th:nth-child(13),
.crm-orders-table--v2 td:nth-child(13) {
  width: 13.5rem !important;
  min-width: 13.5rem !important;
}

.crm-orders-table--v2 th:nth-child(25),
.crm-orders-table--v2 td:nth-child(25),
.crm-orders-table--v2 th:nth-child(28),
.crm-orders-table--v2 td:nth-child(28),
.crm-orders-table--v2 th:nth-child(36),
.crm-orders-table--v2 td:nth-child(36) {
  width: 11rem !important;
  min-width: 11rem !important;
}

.crm-chip--gold {
  background: linear-gradient(135deg, rgba(207, 165, 73, 0.18), rgba(252, 243, 210, 0.88));
  border-color: rgba(201, 154, 45, 0.26);
  color: #8a6220;
}

.crm-chip--light {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.92);
}

.crm-paid-orders-body {
  background:
    radial-gradient(circle at 0% 0%, rgba(201, 154, 45, 0.12), transparent 22%),
    radial-gradient(circle at 100% 12%, rgba(23, 58, 99, 0.12), transparent 26%),
    linear-gradient(180deg, #f7f9fc 0%, #f2f5fa 100%);
}

.crm-paid-orders-page .crm-page-header {
  display: none;
}

.crm-paid-orders-page .crm-page-header-band {
  background:
    linear-gradient(135deg, rgba(20, 63, 40, 0.96), rgba(33, 99, 61, 0.93)),
    linear-gradient(140deg, rgba(124, 194, 136, 0.18), rgba(255, 255, 255, 0));
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 22px 60px rgba(12, 28, 48, 0.16);
}

.crm-paid-orders-page .crm-page-description,
.crm-paid-orders-page .crm-page-header .page-pretitle {
  color: rgba(255, 255, 255, 0.78) !important;
}

.crm-paid-orders-page .page-title {
  color: #fff;
}

.crm-paid-orders-hero {
  overflow: hidden;
  border: 1px solid rgba(94, 158, 104, 0.18);
  background:
    radial-gradient(circle at top right, rgba(191, 236, 198, 0.32), transparent 32%),
    linear-gradient(145deg, #17432a 0%, #1f6a42 56%, #2f8653 100%);
  box-shadow: 0 26px 64px rgba(17, 36, 61, 0.18);
}

.crm-paid-orders-hero .card-body {
  padding: 1.3rem;
}

.crm-paid-orders-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.68rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(236, 255, 241, 0.94);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.crm-paid-orders-hero__title {
  margin-top: 0.9rem;
  margin-bottom: 0.5rem;
  color: #effff2;
  font-size: clamp(1.18rem, 1vw + 0.8rem, 1.64rem);
}

.crm-paid-orders-hero__copy {
  max-width: 40rem;
  margin-bottom: 1rem;
  color: rgba(244, 247, 255, 0.84);
  font-size: 0.86rem;
  line-height: 1.68;
}

.crm-paid-orders-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.crm-paid-orders-kpi .crm-kpi-label {
  color: #6d7a8b;
}

.crm-paid-orders-kpi .crm-kpi-value {
  color: var(--tblr-body-color);
}

.crm-paid-orders-page .crm-paid-orders-kpi .card-body::after {
  background: linear-gradient(90deg, rgba(23, 58, 99, 0.92), rgba(201, 154, 45, 0.74));
}

.crm-paid-orders-kpi.crm-kpi-verify-pending .card-body::after {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.94), rgba(251, 191, 36, 0.82));
}

.crm-paid-orders-kpi.crm-kpi-verify-pending .crm-kpi-icon {
  color: #d97706;
  background: rgba(255, 247, 237, 0.94);
}

.crm-paid-orders-kpi.crm-kpi-verify-checked .card-body::after {
  background: linear-gradient(90deg, rgba(34, 134, 58, 0.94), rgba(110, 201, 129, 0.84));
}

.crm-paid-orders-kpi.crm-kpi-verify-checked .crm-kpi-icon {
  color: #22863a;
  background: rgba(239, 249, 242, 0.95);
}

.crm-paid-orders-kpi.crm-kpi-verify-percent .card-body::after {
  background: linear-gradient(90deg, rgba(147, 51, 234, 0.92), rgba(192, 132, 252, 0.82));
}

.crm-paid-orders-kpi.crm-kpi-verify-percent .crm-kpi-icon {
  color: #9333ea;
  background: rgba(248, 240, 255, 0.95);
}

.crm-paid-orders-type-card {
  border-color: rgba(148, 163, 184, 0.18);
}

.crm-paid-orders-type-card .card-body {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}

.crm-paid-orders-type-card__value {
  display: block;
  margin: 0;
  font-size: clamp(1.05rem, 0.55vw + 0.95rem, 1.38rem);
  line-height: 1.15;
  color: #173b26;
}

.crm-paid-orders-type-card__meta {
  color: #617286;
  font-size: 0.8rem;
  font-weight: 600;
}

.crm-paid-orders-type-card--new {
  background: linear-gradient(180deg, rgba(239, 247, 255, 0.95), rgba(255, 255, 255, 0.94));
  border-color: rgba(15, 111, 214, 0.16);
}

.crm-paid-orders-type-card--new .card-body::after {
  background: linear-gradient(90deg, rgba(15, 111, 214, 0.9), rgba(99, 171, 242, 0.82));
}

.crm-paid-orders-type-card--new .crm-paid-orders-type-card__value {
  color: #0f6fd6;
}

.crm-paid-orders-type-card--reorder {
  background: linear-gradient(180deg, rgba(240, 249, 242, 0.96), rgba(255, 255, 255, 0.94));
  border-color: rgba(34, 134, 58, 0.16);
}

.crm-paid-orders-type-card--reorder .card-body::after {
  background: linear-gradient(90deg, rgba(34, 134, 58, 0.92), rgba(97, 190, 118, 0.82));
}

.crm-paid-orders-type-card--reorder .crm-paid-orders-type-card__value {
  color: #22863a;
}

.crm-paid-orders-type-card--refer {
  background: linear-gradient(180deg, rgba(255, 241, 248, 0.96), rgba(255, 255, 255, 0.94));
  border-color: rgba(214, 51, 132, 0.16);
}

.crm-paid-orders-type-card--refer .card-body::after {
  background: linear-gradient(90deg, rgba(214, 51, 132, 0.92), rgba(234, 119, 180, 0.82));
}

.crm-paid-orders-type-card--refer .crm-paid-orders-type-card__value {
  color: #d63384;
}

.crm-paid-orders-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.crm-paid-orders-stack__filters {
  order: 1;
}

.crm-paid-orders-stack__summary {
  order: 2;
}

.crm-paid-orders-stack__table {
  order: 3;
}

.crm-paid-orders-filter-panel {
  border: 1px solid var(--tblr-border-color);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(250, 252, 255, 0.92)),
    #fff;
  padding: 0;
}

.crm-paid-orders-filter-panel .card-body {
  padding: 0.82rem 0.95rem 0.88rem;
}

.crm-paid-orders-filter-panel form.row {
  --bs-gutter-x: 0.72rem;
  --bs-gutter-y: 0.45rem;
}

.crm-paid-orders-filter-panel .form-label {
  margin-bottom: 0.22rem;
}

.crm-paid-orders-filter-panel .form-control,
.crm-paid-orders-filter-panel .form-select {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(148, 163, 184, 0.22);
  min-height: calc(1.5em + 0.92rem + 2px);
  padding-top: 0.46rem;
  padding-bottom: 0.46rem;
}

.crm-paid-orders-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.crm-paid-orders-filter-panel .btn-list {
  gap: 0.45rem;
  align-items: center;
  margin: 0;
}

.crm-paid-orders-filter-panel .btn {
  padding-top: 0.42rem;
  padding-bottom: 0.42rem;
}

.crm-paid-orders-presets {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-left: auto;
}

.crm-paid-orders-presets__button {
  min-width: 0;
}

.crm-paid-orders-table-card {
  border: 1px solid rgba(222, 232, 240, 0.95);
  overflow: hidden;
}

.crm-paid-orders-table-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.crm-paid-orders-table-head__main {
  min-width: 0;
}

.crm-paid-orders-table-head__date {
  display: flex;
  align-items: flex-end;
  gap: 0.55rem;
  margin-left: auto;
  text-align: right;
  white-space: nowrap;
}

.crm-paid-orders-table-head__date-label {
  color: #6a7b91;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.crm-paid-orders-table-head__date-value {
  color: #1f3b63;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
}

.crm-paid-orders-table {
  width: 100%;
  min-width: 100rem;
  table-layout: fixed;
  font-size: 0.74rem;
}

.crm-paid-orders-table thead th {
  background: linear-gradient(180deg, #edf8f0 0%, #ddf1e3 100%);
  color: #275f38;
  border-bottom-color: rgba(82, 150, 98, 0.22);
  font-size: 0.68rem;
  font-weight: 700;
  padding-top: 0.52rem;
  padding-bottom: 0.52rem;
  white-space: normal;
  line-height: 1.15;
  text-transform: none;
}

.crm-paid-orders-table th,
.crm-paid-orders-table td {
  padding-right: 0.35rem;
  padding-left: 0.35rem;
  white-space: nowrap;
}

.crm-paid-orders-table th:nth-child(1) { width: 3%; }
.crm-paid-orders-table th:nth-child(2) { width: 7%; }
.crm-paid-orders-table th:nth-child(3) { width: 5%; }
.crm-paid-orders-table th:nth-child(4) { width: 6.5%; }
.crm-paid-orders-table th:nth-child(5) { width: 11%; }
.crm-paid-orders-table th:nth-child(6) { width: 6%; }
.crm-paid-orders-table th:nth-child(7) { width: 6.5%; }
.crm-paid-orders-table th:nth-child(8) { width: 5.5%; }
.crm-paid-orders-table th:nth-child(9) { width: 10%; }
.crm-paid-orders-table th:nth-child(10) { width: 4.5%; }
.crm-paid-orders-table th:nth-child(11) { width: 7%; }
.crm-paid-orders-table th:nth-child(12) { width: 7%; }
.crm-paid-orders-table th:nth-child(13) { width: 7%; }
.crm-paid-orders-table th:nth-child(14) { width: 14%; }

.crm-paid-orders-table th:nth-child(5),
.crm-paid-orders-table td:nth-child(5),
.crm-paid-orders-table th:nth-child(6),
.crm-paid-orders-table td:nth-child(6),
.crm-paid-orders-table th:nth-child(9),
.crm-paid-orders-table td:nth-child(9),
.crm-paid-orders-table th:nth-child(13),
.crm-paid-orders-table td:nth-child(13) {
  white-space: normal;
}

.crm-paid-orders-table td.crm-order-quantity-cell {
  min-width: 10rem;
}

.crm-paid-orders-table .crm-order-quantity-pill {
  min-height: 1.8rem;
  padding: 0.26rem 0.62rem;
  font-size: 0.72rem;
}

.crm-paid-orders-table tbody td {
  padding-top: 0.56rem;
  padding-bottom: 0.56rem;
  font-size: 0.74rem;
  vertical-align: middle;
}

.crm-paid-orders-table tbody tr:nth-child(even) {
  background: rgba(248, 250, 252, 0.92);
}

.crm-paid-orders-table tbody tr:hover {
  background: rgba(239, 244, 250, 0.92);
}

.crm-paid-orders-table tbody tr.is-saving {
  opacity: 0.66;
}

.crm-paid-orders-table .btn-list {
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem;
}

.crm-paid-orders-table .btn.btn-sm {
  padding: 0.2rem 0.48rem;
  font-size: 0.68rem;
  line-height: 1.1;
  min-height: auto;
}

.crm-paid-orders-table .btn.btn-sm .icon {
  width: 0.88rem;
  height: 0.88rem;
}

.crm-paid-orders-customer,
.crm-paid-orders-admin {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.32rem;
  white-space: nowrap;
}

.crm-paid-orders-verification {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.14rem;
  line-height: 1.08;
  white-space: normal;
  text-align: center;
}

.crm-paid-orders-table .crm-order-party-name {
  font-size: 0.79rem;
  line-height: 1.18;
  font-weight: 700;
}

.crm-paid-orders-customer-copy {
  color: #8b97aa;
  padding-left: 0.04rem;
}

.crm-paid-orders-customer-copy .icon {
  width: 0.82rem;
  height: 0.82rem;
}

.crm-paid-orders-customer-copy:hover,
.crm-paid-orders-customer-copy:focus-visible {
  color: #1f5f98;
}

.crm-paid-orders-table .crm-order-type-label {
  font-size: 0.76rem;
}

.crm-paid-orders-customer small,
.crm-paid-orders-admin small {
  color: #778498;
  font-size: 0.7rem;
  line-height: 1.18;
  white-space: nowrap;
}

.crm-paid-orders-verification small,
.crm-paid-orders-verification-meta {
  display: block;
  color: #778498;
  font-size: 0.54rem;
  line-height: 1;
  white-space: normal;
}

.crm-paid-orders-verification-meta {
  max-inline-size: 5.9rem;
  overflow-wrap: anywhere;
  text-align: center;
}

.crm-paid-orders-verification-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  padding: 0.22rem 0.54rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.crm-paid-orders-verification-badge--pending {
  color: #c86a00;
  background: rgba(255, 243, 224, 0.95);
}

.crm-paid-orders-verification-badge--verified {
  color: #22863a;
  background: rgba(236, 247, 239, 0.98);
}

.crm-paid-orders-table td.crm-paid-orders-note-cell {
  white-space: normal;
  text-align: center;
}

.crm-paid-orders-note-trigger {
  appearance: none;
  border: 0;
  background: transparent;
  color: #778498;
  min-width: 1.5rem;
  padding: 0.15rem 0.35rem;
  font: inherit;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.crm-paid-orders-note-trigger:hover,
.crm-paid-orders-note-trigger:focus-visible {
  color: #1f5f98;
}

.crm-paid-orders-note-trigger.has-note {
  max-width: 11rem;
  color: #526276;
  font-size: 0.64rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: normal;
}

.crm-paid-orders-note-trigger.has-note .crm-paid-orders-note-trigger__text {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.crm-paid-orders-slip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: rgba(31, 95, 152, 0.12);
  font-size: 0.6rem;
  font-weight: 800;
}

.crm-payment-note-inline {
  display: -webkit-box;
  max-width: 9rem;
  margin-top: 0.12rem;
  overflow: hidden;
  color: #526276;
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1.2;
  overflow-wrap: anywhere;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.crm-payment-note-inline--button {
  appearance: none;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: center;
}

.crm-payment-note-inline--button:hover,
.crm-payment-note-inline--button:focus-visible {
  color: #1f5f98;
  text-decoration: underline;
}

.crm-paid-orders-slip-modal .crm-history-modal__dialog {
  width: min(72rem, calc(100vw - 2rem));
}

.crm-paid-orders-slip-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.crm-paid-orders-slip-list.is-single {
  grid-template-columns: minmax(0, min(44rem, 100%));
  justify-content: center;
}

.crm-paid-orders-slip-list.is-single .crm-paid-orders-slip-card {
  box-sizing: border-box;
  width: min(44rem, 100%);
  justify-self: center;
  padding: 1rem;
}

.crm-paid-orders-slip-list.is-single .crm-paid-orders-slip-card__preview {
  height: min(62vh, 40rem);
  min-height: 28rem;
}

.crm-paid-orders-slip-card {
  display: flex;
  align-items: stretch;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid #dbe3ee;
  border-radius: 0.8rem;
  background: #fff;
}

.crm-paid-orders-slip-card__main {
  display: flex;
  align-items: stretch;
  flex-direction: column;
  min-width: 0;
  gap: 0.75rem;
}

.crm-paid-orders-slip-card__preview {
  position: relative;
  display: block;
  width: 100%;
  height: 17rem;
  padding: 0;
  overflow: hidden;
  border: 1px solid #dbe3ee;
  border-radius: 0.55rem;
  background: #eef2f7;
  cursor: zoom-in;
}

.crm-paid-orders-slip-card__preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.crm-paid-orders-slip-card__file-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 11rem;
  border-radius: 0.55rem;
  background: #eef2f7;
  color: #526276;
  font-size: 0.7rem;
  font-weight: 800;
}

.crm-paid-orders-slip-card__copy {
  display: grid;
  min-width: 0;
  gap: 0.15rem;
}

.crm-paid-orders-slip-card__preview .crm-paid-orders-slip-card__copy {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 2.5rem 0.75rem 0.7rem;
  background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.82) 62%, rgba(15, 23, 42, 0.94) 100%);
  color: #fff;
  text-align: left;
}

.crm-paid-orders-slip-card__preview .crm-paid-orders-slip-card__copy strong,
.crm-paid-orders-slip-card__preview .crm-paid-orders-slip-card__copy span,
.crm-paid-orders-slip-card__preview .crm-paid-orders-slip-card__copy small {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.crm-paid-orders-slip-card__preview .crm-paid-orders-slip-card__copy span,
.crm-paid-orders-slip-card__preview .crm-paid-orders-slip-card__copy small {
  opacity: 0.9;
}

.crm-paid-orders-slip-card__copy span,
.crm-paid-orders-slip-card__copy small {
  overflow-wrap: anywhere;
}

.crm-paid-orders-slip-card__copy span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.crm-paid-orders-slip-card__copy span {
  color: #526276;
  font-size: 0.72rem;
}

.crm-paid-orders-slip-card__copy small {
  color: #778498;
  font-size: 0.65rem;
}

.crm-paid-orders-slip-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.crm-paid-orders-slip-lightbox.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.crm-paid-orders-slip-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(5px);
}

.crm-paid-orders-slip-lightbox__panel {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  flex-direction: column;
  max-width: min(56rem, calc(100vw - 3rem));
  max-height: calc(100vh - 3rem);
  gap: 0.65rem;
}

.crm-paid-orders-slip-lightbox__panel img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 6rem);
  border-radius: 0.9rem;
  object-fit: contain;
  box-shadow: 0 1.25rem 3rem rgba(0, 0, 0, 0.35);
}

.crm-paid-orders-slip-lightbox__close {
  position: absolute;
  top: -1.15rem;
  right: -1.15rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
}

.crm-paid-orders-slip-lightbox__caption {
  max-width: 100%;
  color: #fff;
  font-size: 0.75rem;
  overflow-wrap: anywhere;
  text-align: center;
}

@media (max-width: 991.98px) {
  .crm-paid-orders-slip-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .crm-paid-orders-slip-list {
    grid-template-columns: 1fr;
  }

  .crm-paid-orders-slip-card__preview {
    height: 20rem;
  }

  .crm-paid-orders-slip-list.is-single .crm-paid-orders-slip-card__preview {
    height: min(62vh, 32rem);
    min-height: 20rem;
  }
}

.crm-paid-orders-note-modal .crm-history-modal__dialog {
  width: min(34rem, calc(100vw - 2rem));
}

.crm-paid-orders-note-modal .crm-history-modal__body {
  padding: 1rem 1.1rem;
}

.crm-paid-orders-note-modal textarea {
  min-height: 8rem;
  resize: vertical;
}

.crm-paid-orders-note-modal__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.45rem;
}

.crm-paid-orders-note-modal__meta small,
.crm-paid-orders-note-readonly small {
  color: #778498;
  font-size: 0.68rem;
}

.crm-paid-orders-note-readonly {
  display: grid;
  gap: 0.22rem;
  min-width: 10rem;
  white-space: normal;
}

.crm-paid-orders-note-readonly span {
  overflow-wrap: anywhere;
  line-height: 1.3;
}

.crm-empty-state {
  padding: 2.4rem 1.2rem;
  text-align: center;
  color: #6f7e90;
}

@media (max-width: 991.98px) {
  .crm-paid-orders-hero .card-body {
    padding: 1.05rem;
  }

  .crm-paid-orders-table-card .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .crm-paid-orders-table {
    min-width: 78rem;
  }

  .crm-paid-orders-table-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .crm-paid-orders-table-head__date {
    margin-left: 0;
    align-items: flex-start;
    text-align: left;
  }

  .crm-paid-orders-table th,
  .crm-paid-orders-table td {
    white-space: nowrap;
  }
}

@media (max-width: 575.98px) {
  .crm-paid-orders-stack__summary .row {
    --bs-gutter-x: 0.6rem;
    --bs-gutter-y: 0.6rem;
  }

  .crm-paid-orders-kpi .card-body {
    min-height: 8.5rem;
    padding: 0.72rem 0.72rem 0.68rem;
  }

  .crm-paid-orders-kpi .crm-kpi-head {
    height: 100%;
    flex-direction: column;
    gap: 0.58rem;
  }

  .crm-paid-orders-kpi .crm-kpi-label {
    margin-bottom: 0.24rem;
    font-size: 0.66rem;
    line-height: 1.2;
  }

  .crm-paid-orders-kpi .crm-kpi-value {
    font-size: clamp(1.05rem, 5.8vw, 1.35rem);
    line-height: 1.05;
    letter-spacing: -0.025em;
    overflow-wrap: anywhere;
  }

  .crm-paid-orders-kpi .crm-kpi-meta {
    margin-top: 0.24rem;
    font-size: 0.66rem;
    line-height: 1.2;
  }

  .crm-paid-orders-kpi .crm-kpi-icon {
    width: 2rem;
    height: 2rem;
    margin-top: auto;
    border-radius: 0.68rem;
  }
}

.crm-payment-followup-body {
  background:
    radial-gradient(circle at 0% 0%, rgba(224, 168, 64, 0.1), transparent 22%),
    radial-gradient(circle at 100% 12%, rgba(41, 98, 255, 0.08), transparent 24%),
    linear-gradient(180deg, #f7f9fc 0%, #f2f5fa 100%);
}

.crm-payment-followup-page .crm-page-header {
  display: none;
}

.crm-payment-followup-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.crm-payment-followup-stack__filters {
  order: 1;
}

.crm-payment-followup-stack__summary {
  order: 2;
}

.crm-payment-followup-stack__table {
  order: 3;
}

.crm-payment-followup-filter-panel {
  border: 1px solid var(--tblr-border-color);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(250, 252, 255, 0.92)),
    #fff;
  padding: 0;
}

.crm-payment-followup-filter-panel .card-body {
  padding: 0.82rem 0.95rem 0.88rem;
}

.crm-payment-followup-filter-panel form.row {
  --bs-gutter-x: 0.72rem;
  --bs-gutter-y: 0.45rem;
}

.crm-payment-followup-filter-panel .form-label {
  margin-bottom: 0.22rem;
}

.crm-payment-followup-filter-panel .form-control,
.crm-payment-followup-filter-panel .form-select {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(148, 163, 184, 0.22);
  min-height: calc(1.5em + 0.92rem + 2px);
  padding-top: 0.46rem;
  padding-bottom: 0.46rem;
}

.crm-payment-followup-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.crm-payment-followup-filter-panel .btn-list {
  gap: 0.45rem;
  align-items: center;
  margin: 0;
}

.crm-payment-followup-filter-panel .btn {
  padding-top: 0.42rem;
  padding-bottom: 0.42rem;
}

.crm-payment-followup-presets {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-left: auto;
}

.crm-payment-followup-presets__button {
  min-width: 0;
}

.crm-payment-followup-kpi .crm-kpi-label {
  color: #6d7a8b;
}

.crm-payment-followup-kpi .crm-kpi-value {
  color: var(--tblr-body-color);
}

.crm-payment-followup-page .crm-payment-followup-kpi .card-body::after {
  background: linear-gradient(90deg, rgba(23, 58, 99, 0.92), rgba(224, 168, 64, 0.82));
}

.crm-payment-followup-status-card {
  border-color: rgba(148, 163, 184, 0.18);
}

.crm-payment-followup-status-card .card-body {
  display: flex;
  flex-direction: column;
  gap: 0.34rem;
}

.crm-payment-followup-status-card__label {
  display: inline-flex;
  align-items: center;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.2;
}

.crm-payment-followup-status-card__value {
  display: block;
  margin: 0;
  font-size: clamp(1.05rem, 0.55vw + 0.95rem, 1.38rem);
  line-height: 1.15;
}

.crm-payment-followup-status-card__meta {
  color: #617286;
  font-size: 0.8rem;
  font-weight: 600;
}

.crm-payment-followup-status-card--pending {
  background: linear-gradient(180deg, rgba(255, 248, 235, 0.96), rgba(255, 255, 255, 0.94));
  border-color: rgba(224, 168, 64, 0.18);
}

.crm-payment-followup-status-card--pending .card-body::after {
  background: linear-gradient(90deg, rgba(224, 168, 64, 0.9), rgba(245, 194, 92, 0.82));
}

.crm-payment-followup-status-card--pending .crm-payment-followup-status-card__label,
.crm-payment-followup-status-card--pending .crm-payment-followup-status-card__value {
  color: #a06506;
}

.crm-payment-followup-status-card--partial {
  background: linear-gradient(180deg, rgba(239, 247, 255, 0.95), rgba(255, 255, 255, 0.94));
  border-color: rgba(15, 111, 214, 0.16);
}

.crm-payment-followup-status-card--partial .card-body::after {
  background: linear-gradient(90deg, rgba(15, 111, 214, 0.9), rgba(99, 171, 242, 0.82));
}

.crm-payment-followup-status-card--partial .crm-payment-followup-status-card__label,
.crm-payment-followup-status-card--partial .crm-payment-followup-status-card__value {
  color: #0f6fd6;
}

.crm-payment-followup-status-card--default {
  background: linear-gradient(180deg, rgba(255, 244, 248, 0.96), rgba(255, 255, 255, 0.94));
  border-color: rgba(214, 51, 132, 0.16);
}

.crm-payment-followup-status-card--default .card-body::after {
  background: linear-gradient(90deg, rgba(214, 51, 132, 0.92), rgba(234, 119, 180, 0.82));
}

.crm-payment-followup-status-card--default .crm-payment-followup-status-card__label,
.crm-payment-followup-status-card--default .crm-payment-followup-status-card__value {
  color: #d63384;
}

.crm-payment-followup-table-card {
  border: 1px solid rgba(222, 232, 240, 0.95);
  overflow: hidden;
}

.crm-payment-followup-table thead th {
  background: linear-gradient(180deg, #fff7e6 0%, #ffe9c5 100%);
  color: #7e5a12;
  border-bottom-color: rgba(224, 168, 64, 0.24);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: none;
}

.crm-payment-followup-table tbody tr:nth-child(even) {
  background: rgba(248, 250, 252, 0.92);
}

.crm-payment-followup-table tbody tr:hover {
  background: rgba(239, 244, 250, 0.92);
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .crm-payment-followup-filter-panel form.row {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .crm-payment-followup-filter-panel form.row > [class*="col-"] {
    width: auto;
    max-width: none;
    min-width: 0;
    padding: 0;
  }

  .crm-payment-followup-filter-panel form.row > div:has(> #payment-followup-search) {
    grid-column: span 4;
  }

  .crm-payment-followup-filter-panel form.row > div:has(> #payment-followup-date-from),
  .crm-payment-followup-filter-panel form.row > div:has(> #payment-followup-date-to),
  .crm-payment-followup-filter-panel form.row > div:has(> #payment-followup-closer),
  .crm-payment-followup-filter-panel form.row > div:has(> #payment-followup-status),
  .crm-payment-followup-filter-panel form.row > div:has(> #payment-followup-page),
  .crm-payment-followup-filter-panel form.row > div:has(> #payment-followup-country) {
    grid-column: span 2;
  }

  .crm-payment-followup-filter-panel form.row > .col-12:last-child {
    grid-column: 1 / -1;
  }

  .crm-payment-followup-stack__summary .row > [class*="col-"] {
    width: 25%;
  }

  .crm-payment-followup-stack__summary .row > [class*="col-"]:nth-child(n + 5) {
    width: 50%;
  }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  .crm-payment-followup-stack__summary .row > [class*="col-"] {
    width: 16.666667%;
  }
}

.crm-payment-followup-note,
.crm-payment-followup-customer,
.crm-payment-followup-admin {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.crm-payment-followup-note strong {
  color: #2a3647;
  font-size: 0.82rem;
  line-height: 1.4;
}

.crm-payment-followup-note .crm-paid-orders-note-trigger {
  max-width: 17rem;
  padding: 0;
  color: #2a3647;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: left;
}

.crm-payment-followup-note .crm-paid-orders-note-trigger:hover,
.crm-payment-followup-note .crm-paid-orders-note-trigger:focus-visible {
  color: #1f5f98;
  text-decoration: underline;
}

.crm-payment-followup-note small,
.crm-payment-followup-customer small,
.crm-payment-followup-admin small {
  color: #778498;
  font-size: 0.72rem;
}

@media (max-width: 991.98px) {
  .crm-payment-followup-table th,
  .crm-payment-followup-table td {
    white-space: nowrap;
  }
}

@media (max-width: 575.98px) {
  .crm-payment-followup-stack__summary .row {
    --bs-gutter-x: 0.6rem;
    --bs-gutter-y: 0.6rem;
  }

  .crm-payment-followup-kpi .card-body,
  .crm-payment-followup-status-card .card-body {
    min-height: 8.5rem;
    padding: 0.72rem 0.72rem 0.68rem;
  }

  .crm-payment-followup-kpi .crm-kpi-head {
    height: 100%;
    flex-direction: column;
    gap: 0.58rem;
  }

  .crm-payment-followup-kpi .crm-kpi-label {
    margin-bottom: 0.24rem;
    font-size: 0.66rem;
    line-height: 1.2;
  }

  .crm-payment-followup-kpi .crm-kpi-value {
    font-size: clamp(1.05rem, 5.8vw, 1.35rem);
    line-height: 1.05;
    letter-spacing: -0.025em;
    overflow-wrap: anywhere;
  }

  .crm-payment-followup-kpi .crm-kpi-meta {
    margin-top: 0.24rem;
    font-size: 0.66rem;
    line-height: 1.2;
  }

  .crm-payment-followup-kpi .crm-kpi-icon {
    width: 2rem;
    height: 2rem;
    margin-top: auto;
    border-radius: 0.68rem;
  }

  .crm-payment-followup-status-card__label {
    font-size: 0.76rem;
  }

  .crm-payment-followup-status-card__value {
    font-size: 1.08rem;
    overflow-wrap: anywhere;
  }

  .crm-payment-followup-status-card__meta {
    font-size: 0.66rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
  }
}

body.crm-order-workspace-body {
  background: var(--tblr-bg-surface-secondary);
}

.crm-order-workspace-body .admin-topnav {
  background: var(--tblr-bg-surface);
  border-bottom: 1px solid var(--tblr-border-color);
  box-shadow: none;
}

.crm-order-workspace-page .crm-page-header-band {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.crm-order-workspace-page .crm-page-header {
  padding-top: 0;
  padding-bottom: 0.75rem;
}

.crm-order-unified-shell {
  display: grid;
  gap: 1rem;
  margin-top: 0;
}

.crm-order-view-page-chip {
  background: rgba(47, 111, 237, 0.1);
  border-color: rgba(47, 111, 237, 0.2);
  color: #2f6fed;
}

.crm-order-view-stepnav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
  padding: 0.6rem;
  border: 1px solid rgba(206, 216, 227, 0.92);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.crm-order-view-stepnav__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 0;
  min-height: 3rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.96);
  color: #334155;
  text-align: center;
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.crm-order-view-stepnav__item:hover,
.crm-order-view-stepnav__item:focus {
  color: #0f172a;
  border-color: rgba(148, 163, 184, 0.38);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

.crm-order-view-stepnav__item.is-active {
  border-color: rgba(47, 111, 237, 0.24);
  box-shadow: 0 12px 28px rgba(47, 111, 237, 0.08);
}

.crm-order-view-stepnav__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1;
  flex: 0 0 auto;
}

.crm-order-view-stepnav__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-order-view-stepnav__item--order .crm-order-view-stepnav__number {
  background: #eef4ff;
  color: #2f6fed;
}

.crm-order-view-stepnav__item--items .crm-order-view-stepnav__number {
  background: #fff6e8;
  color: #c9871a;
}

.crm-order-view-stepnav__item--payment .crm-order-view-stepnav__number {
  background: #ecfdf3;
  color: #1f9d61;
}

.crm-order-view-stepnav__item--shipping .crm-order-view-stepnav__number {
  background: #fff9e7;
  color: #b88a10;
}

.crm-order-view-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.crm-order-view-media-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 0.95rem;
  align-items: start;
}

.crm-order-view-media-column {
  display: grid;
  gap: 0.95rem;
  min-width: 0;
}

.crm-order-view-main-grid > *,
.crm-order-view-media-grid > * {
  min-width: 0;
}

.crm-order-unified-section {
  --crm-order-section-accent: var(--tblr-primary);
  --crm-order-section-accent-rgb: var(--tblr-primary-rgb);
  --crm-order-section-surface: rgba(var(--tblr-primary-rgb), 0.08);
  --crm-order-section-surface-strong: rgba(var(--tblr-primary-rgb), 0.12);
  --crm-order-section-border: rgba(148, 163, 184, 0.22);
  border: 1px solid var(--crm-order-section-border);
  border-top: 3px solid var(--crm-order-section-accent);
  border-radius: var(--tblr-border-radius-lg);
  background: var(--tblr-bg-surface);
  box-shadow: none;
}

.crm-order-unified-section .card-header {
  padding: 1rem 1rem 0.85rem;
  border-bottom-color: rgba(var(--crm-order-section-accent-rgb), 0.12);
  background: linear-gradient(180deg, var(--crm-order-section-surface) 0%, rgba(255, 255, 255, 0.94) 100%);
  border-top-left-radius: calc(var(--tblr-border-radius-lg) - 1px);
  border-top-right-radius: calc(var(--tblr-border-radius-lg) - 1px);
}

.crm-order-unified-section .card-body {
  padding: 1rem;
}

.crm-order-unified-section .card-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  color: var(--tblr-body-color);
  font-size: 1.02rem;
}

.crm-order-section-note {
  margin-top: 0.25rem;
  color: var(--tblr-muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.crm-order-unified-section .form-control,
.crm-order-unified-section .form-select,
.crm-order-unified-section .crm-searchable-input {
  min-height: 2.5rem;
}

.crm-order-unified-section textarea.form-control {
  min-height: 6rem;
}

.crm-order-unified-section .crm-section-heading {
  gap: 0.65rem;
}

.crm-order-unified-section .crm-section-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--crm-order-section-surface-strong);
  color: var(--crm-order-section-accent);
  box-shadow: none;
}

.crm-order-unified-section .crm-section-icon .icon {
  width: 0.95rem;
  height: 0.95rem;
}

.crm-order-unified-section .form-label {
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.crm-order-view-static-control {
  display: block;
  width: 100%;
  min-height: 2.5rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--tblr-border-color);
  border-radius: var(--tblr-border-radius-lg);
  background: #fff;
  color: var(--tblr-body-color);
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.45;
  box-shadow:
    inset 0 1px 1px rgba(15, 23, 42, 0.03),
    0 1px 0 rgba(255, 255, 255, 0.82);
  word-break: break-word;
}

.crm-order-view-static-control--accent {
  color: var(--crm-order-section-accent);
  font-weight: 800;
  border-color: rgba(var(--crm-order-section-accent-rgb), 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), color-mix(in srgb, var(--crm-order-section-surface) 48%, #fff)),
    #fff;
}

.crm-order-view-static-control--textarea {
  min-height: 6rem;
  line-height: 1.62;
  white-space: normal;
}

.crm-order-view-static-control--note {
  max-height: 12rem;
  overflow: auto;
}

.crm-order-view-static-control a {
  color: var(--crm-order-section-accent);
  font-weight: 700;
  text-decoration: none;
}

.crm-order-view-static-control a:hover,
.crm-order-view-static-control a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.14rem;
}

.crm-order-unified-section .crm-section-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--crm-order-section-accent-rgb), 0.18);
  background: rgba(var(--crm-order-section-accent-rgb), 0.08);
  color: var(--crm-order-section-accent);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  flex: 0 0 auto;
}

.crm-order-unified-section--order {
  --crm-order-section-accent: #2f6fed;
  --crm-order-section-accent-rgb: 47, 111, 237;
  --crm-order-section-surface: #eef4ff;
  --crm-order-section-surface-strong: rgba(47, 111, 237, 0.12);
  --crm-order-section-border: rgba(47, 111, 237, 0.2);
}

.crm-order-unified-section--items {
  --crm-order-section-accent: #c9871a;
  --crm-order-section-accent-rgb: 201, 135, 26;
  --crm-order-section-surface: #fff6e8;
  --crm-order-section-surface-strong: rgba(201, 135, 26, 0.12);
  --crm-order-section-border: rgba(201, 135, 26, 0.2);
}

.crm-order-unified-section--payment {
  --crm-order-section-accent: #1f9d61;
  --crm-order-section-accent-rgb: 31, 157, 97;
  --crm-order-section-surface: #ecfdf3;
  --crm-order-section-surface-strong: rgba(31, 157, 97, 0.12);
  --crm-order-section-border: rgba(31, 157, 97, 0.2);
}

.crm-order-unified-section--shipping {
  --crm-order-section-accent: #b88a10;
  --crm-order-section-accent-rgb: 184, 138, 16;
  --crm-order-section-surface: #fff9e7;
  --crm-order-section-surface-strong: rgba(184, 138, 16, 0.12);
  --crm-order-section-border: rgba(184, 138, 16, 0.2);
}

.crm-order-unified-section .crm-label-icon {
  display: none;
}

.crm-order-inline-button {
  width: 100%;
  min-height: 2.5rem;
}

.crm-order-items-table--unified thead th {
  white-space: nowrap;
}

.crm-order-items-table--unified td {
  padding-top: 0.58rem;
  padding-bottom: 0.58rem;
}

.crm-order-items-table--unified .form-control,
.crm-order-items-table--unified .form-select,
.crm-order-items-table--unified .crm-searchable-input {
  min-height: 2.42rem;
  font-size: 0.88rem;
}

.crm-order-item-index {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--tblr-primary-rgb), 0.08);
  color: var(--tblr-primary);
  font-weight: 800;
}

.crm-order-item-remove {
  min-width: 2.5rem;
}

.crm-order-items-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.72rem;
}

.crm-order-items-actions {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.crm-order-item-row--gift td {
  background: rgba(255, 247, 232, 0.55);
}

.crm-order-item-row--gift-pending td {
  background: rgba(255, 251, 235, 0.82);
}

.crm-order-totals-strip {
  display: grid;
  grid-template-columns: minmax(15rem, 2.2fr) repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  width: min(100%, 58rem);
  margin-left: auto;
}

.crm-order-totals-strip__item {
  min-width: 0;
  text-align: right;
}

.crm-order-totals-strip__item--products {
  text-align: left;
}

.crm-order-product-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.28rem;
}

.crm-order-totals-strip__item span {
  display: block;
  color: var(--tblr-muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.crm-order-totals-strip__item strong {
  display: block;
  margin-top: 0.2rem;
  font-size: 1rem;
  font-weight: 800;
}

.crm-order-product-summary__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.34rem 0.62rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.95);
  color: var(--tblr-body-color);
  line-height: 1.2;
}

.crm-order-product-summary__name {
  font-size: 0.9rem;
  font-weight: 700;
}

.crm-order-product-summary__count {
  font-size: 0.84rem;
  font-weight: 800;
  color: #475569;
}

.crm-order-product-summary__chip--more {
  background: rgba(100, 116, 139, 0.08);
  border-color: rgba(100, 116, 139, 0.16);
  color: var(--tblr-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.crm-order-product-summary__chip--gift {
  background: rgba(254, 243, 199, 0.65);
  border-color: rgba(245, 158, 11, 0.24);
}

.crm-order-product-summary__empty {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--tblr-muted);
}

.crm-order-customer-summary-card {
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-top: 3px solid rgba(32, 107, 196, 0.34);
  border-radius: var(--tblr-border-radius-lg);
  background: #fff;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.crm-order-customer-summary-card--state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.5rem;
  color: var(--tblr-muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.crm-order-customer-summary-card--state.is-error {
  border-color: rgba(214, 57, 57, 0.18);
  background: linear-gradient(135deg, rgba(214, 57, 57, 0.06), rgba(255, 255, 255, 0.98));
  color: var(--tblr-danger);
}

.crm-order-customer-summary-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.crm-order-customer-summary-card__heading {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0.28rem;
  min-width: 0;
}

.crm-order-customer-summary-card__eyebrow {
  display: block;
  color: var(--tblr-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.crm-order-customer-summary-card__name-row {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.28rem;
}

.crm-order-customer-summary-card__name {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--tblr-body-color);
}

.crm-order-customer-summary-card__code {
  display: inline-flex;
  align-items: center;
  padding: 0.16rem 0.42rem;
  border-radius: 999px;
  background: rgba(32, 107, 196, 0.08);
  color: var(--tblr-primary);
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.2;
}

.crm-order-customer-summary-card__badges {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.25rem;
}

.crm-order-customer-summary-card__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 0.3rem;
}

.crm-order-customer-summary-card__actions .btn {
  min-height: 1.75rem;
  padding: 0.24rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 700;
}

.crm-order-customer-summary-card__summary-row {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  gap: 0.28rem;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.crm-order-customer-summary-card__summary-row::-webkit-scrollbar {
  display: none;
}

.crm-order-customer-summary-card__summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  max-width: 100%;
  flex: 0 0 auto;
  min-height: 1.75rem;
  padding: 0.22rem 0.48rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--tblr-body-color);
  line-height: 1.25;
}

.crm-order-customer-summary-card__summary-chip.is-wide {
  max-width: min(100%, 21rem);
}

.crm-order-customer-summary-card__summary-chip.is-note {
  max-width: min(100%, 24rem);
}

.crm-order-customer-summary-card__summary-label {
  flex: 0 0 auto;
  color: var(--tblr-muted);
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}

.crm-order-customer-summary-card__summary-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 700;
}

.crm-order-view-summary-card {
  border-top-color: color-mix(in srgb, var(--crm-order-section-accent) 34%, #d9e1eb);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--crm-order-section-surface) 62%, #fff), rgba(255, 255, 255, 0.98)),
    #fff;
}

.crm-order-view-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(13rem, 0.65fr);
  gap: 0.9rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 1.05rem;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--crm-order-section-surface) 82%, #fff) 0%, rgba(255, 255, 255, 0.98) 72%),
    #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 10px 24px rgba(15, 23, 42, 0.03);
}

.crm-order-view-hero__main {
  min-width: 0;
}

.crm-order-view-hero__eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  margin-bottom: 0.55rem;
}

.crm-order-view-hero__micro-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.58rem;
  border-radius: 999px;
  background: rgba(var(--crm-order-section-accent-rgb), 0.12);
  color: var(--crm-order-section-accent);
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.2;
}

.crm-order-view-hero__micro-chip--soft {
  background: rgba(255, 255, 255, 0.86);
  color: #475569;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.crm-order-view-hero__title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.crm-order-view-hero__title {
  margin: 0;
  color: #0f172a;
  font-size: 1.28rem;
  font-weight: 800;
  line-height: 1.22;
}

.crm-order-view-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  margin-top: 0.48rem;
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.45;
}

.crm-order-view-hero__meta strong {
  color: #334155;
  font-weight: 800;
}

.crm-order-view-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.78rem;
}

.crm-order-view-badge-row__item {
  display: inline-flex;
  align-items: center;
  padding: 0.36rem 0.65rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #334155;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
}

.crm-order-view-hero__aside {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  min-width: 0;
  padding: 0.9rem 0.95rem;
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.16);
  text-align: right;
}

.crm-order-view-hero__aside-label {
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.35;
}

.crm-order-view-hero__aside-value {
  margin-top: 0.18rem;
  color: #0f172a;
  font-size: 1.72rem;
  font-weight: 900;
  line-height: 1.05;
}

.crm-order-view-hero__aside-note {
  display: block;
  margin-top: 0.32rem;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.45;
}

.crm-order-view-insight-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.72rem;
}

.crm-order-view-insight-card {
  min-width: 0;
  min-height: 5rem;
  padding: 0.82rem 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 1rem;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--crm-order-section-surface) 76%, #fff), rgba(255, 255, 255, 0.98)),
    #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

.crm-order-view-summary-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.55rem;
}

.crm-order-view-summary-strip__item {
  min-width: 0;
  padding: 0.75rem 0.82rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 0.95rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92)),
    color-mix(in srgb, var(--crm-order-section-surface) 22%, #fff);
}

.crm-order-view-summary-strip__item span {
  display: block;
  color: var(--tblr-muted);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.35;
}

.crm-order-view-summary-strip__item strong {
  display: block;
  margin-top: 0.24rem;
  color: var(--tblr-body-color);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.45;
  word-break: break-word;
}

.crm-order-view-summary-strip__item--highlight {
  border-color: rgba(47, 111, 237, 0.16);
  background:
    linear-gradient(180deg, rgba(238, 244, 255, 0.96), rgba(255, 255, 255, 0.98)),
    #fff;
}

.crm-order-view-field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr));
  gap: 0.75rem;
}

.crm-order-view-field-grid--dashboard {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.crm-order-view-field-card {
  min-width: 0;
  min-height: 4.7rem;
  padding: 0.78rem 0.88rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 1rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92)),
    color-mix(in srgb, var(--crm-order-section-surface) 28%, #fff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

.crm-order-view-field-card--spotlight {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--crm-order-section-surface) 72%, #fff), rgba(255, 255, 255, 0.98)),
    #fff;
  border-color: color-mix(in srgb, var(--crm-order-section-accent) 18%, rgba(148, 163, 184, 0.18));
}

.crm-order-view-field-card.is-full {
  grid-column: 1 / -1;
  min-height: auto;
}

.crm-order-view-field-card__label {
  display: block;
  color: var(--tblr-muted);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.35;
}

.crm-order-view-field-card__value {
  display: block;
  color: var(--tblr-body-color);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.52;
  word-break: break-word;
}

.crm-order-view-field-card__value a {
  color: var(--crm-order-section-accent);
  text-decoration: none;
}

.crm-order-view-field-card__value a:hover,
.crm-order-view-field-card__value a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.14rem;
}

.crm-order-view-field-card__meta {
  display: block;
  margin-top: auto;
  color: var(--tblr-muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.crm-order-view-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 0.75rem;
}

.crm-order-view-detail-panel {
  min-width: 0;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 1rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92)),
    color-mix(in srgb, var(--crm-order-section-surface) 20%, #fff);
}

.crm-order-view-detail-panel--full {
  grid-column: 1 / -1;
}

.crm-order-view-detail-panel__label {
  display: block;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.35;
}

.crm-order-view-detail-panel__content {
  margin-top: 0.38rem;
  color: #0f172a;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.65;
  word-break: break-word;
}

.crm-order-view-detail-panel__content--note {
  max-height: 11.5rem;
  overflow: auto;
  padding-right: 0.2rem;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.7;
  color: #334155;
}

.crm-order-view-subsection {
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 1rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92)),
    color-mix(in srgb, var(--crm-order-section-surface) 18%, #fff);
}

.crm-order-view-subsection__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.crm-order-view-subsection__head strong {
  display: block;
  color: var(--tblr-body-color);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.35;
}

.crm-order-view-subsection__head small {
  display: block;
  margin-top: 0.18rem;
  color: var(--tblr-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

@media (max-width: 1199.98px) {
  .crm-order-view-stepnav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-order-view-hero,
  .crm-order-view-insight-strip,
  .crm-order-view-detail-grid,
  .crm-order-view-summary-strip,
  .crm-order-view-field-grid--dashboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-order-view-main-grid,
  .crm-order-view-media-grid {
    grid-template-columns: 1fr;
  }

  .crm-order-view-hero__aside {
    align-items: flex-start;
    text-align: left;
  }
}

.crm-order-upload-block {
  margin-top: 1rem;
}

.crm-order-upload-block__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.75rem;
}

.crm-order-upload-block__head strong {
  font-size: 0.86rem;
  font-weight: 800;
}

.crm-order-upload-block__head small {
  font-size: 0.76rem;
  color: var(--tblr-muted);
}

.crm-order-upload-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
}

.crm-order-upload-slot {
  position: relative;
  min-height: 6.75rem;
  border: 1px dashed var(--tblr-border-color);
  border-radius: var(--tblr-border-radius-lg);
  background: var(--tblr-bg-surface);
  overflow: hidden;
  cursor: pointer;
}

.crm-order-upload-slot.has-file {
  border-style: solid;
}

.crm-order-upload-slot__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.crm-order-upload-slot__inner {
  min-height: 6.75rem;
  padding: 0.72rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  text-align: center;
}

.crm-order-upload-slot__icon {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--tblr-muted);
}

.crm-order-upload-slot__icon .icon {
  width: 1.25rem;
  height: 1.25rem;
}

.crm-order-upload-slot__preview {
  width: 100%;
  height: 3.75rem;
  border-radius: var(--tblr-border-radius);
  border: 1px solid var(--tblr-border-color);
  object-fit: cover;
}

.crm-order-upload-slot__label {
  font-size: 0.79rem;
  font-weight: 700;
}

.crm-order-upload-slot__note {
  font-size: 0.68rem;
  line-height: 1.45;
  word-break: break-word;
  color: var(--tblr-muted);
}

.crm-order-check-wrap {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100%;
}

.crm-order-check {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  min-height: 2.5rem;
  padding: 0.15rem 0;
  font-weight: 700;
}

.crm-order-check .form-check-input {
  width: 1rem;
  height: 1rem;
  margin: 0;
}

.crm-order-form-footer--unified {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.25rem;
}

.crm-order-form-footer__actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-left: auto;
}

.crm-order-inline-customer-modal__dialog {
  max-width: 31.5rem;
}

.crm-order-inline-customer-form__alert {
  margin-bottom: 0.85rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--tblr-border-radius);
  font-size: 0.82rem;
  font-weight: 700;
}

.crm-order-inline-customer-form__alert.is-error {
  border: 1px solid rgba(var(--tblr-danger-rgb), 0.25);
}

.crm-order-inline-customer-modal .crm-history-modal__footer {
  align-items: flex-end;
}

.crm-order-inline-customer-modal .crm-history-modal__count {
  max-width: 14.5rem;
  line-height: 1.5;
}

.crm-order-inline-customer-modal .form-control,
.crm-order-inline-customer-modal .form-select {
  min-height: 2.5rem;
}

@media (max-width: 767.98px) {
  .crm-order-view-stepnav,
  .crm-order-view-summary-strip,
  .crm-order-view-field-grid--dashboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-order-items-footer,
  .crm-order-form-footer--unified,
  .crm-order-form-footer__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .crm-order-totals-strip,
  .crm-order-upload-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .crm-order-totals-strip__item--products {
    grid-column: 1 / -1;
  }

  .crm-order-customer-summary-card__head {
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
  }

  .crm-order-customer-summary-card__actions {
    width: auto;
    justify-content: flex-start;
  }

  .crm-order-customer-summary-card__summary-row {
    gap: 0.4rem;
  }

  .crm-order-customer-summary-card__summary-chip,
  .crm-order-customer-summary-card__summary-chip.is-wide,
  .crm-order-customer-summary-card__summary-chip.is-note {
    max-width: 100%;
  }

  .crm-order-view-field-grid {
    grid-template-columns: 1fr;
  }

  .crm-order-view-main-grid,
  .crm-order-view-media-grid {
    grid-template-columns: 1fr;
  }

  .crm-order-view-field-card.is-full {
    grid-column: auto;
  }

  .crm-order-view-subsection__head {
    flex-direction: column;
    align-items: stretch;
  }

  .crm-order-upload-slot,
  .crm-order-upload-slot__inner {
    min-height: 6.25rem;
  }

  .crm-order-inline-customer-modal .crm-history-modal__footer,
  .crm-order-inline-customer-modal .crm-history-modal__actions {
    align-items: stretch;
  }

  .crm-order-inline-customer-modal .crm-history-modal__count {
    max-width: none;
  }
}

.crm-product-management-note .card-body {
  display: grid;
  gap: 1rem;
}

.crm-product-management-note__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.crm-product-management-note__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.crm-product-card .card-body,
.crm-gift-card .card-body {
  display: grid;
  gap: 1rem;
}

.crm-product-card__head,
.crm-gift-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.crm-product-card__code,
.crm-gift-card__product {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7c8ca3;
}

.crm-product-card__title,
.crm-gift-card__title {
  margin: 0.35rem 0 0;
  font-size: 1.1rem;
  line-height: 1.25;
}

.crm-product-card__meta,
.crm-gift-card__meta,
.crm-product-card__preview-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.crm-product-card__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.crm-product-card__stat {
  padding: 0.85rem 0.9rem;
  border: 1px solid rgba(207, 217, 228, 0.88);
  border-radius: 1rem;
  background: rgba(248, 250, 252, 0.82);
}

.crm-product-card__stat span,
.crm-product-card__preview-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #7c8ca3;
}

.crm-product-card__stat strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 1.25rem;
  line-height: 1;
  color: #1f2a3d;
}

.crm-product-card__stat small {
  display: block;
  margin-top: 0.18rem;
  color: #8b98ab;
}

.crm-product-card__preview {
  display: grid;
  gap: 0.6rem;
}

.crm-product-card__preview-chips .crm-chip small {
  display: inline-block;
  margin-left: 0.3rem;
  font-size: 0.68rem;
  color: #7c8ca3;
}

.crm-gift-card__stats {
  display: grid;
  gap: 0.75rem;
}

@media (max-width: 991.98px) {
  .crm-product-management-note__head {
    flex-direction: column;
  }

  .crm-product-management-note__grid,
  .crm-product-card__stats {
    grid-template-columns: 1fr;
  }
}

.crm-team-summary-body {
  background:
    radial-gradient(circle at 0% 0%, rgba(201, 154, 45, 0.12), transparent 24%),
    radial-gradient(circle at 100% 16%, rgba(46, 107, 81, 0.08), transparent 28%),
    linear-gradient(180deg, #f7f9fc 0%, #f2f5fa 100%);
}

.crm-team-summary-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.crm-team-summary-filter-panel {
  border: 1px solid rgba(216, 226, 236, 0.94);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(249, 251, 255, 0.94)),
    #fff;
}

.crm-team-summary-filter-panel .card-body {
  padding: 1rem 1.05rem;
}

.crm-team-summary-filter-panel form.row {
  --bs-gutter-x: 0.82rem;
  --bs-gutter-y: 0.58rem;
}

.crm-team-summary-filter-panel .form-label {
  margin-bottom: 0.24rem;
}

.crm-team-summary-filter-panel .form-control,
.crm-team-summary-filter-panel .form-select {
  min-height: calc(1.5em + 0.96rem + 2px);
  padding-top: 0.48rem;
  padding-bottom: 0.48rem;
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(148, 163, 184, 0.22);
}

.crm-team-summary-filter-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-bottom: 0.65rem;
}

.crm-team-summary-title {
  color: #22324b;
  font-size: clamp(1.2rem, 1vw + 0.8rem, 1.8rem);
  font-weight: 800;
}

.crm-team-summary-copy {
  color: #6a7a92;
  font-size: 0.88rem;
  line-height: 1.6;
}

.crm-team-summary-range-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.68rem 1rem;
  border: 1px solid rgba(205, 217, 232, 0.96);
  border-radius: 1rem;
  background: #ffffff;
  color: #22324b;
  font-size: 0.86rem;
  font-weight: 800;
  white-space: nowrap;
}

.crm-team-summary-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.crm-team-summary-actions .btn-list {
  margin: 0;
}

.crm-team-summary-presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  margin-left: auto;
}

.crm-team-summary-presets__button.active,
.crm-team-summary-presets__button:hover,
.crm-team-summary-presets__button:focus {
  background: #204f90;
  border-color: #204f90;
  color: #ffffff;
}

.crm-team-summary-kpi .crm-kpi-label {
  color: #6c7a8d;
}

.crm-team-summary-kpi .crm-kpi-value {
  color: #23334a;
}

.crm-team-summary-kpi.crm-kpi-team-consistency .card-body::after {
  background: linear-gradient(90deg, rgba(249, 168, 37, 0.96), rgba(252, 211, 77, 0.82));
}

.crm-team-summary-kpi.crm-kpi-team-consistency .crm-kpi-icon {
  color: #d18a09;
  background: rgba(255, 249, 235, 0.95);
}

.crm-team-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.crm-team-summary-board-card {
  border: 1px solid rgba(222, 232, 240, 0.95);
  overflow: hidden;
}

.crm-team-summary-board-card .card-header {
  min-height: auto;
  display: flex;
  align-items: stretch;
  padding: 1rem 1.05rem;
}

.crm-team-summary-board-head {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.82rem;
}

.crm-team-summary-board-head__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.crm-team-summary-board-form .row {
  --bs-gutter-x: 0.82rem;
  --bs-gutter-y: 0.55rem;
}

.crm-team-summary-board-form .form-label {
  margin-bottom: 0.22rem;
  color: #5f6f86;
  font-size: 0.73rem;
  font-weight: 700;
}

.crm-team-summary-board-form .form-control,
.crm-team-summary-board-form .form-select {
  min-height: calc(1.5em + 0.8rem + 2px);
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(148, 163, 184, 0.24);
  font-size: 0.82rem;
}

.crm-team-summary-board-form__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.72rem;
  flex-wrap: wrap;
}

.crm-team-summary-board-form__actions .btn-list {
  margin: 0;
}

.crm-team-summary-settings-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.crm-team-summary-settings-panel__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.crm-team-summary-settings-panel__copy {
  color: #62748a;
  font-size: 0.86rem;
  font-weight: 700;
}

.crm-team-summary-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}

.crm-team-summary-settings-option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 0.95rem;
  border-radius: 1rem;
  border: 1px solid rgba(207, 221, 236, 0.92);
  background: linear-gradient(180deg, rgba(248, 252, 255, 0.95), rgba(255, 255, 255, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.crm-team-summary-settings-option:hover {
  border-color: rgba(71, 116, 190, 0.34);
  box-shadow: 0 12px 24px rgba(148, 163, 184, 0.12);
  transform: translateY(-1px);
}

.crm-team-summary-settings-option .form-check-input {
  margin-top: 0.12rem;
  flex-shrink: 0;
}

.crm-team-summary-settings-option__text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.crm-team-summary-settings-option__name {
  color: #1f2a44;
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.25;
}

.crm-team-summary-settings-option__meta {
  color: #73839b;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
}

[data-team-summary-settings-feedback].is-muted {
  color: #5d6f85;
}

[data-team-summary-settings-feedback].is-success {
  color: #15803d;
}

[data-team-summary-settings-feedback].is-danger {
  color: #c2410c;
}

.crm-team-summary-page.is-team-summary-loading .crm-team-summary-stack {
  opacity: 0.58;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.crm-team-summary-board-table {
  font-size: 0.82rem;
}

.crm-team-summary-board-table thead th,
.crm-team-summary-daily-table thead th {
  border-bottom-color: rgba(84, 148, 104, 0.2);
  color: #295f3a;
  font-size: 0.72rem;
  font-weight: 800;
  padding-top: 0.62rem;
  padding-bottom: 0.62rem;
  text-transform: none;
  white-space: nowrap;
}

.crm-team-summary-board-table thead th {
  background: linear-gradient(180deg, #eef8f0 0%, #dff1e5 100%);
}

.crm-team-summary-daily-table thead th {
  background: linear-gradient(180deg, #f9fbff 0%, #eef4fc 100%);
}

.crm-team-summary-board-table tbody td,
.crm-team-summary-board-table tfoot th,
.crm-team-summary-board-table tfoot td,
.crm-team-summary-daily-table tbody td,
.crm-team-summary-daily-table tfoot th,
.crm-team-summary-daily-table tfoot td {
  padding-top: 0.66rem;
  padding-bottom: 0.66rem;
  vertical-align: middle;
}

.crm-team-summary-board-table tbody tr:nth-child(even),
.crm-team-summary-daily-table tbody tr:nth-child(even) {
  background: rgba(248, 250, 252, 0.9);
}

.crm-team-summary-board-table tbody tr:hover,
.crm-team-summary-daily-table tbody tr:hover {
  background: rgba(239, 244, 250, 0.92);
}

.crm-team-summary-board-table tfoot tr,
.crm-team-summary-daily-table tfoot tr {
  background: linear-gradient(180deg, rgba(255, 247, 224, 0.96), rgba(255, 252, 239, 0.94));
}

.crm-team-summary-board-table tfoot th,
.crm-team-summary-board-table tfoot td,
.crm-team-summary-daily-table tfoot th,
.crm-team-summary-daily-table tfoot td {
  color: #254065;
  font-weight: 800;
}

.crm-team-summary-col--new {
  color: #0d7bc2;
}

.crm-team-summary-col--re {
  color: #22863a;
}

.crm-team-summary-col--refer {
  color: #d63384;
}

.crm-team-summary-col--sales {
  color: #1d4ed8;
}

.crm-team-summary-member-link {
  color: #23344d;
  font-weight: 700;
  text-decoration: none;
}

.crm-team-summary-member-link.is-static {
  cursor: default;
}

.crm-team-summary-member-link:hover,
.crm-team-summary-member-link:focus {
  color: #1d4ed8;
  text-decoration: underline;
}

.crm-team-summary-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.85rem;
  min-height: 1.85rem;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: #eef2f8;
  color: #516173;
  font-size: 0.74rem;
  font-weight: 800;
}

.crm-team-summary-rank.is-gold {
  background: linear-gradient(180deg, #ffe7a8 0%, #ffd36a 100%);
  color: #8a5a00;
}

.crm-team-summary-rank.is-silver {
  background: linear-gradient(180deg, #edf2f7 0%, #dce4ee 100%);
  color: #556476;
}

.crm-team-summary-rank.is-bronze {
  background: linear-gradient(180deg, #ffd8bf 0%, #ffbc8d 100%);
  color: #8d4c20;
}

.crm-team-summary-daily-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.crm-team-summary-daily-stack--single {
  height: 100%;
}

.crm-team-summary-daily-stack--single .crm-team-summary-daily-card {
  flex: 1 1 auto;
}

.crm-team-summary-daily-card .card-body {
  padding: 0.92rem;
}

.crm-team-summary-daily-stack--single .crm-team-summary-daily-card .card-body {
  height: 100%;
  display: flex;
}

.crm-team-summary-daily-card__layout {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr);
  gap: 0.9rem;
  align-items: stretch;
}

.crm-team-summary-daily-stack--single .crm-team-summary-daily-card__layout {
  flex: 1 1 auto;
  min-height: 100%;
}

.crm-team-summary-daily-date {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.16rem;
  border-radius: 1rem;
  background: linear-gradient(180deg, #ffef9f 0%, #ffd75c 100%);
  color: #2a2c39;
  text-align: center;
  padding: 0.9rem 0.6rem;
}

.crm-team-summary-daily-date__day {
  font-size: clamp(1.85rem, 1vw + 1.2rem, 2.6rem);
  line-height: 1;
  font-weight: 800;
}

.crm-team-summary-daily-date__month {
  font-size: 0.74rem;
  font-weight: 700;
}

.crm-team-summary-daily-date__hint {
  margin-top: 0.2rem;
  font-size: 0.78rem;
  font-weight: 800;
}

.crm-team-summary-daily-table-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.crm-team-summary-daily-stack--single .crm-team-summary-daily-table-wrap {
  flex: 1 1 auto;
}

.crm-team-summary-daily-stack--single .crm-team-summary-daily-table-wrap .table-responsive {
  flex: 1 1 auto;
  display: flex;
}

.crm-team-summary-daily-table {
  font-size: 0.76rem;
}

.crm-team-summary-daily-stack--single .crm-team-summary-daily-table {
  height: 100%;
}

.crm-team-summary-daily-actions {
  display: flex;
  justify-content: flex-end;
}

.crm-team-summary-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 8rem;
  border: 1px dashed rgba(180, 194, 214, 0.9);
  border-radius: 1rem;
  background: rgba(250, 252, 255, 0.92);
  color: #73839a;
  text-align: center;
  padding: 1rem;
}

@media (max-width: 1199.98px) {
  .crm-team-summary-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 767.98px) {
  .crm-team-summary-filter-panel .card-body {
    padding: 0.88rem 0.88rem 0.94rem;
  }

  .crm-team-summary-filter-head,
  .crm-team-summary-actions,
  .crm-team-summary-presets,
  .crm-team-summary-board-head__top,
  .crm-team-summary-board-form__actions,
  .crm-team-summary-settings-panel__toolbar {
    align-items: stretch;
  }

  .crm-team-summary-range-badge {
    width: 100%;
  }

  .crm-team-summary-presets {
    justify-content: flex-start;
    margin-left: 0;
  }

  .crm-team-summary-board-card .card-header {
    padding: 0.88rem;
  }

  .crm-team-summary-daily-card__layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .crm-team-summary-daily-date {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    text-align: left;
    padding: 0.85rem 0.9rem;
  }

  .crm-team-summary-daily-date__day {
    font-size: 1.9rem;
    margin-right: 0.35rem;
  }
}

/* Orders: keep the Manage column visible while the desktop table scrolls horizontally. */
@media (min-width: 992px) {
  .crm-orders-table .crm-orders-table__manage-cell {
    position: sticky;
    right: 0;
    width: 8rem;
    min-width: 8rem;
    max-width: 8rem;
    padding-right: 0.35rem !important;
    padding-left: 0.35rem !important;
    background: #ffffff;
    background-image: none;
    background-clip: padding-box;
    box-shadow: -10px 0 18px -18px rgba(15, 23, 42, 0.48);
    isolation: isolate;
  }

  .crm-orders-table thead .crm-orders-table__manage-cell {
    top: 0;
    z-index: 10;
    background: #f8fafc !important;
  }

  .crm-orders-table tbody .crm-orders-table__manage-cell {
    z-index: 20;
  }

  .crm-orders-table tbody .crm-orders-table__manage-cell::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: #ffffff;
    pointer-events: none;
  }

  .crm-orders-table tbody tr:hover > .crm-orders-table__manage-cell {
    background: #f3f7fb;
  }

  .crm-orders-table tbody tr:hover > .crm-orders-table__manage-cell::before {
    background: #f3f7fb;
  }

  .crm-orders-table__manage-cell .crm-order-row-actions {
    position: relative;
    z-index: 1;
    gap: 0.25rem;
  }

  .crm-orders-table--compact-manage .crm-orders-table__manage-cell {
    width: 5.75rem;
    min-width: 5.75rem;
    max-width: 5.75rem;
    padding-right: 0.25rem !important;
    padding-left: 0.25rem !important;
  }

  .crm-orders-table--compact-manage .crm-order-row-actions {
    gap: 0.2rem;
  }
}

/* Prevent iOS Safari from auto-zooming when a mobile form control receives focus. */
@media (max-width: 767.98px) {
  input.form-control,
  select.form-select,
  textarea.form-control,
  .crm-searchable-input {
    font-size: 16px;
  }
}

/* Order form workflow release 2026-08-02: scoped live-baseline overrides. */
body.crm-order-workspace-body {
  background: var(--tblr-bg-surface-secondary);
}

.crm-order-workspace-body .admin-topnav {
  background: var(--tblr-bg-surface);
  border-bottom: 1px solid var(--tblr-border-color);
  box-shadow: none;
}

.crm-order-workspace-page .crm-page-header-band {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.crm-order-workspace-page .crm-page-header {
  padding-top: 0;
  padding-bottom: 0.75rem;
}

.crm-order-unified-shell {
  display: grid;
  gap: 1rem;
  margin-top: 0;
}

.crm-order-view-page-chip {
  background: rgba(47, 111, 237, 0.1);
  border-color: rgba(47, 111, 237, 0.2);
  color: #2f6fed;
}

.crm-order-view-stepnav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
  padding: 0.6rem;
  border: 1px solid rgba(206, 216, 227, 0.92);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.crm-order-view-stepnav__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 0;
  min-height: 3rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.96);
  color: #334155;
  text-align: center;
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.crm-order-view-stepnav__item:hover,
.crm-order-view-stepnav__item:focus {
  color: #0f172a;
  border-color: rgba(148, 163, 184, 0.38);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

.crm-order-view-stepnav__item.is-active {
  border-color: rgba(47, 111, 237, 0.24);
  box-shadow: 0 12px 28px rgba(47, 111, 237, 0.08);
}

.crm-order-view-stepnav__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1;
  flex: 0 0 auto;
}

.crm-order-view-stepnav__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-order-view-stepnav__item--order .crm-order-view-stepnav__number {
  background: #eef4ff;
  color: #2f6fed;
}

.crm-order-view-stepnav__item--items .crm-order-view-stepnav__number {
  background: #fff6e8;
  color: #c9871a;
}

.crm-order-view-stepnav__item--payment .crm-order-view-stepnav__number {
  background: #ecfdf3;
  color: #1f9d61;
}

.crm-order-view-stepnav__item--shipping .crm-order-view-stepnav__number {
  background: #fff9e7;
  color: #b88a10;
}

.crm-order-view-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.crm-order-view-media-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 0.95rem;
  align-items: start;
}

.crm-order-view-media-column {
  display: grid;
  gap: 0.95rem;
  min-width: 0;
}

.crm-order-view-main-grid > *,
.crm-order-view-media-grid > * {
  min-width: 0;
}

.crm-order-unified-section {
  --crm-order-section-accent: var(--tblr-primary);
  --crm-order-section-accent-rgb: var(--tblr-primary-rgb);
  --crm-order-section-surface: rgba(var(--tblr-primary-rgb), 0.08);
  --crm-order-section-surface-strong: rgba(var(--tblr-primary-rgb), 0.12);
  --crm-order-section-border: rgba(148, 163, 184, 0.22);
  border: 1px solid var(--crm-order-section-border);
  border-top: 3px solid var(--crm-order-section-accent);
  border-radius: var(--tblr-border-radius-lg);
  background: var(--tblr-bg-surface);
  box-shadow: none;
}

.crm-order-unified-section .card-header {
  padding: 1rem 1rem 0.85rem;
  border-bottom-color: rgba(var(--crm-order-section-accent-rgb), 0.12);
  background: linear-gradient(180deg, var(--crm-order-section-surface) 0%, rgba(255, 255, 255, 0.94) 100%);
  border-top-left-radius: calc(var(--tblr-border-radius-lg) - 1px);
  border-top-right-radius: calc(var(--tblr-border-radius-lg) - 1px);
}

.crm-order-unified-section .card-body {
  padding: 1rem;
}

.crm-order-unified-section .card-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  color: var(--tblr-body-color);
  font-size: 1.02rem;
}

.crm-order-section-note {
  margin-top: 0.25rem;
  color: var(--tblr-muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.crm-order-unified-section .form-control,
.crm-order-unified-section .form-select,
.crm-order-unified-section .crm-searchable-input {
  min-height: 2.5rem;
}

.crm-order-unified-section textarea.form-control {
  min-height: 6rem;
}

.crm-order-unified-section .crm-section-heading {
  gap: 0.65rem;
}

.crm-order-header-closer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  min-width: 0;
  margin-left: auto;
}

.crm-order-header-closer > .form-label {
  flex: 0 0 auto;
  margin: 0;
  white-space: nowrap;
}

.crm-order-header-closer > .form-select,
.crm-order-header-closer > .form-control,
.crm-order-header-closer > .crm-searchable-select {
  width: clamp(15rem, 22vw, 22rem);
  min-width: 15rem;
}

.crm-order-header-closer > .crm-form-hint {
  flex-basis: 100%;
}

.crm-order-primary-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: end;
}

.crm-order-primary-field {
  min-width: 0;
}

.crm-order-primary-field > .form-control,
.crm-order-primary-field > .form-select,
.crm-order-primary-field > .crm-searchable-select,
.crm-order-primary-field .crm-order-inline-button {
  width: 100%;
  min-width: 0;
}

.crm-order-desktop-draft-actions {
  align-items: stretch;
  overflow: hidden;
  min-height: 3.25rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.crm-order-desktop-draft-status {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 9.5rem;
  padding: 0.48rem 0.85rem;
  color: #15803d;
}

.crm-order-desktop-draft-status.is-saving {
  color: #2563eb;
}

.crm-order-desktop-draft-status.is-error {
  color: #dc2626;
}

.crm-order-desktop-draft-status__icon {
  display: inline-flex;
  flex: 0 0 auto;
}

.crm-order-desktop-draft-status__icon .icon {
  width: 1.25rem;
  height: 1.25rem;
}

.crm-order-desktop-draft-status__copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.2;
}

.crm-order-desktop-draft-status__copy strong {
  font-size: 0.74rem;
  font-weight: 800;
}

.crm-order-desktop-draft-status__copy small {
  margin-top: 0.12rem;
  color: #64748b;
  font-size: 0.64rem;
  white-space: nowrap;
}

.crm-order-desktop-draft-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 7.5rem;
  padding: 0.48rem 0.9rem;
  border: 0;
  border-left: 1px solid #e2e8f0;
  background: transparent;
  color: #dc2626;
  font-size: 0.76rem;
  font-weight: 800;
}

.crm-order-desktop-draft-clear:hover,
.crm-order-desktop-draft-clear:focus-visible {
  background: rgba(220, 38, 38, 0.06);
}

.crm-order-desktop-draft-clear .icon {
  width: 1.1rem;
  height: 1.1rem;
}

@media (min-width: 992px) {
  .crm-order-draft-clear-modal {
    position: fixed;
    inset: 0;
    z-index: 1120;
    display: grid;
    place-items: center;
    padding: 1.5rem;
  }

  .crm-order-draft-clear-modal[hidden] {
    display: none !important;
  }

  .crm-order-draft-clear-modal__backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(3px);
  }

  .crm-order-draft-clear-modal__sheet {
    position: relative;
    z-index: 1;
    width: min(29rem, calc(100vw - 3rem));
    padding: 1.5rem;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 1.25rem;
    background: #fff;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.24);
  }

  .crm-order-draft-clear-modal__handle {
    display: none;
  }

  .crm-order-draft-clear-modal__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    margin-bottom: 0.85rem;
    border-radius: 999px;
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
  }

  .crm-order-draft-clear-modal__icon .icon {
    width: 1.45rem;
    height: 1.45rem;
  }

  .crm-order-draft-clear-modal__sheet h3 {
    margin: 0;
    color: #172033;
    font-size: 1.15rem;
    font-weight: 800;
  }

  .crm-order-draft-clear-modal__sheet p {
    margin: 0.55rem 0 1.25rem;
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.55;
  }

  .crm-order-draft-clear-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
  }
}

@media (min-width: 1200px) {
  .crm-order-primary-row {
    grid-template-columns: minmax(7rem, 0.75fr) 1.1fr 2.55fr 1.55fr minmax(9rem, 0.9fr);
  }

  .crm-order-primary-row--with-customer-action {
    grid-template-columns: minmax(7rem, 0.75fr) 1.1fr 2.55fr 1.05fr 1.55fr minmax(9rem, 0.9fr);
  }
}

.crm-order-unified-section .crm-section-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--crm-order-section-surface-strong);
  color: var(--crm-order-section-accent);
  box-shadow: none;
}

.crm-order-unified-section .crm-section-icon .icon {
  width: 0.95rem;
  height: 0.95rem;
}

.crm-order-unified-section .form-label {
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.crm-order-view-static-control {
  display: block;
  width: 100%;
  min-height: 2.5rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--tblr-border-color);
  border-radius: var(--tblr-border-radius-lg);
  background: #fff;
  color: var(--tblr-body-color);
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.45;
  box-shadow:
    inset 0 1px 1px rgba(15, 23, 42, 0.03),
    0 1px 0 rgba(255, 255, 255, 0.82);
  word-break: break-word;
}

.crm-order-view-static-control--accent {
  color: var(--crm-order-section-accent);
  font-weight: 800;
  border-color: rgba(var(--crm-order-section-accent-rgb), 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), color-mix(in srgb, var(--crm-order-section-surface) 48%, #fff)),
    #fff;
}

.crm-order-view-static-control--textarea {
  min-height: 6rem;
  line-height: 1.62;
  white-space: normal;
}

.crm-order-view-static-control--note {
  max-height: 12rem;
  overflow: auto;
}

.crm-order-view-static-control a {
  color: var(--crm-order-section-accent);
  font-weight: 700;
  text-decoration: none;
}

.crm-order-view-static-control a:hover,
.crm-order-view-static-control a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.14rem;
}

.crm-order-unified-section .crm-section-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--crm-order-section-accent-rgb), 0.18);
  background: rgba(var(--crm-order-section-accent-rgb), 0.08);
  color: var(--crm-order-section-accent);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  flex: 0 0 auto;
}

.crm-order-unified-section--order {
  --crm-order-section-accent: #2f6fed;
  --crm-order-section-accent-rgb: 47, 111, 237;
  --crm-order-section-surface: #eef4ff;
  --crm-order-section-surface-strong: rgba(47, 111, 237, 0.12);
  --crm-order-section-border: rgba(47, 111, 237, 0.2);
}

.crm-order-unified-section--items {
  --crm-order-section-accent: #c9871a;
  --crm-order-section-accent-rgb: 201, 135, 26;
  --crm-order-section-surface: #fff6e8;
  --crm-order-section-surface-strong: rgba(201, 135, 26, 0.12);
  --crm-order-section-border: rgba(201, 135, 26, 0.2);
}

.crm-order-unified-section--payment {
  --crm-order-section-accent: #1f9d61;
  --crm-order-section-accent-rgb: 31, 157, 97;
  --crm-order-section-surface: #ecfdf3;
  --crm-order-section-surface-strong: rgba(31, 157, 97, 0.12);
  --crm-order-section-border: rgba(31, 157, 97, 0.2);
}

.crm-order-unified-section--shipping {
  --crm-order-section-accent: #b88a10;
  --crm-order-section-accent-rgb: 184, 138, 16;
  --crm-order-section-surface: #fff9e7;
  --crm-order-section-surface-strong: rgba(184, 138, 16, 0.12);
  --crm-order-section-border: rgba(184, 138, 16, 0.2);
}

.crm-order-unified-section .crm-label-icon {
  display: none;
}

.crm-order-inline-button {
  width: 100%;
  min-height: 2.5rem;
}

.crm-order-items-table--unified thead th {
  white-space: nowrap;
}

.crm-order-items-table--unified td {
  padding-top: 0.58rem;
  padding-bottom: 0.58rem;
}

.crm-order-items-table--unified .form-control,
.crm-order-items-table--unified .form-select,
.crm-order-items-table--unified .crm-searchable-input {
  min-height: 2.42rem;
  font-size: 0.88rem;
}

.crm-order-item-index {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--tblr-primary-rgb), 0.08);
  color: var(--tblr-primary);
  font-weight: 800;
}

.crm-order-item-remove {
  min-width: 2.5rem;
}

.crm-order-items-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.72rem;
}

.crm-order-items-actions {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.crm-order-item-row--gift td {
  background: rgba(255, 247, 232, 0.55);
}

.crm-order-item-row--gift-pending td {
  background: rgba(255, 251, 235, 0.82);
}

.crm-order-totals-strip {
  display: grid;
  grid-template-columns: minmax(15rem, 2.2fr) repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  width: min(100%, 58rem);
  margin-left: auto;
}

.crm-order-totals-strip__item {
  min-width: 0;
  text-align: right;
}

.crm-order-totals-strip__item--products {
  text-align: left;
}

.crm-order-product-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.28rem;
}

.crm-order-totals-strip__item span {
  display: block;
  color: var(--tblr-muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.crm-order-totals-strip__item strong {
  display: block;
  margin-top: 0.2rem;
  font-size: 1rem;
  font-weight: 800;
}

.crm-order-product-summary__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.34rem 0.62rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.95);
  color: var(--tblr-body-color);
  line-height: 1.2;
}

.crm-order-product-summary__name {
  font-size: 0.9rem;
  font-weight: 700;
}

.crm-order-product-summary__count {
  font-size: 0.84rem;
  font-weight: 800;
  color: #475569;
}

.crm-order-product-summary__chip--more {
  background: rgba(100, 116, 139, 0.08);
  border-color: rgba(100, 116, 139, 0.16);
  color: var(--tblr-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.crm-order-product-summary__chip--gift {
  background: rgba(254, 243, 199, 0.65);
  border-color: rgba(245, 158, 11, 0.24);
}

.crm-order-product-summary__empty {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--tblr-muted);
}

.crm-order-customer-summary-card {
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-top: 3px solid rgba(32, 107, 196, 0.34);
  border-radius: var(--tblr-border-radius-lg);
  background: #fff;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.crm-order-customer-summary-card--state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.5rem;
  color: var(--tblr-muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.crm-order-customer-summary-card--state.is-error {
  border-color: rgba(214, 57, 57, 0.18);
  background: linear-gradient(135deg, rgba(214, 57, 57, 0.06), rgba(255, 255, 255, 0.98));
  color: var(--tblr-danger);
}

.crm-order-customer-summary-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.crm-order-customer-summary-card__heading {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0.28rem;
  min-width: 0;
}

.crm-order-customer-summary-card__eyebrow {
  display: block;
  color: var(--tblr-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.crm-order-customer-summary-card__name-row {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.28rem;
}

.crm-order-customer-summary-card__name {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--tblr-body-color);
}

.crm-order-customer-summary-card__code {
  display: inline-flex;
  align-items: center;
  padding: 0.16rem 0.42rem;
  border-radius: 999px;
  background: rgba(32, 107, 196, 0.08);
  color: var(--tblr-primary);
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.2;
}

.crm-order-customer-summary-card__badges {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.25rem;
}

.crm-order-customer-summary-card__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 0.3rem;
}

.crm-order-customer-summary-card__actions .btn {
  min-height: 1.75rem;
  padding: 0.24rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 700;
}

.crm-order-customer-summary-card__summary-row {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  gap: 0.28rem;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.crm-order-customer-summary-card__summary-row::-webkit-scrollbar {
  display: none;
}

.crm-order-customer-summary-card__summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  max-width: 100%;
  flex: 0 0 auto;
  min-height: 1.75rem;
  padding: 0.22rem 0.48rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--tblr-body-color);
  line-height: 1.25;
}

.crm-order-customer-summary-card__summary-chip.is-wide {
  max-width: min(100%, 21rem);
}

.crm-order-customer-summary-card__summary-chip.is-note {
  max-width: min(100%, 24rem);
}

.crm-order-customer-summary-card__summary-label {
  flex: 0 0 auto;
  color: var(--tblr-muted);
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}

.crm-order-customer-summary-card__summary-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 700;
}

.crm-order-view-summary-card {
  border-top-color: color-mix(in srgb, var(--crm-order-section-accent) 34%, #d9e1eb);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--crm-order-section-surface) 62%, #fff), rgba(255, 255, 255, 0.98)),
    #fff;
}

.crm-order-view-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(13rem, 0.65fr);
  gap: 0.9rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 1.05rem;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--crm-order-section-surface) 82%, #fff) 0%, rgba(255, 255, 255, 0.98) 72%),
    #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 10px 24px rgba(15, 23, 42, 0.03);
}

.crm-order-view-hero__main {
  min-width: 0;
}

.crm-order-view-hero__eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  margin-bottom: 0.55rem;
}

.crm-order-view-hero__micro-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.58rem;
  border-radius: 999px;
  background: rgba(var(--crm-order-section-accent-rgb), 0.12);
  color: var(--crm-order-section-accent);
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.2;
}

.crm-order-view-hero__micro-chip--soft {
  background: rgba(255, 255, 255, 0.86);
  color: #475569;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.crm-order-view-hero__title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.crm-order-view-hero__title {
  margin: 0;
  color: #0f172a;
  font-size: 1.28rem;
  font-weight: 800;
  line-height: 1.22;
}

.crm-order-view-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  margin-top: 0.48rem;
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.45;
}

.crm-order-view-hero__meta strong {
  color: #334155;
  font-weight: 800;
}

.crm-order-view-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.78rem;
}

.crm-order-view-badge-row__item {
  display: inline-flex;
  align-items: center;
  padding: 0.36rem 0.65rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #334155;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
}

.crm-order-view-hero__aside {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  min-width: 0;
  padding: 0.9rem 0.95rem;
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.16);
  text-align: right;
}

.crm-order-view-hero__aside-label {
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.35;
}

.crm-order-view-hero__aside-value {
  margin-top: 0.18rem;
  color: #0f172a;
  font-size: 1.72rem;
  font-weight: 900;
  line-height: 1.05;
}

.crm-order-view-hero__aside-note {
  display: block;
  margin-top: 0.32rem;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.45;
}

.crm-order-view-insight-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.72rem;
}

.crm-order-view-insight-card {
  min-width: 0;
  min-height: 5rem;
  padding: 0.82rem 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 1rem;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--crm-order-section-surface) 76%, #fff), rgba(255, 255, 255, 0.98)),
    #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

.crm-order-view-summary-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.55rem;
}

.crm-order-view-summary-strip__item {
  min-width: 0;
  padding: 0.75rem 0.82rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 0.95rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92)),
    color-mix(in srgb, var(--crm-order-section-surface) 22%, #fff);
}

.crm-order-view-summary-strip__item span {
  display: block;
  color: var(--tblr-muted);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.35;
}

.crm-order-view-summary-strip__item strong {
  display: block;
  margin-top: 0.24rem;
  color: var(--tblr-body-color);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.45;
  word-break: break-word;
}

.crm-order-view-summary-strip__item--highlight {
  border-color: rgba(47, 111, 237, 0.16);
  background:
    linear-gradient(180deg, rgba(238, 244, 255, 0.96), rgba(255, 255, 255, 0.98)),
    #fff;
}

.crm-order-view-field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr));
  gap: 0.75rem;
}

.crm-order-view-field-grid--dashboard {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.crm-order-view-field-card {
  min-width: 0;
  min-height: 4.7rem;
  padding: 0.78rem 0.88rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 1rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92)),
    color-mix(in srgb, var(--crm-order-section-surface) 28%, #fff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

.crm-order-view-field-card--spotlight {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--crm-order-section-surface) 72%, #fff), rgba(255, 255, 255, 0.98)),
    #fff;
  border-color: color-mix(in srgb, var(--crm-order-section-accent) 18%, rgba(148, 163, 184, 0.18));
}

.crm-order-view-field-card.is-full {
  grid-column: 1 / -1;
  min-height: auto;
}

.crm-order-view-field-card__label {
  display: block;
  color: var(--tblr-muted);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.35;
}

.crm-order-view-field-card__value {
  display: block;
  color: var(--tblr-body-color);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.52;
  word-break: break-word;
}

.crm-order-view-field-card__value a {
  color: var(--crm-order-section-accent);
  text-decoration: none;
}

.crm-order-view-field-card__value a:hover,
.crm-order-view-field-card__value a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.14rem;
}

.crm-order-view-field-card__meta {
  display: block;
  margin-top: auto;
  color: var(--tblr-muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.crm-order-view-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 0.75rem;
}

.crm-order-view-detail-panel {
  min-width: 0;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 1rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92)),
    color-mix(in srgb, var(--crm-order-section-surface) 20%, #fff);
}

.crm-order-view-detail-panel--full {
  grid-column: 1 / -1;
}

.crm-order-view-detail-panel__label {
  display: block;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.35;
}

.crm-order-view-detail-panel__content {
  margin-top: 0.38rem;
  color: #0f172a;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.65;
  word-break: break-word;
}

.crm-order-view-detail-panel__content--note {
  max-height: 11.5rem;
  overflow: auto;
  padding-right: 0.2rem;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.7;
  color: #334155;
}

.crm-order-view-subsection {
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 1rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92)),
    color-mix(in srgb, var(--crm-order-section-surface) 18%, #fff);
}

.crm-order-view-subsection__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.crm-order-view-subsection__head strong {
  display: block;
  color: var(--tblr-body-color);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.35;
}

.crm-order-view-subsection__head small {
  display: block;
  margin-top: 0.18rem;
  color: var(--tblr-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

@media (max-width: 1199.98px) {
  .crm-order-view-stepnav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-order-view-hero,
  .crm-order-view-insight-strip,
  .crm-order-view-detail-grid,
  .crm-order-view-summary-strip,
  .crm-order-view-field-grid--dashboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-order-view-main-grid,
  .crm-order-view-media-grid {
    grid-template-columns: 1fr;
  }

  .crm-order-view-hero__aside {
    align-items: flex-start;
    text-align: left;
  }
}

.crm-order-upload-block {
  margin-top: 1rem;
}

.crm-order-upload-block__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.75rem;
}

.crm-order-upload-block__head strong {
  font-size: 0.86rem;
  font-weight: 800;
}

.crm-order-upload-block__head small {
  font-size: 0.76rem;
  color: var(--tblr-muted);
}

.crm-order-upload-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
}

.crm-order-upload-slot {
  position: relative;
  min-height: 6.75rem;
  border: 1px dashed var(--tblr-border-color);
  border-radius: var(--tblr-border-radius-lg);
  background: var(--tblr-bg-surface);
  overflow: hidden;
  cursor: pointer;
}

.crm-order-upload-slot.has-file {
  border-style: solid;
}

.crm-order-upload-slot__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.crm-order-upload-slot__inner {
  min-height: 6.75rem;
  padding: 0.72rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  text-align: center;
}

.crm-order-upload-slot__icon {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--tblr-muted);
}

.crm-order-upload-slot__icon .icon {
  width: 1.25rem;
  height: 1.25rem;
}

.crm-order-upload-slot__preview {
  width: 100%;
  height: 3.75rem;
  border-radius: var(--tblr-border-radius);
  border: 1px solid var(--tblr-border-color);
  object-fit: cover;
}

.crm-order-upload-slot__label {
  font-size: 0.79rem;
  font-weight: 700;
}

.crm-order-upload-slot__note {
  font-size: 0.68rem;
  line-height: 1.45;
  word-break: break-word;
  color: var(--tblr-muted);
}

.crm-order-check-wrap {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100%;
}

.crm-order-check {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  min-height: 2.5rem;
  padding: 0.15rem 0;
  font-weight: 700;
}

.crm-order-check .form-check-input {
  width: 1rem;
  height: 1rem;
  margin: 0;
}

.crm-order-check--primary {
  width: 100%;
  min-height: 4.35rem;
  gap: 0.8rem;
  padding: 0.75rem 0.9rem;
  border: 2px solid rgba(32, 107, 196, 0.34);
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(32, 107, 196, 0.13), rgba(66, 153, 225, 0.05));
  color: #173f6b;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.crm-order-check--primary:hover,
.crm-order-check--primary:focus-within {
  border-color: rgba(32, 107, 196, 0.7);
  box-shadow: 0 0 0 3px rgba(32, 107, 196, 0.1);
}

.crm-order-check--primary:has(.form-check-input:checked) {
  border-color: #206bc4;
  background: linear-gradient(135deg, rgba(32, 107, 196, 0.22), rgba(66, 153, 225, 0.1));
  box-shadow: 0 10px 24px rgba(32, 107, 196, 0.12);
}

.crm-order-check--primary .form-check-input {
  flex: 0 0 auto;
  width: 1.4rem;
  height: 1.4rem;
  border-width: 2px;
}

.crm-order-check__copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.16rem;
  line-height: 1.3;
}

.crm-order-check__copy strong {
  font-size: 0.86rem;
  font-weight: 800;
}

.crm-order-check__copy small {
  color: #527294;
  font-size: 0.66rem;
  font-weight: 600;
}

.crm-order-form-footer--unified {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.25rem;
}

.crm-order-form-footer__actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-left: auto;
}

.crm-order-inline-customer-modal__dialog {
  max-width: 31.5rem;
}

.crm-order-inline-customer-form__alert {
  margin-bottom: 0.85rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--tblr-border-radius);
  font-size: 0.82rem;
  font-weight: 700;
}

.crm-order-inline-customer-form__alert.is-error {
  border: 1px solid rgba(var(--tblr-danger-rgb), 0.25);
}

.crm-order-inline-customer-modal .crm-history-modal__footer {
  align-items: flex-end;
}

.crm-order-inline-customer-modal .crm-history-modal__count {
  max-width: 14.5rem;
  line-height: 1.5;
}

.crm-order-inline-customer-modal .form-control,
.crm-order-inline-customer-modal .form-select {
  min-height: 2.5rem;
}

@media (max-width: 767.98px) {
  .crm-order-view-stepnav,
  .crm-order-view-summary-strip,
  .crm-order-view-field-grid--dashboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-order-items-footer,
  .crm-order-form-footer--unified,
  .crm-order-form-footer__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .crm-order-form-footer--unified {
    flex-direction: row;
    align-items: center;
    margin-bottom: calc(var(--kg-mobile-nav-height, 4.65rem) + 1rem);
  }

  .crm-order-form-footer--unified .crm-order-form-footer__cancel {
    flex: 0 0 auto;
  }

  .crm-order-form-footer--unified .crm-order-form-footer__actions {
    width: auto;
    margin-left: auto;
    align-items: flex-end;
  }

  .crm-order-totals-strip,
  .crm-order-upload-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .crm-order-totals-strip__item--products {
    grid-column: 1 / -1;
  }

  .crm-order-customer-summary-card__head {
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
  }

  .crm-order-customer-summary-card__actions {
    width: auto;
    justify-content: flex-start;
  }

  .crm-order-customer-summary-card__summary-row {
    gap: 0.4rem;
  }

  .crm-order-customer-summary-card__summary-chip,
  .crm-order-customer-summary-card__summary-chip.is-wide,
  .crm-order-customer-summary-card__summary-chip.is-note {
    max-width: 100%;
  }

  .crm-order-view-field-grid {
    grid-template-columns: 1fr;
  }

  .crm-order-view-main-grid,
  .crm-order-view-media-grid {
    grid-template-columns: 1fr;
  }

  .crm-order-view-field-card.is-full {
    grid-column: auto;
  }

  .crm-order-view-subsection__head {
    flex-direction: column;
    align-items: stretch;
  }

  .crm-order-upload-slot,
  .crm-order-upload-slot__inner {
    min-height: 6.25rem;
  }

  .crm-order-inline-customer-modal .crm-history-modal__footer,
  .crm-order-inline-customer-modal .crm-history-modal__actions {
    align-items: stretch;
  }

  .crm-order-inline-customer-modal .crm-history-modal__count {
    max-width: none;
  }
}

.crm-order-quantity-stepper {
  display: grid;
  grid-template-columns: 2.5rem minmax(3rem, 1fr) 2.5rem;
  align-items: stretch;
  overflow: hidden;
  min-height: 2.5rem;
  border: 1px solid var(--tblr-border-color);
  border-radius: var(--tblr-border-radius-lg);
  background: var(--tblr-bg-surface);
}

.crm-order-quantity-stepper > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: rgba(var(--tblr-primary-rgb), 0.05);
  color: var(--tblr-primary);
}

.crm-order-quantity-stepper > button:first-child {
  border-right: 1px solid var(--tblr-border-color);
}

.crm-order-quantity-stepper > button:last-child {
  border-left: 1px solid var(--tblr-border-color);
}

.crm-order-quantity-stepper > button:hover,
.crm-order-quantity-stepper > button:focus-visible {
  background: rgba(var(--tblr-primary-rgb), 0.12);
}

.crm-order-quantity-stepper > button .icon {
  width: 1rem;
  height: 1rem;
}

.crm-order-quantity-stepper > button > span {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
}

.crm-order-quantity-stepper > .form-control {
  min-width: 0;
  border: 0;
  border-radius: 0;
  text-align: center;
  box-shadow: none;
  appearance: textfield;
}

.crm-order-quantity-stepper > .form-control::-webkit-inner-spin-button,
.crm-order-quantity-stepper > .form-control::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.crm-order-mobile-payment-summary {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1rem;
  padding: 0.9rem;
  border: 1px solid rgba(47, 111, 237, 0.18);
  border-radius: 1rem;
  background: #f4f8ff;
}

.crm-order-mobile-payment-summary > strong {
  color: #17243a;
  font-size: 0.94rem;
  font-weight: 800;
}

.crm-order-mobile-payment-summary > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: #475569;
  font-size: 0.82rem;
}

.crm-order-mobile-payment-summary > div b {
  color: #17243a;
  font-weight: 800;
}

.crm-order-mobile-payment-summary__balance {
  padding-top: 0.55rem;
  border-top: 1px solid rgba(47, 111, 237, 0.14);
}

.crm-order-mobile-payment-summary__balance span,
.crm-order-mobile-payment-summary__balance b {
  color: #15803d !important;
}

@media (max-width: 991.98px) {
  .crm-order-workspace-page .admin-topnav__bar {
    min-height: 3rem;
    padding-top: 0.2rem !important;
    padding-bottom: 0.2rem !important;
  }

  .crm-order-workspace-page .crm-page-header {
    margin-top: 0.45rem;
    padding-bottom: 0.2rem;
  }

  .crm-order-workspace-page .crm-page-body {
    margin-top: 0.35rem;
    margin-bottom: 0.35rem;
  }

  .crm-order-create-page .crm-page-header {
    display: none;
  }

  .crm-order-create-page .crm-page-body {
    margin-top: 0.45rem;
  }

  .crm-order-workspace-page .crm-page-header > .container-xl,
  .crm-order-workspace-page .crm-page-body > .container-xl {
    --kg-page-side-space: 0.65rem;
  }

  .crm-order-workspace-page .page-pretitle {
    margin-bottom: 0.22rem;
    line-height: 1.3;
  }

  .crm-section-stack--order-create-mobile {
    gap: 0.45rem;
    padding-bottom: 6.5rem;
  }

  .crm-section-stack--order-create-mobile .crm-order-unified-section {
    --crm-order-section-accent: #2f6fed;
    --crm-order-section-accent-rgb: 47, 111, 237;
    --crm-order-section-surface: #f4f7ff;
    --crm-order-section-surface-strong: rgba(47, 111, 237, 0.1);
    --crm-order-section-border: rgba(47, 111, 237, 0.18);
    overflow: visible;
    border-top-width: 1px;
    border-radius: 1.15rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
  }

  .crm-section-stack--order-create-mobile .crm-order-unified-section::before {
    inset: 0.55rem auto 0.55rem 0;
    width: 4px;
    border-radius: 0 999px 999px 0;
    background: var(--crm-order-section-accent);
    z-index: 2;
    pointer-events: none;
  }

  .crm-section-stack--order-create-mobile .crm-order-unified-section .card-header {
    display: flex;
    align-items: center;
    flex-direction: row !important;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 0.42rem;
    min-height: 3.35rem;
    padding: 0.55rem 0.68rem;
    border-radius: 1.15rem 1.15rem 0 0;
    background: linear-gradient(180deg, #f4f7ff 0%, #fff 100%);
  }

  .crm-section-stack--order-create-mobile #order-basics-section .card-header {
    flex-wrap: wrap !important;
  }

  .crm-section-stack--order-create-mobile .crm-order-header-closer {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
    padding: 0.15rem 0.1rem 0.05rem;
  }

  .crm-section-stack--order-create-mobile .crm-order-header-closer > .form-label {
    font-size: 0.66rem;
  }

  .crm-section-stack--order-create-mobile .crm-order-header-closer > .form-select,
  .crm-section-stack--order-create-mobile .crm-order-header-closer > .form-control,
  .crm-section-stack--order-create-mobile .crm-order-header-closer > .crm-searchable-select {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }

  .crm-section-stack--order-create-mobile .crm-order-mobile-closer-slot {
    margin-bottom: 0.62rem;
  }

  .crm-section-stack--order-create-mobile .crm-order-mobile-closer-slot .crm-order-header-closer {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .crm-section-stack--order-create-mobile .crm-order-mobile-closer-slot .crm-order-header-closer > .form-label {
    display: block;
    margin-bottom: 0.22rem;
    font-size: 0.72rem;
  }

  .crm-section-stack--order-create-mobile .crm-order-mobile-closer-slot .crm-order-header-closer > .form-select,
  .crm-section-stack--order-create-mobile .crm-order-mobile-closer-slot .crm-order-header-closer > .form-control,
  .crm-section-stack--order-create-mobile .crm-order-mobile-closer-slot .crm-order-header-closer > .crm-searchable-select {
    width: 100%;
  }

  .crm-section-stack--order-create-mobile .crm-order-unified-section.is-collapsed .card-header {
    border-bottom: 0;
    border-radius: 1.15rem;
    background: #fff;
  }

  .crm-section-stack--order-create-mobile .crm-section-heading {
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
    gap: 0.48rem;
  }

  .crm-section-stack--order-create-mobile .crm-order-unified-section .card-title {
    flex-wrap: nowrap;
    min-width: 0;
    gap: 0.42rem;
    font-size: 0.9rem;
    line-height: 1.25;
  }

  .crm-section-stack--order-create-mobile .crm-order-unified-section .card-title > span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .crm-section-stack--order-create-mobile .crm-order-unified-section .card-body {
    padding: 0.65rem;
  }

  .crm-section-stack--order-create-mobile .crm-order-unified-section .card-body > .row.g-3,
  .crm-section-stack--order-create-mobile .crm-order-unified-section .card-body .row.g-3 {
    --tblr-gutter-x: 0.65rem;
    --tblr-gutter-y: 0.62rem;
  }

  .crm-section-stack--order-create-mobile .form-label {
    margin-bottom: 0.22rem;
  }

  .crm-section-stack--order-create-mobile .crm-order-mobile-order-meta-half {
    width: 100%;
  }

  .crm-section-stack--order-create-mobile .crm-order-mobile-order-meta-half > .form-control {
    padding-inline: 0.4rem;
  }

  .crm-section-stack--order-create-mobile .crm-order-mobile-location-half {
    flex: 0 0 auto;
    width: 50%;
  }

  .crm-section-stack--order-create-mobile .crm-order-unified-section.is-collapsed > [data-order-accordion-body] {
    display: none;
  }

  .crm-order-mobile-accordion-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    margin-left: auto;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #2f6fed;
  }

  .crm-order-mobile-accordion-toggle:hover,
  .crm-order-mobile-accordion-toggle:focus-visible {
    background: rgba(47, 111, 237, 0.1);
  }

  .crm-order-mobile-accordion-toggle .icon {
    width: 1.05rem;
    height: 1.05rem;
    transition: transform 160ms ease;
  }

  .crm-order-mobile-accordion-toggle.is-open .icon {
    transform: rotate(180deg);
  }

  .crm-order-mobile-section-saved {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    flex: 0 0 auto;
    color: #15803d;
    font-size: 0.66rem;
    font-weight: 700;
    white-space: nowrap;
  }

  .crm-order-mobile-section-saved[hidden] {
    display: none !important;
  }

  .crm-order-mobile-section-saved .icon {
    width: 0.95rem;
    height: 0.95rem;
  }

  .crm-section-stack--order-create-mobile .form-control,
  .crm-section-stack--order-create-mobile .form-select,
  .crm-section-stack--order-create-mobile .crm-searchable-input {
    min-height: 2.7rem;
    border-radius: 0.78rem;
    font-size: 0.88rem;
  }

  .crm-section-stack--order-create-mobile textarea.form-control {
    min-height: 5rem;
  }

  .crm-section-stack--order-create-mobile .crm-order-inline-button {
    min-height: 2.7rem;
    border-radius: 0.78rem;
  }

  .crm-section-stack--order-create-mobile .crm-order-customer-summary-card {
    padding: 0.35rem 0.5rem;
  }

  .crm-section-stack--order-create-mobile .crm-order-items-table tbody {
    display: grid;
    gap: 0.55rem;
    padding: 0;
  }

  .crm-section-stack--order-create-mobile .crm-order-items-table tbody tr {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 2.25rem;
    grid-template-areas:
      "index spacer remove"
      "product product product"
      "quantity price price"
      "note note note";
    gap: 0.48rem 0.5rem;
    padding: 0.62rem;
    border: 1px solid rgba(47, 111, 237, 0.16);
    border-radius: 0.82rem;
    background: #fff;
  }

  .crm-section-stack--order-create-mobile .crm-order-items-table--unified tbody td {
    grid-column: auto;
  }

  .crm-section-stack--order-create-mobile .crm-order-items-table--unified tbody td::before {
    margin-bottom: 0.18rem;
    font-size: 0.67rem;
    line-height: 1.2;
  }

  .crm-section-stack--order-create-mobile .crm-order-items-table--unified tbody td:nth-child(1) {
    grid-area: index;
    align-self: center;
  }

  .crm-section-stack--order-create-mobile .crm-order-items-table--unified tbody td:nth-child(2) {
    grid-area: product;
  }

  .crm-section-stack--order-create-mobile .crm-order-items-table--unified tbody td:nth-child(3) {
    grid-area: quantity;
  }

  .crm-section-stack--order-create-mobile .crm-order-items-table--unified tbody td:nth-child(4) {
    grid-area: price;
  }

  .crm-section-stack--order-create-mobile .crm-order-items-table--unified tbody td:nth-child(5) {
    grid-area: note;
  }

  .crm-section-stack--order-create-mobile .crm-order-items-table--unified tbody td:nth-child(6) {
    grid-area: remove;
    align-self: center;
    justify-self: end;
  }

  .crm-section-stack--order-create-mobile .crm-order-items-table--unified tbody td:nth-child(1)::before,
  .crm-section-stack--order-create-mobile .crm-order-items-table--unified tbody td:nth-child(6)::before {
    display: none;
  }

  .crm-section-stack--order-create-mobile .crm-order-item-index {
    width: 1.65rem;
    height: 1.65rem;
    font-size: 0.75rem;
  }

  .crm-section-stack--order-create-mobile .crm-order-item-remove {
    width: 2.15rem;
    min-width: 2.15rem;
    height: 2.15rem;
    padding: 0;
  }

  .crm-section-stack--order-create-mobile .crm-order-items-table--unified .form-control,
  .crm-section-stack--order-create-mobile .crm-order-items-table--unified .form-select,
  .crm-section-stack--order-create-mobile .crm-order-items-table--unified .crm-searchable-input {
    min-height: 2.42rem;
  }

  .crm-section-stack--order-create-mobile .crm-order-items-table--unified .crm-order-quantity-stepper {
    grid-template-columns: 2.15rem minmax(2.5rem, 1fr) 2.15rem;
    min-height: 2.42rem;
  }

  .crm-section-stack--order-create-mobile .crm-order-items-table tbody tr + tr {
    margin-top: 0;
  }

  .crm-section-stack--order-create-mobile .crm-order-totals-strip {
    padding: 0.62rem;
    border: 1px solid rgba(47, 111, 237, 0.16);
    border-radius: 0.82rem;
    background: #f4f8ff;
  }

  .crm-section-stack--order-create-mobile .crm-order-upload-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-section-stack--order-create-mobile .crm-order-upload-slot,
  .crm-section-stack--order-create-mobile .crm-order-upload-slot__inner {
    min-height: 5.5rem;
  }

  .crm-section-stack--order-create-mobile .crm-order-form-footer--unified {
    display: none;
  }

  .crm-order-mobile-draft-actions {
    position: fixed;
    right: 0;
    bottom: var(--kg-mobile-nav-height, 4.65rem);
    left: 0;
    z-index: 1070;
    padding: 0.35rem max(0.4rem, env(safe-area-inset-right)) 0.35rem max(0.4rem, env(safe-area-inset-left));
    background: linear-gradient(180deg, rgba(244, 247, 251, 0) 0%, rgba(244, 247, 251, 0.94) 32%, rgba(244, 247, 251, 0.99) 100%);
    pointer-events: none;
  }

  .crm-order-mobile-draft-actions__panel {
    pointer-events: auto;
    display: grid;
    grid-template-columns: minmax(5.75rem, 0.9fr) auto minmax(6.5rem, 1fr);
    align-items: stretch;
    gap: 0.3rem;
    padding: 0.38rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -12px 30px rgba(15, 23, 42, 0.12);
  }

  .crm-order-mobile-draft-status {
    display: flex;
    align-items: center;
    gap: 0.34rem;
    min-width: 0;
    padding: 0.12rem 0.18rem;
    color: #15803d;
  }

  .crm-order-mobile-draft-status.is-saving {
    color: #2563eb;
  }

  .crm-order-mobile-draft-status.is-error {
    color: #dc2626;
  }

  .crm-order-mobile-draft-status__icon {
    display: inline-flex;
    flex: 0 0 auto;
  }

  .crm-order-mobile-draft-status__icon .icon {
    width: 1.25rem;
    height: 1.25rem;
  }

  .crm-order-mobile-draft-status__copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  .crm-order-mobile-draft-status__copy strong,
  .crm-order-mobile-draft-status__copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .crm-order-mobile-draft-status__copy strong {
    font-size: 0.72rem;
    font-weight: 800;
  }

  .crm-order-mobile-draft-status__copy small {
    margin-top: 0.08rem;
    color: #64748b;
    font-size: 0.64rem;
  }

  .crm-order-mobile-draft-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    min-width: 0;
    padding: 0.35rem 0.45rem;
    border: 0;
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    background: transparent;
    color: #dc2626;
    font-size: 0.72rem;
    font-weight: 800;
  }

  .crm-order-mobile-draft-clear .icon {
    width: 1.1rem;
    height: 1.1rem;
  }

  .crm-order-mobile-draft-next {
    min-height: 2.7rem;
    justify-content: center;
    gap: 0.35rem;
    border-radius: 0.82rem;
    font-size: 0.82rem;
    font-weight: 800;
  }

  .crm-order-mobile-draft-next .icon {
    width: 1rem;
    height: 1rem;
  }

  .crm-order-draft-clear-modal {
    position: fixed;
    inset: 0;
    z-index: 1120;
  }

  .crm-order-draft-clear-modal[hidden] {
    display: none !important;
  }

  .crm-order-draft-clear-modal__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    border: 0;
    background: rgba(15, 23, 42, 0.48);
  }

  .crm-order-draft-clear-modal__sheet {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    justify-items: center;
    gap: 0.7rem;
    padding: 0.75rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
    border-radius: 1.35rem 1.35rem 0 0;
    background: #fff;
    text-align: center;
    box-shadow: 0 -24px 64px rgba(15, 23, 42, 0.2);
  }

  .crm-order-draft-clear-modal__handle {
    width: 3.25rem;
    height: 0.3rem;
    border-radius: 999px;
    background: #cbd5e1;
  }

  .crm-order-draft-clear-modal__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 999px;
    background: #fff1f2;
    color: #dc2626;
  }

  .crm-order-draft-clear-modal__icon .icon {
    width: 1.4rem;
    height: 1.4rem;
  }

  .crm-order-draft-clear-modal__sheet h3 {
    margin: 0;
    color: #17243a;
    font-size: 1.15rem;
    font-weight: 800;
  }

  .crm-order-draft-clear-modal__sheet p {
    margin: 0;
    max-width: 23rem;
    color: #64748b;
    font-size: 0.84rem;
    line-height: 1.55;
  }

  .crm-order-draft-clear-modal__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    width: 100%;
  }

  .crm-order-draft-clear-modal__actions .btn {
    min-height: 3rem;
    justify-content: center;
    font-weight: 800;
  }
}

@media (max-width: 420px) {
  .crm-order-mobile-draft-actions__panel {
    grid-template-columns: minmax(5.2rem, 0.85fr) auto minmax(5.8rem, 1fr);
    gap: 0.3rem;
    padding: 0.45rem;
  }

  .crm-order-mobile-draft-clear {
    padding-inline: 0.42rem;
  }

  .crm-order-mobile-draft-clear span {
    max-width: 3.25rem;
    line-height: 1.15;
  }

  .crm-order-mobile-section-saved > span:last-child {
    display: none;
  }
}
