:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #17202a;
  --muted: #667085;
  --line: #d9e0ea;
  --brand: #0f766e;
  --brand-dark: #115e59;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: var(--brand-dark);
  text-decoration: none;
}

.topbar {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 10px 14px;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  min-height: 58px;
  padding: 8px 18px;
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand {
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  white-space: nowrap;
}

.topbar nav {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 1px 0;
  scrollbar-width: none;
}

.topbar nav::-webkit-scrollbar {
  display: none;
}

.topbar nav a {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #344054;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
  justify-content: center;
  line-height: 1;
  min-height: 34px;
  padding: 8px 11px;
  white-space: nowrap;
}

.topbar nav a:hover {
  background: #f8fafc;
  border-color: #c7d0dc;
}

.topbar form {
  margin: 0;
}

.topbar .logout-form {
  justify-self: end;
}

.topbar .logout-form button {
  min-height: 36px;
  white-space: nowrap;
}

.client-view-inline {
  align-items: center;
  display: flex;
  gap: 6px;
  justify-self: end;
  min-width: 0;
}

.client-view-inline label {
  color: #475467;
  font-size: 12px;
  font-weight: 800;
  gap: 0;
  letter-spacing: 0;
  margin: 0;
  white-space: nowrap;
}

.client-view-inline select {
  background: #f8fafc;
  border-radius: 999px;
  color: #24324a;
  font-size: 13px;
  font-weight: 750;
  min-height: 34px;
  max-width: 180px;
  padding: 7px 28px 7px 10px;
  width: 160px;
}

body.is-admin-client-view .client-view-inline select {
  border-color: #7dd3fc;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.14);
}

.nav-icon-link {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  line-height: 1;
  min-width: 34px;
  padding: 0;
  width: 34px;
}

.shell {
  margin: 0 auto;
  max-width: 1180px;
  padding: 28px 20px 56px;
}

.heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  font-size: 28px;
  line-height: 1.2;
}

h2 {
  font-size: 18px;
}

.auth {
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr 420px;
  margin-top: 8vh;
}

.panel,
.metrics article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.two {
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
}

.metrics {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-bottom: 18px;
}

.metrics span {
  display: block;
  font-size: 32px;
  font-weight: 800;
}

.dashboard-metrics {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.dashboard-metrics > article:nth-child(-n + 2) {
  grid-column: span 3;
}

.dashboard-metrics > article:nth-child(n + 3) {
  grid-column: span 2;
}

.metrics.compact article {
  padding: 14px 16px;
}

.metrics.compact span {
  font-size: 24px;
}

.queue-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.manual-product-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.instagram-offer-code {
  color: #7c2d12;
  font-size: 14px;
  margin-bottom: 14px;
}

.instagram-code {
  background: #fce7f3;
  border: 1px solid #f9a8d4;
  border-radius: 999px;
  color: #9d174d;
  font-size: 13px;
  letter-spacing: .04em;
  padding: 7px 10px;
  white-space: nowrap;
}

.instagram-event-actions {
  align-items: end;
  display: grid;
  gap: 7px;
  justify-items: end;
}

.video-import-panel {
  margin-bottom: 18px;
}

.video-import-panel summary {
  cursor: pointer;
  font-weight: 800;
}

.video-import-form {
  margin-top: 16px;
}

.video-cover {
  align-items: center;
  aspect-ratio: 1 / .72;
  background: #101828;
  border: 0;
  cursor: pointer;
  display: flex;
  justify-content: center;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.video-cover img {
  height: 100%;
  object-fit: cover;
  opacity: .82;
  width: 100%;
}

.video-play-mark {
  align-items: center;
  background: rgba(16, 24, 40, .88);
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 7px;
  padding: 8px 11px;
  pointer-events: none;
  position: absolute;
  z-index: 1;
}

.video-play-mark::before {
  border-bottom: 5px solid transparent;
  border-left: 8px solid currentColor;
  border-top: 5px solid transparent;
  content: "";
  display: block;
  height: 0;
  width: 0;
}

.ready-video-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.ready-video-card {
  overflow: hidden;
  padding: 0;
}

.ready-video-player {
  background: #101828;
  height: clamp(220px, 25vw, 300px);
  position: relative;
}

.ready-video-player video,
.ready-video-player img,
.ready-video-thumb {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.ready-video-player img {
  opacity: .7;
}

.ready-video-thumb {
  align-items: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: flex;
  justify-content: center;
  min-height: 0;
  padding: 0;
  position: relative;
}

.ready-video-thumb img {
  object-fit: contain;
}

.ready-video-player .status-pill {
  left: 14px;
  position: absolute;
  top: 14px;
}

.ready-video-content {
  padding: 12px;
}

.ready-video-content h2 {
  font-size: 16px;
  line-height: 1.3;
  margin-bottom: 9px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  -webkit-line-clamp: 2;
}

.ready-video-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.ready-video-actions .button-link {
  flex: 1 1 130px;
  justify-content: center;
}

.ready-video-creative {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  margin: 10px 0;
  padding: 8px 0;
}

.ready-video-creative summary {
  color: var(--brand-dark);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.ready-video-creative p {
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
  margin: 10px 0;
  white-space: pre-wrap;
}

.video-copy-button,
.video-add-button {
  font-size: 13px;
  min-height: 34px;
  padding: 6px 10px;
}

.video-product-grid .catalog-action {
  align-items: start;
  display: flex;
}

.video-add-button {
  width: auto;
}

.video-modal {
  align-items: center;
  background: rgba(15, 23, 42, .64);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) 14px max(16px, env(safe-area-inset-bottom));
  position: fixed;
  overscroll-behavior: contain;
  touch-action: none;
  z-index: 200;
}

.video-modal[hidden] {
  display: none;
}

.video-modal-sheet {
  background: #101828;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .4);
  max-width: 620px;
  overflow: hidden;
  transition: transform .18s ease;
  touch-action: none;
  width: min(100%, 620px);
}

body.video-modal-open {
  left: 0;
  overflow: hidden;
  position: fixed;
  right: 0;
  width: 100%;
}

.video-modal-handle {
  background: #98a2b3;
  border: 0;
  border-radius: 999px;
  cursor: grab;
  display: block;
  height: 4px;
  margin: 9px auto 4px;
  min-height: 4px;
  padding: 0;
  touch-action: none;
  width: 44px;
}

.video-modal-bar {
  align-items: center;
  color: #fff;
  display: flex;
  font-size: 14px;
  gap: 10px;
  justify-content: space-between;
  padding: 8px 12px 10px;
}

.video-modal-title-link {
  color: #fff;
  min-width: 0;
  overflow: hidden;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-modal-title-link:hover,
.video-modal-title-link:focus-visible {
  text-decoration: underline;
}

.video-modal-close {
  border-color: rgba(255, 255, 255, .45) !important;
  color: #fff !important;
  font-size: 13px;
  min-height: 32px;
  padding: 5px 9px;
}

.video-modal video {
  background: #000;
  display: block;
  max-height: min(70svh, 680px);
  width: 100%;
}

.video-modal-status {
  color: #fff;
  font-size: 13px;
  line-height: 1.4;
  margin: 0;
  padding: 10px 12px 14px;
}

@media (max-width: 640px) {
  .ready-video-grid {
    grid-template-columns: 1fr;
  }

  .ready-video-player {
    height: 230px;
  }

  .ready-video-content {
    padding: 11px 12px 12px;
  }

  .video-modal {
    align-items: center;
    padding: max(12px, env(safe-area-inset-top)) 10px max(12px, env(safe-area-inset-bottom));
  }

  .video-modal-sheet {
    border-radius: 8px;
    width: 100%;
  }

  .video-modal video {
    max-height: 72svh;
  }
}

.instagram-event-actions form {
  display: inline;
}

.alert-text {
  color: #b42318 !important;
}

@media (max-width: 640px) {
  .instagram-event-list .item,
  .instagram-offer-list .item {
    align-items: flex-start;
    gap: 12px;
  }

  .instagram-event-actions {
    align-items: start;
    justify-items: start;
  }
}

.metric-card.marketplace-mercadolivre {
  border-color: #facc15;
  box-shadow: inset 4px 0 0 #facc15;
}

.metric-card.marketplace-shopee {
  border-color: #fb7a59;
  box-shadow: inset 4px 0 0 #ee4d2d;
}

.metrics small,
.muted,
.item span,
.item p,
.row small {
  color: var(--muted);
}

form {
  margin: 0;
}

label {
  display: grid;
  gap: 7px;
  font-size: 14px;
  font-weight: 650;
  margin-bottom: 14px;
}

input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  min-height: 42px;
  padding: 10px 11px;
  width: 100%;
}

textarea {
  resize: vertical;
}

button {
  background: var(--brand);
  border: 0;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 750;
  min-height: 40px;
  padding: 9px 14px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}

.button-link {
  align-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  display: inline-flex;
  font-weight: 750;
  min-height: 40px;
  padding: 9px 14px;
}

.button-link[aria-busy="true"] {
  border-color: var(--brand);
  color: var(--brand-dark);
  cursor: progress;
  opacity: 0.82;
}

.check {
  align-items: center;
  display: flex;
  gap: 10px;
}

.check input {
  min-height: auto;
  width: auto;
}

.modal-backdrop {
  align-items: center;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: fixed;
  z-index: 100;
}

.modal-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.26);
  max-width: 460px;
  padding: 22px;
  width: min(100%, 460px);
}

.force-password-modal {
  backdrop-filter: blur(2px);
}

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

.form-grid {
  display: grid;
  gap: 10px;
}

.form-grid.two-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.actions.stretch button {
  flex: 1 1 160px;
}

button.full {
  width: 100%;
}

.status-line {
  align-items: baseline;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.pill {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  color: #3730a3;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 8px;
}

.success {
  color: #067647;
  font-weight: 800;
}

.saved-target {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 5px;
  margin-bottom: 14px;
  padding: 12px;
}

.saved-target span,
.saved-target small {
  color: var(--muted);
  font-size: 13px;
}

.saved-target strong {
  font-size: 16px;
  overflow-wrap: anywhere;
}

.list.compact {
  display: grid;
  gap: 10px;
}

.row-actions {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.login-grid {
  align-items: start;
  margin-bottom: 18px;
}

.login-card {
  display: grid;
  gap: 12px;
}

.login-card h2 {
  font-size: 24px;
  margin-bottom: 0;
}

.step-pill {
  background: #ecfdf3;
  border: 1px solid #abefc6;
  border-radius: 999px;
  color: #067647;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  justify-self: start;
  padding: 6px 10px;
}

.login-input {
  margin-bottom: 2px;
}

.login-input input {
  font-size: 18px;
  min-height: 52px;
}

.tight {
  margin-bottom: 0;
}

.state-box {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 750;
  margin-bottom: 14px;
  padding: 14px;
}

.copy-box {
  background: #101828;
  border-radius: 8px;
  color: #e6edf7;
  font-size: 18px;
  font-weight: 800;
  overflow-wrap: anywhere;
  padding: 14px;
}

.advanced-panel {
  margin-top: 18px;
}

.remote-browser {
  align-items: center;
  aspect-ratio: 16 / 9;
  background: #101828;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: crosshair;
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
  min-height: 320px;
  outline: none;
  overflow: hidden;
  position: relative;
}

.remote-browser:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
}

.remote-browser img {
  display: none;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.remote-empty {
  color: #e6edf7;
  font-weight: 700;
  padding: 20px;
  text-align: center;
}

.remote-input-row {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 12px;
}

.item {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

.item:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.compact-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 10px;
}

.compact-form label {
  margin-bottom: 0;
}

.compact-form .muted {
  margin: 0;
}

.compact-form button {
  justify-self: start;
}

.category-settings {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 12px;
  padding: 10px 12px;
}

.category-settings summary {
  cursor: pointer;
  font-weight: 800;
}

.category-settings form {
  margin-top: 14px;
}

.table {
  display: grid;
  gap: 0;
}

.row {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) 100px 100px;
  padding: 12px 0;
}

.row.head {
  border-top: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  padding-top: 0;
  text-transform: uppercase;
}

.offers .row {
  grid-template-columns: minmax(0, 1fr) 90px 110px 80px 120px;
}

.row span,
.row strong,
.row small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.row small {
  display: block;
  margin-top: 6px;
}

.offer-thumb {
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 6px;
  float: left;
  height: 72px;
  margin: 0 12px 8px 0;
  object-fit: cover;
  width: 72px;
}

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

.offer-actions button {
  width: 100%;
}

.status-pill {
  background: #eef4ff;
  border: 1px solid #c7d7fe;
  border-radius: 999px;
  color: #3538cd;
  display: inline-flex;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  padding: 7px 10px;
  text-transform: uppercase;
}

.status-pill.completed,
.status-pill.queued,
.status-pill.sent {
  background: #ecfdf3;
  border-color: #abefc6;
  color: #067647;
}

.status-pill.running {
  background: #fffaeb;
  border-color: #fedf89;
  color: #b54708;
}

.status-pill.failed,
.status-pill.blocked,
.status-pill.send_failed {
  background: #fee4e2;
  border-color: #fecdca;
  color: #b42318;
}

.status-pill.draft,
.status-pill.idle {
  background: #f8fafc;
  border-color: var(--line);
  color: var(--muted);
}

.status-pill.affiliate_pending,
.status-pill.affiliate_login_required,
.status-pill.affiliate_failed {
  background: #f4f3ff;
  border-color: #d9d6fe;
  color: #5925dc;
}

.status-pill.aguardando,
.status-pill.processando,
.status-pill.pendente,
.status-pill.revisao {
  background: #fffaeb;
  border-color: #fedf89;
  color: #b54708;
}

.status-pill.pronto,
.status-pill.liberado {
  background: #ecfdf3;
  border-color: #abefc6;
  color: #067647;
}

.status-pill.falhou {
  background: #fee4e2;
  border-color: #fecdca;
  color: #b42318;
}

.catalog-heading {
  gap: 14px;
}

.heading-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ghost-link {
  background: #ffffff;
  color: var(--text);
}

.category-strip {
  display: flex;
  gap: 10px;
  margin: 0 0 18px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.category-chip {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #344054;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 800;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
}

.category-chip small {
  color: var(--muted);
  font-weight: 750;
}

.category-chip.active {
  background: #ecfdf3;
  border-color: #99d6cb;
  color: var(--brand-dark);
}

.product-grid {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.product-card,
.ready-offer,
.queue-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.product-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  width: 100%;
}

.marketplace-card.marketplace-mercadolivre {
  border-color: #f7d95c;
}

.marketplace-card.marketplace-shopee {
  border-color: #ffb4a3;
}

.product-image {
  align-items: center;
  aspect-ratio: 1 / 0.78;
  background: #f8fafc;
  color: var(--muted);
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.product-image img {
  height: 100%;
  object-fit: contain;
  padding: 10px;
  width: 100%;
}

.product-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 12px 14px 14px;
}

.product-meta {
  align-content: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 54px;
}

.product-meta span {
  background: #f2f4f7;
  border: 1px solid #e4e7ec;
  border-radius: 999px;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 5px 8px;
}

.product-meta span.marketplace-chip {
  border-width: 1px;
}

.marketplace-chip.marketplace-mercadolivre {
  background: #fff8d6;
  border-color: #facc15;
  color: #7a4f00;
}

.marketplace-chip.marketplace-shopee {
  background: #fff1ed;
  border-color: #ffb4a3;
  color: #a13718;
}

.product-card h2,
.ready-offer h2,
.queue-item h2 {
  font-size: 16px;
  line-height: 1.35;
  margin: 0;
  overflow-wrap: anywhere;
}

.product-card .product-offer-summary {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.product-card .product-offer-summary h2 {
  display: -webkit-box;
  min-height: calc(1.35em * 3);
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.price-line {
  display: grid;
  gap: 3px;
  min-height: 43px;
}

.price-line small {
  color: var(--muted);
  font-size: 13px;
  text-decoration: line-through;
}

.price-line strong,
.offer-price {
  color: #067647;
  font-size: 19px;
  font-weight: 850;
  margin: 0;
}

.commission-seal {
  align-items: center;
  background: linear-gradient(135deg, #ecfdf3 0%, #fffbeb 100%);
  border: 1px solid #abefc6;
  border-radius: 999px;
  color: #065f46;
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 850;
  gap: 5px 7px;
  justify-self: start;
  line-height: 1.15;
  min-height: 32px;
  padding: 6px 9px;
  width: fit-content;
}

.commission-seal b,
.commission-seal em,
.commission-seal small {
  font-style: normal;
  line-height: 1.15;
}

.commission-seal small {
  color: #047857;
  flex-basis: 100%;
  font-size: 11px;
}

.operator-only {
  display: none;
}

body.is-superuser .operator-only {
  display: flex;
}

.commission-seal.operator-only {
  display: flex;
}

.coupon-seal {
  align-items: center;
  background: #f7f8fa;
  border: 1px solid #d7dde5;
  border-radius: 6px;
  color: #4c5665;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  margin: 2px 0 8px;
  max-width: 100%;
  padding: 4px 8px;
  width: fit-content;
}

.coupon-catalog-seal {
  background: #fff8d6;
  border: 1px solid #f2c94c;
  border-radius: 6px;
  color: #624500;
  display: grid;
  align-content: center;
  gap: 2px;
  min-height: 58px;
  padding: 7px 9px;
}

.coupon-catalog-seal span,
.coupon-catalog-seal small {
  font-size: 12px;
}

.coupon-catalog-seal strong {
  font-size: 15px;
  overflow-wrap: anywhere;
}

.coupon-catalog-seal.available {
  background: #f8fafc;
  border-color: #d0d5dd;
  color: #475467;
}

.coupon-seal.eligible {
  background: #eef9f1;
  border-color: #85c69b;
  color: #176b35;
}

.coupon-seal.automatic {
  background: #fff9e8;
  border-color: #e5c773;
  color: #765b0a;
}

.coupon-seal.restricted,
.coupon-seal.pending {
  color: #657080;
}

.product-signals {
  align-content: start;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 30px;
}

.product-benefits {
  align-content: start;
  display: grid;
  gap: 8px;
  min-width: 0;
}

.product-signals span {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  color: #9a3412;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  padding: 7px 8px;
}

.discount-thermometer {
  --meter-color: #667085;
  --meter-soft: #f2f4f7;
  --meter-border: #eaecf0;
  background: #ffffff;
  border: 1px solid #eaecf0;
  border-radius: 7px;
  display: grid;
  gap: 8px;
  overflow: hidden;
  padding: 9px 10px 8px;
  position: relative;
}

.discount-thermometer-head {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-width: 0;
}

.discount-thermometer-head span,
.discount-thermometer-head strong {
  line-height: 1.1;
}

.discount-thermometer-head span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.discount-thermometer-head strong {
  color: var(--meter-color);
  font-size: 17px;
  font-weight: 850;
  white-space: nowrap;
}

.discount-thermometer p {
  color: #475467;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
  margin: 0;
  min-width: 0;
}

.discount-thermometer p b {
  color: var(--meter-color);
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 850;
}

.discount-thermometer-track {
  background:
    linear-gradient(90deg,
      rgba(240, 68, 56, 0.16) 0%,
      rgba(240, 68, 56, 0.16) 20%,
      rgba(247, 144, 9, 0.18) 20%,
      rgba(247, 144, 9, 0.18) 35%,
      rgba(245, 158, 11, 0.2) 35%,
      rgba(245, 158, 11, 0.2) 50%,
      rgba(18, 183, 106, 0.18) 50%,
      rgba(18, 183, 106, 0.18) 70%,
      rgba(15, 118, 110, 0.18) 70%,
      rgba(15, 118, 110, 0.18) 100%);
  border: 1px solid #eaecf0;
  border-radius: 999px;
  height: 14px;
  margin: 5px 24px 2px;
  overflow: visible;
  position: relative;
}

.discount-thermometer-track::before,
.discount-thermometer-track::after {
  background: rgba(16, 24, 40, 0.12);
  border-radius: 999px;
  content: "";
  height: 10px;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 1px;
  z-index: 1;
}

.discount-thermometer-track::before {
  left: 25%;
}

.discount-thermometer-track::after {
  left: 75%;
}

.discount-thermometer-track span {
  background:
    linear-gradient(90deg,
      rgba(217, 45, 32, 0.3) 0%,
      rgba(247, 144, 9, 0.32) 42%,
      rgba(18, 183, 106, 0.32) 70%,
      rgba(15, 118, 110, 0.34) 100%);
  border-radius: inherit;
  display: block;
  height: 100%;
  position: relative;
  width: calc(var(--discount-pct) * 1%);
}

.discount-thermometer-track i {
  background: var(--meter-color);
  border: 2px solid #ffffff;
  border-radius: 999px;
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--meter-color) 20%, transparent),
    0 6px 16px rgba(16, 24, 40, 0.24);
  color: #ffffff;
  display: grid;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  height: 26px;
  left: calc(var(--discount-pct) * 1%);
  min-width: 42px;
  padding: 0 7px;
  place-items: center;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
}

.discount-thermometer-track i::after {
  content: attr(data-percent);
}

.discount-thermometer-foot {
  align-items: center;
  color: #98a2b3;
  display: grid;
  font-size: 10px;
  font-weight: 750;
  grid-template-columns: repeat(5, 1fr);
  line-height: 1;
  margin: 0 24px;
  min-width: 0;
  text-align: center;
}

.discount-thermometer-foot span:first-child {
  text-align: left;
}

.discount-thermometer-foot span:last-child {
  text-align: right;
}

.discount-thermometer.baixo {
  --meter-color: #b42318;
  --meter-soft: #fef3f2;
  --meter-border: #fecdca;
}

.discount-thermometer.bom {
  --meter-color: #c2410c;
  --meter-soft: #fffaeb;
  --meter-border: #fedf89;
}

.discount-thermometer.leve {
  --meter-color: #d97706;
  --meter-soft: #fffbeb;
  --meter-border: #fde68a;
}

.discount-thermometer.forte {
  --meter-color: #ca8a04;
  --meter-soft: #fefce8;
  --meter-border: #fde047;
}

.discount-thermometer.otimo {
  --meter-color: #027a48;
  --meter-soft: #ecfdf3;
  --meter-border: #abefc6;
}

.discount-thermometer.excelente {
  --meter-color: #0e9384;
  --meter-soft: #f0fdf9;
  --meter-border: #99f6e4;
}

.empty-state {
  text-align: center;
}

.success-box {
  background: #ecfdf3;
  border: 1px solid #abefc6;
  border-radius: 6px;
  color: #067647;
  font-weight: 800;
  margin-bottom: 14px;
  padding: 10px 12px;
}

.compact-alert {
  margin: 10px 0 0;
}

.queue-list,
.offer-list {
  display: grid;
  gap: 14px;
}

.queue-item {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: 90px minmax(0, 1fr) auto;
  padding: 12px;
}

.queue-thumb,
.ready-media {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.queue-thumb {
  aspect-ratio: 1;
  width: 90px;
}

.queue-thumb img,
.ready-media img {
  height: 100%;
  object-fit: contain;
  padding: 6px;
  width: 100%;
}

.queue-content {
  display: grid;
  gap: 7px;
}

.queue-content p,
.queue-content a {
  margin: 0;
}

.queue-status {
  justify-self: end;
}

.ready-offer {
  display: grid;
  gap: 0;
  grid-template-columns: 190px minmax(0, 1fr);
  overflow: hidden;
}

.ready-media {
  aspect-ratio: 1;
  border: 0;
  border-radius: 0;
  min-height: 190px;
}

.ready-content {
  display: grid;
  gap: 11px;
  padding: 16px;
}

.message-label {
  margin: 0;
}

.message-box {
  background: #f8fafc;
  line-height: 1.45;
  min-height: 132px;
  overflow: hidden;
  resize: none;
  white-space: pre-wrap;
}

.break-word {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.job-status {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 12px;
}

.job-status small {
  color: var(--muted);
}

.chat-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: 300px minmax(0, 1fr);
}

.chat-side {
  align-self: start;
}

.agent-note {
  border-top: 1px solid var(--line);
  margin: 4px 0 16px;
  padding-top: 14px;
}

.agent-note strong,
.agent-note span {
  display: block;
}

.agent-note span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}

.agent-note p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  margin: 12px 0 0;
  overflow-wrap: anywhere;
}

.chat-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  grid-template-rows: minmax(420px, 62vh) auto;
  min-height: 520px;
  overflow: hidden;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 18px;
}

.chat-empty {
  align-self: center;
  color: var(--muted);
  font-weight: 700;
  margin: auto;
}

.chat-message {
  display: grid;
  gap: 5px;
  max-width: min(720px, 86%);
}

.chat-message span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chat-message p {
  border: 1px solid var(--line);
  border-radius: 8px;
  line-height: 1.5;
  margin: 0;
  overflow-wrap: anywhere;
  padding: 11px 13px;
  white-space: pre-wrap;
}

.chat-message.from-user {
  align-self: flex-end;
}

.chat-message.from-user span {
  text-align: right;
}

.chat-message.from-user p {
  background: #e7f6f3;
  border-color: #b8ded7;
}

.chat-message.from-assistant {
  align-self: flex-start;
}

.chat-message.from-assistant p {
  background: #f8fafc;
}

.chat-composer {
  align-items: end;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 14px;
}

.chat-composer textarea {
  max-height: 180px;
  min-height: 48px;
  resize: vertical;
}

.alert {
  background: #fee4e2;
  border: 1px solid #fecdca;
  border-radius: 6px;
  color: var(--danger);
  margin-bottom: 14px;
  padding: 10px 12px;
}

pre {
  background: #101828;
  border-radius: 6px;
  color: #e6edf7;
  overflow: auto;
  padding: 14px;
  white-space: pre-wrap;
}

.qr {
  max-width: 320px;
  width: 100%;
}

.nav-badge-link {
  align-items: center;
  display: inline-flex;
  gap: 6px;
}

.nav-badge {
  align-items: center;
  background: #b42318;
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 11px;
  font-weight: 850;
  justify-content: center;
  min-width: 19px;
  padding: 3px 6px;
}

.nav-badge[hidden],
[hidden] {
  display: none !important;
}

.quick-actions,
.compact-list {
  display: grid;
  gap: 10px;
}

.compact-row {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 4px;
  padding: 10px 0;
}

.compact-row:first-child {
  border-top: 0;
}

.compact-row span {
  color: var(--text);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.compact-row small,
.action-note,
.inline-status,
.small-empty {
  color: var(--muted);
  font-size: 13px;
}

.catalog-tools {
  align-items: stretch;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(180px, 1fr) minmax(190px, 240px) minmax(170px, 230px);
  margin-bottom: 14px;
}

.catalog-tools label {
  margin-bottom: 0;
}

.catalog-tools.coupon-catalog-tools {
  grid-template-columns: minmax(220px, 1fr) minmax(170px, 230px);
}

.search-box {
  margin-bottom: 0;
}

.catalog-action {
  display: grid;
  gap: 8px;
}

.catalog-destination-picker {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  display: flex;
  font-size: 13px;
  font-weight: 800;
  justify-content: space-between;
  min-height: 40px;
  padding: 8px 10px;
  text-align: left;
  width: 100%;
}

.catalog-destination-picker small {
  color: var(--muted);
  font-weight: 700;
}

.destination-sheet {
  align-items: center;
  background: rgb(16 24 40 / 55%);
  display: flex;
  inset: 0;
  justify-content: center;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
  position: fixed;
  z-index: 120;
}

.destination-sheet-panel {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgb(16 24 40 / 24%);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: min(720px, calc(100dvh - 32px));
  max-width: 620px;
  overflow: hidden;
  width: 100%;
}

.destination-sheet-head,
.destination-sheet-actions {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 14px 16px;
}

.destination-sheet-head {
  border-bottom: 1px solid var(--line);
}

.destination-sheet-head > div {
  min-width: 0;
}

.destination-sheet-head h2 {
  display: -webkit-box;
  font-size: 18px;
  line-height: 1.25;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.destination-sheet-head button {
  flex: 0 0 auto;
}

.destination-sheet-head h2,
.destination-sheet-head p {
  margin: 0;
}

.destination-sheet-list {
  display: grid;
  gap: 6px;
  overflow-y: auto;
  padding: 12px 16px;
  scrollbar-gutter: stable;
}

.destination-sheet-actions {
  border-top: 1px solid var(--line);
}

.destination-sheet-error {
  margin: 0 16px 12px;
}

.destination-sheet-actions button {
  width: 100%;
}

body.destination-sheet-open {
  overflow: hidden;
}

html:has(body.destination-sheet-open) {
  overflow: hidden;
}

.routing-heading form,
.routing-heading button {
  margin: 0;
}

.routing-form,
.routing-category-list {
  display: grid;
  gap: 12px;
}

.routing-category-list {
  overflow-anchor: none;
}

.routing-category-list[hidden] {
  display: none;
}

.routing-section-title {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.routing-section-title h2,
.routing-section-title p {
  margin: 0;
}

.destination-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.destination-toggle-row {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
}

.destination-toggle-row:has(input:checked) {
  background: #ecfdf3;
  border-color: #99d6cb;
}

.destination-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin: 0;
  min-height: 46px;
  padding: 10px 8px 10px 12px;
}

.destination-toggle:has(input:checked) {
  background: transparent;
}

.destination-toggle-input {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px !important;
  max-height: 1px !important;
  margin: -1px !important;
  min-height: 0 !important;
  opacity: 0;
  overflow: hidden;
  padding: 0 !important;
  position: absolute;
  white-space: nowrap;
  width: 1px !important;
}

.destination-sheet-option {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 54px;
  padding: 8px 12px;
  transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.destination-sheet-option:hover {
  border-color: #b7c4cf;
}

.destination-sheet-option:has(input:checked) {
  background: #ecfdf3;
  border-color: #79c7a2;
  box-shadow: inset 3px 0 0 #178653;
}

.destination-switch {
  background: #a8b0b9;
  border-radius: 999px;
  display: block;
  height: 22px;
  padding: 2px;
  transition: background-color 150ms ease;
  width: 40px;
}

.destination-switch > span {
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.25);
  display: block;
  height: 18px;
  transform: translateX(0);
  transition: transform 150ms ease;
  width: 18px;
}

.destination-toggle:has(input:checked) .destination-switch {
  background: #178653;
}

.destination-toggle:has(input:checked) .destination-switch > span {
  transform: translateX(18px);
}

.destination-toggle-input:focus-visible + .destination-toggle-copy + .destination-switch {
  box-shadow: 0 0 0 3px rgba(23, 134, 83, 0.2);
}

.destination-toggle-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.destination-toggle-copy strong {
  font-size: 14px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.destination-toggle-copy small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.25;
}

.destination-ignore-button {
  align-items: center;
  background: #fff1f2;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #c81e3a;
  cursor: pointer;
  display: flex;
  font-size: 11px;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  min-height: 24px;
  padding: 0;
  margin-right: 8px;
  width: 24px;
}

.destination-ignore-button:hover,
.destination-ignore-button:focus-visible {
  background: #ffe4e6;
  border-color: #fda4af;
  outline: none;
}

.routing-orphaned-queue {
  background: #fff8e6;
  border: 1px solid #ebd79b;
  border-radius: 6px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.routing-orphaned-queue h2,
.routing-orphaned-queue p {
  margin: 0;
}

.routing-orphaned-queue h2 {
  font-size: 15px;
}

.routing-orphaned-list {
  display: grid;
  gap: 8px;
}

.routing-orphaned-row {
  align-items: center;
  border-top: 1px solid #ebd79b;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding-top: 8px;
}

.routing-orphaned-row > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.routing-orphaned-row strong,
.routing-orphaned-row small {
  overflow-wrap: anywhere;
}

.routing-orphaned-row small {
  color: var(--muted);
  font-size: 11px;
}

.routing-ignored-groups {
  display: grid;
  gap: 12px;
}

.routing-ignored-list {
  display: grid;
  gap: 8px;
}

.routing-ignored-row {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding-top: 8px;
}

.routing-ignored-row > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.routing-ignored-row strong,
.routing-ignored-row small {
  overflow-wrap: anywhere;
}

.routing-ignored-row small {
  color: var(--muted);
  font-size: 11px;
}

.routing-category-tools {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 10px;
  position: sticky;
  top: 58px;
  z-index: 10;
}

.routing-create-category {
  align-items: end;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(220px, 0.8fr) minmax(320px, 1.2fr);
}

.routing-create-category h2,
.routing-create-category p {
  margin: 0;
}

.routing-create-form,
.routing-create-form label {
  margin: 0;
}

.routing-create-form > div {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.routing-create-form button {
  white-space: nowrap;
}

.routing-category-summary {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding-top: 10px;
}

.routing-category-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.routing-marketplace-tabs {
  display: grid;
  gap: 6px;
  grid-template-columns: 1fr 1fr;
}

.routing-marketplace-tabs button {
  background: #f8fafc;
  border-color: var(--line);
  color: var(--muted);
  margin: 0;
  min-width: 0;
  width: 100%;
}

.routing-marketplace-tabs button.active {
  background: #0f766e;
  border-color: #0f766e;
  color: #ffffff;
}

.routing-marketplace-heading {
  padding: 4px 2px;
}

.routing-marketplace-heading h2,
.routing-marketplace-heading p {
  margin: 0;
}

.routing-marketplace-heading h2 {
  font-size: 18px;
}

.routing-category-tools label {
  margin: 0;
  padding: 10px 0;
}

.routing-category {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.routing-category summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 52px;
  padding: 12px 14px;
}

.routing-category summary span {
  font-weight: 850;
  overflow-wrap: anywhere;
}

.routing-category summary small {
  color: var(--muted);
  flex: 0 0 auto;
}

.routing-category[open] summary {
  border-bottom: 1px solid var(--line);
}

.routing-source-summary {
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin: 0;
  overflow-wrap: anywhere;
  padding: 10px 12px;
}

.routing-category > .destination-grid {
  padding: 12px;
}

.routing-category-editor {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.routing-category-editor > .destination-grid {
  padding: 0;
}

.routing-category-name-editor {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  gap: 8px;
  min-height: 42px;
  padding: 5px 6px 5px 10px;
}

.routing-category-name-value {
  flex: 1 1 auto;
  font-size: 13px;
  font-weight: 800;
  min-width: 0;
  overflow-wrap: anywhere;
}

.routing-category-name-input {
  flex: 1 1 auto;
  font-size: 14px;
  margin: 0;
  min-height: 32px;
  min-width: 0;
  padding: 5px 8px;
}

.routing-category-name-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 5px;
}

.routing-category-name-editor button {
  margin: 0;
}

.compact-icon-button {
  align-items: center;
  display: inline-flex;
  font-size: 18px;
  height: 32px;
  justify-content: center;
  min-height: 32px;
  padding: 0;
  width: 32px;
}

.compact-text-button,
.button-link.compact-text-button {
  font-size: 12px;
  min-height: 32px;
  padding: 6px 10px;
}

.routing-delete-category {
  color: #b42318;
}

.whatsapp-group-preferences {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.whatsapp-group-preferences-heading {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.whatsapp-group-preferences-heading h2,
.whatsapp-group-preferences-heading p,
.whatsapp-group-preferences-heading form,
.whatsapp-groups-feedback {
  margin: 0;
}

.whatsapp-group-preferences-tools {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: auto auto minmax(220px, 1fr);
}

.whatsapp-group-preferences-tools > span {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
  padding: 8px 10px;
}

.whatsapp-group-preferences-tools label {
  font-size: 12px;
  margin: 0;
}

.whatsapp-group-preferences-tools input {
  min-height: 36px;
  padding: 7px 9px;
}

.whatsapp-group-section {
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.whatsapp-group-section > summary {
  align-items: center;
  background: #f8fafc;
  cursor: pointer;
  display: flex;
  font-size: 13px;
  font-weight: 850;
  gap: 8px;
  justify-content: space-between;
  min-height: 40px;
  padding: 8px 10px;
}

.whatsapp-group-section > summary small {
  color: var(--muted);
  font-size: 11px;
}

.whatsapp-group-list {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  padding: 9px;
}

.whatsapp-group-preference-row .destination-toggle {
  padding-right: 10px;
}

.whatsapp-group-empty {
  font-size: 12px;
  margin: 0;
  padding: 10px;
}

.routing-empty-categories,
.routing-no-groups {
  text-align: center;
}

.routing-empty-categories h2,
.routing-empty-categories p,
.routing-no-groups h2,
.routing-no-groups p {
  margin: 0;
}

.routing-save-bar {
  background: rgb(255 255 255 / 96%);
  border-top: 1px solid var(--line);
  bottom: 0;
  margin: 4px -4px -4px;
  padding: 12px 4px calc(12px + env(safe-area-inset-bottom));
  position: sticky;
  z-index: 12;
}

.routing-save-bar button {
  width: 100%;
}

.auto-send-check {
  align-items: start;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  margin: 0;
}

.full {
  justify-content: center;
  text-align: center;
  width: 100%;
}

.center {
  justify-content: center;
}

.queue-board {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.queue-column {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.queue-column h2 {
  margin: 0;
}

.compact-queue-item {
  align-items: start;
  border-radius: 6px;
  grid-template-columns: 64px minmax(0, 1fr);
  padding: 10px;
}

.compact-queue-item .queue-thumb {
  width: 64px;
}

.queue-item h3 {
  font-size: 14px;
  line-height: 1.35;
  margin: 0;
  overflow-wrap: anywhere;
}

.mini-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.compact-button {
  font-size: 13px;
  min-height: 34px;
  padding: 7px 10px;
}

.compact-offer {
  grid-template-columns: 136px minmax(0, 1fr);
}

.compact-offer .ready-media {
  min-height: 136px;
}

.compact-message {
  font-size: 14px;
  min-height: 104px;
}

.icon-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.icon-button {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  font-size: 13px;
  font-weight: 850;
  justify-content: center;
  min-height: 34px;
  min-width: 46px;
  padding: 7px 9px;
}

.icon-button.active {
  background: #ecfdf3;
  border-color: #99d6cb;
  color: var(--brand-dark);
}

.inline-status {
  margin: 0;
  min-height: 18px;
}

.delivery-progress {
  display: grid;
  gap: 3px;
  margin: 0;
}

.delivery-progress strong {
  color: var(--text);
  font-size: 13px;
}

.delivery-progress span {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.offer-detail {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
  overflow: hidden;
}

.detail-media {
  align-items: center;
  background: #f8fafc;
  display: flex;
  justify-content: center;
  min-height: 360px;
}

.detail-media img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  padding: 16px;
}

.detail-content {
  display: grid;
  gap: 13px;
  padding: 18px;
}

.detail-content h2 {
  font-size: 22px;
  line-height: 1.3;
  margin: 0;
}

.detail-actions {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.danger-button {
  border-color: #fecdca;
  color: var(--danger);
}

.status-pill.cancelado {
  background: #f8fafc;
  border-color: var(--line);
  color: var(--muted);
}

@media (max-width: 820px) {
  .auth,
  .grid.two,
  .chat-layout,
  .metrics {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    min-height: 0;
    padding: 8px 10px;
  }

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

  .dashboard-metrics > article:nth-child(-n + 2) {
    grid-column: span 1;
  }

  .dashboard-metrics > article:nth-child(n + 3) {
    grid-column: 1 / -1;
  }

  .queue-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .manual-product-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .queue-metrics article {
    min-width: 0;
    padding: 12px 10px;
  }

  .brand {
    font-size: 16px;
  }

  .topbar nav {
    flex-wrap: nowrap;
    grid-column: 1 / -1;
    grid-row: 2;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    width: 100%;
  }

  .topbar nav::-webkit-scrollbar {
    display: none;
  }

  .topbar nav a {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 999px;
    flex: 0 0 auto;
    font-size: 12px;
    min-height: 32px;
    padding: 7px 9px;
  }

  .client-view-inline {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }

  .client-view-inline label {
    display: none;
  }

  .client-view-inline select {
    font-size: 12px;
    min-height: 34px;
    max-width: min(38vw, 150px);
    padding: 7px 26px 7px 9px;
    width: min(38vw, 150px);
  }

  .topbar .logout-form {
    grid-column: 4;
    grid-row: 1;
    justify-self: end;
  }

  .topbar .logout-form button {
    min-height: 34px;
    padding: 7px 10px;
  }

  .shell {
    padding: 16px 12px 40px;
  }

  .row,
  .offers .row {
    grid-template-columns: 1fr;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .product-body {
    gap: 9px;
    padding: 11px 12px 12px;
  }

  .product-meta {
    min-height: 24px;
  }

  .discount-thermometer-track,
  .discount-thermometer-foot {
    margin-left: 20px;
    margin-right: 20px;
  }

  .queue-board,
  .offer-detail {
    grid-template-columns: 1fr;
  }

  .queue-item {
    align-items: start;
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .queue-thumb {
    width: 76px;
  }

  .queue-status {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .ready-offer {
    grid-template-columns: 1fr;
  }

  .ready-media {
    aspect-ratio: 1 / 0.72;
    min-height: 0;
  }

  .actions a,
  .actions button,
  .button-link {
    justify-content: center;
    width: 100%;
  }

  .heading {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .heading-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .login-card h2 {
    font-size: 22px;
  }

  .remote-browser {
    min-height: 220px;
  }

  .remote-input-row {
    grid-template-columns: 1fr;
  }

  .catalog-tools {
    grid-template-columns: 1fr;
  }

  .catalog-tools.coupon-catalog-tools {
    grid-template-columns: minmax(0, 1fr) minmax(150px, 0.75fr);
  }

  .catalog-tools label {
    font-size: 12px;
  }

  .catalog-tools input,
  .catalog-tools select {
    min-height: 38px;
    min-width: 0;
    padding: 8px 9px;
    width: 100%;
  }

  .category-strip {
    max-width: 100%;
  }

  .pagination {
    flex-wrap: wrap;
  }

  .pagination button {
    flex: 1 1 82px;
    min-width: 0;
  }

  .destination-sheet {
    align-items: flex-end;
    overflow: hidden;
    padding: 0;
  }

  .destination-sheet-panel {
    border-bottom: 0;
    border-left: 0;
    border-radius: 8px 8px 0 0;
    border-right: 0;
    max-height: min(88dvh, 720px);
  }

  .destination-sheet-head,
  .destination-sheet-actions {
    padding: 12px 14px;
  }

  .destination-sheet-head {
    align-items: flex-start;
  }

  .destination-sheet-head h2 {
    font-size: 16px;
  }

  .destination-sheet-head small {
    font-size: 11px;
  }

  .destination-sheet-list {
    gap: 6px;
    padding: 10px 12px;
  }

  .destination-sheet-option {
    min-height: 52px;
    padding: 7px 10px 7px 12px;
  }

  .destination-toggle-copy strong {
    font-size: 13px;
  }

  .destination-grid {
    grid-template-columns: 1fr;
  }

  .routing-create-category {
    align-items: stretch;
    gap: 12px;
    grid-template-columns: 1fr;
  }

  .routing-create-form > div {
    grid-template-columns: 1fr;
  }

  .routing-create-form button {
    width: 100%;
  }

  .routing-category-summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .routing-category-name-editor {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .routing-category-name-input {
    flex-basis: calc(100% - 110px);
  }

  .routing-category-name-actions {
    margin-left: auto;
  }

  .routing-category-tools {
    top: 58px;
  }

  .routing-orphaned-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .routing-orphaned-row button,
  .routing-ignored-row button {
    width: 100%;
  }

  .routing-ignored-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .whatsapp-group-preferences-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .whatsapp-group-preferences-heading button {
    width: 100%;
  }

  .whatsapp-group-preferences-tools {
    grid-template-columns: 1fr 1fr;
  }

  .whatsapp-group-preferences-tools label {
    grid-column: 1 / -1;
  }

  .whatsapp-group-list {
    grid-template-columns: 1fr;
    padding: 7px;
  }

  .form-grid.two-fields {
    grid-template-columns: 1fr;
  }

  .chat-panel {
    grid-template-rows: minmax(360px, 58vh) auto;
    min-height: 460px;
  }

  .chat-message {
    max-width: 94%;
  }

  .chat-composer {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 359px) {
  .product-meta {
    min-height: 54px;
  }
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 18px 0 8px;
}

.pagination button {
  min-width: 92px;
}

.pagination span {
  color: var(--muted, #596780);
  font-size: 14px;
  white-space: nowrap;
}
.coupon-heading {
  align-items: center;
}

.coupon-scope-alert {
  border-left: 4px solid #f4c430;
  margin-bottom: 18px;
}

.coupon-tools {
  margin-bottom: 18px;
}

.coupon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 14px;
}

.coupon-catalog-card {
  background: #fff;
  border: 1px solid #dedede;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 16px;
}

.coupon-card-top {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-height: 42px;
}

.coupon-card-top > div {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.coupon-card-top > img {
  border: 1px solid #ededed;
  border-radius: 50%;
  height: 40px;
  object-fit: cover;
  width: 40px;
}

.coupon-discount {
  align-items: baseline;
  color: #16803a;
  display: flex;
  gap: 5px;
}

.coupon-discount strong {
  font-size: 30px;
  letter-spacing: 0;
  line-height: 1;
}

.coupon-discount span {
  font-size: 13px;
  font-weight: 800;
}

.coupon-catalog-card h2 {
  font-size: 17px;
  line-height: 1.25;
  margin: 0;
  overflow-wrap: anywhere;
}

.coupon-catalog-card > p {
  margin: 0;
}

.coupon-rules {
  border-top: 1px solid #ededed;
  margin: 0;
  padding-top: 8px;
}

.coupon-rules > div {
  display: grid;
  gap: 8px;
  grid-template-columns: 58px minmax(0, 1fr);
  padding: 3px 0;
}

.coupon-rules dt {
  color: #686868;
  font-size: 12px;
}

.coupon-rules dd {
  font-size: 12px;
  margin: 0;
  overflow-wrap: anywhere;
}

.coupon-scarcity {
  color: #b54b12;
  font-size: 12px;
  font-weight: 700;
}

.coupon-products {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(4, 1fr);
  margin-top: auto;
}

.coupon-products img {
  aspect-ratio: 1;
  background: #f7f7f7;
  border: 1px solid #ededed;
  border-radius: 6px;
  object-fit: contain;
  width: 100%;
}

.coupon-catalog-card .button-link.full {
  margin-top: 4px;
  text-align: center;
  width: 100%;
}

.coupon-pagination {
  margin-top: 18px;
}

.campaign-heading {
  align-items: flex-end;
}

.campaign-heading p {
  margin-bottom: 0;
}

.campaign-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 18px 0;
  border-top: 1px solid #d9e1e7;
  border-bottom: 1px solid #d9e1e7;
}

.campaign-summary > div {
  min-width: 0;
  padding: 15px 18px;
}

.campaign-summary > div + div {
  border-left: 1px solid #d9e1e7;
}

.campaign-summary span,
.campaign-summary strong {
  display: block;
}

.campaign-summary span {
  margin-bottom: 4px;
  color: #64717d;
  font-size: 12px;
}

.campaign-summary strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

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

.campaign-group-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d7dfe6;
  border-radius: 8px;
  background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease, opacity .16s ease;
}

.campaign-group-card.is-enabled {
  border-color: #80cbb2;
  box-shadow: inset 3px 0 #159a70;
}

.campaign-group-card.is-saving {
  opacity: .66;
  pointer-events: none;
}

.campaign-group-card form {
  display: grid;
  min-height: 100%;
}

.campaign-group-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
}

.campaign-group-card__header > div {
  min-width: 0;
}

.campaign-group-card__header h2,
.campaign-group-card__header p {
  margin: 0;
}

.campaign-group-card__header h2 {
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.35;
}

.campaign-group-card__header p {
  margin-top: 5px;
  color: #66737d;
  font-size: 12px;
}

.campaign-switch {
  display: grid;
  flex: 0 0 auto;
  justify-items: center;
  gap: 3px;
  color: #64717d;
  font-size: 11px;
  cursor: pointer;
}

.campaign-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.campaign-switch > span {
  display: block;
  width: 42px;
  height: 24px;
  padding: 3px;
  border-radius: 14px;
  background: #a9b2b9;
  transition: background .16s ease;
}

.campaign-switch i {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(20, 34, 44, .28);
  transition: transform .16s ease;
}

.campaign-switch input:checked + span {
  background: #159a70;
}

.campaign-switch input:checked + span i {
  transform: translateX(18px);
}

.campaign-switch input:focus-visible + span {
  outline: 3px solid rgba(21, 154, 112, .25);
  outline-offset: 2px;
}

.campaign-group-card__settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid #edf0f2;
  background: #f8faf9;
}

.campaign-group-card__settings label,
.campaign-availability {
  min-width: 0;
  color: #59666f;
  font-size: 12px;
}

.campaign-group-card__settings input {
  width: 100%;
  min-height: 40px;
  margin-top: 5px;
}

.campaign-availability {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 2px;
}

.campaign-availability strong {
  color: #087454;
  font-size: 16px;
}

.campaign-group-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding: 11px 16px;
  border-top: 1px solid #edf0f2;
}

.campaign-sync-state {
  flex: 0 0 auto;
  color: #6d7780;
  font-size: 11px;
  font-weight: 800;
}

.campaign-sync-state.is-ready {
  color: #087454;
}

.campaign-sync-state.is-error,
.campaign-sync-state.is-missing {
  color: #b33a31;
}

.campaign-group-card__footer small {
  min-width: 0;
  overflow: hidden;
  color: #6d7780;
  font-size: 11px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.campaign-group-card__footer small.is-error {
  color: #b33a31;
}

@media (max-width: 760px) {
  .campaign-heading {
    align-items: stretch;
  }

  .campaign-heading form,
  .campaign-heading button {
    width: 100%;
  }

  .campaign-summary {
    grid-template-columns: 1fr;
  }

  .campaign-summary > div {
    padding: 12px 4px;
  }

  .campaign-summary > div + div {
    border-top: 1px solid #d9e1e7;
    border-left: 0;
  }

  .campaign-group-list {
    grid-template-columns: 1fr;
  }

  .campaign-group-card__header {
    padding: 14px;
  }

  .campaign-group-card__settings,
  .campaign-group-card__footer {
    padding-right: 14px;
    padding-left: 14px;
  }
}

.campaign-section-heading,
.campaign-card__header,
.campaign-link-row,
.campaign-target-summary,
.campaign-edit__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.campaign-section-heading h2,
.campaign-section-heading p,
.campaign-card__header h2,
.campaign-card__header span {
  margin: 0;
}

.campaign-section-heading h2 {
  font-size: 18px;
}

.campaign-create > summary {
  list-style: none;
  cursor: pointer;
}

.campaign-create > summary::-webkit-details-marker {
  display: none;
}

.campaign-create__action {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.campaign-create__action > i {
  width: 10px;
  height: 10px;
  border-right: 2px solid #60717c;
  border-bottom: 2px solid #60717c;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .16s ease;
}

.campaign-create[open] .campaign-create__action > i {
  transform: rotate(225deg) translate(-2px, -2px);
}

.campaign-create > summary:focus-visible {
  outline: 2px solid #159a70;
  outline-offset: 6px;
}

.campaign-create-form {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.campaign-name-field input {
  width: 100%;
}

.campaign-theme-picker {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.campaign-theme-picker legend {
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

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

.campaign-theme-option {
  display: grid;
  min-width: 0;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
}

.campaign-theme-option:has(input:checked) {
  border-color: #159a70;
  box-shadow: inset 0 0 0 1px #159a70;
}

.campaign-theme-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.campaign-theme-option > span:last-child {
  display: grid;
  gap: 3px;
}

.campaign-theme-option strong {
  font-size: 13px;
}

.campaign-theme-option small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.campaign-theme-option__preview {
  display: flex;
  height: 46px;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  padding: 8px;
  border-radius: 5px;
  background: #090d15;
}

.campaign-theme-option__preview i {
  display: block;
  width: 13px;
  border-radius: 2px 2px 0 0;
  background: #f3cc35;
}

.campaign-theme-option__preview i:nth-child(1) { height: 13px; }
.campaign-theme-option__preview i:nth-child(2) { height: 26px; background: #43c254; }
.campaign-theme-option__preview i:nth-child(3) { height: 19px; }

.campaign-theme-option--babies .campaign-theme-option__preview {
  background: #263b42;
}

.campaign-theme-option--babies .campaign-theme-option__preview i:nth-child(1) { background: #f7b6c8; }
.campaign-theme-option--babies .campaign-theme-option__preview i:nth-child(2) { background: #79cfc4; }
.campaign-theme-option--babies .campaign-theme-option__preview i:nth-child(3) { background: #f5d76e; }

.campaign-theme-option--mimos_feminino .campaign-theme-option__preview {
  background: #3d2029;
}

.campaign-theme-option--mimos_feminino .campaign-theme-option__preview i:nth-child(1) { background: #d8a65d; }
.campaign-theme-option--mimos_feminino .campaign-theme-option__preview i:nth-child(2) { background: #d98299; }
.campaign-theme-option--mimos_feminino .campaign-theme-option__preview i:nth-child(3) { background: #3f8d87; }

.campaign-theme-option--home .campaign-theme-option__preview { background: #153a34; }
.campaign-theme-option--home .campaign-theme-option__preview i:nth-child(1) { background: #f2c94c; }
.campaign-theme-option--home .campaign-theme-option__preview i:nth-child(2) { background: #e24d3f; }
.campaign-theme-option--home .campaign-theme-option__preview i:nth-child(3) { background: #70b89d; }

.campaign-theme-option--technology .campaign-theme-option__preview { background: #15191c; }
.campaign-theme-option--technology .campaign-theme-option__preview i:nth-child(1) { background: #a8e62e; }
.campaign-theme-option--technology .campaign-theme-option__preview i:nth-child(2) { background: #08a9bd; }
.campaign-theme-option--technology .campaign-theme-option__preview i:nth-child(3) { background: #f5f7f7; }

.campaign-theme-option--fashion .campaign-theme-option__preview { background: #38212d; }
.campaign-theme-option--fashion .campaign-theme-option__preview i:nth-child(1) { background: #ffbd59; }
.campaign-theme-option--fashion .campaign-theme-option__preview i:nth-child(2) { background: #e84b63; }
.campaign-theme-option--fashion .campaign-theme-option__preview i:nth-child(3) { background: #44a8a2; }

.campaign-group-picker {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.campaign-group-picker legend {
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.campaign-picker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.campaign-picker-option {
  display: flex;
  min-width: 0;
  min-height: 62px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
}

.campaign-picker-option:has(input:checked) {
  border-color: #67b99c;
  background: #f1faf6;
}

.campaign-picker-option > input,
.campaign-active-toggle > input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  opacity: 0;
  pointer-events: none;
}

.campaign-picker-option__copy {
  display: grid;
  min-width: 0;
  flex: 1 1 auto;
  gap: 3px;
}

.campaign-picker-option__copy strong,
.campaign-picker-option__copy small {
  overflow-wrap: anywhere;
}

.campaign-picker-option__copy strong {
  font-size: 13px;
}

.campaign-picker-option__copy small {
  color: var(--muted);
  font-size: 11px;
}

.campaign-picker-option .destination-switch,
.campaign-active-toggle .destination-switch {
  display: block;
  flex: 0 0 auto;
  width: 42px;
  height: 24px;
  padding: 3px;
  border-radius: 14px;
  background: #a9b2b9;
}

.campaign-picker-option .destination-switch > span,
.campaign-active-toggle .destination-switch > span {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgb(20 34 44 / 28%);
  transition: transform .16s ease;
}

.campaign-picker-option input:checked ~ .destination-switch,
.campaign-active-toggle input:checked + .destination-switch {
  background: #159a70;
}

.campaign-picker-option input:checked ~ .destination-switch > span,
.campaign-active-toggle input:checked + .destination-switch > span {
  transform: translateX(18px);
}

.campaign-list {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.campaign-card {
  overflow: hidden;
  border: 1px solid #cfd9de;
  border-left: 4px solid #159a70;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 7px rgb(20 34 44 / 7%);
  transition: border-color .16s ease, box-shadow .16s ease;
}

.campaign-card[open] {
  border-color: #78bda4;
  border-left-color: #087454;
  box-shadow: 0 8px 22px rgb(20 80 62 / 13%);
}

.campaign-card.is-inactive {
  opacity: .72;
}

.campaign-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 86px;
  padding: 15px 20px;
  background: #f3faf7;
  cursor: pointer;
  list-style: none;
}

.campaign-card__header::-webkit-details-marker {
  display: none;
}

.campaign-card__header:focus-visible {
  outline: 2px solid #159a70;
  outline-offset: -3px;
}

.campaign-card[open] > .campaign-card__header {
  border-bottom: 1px solid #cfe5dc;
  background: #eaf7f1;
}

.campaign-card__identity {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.campaign-card__code {
  width: max-content;
  padding: 4px 8px;
  border-radius: 4px;
  background: #087454;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.campaign-card__header h2 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 20px;
  line-height: 1.25;
}

.campaign-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.campaign-card__badges span {
  max-width: 100%;
  padding: 3px 7px;
  border: 1px solid #dce4e8;
  border-radius: 4px;
  background: #f7f9fa;
  color: #53616b;
  font-size: 10px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.campaign-card__summary-side {
  display: grid;
  flex: 0 0 auto;
  justify-items: end;
  gap: 10px;
}

.campaign-card__toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #53616b;
  font-size: 11px;
  font-weight: 700;
}

.campaign-card__toggle > i {
  width: 9px;
  height: 9px;
  border-right: 2px solid #60717c;
  border-bottom: 2px solid #60717c;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .16s ease;
}

.campaign-card[open] .campaign-card__toggle > i {
  transform: rotate(225deg) translate(-2px, -2px);
}

.campaign-link-row {
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f7f9fa;
}

.campaign-link-row > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.campaign-link-row > div > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.campaign-link-row a {
  min-width: 0;
  overflow: hidden;
  color: #176d58;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.campaign-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 18px 20px 12px;
}

.campaign-metrics > div {
  min-width: 0;
  padding: 0 18px;
}

.campaign-metrics > div:first-child {
  padding-left: 0;
}

.campaign-metrics > div + div {
  border-left: 1px solid var(--line);
}

.campaign-metrics dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}

.campaign-metrics dd {
  margin: 6px 0 0;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.campaign-metric--conversion dd {
  color: #087454;
}

.campaign-metric-context {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding: 0 20px 17px;
  color: var(--muted);
  font-size: 11px;
}

.campaign-metric-context strong {
  color: var(--text);
}

.campaign-counter-actions {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 20px;
  border-top: 1px solid var(--line);
  background: #fbfcfc;
}

.campaign-counter-actions > span {
  color: var(--muted);
  font-size: 11px;
}

.campaign-reset-button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 6px 10px;
  color: #a12b2b;
  font-size: 11px;
}

.campaign-reset-modal[hidden] {
  display: none;
}

body.modal-open {
  overflow: hidden;
}

.campaign-reset-dialog h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.campaign-reset-dialog p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.campaign-reset-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.campaign-reset-dialog .danger-button {
  border-color: #b42318;
  background: #b42318;
  color: #fff;
}

.campaign-reset-dialog .danger-button:hover {
  border-color: #8f1d14;
  background: #8f1d14;
}

.campaign-reset-dialog__feedback {
  min-height: 18px;
  padding-top: 8px;
  font-size: 12px;
}

.campaign-target-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  padding: 11px 20px;
  border-top: 1px solid var(--line);
  background: #f5faf8;
  color: var(--muted);
  font-size: 11px;
}

.campaign-target-summary strong {
  flex: 0 0 auto;
  color: var(--text);
}

.campaign-target-summary span {
  min-width: 0;
  overflow: hidden;
  color: #40515b;
  font-weight: 700;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.campaign-target-summary small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
}

.campaign-edit {
  border-top: 1px solid var(--line);
}

.campaign-edit summary {
  padding: 11px 20px;
  color: #34454f;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.campaign-edit form {
  display: grid;
  gap: 14px;
  padding: 4px 16px 16px;
}

.campaign-edit form > label:first-child input {
  width: 100%;
}

.campaign-active-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}

.campaign-edit__actions {
  justify-content: flex-start;
}

.campaign-edit__actions span {
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 760px) {
  .campaign-section-heading {
    align-items: flex-start;
  }

  .campaign-create__action {
    align-items: flex-start;
  }

  .campaign-picker-grid {
    grid-template-columns: 1fr;
  }

  .campaign-theme-grid {
    grid-template-columns: 1fr;
  }

  .campaign-create-form > button {
    width: 100%;
  }

  .campaign-link-row {
    align-items: stretch;
    padding: 11px 14px;
  }

  .campaign-link-row a {
    align-self: center;
  }

  .campaign-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    padding: 16px 14px 12px;
  }

  .campaign-metrics > div,
  .campaign-metrics > div:first-child {
    padding: 0 10px;
  }

  .campaign-metrics > div:first-child {
    padding-left: 0;
  }

  .campaign-target-summary {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 10px 14px;
  }

  .campaign-target-summary span {
    text-align: left;
  }

  .campaign-target-summary small {
    grid-column: 2;
  }

  .campaign-counter-actions {
    align-items: center;
    padding: 9px 14px;
  }

  .campaign-reset-button {
    width: auto;
  }

  .campaign-card__header {
    min-height: 78px;
    padding: 13px 14px;
  }

  .campaign-card__header h2 {
    font-size: 17px;
  }

  .campaign-card__summary-side {
    gap: 8px;
  }

  .campaign-card__toggle > span {
    display: none;
  }

  .campaign-metrics dt {
    font-size: 10px;
  }

  .campaign-metrics dd {
    font-size: 21px;
  }

  .campaign-metric-context {
    padding: 0 14px 14px;
  }

  .campaign-edit summary {
    padding-right: 14px;
    padding-left: 14px;
  }

  .campaign-reset-dialog__actions {
    flex-direction: column-reverse;
  }

  .campaign-reset-dialog__actions button {
    width: 100%;
  }
}
