/* TradeLead AI visual reset: product-first marketing and a lighter CRM shell. */
.ui-v4 {
  --v4-bg: #f1f3f1;
  --v4-surface-soft: #f7f8f6;
  --v4-surface-muted: #eaeeeb;
  --v4-line: #d8ded9;
  --v4-line-strong: #c6cec9;
  --v4-ink: #17201c;
  --v4-copy: #3b4942;
  --v4-muted: #737f79;
  --v4-brand: #0b6b55;
  --v4-brand-dark: #075341;
  --v4-brand-soft: #e5f0eb;
  background: var(--v4-bg);
}

/* Two-step sign-in */
.ui-v4 .auth-remember {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--v4-copy);
  cursor: pointer;
}
.ui-v4 .auth-remember input {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 2px 0 0;
  padding: 0;
  accent-color: var(--v4-brand);
}
.ui-v4 .auth-remember > span,
.ui-v4 .auth-remember strong,
.ui-v4 .auth-remember small { display: block; }
.ui-v4 .auth-remember strong { color: var(--v4-copy); font-size: 11px; line-height: 1.35; }
.ui-v4 .auth-remember small { margin-top: 2px; color: var(--v4-muted); font-size: 9px; font-weight: 500; }
.ui-v4 .auth-code-heading {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid #d4e2dc;
  border-radius: 7px;
  background: #f3f8f5;
}
.ui-v4 .auth-code-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 7px;
  color: #fff;
  background: var(--v4-brand);
}
.ui-v4 .auth-code-icon svg { width: 22px; height: 22px; }
.ui-v4 .auth-code-heading > div > span { color: var(--v4-brand); font-size: 10px; font-weight: 800; }
.ui-v4 .auth-code-heading h2 { margin: 3px 0 0; color: var(--v4-ink); font-size: 20px; }
.ui-v4 .auth-code-heading p { margin: 5px 0 0; color: var(--v4-muted); font-size: 11px; line-height: 1.55; }
.ui-v4 .auth-code-field input {
  height: 54px;
  font-size: 24px;
  font-weight: 750;
  letter-spacing: .34em;
  text-align: center;
}
.ui-v4 .auth-code-field input::placeholder { letter-spacing: .34em; }
.ui-v4 .auth-code-resend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 30px;
  color: var(--v4-muted);
  font-size: 10px;
}
.ui-v4 .auth-code-resend button:disabled {
  color: #9aa39f !important;
  cursor: not-allowed;
  text-decoration: none !important;
}

/* Marketing first viewport */
.ui-v4 .marketing-nav {
  min-height: 68px;
  padding: 0 clamp(22px, 4vw, 68px);
  border-bottom-color: #d7ddd8;
  background: rgba(249, 250, 248, .97);
  box-shadow: 0 1px 0 rgba(22, 32, 28, .03);
}

.ui-v4 .marketing-brand .brand-mark { width: 36px; height: 36px; }
.ui-v4 .marketing-brand strong { color: #17201c; font-size: 13px; }
.ui-v4 .marketing-brand small { color: #7b8680; }
.ui-v4 .marketing-nav > nav a { padding-top: 25px; padding-bottom: 23px; color: #53605a; font-size: 11px; }
.ui-v4 .marketing-nav > nav a::after { bottom: 17px; }
.ui-v4 .marketing-nav-actions button { min-height: 36px; }

.ui-v4 .marketing-hero {
  height: min(660px, calc(100dvh - 150px));
  min-height: 520px;
  background: #0a1d17;
}

.ui-v4 .marketing-hero::after {
  display: none;
}

.ui-v4 .marketing-hero-image {
  opacity: 1;
  filter: saturate(.78) contrast(.92) brightness(.86);
  object-position: 56% center;
  transform: scale(1.015);
  animation: heroBackgroundDrift 18s ease-in-out infinite alternate;
}

.ui-v4 .marketing-hero-shade { z-index: 1; background: rgba(5, 19, 15, .36); }

.ui-v4 .marketing-main > section[id] { scroll-margin-top: 82px; }

.ui-v4 .marketing-hero-scene {
  position: absolute;
  z-index: 3;
  top: 30px;
  right: clamp(20px, 3vw, 46px);
  bottom: 34px;
  left: 52%;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

.ui-v4 .hero-workspace {
  position: absolute;
  z-index: 3;
  top: 28px;
  right: 0;
  bottom: 22px;
  left: 0;
  overflow: hidden;
  border: 1px solid #bac5bf;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 20px 48px rgba(11, 29, 22, .24), 0 3px 10px rgba(11, 29, 22, .12);
  animation: heroWorkspaceIn .8s cubic-bezier(.2, .75, .22, 1) both;
}

.ui-v4 .hero-workspace-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  padding: 0 17px;
  border-bottom: 1px solid #dce2de;
  background: #fafbfa;
}

.ui-v4 .hero-workspace-bar > div,
.ui-v4 .hero-sync-state { display: flex; align-items: center; gap: 8px; }
.ui-v4 .hero-workspace-bar strong { color: #2a3731; font-size: 10px; }
.ui-v4 .hero-window-dot { width: 7px; height: 7px; border-radius: 50%; background: #247b64; }
.ui-v4 .hero-sync-state { color: #7d8983; font-size: 8px; font-weight: 700; }
.ui-v4 .hero-sync-state i { width: 6px; height: 6px; border-radius: 50%; background: #24916e; animation: marketingSignal 1.7s ease-in-out infinite; }

.ui-v4 .hero-workspace-body {
  display: grid;
  grid-template-columns: 48px minmax(390px, 1fr);
  height: calc(100% - 50px);
}

.ui-v4 .hero-workspace-nav {
  display: grid;
  grid-auto-rows: 38px;
  align-content: start;
  justify-items: center;
  gap: 5px;
  padding-top: 14px;
  border-right: 1px solid #dce2de;
  background: #17231e;
}

.ui-v4 .hero-workspace-nav span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 5px; color: #93a19a; }
.ui-v4 .hero-workspace-nav span.active { color: #d8f2e8; background: #294037; }
.ui-v4 .hero-workspace-nav svg { width: 14px; height: 14px; }

.ui-v4 .hero-workspace-main { min-width: 0; padding: 16px; background: #f4f6f4; }
.ui-v4 .hero-task-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ui-v4 .hero-task-heading small,
.ui-v4 .hero-task-heading strong { display: block; }
.ui-v4 .hero-task-heading small { color: #7c8882; font-size: 8px; }
.ui-v4 .hero-task-heading strong { margin-top: 4px; color: #1d2b24; font-size: 13px; }
.ui-v4 .hero-task-heading em { padding: 4px 7px; border: 1px solid #d8cda9; border-radius: 4px; color: #806120; background: #fff9e8; font-size: 8px; font-style: normal; }

.ui-v4 .hero-query-line {
  display: grid;
  grid-template-columns: 1fr 1fr 34px;
  gap: 8px;
  align-items: center;
  margin-top: 15px;
  padding: 10px;
  border: 1px solid #d5ddd8;
  border-radius: 6px;
  background: #fff;
}

.ui-v4 .hero-query-line > span { min-width: 0; padding-right: 8px; border-right: 1px solid #e4e8e5; }
.ui-v4 .hero-query-line small,
.ui-v4 .hero-query-line strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-v4 .hero-query-line small { color: #88938e; font-size: 7px; }
.ui-v4 .hero-query-line strong { margin-top: 4px; color: #34433c; font-size: 9px; }
.ui-v4 .hero-query-line > svg { width: 15px; height: 15px; justify-self: center; color: #176b55; }

.ui-v4 .hero-process-line { display: grid; grid-template-columns: auto 1fr auto 1fr auto; gap: 8px; align-items: center; min-height: 46px; }
.ui-v4 .hero-process-line span { display: flex; align-items: center; gap: 5px; color: #77847d; font-size: 8px; white-space: nowrap; }
.ui-v4 .hero-process-line span.done { color: #3b7562; }
.ui-v4 .hero-process-line span.current { color: #8b651f; }
.ui-v4 .hero-process-line svg { width: 11px; height: 11px; }
.ui-v4 .hero-process-line .current svg { animation: marketingSpin 1.4s linear infinite; }
.ui-v4 .hero-process-line b { height: 1px; background: #d4dbd7; }

.ui-v4 .hero-result-list { overflow: hidden; border: 1px solid #d6ddd9; border-radius: 6px; background: #fff; }
.ui-v4 .hero-result-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; gap: 9px; align-items: center; min-height: 68px; padding: 9px 11px; border-bottom: 1px solid #e5e9e6; }
.ui-v4 .hero-result-row:last-child { border-bottom: 0; }
.ui-v4 .hero-result-row.active { background: #edf5f1; box-shadow: inset 3px 0 0 #13715a; }
.ui-v4 .hero-company-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 6px; color: #11624f; background: #dceee7; font-size: 8px; font-weight: 800; }
.ui-v4 .hero-company-avatar.blue { color: #315f7d; background: #e8f0f5; }
.ui-v4 .hero-company-avatar.amber { color: #88601c; background: #fff0d2; }
.ui-v4 .hero-result-row > div { min-width: 0; }
.ui-v4 .hero-result-row strong,
.ui-v4 .hero-result-row small { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-v4 .hero-result-row strong { color: #24332c; font-size: 9px; }
.ui-v4 .hero-result-row small { margin-top: 4px; color: #7e8a84; font-size: 7px; }
.ui-v4 .hero-result-row > span:nth-child(3) { display: flex; gap: 5px; color: #277761; }
.ui-v4 .hero-result-row > span:nth-child(3) svg { width: 12px; height: 12px; }
.ui-v4 .hero-result-row em { padding: 4px 6px; border: 1px solid #d6ded9; border-radius: 4px; color: #607069; background: #fff; font-size: 7px; font-style: normal; }

.ui-v4 .hero-customer-peek { display: none; padding: 17px 15px; border-left: 1px solid #dce2de; background: #fff; text-align: center; }
.ui-v4 .hero-customer-peek > span { display: block; color: #87928d; font-size: 8px; text-align: left; }
.ui-v4 .hero-contact-avatar { display: grid; place-items: center; width: 44px; height: 44px; margin: 24px auto 9px; border-radius: 7px; color: #176650; background: #dfeee8; font-size: 13px; font-weight: 800; }
.ui-v4 .hero-customer-peek > strong { display: block; overflow: hidden; color: #26352e; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.ui-v4 .hero-customer-peek > small { display: block; margin-top: 4px; overflow: hidden; color: #84908a; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.ui-v4 .hero-customer-peek dl { margin: 21px 0 0; text-align: left; }
.ui-v4 .hero-customer-peek dl > div { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 6px; padding: 9px 0; border-top: 1px solid #e5e9e7; }
.ui-v4 .hero-customer-peek dt { color: #8a9590; font-size: 7px; }
.ui-v4 .hero-customer-peek dd { margin: 0; overflow: hidden; color: #45544d; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.ui-v4 .hero-next-action { display: flex; align-items: center; gap: 6px; margin-top: 15px; padding: 9px; border: 1px solid #cadfd6; border-radius: 6px; color: #176650; background: #edf6f2; font-size: 8px; text-align: left; }
.ui-v4 .hero-next-action svg { width: 13px; height: 13px; }

.ui-v4 .marketing-hero-content {
  z-index: 4;
  width: min(520px, 40vw);
  margin-left: clamp(24px, 6vw, 96px);
  padding-bottom: 0;
  color: #fff;
}

.ui-v4 .marketing-eyebrow { color: #98dfca; }
.ui-v4 .marketing-hero h1 { color: #fff; }
.ui-v4 .marketing-hero h1 strong { font-size: 58px; font-weight: 820; }
.ui-v4 .marketing-hero h1 span { max-width: 580px; margin-top: 12px; color: #f4f8f6; font-size: 39px; font-weight: 710; line-height: 1.24; }
.ui-v4 .marketing-hero-content > p { max-width: 540px; color: #c8d5cf; font-size: 14px; line-height: 1.85; }
.ui-v4 .marketing-hero-actions button:not(.primary) { color: #fff; border-color: rgba(255, 255, 255, .54); background: rgba(7, 25, 20, .74); }
.ui-v4 .marketing-trust-line { color: #c3d1cb; }
.ui-v4 .marketing-trust-line svg { color: #83d9bd; }
.ui-v4 .marketing-route-rail { z-index: 6; border-top-color: #bfc9c3; color: #27352e; }
.ui-v4 .marketing-route-live { color: #557067; }
.ui-v4 .marketing-route-stage span { color: #6d7a74; }
.ui-v4 .marketing-route-rail > svg { color: #83908a; }
.ui-v4 .marketing-route-track { background: #c6cfca; }
.ui-v4 .marketing-route-track span { background: #248b6e; }

.ui-v4 .marketing-operating-strip > div {
  grid-template-columns: 64px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 5px 16px;
  min-height: 96px;
  padding: 20px 24px;
}

.ui-v4 .marketing-operating-strip > div + div { padding-left: 24px; }
.ui-v4 .marketing-operating-strip span { grid-row: 1 / 3; align-self: start; padding-top: 2px; white-space: nowrap; }
.ui-v4 .marketing-operating-strip strong { min-width: 0; font-size: 12px; line-height: 1.45; }
.ui-v4 .marketing-operating-strip small { grid-column: 2; min-width: 0; text-align: left; line-height: 1.5; }

/* Industry-led visual story */
.ui-v4 .marketing-industry-showcase {
  padding: 112px clamp(24px, 7vw, 118px) 104px;
  border-bottom: 1px solid #d5ddd8;
  background: #fff;
}

.ui-v4 .marketing-industry-heading {
  display: grid;
  grid-template-columns: minmax(420px, 1.15fr) minmax(320px, .7fr);
  gap: clamp(48px, 8vw, 130px);
  align-items: end;
  margin-bottom: 46px;
}

.ui-v4 .marketing-industry-heading h2 {
  max-width: 720px;
  margin: 12px 0 0;
  color: #14211c;
  font-size: 40px;
  line-height: 1.28;
}

.ui-v4 .marketing-industry-heading > p {
  margin: 0 0 3px;
  color: #65736c;
  font-size: 14px;
  line-height: 1.9;
}

.ui-v4 .marketing-industry-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.ui-v4 .marketing-industry-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #ccd5d0;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(22, 40, 33, .07);
}

.ui-v4 .marketing-industry-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #dfe6e2;
}

.ui-v4 .marketing-industry-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.075);
  transition: transform 1.25s cubic-bezier(.2, .7, .2, 1);
}

.ui-v4 .marketing-industry-card.is-visible .marketing-industry-media img { transform: scale(1.01); }
.ui-v4 .marketing-industry-card.is-visible:hover .marketing-industry-media img { transform: scale(1.035); }
.ui-v4 .marketing-industry-card:nth-child(1) img { object-position: 54% center; }
.ui-v4 .marketing-industry-card:nth-child(2) img { object-position: 57% center; }
.ui-v4 .marketing-industry-card:nth-child(3) img { object-position: 50% center; }

.ui-v4 .marketing-industry-body { min-height: 202px; padding: 22px 22px 20px; }
.ui-v4 .marketing-industry-body > span { color: #1a715b; font-size: 9px; font-weight: 820; }
.ui-v4 .marketing-industry-body h3 { margin: 10px 0 0; color: #17231e; font-size: 20px; line-height: 1.4; }
.ui-v4 .marketing-industry-body p { min-height: 46px; margin: 10px 0 0; color: #6b7872; font-size: 12px; line-height: 1.75; }
.ui-v4 .marketing-industry-body > div { display: flex; flex-wrap: wrap; gap: 0; margin-top: 17px; border-top: 1px solid #e0e5e2; }
.ui-v4 .marketing-industry-body em { padding: 10px 12px 0 0; color: #4f6057; font-size: 9px; font-style: normal; }
.ui-v4 .marketing-industry-body em + em { margin-left: 12px; padding-left: 12px; border-left: 1px solid #dbe2de; }

.ui-v4 .marketing-industry-index {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  margin-top: 28px;
  border-top: 1px solid #ccd5d0;
  border-bottom: 1px solid #ccd5d0;
}

.ui-v4 .marketing-industry-index > span {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 11px;
  min-height: 94px;
  padding: 14px 15px;
  border-right: 1px solid #dbe2de;
  color: #26372f;
}

.ui-v4 .marketing-industry-index > span:last-child { border-right: 0; }
.ui-v4 .marketing-industry-index svg { width: 18px; height: 18px; color: #167159; }
.ui-v4 .marketing-industry-index b { font-size: 10px; font-weight: 720; line-height: 1.45; }

html.marketing-motion-ready .ui-v4 .marketing-reveal {
  opacity: 0;
  transform: translate3d(0, 34px, 0);
  transition: opacity .72s ease, transform .82s cubic-bezier(.2, .72, .22, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

html.marketing-motion-ready .ui-v4 .marketing-reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.ui-v4 .marketing-operating-strip > .marketing-reveal {
  opacity: 1;
  transform: none;
  transition: none;
}

@keyframes heroBackgroundDrift {
  from { transform: scale(1.015) translate3d(0, 0, 0); }
  to { transform: scale(1.045) translate3d(-7px, -3px, 0); }
}

@keyframes heroWorkspaceIn {
  from { opacity: 0; transform: translate3d(32px, 18px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* Application shell */
.ui-v4 #appShell {
  grid-template-columns: 238px minmax(0, 1fr);
  grid-template-rows: 64px minmax(0, 1fr);
  background: #f1f3f1;
}

.ui-v4 #appShell > header {
  min-height: 64px;
  padding: 0 26px;
  border-bottom-color: #d8ddd9;
  background: #f8f9f7;
  box-shadow: none;
}

.ui-v4 #appShell > header h1 { font-size: 18px; font-weight: 760; }
.ui-v4 #appShell > header #status { margin-top: 2px; font-size: 10px; }
.ui-v4 #appShell > header .quota { min-height: 34px; border-color: #dce1de; color: #5f6d66; background: #fff; }
.ui-v4 #appShell > header .icon-button,
.ui-v4 #appShell > header #logoutBtn { border-color: #d7ddda; background: #fff; box-shadow: none; }

.ui-v4 .app-nav {
  width: 238px;
  padding: 12px 10px 12px;
  border-right: 1px solid #d5dbd7;
  background: #f8f9f7;
  color: #243029;
}

.ui-v4 .brand-lockup { min-height: 58px; margin: 0 3px 8px; padding: 4px 7px 14px; border-bottom: 1px solid #dce1de; }
.ui-v4 .brand-lockup .brand-mark { width: 35px; height: 35px; }
.ui-v4 .brand-lockup .brand-copy strong { color: #1d2923; }
.ui-v4 .brand-lockup .brand-copy span { color: #7b8680; }
.ui-v4 .nav-label { padding: 12px 10px 5px; color: #8b9590; font-size: 9px; }

.ui-v4 .app-nav .nav-item,
.ui-v4 .app-nav .nav-card-button,
.ui-v4 .app-nav .nav-more-toggle {
  min-height: 40px;
  padding: 8px 10px;
  border: 0 !important;
  border-radius: 6px;
  color: #4f5d56;
  background: transparent !important;
  box-shadow: none;
}

.ui-v4 .app-nav .nav-item svg,
.ui-v4 .app-nav .nav-card-button svg,
.ui-v4 .app-nav .nav-more-toggle svg { color: #748078; }
.ui-v4 .app-nav .nav-item:hover,
.ui-v4 .app-nav .nav-card-button:hover,
.ui-v4 .app-nav .nav-more-toggle:hover { color: #1d2b24; background: #ecefec !important; }
.ui-v4 .app-nav .nav-item.active,
.ui-v4 .app-nav .nav-card-button.active {
  color: #153c30;
  background: #e1ebe6 !important;
  box-shadow: inset 3px 0 0 #0f7058;
}
.ui-v4 .app-nav .nav-item.active svg,
.ui-v4 .app-nav .nav-card-button.active svg { color: #0c6c55; }
.ui-v4 .nav-card-state { color: #6f7d76; background: #ecefed; }
.ui-v4 .nav-card-state.ready { color: #176650; background: #dcebe5; }
.ui-v4 .nav-secondary { border-left-color: #cbd4cf; }

.ui-v4 .nav-account {
  margin-top: auto;
  padding: 9px 8px;
  border-top: 1px solid #dce1de;
  border-radius: 0;
  color: #435149;
  background: transparent;
}
.ui-v4 .nav-account:hover,
.ui-v4 .nav-account.active { color: #17251e; background: #e9eeeb; }
.ui-v4 .nav-account-avatar { color: #145c49; background: #dfece6; }
.ui-v4 .nav-account-copy strong { color: #25322c; }
.ui-v4 .nav-account-copy span { color: #7b8781; }

.ui-v4 #appShell > main { max-width: 1680px; padding: 22px 26px 36px; }
.ui-v4 .page-view > .head,
.ui-v4 [data-page="leads"] > section > .head { min-height: 54px; padding-bottom: 13px; }
.ui-v4 .page-title h2 { font-size: 20px; font-weight: 760; }
.ui-v4 .page-title > span { font-size: 10px; }

.ui-v4 .home-identity-strip,
.ui-v4 .home-actions,
.ui-v4 .home-metrics,
.ui-v4 .search-workspace,
.ui-v4 .recent-searches,
.ui-v4 [data-page="leads"] > section > .content,
.ui-v4 [data-page="email"] {
  border-color: #d6ddd8;
  background: #fff;
  box-shadow: 0 1px 2px rgba(22, 34, 28, .035), 0 12px 32px rgba(22, 34, 28, .025);
}

.ui-v4 .home-identity-strip { background: #fbfcfb; }
.ui-v4 .home-section-heading,
.ui-v4 .home-metrics-head { background: #f7f8f6; }
.ui-v4 .home-actions .quick-card:hover { background: #f3f7f5 !important; }
.ui-v4 .quick-index { border-color: #cbded6; color: #0f6b54 !important; background: #e7f1ec; }

.ui-v4 .search-workspace { grid-template-columns: 410px minmax(0, 1fr); }
.ui-v4 .search-builder { border-right-color: #d8ded9; background: #f8f9f7; }
.ui-v4 .search-builder-head { background: #fff; }
.ui-v4 .search-form-section { border-bottom-color: #dfe4e1; }
.ui-v4 .search-section-title span { color: #0f6d55; background: #e1eee8; }
.ui-v4 .search-output { background: #fff; }
.ui-v4 .search-output-head { background: #fff; }
.ui-v4 .search-progress { background: #edf1ee; }
.ui-v4 .search-results { background: #fbfcfb; }
.ui-v4 .market-preview { background: #eef5f1; }

.ui-v4 .lead-stages { background: #f7f8f6; }
.ui-v4 .lead-stage { border-right-color: #dde3df !important; }
.ui-v4 .lead-stage.active { background: #fff !important; box-shadow: inset 0 -2px 0 #0d6f57; }
.ui-v4 .lead-tools { background: #fff; }
.ui-v4 .lead-tools .search-input input { background: #f7f8f6; }
.ui-v4 [data-page="leads"] th { background: #f3f5f3; }
.ui-v4 #leadTable .lead-row:hover td { background: #f1f6f3; }
.ui-v4 #leadTable .lead-row.selected td { background: #e8f2ed; }

.ui-v4 .module-tabs { min-height: 56px; background: #f8f9f7; }
.ui-v4 .module-tab { min-height: 56px; }
.ui-v4 .comms-workspace { border-color: #d4dcd7; }
.ui-v4 .comms-inbox { background: #fbfcfb; }
.ui-v4 .comms-inbox-tools,
.ui-v4 .comms-inbox-head { background: #fff; }
.ui-v4 .comms-inbox .mail-item.active { background: #e5f0eb; box-shadow: inset 3px 0 0 #0d6e57; }
.ui-v4 .comms-workspace .mail-reader-content { background: #eef1ef; }
.ui-v4 .comms-workspace .chat-message-row.outbound .message-card { border-color: #bfd8ce; background: #dfeee8; }
.ui-v4 .comms-workspace .mail-compose-reply { background: #fff; }
.ui-v4 .comms-context { background: #fbfcfb; }
.ui-v4 .comms-module-tabs .module-tab { display: inline-flex; align-items: center; gap: 7px; }
.ui-v4 .comms-module-tabs .module-tab svg { width: 14px; height: 14px; }
.ui-v4 .conversation-channel-label { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 0 9px; border: 1px solid #cbd8d2; border-radius: 5px; color: #245f4e; background: #edf5f1; font-size: 9px; font-weight: 720; }
.ui-v4 .conversation-channel-label svg { width: 13px; height: 13px; }
body.ui-v4[data-app-page="email"] .reply-subject-row { display: none; }

.ui-v4 .edm-operations { display: grid; gap: 18px; }
.ui-v4 .edm-ops-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid #d5ddd8; background: #fff; }
.ui-v4 .edm-ops-summary > div { min-width: 0; min-height: 104px; padding: 20px 22px; border-right: 1px solid #e0e5e2; }
.ui-v4 .edm-ops-summary > div:last-child { border-right: 0; }
.ui-v4 .edm-ops-summary span,
.ui-v4 .edm-ops-summary small { display: block; color: #6f7b76; font-size: 10px; }
.ui-v4 .edm-ops-summary strong { display: block; margin: 7px 0 5px; color: #172a24; font-size: 26px; line-height: 1; }
.ui-v4 .edm-ops-summary > div:last-child strong { color: #a24b32; }
.ui-v4 .edm-ops-section { min-width: 0; border: 1px solid #d5ddd8; background: #fff; }
.ui-v4 .edm-section-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 86px; padding: 16px 18px; border-bottom: 1px solid #e0e5e2; }
.ui-v4 .edm-section-head h3 { margin: 3px 0 2px; font-size: 15px; }
.ui-v4 .edm-section-head p { margin: 0; color: #738079; font-size: 10px; }
.ui-v4 .edm-section-actions { display: flex; align-items: center; gap: 8px; }
.ui-v4 .edm-section-actions select { width: 150px; min-height: 34px; }
.ui-v4 .edm-campaign-table-wrap { max-height: 390px; border: 0; border-radius: 0; }
.ui-v4 #edmCampaignTable th { position: sticky; top: 0; z-index: 1; background: #f4f6f4; }
.ui-v4 #edmCampaignTable td { max-width: 260px; }
.ui-v4 .edm-next-action { display: block; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-v4 .edm-ops-columns { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(340px, .88fr); gap: 18px; align-items: start; }
.ui-v4 .email-template-editor { display: grid; gap: 11px; padding: 16px 18px; border-bottom: 1px solid #e0e5e2; background: #f6f8f6; }
.ui-v4 .email-template-editor textarea { min-height: 160px; resize: vertical; }
.ui-v4 .email-template-list,
.ui-v4 .edm-issue-list { max-height: 410px; overflow: auto; }
.ui-v4 .email-template-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 78px; padding: 13px 18px; border-bottom: 1px solid #e6eae7; }
.ui-v4 .email-template-row:last-child,
.ui-v4 .edm-issue-row:last-child { border-bottom: 0; }
.ui-v4 .email-template-row > div:first-child { min-width: 0; }
.ui-v4 .email-template-row strong,
.ui-v4 .email-template-row span,
.ui-v4 .email-template-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-v4 .email-template-row strong { color: #20302b; font-size: 12px; }
.ui-v4 .email-template-row span { margin-top: 4px; color: #52615b; font-size: 10px; }
.ui-v4 .email-template-row small { margin-top: 4px; color: #89928e; font-size: 9px; }
.ui-v4 .email-template-row > div:last-child { display: flex; gap: 5px; }
.ui-v4 .edm-issue-row { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 11px; align-items: start; min-height: 74px; padding: 13px 18px; border-bottom: 1px solid #e6eae7; }
.ui-v4 .edm-issue-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 5px; color: #9c492f; background: #f8e9e3; }
.ui-v4 .edm-issue-icon.suppression { color: #72551a; background: #f5edcf; }
.ui-v4 .edm-issue-icon svg { width: 15px; height: 15px; }
.ui-v4 .edm-issue-row strong,
.ui-v4 .edm-issue-row span,
.ui-v4 .edm-issue-row small { display: block; }
.ui-v4 .edm-issue-row strong { color: #25342f; font-size: 11px; }
.ui-v4 .edm-issue-row span { margin-top: 3px; color: #68756f; font-size: 10px; line-height: 1.45; }
.ui-v4 .edm-issue-row small { margin-top: 4px; color: #919a96; font-size: 9px; }
.ui-v4 .edm-issue-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ui-v4 .edm-issue-actions button { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 5px 9px; border-radius: 5px; font-size: 10px; }
.ui-v4 .edm-issue-actions button:first-child { border-color: #9ec9bb; color: #12634f; background: #eff8f4; }
.ui-v4 .edm-issue-actions button:last-child { border-color: #e1c08b; color: #7b561b; background: #fff8e8; }
.ui-v4 .edm-issue-actions svg { width: 13px; height: 13px; }
.ui-v4 .edm-empty { display: grid; justify-items: center; gap: 7px; min-height: 190px; padding: 36px 24px; text-align: center; color: #7b8681; }
.ui-v4 .edm-empty svg { width: 26px; height: 26px; }
.ui-v4 .edm-empty strong { color: #34443e; font-size: 12px; }
.ui-v4 .edm-empty span { max-width: 300px; font-size: 10px; line-height: 1.6; }
.ui-v4 .edm-empty.healthy svg { color: #14745d; }
.ui-v4 .whatsapp-account-roster { border: 1px solid #d5ddd8; background: #fff; }
.ui-v4 .whatsapp-roster-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; padding: 14px 18px; border-bottom: 1px solid #e1e6e3; }
.ui-v4 .whatsapp-roster-head strong,
.ui-v4 .whatsapp-roster-head span { display: block; }
.ui-v4 .whatsapp-roster-head strong { color: #20322c; font-size: 12px; }
.ui-v4 .whatsapp-roster-head div > span { margin-top: 3px; color: #76827d; font-size: 10px; }
.ui-v4 .whatsapp-roster-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ui-v4 .whatsapp-roster-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 68px; padding: 11px 18px; border-right: 1px solid #e4e8e5; border-bottom: 1px solid #e4e8e5; }
.ui-v4 .whatsapp-roster-row:nth-child(2n) { border-right: 0; }
.ui-v4 .whatsapp-roster-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 5px; color: #185d4b; background: #deeee7; font-size: 11px; font-weight: 800; }
.ui-v4 .whatsapp-roster-row div { min-width: 0; }
.ui-v4 .whatsapp-roster-row strong,
.ui-v4 .whatsapp-roster-row div > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-v4 .whatsapp-roster-row strong { color: #273832; font-size: 11px; }
.ui-v4 .whatsapp-roster-row div > span { margin-top: 3px; color: #7e8984; font-size: 9px; }
.ui-v4 .whatsapp-account-state { display: inline-flex; align-items: center; gap: 5px; color: #77817d; font-size: 9px; white-space: nowrap; }
.ui-v4 .whatsapp-account-state i { width: 6px; height: 6px; border-radius: 50%; background: #aab2ae; }
.ui-v4 .whatsapp-account-state.ready { color: #14715a; }
.ui-v4 .whatsapp-account-state.ready i { background: #25a179; }
.ui-v4 .whatsapp-account-state.reconnecting,
.ui-v4 .whatsapp-account-state.qr,
.ui-v4 .whatsapp-account-state.pairing,
.ui-v4 .whatsapp-account-state.initializing,
.ui-v4 .whatsapp-account-state.authenticated { color: #806522; }
.ui-v4 .whatsapp-account-state.reconnecting i,
.ui-v4 .whatsapp-account-state.qr i,
.ui-v4 .whatsapp-account-state.pairing i,
.ui-v4 .whatsapp-account-state.initializing i,
.ui-v4 .whatsapp-account-state.authenticated i { background: #d8a52b; }
.ui-v4 .whatsapp-account-state.expired,
.ui-v4 .whatsapp-account-state.auth_failure,
.ui-v4 .whatsapp-account-state.unavailable { color: #a44b32; }
.ui-v4 .whatsapp-account-state.expired i,
.ui-v4 .whatsapp-account-state.auth_failure i,
.ui-v4 .whatsapp-account-state.unavailable i { background: #c95e40; }
.ui-v4 .whatsapp-reliability-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid #d5ddd8; border-top: 0; background: #f7f9f7; }
.ui-v4 .whatsapp-reliability-bar > div { display: grid; grid-template-columns: 24px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 8px; min-height: 64px; padding: 11px 14px; border-right: 1px solid #e0e5e2; }
.ui-v4 .whatsapp-reliability-bar > div:last-child { border-right: 0; }
.ui-v4 .whatsapp-reliability-bar svg { grid-row: 1 / 3; align-self: center; width: 16px; height: 16px; color: #23745f; }

/* Connection headings use full-size channel marks, not utility glyphs. */
.ui-v4 .connection-page-heading {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: start;
  column-gap: 14px;
}
.ui-v4 .connection-page-heading > div {
  min-height: 52px;
}
.ui-v4 .connection-page-heading > div > span {
  margin-bottom: 3px;
  line-height: 1.1;
}
.ui-v4 .connection-page-heading h2 {
  line-height: 1.22;
}
.ui-v4 .connection-page-heading p {
  line-height: 1.35;
}
.ui-v4 .connection-page-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  min-width: 52px;
  min-height: 52px;
  max-width: 52px;
  max-height: 52px;
  flex: 0 0 52px;
  align-self: start;
  aspect-ratio: 1;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  box-shadow: 0 7px 16px rgba(23, 44, 36, .13);
  line-height: 0;
}
.ui-v4 .connection-page-heading .connection-page-icon {
  display: grid;
  place-items: center;
}
.ui-v4 .connection-page-icon > svg,
.ui-v4 .connection-page-icon > .channel-brand-icon {
  grid-area: 1 / 1;
  margin: 0;
}
.ui-v4 .connection-page-icon.email {
  color: #fff;
  background: #28617f;
}
.ui-v4 .connection-page-icon.whatsapp {
  color: #fff;
  background: #25d366;
}
.ui-v4 .connection-page-icon.email svg {
  width: 36px;
  height: 36px;
  stroke-width: 1.9;
}
.ui-v4 .connection-page-icon.whatsapp .channel-brand-icon {
  display: block;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  object-fit: contain;
}
.ui-v4 .whatsapp-reliability-bar span { color: #78837e; font-size: 9px; }
.ui-v4 .whatsapp-reliability-bar strong { color: #263a33; font-size: 10px; }
.ui-v4 .warning-text { color: #a25b2b !important; }
.ui-v4 .conversion-funnel { margin-top: 14px; border: 1px solid #d5ddd8; background: #fff; }
.ui-v4 .report-section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; padding: 15px 18px; border-bottom: 1px solid #e0e5e2; }
.ui-v4 .report-section-head h3 { margin: 4px 0 0; font-size: 15px; }
.ui-v4 .funnel-stages { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.ui-v4 .funnel-stage { min-width: 0; padding: 16px 14px; border-right: 1px solid #e5e9e6; }
.ui-v4 .funnel-stage:last-child { border-right: 0; }
.ui-v4 .funnel-stage > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ui-v4 .funnel-stage span { color: #65716c; font-size: 9px; white-space: nowrap; }
.ui-v4 .funnel-stage strong { color: #1c3029; font-size: 17px; }
.ui-v4 .funnel-stage small { display: block; margin-top: 7px; overflow: hidden; color: #89938f; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.ui-v4 .funnel-track { height: 5px; margin-top: 10px; overflow: hidden; background: #e8ece9; }
.ui-v4 .funnel-track i { display: block; width: 0; height: 100%; background: #1b8066; transition: width .3s ease; }
.ui-v4 .funnel-stage:nth-child(4) .funnel-track i { background: #34779b; }
.ui-v4 .funnel-stage:nth-child(5) .funnel-track i { background: #b1832f; }
.ui-v4 .funnel-stage:nth-child(6) .funnel-track i { background: #7d5d91; }
.ui-v4 .channel-performance { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid #e0e5e2; background: #f7f9f7; }
.ui-v4 .channel-performance > div { display: grid; grid-template-columns: 28px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; min-height: 68px; padding: 13px 18px; border-right: 1px solid #e0e5e2; }
.ui-v4 .channel-performance > div:last-child { border-right: 0; }
.ui-v4 .channel-performance svg { grid-row: 1 / 3; align-self: center; width: 18px; height: 18px; color: #236f5b; }
.ui-v4 .channel-performance span { color: #7a8580; font-size: 9px; }
.ui-v4 .channel-performance strong { margin-top: 3px; color: #263832; font-size: 11px; }
.ui-v4 .team-performance-report { margin-top: 14px; border: 1px solid #d5ddd8; background: #fff; }
.ui-v4 .team-performance-report .team-panel-head { min-height: 72px; padding: 14px 18px; border-bottom: 1px solid #e0e5e2; }
.ui-v4 .team-performance-report .table-wrap { border: 0; border-radius: 0; }

.ui-v4 .form-panel,
.ui-v4 .result-panel,
.ui-v4 .guide-panel,
.ui-v4 .team-panel,
.ui-v4 .account-panel { border-color: #d6ddd8; background: #fff; }
.ui-v4 .field-group { background: #f6f8f6; }

@media (max-width: 1180px) {
  .ui-v4 .edm-ops-columns { grid-template-columns: 1fr; }
  .ui-v4 .edm-ops-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ui-v4 .edm-ops-summary > div:nth-child(2) { border-right: 0; }
  .ui-v4 .edm-ops-summary > div:nth-child(-n+2) { border-bottom: 1px solid #e0e5e2; }
  .ui-v4 .funnel-stages { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ui-v4 .funnel-stage:nth-child(3) { border-right: 0; }
  .ui-v4 .funnel-stage:nth-child(-n+3) { border-bottom: 1px solid #e5e9e6; }
  .ui-v4 .marketing-hero-scene { left: 54%; }
  .ui-v4 .hero-workspace-body { grid-template-columns: 46px minmax(360px, 1fr); }
  .ui-v4 .hero-customer-peek { display: none; }
  .ui-v4 .marketing-hero-content { width: min(480px, 43vw); }
  .ui-v4 .marketing-hero h1 strong { font-size: 52px; }
  .ui-v4 .marketing-hero h1 span { font-size: 35px; }
  .ui-v4 .marketing-industry-heading { grid-template-columns: 1fr; gap: 17px; }
  .ui-v4 .marketing-industry-heading > p { max-width: 720px; }
  .ui-v4 .marketing-industry-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ui-v4 .marketing-industry-card:nth-child(3) { display: grid; grid-template-columns: 1.1fr .9fr; grid-column: 1 / -1; }
  .ui-v4 .marketing-industry-card:nth-child(3) .marketing-industry-media { min-height: 310px; aspect-ratio: auto; }
  .ui-v4 .marketing-industry-index { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ui-v4 .marketing-industry-index > span:nth-child(4) { border-right: 0; }
  .ui-v4 .marketing-industry-index > span:nth-child(-n+4) { border-bottom: 1px solid #dbe2de; }
}

@media (max-width: 920px) {
  .ui-v4 #appShell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 64px auto minmax(0, 1fr);
  }
  .ui-v4 #appShell > header { grid-column: 1; grid-row: 1; min-height: 64px; padding: 0 17px; }
  .ui-v4 .app-nav {
    grid-row: 2;
    width: 100%;
    min-width: 0;
    padding: 6px 10px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid #d6dcd8;
    background: #f8f9f7;
  }
  .ui-v4 .app-nav .brand-lockup,
  .ui-v4 .app-nav .nav-label,
  .ui-v4 .app-nav .nav-account { display: none; }
  .ui-v4 .app-nav .nav-item,
  .ui-v4 .app-nav .nav-card-button,
  .ui-v4 .app-nav .nav-more-toggle { flex: 0 0 auto; min-height: 40px; }
  .ui-v4 #appShell > main { grid-row: 3; padding: 18px 16px 30px; }
  .ui-v4 .marketing-hero::after { width: 100%; background: rgba(7, 27, 21, .86); }
  .ui-v4 .marketing-hero-image { opacity: 1; filter: saturate(.74) contrast(.9) brightness(.8); object-position: 54% center; }
  .ui-v4 .marketing-hero-shade { background: rgba(5, 19, 15, .34); }
  .ui-v4 .marketing-hero-scene { display: none; }
  .ui-v4 .marketing-hero-content { width: min(590px, calc(100% - 48px)); }
  .ui-v4 .marketing-industry-showcase { padding: 78px 30px; }
  .ui-v4 .marketing-industry-heading h2 { font-size: 34px; }
}

@media (max-width: 680px) {
  .ui-v4 .edm-ops-summary { grid-template-columns: 1fr; }
  .ui-v4 .edm-ops-summary > div { min-height: 82px; border-right: 0; border-bottom: 1px solid #e0e5e2; }
  .ui-v4 .edm-ops-summary > div:last-child { border-bottom: 0; }
  .ui-v4 .edm-section-head,
  .ui-v4 .whatsapp-roster-head,
  .ui-v4 .report-section-head { align-items: flex-start; flex-direction: column; }
  .ui-v4 .edm-section-actions { width: 100%; }
  .ui-v4 .edm-section-actions select { flex: 1; width: auto; }
  .ui-v4 .whatsapp-roster-list { grid-template-columns: 1fr; }
  .ui-v4 .whatsapp-roster-row { border-right: 0; }
  .ui-v4 .whatsapp-reliability-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ui-v4 .whatsapp-reliability-bar > div:nth-child(2n) { border-right: 0; }
  .ui-v4 .whatsapp-reliability-bar > div:nth-child(-n+2) { border-bottom: 1px solid #e0e5e2; }
  .ui-v4 .funnel-stages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ui-v4 .funnel-stage:nth-child(2n) { border-right: 0; }
  .ui-v4 .funnel-stage:nth-child(-n+4) { border-bottom: 1px solid #e5e9e6; }
  .ui-v4 .channel-performance { grid-template-columns: 1fr; }
  .ui-v4 .channel-performance > div { border-right: 0; border-bottom: 1px solid #e0e5e2; }
  .ui-v4 .channel-performance > div:last-child { border-bottom: 0; }
  .ui-v4 .marketing-nav { min-height: 62px; padding: 0 14px; }
  .ui-v4 .marketing-brand .brand-mark { width: 32px; height: 32px; }
  .ui-v4 .marketing-hero { height: calc(100dvh - 102px); min-height: 650px; }
  .ui-v4 .marketing-hero-image { opacity: 1; object-position: 58% center; }
  .ui-v4 .marketing-hero-shade { background: rgba(5, 19, 15, .34); }
  .ui-v4 .hero-workspace-body { grid-template-columns: 42px minmax(360px, 1fr); }
  .ui-v4 .marketing-hero-content { width: auto; margin: 0 18px; padding-bottom: 0; }
  .ui-v4 .marketing-eyebrow { font-size: 9px; }
  .ui-v4 .marketing-hero h1 strong { font-size: 39px; }
  .ui-v4 .marketing-hero h1 span { max-width: 330px; margin-top: 9px; font-size: 28px; line-height: 1.3; }
  .ui-v4 .marketing-hero-content > p { max-width: 335px; color: #d0dbd6; font-size: 12px; }
  .ui-v4 .marketing-hero-actions { flex-direction: column; align-items: stretch; }
  .ui-v4 .marketing-hero-actions button { width: 100%; }
  .ui-v4 .marketing-operating-strip { grid-template-columns: 1fr; padding: 0 20px; }
  .ui-v4 .marketing-operating-strip > div,
  .ui-v4 .marketing-operating-strip > div + div { grid-template-columns: 70px minmax(0, 1fr); min-height: 78px; padding: 16px 0; border-right: 0; border-bottom: 1px solid #d8ded9; }
  .ui-v4 .marketing-operating-strip > div:last-child { border-bottom: 0; }
  .ui-v4 .marketing-industry-showcase { padding: 62px 20px; }
  .ui-v4 .marketing-industry-heading { margin-bottom: 30px; }
  .ui-v4 .marketing-industry-heading h2 { font-size: 29px; }
  .ui-v4 .marketing-industry-heading > p { font-size: 12px; }
  .ui-v4 .marketing-industry-gallery { grid-template-columns: 1fr; }
  .ui-v4 .marketing-industry-card:nth-child(3) { display: block; grid-column: auto; }
  .ui-v4 .marketing-industry-card:nth-child(3) .marketing-industry-media { min-height: 0; aspect-ratio: 4 / 3; }
  .ui-v4 .marketing-industry-body { min-height: 0; }
  .ui-v4 .marketing-industry-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ui-v4 .marketing-industry-index > span:nth-child(2n) { border-right: 0; }
  .ui-v4 .marketing-industry-index > span:nth-child(-n+6) { border-bottom: 1px solid #dbe2de; }
  .ui-v4 .marketing-industry-index > span { min-height: 78px; }
  .ui-v4 #appShell > header h1 { font-size: 17px; }
  .ui-v4 #appShell > header #status,
  .ui-v4 #appShell > header #userInfo,
  .ui-v4 #appShell > header #helpCenter,
  .ui-v4 #appShell > header #refresh { display: none; }
  .ui-v4 #appShell > main { padding: 14px 10px 28px; }
  .ui-v4 .search-workspace { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html.marketing-motion-ready .ui-v4 .marketing-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .ui-v4 .marketing-hero-image,
  .ui-v4 .hero-workspace,
  .ui-v4 .hero-sync-state i,
  .ui-v4 .hero-process-line .current svg { animation: none; }
  .ui-v4 .marketing-industry-media img { transition: none; }
}

/* EDM primary composer */
.ui-v4 .edm-compose-workspace {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d5ddd8;
  background: #fff;
}

.ui-v4 .edm-compose-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: 154px;
  padding: 28px 30px;
}

.ui-v4 .edm-compose-head > div:first-child {
  max-width: 720px;
}

.ui-v4 .edm-compose-head h2 {
  margin: 5px 0 8px;
  color: #192c25;
  font-size: 22px;
  line-height: 1.3;
}

.ui-v4 .edm-compose-head p {
  margin: 0;
  color: #65736d;
  font-size: 11px;
  line-height: 1.7;
}

.ui-v4 .edm-compose-command {
  display: grid;
  justify-items: end;
  gap: 10px;
  min-width: 230px;
}

.ui-v4 .edm-compose-command > span {
  max-width: 260px;
  overflow: hidden;
  color: #6b7872;
  font-size: 10px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ui-v4 .edm-compose-command button {
  min-width: 164px;
}

.ui-v4 .edm-compose-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid #dfe5e1;
  border-bottom: 1px solid #dfe5e1;
  background: #f7f9f8;
}

.ui-v4 .edm-compose-flow > div {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  column-gap: 11px;
  align-content: center;
  min-width: 0;
  min-height: 92px;
  padding: 18px 22px;
  border-right: 1px solid #dfe5e1;
}

.ui-v4 .edm-compose-flow > div:last-child {
  border-right: 0;
}

.ui-v4 .edm-compose-flow span {
  display: grid;
  grid-row: 1 / 3;
  place-items: center;
  align-self: start;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  color: #fff;
  background: #176f59;
  font-size: 10px;
  font-weight: 800;
}

.ui-v4 .edm-compose-flow > div:nth-child(2) span {
  background: #315f7b;
}

.ui-v4 .edm-compose-flow > div:nth-child(3) span {
  background: #9a6a22;
}

.ui-v4 .edm-compose-flow strong,
.ui-v4 .edm-compose-flow small {
  display: block;
  min-width: 0;
}

.ui-v4 .edm-compose-flow strong {
  color: #253831;
  font-size: 11px;
}

.ui-v4 .edm-compose-flow small {
  margin-top: 5px;
  color: #78847f;
  font-size: 9px;
  line-height: 1.45;
}

.ui-v4 .edm-compose-assurance {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 22px;
  color: #5f6d67;
  background: #fff;
  font-size: 10px;
}

.ui-v4 .edm-compose-assurance svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: #18725b;
}

.ui-v4 .edm-compose-assurance strong {
  margin-right: 7px;
  color: #29433a;
}

.ui-v4 .legacy-edm-compose-state {
  display: none !important;
}

/* EDM recipient-first composer */
.ui-v4 .edm-recipient-launch {
  display: grid;
  grid-template-columns: 34px minmax(240px, 1fr) auto;
  gap: 13px;
  align-items: center;
  margin-bottom: 14px;
  padding: 15px 17px;
  border: 1px solid #cad9d3;
  border-left: 3px solid #14745e;
  border-radius: 7px;
  background: #f5faf7;
}

.ui-v4 .edm-recipient-step,
.ui-v4 .batch-section-heading > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 50%;
  color: #fff;
  background: #176f59;
  font-size: 11px;
  font-weight: 800;
}

.ui-v4 .edm-recipient-copy strong,
.ui-v4 .edm-recipient-copy span,
.ui-v4 .edm-recipient-action > span {
  display: block;
}

.ui-v4 .edm-recipient-copy strong {
  color: #1d3029;
  font-size: 13px;
}

.ui-v4 .edm-recipient-copy span {
  margin-top: 4px;
  color: #6c7a74;
  font-size: 10px;
  line-height: 1.55;
}

.ui-v4 .edm-recipient-action {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.ui-v4 .edm-recipient-action > span {
  max-width: 230px;
  overflow: hidden;
  color: #52635c;
  font-size: 10px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ui-v4 .batch-email-dialog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: hidden;
}

.ui-v4 .batch-email-dialog .modal-head {
  align-items: center;
  padding: 16px 20px;
}

.ui-v4 .batch-email-dialog .modal-head h2 {
  margin-top: 4px;
  color: #182921;
  font-size: 19px;
}

.ui-v4 .batch-email-dialog .modal-head p {
  max-width: 780px;
  line-height: 1.55;
}

.ui-v4 .batch-email-body {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.ui-v4 .batch-recipient-panel,
.ui-v4 .batch-content-panel {
  min-width: 0;
  min-height: 0;
}

.ui-v4 .batch-recipient-panel {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  padding: 18px 15px 14px;
  border-right: 1px solid #dce3df;
  background: #f7f9f8;
}

.ui-v4 .batch-content-panel {
  padding: 18px 20px 22px;
  overflow-y: auto;
  background: #fff;
}

.ui-v4 .batch-section-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ui-v4 .batch-section-heading > div {
  min-width: 0;
}

.ui-v4 .batch-section-heading strong,
.ui-v4 .batch-section-heading small {
  display: block;
}

.ui-v4 .batch-section-heading strong {
  color: #21332c;
  font-size: 12px;
}

.ui-v4 .batch-section-heading small {
  margin-top: 3px;
  overflow: hidden;
  color: #75817c;
  font-size: 9px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ui-v4 .batch-recipient-search {
  position: relative;
  margin-top: 15px;
}

.ui-v4 .batch-recipient-search svg {
  position: absolute;
  top: 50%;
  left: 10px;
  width: 15px;
  height: 15px;
  color: #7f8a85;
  transform: translateY(-50%);
}

.ui-v4 .batch-recipient-search input {
  width: 100%;
  padding-left: 32px;
  background: #fff;
}

.ui-v4 .batch-recipient-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  border-bottom: 1px solid #dfe5e2;
}

.ui-v4 .batch-recipient-tools label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 7px;
  color: #596760;
  font-size: 10px;
  font-weight: 700;
}

.ui-v4 .batch-recipient-tools input {
  width: 15px;
  height: 15px;
  min-height: 0;
}

.ui-v4 .batch-recipient-tools strong {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 22px;
  padding: 0 7px;
  border-radius: 4px;
  color: #176a55;
  background: #e3f0ea;
  font-size: 10px;
}

.ui-v4 .batch-recipient-list {
  min-height: 180px;
  overflow-y: auto;
}

.ui-v4 .batch-recipient-row {
  display: grid;
  grid-template-columns: 18px 32px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 64px;
  padding: 9px 5px;
  border-bottom: 1px solid #e2e7e4;
  cursor: pointer;
}

.ui-v4 .batch-recipient-row:hover,
.ui-v4 .batch-recipient-row.selected {
  background: #edf5f1;
}

.ui-v4 .batch-recipient-row input {
  width: 15px;
  height: 15px;
  min-height: 0;
}

.ui-v4 .batch-recipient-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  color: #225f4f;
  background: #dcece5;
  font-size: 9px;
  font-weight: 800;
}

.ui-v4 .batch-recipient-row > span:last-child {
  min-width: 0;
}

.ui-v4 .batch-recipient-row strong,
.ui-v4 .batch-recipient-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ui-v4 .batch-recipient-row strong {
  color: #24362f;
  font-size: 10px;
}

.ui-v4 .batch-recipient-row small {
  margin-top: 3px;
  color: #78847f;
  font-size: 8px;
}

.ui-v4 .batch-recipient-empty {
  padding: 38px 12px;
  color: #7a8680;
  font-size: 10px;
  line-height: 1.6;
  text-align: center;
}

.ui-v4 .batch-personalization-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 15px 0 13px;
  padding: 10px 12px;
  border: 1px solid #cde1d8;
  border-radius: 6px;
  color: #2b5548;
  background: #f1f8f5;
}

.ui-v4 .batch-personalization-note svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: #167159;
}

.ui-v4 .batch-personalization-note strong,
.ui-v4 .batch-personalization-note span {
  display: block;
}

.ui-v4 .batch-personalization-note strong {
  font-size: 10px;
}

.ui-v4 .batch-personalization-note span {
  margin-top: 3px;
  color: #62746c;
  font-size: 9px;
  line-height: 1.5;
}

.ui-v4 .batch-campaign-product small {
  display: block;
  margin-top: 5px;
  color: #74817b;
  font-size: 9px;
  font-weight: 500;
  line-height: 1.5;
}

.ui-v4 .batch-campaign-product code {
  padding: 1px 4px;
  border: 1px solid #d7e2dd;
  border-radius: 3px;
  color: #176b55;
  background: #f3f8f5;
  font: 8px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.ui-v4 .batch-sequence-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 14px;
  padding-bottom: 11px;
  border-bottom: 1px solid #dfe5e2;
}

.ui-v4 .batch-sequence-tabs button {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 8px;
  align-items: center;
  min-height: 52px;
  padding: 7px 9px;
  border-color: #d8dfdc;
  color: #52635c;
  background: #f8faf9;
  text-align: left;
}

.ui-v4 .batch-sequence-tabs button > span {
  display: grid;
  grid-row: 1 / 3;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #60716a;
  background: #e7ece9;
  font-size: 9px;
  font-weight: 800;
}

.ui-v4 .batch-sequence-tabs button strong,
.ui-v4 .batch-sequence-tabs button small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ui-v4 .batch-sequence-tabs button strong {
  color: #2b4038;
  font-size: 10px;
}

.ui-v4 .batch-sequence-tabs button small {
  color: #7a8781;
  font-size: 8px;
}

.ui-v4 .batch-sequence-tabs button.active {
  border-color: #85b8a5;
  color: #165f4c;
  background: #edf7f3;
  box-shadow: inset 0 -2px 0 #168063;
}

.ui-v4 .batch-sequence-tabs button.active > span {
  color: #fff;
  background: #168063;
}

.ui-v4 .batch-step-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.ui-v4 .batch-step-context span {
  color: #26483d;
  font-size: 10px;
  font-weight: 750;
}

.ui-v4 .batch-step-context small {
  color: #75827c;
  font-size: 9px;
  text-align: right;
}

.ui-v4 .batch-content-panel > label {
  margin-top: 11px;
}

.ui-v4 #batchEmailBody {
  min-height: 190px;
  resize: vertical;
  line-height: 1.7;
}

.ui-v4 .batch-variable-row {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 35px;
  overflow-x: auto;
}

.ui-v4 .batch-variable-row > span {
  margin-right: 3px;
  color: #7b8681;
  font-size: 9px;
  white-space: nowrap;
}

.ui-v4 .batch-variable-row button {
  min-height: 25px;
  padding: 4px 8px;
  border-color: #d9e0dc;
  color: #496159;
  background: #f8faf9;
  font-size: 9px;
  white-space: nowrap;
}

.ui-v4 .batch-signature-note {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  margin-top: 8px;
  padding: 8px 10px;
  border-left: 2px solid #a8c8bc;
  color: #7a8580;
  background: #f7f9f8;
  font-size: 9px;
}

.ui-v4 .batch-signature-note strong {
  overflow: hidden;
  color: #465850;
  font-weight: 700;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ui-v4 .batch-draft-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  margin-top: 4px;
}

.ui-v4 .batch-draft-row > span,
.ui-v4 .batch-draft-row button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #6c7a74;
  font-size: 9px;
}

.ui-v4 .batch-draft-row svg {
  width: 13px;
  height: 13px;
}

.ui-v4 .batch-draft-row button {
  min-height: 27px;
  padding: 4px 8px;
  border-color: transparent;
  color: #8b4b3b;
  background: transparent;
}

.ui-v4 .batch-recipient-row.fallback-name em {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 4px;
  border-radius: 3px;
  color: #8b5b18;
  background: #fff2d7;
  font-size: 7px;
  font-style: normal;
  font-weight: 700;
  vertical-align: 1px;
}

.ui-v4 .batch-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 17px;
  padding-top: 14px;
  border-top: 1px solid #e0e5e2;
}

.ui-v4 .batch-preview-head > div {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.ui-v4 .batch-preview-head span {
  color: #7a8580;
  font-size: 9px;
}

.ui-v4 .batch-preview-head strong {
  overflow: hidden;
  color: #2c4139;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ui-v4 .batch-preview-head .icon-button {
  width: 29px;
  min-height: 28px;
}

.ui-v4 .batch-recipient-personalization {
  margin-top: 9px;
  padding: 12px;
  border: 1px solid #cadbd4;
  border-radius: 6px;
  background: #f6faf8;
}

.ui-v4 .batch-recipient-personalization-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.ui-v4 .batch-recipient-personalization-head strong,
.ui-v4 .batch-recipient-personalization-head span {
  display: block;
}

.ui-v4 .batch-recipient-personalization-head strong {
  color: #263d35;
  font-size: 10px;
}

.ui-v4 .batch-recipient-personalization-head span {
  margin-top: 3px;
  color: #718079;
  font-size: 9px;
}

.ui-v4 .batch-recipient-personalization-head button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 5px 9px;
  color: #53675f;
  background: #fff;
  font-size: 9px;
  white-space: nowrap;
}

.ui-v4 .batch-recipient-personalization-head button svg {
  width: 13px;
  height: 13px;
}

.ui-v4 .batch-recipient-personalization > .grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ui-v4 .batch-email-preview {
  min-height: 130px;
  max-height: 250px;
  margin: 8px 0 0;
  padding: 13px 14px;
  overflow: auto;
  border: 1px solid #dbe2de;
  border-radius: 6px;
  color: #34463f;
  background: #fafbfa;
  font: 10px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.ui-v4 .batch-email-validation {
  display: flex;
  align-items: center;
  min-height: 34px;
  margin-top: 8px;
  padding: 7px 10px;
  border-left: 2px solid #aab8b2;
  color: #65736d;
  background: #f7f9f8;
  font-size: 9px;
  line-height: 1.5;
}

.ui-v4 .batch-email-validation.ready {
  border-left-color: #178064;
  color: #22634f;
  background: #eef8f4;
}

.ui-v4 .batch-email-validation.error {
  border-left-color: #b45b40;
  color: #8a432e;
  background: #fff5f1;
}

.ui-v4 .batch-email-validation.warning {
  border-left-color: #bc842a;
  color: #79551c;
  background: #fff8e9;
}

.ui-v4 .batch-send-settings {
  margin-top: 17px;
  padding-top: 15px;
  border-top: 1px solid #dfe5e2;
}

.ui-v4 .batch-send-settings > .grid {
  margin-top: 13px;
}

.ui-v4 .batch-mail-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 12px;
}

.ui-v4 .batch-email-capacity {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #d8e0dc;
  border-radius: 6px;
  color: #52635c;
  background: #f8faf9;
}

.ui-v4 .batch-email-capacity > svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: #547369;
}

.ui-v4 .batch-email-capacity strong,
.ui-v4 .batch-email-capacity span {
  display: block;
}

.ui-v4 .batch-email-capacity strong {
  color: #2a4038;
  font-size: 10px;
}

.ui-v4 .batch-email-capacity span {
  margin-top: 3px;
  color: #6e7d76;
  font-size: 9px;
  line-height: 1.5;
}

.ui-v4 .batch-email-capacity.ready {
  border-color: #b9d8cc;
  background: #f0f8f5;
}

.ui-v4 .batch-email-capacity.warning {
  border-color: #ead5a5;
  background: #fff9ec;
}

.ui-v4 .batch-email-capacity.warning > svg {
  color: #a66f16;
}

.ui-v4 .batch-final-confirm {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  align-items: flex-start;
  margin-top: 13px;
  padding: 11px 12px;
  border: 1px solid #d8dfdb;
  border-radius: 6px;
  background: #fafbfa;
  cursor: pointer;
}

.ui-v4 .batch-final-confirm:has(input:checked) {
  border-color: #9bc7b6;
  background: #eef7f3;
}

.ui-v4 .batch-final-confirm input {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin-top: 1px;
}

.ui-v4 .batch-final-confirm strong,
.ui-v4 .batch-final-confirm small {
  display: block;
}

.ui-v4 .batch-final-confirm strong {
  color: #32473f;
  font-size: 10px;
}

.ui-v4 .batch-final-confirm small {
  margin-top: 3px;
  color: #78837e;
  font-size: 9px;
  line-height: 1.45;
}

.ui-v4 .batch-email-foot {
  align-items: center;
}

.ui-v4 .batch-email-foot > span {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: auto;
  color: #697771;
  font-size: 9px;
}

.ui-v4 .batch-email-foot > span svg {
  width: 14px;
  height: 14px;
  color: #1a785f;
}

.ui-v4 .email-campaign-editor-dialog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: hidden;
}

.ui-v4 .email-campaign-editor-body {
  display: grid;
  gap: 11px;
  overflow-y: auto;
}

.ui-v4 .campaign-edit-step-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ui-v4 .campaign-edit-step-tabs button {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 8px;
  align-items: center;
  min-height: 52px;
  padding: 7px 9px;
  border-color: #d8dfdc;
  color: #52635c;
  background: #f8faf9;
  text-align: left;
}

.ui-v4 .campaign-edit-step-tabs button > span {
  display: grid;
  grid-row: 1 / 3;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e7ece9;
  font-size: 9px;
  font-weight: 800;
}

.ui-v4 .campaign-edit-step-tabs button strong,
.ui-v4 .campaign-edit-step-tabs button small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ui-v4 .campaign-edit-step-tabs button strong {
  color: #2b4038;
  font-size: 10px;
}

.ui-v4 .campaign-edit-step-tabs button small {
  color: #7a8781;
  font-size: 8px;
}

.ui-v4 .campaign-edit-step-tabs button.active {
  border-color: #85b8a5;
  background: #edf7f3;
  box-shadow: inset 0 -2px 0 #168063;
}

.ui-v4 .campaign-edit-step-tabs button.active > span {
  color: #fff;
  background: #168063;
}

.ui-v4 .campaign-edit-step-tabs button.sent {
  opacity: .62;
  cursor: not-allowed;
}

.ui-v4 #campaignEditBody {
  min-height: 230px;
  resize: vertical;
  line-height: 1.7;
}

.ui-v4 .edm-campaign-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 65px;
}

.ui-v4 .edm-campaign-actions .icon-button {
  width: 30px;
  min-width: 30px;
  min-height: 30px;
}

@media (max-width: 920px) {
  .ui-v4 .edm-compose-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
  }

  .ui-v4 .edm-compose-command {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    justify-items: stretch;
    width: 100%;
  }

  .ui-v4 .edm-compose-command > span {
    max-width: none;
    text-align: left;
  }

  .ui-v4 .edm-compose-flow {
    grid-template-columns: 1fr;
  }

  .ui-v4 .edm-compose-flow > div {
    min-height: 74px;
    border-right: 0;
    border-bottom: 1px solid #dfe5e1;
  }

  .ui-v4 .edm-compose-flow > div:last-child {
    border-bottom: 0;
  }

  .ui-v4 .edm-recipient-launch {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .ui-v4 .edm-recipient-action {
    grid-column: 2;
    justify-content: space-between;
  }

  .ui-v4 .batch-email-body {
    display: block;
    overflow-y: auto;
  }

  .ui-v4 .batch-recipient-panel {
    max-height: 390px;
    border-right: 0;
    border-bottom: 1px solid #dce3df;
  }

  .ui-v4 .batch-recipient-list {
    min-height: 160px;
    max-height: 230px;
  }

  .ui-v4 .batch-content-panel {
    overflow: visible;
  }
}

@media (max-width: 560px) {
  .ui-v4 .edm-compose-head {
    min-height: 0;
    padding: 20px 16px;
  }

  .ui-v4 .edm-compose-head h2 {
    font-size: 18px;
  }

  .ui-v4 .edm-compose-command {
    grid-template-columns: 1fr;
  }

  .ui-v4 .edm-compose-command button {
    width: 100%;
  }

  .ui-v4 .edm-compose-flow > div {
    padding: 15px 16px;
  }

  .ui-v4 .edm-compose-assurance {
    align-items: flex-start;
    padding: 12px 16px;
  }

  .ui-v4 .edm-compose-assurance strong {
    display: block;
    margin: 0 0 3px;
  }

  .ui-v4 .edm-recipient-launch {
    padding: 13px 12px;
  }

  .ui-v4 .edm-recipient-action {
    align-items: stretch;
    flex-direction: column;
  }

  .ui-v4 .edm-recipient-action > span {
    max-width: none;
    text-align: left;
  }

  .ui-v4 .batch-email-dialog {
    width: 100%;
    max-height: calc(100dvh - 40px);
    border: 0;
    border-radius: 0;
  }

  .ui-v4 .batch-email-dialog .modal-head,
  .ui-v4 .batch-content-panel {
    padding-right: 14px;
    padding-left: 14px;
  }

  .ui-v4 .batch-recipient-personalization-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .ui-v4 .batch-recipient-personalization-head button {
    width: 100%;
    justify-content: center;
  }

  .ui-v4 .batch-recipient-personalization > .grid {
    grid-template-columns: 1fr;
  }

  .ui-v4 .batch-mail-summary {
    grid-template-columns: 1fr;
  }

  .ui-v4 .batch-email-foot > span {
    display: none;
  }
}

/* Commercial subscription workspace */
.ui-v4 .billing-page > .head {
  align-items: center;
}

.ui-v4 .billing-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ui-v4 .billing-head-actions > button:not(.icon-button) {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  color: #365149;
  border-color: #cfd8d3;
  background: #fff;
}

.ui-v4 .billing-head-actions svg {
  width: 14px;
  height: 14px;
}

.ui-v4 .billing-content {
  display: grid;
  gap: 26px;
  padding: 18px 0 6px;
}

.ui-v4 .billing-eyebrow {
  display: block;
  color: #648078;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.3;
  text-transform: uppercase;
}

.ui-v4 .billing-overview {
  display: grid;
  grid-template-columns: minmax(250px, .78fr) minmax(0, 1.72fr);
  min-height: 176px;
  overflow: hidden;
  border: 1px solid #243a33;
  border-radius: 7px;
  color: #f4f7f5;
  background: #172a24;
  box-shadow: 0 10px 28px rgba(19, 39, 31, .1);
}

.ui-v4 .billing-current {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 28px 30px;
  border-right: 1px solid rgba(255, 255, 255, .13);
}

.ui-v4 .billing-current > .billing-eyebrow {
  color: #9eb7ae;
}

.ui-v4 .billing-current-loading strong,
.ui-v4 .billing-current-loading span {
  display: block;
}

.ui-v4 .billing-current-loading strong {
  margin-top: 10px;
  font-size: 22px;
}

.ui-v4 .billing-current-loading span {
  margin-top: 6px;
  color: #aebdb7;
  font-size: 10px;
}

.ui-v4 .billing-current-title {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}

.ui-v4 .billing-current-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(186, 228, 211, .24);
  border-radius: 6px;
  color: #c5f0df;
  background: rgba(82, 151, 123, .18);
}

.ui-v4 .billing-current-icon svg {
  width: 19px;
  height: 19px;
}

.ui-v4 .billing-current-title > div:nth-child(2) {
  min-width: 0;
}

.ui-v4 .billing-current-title strong,
.ui-v4 .billing-current-title span {
  display: block;
}

.ui-v4 .billing-current-title strong {
  overflow: hidden;
  color: #fff;
  font-size: 21px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ui-v4 .billing-current-title > div:nth-child(2) span {
  margin-top: 5px;
  overflow: hidden;
  color: #aebdb7;
  font-size: 10px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ui-v4 .billing-current-title > .badge {
  grid-column: 2;
  justify-self: start;
  margin-top: -4px;
  color: #dff5ec;
  border-color: rgba(189, 231, 214, .22);
  background: rgba(86, 151, 125, .24);
}

.ui-v4 .billing-current-title > .badge.warn {
  color: #ffe4ad;
  border-color: rgba(245, 198, 107, .28);
  background: rgba(151, 107, 35, .24);
}

.ui-v4 .billing-current-title > .badge.bad {
  color: #ffd3ca;
  border-color: rgba(240, 146, 126, .28);
  background: rgba(153, 65, 49, .24);
}

.ui-v4 .billing-overview-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
}

.ui-v4 .billing-overview-metric {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 26px 24px;
  border-right: 1px solid rgba(255, 255, 255, .1);
}

.ui-v4 .billing-overview-metric:last-child {
  border-right: 0;
}

.ui-v4 .billing-overview-metric > span,
.ui-v4 .billing-overview-metric > small {
  display: block;
  color: #aabbb4;
  font-size: 9px;
}

.ui-v4 .billing-overview-metric > strong {
  display: block;
  margin: 9px 0 7px;
  overflow: hidden;
  color: #fff;
  font-size: 20px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ui-v4 .billing-overview-metric > small {
  overflow: hidden;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ui-v4 .billing-quota-track {
  width: 100%;
  height: 4px;
  margin: 1px 0 8px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(255, 255, 255, .14);
}

.ui-v4 .billing-quota-track > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #edb84c;
  transition: width .35s ease;
}

.ui-v4 .billing-plan-section {
  min-width: 0;
}

.ui-v4 .billing-plan-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
}

.ui-v4 .billing-plan-toolbar h3 {
  margin: 5px 0 0;
  color: #18251f;
  font-size: 18px;
}

.ui-v4 .billing-plan-toolbar p {
  margin: 5px 0 0;
  color: #75817b;
  font-size: 10px;
}

.ui-v4 .billing-cycle-toggle {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  flex: 0 0 auto;
  padding: 3px;
  border: 1px solid #d3dad6;
  border-radius: 6px;
  background: #edf0ee;
}

.ui-v4 .billing-cycle-toggle button {
  min-width: 86px;
  min-height: 31px;
  padding: 5px 10px;
  border: 0;
  border-radius: 4px;
  color: #68746e;
  background: transparent;
  box-shadow: none;
  font-size: 10px;
}

.ui-v4 .billing-cycle-toggle button span {
  margin-left: 3px;
  color: #a26019;
  font-size: 8px;
}

.ui-v4 .billing-cycle-toggle button.active {
  color: #1e3129;
  background: #fff;
  box-shadow: 0 1px 4px rgba(28, 45, 37, .1);
}

.ui-v4 .billing-plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.ui-v4 .billing-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 424px;
  padding: 20px;
  border: 1px solid #d7ddd9;
  border-radius: 7px;
  color: #25332c;
  background: #fff;
  box-shadow: 0 1px 2px rgba(23, 38, 31, .035), 0 10px 26px rgba(23, 38, 31, .035);
}

.ui-v4 .billing-plan:last-child {
  border-right: 1px solid #d7ddd9;
}

.ui-v4 .billing-plan.recommended {
  border-color: #8bb9a8;
  box-shadow: inset 0 3px 0 #0b6b55, 0 1px 2px rgba(23, 38, 31, .04), 0 12px 28px rgba(19, 78, 59, .07);
}

.ui-v4 .billing-plan.current {
  border-color: #6c93ad;
  box-shadow: inset 0 3px 0 #346b8c, 0 1px 2px rgba(23, 38, 31, .04), 0 12px 28px rgba(37, 79, 106, .07);
}

.ui-v4 .billing-plan-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
  gap: 10px;
}

.ui-v4 .billing-plan-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  color: #346b8c;
  background: #e7f0f5;
}

.ui-v4 .billing-plan:nth-child(2) .billing-plan-icon {
  color: #0b6b55;
  background: #e1f0e9;
}

.ui-v4 .billing-plan:nth-child(3) .billing-plan-icon {
  color: #95621b;
  background: #f8edd8;
}

.ui-v4 .billing-plan-icon svg {
  width: 16px;
  height: 16px;
}

.ui-v4 .billing-plan-flags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.ui-v4 .billing-plan-flag {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 3px 7px;
  border: 1px solid #d8dfdb;
  border-radius: 4px;
  color: #65716b;
  background: #f5f7f6;
  font-size: 8px;
  font-weight: 800;
}

.ui-v4 .billing-plan-flag.recommended {
  color: #0a624e;
  border-color: #bad9cd;
  background: #e8f4ef;
}

.ui-v4 .billing-plan-flag.current {
  color: #285d7b;
  border-color: #c3d7e3;
  background: #edf4f8;
}

.ui-v4 .billing-plan-flag.pending {
  color: #8b5a18;
  border-color: #ead4ad;
  background: #fff6e5;
}

.ui-v4 .billing-plan-eyebrow {
  display: block;
  margin-top: 16px;
  color: #718079;
  font-size: 9px;
  font-weight: 750;
}

.ui-v4 .billing-plan h3 {
  margin: 4px 0 0;
  color: #15231d;
  font-size: 18px;
}

.ui-v4 .billing-plan-summary {
  min-height: 34px;
  margin: 7px 0 0;
  color: #707d76;
  font-size: 10px;
  line-height: 1.65;
}

.ui-v4 .billing-plan-price {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin: 17px 0 0;
}

.ui-v4 .billing-plan-price strong {
  color: #12231c;
  font-size: 28px;
  line-height: 1;
}

.ui-v4 .billing-plan-price span {
  color: #6f7b75;
  font-size: 10px;
}

.ui-v4 .billing-plan-charge {
  min-height: 17px;
  margin-top: 7px;
  color: #8b641e;
  font-size: 9px;
}

.ui-v4 .billing-plan-divider {
  height: 1px;
  margin: 16px 0 13px;
  background: #e3e8e5;
}

.ui-v4 .billing-plan ul {
  display: grid;
  gap: 10px;
  min-height: 0;
  margin: 0 0 18px;
  padding: 0;
  color: #506059;
  font-size: 10px;
  line-height: 1.5;
  list-style: none;
}

.ui-v4 .billing-plan li {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 7px;
  align-items: start;
}

.ui-v4 .billing-plan li > svg {
  width: 14px;
  height: 14px;
  margin-top: 1px;
  color: #168266;
}

.ui-v4 .billing-plan li strong {
  color: #273831;
}

.ui-v4 .billing-plan > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 38px;
  margin-top: auto;
}

.ui-v4 .billing-plan > button svg {
  width: 14px;
  height: 14px;
}

.ui-v4 .billing-plan > button:disabled {
  color: #86918c;
  border-color: #dde2df;
  background: #f1f3f2;
  cursor: not-allowed;
}

.ui-v4 .billing-plan-skeleton {
  min-height: 424px;
  border: 1px solid #dde2df;
  border-radius: 7px;
  background: linear-gradient(90deg, #f5f7f5 25%, #ecefed 50%, #f5f7f5 75%);
  background-size: 220% 100%;
  animation: billingSkeleton 1.4s ease-in-out infinite;
}

@keyframes billingSkeleton {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

.ui-v4 .billing-purchase-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: #6b7771;
  font-size: 9px;
}

.ui-v4 .billing-purchase-note svg {
  width: 14px;
  height: 14px;
  color: #33715d;
}

.ui-v4 .billing-records {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d5dcd8;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(23, 38, 31, .03);
  scroll-margin-top: 24px;
}

.ui-v4 .billing-records-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 54px;
  padding: 0 16px;
  border-bottom: 1px solid #dfe4e1;
  background: #f7f8f6;
}

.ui-v4 .billing-record-tabs {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  gap: 22px;
}

.ui-v4 .billing-record-tabs button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 52px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #728078;
  background: transparent;
  box-shadow: none;
  font-size: 10px;
}

.ui-v4 .billing-record-tabs button::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  content: "";
  background: transparent;
}

.ui-v4 .billing-record-tabs button.active {
  color: #174b3c;
}

.ui-v4 .billing-record-tabs button.active::after {
  background: #0b6b55;
}

.ui-v4 .billing-record-tabs svg {
  width: 14px;
  height: 14px;
}

.ui-v4 .billing-records-head .feedback-status {
  max-width: 52%;
  margin: 0;
  overflow: hidden;
  color: #6c7872;
  font-size: 9px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ui-v4 .billing-record-panel {
  min-width: 0;
}

.ui-v4 .billing-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 14px 18px;
}

.ui-v4 .billing-panel-heading h3 {
  margin: 0;
  color: #213029;
  font-size: 14px;
}

.ui-v4 .billing-panel-heading p {
  margin: 4px 0 0;
  color: #7a857f;
  font-size: 9px;
}

.ui-v4 .billing-record-count {
  flex: 0 0 auto;
  color: #63716a;
  font-size: 9px;
  font-weight: 750;
}

.ui-v4 .billing-order-table-wrap {
  max-height: 390px;
  overflow: auto;
  border: 0;
  border-top: 1px solid #e2e7e4;
  border-radius: 0;
}

.ui-v4 #billingOrderTable {
  min-width: 790px;
}

.ui-v4 #billingOrderTable th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f3f5f3;
}

.ui-v4 #billingOrderTable td {
  vertical-align: middle;
}

.ui-v4 #billingOrderTable td > strong {
  color: #304039;
}

.ui-v4 #billingOrderTable button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 4px 8px;
  color: #235f4d;
  font-size: 8px;
}

.ui-v4 #billingOrderTable button svg {
  width: 12px;
  height: 12px;
}

.ui-v4 .billing-invoice-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #30705b;
  font-size: 9px;
  font-weight: 750;
}

.ui-v4 .billing-invoice-state svg {
  width: 12px;
  height: 12px;
}

.ui-v4 .billing-empty-state {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-height: 180px;
  padding: 34px;
  color: #7b8781;
  text-align: center;
}

.ui-v4 .billing-empty-state svg {
  width: 24px;
  height: 24px;
  margin-bottom: 4px;
  color: #789287;
}

.ui-v4 .billing-empty-state strong {
  color: #415149 !important;
  font-size: 11px;
}

.ui-v4 .billing-empty-state span {
  font-size: 9px;
}

.ui-v4 .billing-invoice-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px 16px;
  padding: 4px 18px 18px;
}

.ui-v4 .billing-invoice-form label {
  min-width: 0;
}

.ui-v4 .billing-invoice-form .billing-field-wide {
  grid-column: 1 / -1;
}

.ui-v4 .billing-invoice-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 10px 18px;
  border-top: 1px solid #e1e6e3;
  background: #f8f9f8;
}

.ui-v4 .billing-invoice-actions > span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #75817b;
  font-size: 9px;
}

.ui-v4 .billing-invoice-actions > span svg {
  width: 13px;
  height: 13px;
  color: #4d6d61;
}

.ui-v4 .billing-checkout-dialog {
  width: min(660px, 100%);
}

.ui-v4 .billing-checkout-dialog .modal-head {
  align-items: center;
}

.ui-v4 .billing-checkout-dialog .modal-head h2 {
  margin-top: 4px;
  font-size: 20px;
}

.ui-v4 .billing-checkout-summary {
  overflow: hidden;
  border: 1px solid #d8dfdb;
  border-radius: 7px;
  background: #fff;
}

.ui-v4 .billing-checkout-plan {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #e0e5e2;
  background: #f6f8f6;
}

.ui-v4 .billing-checkout-plan .billing-plan-icon {
  width: 38px;
  height: 38px;
  color: #0b6b55;
  background: #e1f0e9;
}

.ui-v4 .billing-checkout-plan span,
.ui-v4 .billing-checkout-plan strong,
.ui-v4 .billing-checkout-plan small {
  display: block;
}

.ui-v4 .billing-checkout-plan span {
  color: #708078;
  font-size: 8px;
  font-weight: 750;
}

.ui-v4 .billing-checkout-plan strong {
  margin-top: 2px;
  color: #1c3027;
  font-size: 14px;
}

.ui-v4 .billing-checkout-plan small {
  margin-top: 3px;
  color: #738079;
  font-size: 9px;
}

.ui-v4 .billing-checkout-summary dl {
  margin: 0;
  padding: 8px 16px;
}

.ui-v4 .billing-checkout-summary dl > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 38px;
  border-bottom: 1px solid #edf0ee;
}

.ui-v4 .billing-checkout-summary dl > div:last-child {
  border-bottom: 0;
}

.ui-v4 .billing-checkout-summary dt {
  color: #718078;
  font-size: 9px;
}

.ui-v4 .billing-checkout-summary dd {
  margin: 0;
  color: #34463e;
  font-size: 10px;
  font-weight: 750;
}

.ui-v4 .billing-checkout-summary dd.saving {
  color: #9a5c13;
}

.ui-v4 .billing-checkout-summary .total dd {
  color: #173b30;
  font-size: 17px;
}

.ui-v4 .billing-checkout-flow {
  display: grid;
  grid-template-columns: 1fr 20px 1fr 20px 1fr;
  gap: 7px;
  align-items: center;
  margin-top: 16px;
  padding: 13px 14px;
  border: 1px solid #dce3df;
  border-radius: 7px;
  background: #f8faf8;
}

.ui-v4 .billing-checkout-flow > div {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 2px 7px;
  align-items: center;
}

.ui-v4 .billing-checkout-flow > div > span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #fff;
  background: #2b6f59;
  font-size: 8px;
  font-weight: 800;
}

.ui-v4 .billing-checkout-flow strong,
.ui-v4 .billing-checkout-flow small {
  display: block;
}

.ui-v4 .billing-checkout-flow strong {
  color: #33443c;
  font-size: 9px;
}

.ui-v4 .billing-checkout-flow small {
  color: #829089;
  font-size: 8px;
}

.ui-v4 .billing-checkout-flow > svg {
  width: 13px;
  height: 13px;
  color: #9ca7a1;
  justify-self: center;
}

.ui-v4 .billing-terms {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 14px;
  padding: 12px 13px;
  border: 1px solid #dce2df;
  border-radius: 6px;
  color: #5d6b64;
  background: #fff;
  cursor: pointer;
}

.ui-v4 .billing-terms input {
  width: 15px;
  min-width: 15px;
  height: 15px;
  min-height: 15px;
  margin: 1px 0 0;
  padding: 0;
  accent-color: #0b6b55;
}

.ui-v4 .billing-terms span {
  font-size: 9px;
  line-height: 1.55;
}

.ui-v4 .billing-terms a {
  color: #0a6651;
}

.ui-v4 #confirmBillingCheckout.is-loading svg {
  animation: billingSpin .8s linear infinite;
}

@keyframes billingSpin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1180px) {
  .ui-v4 .billing-overview {
    grid-template-columns: 1fr;
  }

  .ui-v4 .billing-current {
    padding: 22px 24px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .13);
  }
}

@media (max-width: 900px) {
  .ui-v4 .billing-plans {
    grid-template-columns: 1fr;
  }

  .ui-v4 .billing-plan {
    min-height: 0;
  }

  .ui-v4 .billing-plan:last-child {
    border-bottom: 1px solid #d7ddd9;
  }
}

@media (max-width: 680px) {
  .ui-v4 .billing-page > .head,
  .ui-v4 .billing-plan-toolbar,
  .ui-v4 .billing-invoice-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .ui-v4 .billing-head-actions {
    align-self: flex-start;
  }

  .ui-v4 .billing-cycle-toggle {
    width: 100%;
  }

  .ui-v4 .billing-overview-metrics,
  .ui-v4 .billing-invoice-form {
    grid-template-columns: 1fr;
  }

  .ui-v4 .billing-overview-metric {
    padding: 18px 22px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
  }

  .ui-v4 .billing-overview-metric:last-child {
    border-bottom: 0;
  }

  .ui-v4 .billing-invoice-form .billing-field-wide {
    grid-column: auto;
  }

  .ui-v4 .billing-records-head {
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    padding-top: 3px;
  }

  .ui-v4 .billing-record-tabs {
    min-height: 50px;
  }

  .ui-v4 .billing-records-head .feedback-status {
    max-width: none;
    min-height: 0;
    padding-bottom: 8px;
    text-align: left;
    white-space: normal;
  }

  .ui-v4 .billing-checkout-flow {
    grid-template-columns: 1fr;
  }

  .ui-v4 .billing-checkout-flow > svg {
    display: none;
  }
}

/* WhatsApp conversation entry and customer callback flow */
.ui-v4 .comms-inbox-actions {
  align-items: center;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 5px;
  white-space: nowrap;
}

.ui-v4 .comms-inbox-actions .new-chat-button {
  min-height: 34px;
  padding: 0 9px;
  border-color: #176f59;
  border-radius: 6px;
  color: #fff;
  background: #176f59;
  box-shadow: none;
  font-size: 10px;
  font-weight: 750;
  flex: 0 0 auto;
  white-space: nowrap;
}

.ui-v4 .comms-inbox-actions .new-chat-button:hover {
  border-color: #115744;
  color: #fff;
  background: #115744;
}

.ui-v4 .comms-inbox-actions .new-chat-button svg {
  width: 14px;
  height: 14px;
}

.ui-v4 .comms-inbox-foot {
  grid-template-columns: 1fr;
}

.ui-v4 .lead-contact-cell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 7px;
  align-items: center;
  min-width: 0;
}

.ui-v4 .lead-contact-cell > div {
  min-width: 0;
}

.ui-v4 .lead-row-whatsapp {
  display: inline-grid;
  place-items: center;
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border-color: #b8d9cc;
  border-radius: 6px;
  color: #0d7658;
  background: #edf8f3;
  box-shadow: none;
}

.ui-v4 .lead-row-whatsapp:hover:not(:disabled) {
  border-color: #5ca98c;
  color: #fff;
  background: #16765c;
}

.ui-v4 .lead-row-whatsapp:disabled {
  opacity: .45;
}

.ui-v4 .lead-row-whatsapp svg {
  width: 16px;
  height: 16px;
}

.ui-v4 .lead-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ui-v4 .lead-actions .lead-whatsapp-primary:not(:disabled) {
  border-color: #15755b;
  color: #fff;
  background: #15755b;
}

.ui-v4 .lead-actions .lead-whatsapp-primary:hover:not(:disabled) {
  border-color: #0f5d48;
  color: #fff;
  background: #0f5d48;
}

.ui-v4 .new-chat-backdrop {
  position: fixed;
  z-index: 2400;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(18, 31, 26, .48);
  backdrop-filter: blur(4px);
}

.ui-v4 .new-chat-dialog {
  display: grid;
  grid-template-rows: auto auto auto minmax(180px, 1fr);
  width: min(590px, 100%);
  max-height: min(720px, calc(100dvh - 48px));
  overflow: hidden;
  border: 1px solid #cad5d0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(16, 35, 28, .24);
}

.ui-v4 .new-chat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 21px 22px 18px;
  border-bottom: 1px solid #e1e7e4;
}

.ui-v4 .new-chat-head > div {
  min-width: 0;
}

.ui-v4 .new-chat-head span {
  display: block;
  color: #16765c;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.ui-v4 .new-chat-head h3 {
  margin: 4px 0 5px;
  color: #17251f;
  font-size: 19px;
  line-height: 1.25;
}

.ui-v4 .new-chat-head p {
  max-width: 470px;
  margin: 0;
  color: #6c7973;
  font-size: 11px;
  line-height: 1.6;
}

.ui-v4 .new-chat-search {
  position: relative;
  padding: 15px 18px 8px;
}

.ui-v4 .new-chat-search svg {
  position: absolute;
  top: 27px;
  left: 31px;
  width: 15px;
  height: 15px;
  color: #788780;
  pointer-events: none;
}

.ui-v4 .new-chat-search input {
  width: 100%;
  height: 42px;
  padding: 0 13px 0 38px;
  border-color: #cfd9d5;
  border-radius: 6px;
  background: #f8faf9;
  font-size: 12px;
}

.ui-v4 .new-chat-search input:focus {
  border-color: #579b82;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(34, 128, 96, .1);
}

.ui-v4 .new-chat-connection-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 18px 9px;
  padding: 8px 10px;
  border: 1px solid #dbe4e0;
  border-radius: 6px;
  color: #52625b;
  background: #f7f9f8;
  font-size: 10px;
}

.ui-v4 .new-chat-connection-hint.ready {
  border-color: #c6dfd5;
  color: #245f4d;
  background: #eef7f3;
}

.ui-v4 .new-chat-connection-hint.warning {
  border-color: #e7dcb7;
  color: #735f22;
  background: #fffaf0;
}

.ui-v4 .new-chat-connection-hint svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.ui-v4 .new-chat-lead-list {
  min-height: 180px;
  padding: 3px 10px 12px;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.ui-v4 .new-chat-lead {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  width: 100%;
  min-height: 67px;
  padding: 9px 11px;
  border: 0;
  border-bottom: 1px solid #e9edeb;
  border-radius: 0;
  color: #27372f;
  background: #fff;
  box-shadow: none;
  text-align: left;
}

.ui-v4 .new-chat-lead:hover:not(:disabled) {
  color: #1d3028;
  background: #f1f7f4;
}

.ui-v4 .new-chat-lead:disabled {
  opacity: .58;
  cursor: not-allowed;
}

.ui-v4 .new-chat-lead-avatar,
.ui-v4 .new-conversation-avatar {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 7px;
  color: #11654e;
  background: #dff0e9;
  font-size: 11px;
  font-weight: 800;
}

.ui-v4 .new-chat-lead-copy {
  display: block;
  min-width: 0;
}

.ui-v4 .new-chat-lead-copy strong,
.ui-v4 .new-chat-lead-copy small,
.ui-v4 .new-chat-lead-copy em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ui-v4 .new-chat-lead-copy strong {
  color: #23332c;
  font-size: 11px;
}

.ui-v4 .new-chat-lead-copy small {
  margin-top: 3px;
  color: #7b8782;
  font-size: 9px;
}

.ui-v4 .new-chat-lead-copy em {
  margin-top: 3px;
  color: #4a6258;
  font-size: 9px;
  font-style: normal;
}

.ui-v4 .new-chat-lead-owner {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #176f59;
  font-size: 9px;
  font-weight: 750;
  white-space: nowrap;
}

.ui-v4 .new-chat-lead-owner svg {
  width: 14px;
  height: 14px;
}

.ui-v4 .new-chat-empty,
.ui-v4 .new-chat-loading {
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 230px;
  padding: 30px;
  color: #738079;
  text-align: center;
}

.ui-v4 .new-chat-empty svg,
.ui-v4 .new-chat-loading svg {
  width: 28px;
  height: 28px;
  margin-bottom: 10px;
  color: #568474;
}

.ui-v4 .new-chat-loading svg {
  animation: tradelead-spin 1s linear infinite;
}

.ui-v4 .new-chat-empty strong {
  color: #35473f;
  font-size: 12px;
}

.ui-v4 .new-chat-empty span,
.ui-v4 .new-chat-loading span {
  max-width: 330px;
  margin-top: 5px;
  font-size: 10px;
  line-height: 1.55;
}

.ui-v4 .new-conversation-thread {
  display: grid;
  min-height: 100%;
}

.ui-v4 .new-conversation-welcome {
  align-self: center;
  justify-self: center;
  max-width: 390px;
  padding: 26px;
  color: #6b7772;
  text-align: center;
}

.ui-v4 .new-conversation-welcome .new-conversation-avatar {
  width: 48px;
  height: 48px;
  margin: 0 auto 13px;
  font-size: 13px;
}

.ui-v4 .new-conversation-welcome strong,
.ui-v4 .new-conversation-welcome p,
.ui-v4 .new-conversation-welcome small {
  display: block;
}

.ui-v4 .new-conversation-welcome strong {
  color: #26372f;
  font-size: 14px;
}

.ui-v4 .new-conversation-welcome p {
  margin: 6px 0;
  color: #496258;
  font-size: 11px;
}

.ui-v4 .new-conversation-welcome small {
  font-size: 10px;
  line-height: 1.55;
}

@keyframes tradelead-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 680px) {
  .ui-v4 .comms-inbox-actions .new-chat-button {
    width: 34px;
    min-width: 34px;
    padding: 0;
  }

  .ui-v4 .comms-inbox-actions .new-chat-button span {
    display: none;
  }

  .ui-v4 .new-chat-backdrop {
    place-items: end center;
    padding: 0;
  }

  .ui-v4 .new-chat-dialog {
    width: 100%;
    max-height: 88dvh;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 8px 8px 0 0;
  }

  .ui-v4 .new-chat-head {
    padding: 18px 16px 15px;
  }

  .ui-v4 .new-chat-search {
    padding-right: 14px;
    padding-left: 14px;
  }

  .ui-v4 .new-chat-search svg {
    left: 27px;
  }

  .ui-v4 .new-chat-connection-hint {
    margin-right: 14px;
    margin-left: 14px;
  }

  .ui-v4 .new-chat-lead {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .ui-v4 .new-chat-lead-owner {
    grid-column: 2;
  }
}

/* Keep the customer detail header visible while the form scrolls inside the viewport. */
.ui-v4 .lead-detail-drawer {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  overflow: hidden;
  overscroll-behavior: contain;
}

.ui-v4 .lead-detail-drawer > .head {
  position: relative;
  top: auto;
  flex: 0 0 auto;
}

.ui-v4 [data-page="leads"] > .lead-detail-drawer > .content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 680px) {
  .ui-v4 .lead-detail-drawer {
    inset: 0;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    width: 100%;
    border: 0;
    border-radius: 0;
  }
}

@media (max-height: 720px) and (min-width: 761px) {
  .ui-v4 .lead-detail-drawer {
    top: 6px;
    right: 6px;
    bottom: 6px;
    max-height: calc(100vh - 12px);
    max-height: calc(100dvh - 12px);
  }

  .ui-v4 .lead-detail-drawer > .head,
  .ui-v4 [data-page="leads"] > .lead-detail-drawer > .content {
    padding: 12px 14px;
  }
}

/* Controlled WhatsApp broadcast */
.ui-v4 .comms-inbox-actions .whatsapp-broadcast-button {
  min-height: 34px;
  padding: 0 9px;
  border-color: #cfd9d4;
  border-radius: 6px;
  color: #29483e;
  background: #fff;
  box-shadow: none;
  font-size: 10px;
  font-weight: 750;
  flex: 0 0 auto;
  white-space: nowrap;
}

.ui-v4 .comms-inbox-actions .whatsapp-broadcast-button:hover {
  border-color: #78a998;
  color: #0e654f;
  background: #f3f8f6;
}

.ui-v4 .comms-inbox-actions .whatsapp-broadcast-button svg {
  width: 14px;
  height: 14px;
}

/* Paid outreach entry points and compact conversation toolbar */
.ui-v4 .paid-feature-badge,
.ui-v4 .quick-plan-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 18px;
  padding: 2px 6px;
  border: 1px solid #d9bd79;
  border-radius: 4px;
  color: #775716;
  background: #fff7df;
  font-size: 8px;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
}

.ui-v4 .app-nav .paid-feature-badge {
  margin-left: auto;
}

.ui-v4 .quick-card[data-paid-feature] {
  position: relative;
}

.ui-v4 .quick-card .quick-plan-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  color: #775716;
}

.ui-v4 [data-paid-feature]:not(.feature-locked) > .paid-feature-badge,
.ui-v4 [data-paid-feature]:not(.feature-locked) > .quick-plan-badge,
.ui-v4 [data-paid-feature]:not(.feature-locked) .paid-feature-lock {
  display: none;
}

.ui-v4 .feature-locked {
  cursor: pointer;
}

.ui-v4 .app-nav .feature-locked:not(.active) {
  color: #59665f;
}

.ui-v4 .paid-feature-lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.ui-v4 .paid-feature-lock svg {
  width: 11px !important;
  height: 11px !important;
}

.ui-v4 .comms-inbox {
  container-type: inline-size;
}

.ui-v4 .comms-inbox-head {
  display: grid;
  grid-template-columns: minmax(108px, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.ui-v4 .comms-inbox-head > div:first-child {
  min-width: 0;
}

.ui-v4 .comms-inbox-head > div:first-child > span {
  white-space: nowrap;
}

.ui-v4 .comms-inbox-head > div:first-child > strong {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  min-width: 0;
  white-space: nowrap;
}

.ui-v4 #conversationSectionTitle {
  display: inline !important;
  white-space: nowrap;
}

.ui-v4 #conversationTotalCount {
  flex: 0 0 auto;
}

.ui-v4 .comms-inbox-actions button > span {
  white-space: nowrap;
}

@container (max-width: 292px) {
  .ui-v4 .comms-inbox-head {
    grid-template-columns: minmax(104px, 1fr) auto;
  }

  .ui-v4 .comms-inbox-actions .new-chat-button,
  .ui-v4 .comms-inbox-actions .whatsapp-broadcast-button {
    width: 34px;
    padding: 0;
  }

  .ui-v4 .comms-inbox-actions .new-chat-button > span,
  .ui-v4 .comms-inbox-actions .whatsapp-broadcast-button > span {
    display: none;
  }
}

.ui-v4 .whatsapp-broadcast-dialog {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: min(1160px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: hidden;
}

.ui-v4 .whatsapp-broadcast-head {
  align-items: center;
  padding: 16px 20px 13px;
}

.ui-v4 .whatsapp-broadcast-head h2 {
  margin-top: 4px;
  color: #182921;
  font-size: 19px;
}

.ui-v4 .whatsapp-broadcast-head p {
  max-width: 780px;
  line-height: 1.55;
}

.ui-v4 .whatsapp-broadcast-tabs {
  display: flex;
  gap: 3px;
  min-height: 44px;
  padding: 0 20px;
  border-top: 1px solid #e6ebe8;
  border-bottom: 1px solid #dce3df;
  background: #fff;
}

.ui-v4 .whatsapp-broadcast-tabs button {
  position: relative;
  min-height: 43px;
  padding: 0 13px;
  border: 0;
  border-radius: 0;
  color: #69766f;
  background: transparent;
  font-size: 10px;
  font-weight: 750;
}

.ui-v4 .whatsapp-broadcast-tabs button::after {
  position: absolute;
  right: 10px;
  bottom: -1px;
  left: 10px;
  height: 2px;
  content: "";
  background: transparent;
}

.ui-v4 .whatsapp-broadcast-tabs button.active {
  color: #0f6d55;
}

.ui-v4 .whatsapp-broadcast-tabs button.active::after {
  background: #168064;
}

.ui-v4 .whatsapp-broadcast-tabs svg {
  width: 14px;
  height: 14px;
}

.ui-v4 .whatsapp-broadcast-modal-body {
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: #f7f9f8;
}

.ui-v4 .whatsapp-broadcast-pane {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
}

.ui-v4 .whatsapp-broadcast-risk {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  margin: 16px 18px 0;
  padding: 13px 14px;
  border: 1px solid #e2b56f;
  border-left-width: 3px;
  border-radius: 6px;
  color: #5e411c;
  background: #fff8e9;
}

.ui-v4 .whatsapp-broadcast-risk > svg {
  width: 22px;
  height: 22px;
  color: #b46917;
}

.ui-v4 .whatsapp-broadcast-risk strong,
.ui-v4 .whatsapp-broadcast-risk p {
  display: block;
}

.ui-v4 .whatsapp-broadcast-risk strong {
  font-size: 11px;
}

.ui-v4 .whatsapp-broadcast-risk p {
  margin: 4px 0 6px;
  font-size: 9px;
  line-height: 1.65;
}

.ui-v4 .whatsapp-broadcast-risk a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #865114;
  font-size: 9px;
  font-weight: 750;
}

.ui-v4 .whatsapp-broadcast-risk a svg {
  width: 12px;
  height: 12px;
}

.ui-v4 .whatsapp-broadcast-connection {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  margin: 10px 18px 0;
  padding: 8px 12px;
  border: 1px solid #d7e2dd;
  border-radius: 6px;
  color: #50625a;
  background: #fff;
  font-size: 9px;
}

.ui-v4 .whatsapp-broadcast-connection > svg {
  width: 16px;
  height: 16px;
  color: #14805f;
}

.ui-v4 .whatsapp-broadcast-connection span {
  min-width: 0;
  flex: 1 1 auto;
}

.ui-v4 .whatsapp-broadcast-connection strong {
  margin-right: 6px;
  color: #24483c;
}

.ui-v4 .whatsapp-broadcast-connection.warning {
  border-color: #e4c590;
  color: #725325;
  background: #fffaf0;
}

.ui-v4 .whatsapp-broadcast-connection.warning > svg {
  color: #b37220;
}

.ui-v4 .whatsapp-broadcast-connection button {
  min-height: 28px;
  padding: 4px 10px;
  font-size: 9px;
}

.ui-v4 .whatsapp-broadcast-compose {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  min-height: 520px;
  margin-top: 10px;
  border-top: 1px solid #dfe5e2;
  background: #fff;
}

.ui-v4 .broadcast-recipient-panel {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  padding: 17px 15px 14px;
  border-right: 1px solid #dce3df;
  background: #f7f9f8;
}

.ui-v4 .broadcast-recipient-list {
  max-height: 620px;
}

.ui-v4 .broadcast-recipient-row {
  grid-template-columns: 18px 32px minmax(0, 1fr);
  min-height: 70px;
}

.ui-v4 .broadcast-recipient-row > span:nth-of-type(2) {
  min-width: 0;
}

.ui-v4 .broadcast-recipient-row em {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: #5e7169;
  font-size: 8px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ui-v4 .broadcast-consent-badge {
  grid-column: 3;
  justify-self: start;
  margin-top: -4px;
  padding: 2px 5px;
  border-radius: 3px;
  color: #176e56;
  background: #dff0e9;
  font-size: 7px;
  font-weight: 800;
}

.ui-v4 .broadcast-message-panel {
  min-width: 0;
  padding: 17px 20px 24px;
  overflow-y: auto;
  background: #fff;
}

.ui-v4 .broadcast-message-panel > label {
  margin-top: 12px;
}

.ui-v4 #whatsappBroadcastBody {
  min-height: 160px;
  resize: vertical;
  line-height: 1.65;
}

.ui-v4 .broadcast-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e0e5e2;
}

.ui-v4 .broadcast-preview-head > div {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.ui-v4 .broadcast-preview-head span {
  color: #7a8580;
  font-size: 9px;
}

.ui-v4 .broadcast-preview-head strong {
  overflow: hidden;
  color: #2c4139;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ui-v4 .broadcast-preview-head .icon-button {
  width: 29px;
  min-height: 28px;
}

.ui-v4 .broadcast-message-preview {
  min-height: 112px;
  max-height: 210px;
}

.ui-v4 .broadcast-controls {
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid #dfe5e2;
}

.ui-v4 .broadcast-controls > .grid,
.ui-v4 .broadcast-controls > label {
  margin-top: 12px;
}

.ui-v4 .broadcast-confirmation {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  align-items: flex-start;
  padding: 10px 11px;
  border: 1px solid #d8dfdb;
  border-radius: 6px;
  background: #fafbfa;
  cursor: pointer;
}

.ui-v4 .broadcast-confirmation:has(input:checked) {
  border-color: #83b9a6;
  background: #eef7f3;
}

.ui-v4 .broadcast-confirmation.danger {
  border-color: #e5c08b;
  background: #fffaf1;
}

.ui-v4 .broadcast-confirmation.danger:has(input:checked) {
  border-color: #c98533;
  background: #fff5e4;
}

.ui-v4 .broadcast-confirmation input {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin-top: 1px;
}

.ui-v4 .broadcast-confirmation strong,
.ui-v4 .broadcast-confirmation small {
  display: block;
}

.ui-v4 .broadcast-confirmation strong {
  color: #33473f;
  font-size: 9px;
  line-height: 1.5;
}

.ui-v4 .broadcast-confirmation small {
  margin-top: 3px;
  color: #77837e;
  font-size: 8px;
  line-height: 1.55;
}

.ui-v4 .whatsapp-broadcast-foot {
  align-items: center;
}

.ui-v4 .whatsapp-broadcast-foot > span {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: auto;
  color: #697771;
  font-size: 9px;
}

.ui-v4 .whatsapp-broadcast-foot > span svg {
  width: 14px;
  height: 14px;
  color: #b06a18;
}

.ui-v4 .broadcast-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px 12px;
}

.ui-v4 .broadcast-history-head h3 {
  margin: 3px 0;
  color: #20342c;
  font-size: 17px;
}

.ui-v4 .broadcast-history-head p {
  color: #6f7c76;
  font-size: 9px;
  line-height: 1.6;
}

.ui-v4 .whatsapp-broadcast-history-list {
  display: grid;
  gap: 11px;
  padding: 0 20px 22px;
}

.ui-v4 .whatsapp-broadcast-campaign {
  padding: 14px 15px;
  border: 1px solid #dce3df;
  border-radius: 7px;
  background: #fff;
}

.ui-v4 .whatsapp-broadcast-campaign.attention {
  border-left: 3px solid #c88127;
}

.ui-v4 .whatsapp-broadcast-campaign > header,
.ui-v4 .whatsapp-broadcast-campaign > footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.ui-v4 .whatsapp-broadcast-campaign > header span:first-child {
  display: block;
  color: #78847e;
  font-size: 8px;
}

.ui-v4 .whatsapp-broadcast-campaign h4 {
  margin: 4px 0 0;
  color: #20352d;
  font-size: 12px;
}

.ui-v4 .broadcast-progress {
  height: 4px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 2px;
  background: #e7ece9;
}

.ui-v4 .broadcast-progress > span {
  display: block;
  height: 100%;
  background: #1a8064;
  transition: width 220ms ease;
}

.ui-v4 .broadcast-campaign-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 11px;
  border: 1px solid #e2e7e4;
  border-radius: 6px;
}

.ui-v4 .broadcast-campaign-stats > div {
  padding: 8px 10px;
  border-right: 1px solid #e2e7e4;
}

.ui-v4 .broadcast-campaign-stats > div:last-child {
  border-right: 0;
}

.ui-v4 .broadcast-campaign-stats span,
.ui-v4 .broadcast-campaign-stats strong {
  display: block;
}

.ui-v4 .broadcast-campaign-stats span {
  color: #7a8680;
  font-size: 8px;
}

.ui-v4 .broadcast-campaign-stats strong {
  margin-top: 3px;
  color: #22382f;
  font-size: 14px;
}

.ui-v4 .broadcast-campaign-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 10px;
  color: #65736d;
  font-size: 8px;
}

.ui-v4 .broadcast-campaign-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.ui-v4 .broadcast-campaign-meta svg {
  width: 12px;
  height: 12px;
}

.ui-v4 .broadcast-campaign-error {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 10px;
  padding: 8px 9px;
  border: 1px solid #ead0a7;
  border-radius: 5px;
  color: #76501e;
  background: #fff9ef;
  font-size: 8px;
  line-height: 1.55;
}

.ui-v4 .broadcast-campaign-error svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.ui-v4 .broadcast-unknown-list {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #e0ae66;
  border-radius: 6px;
  background: #fff8eb;
}

.ui-v4 .broadcast-unknown-list > strong {
  color: #825218;
  font-size: 9px;
}

.ui-v4 .broadcast-unknown-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #eed6b0;
  color: #72552f;
  font-size: 8px;
}

.ui-v4 .broadcast-unknown-list button {
  min-height: 27px;
  padding: 4px 8px;
  font-size: 8px;
}

.ui-v4 .whatsapp-broadcast-campaign > footer {
  align-items: center;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid #e5e9e7;
}

.ui-v4 .whatsapp-broadcast-campaign details {
  min-width: 0;
  flex: 1 1 auto;
}

.ui-v4 .whatsapp-broadcast-campaign summary {
  color: #466158;
  font-size: 9px;
  font-weight: 750;
  cursor: pointer;
}

.ui-v4 .broadcast-recipient-status-list {
  max-height: 250px;
  margin-top: 8px;
  overflow-y: auto;
  border: 1px solid #e1e6e3;
  border-radius: 5px;
}

.ui-v4 .broadcast-recipient-status-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 12px;
  align-items: center;
  padding: 7px 9px;
  border-bottom: 1px solid #e7ebe9;
}

.ui-v4 .broadcast-recipient-status-list > div:last-child {
  border-bottom: 0;
}

.ui-v4 .broadcast-recipient-status-list strong,
.ui-v4 .broadcast-recipient-status-list small {
  display: block;
}

.ui-v4 .broadcast-recipient-status-list strong {
  color: #334a41;
  font-size: 8px;
}

.ui-v4 .broadcast-recipient-status-list small,
.ui-v4 .broadcast-recipient-status-list em {
  margin-top: 2px;
  color: #7c8782;
  font-size: 7px;
  font-style: normal;
}

.ui-v4 .broadcast-recipient-status-list em {
  grid-column: 1 / -1;
}

.ui-v4 .broadcast-recipient-status {
  padding: 3px 6px;
  border-radius: 3px;
  color: #52655d;
  background: #edf1ef;
  font-size: 7px;
  font-weight: 800;
}

.ui-v4 .broadcast-recipient-status.sent,
.ui-v4 .broadcast-recipient-status.delivered,
.ui-v4 .broadcast-recipient-status.read {
  color: #14654f;
  background: #def0e8;
}

.ui-v4 .broadcast-recipient-status.failed,
.ui-v4 .broadcast-recipient-status.unknown {
  color: #8a4d16;
  background: #fff0d8;
}

.ui-v4 .broadcast-campaign-actions {
  display: flex;
  gap: 6px;
}

.ui-v4 .broadcast-campaign-actions button {
  min-height: 29px;
  padding: 4px 9px;
  font-size: 8px;
}

@media (max-width: 980px) {
  .ui-v4 .whatsapp-broadcast-compose {
    grid-template-columns: 290px minmax(0, 1fr);
  }

  .ui-v4 .comms-inbox-actions .whatsapp-broadcast-button span {
    display: none;
  }

  .ui-v4 .comms-inbox-actions .whatsapp-broadcast-button {
    width: 34px;
    padding: 0;
  }
}

@media (max-width: 760px) {
  .ui-v4 .whatsapp-broadcast-dialog {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .ui-v4 .whatsapp-broadcast-head,
  .ui-v4 .whatsapp-broadcast-tabs,
  .ui-v4 .broadcast-message-panel,
  .ui-v4 .broadcast-history-head,
  .ui-v4 .whatsapp-broadcast-history-list {
    padding-right: 14px;
    padding-left: 14px;
  }

  .ui-v4 .whatsapp-broadcast-risk,
  .ui-v4 .whatsapp-broadcast-connection {
    margin-right: 14px;
    margin-left: 14px;
  }

  .ui-v4 .whatsapp-broadcast-compose {
    display: block;
    min-height: 0;
  }

  .ui-v4 .broadcast-recipient-panel {
    max-height: 390px;
    border-right: 0;
    border-bottom: 1px solid #dce3df;
  }

  .ui-v4 .broadcast-recipient-list {
    min-height: 160px;
    max-height: 230px;
  }

  .ui-v4 .broadcast-message-panel {
    overflow: visible;
  }
}

@media (max-width: 560px) {
  .ui-v4 .whatsapp-broadcast-head p {
    display: none;
  }

  .ui-v4 .whatsapp-broadcast-risk {
    grid-template-columns: 22px minmax(0, 1fr);
    padding: 11px;
  }

  .ui-v4 .whatsapp-broadcast-foot > span {
    display: none;
  }

  .ui-v4 .whatsapp-broadcast-foot button {
    flex: 1 1 auto;
  }

  .ui-v4 .broadcast-campaign-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ui-v4 .broadcast-campaign-stats > div:nth-child(2) {
    border-right: 0;
  }

  .ui-v4 .broadcast-campaign-stats > div:nth-child(-n+2) {
    border-bottom: 1px solid #e2e7e4;
  }

  .ui-v4 .whatsapp-broadcast-campaign > footer,
  .ui-v4 .broadcast-unknown-list > div {
    align-items: stretch;
    flex-direction: column;
  }

  .ui-v4 .broadcast-campaign-actions,
  .ui-v4 .broadcast-unknown-list > div > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
}
