.integrations-shell {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: 18px;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

@media (max-width: 640px) {
  .view[data-view="integrations"].active:has(.bom-tab-editor),
  .integrations-shell:has(.bom-tab-editor),
  .integrations-shell:has(.bom-tab-editor) .integrations-layout,
  .integrations-shell:has(.bom-tab-editor) .integrations-content,
  .integrations-shell:has(.bom-tab-editor) .integrations-grid {
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }

  .integrations-shell:has(.bom-tab-editor) .integrations-layout {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .integrations-shell:has(.bom-tab-editor) .integrations-nav {
    display: block;
    padding: 2px 0 10px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
  }

  .integrations-shell:has(.bom-tab-editor) .integrations-content {
    padding: 10px 0 0;
  }

  .integration-card.bom-tab-editor {
    padding: 0;
    border-radius: 0;
  }

  .bom-tab-editor .bom-workspace-nav {
    gap: 18px;
    padding: 0 2px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  .bom-tab-editor .bom-workspace-nav::-webkit-scrollbar {
    display: none;
  }

  .bom-tab-editor .bom-workspace-nav__item {
    flex: 0 0 auto;
  }

  .bom-tab-editor .bom-builder-lite {
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 7px;
  }

  .bom-tab-editor .bom-builder-lite__head {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 36px;
  }

  .bom-tab-editor .bom-builder-lite__head > div:first-child {
    display: block;
    flex: 0 0 auto;
  }

  .bom-tab-editor .bom-builder-lite__head-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    min-width: 0;
  }

  .bom-tab-editor .bom-builder-lite__head-actions .integration-card__status {
    margin-right: auto;
  }

  .bom-tab-editor .bom-builder-lite__head-actions .btn {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 11px;
  }

  .bom-tab-editor .bom-builder-publication {
    min-height: 34px;
    padding: 0 3px;
    border-color: transparent;
    background: transparent;
  }

  .bom-tab-editor .bom-builder-publication strong {
    display: none;
  }

  .bom-tab-editor .bom-builder-mode {
    min-height: 32px;
  }

  .bom-tab-editor .bom-builder-mode__item small {
    display: none;
  }

  .bom-tab-editor .bom-builder-lite__library {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .bom-tab-editor .bom-builder-lite__library-actions .btn:first-child {
    display: none;
  }

  .bom-tab-editor .bom-builder-lite__library-actions .btn {
    padding-inline: 9px;
    font-size: 11px;
  }

  .bom-tab-editor .bom-builder-prompt-workspace .bom-builder-lite__chat {
    padding: 12px;
  }

  .bom-tab-editor .bom-builder-lite__bubble,
  .bom-tab-editor .bom-builder-lite__bubble--assistant,
  .bom-tab-editor .bom-builder-lite__bubble--user {
    max-width: 94%;
  }

  .bom-tab-editor .bom-builder-chat-actions {
    justify-content: flex-start;
    padding-inline: 8px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  .bom-tab-editor .bom-builder-chat-actions::-webkit-scrollbar {
    display: none;
  }

  .bom-tab-editor .bom-builder-chat-actions .btn {
    flex: 0 0 auto;
  }

  .bom-tab-editor .bom-builder-chat-composer {
    margin: 0 8px 8px;
  }

  .bom-tab-editor .bom-builder-manual-workspace > div:first-child {
    display: none;
  }

  .bom-tab-editor .bom-builder-manual-workspace {
    grid-template-rows: minmax(0, 1fr);
  }
}

.integrations-hero {
  display: grid;
  gap: 4px;
}

.integrations-layout {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  gap: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.integrations-nav {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: start;
  gap: 16px;
  min-height: 0;
  padding: 8px 18px 8px 4px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.integrations-nav__heading {
  display: grid;
  gap: 4px;
  padding: 2px 4px 0;
}

.integrations-nav__heading strong {
  color: var(--text);
  font-size: 18px;
}

.integrations-nav__eyebrow {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.integrations-nav__list {
  display: grid;
  align-content: start;
  gap: 8px;
}

.integrations-nav__item {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 9px 8px 9px 12px;
  border: 0;
  border-radius: 12px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.18s ease;
}

.integrations-nav__item:hover {
  color: var(--text);
}

.integrations-nav__item.is-active {
  color: var(--text);
}

.integrations-nav__item.is-active::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 0;
  width: 2px;
  border-radius: 999px;
  background: rgba(120, 170, 255, 0.8);
}

.integrations-nav__item:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.72);
  outline-offset: 2px;
}

.integrations-nav__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: #fff;
}

.integrations-nav__icon img {
  display: block;
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.integrations-nav__icon--whatsapp {
  background: transparent;
}

.integrations-nav__label {
  display: grid;
  gap: 3px;
  min-width: 0;
}

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

.integrations-nav__label strong {
  color: inherit;
  font-size: 13px;
}

.integrations-nav__label small {
  color: var(--muted);
  font-size: 10px;
}

.integrations-content {
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding-left: 20px;
  overflow: hidden;
}

.integrations-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-content: start;
  min-height: 0;
  height: 100%;
  overflow: auto;
  padding-right: 4px;
}

.whatsapp-template-route-page {
  display: grid;
  gap: 18px;
  align-content: start;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  padding-bottom: 28px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.whatsapp-template-route-page__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(120, 170, 255, 0.08), transparent 42%),
    var(--panel);
}

.whatsapp-template-route-page__head .headline {
  margin: 4px 0 0;
}

.whatsapp-template-route-page__head .sub {
  margin: 10px 0 0;
  max-width: 860px;
}

.integration-card {
  display: grid;
  gap: 18px;
  min-width: 0;
  width: 100%;
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.integration-card__main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: 14px;
}

.integration-card__body {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

.integration-card__logo {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel-strong);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.integration-card__logo img {
  display: block;
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.integration-card__logo--bookonme {
  background: #fff;
}

.integration-card__logo--whatsapp {
  border-color: rgba(37, 211, 102, 0.2);
  background: rgba(37, 211, 102, 0.08);
}

.integration-card__copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.integration-card__eyebrow {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.integration-card h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
}

.integration-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.integration-card__details {
  color: var(--text-soft, rgba(255, 255, 255, 0.72));
  font-size: 12px;
  line-height: 1.5;
}

.integration-card__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.integration-card__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.integration-card__actions--stack {
  flex-wrap: wrap;
}

.integration-card__rail {
  display: grid;
  justify-items: end;
  align-content: start;
  gap: 22px;
  min-width: 96px;
}

.integration-card__status {
  width: fit-content;
}

.integration-card__status--danger {
  color: #ffd3d3;
  border-color: rgba(255, 120, 120, 0.45);
  background: rgba(255, 120, 120, 0.14);
}

.integration-card__status--amber {
  color: #fff0c7;
  border-color: rgba(255, 176, 64, 0.46);
  background: rgba(255, 176, 64, 0.18);
}

.integration-card__status--success {
  color: #d7ffe4;
  border-color: rgba(100, 220, 150, 0.45);
  background: rgba(100, 220, 150, 0.12);
}

.integration-card__status--warning {
  color: #ffe9b8;
  border-color: rgba(255, 196, 92, 0.42);
  background: rgba(255, 196, 92, 0.12);
}

.integration-card__status--silver {
  color: #edf1f7;
  border-color: rgba(186, 194, 208, 0.42);
  background: rgba(186, 194, 208, 0.16);
}

.integration-card__status--muted {
  color: var(--muted);
}

.integration-toggle {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.integration-toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.integration-toggle__track {
  display: inline-flex;
  align-items: center;
  width: 46px;
  height: 26px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.18s ease, border-color 0.18s ease;
}

.integration-toggle__thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transform: translateX(0);
  transition: transform 0.18s ease;
}

.integration-toggle input:checked + .integration-toggle__track {
  border-color: rgba(100, 220, 150, 0.7);
  background: rgba(100, 220, 150, 0.2);
}

.integration-toggle input:checked + .integration-toggle__track .integration-toggle__thumb {
  transform: translateX(20px);
}

.integration-toggle input:focus-visible + .integration-toggle__track {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 3px;
}

.integration-card__actions .btn {
  min-width: 124px;
  justify-content: center;
}

.integration-card__actions .btn[disabled] {
  cursor: not-allowed;
  opacity: 0.6;
}

.whatsapp-workspace-card {
  gap: 20px;
}

.whatsapp-category-nav {
  min-width: 0;
}

.whatsapp-category-nav .bom-workspace-nav__item[disabled] {
  cursor: not-allowed;
  opacity: 0.42;
}

.whatsapp-overview__card.is-category-hidden {
  display: none !important;
}

.whatsapp-workspace-card[data-whatsapp-active-category]:not([data-whatsapp-active-category="overview"])
  .whatsapp-overview__summary {
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
}

.whatsapp-workspace-card[data-whatsapp-active-category]:not([data-whatsapp-active-category="overview"])
  .whatsapp-overview__card:not(.is-category-hidden) {
  padding: 4px 0 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.whatsapp-workspace-card[data-whatsapp-active-category="connection"] .integration-card__main,
.whatsapp-workspace-card.is-whatsapp-onboarded .integration-card__main {
  display: none;
}

.whatsapp-workspace-card:not(.is-whatsapp-onboarded)
  .whatsapp-category-nav
  .bom-workspace-nav__item:not([data-whatsapp-category-tab="connection"]) {
  display: none;
}

.whatsapp-workspace {
  display: grid;
  gap: 16px;
  min-height: 0;
  overflow: auto;
}

.whatsapp-workspace__tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.whatsapp-workspace__tab {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.whatsapp-workspace__tab:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.whatsapp-workspace__tab.is-active {
  border-color: rgba(100, 220, 150, 0.42);
  background: rgba(100, 220, 150, 0.14);
  color: #d7ffe4;
}

.whatsapp-workspace__tab:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.72);
  outline-offset: 3px;
}

.whatsapp-workspace__panel {
  display: none;
}

.whatsapp-workspace__panel.is-active {
  display: grid;
  gap: 16px;
}

.whatsapp-workspace__panel[hidden] {
  display: none;
}

.whatsapp-workspace__section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(120, 170, 255, 0.14), transparent 44%),
    rgba(255, 255, 255, 0.028);
}

.whatsapp-workspace__section-head .headline {
  margin: 0;
}

.whatsapp-workspace__section-head .sub {
  margin: 8px 0 0;
}

.whatsapp-workspace__section-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.whatsapp-workspace__section-actions--footer {
  justify-content: flex-end;
  padding-top: 6px;
}

.whatsapp-overview {
  display: grid;
  gap: 16px;
}

.whatsapp-overview__summary,
.whatsapp-overview__grid {
  display: grid;
  gap: 14px;
}

.whatsapp-overview__summary {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.whatsapp-workspace-card:not(.is-whatsapp-onboarded)
  .whatsapp-overview__summary
  > .whatsapp-overview__card:not(.whatsapp-overview__card--connection),
.whatsapp-workspace-card:not(.is-whatsapp-onboarded)
  .whatsapp-overview__card--library {
  display: none;
}

.whatsapp-workspace-card:not(.is-whatsapp-onboarded) .integration-card__copy > p,
.whatsapp-workspace-card:not(.is-whatsapp-onboarded) .integration-card__details,
.whatsapp-workspace-card:not(.is-whatsapp-onboarded) .whatsapp-overview__card--connection .whatsapp-overview__card-head,
.whatsapp-workspace-card:not(.is-whatsapp-onboarded) .whatsapp-connection__profile,
.whatsapp-workspace-card:not(.is-whatsapp-onboarded) .whatsapp-connection__details {
  display: none;
}

.whatsapp-workspace-card.has-whatsapp-connection-state:not(.is-whatsapp-onboarded)
  .whatsapp-overview__card--connection
  .whatsapp-overview__card-head {
  display: flex;
}

.whatsapp-workspace-card.has-whatsapp-connection-state:not(.is-whatsapp-onboarded)
  .whatsapp-connection__profile,
.whatsapp-workspace-card.has-whatsapp-connection-state:not(.is-whatsapp-onboarded)
  .whatsapp-connection__details {
  display: grid;
}

.whatsapp-workspace-card:not(.is-whatsapp-onboarded) .whatsapp-overview__card--connection {
  display: grid;
  grid-template-columns: minmax(0, 560px);
  gap: 18px;
  padding: 8px 0 0;
  border: 0;
  background: transparent;
}

.whatsapp-workspace-card.has-whatsapp-connection-state:not(.is-whatsapp-onboarded)
  .whatsapp-overview__card--connection {
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(104, 175, 225, 0.16), transparent 42%),
    rgba(255, 255, 255, 0.03);
}

.whatsapp-workspace-card:not(.is-whatsapp-onboarded) .whatsapp-overview__metric strong {
  font-size: 22px;
}

.whatsapp-connection__tools {
  width: fit-content;
}

.whatsapp-connection__tools summary {
  width: fit-content;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

.whatsapp-connection__tools[open] summary {
  color: var(--text);
}

.whatsapp-connection__tools-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 12px;
}

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

.whatsapp-overview__card {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.025);
}

.whatsapp-overview__card--automation {
  background:
    radial-gradient(circle at top right, rgba(100, 220, 150, 0.16), transparent 46%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.025);
}

.whatsapp-overview__card--connection {
  background:
    radial-gradient(circle at top right, rgba(84, 191, 255, 0.16), transparent 46%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.025);
}

@media (min-width: 980px) {
  .whatsapp-overview__summary {
    grid-template-columns: 1fr;
  }

  .whatsapp-overview__card--connection {
    grid-column: 1 / -1;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    column-gap: 18px;
    align-items: start;
  }

  .whatsapp-workspace-card.has-whatsapp-connection-state:not(.is-whatsapp-onboarded)
    .whatsapp-overview__card--connection {
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  }

  .whatsapp-overview__card--connection .whatsapp-overview__card-head,
  .whatsapp-overview__card--connection .whatsapp-overview__metric {
    grid-column: 1;
  }

  .whatsapp-overview__card--connection .whatsapp-connection__profile {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-content: start;
  }

  .whatsapp-overview__card--connection .whatsapp-connection__details {
    grid-column: 1 / -1;
    align-content: start;
  }

  .whatsapp-overview__card--connection .whatsapp-connection__sender {
    grid-column: 1 / -1;
  }

  .whatsapp-overview__card--connection .whatsapp-test-modal__feedback,
  .whatsapp-overview__card--connection .whatsapp-connection__tools {
    grid-column: 1 / -1;
  }

  .whatsapp-overview__card--connection .whatsapp-overview__actions {
    grid-column: 1;
  }

  .whatsapp-overview__card--connection .whatsapp-connection__setup-form {
    grid-column: 2;
  }

  .whatsapp-workspace-card.needs-whatsapp-registration
    .whatsapp-overview__card--connection
    .whatsapp-connection__setup-form {
    grid-template-columns: minmax(220px, 1fr) auto;
    align-items: end;
  }

  .whatsapp-workspace-card.needs-whatsapp-registration
    .whatsapp-overview__card--connection
    .whatsapp-connection__setup-fields {
    justify-content: flex-end;
  }

  .whatsapp-workspace-card:not(.needs-whatsapp-registration)
    .whatsapp-overview__card--connection .whatsapp-connection__setup-form,
  .whatsapp-overview__card--connection .whatsapp-test-modal__feedback {
    grid-column: 1 / -1;
  }

  .whatsapp-overview__card--connection .whatsapp-overview__actions:last-of-type {
    justify-content: flex-start;
  }

  .whatsapp-overview__card--connection .whatsapp-connection__detail-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .whatsapp-overview__summary > .whatsapp-overview__card:not(.whatsapp-overview__card--connection) {
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    grid-template-areas:
      "head metric"
      "head actions";
    align-items: start;
    min-height: 0;
    column-gap: 18px;
  }

  .whatsapp-overview__summary > .whatsapp-overview__card:not(.whatsapp-overview__card--connection) .whatsapp-overview__card-head {
    grid-area: head;
    align-self: start;
  }

  .whatsapp-overview__summary > .whatsapp-overview__card:not(.whatsapp-overview__card--connection) .whatsapp-overview__metric {
    grid-area: metric;
    align-content: start;
    max-width: 36rem;
  }

  .whatsapp-overview__summary > .whatsapp-overview__card:not(.whatsapp-overview__card--connection) .whatsapp-overview__actions {
    grid-area: actions;
    align-self: start;
    justify-self: end;
    justify-content: flex-end;
  }

  .whatsapp-overview__card--library {
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    grid-template-areas:
      "head metric"
      "head actions";
    align-items: start;
    min-height: 0;
    column-gap: 18px;
  }

  .whatsapp-overview__card--library .whatsapp-overview__card-head {
    grid-area: head;
    align-self: start;
  }

  .whatsapp-overview__card--library .whatsapp-overview__metric {
    grid-area: metric;
    align-content: start;
    max-width: 36rem;
  }

  .whatsapp-overview__card--library .whatsapp-overview__actions {
    grid-area: actions;
    align-self: start;
    justify-self: end;
    justify-content: flex-end;
  }
}

.whatsapp-overview__card--campaigns {
  background:
    radial-gradient(circle at top right, rgba(255, 196, 92, 0.16), transparent 46%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.025);
}

.whatsapp-overview__card--templates {
  background:
    radial-gradient(circle at top right, rgba(120, 170, 255, 0.18), transparent 46%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.025);
}

.whatsapp-overview__card--library {
  grid-column: 1 / -1;
  background:
    radial-gradient(circle at top right, rgba(120, 170, 255, 0.15), transparent 46%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.025);
}

.whatsapp-overview__card--performance {
  background:
    radial-gradient(circle at top right, rgba(92, 214, 192, 0.18), transparent 46%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.025);
}

.whatsapp-overview__card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.whatsapp-overview__card-head .section-title {
  margin: 2px 0 0;
}

.whatsapp-overview__eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.whatsapp-overview__pill {
  width: fit-content;
}

.whatsapp-overview__metric {
  display: grid;
  gap: 6px;
}

.whatsapp-overview__metric strong {
  color: var(--text);
  font-size: 20px;
  line-height: 1.1;
}

.whatsapp-overview__metric span,
.whatsapp-overview__copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.whatsapp-overview__copy {
  display: grid;
  gap: 8px;
}

.whatsapp-overview__copy strong {
  color: var(--text);
}

.whatsapp-overview__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.whatsapp-overview__actions--stack .btn {
  min-width: 150px;
}

.whatsapp-connection__details {
  display: grid;
  gap: 10px;
}

.whatsapp-connection__profile {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

.whatsapp-connection__setup-form {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(245, 196, 88, 0.28);
  background:
    linear-gradient(135deg, rgba(245, 196, 88, 0.12), rgba(255, 255, 255, 0.025));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}

.whatsapp-connection__setup-form[hidden] {
  display: none !important;
}

.whatsapp-workspace-card.needs-whatsapp-registration .whatsapp-connection__setup-form {
  display: grid;
}

.whatsapp-connection__setup-copy {
  display: grid;
  gap: 6px;
}

.whatsapp-connection__step-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.whatsapp-connection__setup-copy strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
}

.whatsapp-connection__setup-fields {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
}

.whatsapp-connection__setup-field {
  display: grid;
  gap: 6px;
  min-width: min(220px, 100%);
  flex: 1 1 220px;
}

.whatsapp-connection__advanced-actions {
  display: flex;
  justify-content: flex-start;
}

.whatsapp-connection__restore-form {
  display: grid;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

.whatsapp-connection__restore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.whatsapp-connection__restore-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.whatsapp-connection__profile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.whatsapp-connection__profile-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.whatsapp-connection__profile-title {
  color: var(--text);
  font-size: 15px;
  line-height: 1.4;
}

.whatsapp-connection__detail-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.whatsapp-connection__detail {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.whatsapp-connection__label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.whatsapp-connection__value {
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
  word-break: break-word;
}

.whatsapp-connection__note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.whatsapp-connection__sender {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
}

.whatsapp-connection__sender[hidden] {
  display: none;
}

.whatsapp-connection__sender-head strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 16px;
}

.whatsapp-connection__sender-list {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.whatsapp-connection__sender-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.16);
}

.whatsapp-connection__sender-row.is-primary {
  border-color: rgba(52, 211, 153, 0.45);
}

.whatsapp-connection__sender-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.whatsapp-connection__sender-copy span,
.whatsapp-connection__sender-copy small {
  color: var(--muted);
  line-height: 1.35;
}

.whatsapp-connection__sender-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.whatsapp-connection__sender-actions .btn {
  margin-left: auto;
}

.whatsapp-feature-modal__panel {
  width: min(1180px, 96vw);
  max-height: 88vh;
  gap: 14px;
  padding: 18px;
}

.whatsapp-feature-modal__panel--templates {
  gap: 18px;
  width: min(1280px, 97vw);
  padding: 20px 22px 22px;
  background:
    linear-gradient(180deg, rgba(18, 21, 28, 0.985), rgba(15, 18, 24, 0.985)),
    rgba(12, 14, 19, 0.98);
}

.whatsapp-feature-modal__panel--inbox {
  width: min(1320px, 96vw);
}

.whatsapp-feature-modal__section {
  margin: 0;
}

.modal__head--flat {
  padding: 2px 2px 6px;
}

.whatsapp-templates__modal-head {
  align-items: flex-start;
  gap: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.whatsapp-templates__modal-copy {
  display: grid;
  gap: 8px;
  max-width: 760px;
}

.whatsapp-templates__modal-copy .headline {
  margin: 0;
}

.whatsapp-templates__modal-copy .sub {
  margin: 0;
  line-height: 1.6;
}

.whatsapp-templates__intro-head {
  align-items: flex-start;
  gap: 18px;
}

.whatsapp-templates__intro-title {
  flex: 0 0 min(320px, 100%);
}

.whatsapp-templates__intro-title .headline {
  margin-bottom: 0;
}

.whatsapp-templates__intro-copy {
  flex: 1 1 0;
  display: grid;
  gap: 8px;
  max-width: 720px;
}

.whatsapp-templates__intro-copy .sub {
  line-height: 1.6;
}

.whatsapp-templates-launcher-modal {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.35fr);
  gap: 18px;
  align-items: start;
}

.whatsapp-templates-launcher-modal__intro,
.whatsapp-templates-launcher-modal__workspace {
  display: grid;
  gap: 14px;
}

.whatsapp-templates-launcher-modal__intro-card,
.whatsapp-templates-launcher-modal__tips,
.whatsapp-templates-launcher-modal__workspace {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
    rgba(255, 255, 255, 0.018);
}

.whatsapp-templates-launcher-modal__intro-card .section-title,
.whatsapp-templates-launcher-modal__head .section-title {
  margin: 0;
}

.whatsapp-templates-launcher-modal__intro-card .section-sub,
.whatsapp-templates-launcher-modal__head .section-sub {
  margin: 8px 0 0;
  line-height: 1.6;
}

.whatsapp-templates-launcher-modal__tips h4 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}

.whatsapp-templates-launcher-modal__tips ul {
  margin: 12px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.whatsapp-templates-launcher-modal__workspace {
  gap: 16px;
}

.whatsapp-templates-launcher-modal__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.whatsapp-templates-launcher-modal__card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background:
    radial-gradient(circle at top right, rgba(120, 170, 255, 0.12), transparent 48%),
    rgba(255, 255, 255, 0.02);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.whatsapp-templates-launcher-modal__card:hover {
  transform: translateY(-1px);
  border-color: rgba(120, 170, 255, 0.34);
  background:
    radial-gradient(circle at top right, rgba(120, 170, 255, 0.18), transparent 52%),
    rgba(255, 255, 255, 0.03);
}

.whatsapp-templates-launcher-modal__step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(120, 170, 255, 0.32);
  background: rgba(120, 170, 255, 0.14);
  color: #e5eeff;
  font-size: 12px;
  font-weight: 700;
}

.whatsapp-templates-launcher-modal__card-copy {
  display: grid;
  gap: 6px;
}

.whatsapp-templates-launcher-modal__card-copy strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
}

.whatsapp-templates-launcher-modal__card-copy small,
.whatsapp-templates-launcher-modal__card-copy em {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  font-style: normal;
}

.whatsapp-templates-launcher-modal__card-copy em {
  color: #dbe7ff;
}

.whatsapp-templates--modal-flat {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.whatsapp-automation {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(124, 179, 111, 0.12), transparent 42%),
    rgba(255, 255, 255, 0.03);
}

.whatsapp-automation__head,
.whatsapp-automation__history-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.whatsapp-automation__head .section-title,
.whatsapp-automation__history-head .section-title {
  margin: 0;
}

.whatsapp-automation__head .section-sub,
.whatsapp-automation__history-head .section-sub {
  margin: 4px 0 0;
}

.whatsapp-automation__form {
  display: grid;
  gap: 14px;
}

.whatsapp-automation__layout,
.whatsapp-campaigns__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.82fr);
  gap: 18px;
  align-items: start;
}

.whatsapp-automation__composer,
.whatsapp-campaigns__composer {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.whatsapp-automation__preview,
.whatsapp-campaigns__live-preview {
  min-width: 0;
}

.whatsapp-automation__controls {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.8fr);
  gap: 14px;
}

.whatsapp-automation__toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.whatsapp-automation__toggle-row strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
}

.whatsapp-automation__toggle-row small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.whatsapp-automation__offset-field {
  align-self: stretch;
  margin: 0;
}

.whatsapp-automation__offset-field select {
  width: 100%;
}

.whatsapp-automation__template-grid,
.whatsapp-automation__bindings {
  display: grid;
  gap: 12px;
}

.whatsapp-automation__template-field {
  margin: 0;
}

.whatsapp-automation__binding-group {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.whatsapp-automation__binding-head {
  display: grid;
  gap: 4px;
}

.whatsapp-automation__binding-head strong {
  font-size: 13px;
}

.whatsapp-automation__binding-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.whatsapp-automation__binding-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) minmax(180px, 0.9fr) minmax(220px, 1fr);
  gap: 10px;
  align-items: start;
}

.whatsapp-automation__binding-token {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.whatsapp-automation__binding-label {
  min-height: 48px;
  padding: 12px 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.whatsapp-automation__meta {
  color: var(--muted);
}

.whatsapp-automation__actions {
  justify-content: flex-end;
}

.whatsapp-automation__counts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.whatsapp-automation__count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 12px;
}

.whatsapp-automation__count span {
  color: var(--muted);
}

.whatsapp-automation__history {
  display: grid;
  gap: 14px;
}

.whatsapp-automation__history-list {
  display: grid;
  gap: 10px;
}

.whatsapp-automation__item,
.whatsapp-automation__empty {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
}

.whatsapp-automation__empty {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.whatsapp-automation__item {
  display: grid;
  gap: 10px;
}

.whatsapp-automation__item-top,
.whatsapp-automation__item-bottom {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.whatsapp-automation__item-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.whatsapp-automation__item-title {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}

.whatsapp-automation__item-meta,
.whatsapp-automation__item-submeta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.whatsapp-automation__item-error {
  color: #ffd3d3;
  font-size: 12px;
  line-height: 1.45;
}

.whatsapp-automation__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(186, 194, 208, 0.42);
  background: rgba(186, 194, 208, 0.12);
  color: #edf1f7;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.whatsapp-automation__pill.is-pending,
.whatsapp-automation__count.is-pending {
  border-color: rgba(255, 196, 92, 0.42);
  background: rgba(255, 196, 92, 0.14);
  color: #ffe9b8;
}

.whatsapp-automation__pill.is-queued,
.whatsapp-automation__count.is-queued {
  border-color: rgba(120, 170, 255, 0.42);
  background: rgba(120, 170, 255, 0.14);
  color: #dbe7ff;
}

.whatsapp-automation__pill.is-sent,
.whatsapp-automation__count.is-sent {
  border-color: rgba(100, 220, 150, 0.45);
  background: rgba(100, 220, 150, 0.12);
  color: #d7ffe4;
}

.whatsapp-automation__pill.is-failed,
.whatsapp-automation__count.is-failed {
  border-color: rgba(255, 120, 120, 0.45);
  background: rgba(255, 120, 120, 0.14);
  color: #ffd3d3;
}

.whatsapp-automation__pill.is-cancelled,
.whatsapp-automation__count.is-cancelled {
  border-color: rgba(186, 194, 208, 0.32);
  background: rgba(186, 194, 208, 0.1);
  color: #cdd5e1;
}

.whatsapp-campaigns {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(255, 196, 92, 0.12), transparent 42%),
    rgba(255, 255, 255, 0.03);
}

.whatsapp-campaigns__head,
.whatsapp-campaigns__history-head,
.whatsapp-campaigns__preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.whatsapp-campaigns__head .section-title,
.whatsapp-campaigns__history-head .section-title {
  margin: 0;
}

.whatsapp-campaigns__head .section-sub,
.whatsapp-campaigns__history-head .section-sub {
  margin: 4px 0 0;
}

.whatsapp-campaigns__form,
.whatsapp-campaigns__history {
  display: grid;
  gap: 14px;
}

.whatsapp-campaigns__live-preview .whatsapp-templates__preview-pane,
.whatsapp-automation__preview .whatsapp-templates__preview-pane {
  min-height: 280px;
}

.whatsapp-campaigns__grid,
.whatsapp-campaigns__preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.whatsapp-campaigns__field {
  margin: 0;
}

.whatsapp-campaigns__toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.whatsapp-campaigns__toggle-row strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
}

.whatsapp-campaigns__toggle-row small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.whatsapp-campaigns__date-row {
  align-items: stretch;
}

.whatsapp-campaigns__date-row button {
  white-space: nowrap;
}

.whatsapp-campaigns__field--wide,
.whatsapp-campaigns__summary {
  grid-column: 1 / -1;
}

.whatsapp-campaigns__field small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.whatsapp-campaigns__summary,
.whatsapp-campaigns__preview-card,
.whatsapp-campaigns__item {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
}

.whatsapp-campaigns__summary {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.whatsapp-campaigns__summary strong {
  color: var(--text);
}

.whatsapp-campaigns__meta {
  color: var(--muted);
}

.whatsapp-campaigns__preview-card,
.whatsapp-campaigns__preview-list,
.whatsapp-campaigns__history-list,
.whatsapp-campaigns__item-main {
  display: grid;
  gap: 10px;
}

.whatsapp-campaigns__preview-head h4,
.whatsapp-campaigns__item-title {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}

.whatsapp-campaigns__preview-item {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

.whatsapp-campaigns__preview-item-title {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.whatsapp-campaigns__preview-item-meta,
.whatsapp-campaigns__item-meta,
.whatsapp-campaigns__item-submeta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.whatsapp-campaigns__preview-item-error,
.whatsapp-campaigns__item-error {
  color: #ffd3d3;
  font-size: 12px;
  line-height: 1.45;
}

.whatsapp-campaigns__actions {
  justify-content: flex-end;
}

.whatsapp-campaigns__counts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.whatsapp-campaigns__count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 12px;
}

.whatsapp-campaigns__count span {
  color: var(--muted);
}

.whatsapp-campaigns__item {
  gap: 10px;
}

.whatsapp-campaigns__item-top,
.whatsapp-campaigns__item-bottom {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.whatsapp-campaigns__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(186, 194, 208, 0.42);
  background: rgba(186, 194, 208, 0.12);
  color: #edf1f7;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.whatsapp-campaigns__pill.is-scheduled,
.whatsapp-campaigns__count.is-scheduled {
  border-color: rgba(255, 196, 92, 0.42);
  background: rgba(255, 196, 92, 0.14);
  color: #ffe9b8;
}

.whatsapp-campaigns__pill.is-processing,
.whatsapp-campaigns__count.is-processing {
  border-color: rgba(120, 170, 255, 0.42);
  background: rgba(120, 170, 255, 0.14);
  color: #dbe7ff;
}

.whatsapp-campaigns__pill.is-completed,
.whatsapp-campaigns__count.is-completed {
  border-color: rgba(100, 220, 150, 0.45);
  background: rgba(100, 220, 150, 0.12);
  color: #d7ffe4;
}

.whatsapp-campaigns__pill.is-completed_with_errors,
.whatsapp-campaigns__count.is-completed_with_errors {
  border-color: rgba(255, 176, 64, 0.46);
  background: rgba(255, 176, 64, 0.18);
  color: #fff0c7;
}

.whatsapp-campaigns__pill.is-failed,
.whatsapp-campaigns__count.is-failed {
  border-color: rgba(255, 120, 120, 0.45);
  background: rgba(255, 120, 120, 0.14);
  color: #ffd3d3;
}

.whatsapp-campaigns__pill.is-cancelled,
.whatsapp-campaigns__count.is-cancelled {
  border-color: rgba(186, 194, 208, 0.32);
  background: rgba(186, 194, 208, 0.1);
  color: #cdd5e1;
}

.whatsapp-performance {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(92, 214, 192, 0.12), transparent 42%),
    rgba(255, 255, 255, 0.03);
}

.whatsapp-performance__head,
.whatsapp-performance__filters,
.whatsapp-performance__range {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.whatsapp-performance__head .section-title {
  margin: 0;
}

.whatsapp-performance__head .section-sub {
  margin: 4px 0 0;
}

.whatsapp-performance__filters {
  flex-wrap: wrap;
}

.whatsapp-performance__presets {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.whatsapp-performance__preset.is-active {
  border-color: rgba(92, 214, 192, 0.4);
  background: rgba(92, 214, 192, 0.14);
  color: #d8fff7;
}

.whatsapp-performance__range {
  flex: 1 1 420px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.whatsapp-performance__field {
  margin: 0;
  min-width: 160px;
}

.whatsapp-performance__empty,
.whatsapp-performance__card {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
}

.whatsapp-performance__empty {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.whatsapp-performance__grid {
  display: grid;
  gap: 12px;
}

.whatsapp-performance__grid--metrics {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.whatsapp-performance__grid--rates,
.whatsapp-performance__grid--conversations {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.whatsapp-performance__card {
  display: grid;
  gap: 8px;
}

.whatsapp-performance__card-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.whatsapp-performance__card-value {
  color: var(--text);
  font-size: 28px;
  line-height: 1;
  font-weight: 700;
}

.whatsapp-performance__card-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.whatsapp-performance__card.is-sent {
  border-color: rgba(120, 170, 255, 0.28);
}

.whatsapp-performance__card.is-delivered,
.whatsapp-performance__card.is-read {
  border-color: rgba(100, 220, 150, 0.28);
}

.whatsapp-performance__card.is-failed {
  border-color: rgba(255, 120, 120, 0.28);
}

.whatsapp-performance__card.is-inbound,
.whatsapp-performance__card.is-conversations {
  border-color: rgba(92, 214, 192, 0.24);
}

.whatsapp-performance__note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.whatsapp-inbox {
  display: grid;
  gap: 16px;
}

.whatsapp-inbox__head,
.whatsapp-inbox__panel-head,
.whatsapp-inbox__autoreply {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.whatsapp-inbox__head .section-title,
.whatsapp-inbox__panel-head h4,
.whatsapp-inbox__autoreply-copy strong {
  margin: 0;
}

.whatsapp-inbox__head .section-sub,
.whatsapp-inbox__panel-head p,
.whatsapp-inbox__autoreply-copy small {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.whatsapp-inbox__layout {
  display: grid;
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
  gap: 16px;
}

.whatsapp-inbox__panel {
  display: grid;
  gap: 14px;
  min-height: 540px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(214, 176, 93, 0.08), transparent 42%),
    rgba(255, 255, 255, 0.03);
}

.whatsapp-inbox__panel--threads {
  align-content: start;
}

.whatsapp-inbox__panel--conversation {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.whatsapp-inbox__thread-list {
  display: grid;
  gap: 12px;
  overflow: auto;
  padding-right: 4px;
}

.whatsapp-inbox__thread {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.whatsapp-inbox__thread:hover {
  border-color: rgba(214, 176, 93, 0.34);
  background: rgba(255, 255, 255, 0.045);
  transform: translateY(-1px);
}

.whatsapp-inbox__thread.is-active {
  border-color: rgba(214, 176, 93, 0.5);
  background: rgba(214, 176, 93, 0.08);
}

.whatsapp-inbox__thread-head,
.whatsapp-inbox__thread-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.whatsapp-inbox__thread-name-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.whatsapp-inbox__thread-name {
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.whatsapp-inbox__thread-preview {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.whatsapp-inbox__thread-phone,
.whatsapp-inbox__thread-time {
  color: var(--muted);
  font-size: 11px;
}

.whatsapp-inbox__thread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(214, 176, 93, 0.18);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
}

.whatsapp-inbox__thread-mode {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(100, 220, 150, 0.14);
  color: #d9ffe9;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.whatsapp-inbox__thread-tools[hidden],
.whatsapp-inbox__chat[hidden] {
  display: none !important;
}

.whatsapp-inbox__autoreply {
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
}

.whatsapp-inbox__autoreply.is-disabled {
  opacity: 0.72;
}

.whatsapp-inbox__autoreply-copy {
  display: grid;
  gap: 4px;
}

.whatsapp-inbox__autoreply .topic-switch[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
}

.whatsapp-inbox__empty,
.whatsapp-inbox__empty-list {
  padding: 18px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.whatsapp-inbox__chat {
  min-height: 0;
}

.whatsapp-inbox__composer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 16px;
}

.whatsapp-inbox__composer textarea {
  min-height: 88px;
}

.whatsapp-templates {
  display: grid;
  gap: 18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.whatsapp-templates__head,
.whatsapp-templates__history-head,
.whatsapp-templates__mode-head,
.whatsapp-templates__preview-head,
.whatsapp-templates__item-top,
.whatsapp-templates__item-bottom {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.whatsapp-templates__head .section-title,
.whatsapp-templates__history-head .section-title {
  margin: 0;
}

.whatsapp-templates__head .section-sub,
.whatsapp-templates__history-head .section-sub {
  margin: 4px 0 0;
}

.whatsapp-templates__launcher {
  display: grid;
  gap: 14px;
  padding: 18px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
}

.whatsapp-templates__launcher-head .section-title {
  margin: 0;
}

.whatsapp-templates__launcher-head .section-sub {
  margin: 6px 0 0;
}

.whatsapp-templates__launcher-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.whatsapp-templates__launcher-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
    rgba(255, 255, 255, 0.012);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.whatsapp-templates__launcher-card:hover {
  border-color: rgba(120, 170, 255, 0.34);
  background:
    linear-gradient(180deg, rgba(120, 170, 255, 0.08), rgba(120, 170, 255, 0.03)),
    rgba(255, 255, 255, 0.02);
  transform: translateY(-1px);
}

.whatsapp-templates__launcher-card.is-active,
.whatsapp-templates__launcher-card[aria-pressed="true"] {
  border-color: rgba(120, 170, 255, 0.42);
  background:
    linear-gradient(180deg, rgba(120, 170, 255, 0.14), rgba(120, 170, 255, 0.05)),
    rgba(255, 255, 255, 0.02);
  box-shadow: inset 0 0 0 1px rgba(120, 170, 255, 0.08);
}

.whatsapp-templates__launcher-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(120, 170, 255, 0.32);
  background: rgba(120, 170, 255, 0.14);
  color: #e5eeff;
  font-size: 12px;
  font-weight: 700;
}

.whatsapp-templates__launcher-copy {
  display: grid;
  gap: 5px;
}

.whatsapp-templates__launcher-copy strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}

.whatsapp-templates__launcher-copy small,
.whatsapp-templates__launcher-copy em {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  font-style: normal;
}

.whatsapp-templates__launcher-copy em {
  color: #dbe7ff;
}

.whatsapp-templates__workspace {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.whatsapp-templates__main,
.whatsapp-templates__side,
.whatsapp-templates__mode {
  display: grid;
  gap: 14px;
}

.whatsapp-templates__mode,
.whatsapp-templates__form,
.whatsapp-templates__send,
.whatsapp-templates__history {
  display: grid;
  gap: 14px;
  padding: 0;
  border-radius: 0;
  border: 0;
  background: transparent;
}

.whatsapp-templates__mode[hidden] {
  display: none !important;
}

.whatsapp-templates__mode-head h4 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  line-height: 1.2;
}

.whatsapp-templates__mode-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.whatsapp-templates__mode-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.whatsapp-templates__mode-layout--compact {
  grid-template-columns: 1fr;
}

.whatsapp-templates__mode-layout--send {
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.78fr);
  gap: 18px;
}

.whatsapp-templates__mode-layout--library {
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.whatsapp-templates__send--panel {
  display: grid;
  gap: 14px;
}

.whatsapp-templates__send-preview {
  min-width: 0;
}

.whatsapp-templates__grid,
.whatsapp-templates__preview {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.whatsapp-templates__preview--single {
  grid-template-columns: 1fr;
}

.whatsapp-templates__field {
  margin: 0;
}

.intl-phone-input {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
}

.intl-phone-input__country {
  position: relative;
  min-width: 0;
}

.intl-phone-input__country-button,
.intl-phone-input__number,
.intl-phone-input__search {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: #0f1218;
  color: #f4f7fb;
  font: inherit;
}

.intl-phone-input__country-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
  text-align: left;
  cursor: pointer;
}

.intl-phone-input__number,
.intl-phone-input__search {
  padding: 0 12px;
}

.intl-phone-input__country-button:focus-visible,
.intl-phone-input__number:focus,
.intl-phone-input__search:focus {
  border-color: rgba(135, 173, 255, 0.8);
  outline: none;
  box-shadow: 0 0 0 3px rgba(85, 128, 255, 0.18);
}

.intl-phone-input__menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 70;
  width: min(360px, calc(100vw - 40px));
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: #0b0d12;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.42);
}

.intl-phone-input__list {
  display: grid;
  gap: 3px;
  max-height: 260px;
  margin-top: 8px;
  overflow-y: auto;
}

.intl-phone-input__option {
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #f4f7fb;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.intl-phone-input__option:hover,
.intl-phone-input__option:focus-visible {
  background: rgba(120, 170, 255, 0.15);
  outline: none;
}

.modal-form__field small.is-error {
  color: #fca5a5;
}

.whatsapp-template-route-page select,
.whatsapp-template-route-page option,
.whatsapp-workspace select,
.whatsapp-workspace option {
  background: #0f1218;
  color: #f4f7fb;
}

.whatsapp-template-route-page select,
.whatsapp-workspace select {
  color-scheme: dark;
}

.whatsapp-templates__draft-shell,
.whatsapp-templates__draft-stage,
.whatsapp-templates__draft-panel,
.whatsapp-templates__composer,
.whatsapp-templates__builder-top,
.whatsapp-templates__sample-shell {
  display: grid;
  gap: 14px;
}

.whatsapp-templates__form--classic {
  display: grid;
  gap: 18px;
}

.whatsapp-templates__draft-shell--classic {
  grid-template-columns: minmax(0, 1.28fr) minmax(320px, 0.72fr);
  align-items: start;
  gap: 18px;
}

.whatsapp-templates__draft-shell--classic .whatsapp-templates__draft-stage {
  gap: 18px;
}

.whatsapp-templates__draft-shell--classic .whatsapp-templates__draft-panel {
  display: grid;
}

.whatsapp-templates__draft-shell--classic .whatsapp-templates__draft-panel.is-active .whatsapp-templates__builder-card {
  box-shadow:
    inset 0 0 0 1px rgba(120, 170, 255, 0.06),
    0 20px 44px rgba(4, 8, 18, 0.22);
}

.whatsapp-templates__draft-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.whatsapp-templates__draft-tab {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.whatsapp-templates__draft-tab:hover {
  border-color: rgba(120, 170, 255, 0.24);
  background: rgba(120, 170, 255, 0.07);
  transform: translateY(-1px);
}

.whatsapp-templates__draft-tab.is-active,
.whatsapp-templates__draft-tab[aria-selected="true"] {
  border-color: rgba(120, 170, 255, 0.34);
  background:
    linear-gradient(180deg, rgba(120, 170, 255, 0.14), rgba(120, 170, 255, 0.06)),
    rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 0 0 1px rgba(120, 170, 255, 0.08);
}

.whatsapp-templates__draft-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(120, 170, 255, 0.32);
  background: rgba(120, 170, 255, 0.14);
  color: #e5eeff;
  font-size: 12px;
  font-weight: 700;
}

.whatsapp-templates__draft-copy {
  display: grid;
  gap: 4px;
}

.whatsapp-templates__draft-copy strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}

.whatsapp-templates__draft-copy small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.whatsapp-templates__draft-panel[hidden] {
  display: none !important;
}

.whatsapp-templates__draft-preview {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  border: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.038), rgba(255, 255, 255, 0.018)),
    rgba(255, 255, 255, 0.012);
  box-shadow: 0 22px 52px rgba(4, 8, 18, 0.2);
}

.whatsapp-templates__draft-preview--sticky {
  position: static;
}

.whatsapp-templates__draft-shell--classic > .whatsapp-templates__draft-preview--sticky {
  position: sticky;
  top: 16px;
  align-self: start;
  max-height: calc(100dvh - 120px);
  overflow: auto;
}

.whatsapp-templates__draft-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.whatsapp-templates__draft-preview-head strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
}

.whatsapp-templates__draft-preview-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.whatsapp-templates__tips-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  border: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.015);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.whatsapp-templates__tips-head {
  display: grid;
  gap: 6px;
}

.whatsapp-templates__tips-head strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
}

.whatsapp-templates__tips-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.whatsapp-templates__tips-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.whatsapp-templates__tips-list li {
  position: relative;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.whatsapp-templates__tips-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(120, 170, 255, 0.88);
  box-shadow: 0 0 0 4px rgba(120, 170, 255, 0.12);
}

.whatsapp-templates__media-card {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 16px;
  border: 0;
  background: rgba(255, 255, 255, 0.026);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.whatsapp-templates__media-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  border-radius: 14px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(120, 170, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.022);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.whatsapp-templates__media-preview img,
.whatsapp-templates__media-preview video {
  display: block;
  width: 100%;
  height: 72px;
  object-fit: cover;
}

.whatsapp-templates__media-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.whatsapp-templates__media-copy strong,
.whatsapp-templates__media-copy span,
.whatsapp-templates__media-copy small {
  min-width: 0;
}

.whatsapp-templates__media-copy strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
  word-break: break-word;
}

.whatsapp-templates__media-copy span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  word-break: break-word;
}

.whatsapp-templates__media-copy small,
.whatsapp-templates__media-note {
  color: #dbe7ff;
  font-size: 12px;
  line-height: 1.5;
}

.whatsapp-templates__media-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 48px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(120, 170, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(120, 170, 255, 0.18);
  color: #e5eeff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.whatsapp-templates__builder-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  border: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.038), rgba(255, 255, 255, 0.018)),
    rgba(255, 255, 255, 0.012);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 18px 42px rgba(4, 8, 18, 0.18);
}

.whatsapp-templates__builder-card--setup {
  background:
    radial-gradient(circle at top right, rgba(120, 170, 255, 0.1), transparent 48%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.038), rgba(255, 255, 255, 0.018)),
    rgba(255, 255, 255, 0.012);
}

.whatsapp-templates__builder-card-head,
.whatsapp-templates__field-head,
.whatsapp-templates__editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.whatsapp-templates__builder-card-head strong,
.whatsapp-templates__editor-head strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
}

.whatsapp-templates__builder-card-head span,
.whatsapp-templates__editor-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.whatsapp-templates__builder-top {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.whatsapp-templates__builder-pill {
  align-self: center;
}

.whatsapp-templates__field-head strong,
.whatsapp-templates__editor-tools strong {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.whatsapp-templates__editor-block {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  border: 0;
  background: rgba(255, 255, 255, 0.018);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.whatsapp-templates__editor-head code {
  font-size: 11px;
}

.whatsapp-templates__editor-tools {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.whatsapp-templates__field--wide,
.whatsapp-templates__helper,
.whatsapp-templates__examples,
.whatsapp-templates__policy {
  grid-column: 1 / -1;
}

.whatsapp-templates__helper,
.whatsapp-templates__policy,
.whatsapp-templates__variable-card,
.whatsapp-templates__preview-card,
.whatsapp-templates__item {
  padding: 14px 16px;
  border-radius: 16px;
  border: 0;
  background: rgba(255, 255, 255, 0.028);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.whatsapp-templates__item.is-selected {
  border-color: rgba(120, 170, 255, 0.36);
  background:
    radial-gradient(circle at top right, rgba(120, 170, 255, 0.12), transparent 42%),
    rgba(255, 255, 255, 0.045);
}

.whatsapp-templates__helper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.whatsapp-templates__studio-summary {
  align-items: flex-start;
}

.whatsapp-templates__studio-preset-groups,
.whatsapp-templates__studio-preset-group {
  display: grid;
  gap: 12px;
}

.whatsapp-templates__studio-preset-group-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.whatsapp-templates__studio-preset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.whatsapp-templates__studio-preset {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.whatsapp-templates__studio-preset:hover {
  border-color: rgba(120, 170, 255, 0.24);
  background: rgba(120, 170, 255, 0.08);
  transform: translateY(-1px);
}

.whatsapp-templates__studio-preset.is-active {
  border-color: rgba(120, 170, 255, 0.34);
  background:
    linear-gradient(180deg, rgba(120, 170, 255, 0.14), rgba(120, 170, 255, 0.06)),
    rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 0 0 1px rgba(120, 170, 255, 0.08);
}

.whatsapp-templates__studio-preset-eyebrow {
  color: #dbe7ff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.whatsapp-templates__studio-preset strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}

.whatsapp-templates__studio-preset small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.whatsapp-templates__variable-card,
.whatsapp-templates__variable-card-head,
.whatsapp-templates__variable-row,
.whatsapp-templates__bulk-bindings,
.whatsapp-templates__button-builder,
.whatsapp-templates__button-list,
.whatsapp-templates__button-row {
  display: grid;
  gap: 10px;
}

.whatsapp-templates__variable-card-head strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
}

.whatsapp-templates__variable-card-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.whatsapp-templates__variable-row {
  grid-template-columns: 1fr;
}

.whatsapp-templates__sample-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}

.whatsapp-templates__sample-token {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  border: 0;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  color: #dbe7ff;
  font-size: 13px;
  font-weight: 600;
}

.whatsapp-templates__button-row {
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  align-items: end;
  padding: 12px;
  border-radius: 14px;
  border: 0;
  background: rgba(255, 255, 255, 0.02);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.whatsapp-templates__dynamic-url-card {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.whatsapp-templates__dynamic-url-tip {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(130, 170, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(130, 170, 255, 0.14);
}

.whatsapp-templates__dynamic-url-shell {
  display: flex;
  align-items: stretch;
  min-width: 0;
}

.whatsapp-templates__dynamic-url-shell input {
  flex: 1 1 auto;
  min-width: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.whatsapp-templates__dynamic-url-token {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 66px;
  padding: 0 14px;
  border-radius: 0 12px 12px 0;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  color: #dbe7ff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.whatsapp-templates__dynamic-url-preview {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  word-break: break-word;
}

.whatsapp-templates__helper-copy {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.whatsapp-templates__helper strong,
.whatsapp-templates__policy strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
}

.whatsapp-templates__helper span,
.whatsapp-templates__policy {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.whatsapp-templates__examples,
.whatsapp-templates__preview-card,
.whatsapp-templates__history-list,
.whatsapp-templates__meta-panel,
.whatsapp-templates__item-main,
.whatsapp-templates__preview-pane,
.whatsapp-templates__message {
  display: grid;
  gap: 10px;
}

.whatsapp-templates__preview-head h4,
.whatsapp-templates__item-title,
.whatsapp-templates__message-title {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}

.whatsapp-templates__example-row {
  display: grid;
  gap: 6px;
}

.whatsapp-templates__send-fields {
  min-height: 80px;
}

.whatsapp-templates__bulk-bindings {
  min-height: 96px;
}

.whatsapp-templates__history-list,
.whatsapp-campaigns__history-list {
  max-height: 360px;
  overflow: auto;
}

.whatsapp-templates__mode-layout--library .whatsapp-templates__history-list {
  max-height: min(62vh, 720px);
}

.whatsapp-templates__send-template-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.whatsapp-templates__example-label,
.whatsapp-templates__item-meta,
.whatsapp-templates__item-submeta,
.whatsapp-templates__message-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.whatsapp-templates__meta-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.whatsapp-templates__meta-summary-row {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

.whatsapp-templates__meta-summary-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.whatsapp-templates__meta-summary-value {
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
  word-break: break-word;
}

.whatsapp-templates__preview-pane {
  min-height: 180px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.whatsapp-templates__send-preview .whatsapp-templates__preview-pane {
  min-height: 260px;
}

.whatsapp-templates__phone-preview {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 0;
  background:
    linear-gradient(180deg, rgba(14, 18, 28, 0.98), rgba(10, 12, 20, 0.98)),
    rgba(255, 255, 255, 0.02);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.whatsapp-templates__phone-top {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.whatsapp-templates__phone-bubble {
  max-width: min(100%, 420px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 249, 252, 0.9)),
    rgba(255, 255, 255, 0.88);
  color: #111827;
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
}

.whatsapp-templates__phone-bubble.whatsapp-templates__message {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 249, 252, 0.9)),
    rgba(255, 255, 255, 0.88);
  border-color: rgba(255, 255, 255, 0.28);
}

.whatsapp-templates__phone-bubble .whatsapp-templates__message-title,
.whatsapp-templates__phone-bubble .whatsapp-templates__message-body {
  color: #111827;
}

.whatsapp-templates__phone-bubble .whatsapp-templates__message-footer {
  color: #5b6578;
}

.whatsapp-templates__phone-time {
  justify-self: end;
  color: #697386;
  font-size: 11px;
}

.whatsapp-templates__message {
  padding: 14px;
  border-radius: 16px;
  border: 0;
  background: rgba(255, 255, 255, 0.025);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.whatsapp-templates__message-body,
.whatsapp-templates__message-footer {
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.whatsapp-templates__message-footer {
  color: var(--muted);
}

.whatsapp-templates__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.whatsapp-templates__buttons--stack {
  display: grid;
  gap: 8px;
}

.whatsapp-templates__button-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(120, 170, 255, 0.32);
  background: rgba(120, 170, 255, 0.12);
  color: #dbe7ff;
  font-size: 12px;
}

.whatsapp-templates__buttons--stack .whatsapp-templates__button-pill {
  justify-content: center;
  width: 100%;
  border-radius: 14px;
  padding: 11px 14px;
}

.whatsapp-templates__studio-fixed-actions,
.whatsapp-templates__toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.whatsapp-templates__studio-fixed-actions {
  display: grid;
  gap: 4px;
}

.whatsapp-templates__studio-fixed-actions strong,
.whatsapp-templates__toggle-row strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}

.whatsapp-templates__studio-fixed-actions span,
.whatsapp-templates__toggle-row small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.whatsapp-templates__payload {
  min-height: 180px;
  margin: 0;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 14, 24, 0.45);
  color: #dbe7ff;
  font-size: 12px;
  line-height: 1.55;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.whatsapp-templates__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.whatsapp-templates__actions--footer {
  align-items: center;
  gap: 16px;
}

.whatsapp-templates__actions-note {
  margin: 0;
  max-width: 560px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.whatsapp-templates__panel-actions,
.whatsapp-templates__submit-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.whatsapp-templates__submit-actions {
  justify-content: flex-end;
  margin-left: auto;
}

.whatsapp-templates__counts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.whatsapp-templates__count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 12px;
}

.whatsapp-templates__count span {
  color: var(--muted);
}

.whatsapp-templates__item {
  display: grid;
  gap: 10px;
}

.whatsapp-templates__mode-layout--library .whatsapp-templates__item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px 20px;
}

.whatsapp-templates__mode-layout--library .whatsapp-templates__item-top,
.whatsapp-templates__mode-layout--library .whatsapp-templates__item-bottom,
.whatsapp-templates__mode-layout--library .whatsapp-templates__item-error {
  grid-column: 1 / -1;
}

.whatsapp-templates__mode-layout--library .whatsapp-templates__item-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px 20px;
}

.whatsapp-templates__mode-layout--library .whatsapp-templates__item-actions {
  justify-content: flex-end;
}

.whatsapp-templates__item-error {
  color: #ffd3d3;
  font-size: 12px;
  line-height: 1.45;
}

.whatsapp-templates__item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
}

.whatsapp-templates__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(186, 194, 208, 0.42);
  background: rgba(186, 194, 208, 0.12);
  color: #edf1f7;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.whatsapp-templates__pill.is-pending,
.whatsapp-templates__count.is-pending {
  border-color: rgba(255, 196, 92, 0.42);
  background: rgba(255, 196, 92, 0.14);
  color: #ffe9b8;
}

.whatsapp-templates__pill.is-draft,
.whatsapp-templates__count.is-draft {
  border-color: rgba(120, 170, 255, 0.42);
  background: rgba(120, 170, 255, 0.14);
  color: #dbe7ff;
}

.whatsapp-templates__pill.is-approved,
.whatsapp-templates__count.is-approved {
  border-color: rgba(100, 220, 150, 0.45);
  background: rgba(100, 220, 150, 0.12);
  color: #d7ffe4;
}

.whatsapp-templates__pill.is-rejected,
.whatsapp-templates__count.is-rejected {
  border-color: rgba(255, 120, 120, 0.45);
  background: rgba(255, 120, 120, 0.14);
  color: #ffd3d3;
}

.whatsapp-templates__pill.is-paused,
.whatsapp-templates__count.is-paused {
  border-color: rgba(120, 170, 255, 0.42);
  background: rgba(120, 170, 255, 0.14);
  color: #dbe7ff;
}

.whatsapp-templates__pill.is-disabled,
.whatsapp-templates__count.is-disabled,
.whatsapp-templates__pill.is-archived,
.whatsapp-templates__count.is-archived,
.whatsapp-templates__pill.is-deleted,
.whatsapp-templates__count.is-deleted,
.whatsapp-templates__pill.is-unknown,
.whatsapp-templates__count.is-unknown {
  border-color: rgba(186, 194, 208, 0.32);
  background: rgba(186, 194, 208, 0.1);
  color: #cdd5e1;
}

.whatsapp-templates__pill.is-limit_exceeded,
.whatsapp-templates__count.is-limit_exceeded {
  border-color: rgba(255, 176, 64, 0.42);
  background: rgba(255, 176, 64, 0.12);
  color: #fff0c7;
}

@media (max-width: 1180px) {
  .whatsapp-templates__draft-shell--classic {
    grid-template-columns: 1fr;
  }

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

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

  .whatsapp-templates__studio-preset-grid {
    grid-template-columns: 1fr;
  }

  .whatsapp-templates__sample-row,
  .whatsapp-templates__button-row {
    grid-template-columns: 1fr;
  }

  .whatsapp-templates__workspace,
  .whatsapp-templates__mode-layout,
  .whatsapp-templates__mode-layout--compact {
    grid-template-columns: 1fr;
  }
}

.bom-onboarding-modal__panel {
  max-width: 560px;
}

.bom-details-modal__panel {
  max-width: 520px;
}

.bom-details-modal__list {
  display: grid;
  gap: 0;
  margin: 0;
}

.bom-details-modal__list > div {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(0, 1.3fr);
  gap: 16px;
  padding: 12px 0;
}

.bom-details-modal__list > div + div {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.bom-details-modal__list dt {
  color: var(--muted);
  font-size: 12px;
}

.bom-details-modal__list dd {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  text-align: right;
  overflow-wrap: anywhere;
}

.bom-onboarding-modal__summary,
.bom-onboarding-modal__feedback {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.bom-onboarding-modal__feedback {
  margin-bottom: 0;
}

.bom-onboarding-modal__feedback.is-error {
  border-color: rgba(255, 120, 120, 0.5);
  color: #ffd3d3;
}

.bom-onboarding-modal__feedback.is-ok {
  border-color: rgba(100, 220, 150, 0.55);
  color: #d7ffe4;
}

.bom-onboarding-modal__form {
  display: grid;
  gap: 14px;
}

.bom-onboarding-modal__hint {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.bom-onboarding-modal__meta {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.bom-onboarding-modal__note {
  margin: 0;
  max-width: 280px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.bom-onboarding-modal__form .modal__actions--split {
  justify-content: flex-end;
}

.bom-setup-modal__panel {
  width: min(760px, 94vw);
  max-width: 760px;
  gap: 20px;
}

.bom-setup-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.bom-setup-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.02);
  opacity: 0.82;
  transition: border-color 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

.bom-setup-step__index {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  flex: 0 0 auto;
}

.bom-setup-step__body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.bom-setup-step__body strong {
  font-size: 14px;
  line-height: 1.2;
}

.bom-setup-step__body span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.bom-setup-step.is-active {
  opacity: 1;
  border-color: rgba(133, 162, 206, 0.34);
  background:
    radial-gradient(circle at top right, rgba(133, 162, 206, 0.16), transparent 52%),
    linear-gradient(180deg, rgba(133, 162, 206, 0.1), rgba(255, 255, 255, 0.03));
}

.bom-setup-step.is-active .bom-setup-step__index {
  background: rgba(133, 162, 206, 0.18);
  border-color: rgba(133, 162, 206, 0.3);
  color: #edf5ff;
}

.bom-setup-step.is-complete {
  opacity: 1;
  border-color: rgba(110, 214, 158, 0.42);
  background:
    radial-gradient(circle at top right, rgba(110, 214, 158, 0.18), transparent 48%),
    linear-gradient(180deg, rgba(110, 214, 158, 0.1), rgba(255, 255, 255, 0.03));
}

.bom-setup-step.is-complete .bom-setup-step__index {
  background: rgba(110, 214, 158, 0.18);
  border-color: rgba(110, 214, 158, 0.34);
  color: #dcffeb;
}

.bom-setup-step.is-upcoming {
  opacity: 0.68;
}

.bom-setup-modal__summary,
.bom-setup-modal__meta {
  padding: 15px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.bom-setup-modal__form {
  display: grid;
  gap: 18px;
}

.bom-setup-modal__field-group {
  display: grid;
  gap: 16px;
}

.bom-builder-lite {
  margin-top: 4px;
  padding: 8px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  display: grid;
  gap: 16px;
}

.bom-workspace-nav {
  display: none;
  align-items: center;
  gap: 24px;
  overflow-x: auto;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  scrollbar-width: none;
}

.bom-workspace-nav::-webkit-scrollbar {
  display: none;
}

.is-bom-onboarded .bom-workspace-nav {
  display: flex;
}

.bom-workspace-nav__item {
  position: relative;
  flex: 0 0 auto;
  appearance: none;
  padding: 4px 0 13px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.bom-workspace-nav__item:hover,
.bom-workspace-nav__item.is-active {
  color: var(--text);
}

.bom-workspace-nav__item.is-active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: rgba(120, 170, 255, 0.9);
}

[data-bom-integration-card] > .bom-workspace-nav {
  gap: 4px;
  padding-inline: 0;
}

[data-bom-integration-card] > .bom-workspace-nav > .bom-workspace-nav__item {
  padding: 5px 12px 11px;
  white-space: nowrap;
}

@media (max-width: 640px) {
  [data-bom-integration-card] > .bom-workspace-nav {
    gap: 18px;
  }

  [data-bom-integration-card] > .bom-workspace-nav > .bom-workspace-nav__item {
    padding-inline: 0;
  }
}

.bom-published-pages-intro {
  display: none;
}

.bom-builder-mode {
  display: flex;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.bom-builder-mode__item {
  position: relative;
  display: grid;
  gap: 3px;
  padding: 4px 0 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.bom-builder-mode__item span {
  font-size: 13px;
  font-weight: 600;
}

.bom-builder-mode__item small {
  color: inherit;
  font-size: 10px;
}

.bom-builder-mode__item:hover,
.bom-builder-mode__item.is-active {
  color: var(--text);
}

.bom-builder-mode__item.is-active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: rgba(120, 170, 255, 0.9);
}

.bom-chat-image-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px;
  max-height: 220px;
  overflow: auto;
  min-width: 0;
}
.bom-chat-image-panel[hidden] { display: none; }
.bom-chat-image-panel label { display: grid; gap: 4px; min-width: 0; }
.bom-chat-image-panel input, .bom-chat-image-panel select { max-width: 100%; min-width: 0; }
.bom-chat-image-panel img { width: 64px; height: 64px; object-fit: contain; border-radius: 8px; }
.bom-chat-image-panel small { flex-basis: 100%; overflow-wrap: anywhere; }
.bom-chat-image-panel button { min-height: 44px; }

.bom-builder-prompt-workspace {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.18);
}

.bom-builder-prompt-workspace .bom-builder-lite__chat {
  min-height: 260px;
  max-height: 440px;
  padding: 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.bom-builder-chat-actions {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  overflow-x: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  scrollbar-width: none;
}

.bom-builder-chat-actions::-webkit-scrollbar {
  display: none;
}

.bom-builder-chat-actions .btn {
  flex: 0 0 auto;
  min-width: 0;
  padding: 7px 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
}

.bom-builder-chat-actions .btn:hover:not(:disabled) {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.bom-builder-chat-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: end;
  gap: 10px;
  margin: 0 12px 12px;
  padding: 9px 9px 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.bom-builder-chat-composer textarea {
  width: 100%;
  min-height: 38px;
  max-height: 140px;
  padding: 8px 0;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  line-height: 1.45;
}

.bom-builder-chat-send {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  background: var(--text);
  color: var(--bg);
  font-size: 20px;
  cursor: pointer;
}

.bom-builder-chat-send:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.bom-builder-manual-workspace,
.bom-published-pages-empty {
  display: grid;
  gap: 8px;
  padding: 10px 0;
}

.bom-published-pages-empty {
  justify-items: start;
}

.bom-published-pages-empty span {
  color: var(--muted);
  font-size: 13px;
}

.bom-mode-manual .bom-builder-lite__meta,
.bom-mode-manual .bom-builder-lite__followups,
.bom-mode-manual .bom-builder-lite__feedback {
  display: none;
}

.integration-card.bom-tab-editor {
  height: 100%;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  padding: 12px 16px 14px;
  overflow: hidden;
}

.bom-tab-editor .bom-workspace-nav {
  min-height: 34px;
}

.bom-tab-editor .bom-workspace-nav__item {
  padding-bottom: 10px;
}

.bom-tab-editor .bom-builder-lite {
  position: relative;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.integration-card.bom-tab-editor.bom-mode-manual .bom-builder-lite {
  grid-template-rows: auto auto minmax(0, 1fr);
  align-content: stretch;
}

.integration-card.bom-tab-editor.bom-mode-manual .bom-builder-manual-workspace {
  grid-row: 3;
  align-self: stretch;
}

.bom-tab-editor .bom-builder-lite__head {
  align-items: center;
  min-height: 32px;
}

.bom-builder-lite__head-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.bom-builder-publication {
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.bom-builder-publication__label {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.bom-builder-publication .bom-manual-switch__track {
  width: 36px;
  height: 20px;
}

.bom-builder-publication .bom-manual-switch__track::after {
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
}

.bom-builder-publication input[type="checkbox"]:checked + .bom-manual-switch__track::after {
  transform: translateX(16px);
}

.bom-builder-publication strong {
  min-width: 20px;
}

.bom-builder-publication.is-ineligible .bom-builder-publication__label,
.bom-builder-publication.is-ineligible strong {
  color: var(--muted);
}

.bom-tab-editor .bom-builder-lite__head .integration-card__eyebrow {
  display: none;
}

.bom-tab-editor .bom-builder-lite__head > div:first-child {
  min-width: 0;
  width: 100%;
}

.bom-tab-editor .bom-builder-lite__head .section-sub {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.5;
}

.bom-builder-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 12px;
}

.bom-builder-steps li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bom-builder-steps li > span {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--border);
  border-radius: 50%;
}

.bom-builder-steps [aria-current="step"] {
  color: var(--text);
  font-weight: 600;
}

.bom-builder-steps [aria-current="step"] > span {
  background: rgba(120, 170, 255, 0.2);
  border-color: rgba(120, 170, 255, 0.65);
}

.bom-tab-editor [data-creation-stage="start"] .bom-builder-lite__head {
  padding: 16px;
  border-radius: 14px;
  background: rgba(120, 170, 255, 0.06);
}

.bom-tab-editor .bom-builder-lite__head .section-title {
  margin: 0;
  font-size: 16px;
  overflow-wrap: anywhere;
}

.bom-tab-editor .bom-builder-mode {
  min-height: 36px;
  gap: 18px;
}

.bom-tab-editor .bom-builder-mode__item {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding-bottom: 9px;
}

.bom-tab-editor .bom-builder-lite__library {
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.bom-tab-editor .bom-builder-lite__library-field {
  display: block;
}

.bom-tab-editor .bom-builder-lite__library-field > span {
  display: none;
}

.bom-tab-editor .bom-builder-lite__library-field select,
.bom-tab-editor .bom-builder-lite__library-actions .btn {
  min-height: 34px;
  padding-top: 7px;
  padding-bottom: 7px;
}

.bom-tab-editor .bom-builder-lite__library-actions {
  flex-wrap: nowrap;
  gap: 6px;
}

.bom-tab-editor .bom-builder-prompt-workspace {
  grid-row: 3;
  align-self: stretch;
  grid-template-rows: minmax(0, 1fr) auto auto auto auto;
  min-height: 0;
  height: 100%;
  border-radius: 14px;
}

.bom-tab-editor .bom-builder-prompt-workspace .bom-builder-lite__chat {
  min-height: 0;
  max-height: none;
  height: 100%;
  padding: 18px clamp(16px, 4vw, 56px);
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.bom-tab-editor .bom-builder-lite__bubble {
  max-width: min(82%, 760px);
}

.bom-tab-editor .bom-builder-lite__followups,
.bom-tab-editor .bom-builder-lite__feedback {
  margin: 0 12px;
  padding: 8px 11px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.4;
  max-height: 76px;
  overflow: auto;
}

.bom-tab-editor .bom-builder-chat-actions {
  min-height: 34px;
  padding: 5px 12px;
}

.bom-tab-editor .bom-builder-chat-composer {
  margin-bottom: 10px;
}

.bom-tab-editor .bom-builder-manual-workspace {
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
  height: 100%;
  padding: 0;
  overflow: hidden;
}

.bom-manual-nav {
  display: flex;
  gap: 18px;
  min-height: 34px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.bom-manual-nav__item {
  padding: 0 0 9px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.bom-manual-nav__item.is-active {
  border-bottom-color: rgba(120, 170, 255, 0.95);
  color: var(--text);
}

.bom-manual-nav__item:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.bom-manual-editor {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 14px;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.bom-manual-editor__outline,
.bom-manual-editor__inspector {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
}

.bom-manual-editor__outline {
  grid-column: 1 / -1;
  padding-right: 4px;
}

.bom-manual-editor__title,
.bom-manual-inspector__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.bom-manual-editor__title span,
.bom-manual-inspector__head span {
  color: var(--muted);
  font-size: 11px;
}

.bom-manual-editor__blocks {
  display: grid;
  gap: 6px;
}

.bom-manual-block {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  border: 1px solid transparent;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    opacity 0.16s ease,
    transform 0.16s ease;
}

.bom-manual-block.is-selected {
  border-color: rgba(120, 170, 255, 0.48);
  background: rgba(120, 170, 255, 0.08);
}

.bom-manual-block.is-dragging {
  opacity: 0.34;
  transform: scale(0.985);
}

.bom-manual-block.is-drop-target {
  border-color: rgba(120, 170, 255, 0.58);
  background: rgba(120, 170, 255, 0.07);
}

.bom-manual-block--drag-preview {
  position: fixed;
  z-index: 9999;
  top: -1000px;
  left: -1000px;
  opacity: 0.96;
  border-color: rgba(120, 170, 255, 0.72);
  background: #1b1e24;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.bom-manual-block-drop-indicator {
  display: grid;
  place-items: center;
  min-height: 42px;
  border: 1px dashed rgba(120, 170, 255, 0.72);
  border-radius: 10px;
  background: rgba(120, 170, 255, 0.08);
  color: rgba(190, 215, 255, 0.95);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  pointer-events: none;
  animation: bom-block-drop-open 0.16s ease-out;
}

@keyframes bom-block-drop-open {
  from {
    min-height: 0;
    opacity: 0;
    transform: scaleY(0.4);
  }

  to {
    min-height: 42px;
    opacity: 1;
    transform: scaleY(1);
  }
}

.bom-manual-block__drag {
  display: grid;
  place-items: center;
  align-self: stretch;
  width: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 18px;
  cursor: grab;
  touch-action: none;
}

.bom-manual-block__drag:active {
  cursor: grabbing;
}

.bom-manual-block__drag:focus-visible {
  outline: 2px solid rgba(120, 170, 255, 0.72);
  outline-offset: -3px;
}

.bom-manual-block__select {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 9px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.bom-manual-block__select span:last-child {
  display: grid;
  min-width: 0;
}

.bom-manual-block__select strong,
.bom-manual-block__select small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bom-manual-block__select strong {
  font-size: 12px;
}

.bom-manual-block__select small,
.bom-manual-block__index {
  color: var(--muted);
  font-size: 10px;
}

.bom-manual-editor__inspector {
  display: grid;
  align-content: start;
  gap: 10px;
}

.bom-manual-editor__inspector label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
}

.bom-manual-editor__inspector input,
.bom-manual-editor__inspector textarea,
.bom-manual-editor__inspector select {
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  outline: none;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.bom-manual-editor__inspector textarea {
  resize: vertical;
}

.bom-manual-editor__inspector small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.bom-manual-inspector__type {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bom-manual-image {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.bom-manual-image img {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  border-radius: 12px;
}

.bom-manual-image .btn { min-height: 44px; }
.bom-manual-image [role="status"] { margin: 0; overflow-wrap: anywhere; }
.bom-manual-image [role="status"]:empty { display: none; }

.bom-manual-inspector__toggle {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.bom-manual-inspector__toggle input {
  width: 20px;
  height: 20px;
}

.bom-manual-editor__inspector .bom-manual-inspector__switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 38px;
}

.bom-manual-switch {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bom-manual-switch input[type="checkbox"] {
  position: absolute;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  opacity: 0;
  pointer-events: none;
}

.bom-manual-switch__track {
  position: relative;
  display: block;
  width: 42px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.bom-manual-switch__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.28);
  transition: transform 0.18s ease, background 0.18s ease;
}

.bom-manual-switch input[type="checkbox"]:checked + .bom-manual-switch__track {
  border-color: rgba(120, 170, 255, 0.72);
  background: rgba(90, 145, 235, 0.78);
}

.bom-manual-switch input[type="checkbox"]:checked + .bom-manual-switch__track::after {
  background: #fff;
  transform: translateX(18px);
}

.bom-manual-switch input[type="checkbox"]:focus-visible + .bom-manual-switch__track {
  outline: 2px solid rgba(120, 170, 255, 0.78);
  outline-offset: 2px;
}

.bom-manual-switch strong {
  min-width: 24px;
  color: var(--muted);
  font-size: 10px;
}

.bom-manual-switch input[type="checkbox"]:disabled + .bom-manual-switch__track {
  cursor: not-allowed;
  opacity: 0.42;
}

.bom-manual-options {
  display: grid;
  gap: 8px;
}

.bom-manual-value-display {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.bom-manual-value-display > label:first-child {
  grid-column: 1 / -1;
}

.bom-manual-value-display > label[hidden] {
  display: none;
}

@media (max-width: 640px) {
  .bom-manual-value-display {
    grid-template-columns: minmax(0, 1fr);
  }
}

.bom-manual-options__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
}

.bom-manual-options__head button {
  padding: 5px 8px;
  border: 0;
  border-radius: 8px;
  background: rgba(120, 170, 255, 0.1);
  color: rgba(190, 215, 255, 0.96);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.bom-manual-options__labels,
.bom-manual-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(86px, 0.32fr) 32px;
  align-items: center;
  gap: 7px;
}

.bom-manual-options__labels {
  padding: 0 2px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bom-manual-options__list {
  display: grid;
  gap: 7px;
}

.bom-manual-capacity-settings { display: grid; gap: 8px; }
.bom-manual-capacity {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}
.bom-manual-capacity label { min-width: 0; }
.bom-manual-option:has(.bom-manual-capacity) {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
@media (max-width: 480px) {
  .bom-manual-capacity { grid-template-columns: minmax(0, 1fr); }
}

.bom-manual-option input {
  min-height: 38px;
}

.bom-manual-option button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 18px;
  cursor: pointer;
}

.bom-manual-option button:hover:not(:disabled) {
  background: rgba(255, 100, 100, 0.08);
  color: #ffb4b4;
}

.bom-manual-option button:disabled {
  cursor: not-allowed;
  opacity: 0.24;
}

.bom-manual-inspector__actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-top: 4px;
}

.bom-manual-editor__empty {
  padding: 18px 4px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.bom-manual-section {
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
}

.bom-manual-section__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.bom-manual-section__head > div {
  display: grid;
  gap: 4px;
}

.bom-manual-section__head strong {
  color: var(--text);
  font-size: 16px;
}

.bom-manual-section__head span {
  color: var(--muted);
  font-size: 12px;
}

.bom-manual-settings__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
  max-width: 900px;
}

.bom-manual-field {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
}

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

.bom-header-image-field {
  display: grid;
  grid-template-columns: 144px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 4px 0;
}

.bom-header-image-field__preview {
  display: grid;
  place-items: center;
  width: 144px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 11px;
}

.bom-header-image-field__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bom-header-image-field__body {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 6px;
  min-width: 0;
}

.bom-header-image-field__body > strong {
  color: var(--text);
  font-size: 13px;
}

.bom-header-image-field__body > small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.bom-header-image-field__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 3px;
}

.bom-header-image-field__actions .btn {
  min-height: 34px;
  padding: 7px 11px;
  font-size: 11px;
}

.bom-form-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 2400;
  display: grid;
  place-items: center;
  padding: 18px;
}

body.is-bom-preview-open {
  overflow: hidden;
}

.bom-form-preview-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.76);
  backdrop-filter: blur(10px);
}

.bom-form-preview-modal__dialog {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1160px, 100%);
  height: min(900px, calc(100dvh - 36px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  background: #0b0b0c;
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.55);
}

.bom-form-preview-modal__dialog:focus {
  outline: none;
}

.bom-form-preview-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.bom-form-preview-modal__head > div:first-child {
  display: grid;
  gap: 2px;
}

.bom-form-preview-modal__head .integration-card__eyebrow {
  margin: 0;
}

.bom-form-preview-modal__head strong {
  color: var(--text);
  font-size: 16px;
}

.bom-form-preview-modal__tools,
.bom-form-preview-modal__sizes {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bom-form-preview-modal__sizes {
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.035);
}

.bom-form-preview-modal__sizes button,
.bom-form-preview-modal__close {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.bom-form-preview-modal__sizes button {
  padding: 7px 11px;
}

.bom-form-preview-modal__sizes button.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.bom-form-preview-modal__close {
  width: 36px;
  color: var(--text);
  font-size: 22px;
}

.bom-form-preview-modal__public-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  color: var(--text);
  font-size: 11px;
  font-weight: 650;
  text-decoration: none;
}

.bom-form-preview-modal__public-link:hover,
.bom-form-preview-modal__public-link:focus-visible {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.06);
}

.bom-form-preview-modal__status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.bom-form-preview-modal__message {
  min-height: min(420px, 60dvh);
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.bom-form-preview-modal__message strong {
  color: var(--text);
  font-size: 18px;
}

.bom-form-preview-modal__message p {
  max-width: 480px;
  margin: 0;
}

.bom-form-preview-modal__message.is-error {
  color: #f0a3a3;
}

.bom-form-preview-modal__stage {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: clamp(16px, 3vw, 34px);
  background:
    radial-gradient(circle at 50% 0%, rgba(122, 162, 255, 0.1), transparent 42%),
    #101113;
}

.bom-form-preview-modal__viewport {
  width: min(860px, 100%);
  min-height: 100%;
  margin: 0 auto;
  transition: width 180ms ease;
}

.bom-form-preview-modal__stage[data-preview-size="mobile"] .bom-form-preview-modal__viewport {
  width: min(390px, 100%);
}

.bom-form-preview {
  --preview-bg: #0d0e10;
  --preview-surface: #15171a;
  --preview-surface-strong: #1c1f23;
  --preview-text: #f5f6f8;
  --preview-muted: #9ba1aa;
  --preview-border: rgba(255, 255, 255, 0.1);
  --preview-accent: #f5f6f8;
  --preview-accent-text: #111214;
  min-height: 100%;
  overflow: hidden;
  border: 1px solid var(--preview-border);
  border-radius: 22px;
  background: var(--preview-bg);
  color: var(--preview-text);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
}

.bom-form-preview.is-light {
  --preview-bg: #f5f5f3;
  --preview-surface: #ffffff;
  --preview-surface-strong: #eeeeeb;
  --preview-text: #161719;
  --preview-muted: #686c73;
  --preview-border: rgba(16, 18, 22, 0.12);
  --preview-accent: #17181a;
  --preview-accent-text: #ffffff;
}

.bom-form-preview__hero {
  width: 100%;
  aspect-ratio: 16 / 6;
  overflow: hidden;
  background: var(--preview-surface);
}

.bom-form-preview__hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bom-form-preview__hero--placeholder {
  display: grid;
  place-items: center;
  color: var(--preview-muted);
  font-size: 11px;
  background:
    linear-gradient(135deg, transparent 40%, var(--preview-border) 40%, var(--preview-border) 41%, transparent 41%),
    var(--preview-surface);
  background-size: 18px 18px;
}

.bom-form-preview__content {
  width: min(680px, 100%);
  margin: 0 auto;
  padding: clamp(26px, 5vw, 54px) clamp(18px, 5vw, 46px) 48px;
}

.bom-form-preview__intro {
  display: grid;
  gap: 9px;
  margin-bottom: 34px;
}

.bom-form-preview__eyebrow {
  color: var(--preview-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.bom-form-preview__intro h1 {
  margin: 0;
  color: var(--preview-text);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.bom-form-preview__intro p,
.bom-form-preview__description {
  margin: 0;
  color: var(--preview-muted);
  font-size: 13px;
  line-height: 1.55;
}

.bom-form-preview__form {
  display: grid;
  gap: 26px;
}

.bom-form-preview__copy-block {
  display: grid;
  gap: 7px;
  padding: 4px 0;
}

.bom-form-preview__copy-block h2 {
  margin: 0;
  color: var(--preview-text);
  font-size: 20px;
  letter-spacing: -0.02em;
}

.bom-form-preview__field,
.bom-form-preview__choice-field {
  display: grid;
  gap: 9px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.bom-form-preview__field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  color: var(--preview-text);
  font-size: 13px;
}

.bom-form-preview__required {
  color: var(--preview-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bom-form-preview input:not([type="radio"]):not([type="checkbox"]),
.bom-form-preview textarea,
.bom-form-preview select {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--preview-border);
  border-radius: 12px;
  outline: none;
  background: var(--preview-surface);
  color: var(--preview-text);
  font: inherit;
  font-size: 13px;
}

.bom-form-preview textarea {
  min-height: 104px;
  resize: vertical;
}

.bom-form-preview input:focus,
.bom-form-preview textarea:focus,
.bom-form-preview select:focus {
  border-color: color-mix(in srgb, var(--preview-text) 38%, transparent);
}

.bom-form-preview__choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.bom-form-preview__choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 58px;
  padding: 11px 12px;
  border: 1px solid var(--preview-border);
  border-radius: 13px;
  background: var(--preview-surface);
  color: var(--preview-text);
  cursor: pointer;
}

.bom-form-preview__choice:has(input:checked) {
  border-color: color-mix(in srgb, var(--preview-text) 42%, transparent);
  background: var(--preview-surface-strong);
}

.bom-form-preview__choice input {
  width: 16px;
  height: 16px;
  accent-color: var(--preview-text);
}

.bom-form-preview__choice-label {
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
}

.bom-form-preview__choice-price {
  color: var(--preview-muted);
  font-size: 11px;
  white-space: nowrap;
}

.bom-reservation-settings { display: grid; gap: 12px; margin-top: 16px; }
.bom-reservation-settings label { display: grid; gap: 6px; }
.bom-reservation-settings__times { display: flex; flex-wrap: wrap; gap: 8px; }
.bom-reservation-calendar {
  box-sizing: border-box;
  width: 100%;
  max-width: 420px;
  min-width: 0;
  margin: 16px auto;
  padding: clamp(10px, 3vw, 18px);
  border: 1px solid var(--preview-border, #788398);
  border-radius: 16px;
  background: var(--preview-surface, transparent);
  color: var(--preview-text, inherit);
}
.bom-reservation-calendar__heading {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.bom-reservation-calendar__heading strong {
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}
.bom-reservation-calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
.bom-reservation-calendar button {
  box-sizing: border-box;
  display: grid;
  place-items: center;
  width: 100%;
  min-width: 0;
  min-height: 40px;
  margin: 0;
  padding: 4px 2px;
  border: 1px solid var(--preview-border, #788398);
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 13px;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
}
.bom-reservation-calendar__heading button {
  font-size: 24px;
}
.bom-reservation-calendar .bom-reservation-calendar__weekday {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 36px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}
.bom-reservation-calendar .is-open {
  background: #146345;
  color: #fff;
  border-color: #3ca579;
}
.bom-reservation-calendar .is-closed {
  opacity: .65;
  text-decoration: line-through;
}
.bom-reservation-calendar button[aria-pressed="true"] {
  box-shadow: inset 0 0 0 2px currentColor;
}
.bom-reservation-calendar button:hover:not(:disabled) {
  border-color: currentColor;
}
.bom-reservation-calendar button:focus-visible {
  outline: 3px solid #668dff;
  outline-offset: 2px;
}
.bom-reservation-calendar button:disabled {
  cursor: default;
}

.bom-reservation-date-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.bom-reservation-date {
  position: relative;
  min-width: 0;
}
.bom-form-preview .bom-reservation-date input {
  box-sizing: border-box;
  padding-right: 48px;
}
.bom-reservation-date__toggle,
.bom-reservation-popup__close {
  display: grid;
  place-items: center;
  width: 36px;
  min-height: 36px;
  padding: 0;
  border: 1px solid var(--preview-border);
  border-radius: 9px;
  background: var(--preview-surface-strong);
  color: var(--preview-text);
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.bom-reservation-date__toggle {
  position: absolute;
  right: 5px;
  top: 5px;
}
.bom-reservation-date__toggle:disabled {
  opacity: .4;
  cursor: default;
}
.bom-reservation-date__toggle:focus-visible,
.bom-reservation-popup__close:focus-visible {
  outline: 3px solid #668dff;
  outline-offset: 2px;
}
.bom-reservation-popup {
  box-sizing: border-box;
  width: min(420px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 18px;
  overflow: auto;
  border: 1px solid var(--preview-border);
  border-radius: 18px;
  background: var(--preview-surface);
  color: var(--preview-text);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}
.bom-reservation-popup::backdrop {
  background: rgba(0, 0, 0, .55);
}
.bom-reservation-popup__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 14px;
}
.bom-reservation-popup .bom-reservation-calendar {
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
}

.bom-form-preview__reservation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.bom-form-preview__reservation-grid label {
  display: grid;
  gap: 6px;
  color: var(--preview-muted);
  font-size: 10px;
}

.bom-form-preview__image-block {
  display: grid;
  gap: 8px;
  margin: 0;
}

.bom-form-preview__image-block > img,
.bom-form-preview__image-placeholder {
  width: 100%;
  aspect-ratio: 16 / 8;
  border-radius: 15px;
}

.bom-form-preview__image-block > img {
  object-fit: cover;
}

.bom-form-preview__image-placeholder {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  border: 1px dashed var(--preview-border);
  background: var(--preview-surface);
  color: var(--preview-muted);
}

.bom-form-preview__image-placeholder > span {
  font-size: 22px;
}

.bom-form-preview__image-placeholder > strong {
  color: var(--preview-text);
  font-size: 12px;
}

.bom-form-preview__image-placeholder > small,
.bom-form-preview__image-block figcaption,
.bom-form-preview__unsupported {
  color: var(--preview-muted);
  font-size: 10px;
}

.bom-form-preview__button-block {
  display: grid;
  justify-items: start;
  gap: 7px;
}

.bom-form-preview__secondary-button,
.bom-form-preview__submit {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  margin-top: 8px;
  padding: 11px 16px;
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.bom-form-preview__secondary-button {
  background: var(--preview-surface);
  color: var(--preview-text);
}

.bom-form-preview__submit {
  background: var(--preview-accent);
  color: var(--preview-accent-text);
}

.bom-form-preview__secondary-button[hidden],
.bom-form-preview__submit[hidden] {
  display: none;
}

.bom-form-preview__submit:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.bom-form-preview__blocks-empty,
.bom-form-preview__empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  min-height: 220px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.bom-form-preview__blocks-empty {
  min-height: 150px;
  border: 1px dashed var(--preview-border);
  border-radius: 14px;
  color: var(--preview-muted);
}

.bom-form-preview__blocks-empty strong,
.bom-form-preview__empty strong {
  color: var(--preview-text, var(--text));
  font-size: 14px;
}

.bom-form-preview__blocks-empty span,
.bom-form-preview__empty span {
  font-size: 11px;
}

.bom-form-preview-modal__stage[data-preview-size="mobile"] .bom-form-preview {
  border-radius: 26px;
}

.bom-form-preview-modal__stage[data-preview-size="mobile"] .bom-form-preview__hero {
  aspect-ratio: 16 / 8;
}

.bom-form-preview-modal__stage[data-preview-size="mobile"] .bom-form-preview__content {
  padding: 28px 18px 34px;
}

.bom-form-preview-modal__stage[data-preview-size="mobile"] .bom-form-preview__intro h1 {
  font-size: 30px;
}

.bom-form-preview-modal__stage[data-preview-size="mobile"] .bom-form-preview__choices,
.bom-form-preview-modal__stage[data-preview-size="mobile"] .bom-form-preview__reservation-grid {
  grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 640px) {
  .bom-form-preview-modal {
    padding: 0;
  }

  .bom-form-preview-modal__dialog {
    width: 100%;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .bom-form-preview-modal__head {
    gap: 10px;
    padding: 10px 12px;
  }

  .bom-form-preview-modal__head > div:first-child .integration-card__eyebrow {
    display: none;
  }

  .bom-form-preview-modal__head strong {
    font-size: 14px;
  }

  .bom-form-preview-modal__sizes button {
    padding: 6px 8px;
  }

  .bom-form-preview-modal__public-link {
    width: 34px;
    padding: 0;
    overflow: hidden;
    justify-content: center;
    color: transparent;
    white-space: nowrap;
  }

  .bom-form-preview-modal__public-link::after {
    content: '↗';
    color: var(--text);
    font-size: 15px;
  }

  .bom-form-preview-modal__stage {
    padding: 12px;
  }

  .bom-form-preview-modal__stage[data-preview-size="desktop"] .bom-form-preview-modal__viewport {
    min-width: 720px;
  }

  .bom-form-preview__choices,
  .bom-form-preview__reservation-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.bom-manual-field input,
.bom-manual-field textarea,
.bom-manual-field select {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  outline: none;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.bom-manual-field textarea {
  resize: vertical;
}

.bom-manual-field input:invalid {
  border-color: rgba(255, 120, 120, 0.5);
}

.bom-manual-block-toolbar {
  grid-column: 1 / -1;
  position: static;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--bg);
}

.bom-manual-block-toolbar > button,
.bom-manual-block-menu > summary {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.bom-manual-block-menu > summary::-webkit-details-marker {
  display: none;
}

.bom-manual-block-toolbar > button:hover,
.bom-manual-block-menu > summary:hover,
.bom-manual-block-menu[open] > summary {
  background: rgba(120, 170, 255, 0.14);
}

.bom-manual-block-menu {
  position: relative;
}

.bom-manual-block-menu__popover {
  position: absolute;
  z-index: 12;
  bottom: calc(100% + 8px);
  left: 50%;
  display: grid;
  width: 210px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 13px;
  background: #1b1c20;
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.66),
    0 0 0 1px rgba(0, 0, 0, 0.28);
  transform: translateX(-50%);
}

.bom-manual-block-menu__popover button {
  min-height: 38px;
  padding: 9px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(235, 239, 247, 0.9);
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.bom-manual-block-menu__popover button:hover {
  background: rgba(120, 170, 255, 0.13);
  color: #fff;
}

.bom-manual-block-modal {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
}

.bom-manual-block-modal[hidden] {
  display: none;
}

.bom-manual-block-modal__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(4px);
  cursor: default;
}

.bom-manual-block-modal__dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(100%, 560px);
  max-height: calc(100dvh - 32px);
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: #121316;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.52);
}

.bom-manual-block-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.bom-manual-block-modal__head strong {
  color: var(--text);
  font-size: 15px;
}

.bom-manual-block-modal__head button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 22px;
  cursor: pointer;
}

.bom-manual-block-modal__head button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.bom-manual-block-modal .bom-manual-editor__inspector {
  min-height: 0;
  padding: 14px 2px 2px;
  overflow-y: auto;
  border: 0;
}

.bom-manual-payment {
  /* Collection and calculation share one scroll area and keep their natural height. */
  display: block;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 8px 24px 0;
}

.bom-manual-payment > * {
  max-width: 1040px;
  min-width: 0;
}

.bom-manual-payment .bom-manual-section__head {
  flex-wrap: wrap;
  align-items: center;
}

.bom-payment-collection {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  align-items: start;
  gap: 20px;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.bom-manual-payment .modal-form__field {
  align-content: start;
  gap: 8px;
}

.bom-manual-payment .modal-form__field small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.bom-manual-payment .custom-dropdown__trigger,
.bom-payment-collection input {
  min-height: 44px;
  font-family: inherit;
  font-size: 16px;
}

.bom-manual-payment .custom-dropdown__trigger:focus-visible,
.bom-payment-collection input:focus-visible {
  outline: 2px solid #9bc2ff;
  outline-offset: 2px;
}

.bom-manual-payment .bom-builder-lite__calculator-head {
  flex-wrap: wrap;
}

.bom-manual-payment .bom-builder-lite__calculator-head > div {
  flex: 1 1 280px;
  min-width: 0;
}

.bom-manual-payment .bom-builder-lite__calculator-grid {
  align-items: start;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.bom-tab-editor .bom-manual-payment .bom-builder-lite__calculator,
.bom-manual-payment .bom-builder-lite__calculator {
  height: auto;
  overflow: visible;
  align-content: start;
}

.bom-manual-payment__toggle,
.bom-manual-notification__active {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
}

.bom-manual-payment__toggle input,
.bom-manual-notification__active input {
  width: 20px;
  height: 20px;
}

.bom-manual-payment__empty {
  align-self: start;
  max-width: 620px;
  padding: 18px 0;
  color: var(--muted);
  font-size: 13px;
}

.bom-manual-notifications__list {
  display: grid;
  gap: 10px;
  max-width: 900px;
}

.bom-manual-notification {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: end;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.bom-manual-notification__active {
  min-height: 38px;
}

.bom-tab-editor .bom-builder-manual-workspace > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.bom-tab-editor .bom-builder-manual-workspace > div:first-child .integration-card__eyebrow,
.bom-tab-editor .bom-builder-manual-workspace > div:first-child .section-sub {
  display: none;
}

.bom-tab-editor .bom-builder-manual-workspace > div:first-child .section-title {
  margin: 0;
  font-size: 14px;
}

.bom-tab-editor .bom-builder-lite__calculator {
  min-height: 0;
  height: 100%;
  padding: 14px 4px 4px;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  background: transparent;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.bom-tab-editor .bom-builder-lite__checkout {
  position: absolute;
  inset: 0;
  z-index: 5;
  min-height: 0;
  overflow-y: auto;
  background: var(--panel);
}

.is-bom-onboarded:not(.bom-tab-connection) > .integration-card__main,
.is-bom-onboarded:not(.bom-tab-connection) > .integration-card__footer {
  display: none;
}

.is-bom-onboarded.bom-tab-connection > .bom-builder-lite {
  display: none;
}

.is-bom-onboarded.bom-tab-published .bom-published-pages-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.is-bom-onboarded.bom-tab-published
  > .bom-builder-lite
  > :not(.bom-published-pages-intro):not(.bom-pages-browser) {
  display: none;
}

.is-bom-onboarded.bom-tab-published > .bom-builder-lite {
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.bom-pages-browser {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
  overflow: hidden;
}

.bom-pages-provider-state {
  padding: 1px 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.bom-pages-provider-state.is-warn {
  color: rgba(244, 190, 135, 0.92);
}

.bom-tab-editor .bom-pages-browser {
  display: none;
}

.bom-pages-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.bom-pages-filters {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 22px;
  overflow-x: auto;
  scrollbar-width: none;
}

.bom-pages-filters::-webkit-scrollbar {
  display: none;
}

.bom-pages-filter {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 0 9px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.bom-pages-filter:hover,
.bom-pages-filter.is-active {
  color: var(--text);
}

.bom-pages-filter.is-active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: rgba(120, 170, 255, 0.9);
}

.bom-pages-filter small {
  min-width: 18px;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  font-size: 10px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.bom-pages-search {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  flex: 0 1 240px;
  min-width: 160px;
  margin-bottom: 7px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}

.bom-pages-search:focus-within {
  border-color: rgba(120, 170, 255, 0.55);
}

.bom-pages-search input {
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
}

.bom-pages-search input::placeholder {
  color: var(--muted);
}

.bom-pages-list {
  display: grid;
  align-content: start;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.bom-pages-list__empty {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 7px;
  height: 100%;
  min-height: 220px;
  padding: 24px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.bom-pages-list__empty strong {
  color: var(--text);
  font-size: 16px;
}

.bom-pages-list__empty span {
  max-width: 390px;
  line-height: 1.5;
}

.bom-pages-list__empty .btn {
  margin-top: 8px;
}

.bom-page-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
  min-width: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.bom-page-entry .bom-page-row {
  border-bottom: 0;
}

.bom-page-entry__test {
  margin: 8px 4px;
  white-space: nowrap;
}

.bom-page-entry__error {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
}

.bom-page-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 11px;
  min-width: 0;
  min-height: 64px;
  padding: 10px 4px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.bom-page-row:hover,
.bom-page-row.is-current {
  border-color: rgba(120, 170, 255, 0.24);
  background: rgba(120, 170, 255, 0.055);
}

.bom-page-row__icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(220, 232, 250, 0.82);
  font-size: 11px;
  font-weight: 800;
}

.bom-page-row__copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.bom-page-row__copy strong,
.bom-page-row__copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bom-page-row__copy strong {
  font-size: 13px;
}

.bom-page-row__copy small,
.bom-page-row__meta,
.bom-page-row__arrow {
  color: var(--muted);
  font-size: 11px;
}

.bom-page-row__meta {
  padding: 4px 7px;
  border-radius: 999px;
  white-space: nowrap;
}

.bom-page-row__meta.is-published {
  background: rgba(94, 210, 151, 0.1);
  color: rgba(165, 239, 199, 0.9);
}

.bom-page-row__meta.is-draft {
  background: rgba(255, 255, 255, 0.055);
}

.bom-page-row__arrow {
  font-size: 15px;
  transition: color 0.16s ease, transform 0.16s ease;
}

.bom-page-row:hover .bom-page-row__arrow {
  color: var(--text);
  transform: translateX(2px);
}

@media (max-width: 640px) {
  .is-bom-onboarded.bom-tab-published .bom-published-pages-intro {
    align-items: center;
  }

  .bom-published-pages-intro .integration-card__eyebrow,
  .bom-published-pages-intro .section-sub {
    display: none;
  }

  .bom-published-pages-intro .section-title {
    margin: 0;
    font-size: 18px;
  }

  .bom-published-pages-intro .btn {
    min-height: 38px;
    padding: 8px 12px;
  }

  .bom-pages-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .bom-pages-search {
    grid-row: 1;
    width: 100%;
    min-width: 0;
    margin: 0;
  }

  .bom-pages-filters {
    grid-row: 2;
  }

  .bom-page-row {
    grid-template-columns: 32px minmax(0, 1fr) 16px;
    grid-template-areas:
      "icon copy arrow"
      ". status .";
    gap: 10px;
  }

  .bom-page-entry {
    grid-template-columns: minmax(0, 1fr);
  }

  .bom-page-entry__test {
    justify-self: end;
    margin-top: 0;
  }

  .bom-page-row__icon {
    grid-area: icon;
  }

  .bom-page-row__copy {
    grid-area: copy;
  }

  .bom-page-row__meta {
    grid-area: status;
    justify-self: start;
    margin-top: -4px;
    padding: 3px 7px;
    font-size: 10px;
  }

  .bom-page-row__arrow {
    grid-area: arrow;
  }
}

  .bom-builder-lite__head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
  }

  .bom-builder-lite__library {
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .bom-builder-lite__library-field {
    margin: 0;
  }

  .bom-builder-lite__library-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

.bom-builder-lite__chat {
  display: grid;
  gap: 12px;
  max-height: 320px;
  overflow: auto;
  padding: 14px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.bom-builder-lite__bubble {
  max-width: min(88%, 720px);
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.bom-builder-lite__bubble--user {
  justify-self: end;
  background: rgba(133, 162, 206, 0.18);
  border-color: rgba(133, 162, 206, 0.28);
}

.bom-builder-lite__bubble--assistant {
  justify-self: start;
}

.bom-builder-lite__bubble strong {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, rgba(255, 255, 255, 0.72));
}

.bom-tab-editor .bom-builder-prompt-workspace.chatgpt {
  border: 1px solid var(--chat-shell-border);
  border-radius: var(--chat-shell-radius);
  background: var(--chat-shell-bg);
  box-shadow: var(--chat-shell-shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.bom-tab-editor .bom-builder-lite__chat.chatgpt__messages {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 10px;
  background: transparent;
  border: 0;
  border-radius: 0;
  touch-action: pan-y;
}

.bom-tab-editor .bom-builder-lite__chat.chatgpt__messages::before {
  content: "";
  margin-top: auto;
}

.bom-tab-editor .bom-builder-lite__bubble {
  width: fit-content;
  font-size: var(--chat-meta-size);
}

.bom-tab-editor .bom-builder-lite__bubble--assistant {
  align-self: flex-start;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.bom-tab-editor .bom-builder-lite__bubble--user {
  align-self: flex-end;
  max-width: 84%;
  padding: var(--chat-bubble-padding);
  border: 1px solid #fff;
  border-radius: var(--chat-bubble-radius);
  background: #fff;
  color: #000;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}

.bom-tab-editor .bom-builder-lite__bubble .bubble__body {
  color: #fff;
  font-size: var(--chat-text-size);
  line-height: 1.45;
}

.bom-tab-editor .bom-builder-lite__bubble--user .bubble__body {
  color: #000;
}

/* Integration cards normally render paragraphs as muted 14px supporting
   copy. Chat Markdown also uses paragraphs, so explicitly keep BOM assistant
   prose on the same typography as the sender message. */
.bom-tab-editor .bom-builder-lite__bubble .bubble__body p {
  color: inherit;
  font-size: inherit;
}

/* Integration descriptions use muted compact paragraphs, but paragraphs
   inside any integration chat must retain the shared chat presentation. */
.integration-card .bubble .bubble__body p {
  color: inherit;
  font-size: inherit;
}

.bom-tab-editor .bom-builder-lite__empty {
  align-self: flex-start;
  max-width: min(100%, 720px);
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(155, 194, 255, 0.14), transparent 35%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  color: rgba(255, 255, 255, 0.94);
  font-size: var(--chat-text-size);
  font-weight: 500;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

.bom-tab-editor .bom-builder-chat-composer.chatgpt__composer {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin: 0 14px 14px;
  padding: 10px 12px 10px 14px;
  border: 1px solid var(--chat-composer-border);
  border-radius: 22px;
  background: var(--chat-composer-bg);
  box-shadow: var(--chat-composer-shadow);
}

.bom-tab-editor .bom-builder-chat-composer.chatgpt__composer textarea {
  min-height: 32px;
  height: 32px;
  max-height: calc(5 * 1.4em + 12px);
  padding: 6px 4px 6px 0;
  font-size: 14px;
  line-height: 1.4;
}

.bom-tab-editor .bom-builder-chat-composer.chatgpt__composer .bom-builder-chat-send {
  width: 36px;
  min-width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 0;
}

.bom-tab-editor .bom-builder-chat-composer.chatgpt__composer .bom-builder-chat-send span {
  display: none;
}

/* Keep the BOM editor locked to the available dashboard viewport. */
.integrations-shell:has(.integration-card.bom-tab-editor),
.integrations-shell:has(.integration-card.bom-tab-editor) .integrations-layout,
.integrations-shell:has(.integration-card.bom-tab-editor) .integrations-content,
.integrations-shell:has(.integration-card.bom-tab-editor) .integrations-grid {
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.integrations-shell:has(.integration-card.bom-tab-editor) .integrations-grid {
  grid-template-rows: minmax(0, 1fr);
  align-content: stretch;
}

.integration-card.bom-tab-editor,
.bom-tab-editor .bom-builder-lite,
.bom-tab-editor .bom-builder-prompt-workspace {
  min-height: 0;
  height: 100%;
}

/* Mitra replies are plain chat content; only user messages use bubbles. */
.bom-tab-editor .bom-builder-lite__bubble--assistant,
.bom-tab-editor .bom-builder-lite__empty {
  display: block;
  width: min(100%, 760px);
  max-width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.bom-tab-editor .bom-builder-lite.is-pending .bom-builder-lite__chat::after {
  content: "";
  display: block;
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin: 8px 0 4px;
  border-radius: 50%;
  background: rgba(150, 190, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(120, 170, 255, 0.08);
  animation: bom-ai-dot-breathe 2.8s ease-in-out infinite;
}

@keyframes bom-ai-dot-breathe {
  0%,
  100% {
    opacity: 0.48;
    transform: scale(0.68);
  }

  50% {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bom-tab-editor .bom-builder-lite.is-pending .bom-builder-lite__chat::after {
    animation: none;
  }
}

.bom-builder-lite__empty {
  color: var(--muted, rgba(255, 255, 255, 0.72));
  font-size: 13px;
  line-height: 1.55;
}

.bom-builder-lite__field textarea {
  min-height: 120px;
  resize: vertical;
}

.bom-builder-lite__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.bom-builder-lite__meta {
  color: var(--muted, rgba(255, 255, 255, 0.72));
  font-size: 13px;
}

.bom-builder-lite__calculator {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

.bom-builder-lite__calculator-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.bom-builder-lite__calculator-head strong {
  display: block;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.94);
}

.bom-builder-lite__calculator-head p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted, rgba(255, 255, 255, 0.72));
  line-height: 1.55;
}

.bom-builder-lite__calculator-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.bom-builder-lite__calculator-grid .modal-form__field {
  margin: 0;
}

.bom-builder-lite__calculator-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 10px;
}

.bom-builder-lite__calculator-note {
  color: var(--muted, rgba(255, 255, 255, 0.72));
  font-size: 13px;
  line-height: 1.55;
}

.bom-builder-lite__calculator-note.is-error {
  color: #f0a4a4;
}

.bom-calculation-builder {
  display: grid;
  gap: 14px;
}

.bom-calculation-builder__eligible {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 12px;
}

.bom-calculation-builder__eligible > span {
  color: var(--text);
  font-weight: 600;
}

.bom-calculation-builder__formulas {
  display: grid;
  gap: 10px;
}

.bom-calculation-formula {
  display: grid;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  transition: border-color 0.15s ease, opacity 0.15s ease;
}

.bom-calculation-formula.is-dragging,
.bom-calculation-element.is-dragging {
  opacity: 0.45;
}

.bom-calculation-formula.is-drop-target,
.bom-calculation-element.is-drop-target {
  border-color: rgba(120, 170, 255, 0.8);
}

.bom-calculation-formula__head {
  display: grid;
  grid-template-columns: auto minmax(150px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

.bom-calculation-formula__handle {
  color: var(--muted);
  font-size: 14px;
  cursor: grab;
}

.bom-calculation-formula__handle:active {
  cursor: grabbing;
}

.bom-calculation-formula__head input,
.bom-calculation-element select,
.bom-calculation-element input {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  outline: none;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font: inherit;
}

.bom-calculation-formula__head input {
  border: 0;
  background: transparent;
  font-weight: 600;
}

.bom-calculation-formula__final {
  padding: 4px 8px;
  border: 1px solid rgba(220, 90, 170, 0.55);
  border-radius: 999px;
  color: #ff9bd7;
  font-size: 10px;
}

.bom-calculation-formula__remove {
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
}

.bom-calculation-formula__expression {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.bom-calculation-element {
  display: inline-flex;
  align-items: center;
  min-width: 72px;
  min-height: 40px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: grab;
}

.bom-calculation-element select,
.bom-calculation-element input {
  min-width: 72px;
  width: auto;
  max-width: 260px;
  min-height: 38px;
  padding: 8px 30px 8px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  font-weight: 600;
}

.bom-calculation-element select {
  appearance: none;
  color-scheme: dark;
  cursor: pointer;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.9) 50%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.9) 50%, transparent 50%);
  background-position:
    calc(100% - 14px) 16px,
    calc(100% - 9px) 16px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.bom-calculation-element select:focus {
  outline: 2px solid rgba(255, 255, 255, 0.72);
  outline-offset: -2px;
}

.bom-calculation-element select option {
  background: #17191f;
  color: #f5f7fb;
  font-weight: 500;
}

.bom-calculation-element select option[value="__remove__"] {
  color: #ff9f9f;
}

.bom-calculation-element input {
  width: 96px;
  padding-right: 8px;
}

.bom-calculation-element__remove {
  flex: 0 0 28px;
  color: rgba(255, 255, 255, 0.72);
}

.bom-calculation-token--block {
  background: linear-gradient(135deg, #079ec7, #08b8e7);
}

.bom-calculation-token--operator {
  background: linear-gradient(135deg, #ef584d, #ff7061);
}

.bom-calculation-token--number {
  background: linear-gradient(135deg, #dc8500, #f5a30d);
}

.bom-calculation-token--calculation {
  background: linear-gradient(135deg, #7d3fc4, #9655de);
}

.bom-calculation-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bom-calculation-palette__token {
  min-height: 36px;
  padding: 7px 14px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: grab;
}

.bom-calculation-palette__token:active {
  cursor: grabbing;
}

.bom-calculation-formula__dropzone,
.bom-calculation-builder__dropzone,
.bom-calculation-builder__add {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.bom-calculation-formula__dropzone {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  font-size: 12px;
}

.bom-calculation-builder__dropzone {
  width: 100%;
  min-height: 54px;
  padding: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  font-size: 14px;
}

.bom-calculation-builder__dropzone.is-drop-target,
.bom-calculation-formula__dropzone.is-drop-target {
  border-color: rgba(120, 170, 255, 0.85);
  background: rgba(120, 170, 255, 0.08);
  color: var(--text);
}

.bom-calculation-builder__add {
  justify-self: start;
  padding: 0;
  font-size: 11px;
}

.bom-calculation-element__remove:hover,
.bom-calculation-formula__remove:hover,
.bom-calculation-builder__add:hover {
  color: var(--text);
}

.bom-builder-lite__checkout {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

.bom-builder-lite__checkout[hidden] {
  display: none;
}

.bom-builder-lite__checkout-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.bom-builder-lite__checkout-head strong {
  display: block;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.94);
}

.bom-builder-lite__checkout-head p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted, rgba(255, 255, 255, 0.72));
  line-height: 1.55;
}

.bom-builder-lite__checkout-note {
  color: var(--muted, rgba(255, 255, 255, 0.72));
  font-size: 13px;
  line-height: 1.6;
}

.bom-builder-lite__checkout-fields {
  display: grid;
  gap: 14px;
}

.bom-builder-lite__checkout-section {
  display: grid;
  gap: 12px;
}

.bom-builder-lite__checkout-section-title {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bom-builder-lite__checkout-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.bom-builder-lite__checkout-grid .modal-form__field {
  margin: 0;
}

.bom-builder-lite__checkout-field-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.bom-builder-lite__checkout-field-card.is-reservation {
  background: rgba(133, 162, 206, 0.08);
  border-color: rgba(133, 162, 206, 0.22);
}

.bom-builder-lite__checkout-field-card label {
  margin: 0;
}

.bom-builder-lite__checkout-field-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted, rgba(255, 255, 255, 0.72));
  font-size: 12px;
  line-height: 1.45;
}

.bom-builder-lite__checkout-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
}

.bom-builder-lite__checkout-checks {
  display: grid;
  gap: 10px;
}

.bom-builder-lite__checkout-check {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  line-height: 1.45;
}

.bom-builder-lite__checkout-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
}

.bom-builder-lite__checkout-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.bom-builder-lite__checkout-mount {
  display: grid;
  gap: 12px;
}

.bom-builder-lite__followups {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(133, 162, 206, 0.28);
  background: rgba(133, 162, 206, 0.08);
  color: #e3eefc;
  font-size: 13px;
  line-height: 1.6;
}

.bom-builder-lite__feedback {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  font-size: 14px;
}

.bom-builder-lite__feedback.is-error {
  color: #ffb4b4;
  border-color: rgba(255, 120, 120, 0.3);
}

.bom-builder-lite__feedback.is-ok {
  color: #b6f1c7;
  border-color: rgba(90, 200, 120, 0.3);
}

  .bom-builder-lite__output {
  position: absolute;
  inset: 0;
  z-index: 20;
  margin: 0;
  padding: 16px;
  border-radius: 14px;
  background: rgba(8, 10, 14, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.08);
  max-height: none;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(232, 238, 248, 0.92);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
  }

  @media (max-width: 900px) {
    .bom-tab-editor .bom-builder-manual-workspace {
      grid-template-rows: auto minmax(0, 1fr);
      gap: 6px;
    }

    .bom-tab-editor .bom-builder-manual-workspace > div:first-child {
      display: none;
    }

    .bom-manual-nav {
      flex: 0 0 auto;
      gap: 16px;
      min-height: 32px;
      overflow-x: auto;
      scrollbar-width: none;
    }

    .bom-manual-nav::-webkit-scrollbar {
      display: none;
    }

    .bom-manual-nav__item {
      flex: 0 0 auto;
    }

    .bom-manual-editor {
      grid-template-columns: minmax(0, 1fr);
      grid-template-rows: minmax(190px, 1fr) auto;
      gap: 10px;
      padding-top: 2px;
      overflow-y: auto;
      overscroll-behavior: contain;
    }

    .bom-manual-editor__outline {
      min-height: 170px;
      padding-right: 2px;
      overflow-y: auto;
    }

    .bom-manual-block-toolbar {
      position: static;
      padding: 8px 0 2px;
      background: var(--bg);
    }

    .bom-manual-section__head {
      align-items: flex-start;
      margin-bottom: 14px;
    }

    .bom-manual-settings__grid {
      grid-template-columns: minmax(0, 1fr);
      gap: 13px;
    }

    .bom-manual-field--wide {
      grid-column: auto;
    }

    .bom-header-image-field {
      grid-template-columns: 104px minmax(0, 1fr);
      gap: 12px;
    }

    .bom-header-image-field__preview {
      width: 104px;
      border-radius: 10px;
    }

    .bom-manual-payment__toggle {
      flex: 0 0 auto;
    }

    .bom-manual-notification {
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
    }

    .bom-manual-notification .bom-manual-field {
      grid-column: 1 / -1;
    }

    .bom-tab-editor .bom-builder-prompt-workspace .bom-builder-lite__chat.chatgpt__messages {
      padding: 12px 14px;
    }

    .bom-tab-editor .bom-builder-lite__bubble--assistant {
      max-width: 100%;
    }

    .bom-tab-editor .bom-builder-lite__bubble--user {
      max-width: 92%;
    }

    .bom-tab-editor .bom-builder-lite__bubble .bubble__body,
    .bom-tab-editor .bom-builder-lite__empty {
      font-size: 16px;
    }

    .bom-tab-editor .bom-builder-chat-composer.chatgpt__composer {
      gap: 7px;
      margin: 0 8px 8px;
      padding: 9px 10px 9px 12px;
      border-radius: 20px;
    }

    .bom-tab-editor .bom-builder-chat-composer.chatgpt__composer textarea {
      min-height: 30px;
      height: 30px;
      padding: 5px 4px 5px 0;
      font-size: 16px;
    }

    .bom-builder-lite__library {
      grid-template-columns: minmax(0, 1fr);
    }

    .bom-builder-lite__calculator-grid {
      grid-template-columns: minmax(0, 1fr);
      gap: 8px;
    }

    .bom-builder-lite__calculator-grid .modal-form__field {
      min-width: 0;
      padding: 10px 0;
      border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    }

    .bom-builder-lite__calculator-grid .modal-form__field > span {
      margin-bottom: 7px;
      font-size: 12px;
    }

    .bom-builder-lite__calculator-grid select {
      width: 100%;
      min-width: 0;
      min-height: 46px;
      padding: 10px 42px 10px 12px;
      border-radius: 12px;
      font-size: 16px;
      text-overflow: ellipsis;
    }

    .bom-builder-lite__calculator-grid .modal-form__field small {
      margin-top: 6px;
      font-size: 11px;
      line-height: 1.35;
    }

    .bom-builder-lite__calculator-toggle {
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
    }

    .bom-builder-lite__calculator-toggle input[type="checkbox"] {
      width: 24px;
      height: 24px;
      margin: 0;
    }

    .bom-builder-lite__calculator-toggle small {
      grid-column: 1 / -1;
    }

    .bom-calculation-builder__eligible {
      grid-template-columns: minmax(0, 1fr);
      padding: 10px;
      overflow: hidden;
    }

    .bom-calculation-formula__head {
      grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .bom-calculation-formula__final {
      display: none;
    }

    .bom-calculation-palette,
    .bom-calculation-formula__expression {
      flex-wrap: nowrap;
      overflow-x: auto;
      overscroll-behavior-x: contain;
      scrollbar-width: none;
      -webkit-overflow-scrolling: touch;
    }

    .bom-calculation-palette::-webkit-scrollbar,
    .bom-calculation-formula__expression::-webkit-scrollbar {
      display: none;
    }

    .bom-calculation-palette__token,
    .bom-calculation-element,
    .bom-calculation-formula__dropzone {
      flex: 0 0 auto;
      min-height: 42px;
    }

    .bom-calculation-element {
      max-width: calc(100vw - 64px);
    }

    .bom-calculation-element select {
      max-width: calc(100vw - 64px);
      min-height: 44px;
      padding-right: 36px;
      font-size: 15px;
      text-overflow: ellipsis;
    }

    .bom-calculation-formula {
      padding: 11px;
    }

    .bom-builder-lite__calculator-head p {
      display: none;
    }

    .bom-builder-lite__checkout-grid {
      grid-template-columns: minmax(0, 1fr);
    }

    .bom-builder-lite__library-actions {
      justify-content: flex-start;
    }
  }

.bom-setup-modal__field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.bom-setup-modal__section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.bom-setup-modal__section-head h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.bom-setup-modal__section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.bom-setup-modal__step-pill {
  border-color: rgba(133, 162, 206, 0.28);
  background: rgba(133, 162, 206, 0.1);
  color: #e2ecfb;
}

.bom-setup-modal__note {
  margin: 0;
  max-width: 360px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.whatsapp-test-modal__summary,
.whatsapp-test-modal__feedback,
.whatsapp-test-modal__result {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.whatsapp-test-modal__feedback[hidden],
.whatsapp-test-modal__result[hidden] {
  display: none;
}

.whatsapp-test-modal__feedback.is-error {
  border-color: rgba(255, 120, 120, 0.5);
  color: #ffd3d3;
}

.whatsapp-test-modal__feedback.is-ok {
  border-color: rgba(100, 220, 150, 0.55);
  color: #d7ffe4;
}

.whatsapp-test-modal__result {
  display: grid;
  gap: 10px;
}

.whatsapp-test-modal__result-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}

.whatsapp-test-modal__result-row strong {
  color: var(--text);
  word-break: break-all;
}

.whatsapp-test-modal__form {
  gap: 14px;
}

.whatsapp-test-modal__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.whatsapp-test-modal__field--wide {
  grid-column: 1 / -1;
}

@media (max-width: 640px) {
  .integrations-shell {
    overflow: visible;
  }

  .integrations-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: 0;
    overflow: visible;
  }

  .integrations-content {
    padding: 12px 0 0;
    overflow: visible;
  }

  .integrations-nav {
    display: block;
    padding: 2px 0 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
  }

  .integrations-nav__heading {
    display: none;
  }

  .integrations-nav__list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .integrations-nav__list::-webkit-scrollbar {
    display: none;
  }

  .integrations-nav__item {
    flex: 0 0 auto;
    grid-template-columns: 36px auto;
    min-width: 148px;
    padding: 8px 10px;
  }

  .integrations-nav__item.is-active::before {
    top: auto;
    right: 10px;
    bottom: 0;
    left: 10px;
    width: auto;
    height: 2px;
  }

  .integrations-nav__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .integrations-nav__icon img {
    width: 26px;
    height: 26px;
  }

  .integrations-grid {
    grid-template-columns: 1fr;
    padding-right: 0;
  }

  .integration-card {
    gap: 14px;
    padding: 0;
    border-radius: 0;
  }

  .integration-card.bom-tab-editor {
    padding: 0;
  }

  .integration-card[data-bom-integration-card] {
    padding-inline: 8px;
  }

  .integration-card__main {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
  }

  .integration-card__body {
    gap: 12px;
  }

  .integration-card__rail {
    gap: 18px;
    min-width: 88px;
  }

  .integration-card__logo {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    font-size: 12px;
  }

  .integration-card__logo img {
    width: 30px;
    height: 30px;
  }

  .integration-card h2 {
    font-size: 20px;
  }

  .integration-card p {
    font-size: 13px;
    line-height: 1.45;
  }

  .integration-card__details {
    font-size: 11px;
  }

  .integration-card__footer {
    justify-content: flex-end;
  }

  .integration-card__actions {
    width: auto;
    justify-content: flex-end;
    align-items: center;
  }

  .integration-card__actions .btn {
    min-width: 110px;
  }

  .whatsapp-workspace__tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .whatsapp-category-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .whatsapp-category-nav::-webkit-scrollbar {
    display: none;
  }

  .whatsapp-category-nav .bom-workspace-nav__item {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .whatsapp-workspace__tab {
    flex: 0 0 auto;
  }

  .whatsapp-overview__summary,
  .whatsapp-overview__grid {
    grid-template-columns: 1fr;
  }

  .whatsapp-overview__card-head {
    flex-direction: column;
  }

  .whatsapp-overview__actions {
    justify-content: stretch;
  }

  .whatsapp-overview__actions .btn {
    width: 100%;
  }

  .whatsapp-connection__tools {
    width: 100%;
  }

  .whatsapp-connection__tools-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .whatsapp-connection__tools-actions .btn {
    width: 100%;
  }

  .intl-phone-input {
    grid-template-columns: 1fr;
  }

  .intl-phone-input__menu {
    width: min(360px, calc(100vw - 28px));
  }

  .whatsapp-feature-modal__panel {
    width: min(100%, calc(100vw - 24px));
    max-width: min(100%, calc(100vw - 24px));
    max-height: calc(100dvh - 24px);
    padding: 14px;
  }

  .whatsapp-automation {
    padding: 14px;
    border-radius: 16px;
  }

  .whatsapp-automation__head,
  .whatsapp-automation__history-head,
  .whatsapp-campaigns__head,
  .whatsapp-campaigns__history-head,
  .whatsapp-campaigns__preview-head,
  .whatsapp-template-route-page__head,
  .whatsapp-inbox__head,
  .whatsapp-inbox__panel-head,
  .whatsapp-inbox__autoreply,
  .whatsapp-workspace__section-head,
  .whatsapp-performance__head,
  .whatsapp-performance__filters,
  .whatsapp-performance__range,
  .whatsapp-templates__head,
  .whatsapp-templates__history-head,
  .whatsapp-templates__actions,
  .whatsapp-templates__draft-preview-head,
  .whatsapp-templates__builder-card-head,
  .whatsapp-templates__field-head,
  .whatsapp-templates__editor-head,
  .whatsapp-templates__mode-head,
  .whatsapp-templates__preview-head,
  .whatsapp-templates__helper,
  .whatsapp-templates__intro-head,
  .whatsapp-templates__modal-head,
  .whatsapp-automation__item-top,
  .whatsapp-automation__item-bottom,
  .whatsapp-campaigns__item-top,
  .whatsapp-campaigns__item-bottom,
  .whatsapp-templates__item-top,
  .whatsapp-templates__item-bottom {
    flex-direction: column;
  }

  .whatsapp-templates__mode-layout--library .whatsapp-templates__item,
  .whatsapp-templates__mode-layout--library .whatsapp-templates__item-bottom {
    grid-template-columns: minmax(0, 1fr);
  }

  .whatsapp-templates__mode-layout--library .whatsapp-templates__item-actions {
    justify-content: flex-start;
  }

  .whatsapp-automation__controls,
  .whatsapp-automation__layout,
  .whatsapp-campaigns__layout,
  .whatsapp-campaigns__grid,
  .whatsapp-campaigns__preview,
  .whatsapp-inbox__layout,
  .whatsapp-performance__grid--metrics,
  .whatsapp-performance__grid--rates,
  .whatsapp-performance__grid--conversations,
  .whatsapp-templates__draft-shell--classic,
  .whatsapp-templates__draft-nav,
  .whatsapp-templates__launcher-grid,
  .whatsapp-templates__studio-preset-grid,
  .whatsapp-templates__builder-top,
  .whatsapp-templates__grid,
  .whatsapp-templates__preview,
  .whatsapp-templates-launcher-modal,
  .whatsapp-templates-launcher-modal__grid {
    grid-template-columns: 1fr;
  }

  .whatsapp-templates__workspace,
  .whatsapp-templates__mode-layout,
  .whatsapp-templates__mode-layout--compact,
  .whatsapp-templates__mode-layout--send,
  .whatsapp-templates__mode-layout--library {
    grid-template-columns: 1fr;
  }

  .whatsapp-templates__sample-row,
  .whatsapp-automation__binding-row,
  .whatsapp-templates__button-row,
  .whatsapp-templates__variable-row {
    grid-template-columns: 1fr;
  }

  .whatsapp-templates__panel-actions,
  .whatsapp-templates__submit-actions,
  .whatsapp-workspace__section-actions {
    width: 100%;
  }

  .whatsapp-templates__intro-title,
  .whatsapp-templates__intro-copy,
  .whatsapp-templates__modal-copy {
    flex: 1 1 auto;
    max-width: none;
  }

  .whatsapp-automation__toggle-row,
  .whatsapp-campaigns__toggle-row,
  .whatsapp-templates__toggle-row {
    align-items: flex-start;
  }

  .whatsapp-automation__actions,
  .whatsapp-campaigns__actions,
  .whatsapp-templates__actions {
    justify-content: stretch;
  }

  .whatsapp-templates__draft-preview--sticky {
    position: static;
    top: auto;
  }

  .whatsapp-templates__actions--footer {
    align-items: stretch;
  }

  .whatsapp-templates__actions-note {
    max-width: none;
  }

  .whatsapp-automation__actions .btn,
  .whatsapp-campaigns__actions .btn,
  .whatsapp-templates__actions .btn {
    width: 100%;
  }

  .whatsapp-campaigns,
  .whatsapp-performance,
  .whatsapp-templates,
  .whatsapp-inbox__panel {
    padding: 14px;
    border-radius: 16px;
  }

  .whatsapp-inbox__panel {
    min-height: 0;
  }

  .whatsapp-templates__history-list,
  .whatsapp-campaigns__history-list {
    max-height: none;
  }

  .bom-onboarding-modal__note {
    max-width: none;
  }

  .bom-setup-modal__panel {
    width: min(100%, calc(100vw - 24px));
  }

  .bom-setup-steps {
    grid-template-columns: 1fr;
  }

  .bom-setup-modal__section-head {
    flex-direction: column;
  }

  .bom-setup-modal__field-grid {
    grid-template-columns: 1fr;
  }

  .whatsapp-test-modal__grid {
    grid-template-columns: 1fr;
  }

  .whatsapp-test-modal__result-row {
    flex-direction: column;
    gap: 4px;
  }

  .bom-setup-modal__note {
    max-width: none;
  }

  .bom-setup-modal__form .modal__actions--split {
    justify-content: flex-end;
    align-items: flex-end;
  }

  .bom-setup-modal__form .modal__actions-right {
    justify-content: flex-end;
    width: 100%;
  }
}

/* Borderless BOM prompt canvas with a single pill-shaped composer. */
.bom-tab-editor .bom-builder-prompt-workspace.chatgpt {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.bom-tab-editor .bom-builder-chat-actions {
  border: 0;
}

.bom-tab-editor .bom-builder-chat-composer.chatgpt__composer {
  position: relative;
  z-index: 10;
  grid-template-columns: 44px minmax(0, 1fr) 44px 44px;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: none;
  overflow: visible;
}

.bom-builder-chat-menu {
  position: relative;
  grid-column: 1;
  grid-row: 1;
  align-self: end;
  width: 44px;
  height: 44px;
}

.bom-builder-chat-menu > summary {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

.bom-builder-chat-menu > summary::-webkit-details-marker {
  display: none;
}

.bom-builder-chat-menu > summary:hover,
.bom-builder-chat-menu[open] > summary {
  border-color: rgba(255, 255, 255, 0.18);
  background: #2c2f35;
  color: var(--text);
}

.bom-builder-chat-menu svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bom-builder-chat-menu[open] > summary svg {
  transform: rotate(45deg);
}

.bom-builder-chat-menu > summary:focus-visible,
.bom-builder-chat-menu__panel button:focus-visible {
  outline: 2px solid #9bc2ff;
  outline-offset: 2px;
}

.bom-builder-chat-menu__panel {
  position: absolute;
  left: 0;
  right: auto;
  bottom: calc(100% + 9px);
  z-index: 20;
  display: grid;
  width: min(252px, calc(100vw - 48px));
  max-height: min(280px, calc(var(--chat-visible-height, 100dvh) - 90px));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: #1a1c21;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.38);
}

.bom-builder-chat-menu:not([open]) .bom-builder-chat-menu__panel {
  display: none;
}

.bom-tab-editor .bom-builder-chat-composer.chatgpt__composer .bom-builder-chat-menu__panel button {
  display: flex;
  grid-column: auto;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
  height: auto;
  min-height: 44px;
  padding: 10px 12px;
  gap: 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  text-align: left;
  align-self: stretch;
}

.bom-tab-editor .bom-builder-chat-composer.chatgpt__composer .bom-builder-chat-menu__panel button::before {
  display: none;
}

.bom-tab-editor .bom-builder-chat-composer.chatgpt__composer .bom-builder-chat-menu__panel button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.07);
}

.bom-tab-editor .bom-builder-chat-composer.chatgpt__composer .bom-builder-chat-menu__panel button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.bom-tab-editor .bom-builder-chat-composer.chatgpt__composer .bom-builder-chat-send {
  grid-column: 4;
  grid-row: 1;
  width: 44px;
  height: 44px;
}

.bom-tab-editor .bom-builder-chat-composer.chatgpt__composer > textarea {
  grid-column: 2;
  grid-row: 1;
}

.bom-tab-editor .bom-builder-chat-composer.chatgpt__composer > .mitra-microphone {
  grid-column: 3;
  grid-row: 1;
}

.bom-tab-editor .bom-builder-chat-composer.chatgpt__composer .chat-mic-btn {
  width: 44px;
  min-width: 44px;
  height: 44px;
}

.bom-tab-editor .bom-builder-lite__chat.chatgpt__messages:has(.bom-builder-welcome) {
  justify-content: center;
}

.bom-tab-editor .bom-builder-lite__chat.chatgpt__messages:has(.bom-builder-welcome)::before {
  display: none;
}

.bom-tab-editor .bom-builder-lite__empty.bom-builder-welcome {
  display: grid;
  align-self: center;
  justify-self: center;
  width: min(100%, 720px);
  gap: 22px;
  text-align: center;
}

.bom-builder-welcome__copy {
  display: grid;
  gap: 7px;
}

.bom-builder-changes {
  width: 100%;
  min-width: 0;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(120, 170, 255, 0.04);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.bom-builder-changes summary {
  cursor: pointer;
  font-weight: 600;
}

.bom-builder-changes ul {
  max-height: 240px;
  overflow-y: auto;
  padding-left: 20px;
  margin: 10px 0;
}

.bom-builder-changes li + li {
  margin-top: 6px;
}

.bom-builder-changes p {
  color: var(--muted);
  font-size: 12px;
}

.bom-builder-welcome__copy strong {
  color: var(--text);
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.2;
}

.bom-builder-welcome__copy span {
  color: var(--muted);
  font-size: 13px;
}

.bom-builder-intents {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  width: min(100%, 620px);
  margin: 0 auto;
}

.bom-builder-intents button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: auto;
  max-width: 100%;
  min-height: 34px;
  padding: 7px 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.bom-builder-intents button:hover {
  background: rgba(120, 170, 255, 0.14);
  transform: translateY(-1px);
}

.bom-builder-intents button strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bom-builder-intent__icon {
  display: inline-grid;
  flex: 0 0 16px;
  place-items: center;
  width: 16px;
  height: 16px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
}

@media (max-width: 640px) {
  .bom-tab-editor .bom-builder-chat-composer.chatgpt__composer {
    border-radius: 999px;
  }

  .bom-tab-editor .bom-builder-lite__empty.bom-builder-welcome {
    gap: 16px;
  }

  .bom-builder-intents {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    width: auto;
    max-width: 100%;
  }

  .bom-builder-intents button {
    min-height: 32px;
    padding: 6px 11px;
  }

  .bom-builder-chat-menu__panel {
    left: 0;
    right: auto;
  }
}

/* Separate form entry, financial review and payment without nested card frames. */
.bom-form-preview__fields,
.bom-form-preview__review { display: grid; gap: 18px; min-width: 0; }
.bom-form-preview__fields[hidden],
.bom-form-preview__review[hidden] { display: none !important; }
.bom-form-preview__steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  counter-reset: checkout-step;
  color: var(--preview-muted, #969ba5);
  font-size: 12px;
  line-height: 1.4;
}
.bom-form-preview__steps li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  padding: 0 0 12px;
  margin: 0;
  border-bottom: 2px solid var(--preview-border, #444);
  overflow-wrap: anywhere;
}
.bom-form-preview__steps li::before {
  counter-increment: checkout-step;
  content: counter(checkout-step);
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 28px;
  height: 28px;
  border: 1px solid var(--preview-border, #444);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
}
.bom-form-preview__steps [aria-current="step"] {
  color: var(--preview-text, #fff);
  border-color: currentColor;
  font-weight: 700;
}
.bom-form-preview__steps [aria-current="step"]::before {
  background: var(--preview-accent, #f5f6f8);
  color: var(--preview-accent-text, #111214);
  border-color: transparent;
}
.bom-form-preview__summary-row.is-total { border-top: 1px solid var(--preview-border, #444); margin-top: 10px; padding-top: 14px; font-size: 18px; }
/* WhatsApp: task navigation stays separate from account setup and diagnostics. */
.whatsapp-workspace-card .whatsapp-category-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.whatsapp-workspace-card .whatsapp-category-nav [role="tab"] { white-space: nowrap; padding: 12px 10px; font-size: 14px; }
.whatsapp-workspace-card .whatsapp-category-nav [role="tab"]:focus-visible { outline: 2px solid #9be2b6; outline-offset: 3px; }
.whatsapp-section-heading h3 { margin: 0; font-size: clamp(21px, 2vw, 27px); letter-spacing: -.025em; }
.whatsapp-section-heading p { margin: 8px 0 0; color: var(--muted); max-width: 70ch; line-height: 1.6; }
.whatsapp-status-strip { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 0; border-block: 1px solid var(--border, #303238); }
.whatsapp-status-strip p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.whatsapp-status-strip .btn { flex-shrink: 0; }
.whatsapp-status-strip[hidden], .whatsapp-setup-progress[hidden] { display: none; }
.whatsapp-setup-progress { display: flex; gap: 18px; padding: 0; list-style: none; counter-reset: whatsapp-step; }
.whatsapp-setup-progress li { flex: 1; padding-bottom: 12px; border-bottom: 2px solid var(--border, #303238); color: var(--muted); font-size: 14px; }
.whatsapp-setup-progress li::before { counter-increment: whatsapp-step; content: counter(whatsapp-step) '. '; }
.whatsapp-setup-progress [aria-current="step"] { color: var(--text); border-color: #73c996; font-weight: 600; }
.whatsapp-workspace-card .whatsapp-overview__summary { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.whatsapp-workspace-card .whatsapp-overview__summary > .whatsapp-overview__card:not(.whatsapp-overview__card--connection) {
  grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "metric" "actions"; align-content: start; gap: 14px; padding: 22px; border-radius: 16px; background: rgba(255,255,255,.025);
}
.whatsapp-workspace-card .whatsapp-overview__card:not(.whatsapp-overview__card--connection) .whatsapp-overview__metric strong { font-size: 18px; }
.whatsapp-workspace-card .whatsapp-overview__card:not(.whatsapp-overview__card--connection) .whatsapp-overview__metric span { line-height: 1.6; }
.whatsapp-workspace-card .whatsapp-overview__card--library { border-radius: 16px; background: rgba(255,255,255,.025); }
.whatsapp-route-heading { display: grid; gap: 18px; margin-bottom: 24px; }
.whatsapp-route-heading > .btn { justify-self: start; }
.whatsapp-route-heading .headline { margin: 6px 0; }
.whatsapp-route-heading .sub { max-width: 75ch; line-height: 1.6; }
@media (max-width: 640px) {
  .whatsapp-workspace-card .whatsapp-category-nav { flex-wrap: nowrap; overflow-x: auto; }
  .whatsapp-status-strip { align-items: flex-start; flex-direction: column; gap: 12px; }
  .whatsapp-setup-progress { gap: 10px; }
  .whatsapp-setup-progress li { font-size: 12px; }
}

/* Keep sold-out choices visible in their original provider order. */
.bom-form-preview__choice.is-sold-out { opacity: .48; cursor: not-allowed; filter: grayscale(1); }
.bom-form-preview__choice.is-sold-out input { cursor: not-allowed; }
.bom-form-preview__sold-out { grid-column: 2 / -1; font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.bom-form-preview__sold-out[hidden] { display: none; }
.bom-form-preview__field option:disabled { color: #888; }

/* Payment settings keep each task in one compact, keyboard-accessible panel. */
.bom-payment-tabs { min-width: 0; width: 100%; }
.bom-payment-tabs[hidden], .bom-payment-tabs__panel[hidden] { display: none !important; }
.bom-payment-tabs__nav { display: flex; gap: 6px; overflow-x: auto; max-width: 100%; padding: 4px 0 12px; }
.bom-payment-tabs__nav button { flex: 0 0 auto; border: 1px solid var(--border, #333); background: transparent; color: inherit; border-radius: 999px; padding: 10px 14px; font: inherit; font-size: 13px; cursor: pointer; min-height: 42px; }
.bom-payment-tabs__nav button[aria-selected="true"] { background: var(--text, #eee); color: var(--bg, #111); }
.bom-payment-tabs__nav button:focus-visible { outline: 2px solid #83a9ef; outline-offset: 2px; }
.bom-payment-tabs__panel { min-width: 0; padding-top: 8px; }
.bom-payment-tabs__panel > p { font-size: 13px; line-height: 1.5; opacity: .8; }
.bom-payment-detail { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--border, #333); }
.bom-payment-detail > span:first-child { min-width: 0; display: grid; gap: 6px; }
.bom-payment-detail small { font-size: 13px; line-height: 1.5; opacity: .7; }
.bom-payment-detail .bom-manual-switch { flex: 0 0 auto; }
.bom-payment-tabs__panel .bom-payment-collection { margin: 0; width: 100%; }
@media (max-width: 600px) { .bom-payment-tabs__panel .bom-builder-lite__calculator-grid { grid-template-columns: minmax(0, 1fr); } }

.bom-form-preview__address { min-width: 0; margin: 12px 0; padding: 16px 0; border: 0; border-top: 1px solid rgba(128,128,128,.25); }
.bom-form-preview__address legend { font-size: 16px; font-weight: 600; padding: 0 8px 0 0; }
.bom-form-preview__address > small { display: block; opacity: .75; margin-bottom: 14px; line-height: 1.5; }
.bom-form-preview__address-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.bom-form-preview__address-grid .bom-form-preview__field { min-width: 0; margin: 0; }
.bom-form-preview__address input, .bom-form-preview__address select, [data-checkout-detail] { min-width: 0; max-width: 100%; font-size: 16px; }
.bom-form-preview__address select { -webkit-appearance: none; appearance: none; color-scheme: dark; background-color: var(--preview-surface); color: var(--preview-text); padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23888' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.bom-form-preview.is-light .bom-form-preview__address select { color-scheme: light; }
@media (max-width: 480px) { .bom-form-preview__address-grid { grid-template-columns: minmax(0, 1fr); } }

/* Compact WhatsApp workspace and conversation-focused inbox. */
.whatsapp-workspace-card { --wa-accent: #8ad9b5; gap: 16px; padding: 20px; min-width: 0; }
.whatsapp-workspace-header, .whatsapp-workspace-header__identity, .whatsapp-workspace-header__actions { display: flex; align-items: center; gap: 12px; }
.whatsapp-workspace-header { justify-content: space-between; flex-wrap: wrap; }
.whatsapp-workspace-header__identity img { width: 34px; height: 34px; }
.whatsapp-workspace-header h2 { margin: 0; font-size: 21px; letter-spacing: -.03em; }
.whatsapp-workspace-header p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.whatsapp-workspace-card > .integration-card__main { display: none; }
.whatsapp-workspace-card:not(.is-whatsapp-onboarded) .whatsapp-workspace-header__actions .btn { display: none; }
.whatsapp-workspace-card .whatsapp-category-nav { margin: 0; padding: 4px; gap: 4px; border: 1px solid var(--border); border-radius: 12px; background: rgba(255,255,255,.02); }
.whatsapp-workspace-card .whatsapp-category-nav [role="tab"] { padding: 9px 14px; min-height: 38px; border-radius: 8px; font-size: 13px; }
.whatsapp-workspace-card .whatsapp-category-nav .is-active { color: var(--wa-accent); background: rgba(138,217,181,.09); border-color: transparent; }
.whatsapp-workspace-card .whatsapp-workspace__panel { gap: 14px; }
.whatsapp-workspace-card .whatsapp-section-heading h3 { font-size: 19px; }
.whatsapp-workspace-card .whatsapp-section-heading > .whatsapp-overview__eyebrow { display: none; }
.whatsapp-workspace-card .whatsapp-section-heading p { margin-top: 4px; font-size: 13px; line-height: 1.5; }
.whatsapp-workspace-card .whatsapp-status-strip { padding: 10px 12px; gap: 10px; border: 1px solid var(--border); border-radius: 10px; background: rgba(138,217,181,.035); font-size: 13px; }
.whatsapp-workspace-card .whatsapp-status-strip p { font-size: 12px; }
.whatsapp-workspace-card .whatsapp-overview { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.whatsapp-workspace-card :is(.whatsapp-overview__summary, .whatsapp-overview__grid) { display: contents; }
.whatsapp-workspace-card .whatsapp-overview__card--connection { grid-column: 1 / -1; }
.whatsapp-workspace-card .whatsapp-overview__card:not(.whatsapp-overview__card--connection) { display: flex; flex-direction: column; grid-column: auto; min-height: 0; gap: 12px; padding: 16px; border-radius: 12px; background: rgba(255,255,255,.025); box-shadow: none; }
.whatsapp-workspace-card .whatsapp-overview__card--utilities .whatsapp-overview__metric strong { display: none; }
.whatsapp-workspace-card .whatsapp-overview__card-head { gap: 8px; }
.whatsapp-workspace-card .whatsapp-overview__card-head .section-title { font-size: 15px; }
.whatsapp-workspace-card .whatsapp-overview__eyebrow { font-size: 10px; letter-spacing: .07em; }
.whatsapp-workspace-card .whatsapp-overview__card:not(.whatsapp-overview__card--connection) .whatsapp-overview__metric strong { font-size: 14px; line-height: 1.45; }
.whatsapp-workspace-card .whatsapp-overview__metric span, .whatsapp-workspace-card .whatsapp-overview__copy p { font-size: 12px; line-height: 1.5; }
.whatsapp-workspace-card .whatsapp-overview__actions { margin-top: auto; gap: 6px; }
.whatsapp-workspace-card .btn { min-height: 36px; padding: 8px 12px; font-size: 12px; border-radius: 9px; }
.whatsapp-workspace-card .whatsapp-overview__pill { padding: 4px 7px; font-size: 10px; white-space: nowrap; }
.whatsapp-feature-modal__panel { box-sizing: border-box; width: min(1080px, 96vw); padding: 18px; border-radius: 18px; gap: 12px; }
.whatsapp-feature-modal__panel > .modal__head .headline { font-size: 20px; margin: 0; }
.whatsapp-feature-modal__panel > .modal__head .sub { font-size: 12px; line-height: 1.5; margin: 4px 0 0; max-width: 70ch; }
.whatsapp-feature-modal__panel .section-title { font-size: 16px; }
.whatsapp-feature-modal__panel .section-sub { font-size: 12px; }
.whatsapp-route-heading { gap: 8px; margin-bottom: 16px; }
.whatsapp-route-heading .headline { font-size: 22px; }
.whatsapp-route-heading .sub { font-size: 13px; line-height: 1.5; }
.whatsapp-templates { gap: 12px; }
.whatsapp-templates__panel { padding: 14px; border-radius: 12px; gap: 12px; }
:is([data-whatsapp-template-route-page], .whatsapp-feature-modal__panel) .btn { min-height: 36px; padding: 8px 12px; border-radius: 9px; font-size: 12px; }
.whatsapp-feature-modal__panel--inbox { width: min(1080px, 96vw); height: min(760px, calc(100dvh - 32px)); max-height: calc(100dvh - 32px); overflow: hidden; display: flex; flex-direction: column; }
.whatsapp-inbox { flex: 1; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.whatsapp-inbox__head { align-items: center; }
.whatsapp-inbox__head .section-title { font-size: 13px; color: var(--muted); font-weight: 500; }
.whatsapp-inbox__autoreply { align-items: center; padding: 9px 12px; border-radius: 10px; gap: 10px; }
.whatsapp-inbox__autoreply-copy { gap: 2px; min-width: 0; }
.whatsapp-inbox__autoreply-copy strong { font-size: 12px; }
.whatsapp-inbox__autoreply-copy small { font-size: 11px; line-height: 1.4; margin: 0; }
.whatsapp-inbox__layout { flex: 1; min-height: 0; gap: 0; grid-template-columns: minmax(220px, 28%) minmax(0, 1fr); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.whatsapp-inbox__panel { display: flex; flex-direction: column; gap: 10px; min-height: 0; min-width: 0; padding: 12px; border: 0; border-radius: 0; background: rgba(255,255,255,.012); }
.whatsapp-inbox__panel--threads { border-right: 1px solid var(--border); }
.whatsapp-inbox__panel-head { align-items: center; flex-shrink: 0; }
.whatsapp-inbox__panel-head h4 { font-size: 13px; }
.whatsapp-inbox__panel-head p { font-size: 11px; overflow-wrap: anywhere; }
.whatsapp-inbox__search input { width: 100%; min-width: 0; box-sizing: border-box; padding: 9px 10px; font: inherit; font-size: 12px; border: 1px solid var(--border); border-radius: 8px; background: rgba(255,255,255,.025); color: var(--text); }
.whatsapp-inbox__search input:focus { outline: 2px solid var(--wa-accent); outline-offset: 2px; }
.whatsapp-inbox__thread-list { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 4px; padding: 0; overscroll-behavior: contain; }
.whatsapp-inbox__thread { flex-shrink: 0; gap: 5px; padding: 10px; border-radius: 9px; border-color: transparent; background: transparent; width: 100%; }
.whatsapp-inbox__thread:hover { transform: none; background: rgba(255,255,255,.04); border-color: transparent; }
.whatsapp-inbox__thread.is-active { border-color: rgba(138,217,181,.22); background: rgba(138,217,181,.07); }
.whatsapp-inbox__thread-name { font-size: 12px; }
.whatsapp-inbox__thread-preview { font-size: 12px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.whatsapp-inbox__thread-time { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.whatsapp-inbox__thread-badge { min-width: 20px; height: 20px; padding: 0 5px; background: rgba(138,217,181,.15); }
.whatsapp-inbox__thread-mode { font-size: 9px; padding: 3px 5px; letter-spacing: .03em; }
.whatsapp-inbox__thread-tools .whatsapp-inbox__autoreply-copy { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.whatsapp-inbox__thread-tools .whatsapp-inbox__autoreply-copy small { flex-basis: 100%; }
.whatsapp-inbox__thread-tools .lock-badge { font-size: 10px; padding: 3px 6px; }
.whatsapp-inbox__chat { flex: 1; display: flex; flex-direction: column; min-height: 0; border: 0; background: transparent; }
.whatsapp-inbox__messages { flex: 1; display: flex; flex-direction: column; min-height: 0; padding: 12px 4px; gap: 12px; overflow: auto; overscroll-behavior: contain; }
.whatsapp-inbox__message { display: flex; flex-direction: column; min-width: 0; flex-shrink: 0; align-self: flex-start; width: fit-content; max-width: 88%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: rgba(255,255,255,.035); color: var(--text); }
.whatsapp-inbox__message--outbound { align-self: flex-end; background: rgba(138,217,181,.09); border-color: rgba(138,217,181,.16); color: var(--text); }
.whatsapp-inbox__message-body { color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.6; }
.whatsapp-inbox__message-body a { color: #9edcc0; text-decoration: underline; }
.whatsapp-inbox__sender { display: block; margin-bottom: 4px; color: var(--muted); font-size: 10px; font-weight: 600; }
.whatsapp-inbox__message-time { display: block; align-self: flex-end; margin-top: 7px; max-width: 100%; color: #aeb8b3; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
/* Keep shared dictation behavior, with an explicit inbox layout. */
.whatsapp-inbox__composer.chatgpt__composer { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: end; flex-shrink: 0; margin: 0; padding: 10px 0 0; gap: 8px; border: 0; border-top: 1px solid var(--border); border-radius: 0; background: transparent; box-shadow: none; }
.whatsapp-inbox__composer.chatgpt__composer textarea { grid-column: 1; grid-row: 1; width: 100%; min-width: 0; min-height: 44px; max-height: 110px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px; background: rgba(255,255,255,.04); color: var(--text); font-family: inherit; font-size: 14px; line-height: 20px; resize: none; overflow-y: auto; }
.whatsapp-inbox__composer.chatgpt__composer > .mitra-microphone { grid-column: 2; grid-row: 1; align-self: end; }
.whatsapp-inbox__composer.chatgpt__composer .chat-mic-btn { width: 44px; min-width: 44px; height: 44px; margin: 0; }
.whatsapp-inbox__composer.chatgpt__composer > [data-whatsapp-inbox-reply-send] { grid-column: 3; grid-row: 1; width: auto; min-width: 64px; height: 44px; min-height: 44px; margin: 0; border-radius: 10px; padding: 10px 15px; font-size: 13px; color: #102a20; background: #9bdcbd; border: 1px solid #9bdcbd; }
.whatsapp-inbox__composer.chatgpt__composer > [data-whatsapp-inbox-reply-send]::before { display: none; }
.whatsapp-inbox__typing { display: flex; align-items: center; gap: 8px; padding: 4px 4px 9px; color: var(--muted); font-size: 11px; }
.whatsapp-inbox__typing[hidden] { display: none; }
.whatsapp-inbox__typing-dots { display: inline-flex; gap: 3px; padding: 8px 10px; border-radius: 12px; background: rgba(138,217,181,.09); }
.whatsapp-inbox__typing-dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--wa-accent); animation: whatsapp-typing 1.2s ease-in-out infinite; }
.whatsapp-inbox__typing-dots i:nth-child(2) { animation-delay: .15s; }
.whatsapp-inbox__typing-dots i:nth-child(3) { animation-delay: .3s; }
.whatsapp-inbox__back { display: none; }
@keyframes whatsapp-typing { 0%, 60%, 100% { opacity: .4; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .whatsapp-inbox__typing-dots i { animation: none; opacity: .7; } }
@media (min-width: 701px) and (max-width: 1000px) { .whatsapp-workspace-card .whatsapp-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .whatsapp-workspace-card { padding: 14px; gap: 12px; }
  .whatsapp-workspace-header__identity img { width: 28px; height: 28px; }
  .whatsapp-workspace-header__actions { width: 100%; justify-content: space-between; }
  .whatsapp-workspace-card .whatsapp-overview { grid-template-columns: minmax(0, 1fr); }
  .whatsapp-workspace-card .whatsapp-category-nav { flex-wrap: nowrap; overflow-x: auto; }
  .whatsapp-workspace-card .whatsapp-category-nav [role="tab"], .whatsapp-workspace-card .btn { min-height: 42px; }
  :is([data-whatsapp-template-route-page], .whatsapp-feature-modal__panel) .btn { min-height: 42px; }
  .whatsapp-feature-modal__panel { padding: 14px; width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
  .whatsapp-feature-modal__panel--inbox { height: calc(100dvh - 20px); }
  .whatsapp-feature-modal__panel--inbox > .modal__head .sub { display: none; }
  .whatsapp-inbox__head { display: none; }
  .whatsapp-inbox__panel-head, .whatsapp-inbox__autoreply { flex-direction: row; align-items: center; }
  .whatsapp-inbox__autoreply-copy small { display: none; }
  .whatsapp-inbox__layout { grid-template-columns: minmax(0, 1fr); }
  .whatsapp-inbox__panel--threads { border: 0; }
  .whatsapp-inbox__panel--conversation { display: none; }
  .whatsapp-inbox.has-selected-thread .whatsapp-inbox__panel--threads { display: none; }
  .whatsapp-inbox.has-selected-thread .whatsapp-inbox__panel--conversation { display: flex; }
  .whatsapp-inbox__back { display: inline-flex; flex-shrink: 0; }
  .whatsapp-inbox__panel--conversation > .whatsapp-inbox__panel-head { justify-content: flex-start; }
  .whatsapp-inbox__composer.chatgpt__composer textarea { font-size: 16px; }
  .whatsapp-inbox__message { max-width: 95%; }
}
