/*
 * AdabaCRM Premium UI
 * A presentation-only design layer for the development copy.
 * Business logic, storage, permissions, and workflows remain untouched.
 */

#sgcrm-root {
  --adaba-ink: #102a2d;
  --adaba-ink-soft: #426166;
  --adaba-muted: #789094;
  --adaba-brand-950: #042b2d;
  --adaba-brand-900: #07383a;
  --adaba-brand-800: #0a4a48;
  --adaba-brand-700: #0b6258;
  --adaba-brand-600: #0c7a67;
  --adaba-brand-500: #119b78;
  --adaba-brand-100: #dff7ee;
  --adaba-brand-50: #effbf7;
  --adaba-gold-600: #b97814;
  --adaba-gold-500: #d99a2b;
  --adaba-gold-300: #f0cb7b;
  --adaba-gold-100: #fff1cf;
  --adaba-canvas: #f2f6f4;
  --adaba-surface: #ffffff;
  --adaba-surface-soft: #f8fbfa;
  --adaba-line: #dfe9e6;
  --adaba-line-strong: #ccdcd7;
  --adaba-danger: #dc2626;
  --adaba-warning: #d97706;
  --adaba-info: #2563eb;
  --adaba-radius-sm: 11px;
  --adaba-radius-md: 16px;
  --adaba-radius-lg: 22px;
  --adaba-radius-xl: 28px;
  --adaba-shadow-sm: 0 1px 2px rgba(7, 56, 58, .035), 0 8px 22px rgba(7, 56, 58, .055);
  --adaba-shadow-md: 0 14px 36px rgba(7, 56, 58, .08), 0 3px 10px rgba(7, 56, 58, .04);
  --adaba-shadow-lg: 0 28px 70px rgba(4, 43, 45, .14), 0 8px 24px rgba(4, 43, 45, .06);
  --adaba-ring: 0 0 0 4px rgba(17, 155, 120, .14);
  color: var(--adaba-ink);
  background:
    radial-gradient(circle at 7% -8%, rgba(17, 155, 120, .11), transparent 31rem),
    radial-gradient(circle at 101% 4%, rgba(217, 154, 43, .09), transparent 27rem),
    var(--adaba-canvas) !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

#sgcrm-root,
#sgcrm-root * {
  box-sizing: border-box;
}

#sgcrm-root ::selection {
  background: rgba(17, 155, 120, .22);
  color: var(--adaba-brand-950);
}

#sgcrm-root * {
  scrollbar-color: rgba(10, 98, 88, .35) transparent;
  scrollbar-width: thin;
}

#sgcrm-root *::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

#sgcrm-root *::-webkit-scrollbar-track {
  background: transparent;
}

#sgcrm-root *::-webkit-scrollbar-thumb {
  background: rgba(10, 98, 88, .26);
  border: 2px solid transparent;
  border-radius: 99px;
  background-clip: padding-box;
}

#sgcrm-root *::-webkit-scrollbar-thumb:hover {
  background: rgba(10, 98, 88, .45);
  border: 2px solid transparent;
  background-clip: padding-box;
}

#sgcrm-root h1,
#sgcrm-root h2,
#sgcrm-root h3,
#sgcrm-root h4,
#sgcrm-root h5,
#sgcrm-root h6 {
  color: var(--adaba-ink);
  letter-spacing: -.025em;
  text-wrap: balance;
}

#sgcrm-root p {
  text-wrap: pretty;
}

#sgcrm-root a {
  text-underline-offset: 3px;
}

#sgcrm-root :where(button, [role="button"], a, input, select, textarea) {
  -webkit-tap-highlight-color: transparent;
}

#sgcrm-root :where(button, [role="button"], a):focus-visible,
#sgcrm-root :where(
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  select,
  textarea
):focus-visible {
  outline: 2px solid var(--adaba-brand-500) !important;
  outline-offset: 2px !important;
  box-shadow: var(--adaba-ring) !important;
}

/* App canvas */
#sgcrm-root > div[style*="display: flex"][style*="height: 100%"] {
  background:
    radial-gradient(circle at 82% -15%, rgba(217, 154, 43, .1), transparent 29rem),
    linear-gradient(145deg, #f4f8f6 0%, #eef4f2 100%) !important;
}

#sgcrm-root .sgcrm-page-scroll {
  background:
    radial-gradient(circle at 95% -12%, rgba(217, 154, 43, .085), transparent 34rem),
    radial-gradient(circle at 8% 4%, rgba(17, 155, 120, .07), transparent 28rem),
    transparent !important;
  scroll-behavior: smooth;
}

#sgcrm-root .sgcrm-page-motion-shell {
  width: 100%;
  padding: 10px 14px 28px;
}

/* Premium navigation */
#sgcrm-root .sgcrm-sidebar-panel,
#sgcrm-root .sgcrm-mobile-sidebar-shell .sgcrm-sidebar-panel {
  width: 258px !important;
  min-width: 258px !important;
  padding: 10px 0 14px !important;
  color: rgba(255, 255, 255, .88) !important;
  background:
    radial-gradient(circle at 20% -5%, rgba(240, 203, 123, .16), transparent 18rem),
    radial-gradient(circle at 105% 48%, rgba(17, 155, 120, .25), transparent 22rem),
    linear-gradient(180deg, #03292c 0%, #05383a 52%, #042b2d 100%) !important;
  border-right: 1px solid rgba(255, 255, 255, .08) !important;
  box-shadow: 18px 0 46px rgba(4, 43, 45, .11) !important;
}

#sgcrm-root .sgcrm-sidebar-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, .035), transparent 36%),
    radial-gradient(circle at 50% 105%, rgba(217, 154, 43, .09), transparent 28rem);
  mix-blend-mode: screen;
}

#sgcrm-root .sgcrm-sidebar-header {
  position: relative !important;
  z-index: 1;
  min-height: 70px !important;
  margin: 8px 16px 12px !important;
  padding: 14px 15px !important;
  overflow: hidden !important;
  background: rgba(255, 255, 255, .075) !important;
  border: 1px solid rgba(255, 255, 255, .12) !important;
  border-radius: 20px !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .08), 0 14px 30px rgba(0, 0, 0, .08) !important;
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}

#sgcrm-root .sgcrm-sidebar-header::after {
  content: "";
  position: absolute;
  width: 90px;
  height: 90px;
  right: -35px;
  top: -46px;
  border-radius: 50%;
  background: rgba(217, 154, 43, .16);
  pointer-events: none;
}

#sgcrm-root .sgcrm-sidebar-header img {
  position: relative;
  z-index: 1;
  filter: brightness(0) invert(1) drop-shadow(0 3px 8px rgba(0, 0, 0, .15));
}

#sgcrm-root .sgcrm-sidebar-nav-scroll {
  position: relative;
  z-index: 1;
  padding: 4px 15px 18px !important;
  background: transparent !important;
}

#sgcrm-root .sgcrm-sidebar-category-label {
  padding: 18px 12px 7px !important;
  color: rgba(240, 203, 123, .78) !important;
  font-size: 9.5px !important;
  font-weight: 800 !important;
  letter-spacing: .16em !important;
}

#sgcrm-root .sgcrm-sidebar-nav-item {
  position: relative;
  min-height: 48px !important;
  margin: 3px 0 !important;
  padding: 8px 10px !important;
  color: rgba(235, 247, 244, .82) !important;
  background: transparent !important;
  border: 1px solid transparent;
  border-radius: 15px !important;
  transform: none !important;
  transition: background .18s ease, border-color .18s ease, color .18s ease !important;
}

#sgcrm-root .sgcrm-sidebar-nav-item:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, .075) !important;
  border-color: rgba(255, 255, 255, .08);
}

#sgcrm-root .sgcrm-sidebar-nav-item > span {
  color: inherit !important;
  font-size: 13px !important;
  font-weight: 570 !important;
}

#sgcrm-root .sgcrm-sidebar-nav-icon {
  width: 34px !important;
  height: 34px !important;
  color: inherit !important;
  background: rgba(255, 255, 255, .055) !important;
  border: 1px solid rgba(255, 255, 255, .055);
  border-radius: 11px !important;
}

#sgcrm-root .sgcrm-sidebar-nav-icon svg {
  color: currentColor !important;
  stroke: currentColor !important;
}

#sgcrm-root .sgcrm-sidebar-nav-item:has(> span[style*="rgb(22, 163, 74)"]),
#sgcrm-root .sgcrm-sidebar-nav-item[style*="background: rgb(10, 15, 22)"],
#sgcrm-root .sgcrm-sidebar-nav-item[style*="background:#0a0f16"] {
  color: #fff !important;
  background:
    linear-gradient(100deg, rgba(17, 155, 120, .92), rgba(11, 98, 88, .9)) !important;
  border-color: rgba(255, 255, 255, .13) !important;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .15), inset 0 1px rgba(255, 255, 255, .13) !important;
}

#sgcrm-root .sgcrm-sidebar-nav-item:has(> span[style*="rgb(22, 163, 74)"])::before,
#sgcrm-root .sgcrm-sidebar-nav-item[style*="background: rgb(10, 15, 22)"]::before {
  content: "";
  position: absolute;
  width: 4px;
  height: 20px;
  left: -9px;
  top: 50%;
  border-radius: 99px;
  background: var(--adaba-gold-300);
  box-shadow: 0 0 18px rgba(240, 203, 123, .7);
  transform: translateY(-50%);
}

#sgcrm-root .sgcrm-sidebar-nav-item:has(> span[style*="rgb(22, 163, 74)"]) .sgcrm-sidebar-nav-icon,
#sgcrm-root .sgcrm-sidebar-nav-item[style*="background: rgb(10, 15, 22)"] .sgcrm-sidebar-nav-icon {
  background: rgba(255, 255, 255, .15) !important;
  border-color: rgba(255, 255, 255, .1);
}

#sgcrm-root .sgcrm-sidebar-subnav-item,
#sgcrm-root .sgcrm-sidebar-nav-item + div .sgcrm-sidebar-subnav-item {
  min-height: 42px;
  color: var(--adaba-ink-soft) !important;
  background: var(--adaba-surface) !important;
  border-bottom-color: var(--adaba-line) !important;
}

#sgcrm-root .sgcrm-sidebar-subnav-item:hover {
  color: var(--adaba-brand-700) !important;
  background: var(--adaba-brand-50) !important;
}

#sgcrm-root .sgcrm-sidebar-footer,
#sgcrm-root .sgcrm-sidebar-business-menu,
#sgcrm-root .sgcrm-sidebar-signout {
  position: relative;
  z-index: 1;
}

#sgcrm-root .sgcrm-sidebar-business-menu,
#sgcrm-root .sgcrm-sidebar-signout {
  color: rgba(255, 255, 255, .84) !important;
  background: rgba(255, 255, 255, .06) !important;
  border-color: rgba(255, 255, 255, .1) !important;
  border-radius: 14px !important;
}

/* Desktop page shell */
#sgcrm-root .sg-adaba-page-card-shell {
  max-width: 1540px !important;
  margin: 12px auto 32px !important;
  overflow: clip !important;
  background: rgba(255, 255, 255, .94) !important;
  border: 1px solid rgba(204, 220, 215, .86) !important;
  border-radius: var(--adaba-radius-xl) !important;
  box-shadow: var(--adaba-shadow-md) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

#sgcrm-root .sg-adaba-page-card-head {
  min-height: 76px;
  padding: 15px 25px !important;
  background:
    linear-gradient(110deg, rgba(239, 251, 247, .98), rgba(255, 255, 255, .96) 56%, rgba(255, 241, 207, .42)) !important;
  border-bottom: 1px solid var(--adaba-line) !important;
}

#sgcrm-root .sg-adaba-page-card-head button {
  border-radius: 13px !important;
  border-color: var(--adaba-line-strong) !important;
  box-shadow: 0 4px 14px rgba(7, 56, 58, .05) !important;
}

#sgcrm-root .sg-adaba-page-card-body {
  min-height: 60vh;
  background:
    linear-gradient(180deg, rgba(248, 251, 250, .75), rgba(255, 255, 255, 1) 160px) !important;
}

#sgcrm-root .sg-adaba-page-card-body > div {
  padding: 26px 28px 32px !important;
}

#sgcrm-root .sg-adaba-page-card-body h1 {
  font-size: clamp(22px, 2.2vw, 29px) !important;
  font-weight: 780 !important;
  color: var(--adaba-ink) !important;
  letter-spacing: -.045em !important;
}

#sgcrm-root .sg-adaba-page-card-body h1 + p {
  margin-top: 6px !important;
  color: var(--adaba-muted) !important;
}

/* Generic premium surfaces generated with inline styles */
#sgcrm-root div[style*="background: rgb(255, 255, 255)"][style*="border: 1px solid"],
#sgcrm-root div[style*="background: #fff"][style*="border: 1px solid"],
#sgcrm-root div[style*="background:#fff"][style*="border:1px solid"] {
  border-color: var(--adaba-line) !important;
  box-shadow: var(--adaba-shadow-sm) !important;
}

#sgcrm-root div[style*="border-radius: 14px"][style*="background: rgb(255, 255, 255)"],
#sgcrm-root div[style*="border-radius: 12px"][style*="background: rgb(255, 255, 255)"],
#sgcrm-root div[style*="border-radius: 10px"][style*="background: rgb(255, 255, 255)"] {
  border-radius: 18px !important;
}

#sgcrm-root div[style*="background: rgb(248, 250, 252)"],
#sgcrm-root div[style*="background:#f8fafc"],
#sgcrm-root div[style*="background: #f8fafc"] {
  background: var(--adaba-surface-soft) !important;
  border-color: var(--adaba-line) !important;
}

/* Dashboard */
#sgcrm-root .sg-adaba-dashboard {
  max-width: 1540px !important;
  margin: 0 auto 32px !important;
  color: var(--adaba-ink) !important;
}

#sgcrm-root .sg-adaba-shell {
  overflow: clip !important;
  background: rgba(255, 255, 255, .97) !important;
  border: 1px solid rgba(204, 220, 215, .9) !important;
  border-radius: var(--adaba-radius-xl) !important;
  box-shadow: var(--adaba-shadow-md) !important;
}

#sgcrm-root .sg-adaba-head {
  position: relative;
  min-height: 112px;
  padding: 25px 30px !important;
  overflow: hidden;
  color: #fff !important;
  background:
    radial-gradient(circle at 84% 0%, rgba(240, 203, 123, .24), transparent 18rem),
    radial-gradient(circle at 10% 130%, rgba(17, 155, 120, .32), transparent 22rem),
    linear-gradient(115deg, var(--adaba-brand-950), var(--adaba-brand-800) 62%, #0b5a51) !important;
  border-bottom: 0 !important;
}

#sgcrm-root .sg-adaba-head::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -98px;
  width: 230px;
  height: 230px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(255, 255, 255, .025), 0 0 0 68px rgba(255, 255, 255, .018);
  pointer-events: none;
}

#sgcrm-root .sg-adaba-title {
  color: #fff !important;
  font-size: clamp(23px, 2.3vw, 31px) !important;
  font-weight: 800 !important;
  letter-spacing: -.045em !important;
}

#sgcrm-root .sg-adaba-sub {
  color: rgba(230, 246, 241, .76) !important;
  font-size: 12.5px !important;
}

#sgcrm-root .sg-adaba-head-actions {
  position: relative;
  z-index: 1;
}

#sgcrm-root .sg-adaba-dashboard-tools {
  position: relative;
  z-index: 1;
}

#sgcrm-root .sg-adaba-dashboard-filter,
#sgcrm-root .sg-adaba-date-pill,
#sgcrm-root .sg-adaba-head .sg-adaba-soft-pill {
  color: rgba(255, 255, 255, .94) !important;
  background-color: rgba(255, 255, 255, .09) !important;
  border-color: rgba(255, 255, 255, .17) !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .08) !important;
  backdrop-filter: blur(12px);
}

#sgcrm-root .sg-adaba-dashboard-filter {
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255,255,255,.72) 50%),
    linear-gradient(135deg, rgba(255,255,255,.72) 50%, transparent 50%) !important;
}

#sgcrm-root .sg-adaba-dashboard-filter option {
  color: var(--adaba-ink);
  background: #fff;
}

#sgcrm-root .sg-adaba-avatar {
  color: var(--adaba-brand-950) !important;
  background: linear-gradient(145deg, #fff3d5, #edc775) !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .16), inset 0 1px rgba(255, 255, 255, .45) !important;
}

#sgcrm-root .sg-adaba-body {
  padding: 22px 24px 26px !important;
  background:
    linear-gradient(180deg, #f8fbfa 0, #fff 120px) !important;
}

#sgcrm-root .sg-adaba-kpi-strip {
  gap: 0 !important;
  overflow: hidden !important;
  background: #fff !important;
  border: 1px solid var(--adaba-line) !important;
  border-radius: 20px !important;
  box-shadow: var(--adaba-shadow-sm) !important;
}

#sgcrm-root .sg-adaba-kpi-segment {
  position: relative;
  min-height: 106px !important;
  padding: 20px 22px !important;
  border-color: var(--adaba-line) !important;
}

#sgcrm-root .sg-adaba-kpi-segment::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 0;
  height: 3px;
  border-radius: 99px 99px 0 0;
  background: linear-gradient(90deg, var(--adaba-brand-500), var(--adaba-gold-500));
  opacity: .65;
}

#sgcrm-root .sg-adaba-kpi-seg-label,
#sgcrm-root .sg-adaba-kpi-label {
  color: var(--adaba-ink-soft) !important;
}

#sgcrm-root .sg-adaba-kpi-seg-value,
#sgcrm-root .sg-adaba-kpi-value {
  color: var(--adaba-ink) !important;
  font-weight: 800 !important;
}

#sgcrm-root .sg-adaba-kpi-seg-sub,
#sgcrm-root .sg-adaba-kpi-meta {
  color: var(--adaba-muted) !important;
}

#sgcrm-root .sg-adaba-kpi-grid {
  gap: 14px !important;
}

#sgcrm-root .sg-adaba-kpi-card {
  min-height: 134px !important;
  padding: 19px !important;
  overflow: hidden !important;
  background:
    radial-gradient(circle at 105% -5%, rgba(17, 155, 120, .12), transparent 8rem),
    #fff !important;
  border: 1px solid var(--adaba-line) !important;
  border-radius: 20px !important;
  box-shadow: var(--adaba-shadow-sm) !important;
}

#sgcrm-root .sg-adaba-kpi-card::before {
  content: "";
  position: absolute;
  width: 4px;
  height: 44px;
  left: 0;
  top: 24px;
  border-radius: 0 99px 99px 0;
  background: linear-gradient(180deg, var(--adaba-gold-500), var(--adaba-brand-500));
}

#sgcrm-root .sg-adaba-kpi-icon {
  width: 38px !important;
  height: 38px !important;
  border-radius: 13px !important;
  box-shadow: inset 0 0 0 1px rgba(7, 56, 58, .05) !important;
}

#sgcrm-root .sg-adaba-panel {
  overflow: clip !important;
  background: #fff !important;
  border: 1px solid var(--adaba-line) !important;
  border-radius: 20px !important;
  box-shadow: var(--adaba-shadow-sm) !important;
}

#sgcrm-root .sg-adaba-panel-pad {
  padding: 21px !important;
}

#sgcrm-root .sg-adaba-panel-title {
  color: var(--adaba-ink) !important;
  font-size: 17px !important;
  font-weight: 760 !important;
}

#sgcrm-root .sg-adaba-panel-sub {
  color: var(--adaba-muted) !important;
}

#sgcrm-root .sg-adaba-status-card,
#sgcrm-root .sg-adaba-product-item,
#sgcrm-root .sg-adaba-rank-item {
  background: linear-gradient(145deg, #fff, #fbfdfc) !important;
  border-color: var(--adaba-line) !important;
  border-radius: 16px !important;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

#sgcrm-root .sg-adaba-status-card:hover,
#sgcrm-root .sg-adaba-product-item:hover,
#sgcrm-root .sg-adaba-rank-item:hover {
  border-color: rgba(17, 155, 120, .28) !important;
  box-shadow: 0 9px 24px rgba(7, 56, 58, .07);
  transform: translateY(-1px);
}

#sgcrm-root .sg-adaba-track {
  height: 7px !important;
  background: #edf3f1 !important;
}

#sgcrm-root .sg-adaba-rank-no,
#sgcrm-root .sg-adaba-customer-avatar {
  color: var(--adaba-brand-700) !important;
  background: linear-gradient(145deg, var(--adaba-brand-50), var(--adaba-brand-100)) !important;
  box-shadow: inset 0 0 0 1px rgba(17, 155, 120, .08);
}

#sgcrm-root .sg-adaba-metric {
  background: linear-gradient(150deg, #f9fcfb, #fff) !important;
  border-color: var(--adaba-line) !important;
  border-radius: 16px !important;
}

#sgcrm-root .sg-adaba-metric-value,
#sgcrm-root .sg-adaba-item-stat,
#sgcrm-root .sg-adaba-status-count {
  color: var(--adaba-ink) !important;
}

/* Tables and data density */
#sgcrm-root .sg-adaba-table-wrap,
#sgcrm-root div[style*="overflow-x: auto"][style*="background: rgb(255, 255, 255)"],
#sgcrm-root div[style*="overflowX"][style*="background:#fff"] {
  overflow: auto !important;
  background: #fff !important;
  border: 1px solid var(--adaba-line) !important;
  border-radius: 18px !important;
  box-shadow: var(--adaba-shadow-sm) !important;
}

#sgcrm-root table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  color: var(--adaba-ink-soft);
}

#sgcrm-root table thead tr,
#sgcrm-root .sg-adaba-table thead tr {
  background:
    linear-gradient(180deg, #f4f9f7, #eef5f2) !important;
}

#sgcrm-root table th,
#sgcrm-root .sg-adaba-table th {
  height: 45px !important;
  padding: 10px 14px !important;
  color: #607a7d !important;
  background: transparent !important;
  border-bottom: 1px solid var(--adaba-line-strong) !important;
  font-size: 10.5px !important;
  font-weight: 750 !important;
  letter-spacing: .055em !important;
  text-transform: uppercase;
}

#sgcrm-root table td,
#sgcrm-root .sg-adaba-table td {
  height: 58px;
  padding: 11px 14px !important;
  color: var(--adaba-ink-soft);
  border-bottom-color: #e9f0ee !important;
}

#sgcrm-root table tbody tr {
  transition: background-color .15s ease;
}

#sgcrm-root table tbody tr:hover,
#sgcrm-root .sg-adaba-table tbody tr:hover {
  background: var(--adaba-brand-50) !important;
}

#sgcrm-root table tbody tr:hover td,
#sgcrm-root .sg-adaba-table tbody tr:hover td {
  background: transparent !important;
}

#sgcrm-root table tbody tr:last-child td {
  border-bottom-color: transparent !important;
}

/* Forms */
#sgcrm-root :where(
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
  select,
  textarea
) {
  min-height: 42px;
  color: var(--adaba-ink) !important;
  background-color: #fff !important;
  border: 1px solid var(--adaba-line-strong) !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 2px rgba(7, 56, 58, .025) !important;
  font-family: inherit !important;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

#sgcrm-root textarea {
  min-height: 100px;
  line-height: 1.55;
}

#sgcrm-root :where(
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
  select,
  textarea
):hover {
  border-color: #afc7c0 !important;
}

#sgcrm-root :where(
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
  select,
  textarea
):focus {
  border-color: var(--adaba-brand-500) !important;
  box-shadow: var(--adaba-ring) !important;
}

#sgcrm-root :where(input, textarea)::placeholder {
  color: #9aacab !important;
}

#sgcrm-root label {
  color: var(--adaba-ink-soft) !important;
  font-weight: 650 !important;
}

#sgcrm-root input[type="checkbox"],
#sgcrm-root input[type="radio"] {
  accent-color: var(--adaba-brand-600) !important;
}

/* Buttons */
#sgcrm-root button {
  font-family: inherit !important;
  letter-spacing: -.005em;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background-color .16s ease !important;
}

#sgcrm-root button:not(:disabled):hover {
  transform: translateY(-1px);
}

#sgcrm-root button:not(:disabled):active {
  transform: translateY(0) scale(.985);
}

#sgcrm-root button[style*="background: rgb(22, 163, 74)"],
#sgcrm-root button[style*="background:#16a34a"],
#sgcrm-root button[style*="background: #16a34a"],
#sgcrm-root button[style*="background: rgb(37, 99, 235)"],
#sgcrm-root button[style*="background:#2563eb"],
#sgcrm-root button[style*="background: #2563eb"] {
  color: #fff !important;
  background:
    linear-gradient(115deg, var(--adaba-brand-700), var(--adaba-brand-500)) !important;
  border-color: var(--adaba-brand-600) !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 22px rgba(11, 98, 88, .18), inset 0 1px rgba(255, 255, 255, .15) !important;
}

#sgcrm-root button[style*="background: rgb(22, 163, 74)"]:hover,
#sgcrm-root button[style*="background:#16a34a"]:hover,
#sgcrm-root button[style*="background: rgb(37, 99, 235)"]:hover,
#sgcrm-root button[style*="background:#2563eb"]:hover {
  background:
    linear-gradient(115deg, var(--adaba-brand-800), var(--adaba-brand-600)) !important;
  box-shadow: 0 13px 28px rgba(11, 98, 88, .25), inset 0 1px rgba(255, 255, 255, .15) !important;
}

#sgcrm-root button[style*="background: none"],
#sgcrm-root button[style*="background:none"] {
  box-shadow: none !important;
}

/* Modal, drawer, popover, and transient surfaces */
#sgcrm-root .sgcrm-modal-overlay {
  background: rgba(2, 28, 30, .58) !important;
  backdrop-filter: blur(9px) saturate(115%) !important;
  -webkit-backdrop-filter: blur(9px) saturate(115%) !important;
}

#sgcrm-root .sgcrm-modal-box {
  overflow: clip !important;
  background: rgba(255, 255, 255, .985) !important;
  border: 1px solid rgba(255, 255, 255, .52) !important;
  border-radius: 22px !important;
  box-shadow: 0 34px 100px rgba(2, 28, 30, .3), 0 10px 34px rgba(2, 28, 30, .16) !important;
}

#sgcrm-root .sgcrm-modal-box > div:first-of-type:not(:only-child) {
  background:
    linear-gradient(110deg, var(--adaba-brand-50), #fff 70%, rgba(255, 241, 207, .55)) !important;
  border-bottom-color: var(--adaba-line) !important;
}

#sgcrm-root .sgcrm-modal-box h3 {
  color: var(--adaba-ink) !important;
  font-size: 17px !important;
  font-weight: 780 !important;
}

#sgcrm-root div[style*="position: fixed"][style*="z-index: 1000"][style*="background: rgb(255, 255, 255)"],
#sgcrm-root div[style*="position: fixed"][style*="z-index: 1000"][style*="background:#fff"] {
  border: 1px solid var(--adaba-line) !important;
  border-radius: 20px !important;
  box-shadow: var(--adaba-shadow-lg) !important;
}

/* Settings */
#sgcrm-root .sg-settings-index {
  max-width: 980px !important;
}

#sgcrm-root .sg-settings-index-intro {
  min-height: 178px;
  padding: 29px 30px !important;
  background:
    radial-gradient(circle at 88% -12%, rgba(240, 203, 123, .25), transparent 17rem),
    radial-gradient(circle at 2% 120%, rgba(17, 155, 120, .32), transparent 20rem),
    linear-gradient(120deg, var(--adaba-brand-950), var(--adaba-brand-700)) !important;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 24px !important;
  box-shadow: 0 22px 58px rgba(4, 43, 45, .2);
}

#sgcrm-root .sg-settings-index-eyebrow {
  color: var(--adaba-gold-300) !important;
}

#sgcrm-root .sg-settings-index-intro h2 {
  color: #fff !important;
  font-size: clamp(26px, 3vw, 35px) !important;
  font-weight: 820 !important;
}

#sgcrm-root .sg-settings-index-count {
  border-color: rgba(255, 255, 255, .16) !important;
  background: rgba(255, 255, 255, .1) !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .12);
  backdrop-filter: blur(12px);
}

#sgcrm-root .sg-settings-list {
  overflow: clip;
  background: #fff !important;
  border-color: var(--adaba-line) !important;
  border-radius: 21px !important;
  box-shadow: var(--adaba-shadow-sm);
}

#sgcrm-root .sg-settings-list-item {
  min-height: 94px !important;
  padding: 17px 20px !important;
  background: #fff !important;
  border-bottom-color: #e9f0ee !important;
}

#sgcrm-root .sg-settings-list-item:hover {
  background: linear-gradient(90deg, var(--adaba-brand-50), #fff) !important;
}

#sgcrm-root .sg-settings-list-icon {
  width: 48px !important;
  height: 48px !important;
  color: var(--adaba-brand-700) !important;
  background: linear-gradient(145deg, var(--adaba-brand-100), #fff) !important;
  border-color: #bee8d9 !important;
  border-radius: 15px !important;
}

#sgcrm-root .sg-settings-list-copy strong,
#sgcrm-root .sg-settings-detail-copy h2 {
  color: var(--adaba-ink) !important;
}

#sgcrm-root .sg-settings-list-copy small,
#sgcrm-root .sg-settings-detail-copy p {
  color: var(--adaba-muted) !important;
}

#sgcrm-root .sg-settings-detail-copy span {
  color: var(--adaba-brand-600) !important;
}

#sgcrm-root .sg-settings-back {
  color: var(--adaba-ink-soft) !important;
  background: #fff !important;
  border-color: var(--adaba-line-strong) !important;
  border-radius: 12px !important;
  box-shadow: var(--adaba-shadow-sm) !important;
}

#sgcrm-root .sg-account-setup-wrap.sg-settings-masonry {
  gap: 16px !important;
}

#sgcrm-root .sg-account-setup-wrap.sg-settings-masonry > div:not(.sg-settings-full) {
  padding: 20px !important;
  background: #fff !important;
  border-color: var(--adaba-line) !important;
  border-radius: 20px !important;
  box-shadow: var(--adaba-shadow-sm) !important;
}

/* Product Analytics premium components */
#sgcrm-root .sg-pa-hero {
  border-radius: 26px !important;
  background:
    radial-gradient(circle at 8% 8%, rgba(217, 154, 43, .25), transparent 34%),
    radial-gradient(circle at 84% 10%, rgba(255, 255, 255, .13), transparent 27%),
    linear-gradient(135deg, var(--adaba-brand-950), var(--adaba-brand-800) 53%, var(--adaba-brand-600)) !important;
  box-shadow: 0 24px 66px rgba(4, 43, 45, .22) !important;
}

#sgcrm-root .sg-pa-kpi,
#sgcrm-root .sg-pa-toolbar,
#sgcrm-root .sg-pa-card,
#sgcrm-root .sg-pa-pagination,
#sgcrm-root .sg-pa-empty {
  border-color: var(--adaba-line) !important;
  box-shadow: var(--adaba-shadow-sm) !important;
}

#sgcrm-root .sg-pa-card {
  border-radius: 22px !important;
}

#sgcrm-root .sg-pa-card:hover {
  border-color: rgba(17, 155, 120, .28) !important;
  box-shadow: var(--adaba-shadow-md) !important;
}

#sgcrm-root .sg-pa-revenue-card {
  background:
    radial-gradient(circle at 94% -8%, rgba(217, 154, 43, .3), transparent 8rem),
    linear-gradient(120deg, var(--adaba-brand-950), var(--adaba-brand-800)) !important;
}

/* Mobile navigation and responsive finish */
#sgcrm-root .sgcrm-bottom-nav {
  height: calc(78px + env(safe-area-inset-bottom, 0px)) !important;
  min-height: calc(78px + env(safe-area-inset-bottom, 0px)) !important;
  background: rgba(255, 255, 255, .93) !important;
  border-top: 1px solid rgba(204, 220, 215, .86) !important;
  box-shadow: 0 -16px 42px rgba(4, 43, 45, .1) !important;
  backdrop-filter: blur(22px) saturate(165%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(165%) !important;
}

#sgcrm-root .sgcrm-bottom-nav-item {
  color: var(--adaba-muted) !important;
}

#sgcrm-root .sgcrm-bottom-nav-item > div {
  border-radius: 14px !important;
}

#sgcrm-root .sgcrm-mobile-topbar {
  background: rgba(255, 255, 255, .92) !important;
  border-bottom: 1px solid var(--adaba-line) !important;
  box-shadow: 0 10px 28px rgba(4, 43, 45, .07) !important;
  backdrop-filter: blur(20px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(160%) !important;
}

#sgcrm-root .sgcrm-mobile-sidebar-backdrop {
  background: rgba(2, 28, 30, .66) !important;
  backdrop-filter: blur(7px) !important;
}

#sgcrm-root .sgcrm-floating-action-menu {
  overflow: clip;
  border: 1px solid var(--adaba-line) !important;
  border-radius: 20px !important;
  box-shadow: var(--adaba-shadow-lg) !important;
}

/* Dark mode keeps the same premium identity */
html.sgcrm-dark-mode #sgcrm-root,
#sgcrm-root.sgcrm-dark-mode {
  --adaba-ink: #f2fbf8;
  --adaba-ink-soft: #bbd0cd;
  --adaba-muted: #829b99;
  --adaba-canvas: #061011;
  --adaba-surface: #0b1718;
  --adaba-surface-soft: #0e1d1e;
  --adaba-line: #1b3131;
  --adaba-line-strong: #294443;
  --adaba-shadow-sm: 0 1px 2px rgba(0, 0, 0, .18), 0 12px 28px rgba(0, 0, 0, .22);
  --adaba-shadow-md: 0 22px 55px rgba(0, 0, 0, .3);
  color-scheme: dark;
  background:
    radial-gradient(circle at 8% -8%, rgba(17, 155, 120, .13), transparent 31rem),
    radial-gradient(circle at 102% 5%, rgba(217, 154, 43, .09), transparent 28rem),
    #061011 !important;
}

html.sgcrm-dark-mode #sgcrm-root > div[style*="display: flex"][style*="height: 100%"],
#sgcrm-root.sgcrm-dark-mode > div[style*="display: flex"][style*="height: 100%"],
html.sgcrm-dark-mode #sgcrm-root .sgcrm-page-scroll,
#sgcrm-root.sgcrm-dark-mode .sgcrm-page-scroll {
  background:
    radial-gradient(circle at 92% -8%, rgba(217, 154, 43, .08), transparent 28rem),
    linear-gradient(145deg, #071213, #091617) !important;
}

html.sgcrm-dark-mode #sgcrm-root .sg-adaba-page-card-shell,
html.sgcrm-dark-mode #sgcrm-root .sg-adaba-page-card-body,
html.sgcrm-dark-mode #sgcrm-root .sg-adaba-shell,
html.sgcrm-dark-mode #sgcrm-root .sg-adaba-body,
html.sgcrm-dark-mode #sgcrm-root .sg-adaba-panel,
html.sgcrm-dark-mode #sgcrm-root .sg-adaba-kpi-card,
html.sgcrm-dark-mode #sgcrm-root .sg-adaba-kpi-strip,
html.sgcrm-dark-mode #sgcrm-root .sg-adaba-status-card,
html.sgcrm-dark-mode #sgcrm-root .sg-adaba-product-item,
html.sgcrm-dark-mode #sgcrm-root .sg-adaba-rank-item,
html.sgcrm-dark-mode #sgcrm-root .sg-settings-list,
html.sgcrm-dark-mode #sgcrm-root .sg-settings-list-item,
html.sgcrm-dark-mode #sgcrm-root .sg-account-setup-wrap.sg-settings-masonry > div:not(.sg-settings-full),
html.sgcrm-dark-mode #sgcrm-root .sgcrm-modal-box,
#sgcrm-root.sgcrm-dark-mode .sg-adaba-page-card-shell,
#sgcrm-root.sgcrm-dark-mode .sg-adaba-page-card-body,
#sgcrm-root.sgcrm-dark-mode .sg-adaba-shell,
#sgcrm-root.sgcrm-dark-mode .sg-adaba-body,
#sgcrm-root.sgcrm-dark-mode .sg-adaba-panel,
#sgcrm-root.sgcrm-dark-mode .sg-adaba-kpi-card,
#sgcrm-root.sgcrm-dark-mode .sg-adaba-kpi-strip,
#sgcrm-root.sgcrm-dark-mode .sg-adaba-status-card,
#sgcrm-root.sgcrm-dark-mode .sg-adaba-product-item,
#sgcrm-root.sgcrm-dark-mode .sg-adaba-rank-item,
#sgcrm-root.sgcrm-dark-mode .sg-settings-list,
#sgcrm-root.sgcrm-dark-mode .sg-settings-list-item,
#sgcrm-root.sgcrm-dark-mode .sg-account-setup-wrap.sg-settings-masonry > div:not(.sg-settings-full),
#sgcrm-root.sgcrm-dark-mode .sgcrm-modal-box {
  color: var(--adaba-ink) !important;
  background: #0b1718 !important;
  border-color: var(--adaba-line) !important;
}

html.sgcrm-dark-mode #sgcrm-root .sg-adaba-page-card-head,
#sgcrm-root.sgcrm-dark-mode .sg-adaba-page-card-head {
  background:
    linear-gradient(110deg, #0e2221, #0b1718 65%, #251d0e) !important;
  border-bottom-color: var(--adaba-line) !important;
}

html.sgcrm-dark-mode #sgcrm-root :where(
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
  select,
  textarea
),
#sgcrm-root.sgcrm-dark-mode :where(
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
  select,
  textarea
) {
  color: var(--adaba-ink) !important;
  background: #0e1d1e !important;
  border-color: var(--adaba-line-strong) !important;
}

html.sgcrm-dark-mode #sgcrm-root table thead tr,
#sgcrm-root.sgcrm-dark-mode table thead tr {
  background: #0f2221 !important;
}

html.sgcrm-dark-mode #sgcrm-root table tbody tr:hover,
#sgcrm-root.sgcrm-dark-mode table tbody tr:hover {
  background: rgba(17, 155, 120, .08) !important;
}

@media (max-width: 1180px) {
  #sgcrm-root .sgcrm-page-motion-shell {
    padding: 8px 10px 22px;
  }

  #sgcrm-root .sg-adaba-page-card-body > div {
    padding: 22px 20px 28px !important;
  }

  #sgcrm-root .sg-adaba-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 720px) {
  #sgcrm-root {
    --adaba-radius-xl: 21px;
  }

  #sgcrm-root .sgcrm-page-motion-shell {
    padding: 0 0 18px;
  }

  #sgcrm-root .sg-adaba-page-card-shell {
    margin: 0 10px 20px !important;
    border-radius: 21px !important;
  }

  #sgcrm-root .sg-adaba-page-card-head {
    min-height: 64px;
    padding: 11px 14px !important;
  }

  #sgcrm-root .sg-adaba-page-card-body > div {
    padding: 17px 14px 24px !important;
  }

  #sgcrm-root .sg-adaba-dashboard {
    margin: -14px -16px 18px !important;
  }

  #sgcrm-root .sg-adaba-shell {
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  #sgcrm-root .sg-adaba-body {
    padding: 14px !important;
  }

  #sgcrm-root .sg-adaba-kpi-grid {
    gap: 10px !important;
  }

  #sgcrm-root .sg-adaba-kpi-card {
    min-height: 122px !important;
    padding: 14px !important;
    border-radius: 17px !important;
  }

  #sgcrm-root .sg-adaba-panel {
    border-radius: 18px !important;
  }

  #sgcrm-root .sgcrm-modal-box {
    border-radius: 22px 22px 0 0 !important;
  }

  #sgcrm-root .sg-settings-index-intro {
    min-height: 0;
    padding: 22px 20px !important;
    border-radius: 21px !important;
  }

  #sgcrm-root .sg-settings-list-item {
    min-height: 86px !important;
    padding: 15px !important;
  }

  #sgcrm-root table th,
  #sgcrm-root .sg-adaba-table th {
    font-size: 9.5px !important;
    letter-spacing: .035em !important;
  }
}

/*
 * Shared modal usability foundation — 3.5.3.
 * The companion modal-foundation.js applies these semantic classes to every
 * common CRM modal, so the correction covers the full shared workflow surface.
 */
#sgcrm-root .sgcrm-modal-overlay {
  inset: 0 !important;
}

#sgcrm-root .sgcrm-modal-box {
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  max-height: min(90vh, 900px) !important;
}

#sgcrm-root .sgcrm-modal-header {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  min-height: 64px;
  box-sizing: border-box;
}

#sgcrm-root .sgcrm-modal-close {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 11px !important;
}

#sgcrm-root .sgcrm-modal-close:hover,
#sgcrm-root .sgcrm-modal-close:focus-visible {
  color: #0756b5 !important;
  background: #e9f3ff !important;
  outline: 3px solid rgba(8, 102, 255, .18) !important;
  outline-offset: 1px !important;
}

#sgcrm-root .sgcrm-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

#sgcrm-root .sgcrm-order-detail-actions {
  position: sticky;
  z-index: 4;
  bottom: -20px;
  margin: 20px -20px -20px !important;
  padding: 12px 20px max(12px, env(safe-area-inset-bottom)) !important;
  background: rgba(255, 255, 255, .98);
  border-top: 1px solid #dce4ee !important;
  box-shadow: 0 -10px 24px rgba(15, 35, 62, .08);
}

@media (max-width: 720px) {
  #sgcrm-root .sgcrm-modal-overlay {
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    padding: 0 !important;
    align-items: stretch !important;
  }

  #sgcrm-root .sgcrm-modal-box {
    width: 100vw !important;
    max-width: none !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  #sgcrm-root .sgcrm-modal-header {
    min-height: calc(64px + env(safe-area-inset-top, 0px));
    padding-top: max(14px, env(safe-area-inset-top, 0px)) !important;
    padding-right: 14px !important;
    padding-left: 16px !important;
  }

  #sgcrm-root .sgcrm-modal-body {
    padding: 16px 16px max(20px, env(safe-area-inset-bottom, 0px)) !important;
    scroll-padding-bottom: 94px;
  }

  #sgcrm-root .sgcrm-order-detail-actions {
    bottom: calc(-1 * max(20px, env(safe-area-inset-bottom, 0px)));
    margin-right: -16px !important;
    margin-left: -16px !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding: 12px 16px max(14px, env(safe-area-inset-bottom, 0px)) !important;
  }

  #sgcrm-root .sgcrm-order-detail-actions button {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 44px !important;
    padding-right: 8px !important;
    padding-left: 8px !important;
    white-space: normal !important;
  }

  #sgcrm-root .sgcrm-modal-body button,
  #sgcrm-root .sgcrm-modal-body [role="button"] {
    min-height: 44px;
  }
}

/* 3.5.8 — keep every Inventory submenu state inside the green palette.
 * The dark-sidebar base selector is intentionally included here so these
 * rules outrank its legacy navy background without disturbing other themes. */
html.sgcrm-green-mode #sgcrm-root .sgcrm-sidebar-panel[data-sgcrm-dark-sidebar] .sgcrm-sidebar-subnav-item,
html.sgcrm-green-mode #sgcrm-root .sgcrm-sidebar-subnav-item {
  color: #dcfce7 !important;
  background: rgba(255, 255, 255, .055) !important;
  border-color: rgba(255, 255, 255, .08) !important;
}

html.sgcrm-green-mode #sgcrm-root .sgcrm-sidebar-panel[data-sgcrm-dark-sidebar] .sgcrm-sidebar-subnav-item:hover,
html.sgcrm-green-mode #sgcrm-root .sgcrm-sidebar-subnav-item:hover,
html.sgcrm-green-mode #sgcrm-root .sgcrm-sidebar-panel[data-sgcrm-dark-sidebar] .sgcrm-sidebar-subnav-item:focus-visible,
html.sgcrm-green-mode #sgcrm-root .sgcrm-sidebar-subnav-item:focus-visible,
html.sgcrm-green-mode #sgcrm-root .sgcrm-sidebar-panel[data-sgcrm-dark-sidebar] .sgcrm-sidebar-subnav-item[style*="rgb(22, 163, 74)"],
html.sgcrm-green-mode #sgcrm-root .sgcrm-sidebar-subnav-item[style*="rgb(22, 163, 74)"] {
  color: #101828 !important;
  background: #fff !important;
  border-color: rgba(255, 255, 255, .82) !important;
  box-shadow: 0 7px 18px rgba(0, 61, 32, .18) !important;
}

html.sgcrm-green-mode #sgcrm-root .sgcrm-sidebar-subnav-item:hover *,
html.sgcrm-green-mode #sgcrm-root .sgcrm-sidebar-subnav-item:focus-visible *,
html.sgcrm-green-mode #sgcrm-root .sgcrm-sidebar-subnav-item[style*="rgb(22, 163, 74)"] * {
  color: inherit !important;
}

@media (max-width: 360px) {
  #sgcrm-root .sgcrm-order-detail-actions {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  #sgcrm-root .sg-adaba-kpi-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  #sgcrm-root .sg-adaba-kpi-value {
    font-size: 21px !important;
  }

  #sgcrm-root .sg-pa-kpis,
  #sgcrm-root .sg-pa-mini-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  #sgcrm-root *,
  #sgcrm-root *::before,
  #sgcrm-root *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/*
 * AdabaCRM Precision UI — 3.2.1
 *
 * The original premium layer remains above as broad component coverage.
 * This final layer intentionally wins the cascade and establishes the
 * production-facing visual system: PayPal navy, Meta blue, crisp Windows
 * typography, solid surfaces, and predictable high-contrast navigation.
 */

#sgcrm-root {
  --adaba-ink: #0b1f33;
  --adaba-ink-soft: #40556c;
  --adaba-muted: #6b7d90;
  --adaba-brand-950: #001435;
  --adaba-brand-900: #00265f;
  --adaba-brand-800: #003b85;
  --adaba-brand-700: #0756b5;
  --adaba-brand-600: #0866ff;
  --adaba-brand-500: #1877f2;
  --adaba-brand-100: #dbeafe;
  --adaba-brand-50: #eff6ff;
  --adaba-gold-600: #0756b5;
  --adaba-gold-500: #0866ff;
  --adaba-gold-300: #73b6ff;
  --adaba-gold-100: #dbeafe;
  --adaba-canvas: #f3f6fa;
  --adaba-surface: #ffffff;
  --adaba-surface-soft: #f7f9fc;
  --adaba-line: #e1e7ef;
  --adaba-line-strong: #cfd8e3;
  --adaba-ring: 0 0 0 4px rgba(8, 102, 255, .13);
  --adaba-shadow-sm: 0 1px 2px rgba(15, 35, 62, .06), 0 7px 20px rgba(15, 35, 62, .045);
  --adaba-shadow-md: 0 14px 38px rgba(15, 35, 62, .08), 0 2px 8px rgba(15, 35, 62, .04);
  --adaba-shadow-lg: 0 26px 76px rgba(10, 31, 58, .18), 0 8px 24px rgba(10, 31, 58, .08);
  color: var(--adaba-ink);
  background: var(--adaba-canvas) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  font-feature-settings: normal;
  text-rendering: auto;
  -webkit-font-smoothing: auto;
}

#sgcrm-root,
#sgcrm-root * {
  text-shadow: none !important;
}

#sgcrm-root > div[style*="display: flex"][style*="height: 100%"],
#sgcrm-root .sgcrm-page-scroll {
  background: #f3f6fa !important;
}

#sgcrm-root .sgcrm-page-motion-shell {
  padding: 10px 14px 30px;
}

/* Crisp, high-contrast sidebar — fixes the light-background/white-text defect. */
#sgcrm-root .sgcrm-sidebar-panel,
#sgcrm-root .sgcrm-mobile-sidebar-shell .sgcrm-sidebar-panel,
#sgcrm-root .sgcrm-sidebar-panel[data-sgcrm-dark-sidebar="0"],
#sgcrm-root .sgcrm-sidebar-panel[data-sgcrm-dark-sidebar="1"] {
  color: #eaf2ff !important;
  background: linear-gradient(180deg, #061d42 0%, #001b43 52%, #001435 100%) !important;
  background-color: #001435 !important;
  border-right: 1px solid #15335c !important;
  box-shadow: 10px 0 30px rgba(0, 20, 53, .08) !important;
}

#sgcrm-root .sgcrm-sidebar-panel::before {
  display: none !important;
}

#sgcrm-root .sgcrm-sidebar-panel[data-sgcrm-dark-sidebar] .sgcrm-sidebar-header,
#sgcrm-root .sgcrm-sidebar-panel[data-sgcrm-dark-sidebar] .sgcrm-sidebar-nav-scroll,
#sgcrm-root .sgcrm-sidebar-panel[data-sgcrm-dark-sidebar] .sgcrm-sidebar-footer {
  background-color: transparent !important;
}

#sgcrm-root .sgcrm-sidebar-header {
  min-height: 64px !important;
  margin: 8px 16px 12px !important;
  padding: 13px 14px !important;
  overflow: visible !important;
  background: transparent !important;
  border: 1px solid rgba(151, 190, 238, .17) !important;
  border-radius: 14px !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

#sgcrm-root .sgcrm-sidebar-header::after {
  display: none !important;
}

#sgcrm-root .sgcrm-sidebar-panel[data-sgcrm-dark-sidebar] .sgcrm-sidebar-header img,
#sgcrm-root .sgcrm-sidebar-header img {
  opacity: 1 !important;
  filter: none !important;
}

#sgcrm-root .sgcrm-sidebar-nav-scroll {
  padding: 2px 14px 20px !important;
  background: transparent !important;
}

#sgcrm-root .sgcrm-sidebar-category-label,
#sgcrm-root .sgcrm-sidebar-panel[data-sgcrm-dark-sidebar] .sgcrm-sidebar-category-label {
  padding: 18px 12px 7px !important;
  color: #82a6d1 !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: .11em !important;
  line-height: 1.2 !important;
  opacity: 1 !important;
}

#sgcrm-root .sgcrm-sidebar-nav-item,
#sgcrm-root .sgcrm-sidebar-panel[data-sgcrm-dark-sidebar] .sgcrm-sidebar-nav-item {
  min-height: 46px !important;
  margin: 3px 0 !important;
  padding: 7px 10px !important;
  color: #dce9f9 !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 12px !important;
  opacity: 1 !important;
  transform: none !important;
  will-change: auto !important;
}

#sgcrm-root .sgcrm-sidebar-nav-item > span,
#sgcrm-root .sgcrm-sidebar-panel[data-sgcrm-dark-sidebar] .sgcrm-sidebar-nav-item > span {
  color: inherit !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  letter-spacing: 0 !important;
  opacity: 1 !important;
}

#sgcrm-root .sgcrm-sidebar-nav-icon,
#sgcrm-root .sgcrm-sidebar-panel[data-sgcrm-dark-sidebar] .sgcrm-sidebar-nav-icon {
  width: 32px !important;
  height: 32px !important;
  flex: 0 0 32px !important;
  color: #a9c8ed !important;
  background: rgba(117, 164, 220, .1) !important;
  border: 1px solid rgba(151, 190, 238, .12) !important;
  border-radius: 9px !important;
  box-shadow: none !important;
}

#sgcrm-root .sgcrm-sidebar-nav-item:hover,
#sgcrm-root .sgcrm-sidebar-panel[data-sgcrm-dark-sidebar] .sgcrm-sidebar-nav-item:hover {
  color: #fff !important;
  background: #0b2c5c !important;
  border-color: #1c477e !important;
}

#sgcrm-root .sgcrm-sidebar-nav-item:has(> span[style*="rgb(22, 163, 74)"]),
#sgcrm-root .sgcrm-sidebar-nav-item[style*="background: rgb(10, 15, 22)"],
#sgcrm-root .sgcrm-sidebar-nav-item[style*="background:#0a0f16"],
#sgcrm-root .sgcrm-sidebar-panel[data-sgcrm-dark-sidebar] .sgcrm-sidebar-nav-item:has(> span[style*="rgb(22, 163, 74)"]),
#sgcrm-root .sgcrm-sidebar-panel[data-sgcrm-dark-sidebar] .sgcrm-sidebar-nav-item[style*="background: rgb(10, 15, 22)"] {
  color: #fff !important;
  background: #0866ff !important;
  border-color: #2c7cff !important;
  box-shadow: 0 8px 20px rgba(8, 102, 255, .24) !important;
}

#sgcrm-root .sgcrm-sidebar-nav-item:has(> span[style*="rgb(22, 163, 74)"])::before,
#sgcrm-root .sgcrm-sidebar-nav-item[style*="background: rgb(10, 15, 22)"]::before {
  display: none !important;
}

#sgcrm-root .sgcrm-sidebar-nav-item:has(> span[style*="rgb(22, 163, 74)"]) .sgcrm-sidebar-nav-icon,
#sgcrm-root .sgcrm-sidebar-nav-item[style*="background: rgb(10, 15, 22)"] .sgcrm-sidebar-nav-icon {
  color: #fff !important;
  background: rgba(255, 255, 255, .15) !important;
  border-color: rgba(255, 255, 255, .2) !important;
}

#sgcrm-root .sgcrm-sidebar-subnav-item,
#sgcrm-root .sgcrm-sidebar-nav-item + div .sgcrm-sidebar-subnav-item,
#sgcrm-root .sgcrm-sidebar-panel[data-sgcrm-dark-sidebar] .sgcrm-sidebar-subnav-item {
  min-height: 40px !important;
  color: #cfe0f5 !important;
  background: #092754 !important;
  border-bottom-color: #153866 !important;
  font-weight: 500 !important;
}

#sgcrm-root .sgcrm-sidebar-subnav-item:hover,
#sgcrm-root .sgcrm-sidebar-panel[data-sgcrm-dark-sidebar] .sgcrm-sidebar-subnav-item:hover {
  color: #fff !important;
  background: #0e3268 !important;
}

#sgcrm-root .sgcrm-sidebar-business-menu,
#sgcrm-root .sgcrm-sidebar-signout,
#sgcrm-root .sgcrm-sidebar-panel[data-sgcrm-dark-sidebar] .sgcrm-sidebar-business-menu,
#sgcrm-root .sgcrm-sidebar-panel[data-sgcrm-dark-sidebar] .sgcrm-sidebar-signout {
  color: #dce9f9 !important;
  background: #082650 !important;
  border-color: #163b6a !important;
  border-radius: 12px !important;
  box-shadow: none !important;
}

/* Clean application frame and content hierarchy. */
#sgcrm-root .sg-adaba-page-card-shell,
#sgcrm-root .sg-adaba-shell {
  background: #fff !important;
  border-color: var(--adaba-line) !important;
  border-radius: 20px !important;
  box-shadow: var(--adaba-shadow-md) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

#sgcrm-root .sg-adaba-page-card-head {
  min-height: 72px;
  padding: 14px 24px !important;
  background: #fff !important;
  border-bottom-color: var(--adaba-line) !important;
}

#sgcrm-root .sg-adaba-page-card-body {
  background: #f8fafc !important;
}

#sgcrm-root .sg-adaba-page-card-body h1 {
  color: var(--adaba-ink) !important;
  font-weight: 700 !important;
  letter-spacing: -.035em !important;
}

/* Dashboard: PayPal navy depth with a precise Meta-blue accent. */
#sgcrm-root .sg-adaba-head {
  min-height: 108px;
  padding: 24px 30px !important;
  color: #fff !important;
  background: linear-gradient(118deg, #001435 0%, #003b85 62%, #0866ff 125%) !important;
  border-bottom: 3px solid #2d7fff !important;
}

#sgcrm-root .sg-adaba-head::after {
  display: none !important;
}

#sgcrm-root .sg-adaba-title,
#sgcrm-root .sg-adaba-dashboard .sg-adaba-title {
  color: #fff !important;
  font-size: clamp(23px, 2.2vw, 30px) !important;
  font-weight: 700 !important;
  letter-spacing: -.035em !important;
}

#sgcrm-root .sg-adaba-sub,
#sgcrm-root .sg-adaba-dashboard .sg-adaba-sub {
  color: #d8e8fb !important;
  font-size: 13px !important;
  font-weight: 400 !important;
}

#sgcrm-root .sg-adaba-dashboard-filter,
#sgcrm-root .sg-adaba-date-pill,
#sgcrm-root .sg-adaba-head .sg-adaba-soft-pill {
  color: #fff !important;
  background-color: #0c3976 !important;
  border-color: #315b92 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

#sgcrm-root .sg-adaba-avatar {
  color: #0756b5 !important;
  background: #fff !important;
  box-shadow: 0 4px 12px rgba(0, 20, 53, .2) !important;
}

#sgcrm-root .sg-adaba-body {
  padding: 22px 24px 26px !important;
  background: #f7f9fc !important;
}

#sgcrm-root .sg-adaba-kpi-strip,
#sgcrm-root .sg-adaba-kpi-card,
#sgcrm-root .sg-adaba-panel,
#sgcrm-root .sg-adaba-status-card,
#sgcrm-root .sg-adaba-product-item,
#sgcrm-root .sg-adaba-rank-item,
#sgcrm-root .sg-adaba-metric {
  background: #fff !important;
  border-color: var(--adaba-line) !important;
  box-shadow: var(--adaba-shadow-sm) !important;
}

#sgcrm-root .sg-adaba-kpi-card {
  border-radius: 16px !important;
}

#sgcrm-root .sg-adaba-kpi-card::before,
#sgcrm-root .sg-adaba-kpi-segment::after {
  background: #0866ff !important;
  opacity: 1 !important;
}

#sgcrm-root .sg-adaba-kpi-seg-label,
#sgcrm-root .sg-adaba-kpi-label {
  color: #40556c !important;
  font-weight: 600 !important;
}

#sgcrm-root .sg-adaba-kpi-seg-value,
#sgcrm-root .sg-adaba-kpi-value {
  color: #0b1f33 !important;
  font-weight: 800 !important;
  letter-spacing: -.035em !important;
}

#sgcrm-root .sg-adaba-kpi-seg-sub,
#sgcrm-root .sg-adaba-kpi-meta,
#sgcrm-root .sg-adaba-panel-sub {
  color: #6b7d90 !important;
  font-weight: 400 !important;
}

#sgcrm-root .sg-adaba-panel {
  border-radius: 16px !important;
}

#sgcrm-root .sg-adaba-panel-title {
  color: #0b1f33 !important;
  font-weight: 700 !important;
}

#sgcrm-root .sg-adaba-status-card:hover,
#sgcrm-root .sg-adaba-product-item:hover,
#sgcrm-root .sg-adaba-rank-item:hover,
#sgcrm-root .sg-pa-card:hover {
  border-color: #b8d3f5 !important;
  box-shadow: 0 10px 26px rgba(15, 35, 62, .07) !important;
  transform: none !important;
}

#sgcrm-root .sg-adaba-rank-no,
#sgcrm-root .sg-adaba-customer-avatar {
  color: #0756b5 !important;
  background: #eaf3ff !important;
  box-shadow: inset 0 0 0 1px #cfe2fb !important;
}

/* Tables, forms, and controls stay flat, crisp, and highly legible. */
#sgcrm-root .sg-adaba-table-wrap,
#sgcrm-root div[style*="overflow-x: auto"][style*="background: rgb(255, 255, 255)"] {
  border-radius: 14px !important;
  box-shadow: var(--adaba-shadow-sm) !important;
}

#sgcrm-root table thead tr,
#sgcrm-root .sg-adaba-table thead tr {
  background: #f3f6fa !important;
}

#sgcrm-root table th,
#sgcrm-root .sg-adaba-table th {
  color: #52677e !important;
  border-bottom-color: #d9e1eb !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  letter-spacing: .045em !important;
}

#sgcrm-root table td,
#sgcrm-root .sg-adaba-table td {
  color: #40556c !important;
  border-bottom-color: #e7ecf2 !important;
}

#sgcrm-root table tbody tr:hover,
#sgcrm-root .sg-adaba-table tbody tr:hover {
  background: #f1f6fd !important;
}

#sgcrm-root :where(
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
  select,
  textarea
) {
  color: #0b1f33 !important;
  background: #fff !important;
  border-color: #cfd8e3 !important;
  border-radius: 10px !important;
  box-shadow: 0 1px 2px rgba(15, 35, 62, .035) !important;
  font-weight: 400 !important;
}

#sgcrm-root :where(
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
  select,
  textarea
):focus {
  border-color: #0866ff !important;
  box-shadow: var(--adaba-ring) !important;
}

#sgcrm-root label {
  color: #40556c !important;
  font-weight: 600 !important;
}

#sgcrm-root input[type="checkbox"],
#sgcrm-root input[type="radio"] {
  accent-color: #0866ff !important;
}

#sgcrm-root button {
  font-weight: 600;
}

#sgcrm-root button[style*="background: rgb(22, 163, 74)"],
#sgcrm-root button[style*="background:#16a34a"],
#sgcrm-root button[style*="background: #16a34a"],
#sgcrm-root button[style*="background: rgb(37, 99, 235)"],
#sgcrm-root button[style*="background:#2563eb"],
#sgcrm-root button[style*="background: #2563eb"] {
  color: #fff !important;
  background: #0866ff !important;
  border-color: #0866ff !important;
  border-radius: 10px !important;
  box-shadow: 0 7px 16px rgba(8, 102, 255, .2) !important;
  font-weight: 700 !important;
}

#sgcrm-root button[style*="background: rgb(22, 163, 74)"]:hover,
#sgcrm-root button[style*="background:#16a34a"]:hover,
#sgcrm-root button[style*="background: rgb(37, 99, 235)"]:hover,
#sgcrm-root button[style*="background:#2563eb"]:hover {
  background: #0756d9 !important;
  border-color: #0756d9 !important;
  box-shadow: 0 9px 20px rgba(8, 102, 255, .25) !important;
}

/* Settings, analytics, dialogs, and mobile chrome share the same system. */
#sgcrm-root .sg-settings-index-intro,
#sgcrm-root .sg-pa-hero,
#sgcrm-root .sg-pa-revenue-card {
  background: linear-gradient(118deg, #001435 0%, #003b85 66%, #0866ff 130%) !important;
  border-color: #174a86 !important;
  box-shadow: 0 16px 42px rgba(0, 36, 92, .16) !important;
}

#sgcrm-root .sg-settings-index-intro h2 {
  color: #fff !important;
  font-weight: 700 !important;
}

#sgcrm-root .sg-settings-index-eyebrow {
  color: #9bc9ff !important;
}

#sgcrm-root .sg-settings-index-count {
  background: #0c3976 !important;
  border-color: #315b92 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

#sgcrm-root .sg-settings-list,
#sgcrm-root .sg-settings-list-item,
#sgcrm-root .sg-account-setup-wrap.sg-settings-masonry > div:not(.sg-settings-full),
#sgcrm-root .sg-pa-card,
#sgcrm-root .sg-pa-kpi,
#sgcrm-root .sg-pa-toolbar,
#sgcrm-root .sg-pa-pagination,
#sgcrm-root .sg-pa-empty {
  background: #fff !important;
  border-color: var(--adaba-line) !important;
  box-shadow: var(--adaba-shadow-sm) !important;
}

#sgcrm-root .sg-settings-list-item:hover {
  background: #f3f7fd !important;
}

#sgcrm-root .sg-settings-list-icon {
  color: #0756b5 !important;
  background: #eaf3ff !important;
  border-color: #cfe2fb !important;
}

#sgcrm-root .sgcrm-modal-overlay,
#sgcrm-root .sgcrm-mobile-sidebar-backdrop {
  background: rgba(0, 20, 53, .58) !important;
}

#sgcrm-root .sgcrm-modal-box {
  background: #fff !important;
  border-color: #dce4ee !important;
  border-radius: 18px !important;
  box-shadow: var(--adaba-shadow-lg) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

#sgcrm-root .sgcrm-modal-box > div:first-of-type:not(:only-child) {
  background: #f7f9fc !important;
  border-bottom-color: var(--adaba-line) !important;
}

#sgcrm-root .sgcrm-modal-box h3 {
  color: #0b1f33 !important;
  font-weight: 700 !important;
}

#sgcrm-root .sgcrm-bottom-nav,
#sgcrm-root .sgcrm-mobile-topbar {
  background: #fff !important;
  border-color: #dfe6ee !important;
  box-shadow: 0 -6px 20px rgba(15, 35, 62, .06) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html.sgcrm-dark-mode #sgcrm-root,
#sgcrm-root.sgcrm-dark-mode {
  --adaba-ink: #eef6ff;
  --adaba-ink-soft: #c5d5e8;
  --adaba-muted: #8fa5bf;
  --adaba-canvas: #071221;
  --adaba-surface: #0c1b2e;
  --adaba-surface-soft: #102139;
  --adaba-line: #203853;
  --adaba-line-strong: #31506f;
  background: #071221 !important;
}

/* Optional green workspace theme. It keeps the existing information hierarchy
 * while giving the canvas, navigation and cards a distinct evergreen identity.
 */
html.sgcrm-green-mode #sgcrm-root,
#sgcrm-root.sgcrm-green-mode {
  --adaba-ink: #123524;
  --adaba-ink-soft: #315f45;
  --adaba-muted: #5c806a;
  --adaba-canvas: #ecfdf5;
  --adaba-surface: #fbfffc;
  --adaba-surface-soft: #f0fdf4;
  --adaba-line: #cfe8d7;
  --adaba-line-strong: #a7d8b7;
  --adaba-primary: #15803d;
  --adaba-primary-strong: #166534;
  --adaba-shadow-sm: 0 7px 22px rgba(20, 83, 45, .07);
  --adaba-shadow-md: 0 16px 42px rgba(20, 83, 45, .09);
  background:
    radial-gradient(circle at 88% -8%, rgba(74, 222, 128, .20), transparent 28rem),
    linear-gradient(145deg, #f0fdf4, #e8f8ee) !important;
}

html.sgcrm-green-mode #sgcrm-root > div[style*="display: flex"][style*="height: 100%"],
#sgcrm-root.sgcrm-green-mode > div[style*="display: flex"][style*="height: 100%"],
html.sgcrm-green-mode #sgcrm-root .sgcrm-page-scroll,
#sgcrm-root.sgcrm-green-mode .sgcrm-page-scroll {
  background:
    radial-gradient(circle at 92% -8%, rgba(34, 197, 94, .16), transparent 27rem),
    linear-gradient(145deg, #f0fdf4, #e9f8ef) !important;
}

html.sgcrm-green-mode #sgcrm-root .sgcrm-sidebar-panel,
#sgcrm-root.sgcrm-green-mode .sgcrm-sidebar-panel {
  background:
    radial-gradient(circle at 10% 6%, rgba(74, 222, 128, .17), transparent 17rem),
    linear-gradient(168deg, #052e16 0%, #14532d 56%, #166534 100%) !important;
}

html.sgcrm-green-mode #sgcrm-root .sgcrm-sidebar-nav-item:hover,
#sgcrm-root.sgcrm-green-mode .sgcrm-sidebar-nav-item:hover {
  color: #101828 !important;
  background: #fff !important;
  border-color: rgba(255, 255, 255, .9) !important;
  box-shadow: 0 8px 20px rgba(5, 46, 22, .18) !important;
}

html.sgcrm-green-mode #sgcrm-root .sgcrm-sidebar-nav-item:hover > span,
#sgcrm-root.sgcrm-green-mode .sgcrm-sidebar-nav-item:hover > span {
  color: #101828 !important;
}

html.sgcrm-green-mode #sgcrm-root .sgcrm-sidebar-nav-item:hover .sgcrm-sidebar-nav-icon,
#sgcrm-root.sgcrm-green-mode .sgcrm-sidebar-nav-item:hover .sgcrm-sidebar-nav-icon {
  color: #166534 !important;
  background: #dcfce7 !important;
  border-color: #bbf7d0 !important;
}

html.sgcrm-green-mode #sgcrm-root .sgcrm-sidebar-panel[data-sgcrm-dark-sidebar] .sgcrm-sidebar-nav-item:hover {
  color: #101828 !important;
  background: #fff !important;
  border-color: rgba(255, 255, 255, .9) !important;
  box-shadow: 0 8px 20px rgba(5, 46, 22, .18) !important;
}

html.sgcrm-green-mode #sgcrm-root .sgcrm-sidebar-panel[data-sgcrm-dark-sidebar] .sgcrm-sidebar-nav-item:hover > span {
  color: #101828 !important;
}

html.sgcrm-green-mode #sgcrm-root .sgcrm-sidebar-panel[data-sgcrm-dark-sidebar] .sgcrm-sidebar-nav-item:hover .sgcrm-sidebar-nav-icon {
  color: #166534 !important;
  background: #dcfce7 !important;
  border-color: #bbf7d0 !important;
}

html.sgcrm-green-mode #sgcrm-root .sgcrm-sidebar-nav-item:has(> span[style*="rgb(22, 163, 74)"]),
html.sgcrm-green-mode #sgcrm-root .sgcrm-sidebar-nav-item[style*="background: rgb(10, 15, 22)"],
html.sgcrm-green-mode #sgcrm-root .sgcrm-sidebar-nav-item[style*="background:#0a0f16"],
#sgcrm-root.sgcrm-green-mode .sgcrm-sidebar-nav-item:has(> span[style*="rgb(22, 163, 74)"]),
#sgcrm-root.sgcrm-green-mode .sgcrm-sidebar-nav-item[style*="background: rgb(10, 15, 22)"],
#sgcrm-root.sgcrm-green-mode .sgcrm-sidebar-nav-item[style*="background:#0a0f16"] {
  color: #101828 !important;
  background: #fff !important;
  border-color: rgba(255, 255, 255, .96) !important;
  box-shadow: 0 9px 24px rgba(5, 46, 22, .22) !important;
}

html.sgcrm-green-mode #sgcrm-root .sgcrm-sidebar-nav-item:has(> span[style*="rgb(22, 163, 74)"]) > span,
html.sgcrm-green-mode #sgcrm-root .sgcrm-sidebar-nav-item[style*="background: rgb(10, 15, 22)"] > span,
html.sgcrm-green-mode #sgcrm-root .sgcrm-sidebar-nav-item[style*="background:#0a0f16"] > span,
#sgcrm-root.sgcrm-green-mode .sgcrm-sidebar-nav-item:has(> span[style*="rgb(22, 163, 74)"]) > span,
#sgcrm-root.sgcrm-green-mode .sgcrm-sidebar-nav-item[style*="background: rgb(10, 15, 22)"] > span,
#sgcrm-root.sgcrm-green-mode .sgcrm-sidebar-nav-item[style*="background:#0a0f16"] > span {
  color: #101828 !important;
}

html.sgcrm-green-mode #sgcrm-root .sgcrm-sidebar-nav-item:has(> span[style*="rgb(22, 163, 74)"]) .sgcrm-sidebar-nav-icon,
html.sgcrm-green-mode #sgcrm-root .sgcrm-sidebar-nav-item[style*="background: rgb(10, 15, 22)"] .sgcrm-sidebar-nav-icon,
html.sgcrm-green-mode #sgcrm-root .sgcrm-sidebar-nav-item[style*="background:#0a0f16"] .sgcrm-sidebar-nav-icon,
#sgcrm-root.sgcrm-green-mode .sgcrm-sidebar-nav-item:has(> span[style*="rgb(22, 163, 74)"]) .sgcrm-sidebar-nav-icon,
#sgcrm-root.sgcrm-green-mode .sgcrm-sidebar-nav-item[style*="background: rgb(10, 15, 22)"] .sgcrm-sidebar-nav-icon,
#sgcrm-root.sgcrm-green-mode .sgcrm-sidebar-nav-item[style*="background:#0a0f16"] .sgcrm-sidebar-nav-icon {
  color: #166534 !important;
  background: #dcfce7 !important;
  border-color: #bbf7d0 !important;
}

/* The dark-sidebar active rule includes the panel data attribute and therefore
   carries higher specificity than the generic theme selectors above. Mirror
   that structure here so Green always owns its active navigation state. */
html.sgcrm-green-mode #sgcrm-root .sgcrm-sidebar-panel[data-sgcrm-dark-sidebar] .sgcrm-sidebar-nav-item:has(> span[style*="rgb(22, 163, 74)"]),
html.sgcrm-green-mode #sgcrm-root .sgcrm-sidebar-panel[data-sgcrm-dark-sidebar] .sgcrm-sidebar-nav-item[style*="background: rgb(10, 15, 22)"],
html.sgcrm-green-mode #sgcrm-root .sgcrm-sidebar-panel[data-sgcrm-dark-sidebar] .sgcrm-sidebar-nav-item[style*="background:#0a0f16"] {
  color: #101828 !important;
  background: #fff !important;
  border-color: rgba(255, 255, 255, .96) !important;
  box-shadow: 0 9px 24px rgba(5, 46, 22, .22) !important;
}

html.sgcrm-green-mode #sgcrm-root .sgcrm-sidebar-panel[data-sgcrm-dark-sidebar] .sgcrm-sidebar-nav-item:has(> span[style*="rgb(22, 163, 74)"]) > span,
html.sgcrm-green-mode #sgcrm-root .sgcrm-sidebar-panel[data-sgcrm-dark-sidebar] .sgcrm-sidebar-nav-item[style*="background: rgb(10, 15, 22)"] > span,
html.sgcrm-green-mode #sgcrm-root .sgcrm-sidebar-panel[data-sgcrm-dark-sidebar] .sgcrm-sidebar-nav-item[style*="background:#0a0f16"] > span {
  color: #101828 !important;
}

html.sgcrm-green-mode #sgcrm-root .sgcrm-sidebar-panel[data-sgcrm-dark-sidebar] .sgcrm-sidebar-nav-item:has(> span[style*="rgb(22, 163, 74)"]) .sgcrm-sidebar-nav-icon,
html.sgcrm-green-mode #sgcrm-root .sgcrm-sidebar-panel[data-sgcrm-dark-sidebar] .sgcrm-sidebar-nav-item[style*="background: rgb(10, 15, 22)"] .sgcrm-sidebar-nav-icon,
html.sgcrm-green-mode #sgcrm-root .sgcrm-sidebar-panel[data-sgcrm-dark-sidebar] .sgcrm-sidebar-nav-item[style*="background:#0a0f16"] .sgcrm-sidebar-nav-icon {
  color: #166534 !important;
  background: #dcfce7 !important;
  border-color: #bbf7d0 !important;
}

html.sgcrm-green-mode #sgcrm-root :where(
  .sg-adaba-page-card-shell,
  .sg-adaba-page-card-body,
  .sg-adaba-shell,
  .sg-adaba-body,
  .sg-adaba-panel,
  .sg-adaba-kpi-card,
  .sg-adaba-kpi-strip,
  .sg-adaba-status-card,
  .sg-adaba-product-item,
  .sg-adaba-rank-item,
  .sg-settings-list,
  .sg-settings-list-item,
  .sg-pa-card,
  .sg-pa-kpi,
  .sg-pa-toolbar,
  .sg-pa-pagination,
  .sg-pa-empty
),
#sgcrm-root.sgcrm-green-mode :where(
  .sg-adaba-page-card-shell,
  .sg-adaba-page-card-body,
  .sg-adaba-shell,
  .sg-adaba-body,
  .sg-adaba-panel,
  .sg-adaba-kpi-card,
  .sg-adaba-kpi-strip,
  .sg-adaba-status-card,
  .sg-adaba-product-item,
  .sg-adaba-rank-item,
  .sg-settings-list,
  .sg-settings-list-item,
  .sg-pa-card,
  .sg-pa-kpi,
  .sg-pa-toolbar,
  .sg-pa-pagination,
  .sg-pa-empty
) {
  background: #fbfffc !important;
  border-color: var(--adaba-line) !important;
  box-shadow: var(--adaba-shadow-sm) !important;
}

html.sgcrm-green-mode #sgcrm-root :where(.sg-adaba-page-card-head, .sgcrm-mobile-topbar, .sgcrm-bottom-nav),
#sgcrm-root.sgcrm-green-mode :where(.sg-adaba-page-card-head, .sgcrm-mobile-topbar, .sgcrm-bottom-nav) {
  background: rgba(251, 255, 252, .97) !important;
  border-color: var(--adaba-line) !important;
}

html.sgcrm-green-mode #sgcrm-root .sg-adaba-head,
#sgcrm-root.sgcrm-green-mode .sg-adaba-head {
  color: #123524 !important;
  background:
    radial-gradient(circle at 95% 0, rgba(187, 247, 208, .55), transparent 17rem),
    linear-gradient(115deg, #f0fdf4, #dcfce7) !important;
  border-bottom-color: var(--adaba-line) !important;
}

html.sgcrm-green-mode #sgcrm-root .sg-adaba-head :where(.sg-adaba-title, h1, h2),
#sgcrm-root.sgcrm-green-mode .sg-adaba-head :where(.sg-adaba-title, h1, h2) {
  color: #123524 !important;
}

html.sgcrm-green-mode #sgcrm-root .sg-adaba-head :where(p, .sg-adaba-sub, .sg-adaba-subtitle),
#sgcrm-root.sgcrm-green-mode .sg-adaba-head :where(p, .sg-adaba-sub, .sg-adaba-subtitle) {
  color: #52715e !important;
}

html.sgcrm-green-mode #sgcrm-root :where(.sg-adaba-date-pill, .sg-adaba-head .sg-adaba-soft-pill),
#sgcrm-root.sgcrm-green-mode :where(.sg-adaba-date-pill, .sg-adaba-head .sg-adaba-soft-pill) {
  color: #14532d !important;
  background-color: rgba(255, 255, 255, .78) !important;
  border-color: #a7d8b7 !important;
}

html.sgcrm-green-mode #sgcrm-root .sg-adaba-kpi-card::before,
html.sgcrm-green-mode #sgcrm-root .sg-adaba-kpi-segment::after,
#sgcrm-root.sgcrm-green-mode .sg-adaba-kpi-card::before,
#sgcrm-root.sgcrm-green-mode .sg-adaba-kpi-segment::after {
  background: #16a34a !important;
}

html.sgcrm-green-mode #sgcrm-root :where(
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
  select,
  textarea
),
#sgcrm-root.sgcrm-green-mode :where(
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
  select,
  textarea
) {
  background-color: #fff !important;
  border-color: #b9ddc5 !important;
}

@media (max-width: 720px) {
  #sgcrm-root .sg-adaba-head {
    min-height: 100px;
    padding: 21px 20px !important;
  }

  #sgcrm-root .sg-adaba-title,
  #sgcrm-root .sg-adaba-dashboard .sg-adaba-title {
    font-size: 24px !important;
  }

  #sgcrm-root .sg-adaba-kpi-card,
  #sgcrm-root .sg-adaba-panel,
  #sgcrm-root .sg-adaba-page-card-shell {
    border-radius: 15px !important;
  }
}

/* Final cascade guard for the 3.5.3 shared modal contract. */
#sgcrm-root .sgcrm-modal-box {
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  max-height: min(90vh, 900px) !important;
}

#sgcrm-root .sgcrm-modal-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
}

/* Shared modal accessibility: legacy inline muted labels now meet WCAG AA,
 * while customer initials retain sufficient contrast across generated colors.
 */
#sgcrm-root .sgcrm-modal-box [style*="color: rgb(148, 163, 184)"],
#sgcrm-root .sgcrm-modal-box [style*="color:#94a3b8"],
#sgcrm-root .sgcrm-modal-box [style*="color: #94a3b8"] {
  color: #52677e !important;
}

#sgcrm-root .sgcrm-modal--order-details .sgcrm-order-detail-avatar {
  background: #047857 !important;
}

/* Compact financial calculation disclosure.
 * Replaces dense KPI-card paragraphs with an accessible information dot and
 * a structured popover that works with hover, keyboard focus, or mobile tap.
 */
#sgcrm-root .sgcrm-financial-info {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  margin-top: 3px;
  vertical-align: middle;
}

#sgcrm-root .sgcrm-financial-info:hover:not(.is-suppressed),
#sgcrm-root .sgcrm-financial-info.is-open {
  z-index: 10020;
}

#sgcrm-root .sgcrm-financial-info-trigger {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  padding: 0 !important;
  color: transparent !important;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 0 !important;
  line-height: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  cursor: help !important;
  transition: transform .16s ease !important;
}

#sgcrm-root .sgcrm-financial-info-trigger::before,
#sgcrm-root .sgcrm-financial-info-trigger::after {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

#sgcrm-root .sgcrm-financial-info-trigger::before {
  content: "";
  width: 13.5px;
  height: 13.5px;
  border-radius: 999px;
  background: #101828;
  box-shadow: 0 2px 6px rgba(16, 24, 40, .20);
  transition: background .16s ease, box-shadow .16s ease;
}

#sgcrm-root .sgcrm-financial-info-trigger::after {
  content: "i";
  color: #fff;
  font-size: 7.5px;
  font-weight: 850;
  line-height: 1;
}

#sgcrm-root .sgcrm-financial-info-trigger:hover {
  background: transparent !important;
  box-shadow: none !important;
  transform: translateY(-1px);
}

#sgcrm-root .sgcrm-financial-info-trigger:hover::before,
#sgcrm-root .sgcrm-financial-info-trigger:focus-visible::before {
  background: #0866ff;
  box-shadow: 0 3px 9px rgba(8, 102, 255, .28);
}

#sgcrm-root .sgcrm-financial-info-trigger:focus-visible {
  background: transparent !important;
  outline: 3px solid rgba(8, 102, 255, .24) !important;
  outline-offset: 2px !important;
}

#sgcrm-root .sgcrm-copy-order-button {
  flex: 0 0 auto;
  transition: transform .14s ease, border-color .14s ease, background .14s ease, box-shadow .14s ease !important;
}

#sgcrm-root .sgcrm-copy-order-button:hover {
  border-color: #86efac !important;
  background: #dcfce7 !important;
  box-shadow: 0 5px 13px rgba(22, 101, 52, .13);
  transform: translateY(-1px);
}

#sgcrm-root .sgcrm-copy-order-button:focus-visible {
  outline: 3px solid rgba(22, 163, 74, .22) !important;
  outline-offset: 2px !important;
}

#sgcrm-root .sgcrm-financial-info-popover {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10030;
  display: flex;
  flex-direction: column;
  gap: 7px;
  box-sizing: border-box;
  width: min(294px, calc(100vw - 20px));
  max-height: min(65vh, 440px);
  padding: 11px 12px;
  overflow-y: auto;
  color: #e8eef8 !important;
  text-align: left;
  white-space: normal;
  background: #101828;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 11px;
  box-shadow: 0 18px 46px rgba(0, 20, 53, .3), 0 6px 18px rgba(0, 20, 53, .2);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px) scale(.985);
  transform-origin: top center;
  transition: opacity .15s ease, transform .15s ease, visibility 0s linear .15s;
}

#sgcrm-root .sgcrm-financial-info:hover:not(.is-suppressed) .sgcrm-financial-info-popover,
#sgcrm-root .sgcrm-financial-info.is-open .sgcrm-financial-info-popover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  transition-delay: 0s;
}

#sgcrm-root .sgcrm-financial-info-popover[data-placement="top"] {
  transform-origin: bottom center;
}

#sgcrm-root .sgcrm-financial-info-title {
  display: block;
  padding-bottom: 7px;
  color: #fff !important;
  font-size: 11.5px !important;
  font-weight: 800 !important;
  line-height: 1.35 !important;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

#sgcrm-root .sgcrm-financial-info-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 7px;
  align-items: start;
}

#sgcrm-root .sgcrm-financial-info-label {
  color: #9dc9ff !important;
  font-size: 8.5px !important;
  font-weight: 800 !important;
  line-height: 1.4 !important;
  letter-spacing: .045em;
  text-transform: uppercase;
}

#sgcrm-root .sgcrm-financial-info-value {
  color: #e8eef8 !important;
  font-size: 9.5px !important;
  font-weight: 600 !important;
  line-height: 1.42 !important;
  overflow-wrap: anywhere;
}

#sgcrm-root .sgcrm-financial-info-formula {
  display: block;
  padding: 5px 6px;
  color: #fff !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  font-size: 9px !important;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 6px;
}

@media (max-width: 720px) {
  #sgcrm-root .sgcrm-financial-info-trigger {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    cursor: pointer !important;
  }

  #sgcrm-root .sgcrm-financial-info-trigger::before {
    width: 18px;
    height: 18px;
  }

  #sgcrm-root .sgcrm-financial-info-trigger::after {
    font-size: 9px;
  }

  #sgcrm-root .sgcrm-financial-info-popover {
    max-height: min(68dvh, 460px);
    padding: 12px;
  }

  #sgcrm-root .sgcrm-financial-info-row {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 7px;
  }
}

@media (max-width: 720px) {
  #sgcrm-root .sgcrm-modal-overlay {
    inset: 0 !important;
    padding: 0 !important;
    align-items: stretch !important;
  }

  #sgcrm-root .sgcrm-modal-box {
    width: 100vw !important;
    max-width: none !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
}
