body .crm-analytics-summary {
  gap: 10px;
  border: 0;
  background: transparent;
  overflow: visible;
}

/* Linkforme CRM shell ----------------------------------------------------- */
:root {
  --crm-black: #050505;
  --crm-card: #0a0a0a;
  --crm-raised: #141414;
  --crm-hover: #212121;
  --crm-border: #474747;
  --crm-text: #f5f5f5;
  --crm-muted: #9e9e9e;
  --crm-green: #34d399;
}

html:has(body.crm-dark),
body.crm-dark {
  background: var(--crm-black) !important;
  color-scheme: dark;
}

body.crm-dark {
  --pink: #f5f5f5;
  --pink-dark: #dedede;
  --ink: #f5f5f5;
  --muted: #9e9e9e;
  --soft: #141414;
  --blush: #141414;
  --line: #474747;
  --white: #050505;
  background: var(--crm-black) !important;
  color: var(--crm-text) !important;
}

body.crm-dark .crm-page,
body.crm-dark .crm-main,
body.crm-dark .crm-content {
  background: var(--crm-black) !important;
  color: var(--crm-text);
}

body.crm-dark .crm-page {
  display: flex;
  min-height: 100dvh;
  height: 100dvh;
  overflow: hidden;
}

body.crm-dark .crm-main {
  flex: 1 1 auto;
  min-width: 0;
  height: 100dvh;
  overflow-y: auto;
}

body.crm-dark .crm-sidebar {
  position: relative;
  inset: auto;
  flex: 0 0 248px;
  width: 248px;
  min-height: 100dvh;
  padding: 16px;
  border: 0;
  border-right: 1px solid var(--crm-border);
  border-radius: 0;
  background: var(--crm-black) !important;
  box-shadow: none;
}

body.crm-dark .crm-sidebar-brand {
  min-height: 44px;
  margin: 0 0 12px;
  padding: 0 0 12px;
  border-bottom: 1px solid #242424;
  color: var(--crm-text);
}

body.crm-dark .crm-sidebar-brand svg {
  width: auto;
  height: 34px;
  color: var(--crm-text);
}

body.crm-dark .crm-sidebar-brand > span {
  margin-left: auto;
  padding: 3px 7px;
  border: 1px solid #333;
  border-radius: 5px;
  color: #a3a3a3;
  background: transparent;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

body.crm-dark .crm-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0;
}

body.crm-dark .crm-sidebar-nav button,
body.crm-dark .crm-sidebar-footer button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 36px;
  padding: 0 12px;
  gap: 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  color: var(--crm-muted);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

body.crm-dark .crm-sidebar-nav button svg,
body.crm-dark .crm-sidebar-footer button svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
}

body.crm-dark .crm-sidebar-nav button:hover,
body.crm-dark .crm-sidebar-footer button:hover,
body.crm-dark .crm-sidebar-nav button.active {
  color: var(--crm-text);
  background: var(--crm-raised);
  transform: none;
}

body.crm-dark .crm-sidebar-nav button.active {
  box-shadow: none;
}

body.crm-dark .crm-sidebar-footer {
  margin-top: auto;
  padding-top: 12px;
  gap: 5px;
  border-top: 1px solid #242424;
}

body.crm-dark .crm-sidebar-footer .crm-language {
  width: 100%;
}

body.crm-dark .crm-theme-toggle {
  display: none !important;
}

body.crm-dark .crm-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  justify-content: flex-end;
  min-height: 61px;
  padding: 12px 32px;
  border: 0;
  border-bottom: 1px solid var(--crm-border);
  border-radius: 0;
  background: rgba(5, 5, 5, 0.94) !important;
  box-shadow: none;
  backdrop-filter: blur(12px);
}

body.crm-dark .crm-topbar > div:first-child {
  display: none;
}

body.crm-dark .crm-topbar-actions {
  gap: 8px;
}

body.crm-dark .crm-content {
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  padding: 24px 32px 48px;
}

body.crm-dark .crm-page-heading {
  align-items: flex-end;
  margin: 0 0 20px;
  gap: 16px;
}

body.crm-dark .crm-page-heading h2 {
  margin: 3px 0 0;
  color: var(--crm-text);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

body.crm-dark .section-kicker {
  color: #858585;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

body.crm-dark .crm-overview-text,
body.crm-dark .crm-page-heading p {
  color: var(--crm-muted);
  font-size: 14px;
  line-height: 1.5;
}

body.crm-dark :is(input, select, textarea) {
  border-color: var(--crm-border) !important;
  border-radius: 7px !important;
  background: var(--crm-black) !important;
  color: var(--crm-text) !important;
  box-shadow: none !important;
}

body.crm-dark :is(input, select, textarea):focus {
  border-color: #d4d4d4 !important;
  outline: 1px solid #d4d4d4;
  outline-offset: 0;
}

body.crm-dark :is(input, textarea)::placeholder {
  color: #686868;
}

body.crm-dark :is(.button, .crm-refresh, .crm-icon-button) {
  min-height: 36px;
  border-radius: 6px;
  box-shadow: none;
  font-size: 13px;
  font-weight: 600;
}

body.crm-dark .button--pink {
  border-color: #f5f5f5 !important;
  background: #f5f5f5 !important;
  color: #080808 !important;
}

body.crm-dark
  :is(.button--ghost, .button--soft, .crm-refresh, .crm-icon-button) {
  border: 1px solid var(--crm-border) !important;
  background: var(--crm-black) !important;
  color: #e5e5e5 !important;
}

body.crm-dark :is(.button, .crm-refresh, .crm-icon-button):hover {
  transform: none;
  filter: none;
}

body.crm-dark
  :is(.button--ghost, .button--soft, .crm-refresh, .crm-icon-button):hover {
  background: var(--crm-raised) !important;
}

body.crm-dark
  :is(
    .crm-dashboard-finance,
    .crm-table-card,
    .crm-chart-card,
    .crm-funnel-card,
    .crm-map-card,
    .crm-analytics-disclosure,
    .crm-settings-card,
    .crm-settings-disclosure,
    .crm-section-visibility,
    .crm-mailing-compose,
    .crm-mailing-history,
    .crm-finance-subscriptions,
    .crm-finance-categories,
    .crm-internal-notifications,
    .crm-region-card,
    .crm-editor,
    .crm-orders-card,
    .crm-payment-hub,
    .crm-builder-editor,
    .crm-builder-list,
    .crm-content-list > article,
    .crm-finance-metrics article,
    .crm-metrics article
  ) {
  border: 1px solid var(--crm-border) !important;
  border-radius: 10px !important;
  background: var(--crm-card) !important;
  box-shadow: none !important;
}

body.crm-dark :is(.crm-panel-title, .crm-table-heading, .crm-header) {
  min-height: 49px;
  padding: 12px 16px;
  border-color: #2b2b2b !important;
  background: transparent !important;
}

body.crm-dark :is(.crm-panel-title, .crm-table-heading, .crm-header) strong,
body.crm-dark .crm-panel-title > span {
  color: #eeeeee;
  font-size: 14px;
  font-weight: 600;
}

body.crm-dark :is(.crm-panel-title, .crm-table-heading, .crm-header) svg,
body.crm-dark :is(.crm-inline-link, .crm-user-name > svg, .crm-country > svg) {
  color: #c7c7c7 !important;
}

body.crm-dark .crm-metrics {
  gap: 10px;
}

body.crm-dark .crm-metrics article,
body.crm-dark .crm-finance-metrics article {
  min-height: 92px;
  padding: 14px 16px;
}

body.crm-dark .crm-metrics article strong,
body.crm-dark .crm-finance-metrics article strong {
  color: var(--crm-text);
  font-size: 23px;
  letter-spacing: -0.025em;
}

body.crm-dark .crm-metrics article span,
body.crm-dark .crm-finance-metrics article span {
  color: var(--crm-muted);
  font-size: 11px;
}

body.crm-dark :is(.crm-range-tabs, .crm-settings-tabs) {
  padding: 3px;
  border: 1px solid var(--crm-border);
  border-radius: 8px;
  background: var(--crm-black) !important;
}

body.crm-dark :is(.crm-range-tabs, .crm-settings-tabs) button {
  min-height: 31px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--crm-muted);
  box-shadow: none;
}

body.crm-dark :is(.crm-range-tabs, .crm-settings-tabs) button.active {
  background: var(--crm-raised) !important;
  color: var(--crm-text) !important;
}

body.crm-dark .crm-table-wrap {
  border-radius: 0 0 10px 10px;
}

body.crm-dark .crm-table {
  color: #e5e5e5;
}

body.crm-dark .crm-table th {
  padding: 11px 16px;
  border-color: #292929;
  background: #080808 !important;
  color: #8d8d8d;
  font-size: 10px;
  letter-spacing: 0.08em;
}

body.crm-dark .crm-table td {
  padding: 12px 16px;
  border-color: #242424 !important;
  color: #dedede;
}

body.crm-dark .crm-table tr:hover td {
  background: #101010 !important;
}

body.crm-dark
  :is(
    .crm-settings-step,
    .crm-settings-subsection,
    .crm-provider-settings,
    .crm-finance-editor,
    .crm-recurring-help,
    .crm-fee-policy,
    .crm-content-toolbar,
    .crm-category-group,
    .crm-pet-detail-block,
    .crm-builder-note,
    .crm-apple-pay-domains,
    .crm-finance-notice,
    .crm-breakdown-card,
    .crm-geo-ranking
  ) {
  border-color: #323232 !important;
  border-radius: 8px !important;
  background: #0d0d0d !important;
  box-shadow: none !important;
}

body.crm-dark :is(.crm-error, .crm-empty, .crm-analytics-empty, .crm-loading) {
  border-color: #383838 !important;
  background: var(--crm-card) !important;
  color: #cfcfcf !important;
}

body.crm-dark :is(.crm-status, .crm-content-state, .crm-campaign-state) {
  border-radius: 999px;
  box-shadow: none;
}

body.crm-dark .crm-world-map {
  background: #020806 !important;
}

body.crm-dark .crm-map-land path {
  fill: rgba(255, 255, 255, 0.05);
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 0.7;
  transition: fill 0.18s ease;
}

body.crm-dark .crm-map-land path.active {
  stroke: rgba(110, 231, 183, 0.52);
}

body.crm-dark .crm-map-land path:hover {
  fill: rgba(52, 211, 153, 0.74) !important;
}

body.crm-dark .crm-map-legend {
  color: #b8c8c0;
}

body.crm-dark .crm-map-legend small {
  color: #668175;
}

body.crm-dark .crm-traffic-chart {
  border-color: #222 !important;
  background: #070909 !important;
}

body.crm-dark .crm-traffic-chart::before {
  opacity: 0.45;
}

body.crm-dark .crm-analytics-summary--priority article:nth-child(6),
body.crm-dark .crm-analytics-summary--secondary article:nth-child(6) {
  border-color: rgba(45, 212, 191, 0.32);
  background: linear-gradient(145deg, rgba(45, 212, 191, 0.12), #0d1514 74%);
}

body.crm-dark
  .crm-analytics-summary--priority
  article:nth-child(6)
  > :is(svg, strong),
body.crm-dark
  .crm-analytics-summary--secondary
  article:nth-child(6)
  > :is(svg, strong) {
  color: #5eead4;
}

body.crm-dark :is(.crm-toasts, .crm-toast) {
  border-color: var(--crm-border) !important;
  background: var(--crm-card) !important;
  color: var(--crm-text) !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45) !important;
}

.crm-bottom-nav,
.crm-mobile-menu {
  display: none;
}

body.crm-dark .crm-login {
  background: var(--crm-black) !important;
}

body.crm-dark .crm-login-card {
  border: 1px solid var(--crm-border) !important;
  border-radius: 10px !important;
  background: var(--crm-card) !important;
  color: var(--crm-text);
  box-shadow: none !important;
}

@media (max-width: 1023px) {
  body.crm-dark .crm-sidebar {
    display: none !important;
  }

  body.crm-dark .crm-page {
    display: block;
  }

  body.crm-dark .crm-main {
    width: 100%;
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }

  body.crm-dark .crm-topbar {
    min-height: 61px;
    padding: 10px 16px;
    justify-content: space-between;
  }

  body.crm-dark .crm-topbar > div:first-child {
    display: block;
    min-width: 0;
  }

  body.crm-dark .crm-topbar .section-kicker {
    display: none;
  }

  body.crm-dark .crm-topbar h1 {
    overflow: hidden;
    margin: 0;
    color: var(--crm-text);
    font-size: 17px;
    font-weight: 600;
    line-height: 36px;
    letter-spacing: -0.02em;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.crm-dark .crm-mobile-language,
  body.crm-dark .crm-mobile-logout {
    display: none !important;
  }

  body.crm-dark .crm-content {
    padding: 20px 16px 32px;
  }

  body.crm-dark .crm-bottom-nav {
    position: fixed;
    z-index: 650;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    height: calc(64px + env(safe-area-inset-bottom));
    padding: 4px 4px env(safe-area-inset-bottom);
    border-top: 1px solid var(--crm-border);
    background: rgba(5, 5, 5, 0.98);
    backdrop-filter: blur(14px);
  }

  body.crm-dark .crm-bottom-nav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    gap: 3px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #848484;
    font-size: 10px;
    font-weight: 500;
  }

  body.crm-dark .crm-bottom-nav button svg {
    width: 19px;
    height: 19px;
  }

  body.crm-dark .crm-bottom-nav button span {
    overflow: hidden;
    max-width: 100%;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.crm-dark .crm-bottom-nav button.active {
    color: var(--crm-text);
    background: var(--crm-raised);
  }

  body.crm-dark .crm-mobile-menu {
    position: fixed;
    z-index: 640;
    inset: 0 0 calc(64px + env(safe-area-inset-bottom));
    display: block;
  }

  body.crm-dark .crm-mobile-menu-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    border: 0;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(3px);
  }

  body.crm-dark .crm-mobile-menu-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: min(74dvh, 650px);
    overflow-y: auto;
    padding: 14px;
    border-top: 1px solid var(--crm-border);
    background: var(--crm-black);
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.6);
  }

  body.crm-dark .crm-mobile-menu-panel > header,
  body.crm-dark .crm-mobile-menu-panel > footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  body.crm-dark .crm-mobile-menu-panel > header {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #292929;
  }

  body.crm-dark .crm-mobile-menu-panel > header strong {
    font-size: 15px;
    font-weight: 600;
  }

  body.crm-dark .crm-mobile-menu-panel > header button {
    width: 34px;
    height: 34px;
    border: 1px solid var(--crm-border);
    border-radius: 6px;
    background: var(--crm-card);
    color: var(--crm-text);
    font-size: 22px;
  }

  body.crm-dark .crm-mobile-menu-panel > nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  body.crm-dark .crm-mobile-menu-panel > nav button,
  body.crm-dark .crm-mobile-menu-panel > footer button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 42px;
    padding: 0 12px;
    gap: 9px;
    border: 1px solid transparent;
    border-radius: 7px;
    background: var(--crm-card);
    color: var(--crm-muted);
    font-size: 13px;
    font-weight: 500;
  }

  body.crm-dark .crm-mobile-menu-panel > nav button.active {
    border-color: #343434;
    background: var(--crm-raised);
    color: var(--crm-text);
  }

  body.crm-dark .crm-mobile-menu-panel > nav button svg,
  body.crm-dark .crm-mobile-menu-panel > footer button svg {
    width: 17px;
    height: 17px;
  }

  body.crm-dark .crm-mobile-menu-panel > footer {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #292929;
  }
}

@media (max-width: 640px) {
  body.crm-dark .crm-content {
    padding: 18px 12px 28px;
  }

  body.crm-dark .crm-page-heading {
    display: block;
    margin-bottom: 16px;
  }

  body.crm-dark .crm-page-heading h2 {
    font-size: 23px;
  }

  body.crm-dark .crm-page-heading > :last-child {
    margin-top: 9px;
  }

  body.crm-dark .crm-metrics,
  body.crm-dark .crm-finance-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body.crm-dark .crm-metrics article,
  body.crm-dark .crm-finance-metrics article {
    min-height: 86px;
    padding: 12px;
  }

  body.crm-dark .crm-table th,
  body.crm-dark .crm-table td {
    padding-right: 12px;
    padding-left: 12px;
  }
}

.crm-analytics-summary--priority {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.crm-analytics-summary--secondary {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: -6px;
}

.crm-analytics-summary article {
  position: relative;
  min-height: 132px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: #111214;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.crm-analytics-summary article:last-child {
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.crm-analytics-summary--priority article {
  min-height: 148px;
  padding: 20px;
}

.crm-analytics-summary article > svg {
  margin-bottom: 18px;
}

.crm-analytics-summary article > span {
  color: #91979f;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.crm-analytics-summary article > strong {
  color: #f5f7fa;
  font-size: 25px;
}

.crm-analytics-summary--priority article > strong {
  font-size: clamp(30px, 3vw, 40px);
}

.crm-analytics-summary article > small {
  color: #8a9199;
  font-size: 8px;
}

.crm-analytics-summary--priority article:nth-child(1) {
  border-color: rgba(52, 211, 153, 0.36);
  background: linear-gradient(145deg, rgba(52, 211, 153, 0.14), #0e1512 74%);
}
.crm-analytics-summary--priority article:nth-child(1) > :is(svg, strong) {
  color: #6ee7b7;
}
.crm-analytics-summary--priority article:nth-child(2) {
  border-color: rgba(34, 211, 238, 0.35);
  background: linear-gradient(145deg, rgba(34, 211, 238, 0.13), #0c1416 74%);
}
.crm-analytics-summary--priority article:nth-child(2) > :is(svg, strong) {
  color: #67e8f9;
}
.crm-analytics-summary--priority article:nth-child(3) {
  border-color: rgba(96, 165, 250, 0.35);
  background: linear-gradient(145deg, rgba(96, 165, 250, 0.14), #0d121a 74%);
}
.crm-analytics-summary--priority article:nth-child(3) > :is(svg, strong) {
  color: #93c5fd;
}
.crm-analytics-summary--priority article:nth-child(4) {
  border-color: rgba(167, 139, 250, 0.36);
  background: linear-gradient(145deg, rgba(167, 139, 250, 0.14), #121019 74%);
}
.crm-analytics-summary--priority article:nth-child(4) > :is(svg, strong) {
  color: #c4b5fd;
}
.crm-analytics-summary--priority article:nth-child(5) {
  border-color: rgba(251, 191, 36, 0.35);
  background: linear-gradient(145deg, rgba(251, 191, 36, 0.13), #17130b 74%);
}
.crm-analytics-summary--priority article:nth-child(5) > :is(svg, strong) {
  color: #fcd34d;
}
.crm-analytics-summary--priority article:nth-child(6) {
  border-color: rgba(244, 114, 182, 0.34);
  background: linear-gradient(145deg, rgba(244, 114, 182, 0.13), #170e14 74%);
}
.crm-analytics-summary--priority article:nth-child(6) > :is(svg, strong) {
  color: #f9a8d4;
}

.crm-analytics-summary--secondary article:nth-child(1) > :is(svg, strong) {
  color: #a78bfa;
}
.crm-analytics-summary--secondary article:nth-child(2) > :is(svg, strong) {
  color: #fbbf24;
}
.crm-analytics-summary--secondary article:nth-child(3) > :is(svg, strong) {
  color: #fb7185;
}
.crm-analytics-summary--secondary article:nth-child(4) > :is(svg, strong) {
  color: #22d3ee;
}
.crm-analytics-summary--secondary article:nth-child(5) > :is(svg, strong) {
  color: #34d399;
}
.crm-analytics-summary--secondary article:nth-child(6) > :is(svg, strong) {
  color: #f9a8d4;
}
.crm-analytics-summary--secondary article:nth-child(6) > strong {
  overflow: visible;
  white-space: normal;
  font-size: 16px;
  line-height: 1.2;
}

.crm-chart-card,
.crm-funnel-card,
.crm-analytics-map .crm-map-card,
.crm-analytics-disclosure {
  border-color: rgba(255, 255, 255, 0.13);
  background: #0d0e10;
  color: #f5f7fa;
}

.crm-chart-card .crm-panel-title,
.crm-funnel-card .crm-panel-title,
.crm-map-card .crm-panel-title {
  border-color: rgba(255, 255, 255, 0.1);
}

.crm-traffic-chart > div {
  border-color: rgba(255, 255, 255, 0.12);
}
.crm-traffic-chart i {
  background: #a78bfa;
}
.crm-traffic-chart b {
  background: #34d399;
  opacity: 0.82;
}
.crm-funnel-list i {
  background: linear-gradient(90deg, #34d399, #a78bfa);
}
.crm-funnel-list span {
  color: #a2a7af;
}
.crm-world-map {
  background: linear-gradient(145deg, #020806, #07110d);
}
.crm-map-land {
  fill: #0f1d17;
  stroke: #355347;
}
.crm-map-land path:hover {
  fill: #173a2b;
}
.crm-map-point circle:not(.pulse) {
  fill: #34d399;
  stroke: #d1fae5;
}
.crm-map-point circle.pulse {
  fill: rgba(52, 211, 153, 0.2);
}
.crm-map-legend i {
  background: #34d399;
  box-shadow: 0 0 0 5px rgba(52, 211, 153, 0.12);
}

.crm-analytics-disclosure > summary > span {
  color: #f2f4f7;
}
.crm-analytics-disclosure > summary > span svg {
  color: #6ee7b7;
}
.crm-analytics-disclosure[open] > summary {
  border-color: rgba(255, 255, 255, 0.1);
}
.crm-compact-breakdown article > i {
  background: #25282d;
}
.crm-compact-breakdown article > i > span {
  background: #6ee7b7;
}

@media (max-width: 980px) {
  .crm-analytics-summary--priority {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .crm-analytics-summary--secondary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .crm-analytics-summary {
    gap: 8px;
  }
  .crm-analytics-summary--priority,
  .crm-analytics-summary--secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .crm-analytics-summary article,
  .crm-analytics-summary--priority article {
    min-height: 118px;
    padding: 13px;
  }
  .crm-analytics-summary--priority article > strong {
    font-size: 27px;
  }
  .crm-analytics-summary article > strong {
    font-size: 20px;
  }
  .crm-analytics-summary article > span {
    white-space: normal;
    line-height: 1.3;
  }
  .crm-analytics-wide-grid {
    grid-template-columns: 1fr;
  }
  .crm-traffic-chart {
    min-width: 560px;
  }
  .crm-chart-card {
    overflow-x: auto;
  }
  .crm-analytics-detail-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

/* Final specificity pass for legacy pink/white CRM controls. */
body.crm-dark .crm-sidebar-brand .brand-name,
body.crm-dark .crm-sidebar-brand .brand-name > span {
  color: #f5f5f5 !important;
}

body.crm-dark .crm-language {
  border-color: var(--crm-border) !important;
  border-radius: 8px;
  background: #0a0a0a !important;
  box-shadow: none !important;
}

body.crm-dark .crm-language > span,
body.crm-dark .crm-language button {
  color: #8d8d8d !important;
}

body.crm-dark .crm-language button:hover,
body.crm-dark .crm-language button.active {
  border-radius: 6px;
  background: #212121 !important;
  color: #f5f5f5 !important;
  box-shadow: none !important;
}

body.crm-dark :is(.crm-provider-options, .crm-checkout-mode-options) button {
  border-color: #353535 !important;
  border-radius: 8px;
  background: #0a0a0a !important;
  color: #e5e5e5 !important;
  box-shadow: none !important;
}

body.crm-dark
  :is(.crm-provider-options, .crm-checkout-mode-options)
  button:not(:disabled):hover,
body.crm-dark
  :is(.crm-provider-options, .crm-checkout-mode-options)
  button.active {
  border-color: #777 !important;
  background: #171717 !important;
  transform: none;
}

body.crm-dark
  :is(.crm-provider-options, .crm-checkout-mode-options)
  button
  > span {
  border: 1px solid #303030;
  border-radius: 7px;
  background: #141414 !important;
  color: #d8d8d8 !important;
}

body.crm-dark :is(.crm-provider-options, .crm-checkout-mode-options) button i {
  border-color: #666 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.crm-dark
  :is(.crm-provider-options, .crm-checkout-mode-options)
  button.active
  i {
  border-color: #d4d4d4 !important;
  background: #d4d4d4 !important;
}

body.crm-dark .crm-current-key {
  border-color: #393939 !important;
  border-radius: 7px;
  background: #090909 !important;
}

body.crm-dark .crm-current-key code {
  color: #b7b7b7 !important;
}

body.crm-dark .crm-apple-pay-status {
  border-color: #353535 !important;
  border-radius: 8px;
  background: #0a0a0a !important;
  color: #aaa !important;
}

body.crm-dark .crm-apple-pay-status strong {
  color: #dedede !important;
}

body.crm-dark .crm-apple-pay-domains code {
  border-color: #363636 !important;
  background: #141414 !important;
  color: #c5c5c5 !important;
}

body.crm-dark
  :is(.crm-status, .crm-content-state.published, .crm-campaign-state.open) {
  background: #0b2417 !important;
  color: #6ee7b7 !important;
}

body.crm-dark
  :is(.crm-content-state, .crm-campaign-state, .crm-content-featured) {
  border: 1px solid #353535;
  background: #171717;
  color: #bdbdbd;
}

body.crm-dark :is(.crm-campaign-state.closed, .crm-email-pending) {
  border-color: #55431e !important;
  background: #211909 !important;
  color: #f4cf77 !important;
}

/* Tracking Links parity: compact metrics and split geography card. */
body.crm-dark .crm-analytics-summary--priority {
  gap: 12px;
  margin-bottom: 16px;
}

body.crm-dark .crm-analytics-summary--priority article {
  min-height: 132px;
  padding: 16px 20px;
  border-radius: 12px !important;
}

body.crm-dark .crm-analytics-summary .crm-metric-label {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: visible;
  white-space: normal;
  line-height: 1.3;
}

body.crm-dark .crm-analytics-summary .crm-metric-label > i {
  display: block;
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 14px currentColor;
}

body.crm-dark .crm-analytics-summary--priority article > strong {
  margin-top: 12px;
  font-size: 36px;
  line-height: 1;
}

body.crm-dark .crm-analytics-summary--priority article > small {
  margin-top: 9px;
  font-size: 11px;
  line-height: 1.35;
}

body.crm-dark
  .crm-analytics-summary--priority
  article:nth-child(1)
  .crm-metric-label {
  color: #6ee7b7;
}
body.crm-dark
  .crm-analytics-summary--priority
  article:nth-child(2)
  .crm-metric-label {
  color: #67e8f9;
}
body.crm-dark
  .crm-analytics-summary--priority
  article:nth-child(3)
  .crm-metric-label {
  color: #93c5fd;
}
body.crm-dark
  .crm-analytics-summary--priority
  article:nth-child(4)
  .crm-metric-label {
  color: #c4b5fd;
}
body.crm-dark
  .crm-analytics-summary--priority
  article:nth-child(5)
  .crm-metric-label {
  color: #fcd34d;
}
body.crm-dark
  .crm-analytics-summary--priority
  article:nth-child(6)
  .crm-metric-label {
  color: #5eead4;
}

body.crm-dark .crm-analytics-summary--secondary {
  gap: 8px;
  margin-top: 0;
  margin-bottom: 20px;
}

body.crm-dark .crm-analytics-summary--secondary article {
  justify-content: flex-start;
  min-height: 86px;
  padding: 10px 12px;
  border-color: var(--crm-border) !important;
  border-radius: 8px !important;
  background: rgba(10, 10, 10, 0.72) !important;
}

body.crm-dark .crm-analytics-summary--secondary .crm-metric-label > i {
  display: none;
}

body.crm-dark .crm-analytics-summary--secondary article > strong {
  margin-top: 5px;
  font-size: 18px;
  line-height: 1.1;
}

body.crm-dark .crm-analytics-summary--secondary article > small {
  margin-top: 5px;
  font-size: 9px;
  line-height: 1.25;
}

body.crm-dark .crm-map-card {
  overflow: hidden;
  border-color: rgba(52, 211, 153, 0.2) !important;
}

body.crm-dark .crm-map-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid #2b2b2b;
}

body.crm-dark .crm-map-header strong {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #eeeeee;
  font-size: 14px;
  font-weight: 600;
}

body.crm-dark .crm-map-header strong svg {
  width: 16px;
  height: 16px;
  color: #6ee7b7;
}

body.crm-dark .crm-map-header p {
  margin: 5px 0 0;
  color: var(--crm-muted);
  font-size: 12px;
  line-height: 1.45;
}

body.crm-dark .crm-map-count {
  flex: none;
  padding: 4px 9px;
  border: 1px solid #3a3a3a;
  border-radius: 999px;
  color: #b7b7b7;
  font-size: 10px;
  line-height: 1.2;
}

body.crm-dark .crm-map-content {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
  gap: 20px;
  padding: 24px;
}

body.crm-dark .crm-map-content .crm-world-map {
  align-self: start;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-radius: 8px;
  background: #020806 !important;
}

body.crm-dark .crm-map-content .crm-world-map svg {
  width: 100%;
  height: auto;
  max-height: none;
}

body.crm-dark .crm-map-country-column {
  display: grid;
  align-content: start;
  min-width: 0;
  gap: 8px;
}

body.crm-dark .crm-map-country-column ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

body.crm-dark .crm-map-country-column ol.expanded {
  max-height: 360px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

body.crm-dark .crm-map-country-column li {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 42px;
  gap: 12px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-bottom-color: #292929;
  border-radius: 6px;
  font-size: 14px;
}

body.crm-dark .crm-map-country-column li:nth-child(-n + 3) {
  border-color: rgba(52, 211, 153, 0.25);
  background: rgba(52, 211, 153, 0.1);
}

body.crm-dark .crm-map-country-column li > b {
  flex: 0 0 20px;
  color: #858585;
  font-size: 11px;
  font-weight: 500;
}

body.crm-dark .crm-map-country-column li > i {
  flex: 0 0 auto;
  font-size: 20px;
  font-style: normal;
  line-height: 1;
}

body.crm-dark .crm-map-country-column li > span {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
  gap: 7px;
}

body.crm-dark .crm-map-country-column li > span strong {
  overflow: hidden;
  color: #e5e5e5;
  font-size: 13px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.crm-dark .crm-map-country-column li > span small {
  flex: none;
  color: #7f7f7f;
  font-size: 10px;
}

body.crm-dark .crm-map-country-column li > em {
  color: #6ee7b7;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

body.crm-dark .crm-map-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 36px;
  gap: 7px;
  border: 1px solid var(--crm-border);
  border-radius: 6px;
  background: var(--crm-black);
  color: #d4d4d4;
  font-size: 12px;
  font-weight: 600;
}

body.crm-dark .crm-map-toggle:hover {
  background: var(--crm-raised);
}

body.crm-dark .crm-map-toggle svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

body.crm-dark .crm-map-toggle svg.expanded {
  transform: rotate(180deg);
}

body.crm-dark .crm-map-empty {
  display: grid;
  min-height: 160px;
  margin: 0;
  place-items: center;
  color: var(--crm-muted);
  font-size: 13px;
  text-align: center;
}

@keyframes crm-dashboard-geo-scroll {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

body.crm-dark .crm-dashboard-geo-ticker {
  display: flex;
  min-height: 42px;
  margin: 12px 0;
  overflow: hidden;
  border: 1px solid var(--crm-border);
  border-radius: 10px;
  background: rgba(10, 10, 10, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

body.crm-dark .crm-dashboard-geo-label {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding: 0 13px;
  border-right: 1px solid var(--crm-border);
  background: var(--crm-black);
  color: #6ee7b7;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

body.crm-dark .crm-dashboard-geo-label svg {
  width: 14px;
  height: 14px;
}

body.crm-dark .crm-dashboard-geo-label::after {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #34d399;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.75);
  content: "";
}

body.crm-dark .crm-dashboard-geo-viewport {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  overflow: hidden;
  mask-image: linear-gradient(
    to right,
    transparent,
    black 20px,
    black calc(100% - 20px),
    transparent
  );
}

body.crm-dark .crm-dashboard-geo-track {
  display: flex;
  width: max-content;
  will-change: transform;
  animation: crm-dashboard-geo-scroll var(--crm-dashboard-geo-duration, 48s)
    linear infinite;
}

body.crm-dark .crm-dashboard-geo-ticker:hover .crm-dashboard-geo-track {
  animation-play-state: paused;
}

body.crm-dark .crm-dashboard-geo-group {
  display: flex;
  flex: none;
  align-items: center;
  gap: 24px;
  padding-right: 24px;
}

body.crm-dark .crm-dashboard-geo-item {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 7px;
  color: #ededed;
  font-size: 11px;
  white-space: nowrap;
}

body.crm-dark .crm-dashboard-geo-item > i {
  font-size: 16px;
  font-style: normal;
}

body.crm-dark .crm-dashboard-geo-item strong {
  font-size: 12px;
  font-weight: 650;
}

body.crm-dark .crm-dashboard-geo-item > span,
body.crm-dark .crm-dashboard-geo-item > small {
  color: var(--crm-muted);
  font-size: 11px;
}

body.crm-dark .crm-dashboard-geo-item > small {
  display: inline-block;
  overflow: hidden;
  max-width: 224px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.crm-dark .crm-dashboard-geo-empty {
  padding: 0 16px;
  color: var(--crm-muted);
  font-size: 11px;
}

@media (max-width: 1023px) {
  body.crm-dark .crm-map-content {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }
}

@media (max-width: 640px) {
  body.crm-dark .crm-analytics-summary--priority article {
    min-height: 116px;
    padding: 14px 16px;
  }

  body.crm-dark .crm-analytics-summary--priority article > strong {
    font-size: 30px;
  }

  body.crm-dark .crm-analytics-summary--secondary article {
    min-height: 82px;
    padding: 9px 10px;
  }

  body.crm-dark .crm-map-header {
    padding: 12px;
  }

  body.crm-dark .crm-map-header p {
    font-size: 10px;
  }

  body.crm-dark .crm-map-content {
    gap: 12px;
    padding: 12px;
  }

  body.crm-dark .crm-dashboard-geo-ticker {
    min-height: 39px;
    margin: 10px 0;
  }

  body.crm-dark .crm-dashboard-geo-label {
    padding: 0 10px;
  }

  body.crm-dark .crm-dashboard-geo-label > span,
  body.crm-dark .crm-dashboard-geo-item > small {
    display: none;
  }

  body.crm-dark .crm-dashboard-geo-group {
    gap: 18px;
    padding-right: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.crm-dark .crm-dashboard-geo-track {
    animation: none;
  }

  body.crm-dark .crm-dashboard-geo-viewport {
    overflow-x: auto;
  }
}

/* Linkforme keeps analytics breakdowns visible in a two-column card grid. */
body.crm-dark .crm-analytics-disclosures {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
  margin-top: 20px;
}

body.crm-dark .crm-analytics-disclosure {
  align-self: start;
  border-radius: 10px !important;
}

body.crm-dark .crm-analytics-disclosure > summary {
  min-height: 49px;
  padding: 0 16px;
}

body.crm-dark .crm-analytics-disclosure > div {
  padding: 16px;
}

body.crm-dark .crm-analytics-disclosure .crm-analytics-detail-grid {
  gap: 20px;
}

@media (max-width: 1023px) {
  body.crm-dark .crm-analytics-disclosures {
    grid-template-columns: 1fr;
  }
}
